gui update
This commit is contained in:
parent
d83dd52281
commit
06bbf2fe39
|
|
@ -3,9 +3,32 @@
|
|||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
<h3>ShreeBhattJi</h3>
|
||||
<p>If you’ve ever read the Panchatantra, a few stories begin like this: “Once upon a time, there lived a poor Brahmin in a village.” In this story, that Brahmin is me — ShreeBhattJi, also known as Devdatt Bhatt, the King of Automation and Remote Control from the land of great beginnings, Bhavnagar.
|
||||
<p>I am here to help provide a great viewing experience for users, generate strong commissions for LCOs, MSOs, and ISPs, and create substantial revenue for content owners while contributing fair taxes to the government. I have reason to believe that by upgrading a few devices at the transmission point, both streaming operations and customer viewing experiences can be improved exponentially.
|
||||
<p>We are proud to present Universal Digital Encoder Decoder as all formate to all formate encoder cum decoder for dedicated hardware , virtual machines and proxmox lxc images .
|
||||
<p><a href="https://urmic.org/trusted-partners/" target="_blank"><button class="red-btn">Meet Our Partners</button></a>
|
||||
</div>
|
||||
<div class="card wide">
|
||||
<h3>Bhavnagar :- The Land Of Great Beginnings</h3>
|
||||
<ul>
|
||||
<li>The great country called India began to exist at Bhavnagar. On 15 August 1947, Indian administrative control effectively began with Bhavnagar after Maharaja Krishnakumarsinhji Bhavsinhji Gohil merged his princely state into the independent Union of India.</li>
|
||||
<p>
|
||||
<li>The “bull gift” from Maharaja Krishnakumarsinhji of Bhavnagar to Brazilian cattle baron Celso Garcia Sid helped shape the Brazilian dairy industry, leading to the world-famous Girolando breed. Today, Girolando cows produce over 80% of Brazil’s milk. <a href="https://youtu.be/HLJHFibZ130">DD INDIA REPORT</a></li>
|
||||
<p>
|
||||
<li>The first diamond-cutting industry in India started in Bhavnagar, not Surat. Skilled jewelers and artisans in Bhavnagar (Saurashtra region, Gujarat) began cutting and polishing small rough diamonds imported from Africa. These craftsmen later moved to Surat, which eventually became the world’s largest diamond-cutting and polishing hub.</li>
|
||||
<p>
|
||||
<li>The largest ship-breaking yard in the world, “Alang Ship Breaking Yard,” located in Bhavnagar district, Gujarat, started operations in 1983. It handles over 50% of global ship recycling by tonnage and is a major source of recycled steel for India’s economy.</li>
|
||||
<p>
|
||||
<li>After the Kurukshetra war, the Pandavas sought absolution for the killing that occurred in battle. Following the guidance of Lord Krishna, who gave them a black flag and a black cow, they were instructed to follow the cow until both turned white. Krishna told them that when this happened, they would be forgiven. The Pandavas followed the cow for many years to various places, but the flag and cow remained black. Finally, when they reached Koliyak Beach, both miraculously turned white.</li>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<?php include 'footer.php'; ?>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?php include 'header.php'; ?>
|
||||
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
<h3>How Can We Help ?</h3>
|
||||
<ul>
|
||||
<li>We provide free RTMP and EPG file hosting for Registared Broadcastors.</li>
|
||||
<li>Auto Publishing channel on Cable Tv, IPTV , OTT APP like <a href="https://play.google.com/store/apps/details?id=org.urmic.ott">URMIC OTT.</a></li>
|
||||
<li>LCO and MSO can get local channels via STREAMINGBOX ( One Box 30 channel - No Encoder Needed - QAM is must )</li>
|
||||
<li>ISP will get scalable Intranet OTT for resellers and customers .</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card wide">
|
||||
<h3>Say Hello to Us</h3>
|
||||
<p>C-1819 , <br>Radhesyam Soc,<br>Kalyabid, <br>Bhavnagar - 364001<br>INDIA
|
||||
<p>support@urmic.org
|
||||
<br>+91-8000-74-1919
|
||||
</div>
|
||||
<div class="card wide">
|
||||
<div class="social-row" aria-label="Social links">
|
||||
<a class="social-btn" href="https://www.facebook.com/WorldwideDigitalAssociation" target="_blank" rel="noopener" aria-label="Facebook page">
|
||||
<svg viewBox="0 0 23 23" fill="currentColor" aria-hidden="true">
|
||||
<path d="M22 12.07C22 6.47 17.52 2 11.92 2S2 6.47 2 12.07c0 4.99 3.66 9.12 8.44 9.86v-6.98H8.1v-2.88h2.34V9.41c0-2.31 1.37-3.59 3.46-3.59.99 0 2.03.18 2.03.18v2.23h-1.14c-1.12 0-1.47.7-1.47 1.42v1.7h2.5l-.4 2.88h-2.1v6.98C18.34 21.19 22 17.06 22 12.07z"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="social-btn" href="https://www.linkedin.com/in/dbhatt-org/" target="_blank" rel="noopener" aria-label="LinkedIn profile">
|
||||
<svg viewBox="0 0 23 23" fill="currentColor" aria-hidden="true">
|
||||
<path d="M4.98 3.5C4.98 4.88 3.86 6 2.5 6S0 4.88 0 3.5 1.12 1 2.5 1 4.98 2.12 4.98 3.5zM.5 8h4v14h-4V8zm7.5 0h3.84v1.93h.05c.54-1.02 1.86-2.1 3.83-2.1 4.1 0 4.86 2.7 4.86 6.21V22h-4V15.2c0-1.61-.03-3.68-2.24-3.68-2.24 0-2.58 1.75-2.58 3.55V22h-4V8z"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="social-btn" href="https://wa.me/918000741919?text=Hello%20from%20website" target="_blank" rel="noopener" aria-label="WhatsApp chat">
|
||||
<svg viewBox="0 0 23 23" fill="currentColor" aria-hidden="true">
|
||||
<path d="M20.52 3.48A11.93 11.93 0 0 0 12 0C5.37 0 .05 5.32.05 11.92c0 2.1.55 4.15 1.6 5.95L0 24l6.4-1.68c1.75 1.02 3.77 1.56 5.6 1.56 6.63 0 11.95-5.32 11.95-11.95 0-3.2-1.25-6.2-3.43-8.45zM12 21.95c-1.55 0-3.06-.4-4.36-1.16l-.31-.18-3.8 1 1-3.5-.2-.34A8.72 8.72 0 0 1 3.1 11.9c0-4.85 3.95-8.8 8.8-8.8 2.35 0 4.56.92 6.22 2.6a8.76 8.76 0 0 1-6.13 15.45zM17.03 14.1c-.29-.15-1.7-.84-1.97-.93-.27-.09-.47-.14-.67.14-.2.28-.77.93-.94 1.12-.17.19-.34.21-.63.07-.29-.15-1.23-.45-2.34-1.44-.87-.78-1.46-1.74-1.63-2.03-.17-.29-.02-.45.13-.6.13-.13.29-.34.44-.51.14-.17.19-.29.29-.48.1-.19.05-.36-.02-.51-.07-.15-.67-1.6-.92-2.19-.24-.58-.49-.5-.67-.51l-.57-.01c-.19 0-.5.07-.76.36-.27.29-1.03 1.01-1.03 2.47s1.05 2.87 1.2 3.07c.15.19 2.07 3.19 5.02 4.47 2.95 1.28 3.12.88 3.68.83.56-.05 1.78-.72 2.03-1.41.25-.69.25-1.28.18-1.41-.07-.13-.27-.19-.56-.34z"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="social-btn" href="sms:+918000741919?body=Test%20message" aria-label="Send test SMS">
|
||||
<svg viewBox="0 0 23 23" fill="currentColor" aria-hidden="true">
|
||||
<path d="M20 2H4c-1.1 0-2 .9-2 2v14l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="social-btn" href="mailto:hello@urmic.org?subject=Hello&body=Hi%2C%20I%20am%20contacting%20you%20from%20the%20website." aria-label="Send email">
|
||||
<svg viewBox="0 0 23 23" fill="currentColor" aria-hidden="true">
|
||||
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
<?php include 'header.php'; ?>
|
||||
<body>
|
||||
<style>
|
||||
:root {
|
||||
--accent: #0b74de;
|
||||
--muted: #6b7280;
|
||||
--bg: #f8fafc
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Inter, system-ui, Arial, Helvetica, sans-serif;
|
||||
background: var(--bg);
|
||||
color: #111;
|
||||
margin: 0;
|
||||
padding: 28px
|
||||
}
|
||||
|
||||
.wrap {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.card {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 18px;
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06)
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
font-weight: 600
|
||||
}
|
||||
|
||||
input[type=text],
|
||||
input[type=email],
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-top: 6px;
|
||||
border: 1px solid #e6eef6;
|
||||
border-radius: 8px
|
||||
}
|
||||
|
||||
.row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--muted);
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 14px
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.ghost {
|
||||
background: transparent;
|
||||
border: 1px solid #e6eef6;
|
||||
color: var(--accent)
|
||||
}
|
||||
|
||||
.links {
|
||||
margin-top: 10px
|
||||
}
|
||||
|
||||
.note {
|
||||
margin-top: 12px;
|
||||
padding: 10px;
|
||||
background: #f1f5f9;
|
||||
border-radius: 8px;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
margin-top: 12px
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
background: #fbfcfe;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px dashed #e6eef6;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
@media (max-width:700px) {
|
||||
.row {
|
||||
grid-template-columns: 1fr
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="wrap">
|
||||
<div class="card">
|
||||
<form method="post" action="request_cert.php">
|
||||
<label for="domain">Primary domain</label>
|
||||
<input id="domain" name="domain" type="text" placeholder="example.com" required pattern="^[A-Za-z0-9.-]{1,253}$" />
|
||||
|
||||
<label for="subdomains" class="muted">Subdomains</label>
|
||||
<input id="subdomains" name="subdomains" type="text" placeholder="www,stream,yourapp (optional)" />
|
||||
|
||||
|
||||
<label for="email">Contact email (for Let\'s Encrypt notices)</label>
|
||||
<input id="email" name="email" type="email" placeholder="admin@example.com" required />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div>
|
||||
<label for="staging">Test mode</label>
|
||||
<select id="staging" name="staging">
|
||||
<option value="0">Production</option>
|
||||
<option value="1">Staging (use for testing to avoid rate limits)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" id="agree_tc" name="agree_tc" required />
|
||||
<div>
|
||||
<label for="agree_tc" style="font-weight:700">I agree to Certbot's Terms of Service and confirm that ports <strong>80 (HTTP)</strong> and <strong>443 (HTTPS)</strong> are forwarded to this server.</label>
|
||||
<div class="muted">By checking this you authorise the server operator to run Certbot and modify nginx configuration for the supplied domain(s).</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="links">
|
||||
<a href="https://letsencrypt.org/repository/#let-s-encrypt-subscriber-agreement" target="_blank" rel="noopener">Certbot / Let's Encrypt Terms & Conditions</a>
|
||||
•
|
||||
<a href="https://letsencrypt.org/privacy/">Privacy Policy</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="actions">
|
||||
<button type="submit">Request Certificate</button>
|
||||
<button type="reset" class="ghost">Reset</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="note">
|
||||
<strong>Why ports 80 and 443 are required</strong>
|
||||
<pre>
|
||||
- Port 80 (HTTP) is used by Certbot for the HTTP-01 challenge: Let's Encrypt connects over HTTP to verify you control the domain.
|
||||
- Port 443 (HTTPS) is required to serve TLS traffic after the certificate is issued. Nginx must accept HTTPS on port 443 so browsers and streaming clients can connect securely.
|
||||
|
||||
|
||||
Ensure both ports are reachable from the public internet and forwarded to this server's IP. If you use a firewall, add rules to allow inbound TCP 80 and 443.
|
||||
</pre>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
document.getElementById('certForm').addEventListener('submit', function(e) {
|
||||
var dom = document.getElementById('domain').value.trim();
|
||||
var subs = document.getElementById('subdomains').value.trim();
|
||||
if (!dom) {
|
||||
e.preventDefault();
|
||||
alert('Primary domain is required');
|
||||
return;
|
||||
}
|
||||
|
||||
var ok = document.getElementById('agree_tc').checked;
|
||||
if (!ok) {
|
||||
e.preventDefault();
|
||||
alert('You must agree to the terms and confirm ports 80 and 443 are forwarded.');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
|
@ -26,7 +26,7 @@ if ($_POST['action'] === 'update') {
|
|||
} elseif ($_POST['action'] === 'reset') {
|
||||
$files = glob('/var/www/html/*.json');
|
||||
foreach ($files as $file) {
|
||||
if (is_file($file)) {
|
||||
if (is_file($file) && basename($file) !== 'critical.json') {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<footer class="site-footer">
|
||||
Crafted with ❤️ by ShreeBhattJi ( Devdatt Bhatt ) - Support +91-8000-74-1919
|
||||
Crafted with ❤️ by ShreeBhattJi ( Devdatt Bhatt ) • +91-8000-74-1919
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -395,28 +395,49 @@
|
|||
.form-center {
|
||||
text-align: center;
|
||||
}
|
||||
.social-row {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
}
|
||||
.social-btn {
|
||||
width: 67px;
|
||||
height: 67px;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
background: #f3f4f6;
|
||||
text-decoration: none;
|
||||
transition: transform .12s, box-shadow .12s;
|
||||
}
|
||||
.social-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
|
||||
.social-btn svg { width: 22px; height: 22px; display: block; }
|
||||
.sr-only { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Three stacked headers -->
|
||||
<header class="top-header-1"><a href="index.php">Universal Digital Encoder / Decoder</a></header>
|
||||
<header class="top-header-1"><a href="index.php" style="color:white; text-decoration:none;">URMI Universal Encoder / Decoder</a></header>
|
||||
<header class="top-header-2">
|
||||
<nav aria-label="Top navigation">
|
||||
<a href="https://learn.urmic.org/" target="_blank">Tutorials</a>
|
||||
<a href="about_us.php">About Us</a>
|
||||
<a href="about_us.php">Contact Us</a>
|
||||
<a href="contact_us.php">Contact Us ( Free Service )</a>
|
||||
<a href="premium_service.php">Premium Service</a>
|
||||
<a href="domain.php">Domain SSL</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- Main navigation header -->
|
||||
<header class="site-header">
|
||||
<nav aria-label="Top navigation">
|
||||
<a href="status.php">Status</a>
|
||||
<a href="index.php">Monitor</a>
|
||||
<a href="input.php">Input</a>
|
||||
<a href="output.php">Output</a>
|
||||
<a href="network.php">Network</a>
|
||||
<a href="firewall.php">Firewall</a>
|
||||
<a href="firmware.php">Firmware</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
<?php include 'header.php'; ?>
|
||||
<?php
|
||||
// path to JSON file
|
||||
$jsonFile = __DIR__ . '/input.json';
|
||||
|
||||
// load existing data or defaults
|
||||
$defaults = [
|
||||
'input' => 'url',
|
||||
'hdmi' => [
|
||||
|
|
@ -13,7 +10,7 @@ $defaults = [
|
|||
],
|
||||
'url' => 'https://cdn.urmic.org/unavailable.mp4',
|
||||
'rtmp' => [
|
||||
'mount' => '',
|
||||
'mount' => 'shreebhattji',
|
||||
'password' => 'live',
|
||||
'port' => '1935'
|
||||
],
|
||||
|
|
@ -22,7 +19,9 @@ $defaults = [
|
|||
'stream_id_2' => 'har',
|
||||
'stream_id_3' => 'Mahadev',
|
||||
'port' => '1937'
|
||||
]
|
||||
],
|
||||
'udp'=>'udp://@224.1.1.1:8000',
|
||||
'custom'=>''
|
||||
];
|
||||
|
||||
if (file_exists($jsonFile)) {
|
||||
|
|
@ -58,7 +57,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
'stream_id_2' => $posted('srt_stream_id_2', $defaults['srt']['stream_id_2']),
|
||||
'stream_id_3' => $posted('srt_stream_id_3', $defaults['srt']['stream_id_3']),
|
||||
'port' => $posted('srt_port', $defaults['srt']['port'])
|
||||
]
|
||||
],
|
||||
'udp' => $posted('udp', $defaults['udp']),
|
||||
'custom' => $posted('custom', $defaults['custom'])
|
||||
|
||||
];
|
||||
|
||||
// write JSON with exclusive lock and pretty print
|
||||
|
|
@ -83,7 +85,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
<div class="dropdown">
|
||||
<select name="input">
|
||||
<?php
|
||||
$opts = ['hdmi', 'url', 'rtmp', 'srt'];
|
||||
$opts = ['hdmi', 'url', 'rtmp server', 'srt server', 'udp', 'custom'];
|
||||
foreach ($opts as $o) {
|
||||
$sel = ($data['input'] === $o) ? 'selected' : '';
|
||||
echo "<option value=\"" . htmlspecialchars($o) . "\" $sel>" . htmlspecialchars($o) . "</option>";
|
||||
|
|
@ -101,7 +103,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
<div class="dropdown">
|
||||
<select name="hdmi_resolution">
|
||||
<?php
|
||||
$res = ['1920x1080', '1280x720', '720x576'];
|
||||
$res = ['1920x1080', '1600x1200', '1360x768', '1280x1024', '1280x720', '1024x768', '720x576','640x480'];
|
||||
foreach ($res as $r) {
|
||||
$sel = ($data['hdmi']['resolution'] === $r) ? 'selected' : '';
|
||||
echo "<option value=\"" . htmlspecialchars($r) . "\" $sel>$r</option>";
|
||||
|
|
@ -130,7 +132,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
<div class="dropdown">
|
||||
<select name="hdmi_framerate">
|
||||
<?php
|
||||
$aopts = ['10','20', '30', '50','60'];
|
||||
$aopts = ['10', '20', '30', '50', '60'];
|
||||
foreach ($aopts as $a) {
|
||||
$sel = ($data['hdmi']['framerate'] === $a) ? 'selected' : '';
|
||||
echo "<option value=\"" . htmlspecialchars($a) . "\" $sel>$a</option>";
|
||||
|
|
@ -185,6 +187,22 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>UDP</h3>
|
||||
<div class="input-group">
|
||||
<input type="text" id="udp" name="udp" value="<?php echo htmlspecialchars($data['udp']); ?>" placeholder="udp://@224.224.1.1:8000">
|
||||
<label for="udp">UDP</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>Custom Input</h3>
|
||||
<div class="input-group">
|
||||
<input type="text" id="custom" name="custom" value="<?php echo htmlspecialchars($data['custom']); ?>" placeholder=" ">
|
||||
<label for="custom">custom</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center; width:100%; margin-top:12px;">
|
||||
<button type="submit" style="background:#c00;color:#fff;padding:10px 20px;border:none;font-weight:bold;border-radius:6px;">Save</button>
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
325
html/network.php
325
html/network.php
|
|
@ -5,22 +5,41 @@ $iface = trim(shell_exec("ip route get 1.1.1.1 | awk '{print $5; exit}'"));
|
|||
|
||||
$defaults = [
|
||||
'primary' => [
|
||||
'mode' => 'primary_dhcp', // primary_static or primary_dhcp
|
||||
'ip' => '',
|
||||
'subnet' => '',
|
||||
'gateway' => '',
|
||||
'vlan' => ''
|
||||
'mode' => 'dhcp',
|
||||
'modev6' => 'auto',
|
||||
'network_primary_ip' => '',
|
||||
'network_primary_subnet' => '',
|
||||
'network_primary_gateway' => '',
|
||||
'network_primary_vlan' => '',
|
||||
'network_primary_dns1' => '',
|
||||
'network_primary_dns2' => '',
|
||||
'network_primary_ipv6' => '',
|
||||
'network_primary_ipv6_prefix' => '',
|
||||
'network_primary_ipv6_gateway' => '',
|
||||
'network_primary_ipv6_vlan' => '',
|
||||
'network_primary_ipv6_dns1' => '',
|
||||
'network_primary_ipv6_dns2' => '',
|
||||
],
|
||||
'secondary' => [
|
||||
'mode' => 'secondary_disable', // secondary_static or secondary_dhcp
|
||||
'ip' => '',
|
||||
'subnet' => '',
|
||||
'gateway' => '',
|
||||
'vlan' => ''
|
||||
]
|
||||
'mode' => 'disabled',
|
||||
'modev6' => 'disabled',
|
||||
'network_secondary_ip' => '',
|
||||
'network_secondary_subnet' => '',
|
||||
'network_secondary_gateway' => '',
|
||||
'network_secondary_vlan' => '',
|
||||
'network_secondary_dns1' => '',
|
||||
'network_secondary_dns2' => '',
|
||||
'network_secondary_ipv6' => '',
|
||||
'network_secondary_ipv6_prefix' => '',
|
||||
'network_secondary_ipv6_gateway' => '',
|
||||
'network_secondary_ipv6_vlan' => '',
|
||||
'network_secondary_ipv6_dns1' => '',
|
||||
'network_secondary_ipv6_dns2' => '',
|
||||
],
|
||||
'firewall' => 'disable',
|
||||
'ips' => ['', '', '', '', '']
|
||||
];
|
||||
|
||||
// load existing
|
||||
if (file_exists($jsonFile)) {
|
||||
$raw = file_get_contents($jsonFile);
|
||||
$data = json_decode($raw, true);
|
||||
|
|
@ -33,25 +52,41 @@ $errors = [];
|
|||
$success = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
// helper
|
||||
$get = function ($k) {
|
||||
return isset($_POST[$k]) ? trim((string)$_POST[$k]) : '';
|
||||
};
|
||||
|
||||
$primary_mode = in_array($get('primary_mode'), ['primary_static', 'primary_dhcp']) ? $get('primary_mode') : 'primary_dhcp';
|
||||
$secondary_mode = in_array($get('secondary_mode'), ['secondary_static', 'secondary_dhcp','secondary_disable']) ? $get('secondary_mode') : 'secondary_dhcp';
|
||||
$primary_mode = in_array($get('primary_mode'), ['dhcp', 'static', 'disabled']) ? $get('primary_mode') : 'dhcp';
|
||||
$primary_modev6 = in_array($get('primary_mode'), ['auto', 'dhcpv6', 'static', 'disabled']) ? $get('primary_mode') : 'auto';
|
||||
$secondary_mode = in_array($get('secondary_mode'), ['dhcp', 'static', 'disabled']) ? $get('secondary_mode') : 'dhcp';
|
||||
$secondary_modev6 = in_array($get('secondary_mode'), ['auto', 'dhcpv6', 'static', 'disabled']) ? $get('secondary_mode') : 'auto';
|
||||
|
||||
$primary_ip = $get('network_primary_ip');
|
||||
$primary_subnet = $get('network_primary_subnet');
|
||||
$primary_gateway = $get('network_primary_gateway');
|
||||
$primary_vlan = $get('network_primary_vlan');
|
||||
$network_primary_ip = $get('network_primary_ip');
|
||||
$network_primary_gateway = $get('network_primary_gateway');
|
||||
$network_primary_gateway = $get('network_primary_gateway');
|
||||
$network_primary_vlan = $get('network_primary_vlan');
|
||||
$network_primary_dns1 = $get('network_primary_dns1');
|
||||
$network_primary_dns2 = $get('network_primary_dns2');
|
||||
$network_primary_ipv6 = $get('network_primary_ipv6');
|
||||
$network_primary_ipv6_prefix = $get('network_primary_ipv6_prefix');
|
||||
$network_primary_ipv6_gateway = $get('network_primary_ipv6_gateway');
|
||||
$network_primary_ipv6_vlan = $get('network_primary_ipv6_vlan');
|
||||
$network_primary_ipv6_dns1 = $get('network_primary_ipv6_dns1');
|
||||
$network_primary_ipv6_dns2 = $get('network_primary_ipv6_dns2');
|
||||
|
||||
$secondary_ip = $get('network_secondary_ip');
|
||||
$secondary_subnet = $get('network_secondary_subnet');
|
||||
$secondary_gateway = $get('network_secondary_gateway');
|
||||
$secondary_vlan = $get('network_secondary_vlan');
|
||||
$network_secondary_ip = $get('network_secondary_ip');
|
||||
$network_secondary_subnet = $get('network_secondary_subnet');
|
||||
$network_secondary_gateway = $get('network_secondary_gateway');
|
||||
$network_secondary_vlan = $get('network_secondary_vlan');
|
||||
$network_secondary_dns1 = $get('network_secondary_dns1');
|
||||
$network_secondary_dns2 = $get('network_secondary_dns2');
|
||||
$network_secondary_ipv6 = $get('network_secondary_ipv6');
|
||||
$network_secondary_ipv6_prefix = $get('network_secondary_ipv6_prefix');
|
||||
$network_secondary_ipv6_gateway = $get('network_secondary_ipv6_gateway');
|
||||
$network_secondary_ipv6_vlan = $get('network_secondary_ipv6_vlan');
|
||||
$network_secondary_ipv6_dns1 = $get('network_secondary_ipv6_dns1');
|
||||
$network_secondary_ipv6_dns2 = $get('network_secondary_ipv6_dns2');
|
||||
|
||||
// Validate IPs (allow empty). Subnet accepted as IP or CIDR like 192.168.1.0/24
|
||||
$validate_ip_or_cidr = function ($v) {
|
||||
if ($v === '') return true;
|
||||
if (strpos($v, '/') !== false) {
|
||||
|
|
@ -79,7 +114,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
}
|
||||
}
|
||||
|
||||
// VLAN numeric check (allow empty)
|
||||
foreach ([['Primary VLAN', $primary_vlan], ['Secondary VLAN', $secondary_vlan]] as $v) {
|
||||
if ($v[1] !== '' && (!ctype_digit($v[1]) || (int)$v[1] < 0 || (int)$v[1] > 4094)) {
|
||||
$errors[] = $v[0] . ' must be a number 0-4094';
|
||||
|
|
@ -89,19 +123,39 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
if (empty($errors)) {
|
||||
$new = [
|
||||
'primary' => [
|
||||
'mode' => $primary_mode,
|
||||
'ip' => $primary_ip,
|
||||
'subnet' => $primary_subnet,
|
||||
'gateway' => $primary_gateway,
|
||||
'vlan' => $primary_vlan
|
||||
'mode' => 'dhcp',
|
||||
'modev6' => 'auto',
|
||||
'network_primary_ip' => $primary_ip,
|
||||
'network_primary_subnet' => $primary_subnet,
|
||||
'network_primary_gateway' => $primary_gateway,
|
||||
'network_primary_vlan' => $primary_vlan,
|
||||
'network_primary_dns1' => $primary_vlan,
|
||||
'network_primary_dns2' => $primary_vlan,
|
||||
'network_primary_ipv6' => $primary_vlan,
|
||||
'network_primary_ipv6_prefix' => $primary_vlan,
|
||||
'network_primary_ipv6_gateway' => $primary_vlan,
|
||||
'network_primary_ipv6_vlan' => $primary_vlan,
|
||||
'network_primary_ipv6_dns1' => $primary_vlan,
|
||||
'network_primary_ipv6_dns2' => $primary_vlan
|
||||
],
|
||||
'secondary' => [
|
||||
'mode' => $secondary_mode,
|
||||
'ip' => $secondary_ip,
|
||||
'subnet' => $secondary_subnet,
|
||||
'gateway' => $secondary_gateway,
|
||||
'vlan' => $secondary_vlan
|
||||
]
|
||||
'mode' => 'disabled',
|
||||
'modev6' => 'disabled',
|
||||
'network_secondary_ip' => $secondary_ip,
|
||||
'network_secondary_subnet' => $secondary_subnet,
|
||||
'network_secondary_gateway' => $secondary_gateway,
|
||||
'network_secondary_vlan' => $secondary_vlan,
|
||||
'network_secondary_dns1' => $secondary_vlan,
|
||||
'network_secondary_dns2' => $secondary_vlan,
|
||||
'network_secondary_ipv6' => $secondary_vlan,
|
||||
'network_secondary_ipv6_prefix' => $secondary_vlan,
|
||||
'network_secondary_ipv6_gateway' => $secondary_vlan,
|
||||
'network_secondary_ipv6_vlan' => $secondary_vlan,
|
||||
'network_secondary_ipv6_dns1' => $secondary_vlan,
|
||||
'network_secondary_ipv6_dns2' => $secondary_vlan
|
||||
],
|
||||
'firewall' => 'disable',
|
||||
'ips' => ['', '', '', '', '']
|
||||
];
|
||||
$json = json_encode($new, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
if (file_put_contents($jsonFile, $json, LOCK_EX) === false) {
|
||||
|
|
@ -118,71 +172,210 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
<form method="POST" novalidate>
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
<div class="card">
|
||||
<h3>Primary Interface</h3>
|
||||
<br>
|
||||
<div class="input-container">
|
||||
<input type="radio" id="primary_static" name="primary_mode" value="primary_static" <?php if ($data['primary']['mode'] === 'primary_static') echo 'checked'; ?>>
|
||||
<label for="primary_static">STATIC</label><br>
|
||||
|
||||
<input type="radio" id="primary_dhcp" name="primary_mode" value="primary_dhcp" <?php if ($data['primary']['mode'] === 'primary_dhcp') echo 'checked'; ?>>
|
||||
<label for="primary_dhcp">DHCP</label><br>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">IPv4 mode :</span>
|
||||
<div class="dropdown">
|
||||
<select name="primary_mode" id="primary_mode">
|
||||
<option value="dhcp" <?php if ($data['primary']['mode'] == 'dhcp') echo 'selected'; ?>>DHCP</option>
|
||||
<option value="static" <?php if ($data['primary']['mode'] == 'static') echo 'selected'; ?>>Static</option>
|
||||
<option value="disabled" <?php if ($data['primary']['mode'] == 'disabled') echo 'selected'; ?>>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ip" name="network_primary_ip" placeholder="Address" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<input type="text" id="network_primary_ip" name="network_primary_ip" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ip">Address</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_subnet" name="network_primary_subnet" placeholder="Subnet (e.g. 192.168.1.0/24)" value="<?php echo htmlspecialchars($data['primary']['subnet']); ?>">
|
||||
<input type="text" id="network_primary_subnet" name="network_primary_subnet" pattern="^([0-9]|[12][0-9]|3[0-2])$|^((25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(25[0-5]|2[0-4]\d|1?\d{1,2})$" placeholder="255.255.255.0" value="<?php echo htmlspecialchars($data['primary']['subnet']); ?>">
|
||||
<label for="network_primary_subnet">Subnet</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_gateway" name="network_primary_gateway" placeholder="Gateway" value="<?php echo htmlspecialchars($data['primary']['gateway']); ?>">
|
||||
<input type="text" id="network_primary_gateway" name="network_primary_gateway" pattern="^([0-9a-fA-F]{1,4}:){2,7}[0-9a-fA-F]{1,4}$" placeholder="Gateway" value="<?php echo htmlspecialchars($data['primary']['gateway']); ?>">
|
||||
<label for="network_primary_gateway">Gateway</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_vlan" name="network_primary_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<input type="number" min="1" max="4094" id="network_primary_vlan" name="network_primary_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_primary_vlan">Vlan</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_dns1" name="network_primary_dns1" placeholder="1.1.1.1" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_primary_dns1">DNS1</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_dns2" name="network_primary_dns2" placeholder="8.8.8.8" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_primary_dns2">DNS2</label>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">IPv6 mode :</span>
|
||||
<div class="dropdown">
|
||||
<select name="primary_ipv6" id="primary_ipv6">
|
||||
<option value="auto" <?php if ($data['primary']['modev6'] == 'auto') echo 'selected'; ?>>SLAAC / Auto</option>
|
||||
<option value="dhcpv6" <?php if ($data['primary']['modev6'] == 'dhcpv6') echo 'selected'; ?>>DHCPv6</option>
|
||||
<option value="static" <?php if ($data['primary']['modev6'] == 'static') echo 'selected'; ?>>Static</option>
|
||||
<option value="disabled" <?php if ($data['primary']['modev6'] == 'disabled') echo 'selected'; ?>>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ipv6" name="network_primary_ipv6" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ipv6">Address</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ipv6_prefix" name="network_primary_ipv6_prefix" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ipv6_prefix">Prefix</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ipv6_gateway" name="network_primary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ipv6_gateway">Gateway</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="number" min="1" max="4094" id="network_primary_ipv6_vlan" name="network_primary_ipv6_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_primary_ipv6_vlan">Vlan</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ipv6_dns1" name="network_primary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ipv6_dns1">DNS1</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_primary_ipv6_dns2" name="network_primary_ipv6_dns2" placeholder="2001:4860:4860::8888" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_primary_ipv6_dns2">DNS2</label>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>Secondary Vlan Interface</h3>
|
||||
<br>
|
||||
<div class="input-container">
|
||||
<input type="radio" id="secondary_static" name="secondary_mode" value="secondary_static" <?php if ($data['secondary']['mode'] === 'secondary_static') echo 'checked'; ?>>
|
||||
<label for="secondary_static">STATIC</label><br>
|
||||
|
||||
<input type="radio" id="secondary_dhcp" name="secondary_mode" value="secondary_dhcp" <?php if ($data['secondary']['mode'] === 'secondary_dhcp') echo 'checked'; ?>>
|
||||
<label for="secondary_dhcp">DHCP</label><br>
|
||||
|
||||
<input type="radio" id="secondary_disable" name="secondary_mode" value="secondary_disable" <?php if ($data['secondary']['mode'] === 'secondary_disable') echo 'checked'; ?>>
|
||||
<label for="secondary_disable">Disable</label><br>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Vlan Secondary Interface</h3>
|
||||
<br>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">IPv4 mode :</span>
|
||||
<div class="dropdown">
|
||||
<select name="secondary_ipv4" id="secondary_ipv4">
|
||||
<option value="dhcp" <?php if ($data['secondary']['mode'] == 'dhcp') echo 'selected'; ?>>DHCP</option>
|
||||
<option value="static" <?php if ($data['secondary']['mode'] == 'static') echo 'selected'; ?>>Static</option>
|
||||
<option value="disabled" <?php if ($data['secondary']['mode'] == 'disabled') echo 'selected'; ?>>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ip" name="network_secondary_ip" placeholder="Address" value="<?php echo htmlspecialchars($data['secondary']['ip']); ?>">
|
||||
<input type="text" id="network_secondary_ip" name="network_secondary_ip" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ip">Address</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_subnet" name="network_secondary_subnet" placeholder="Subnet (e.g. 10.0.0.0/24)" value="<?php echo htmlspecialchars($data['secondary']['subnet']); ?>">
|
||||
<input type="text" id="network_secondary_subnet" name="network_secondary_subnet" pattern="^([0-9]|[12][0-9]|3[0-2])$|^((25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(25[0-5]|2[0-4]\d|1?\d{1,2})$" placeholder="255.255.255.0" value="<?php echo htmlspecialchars($data['primary']['subnet']); ?>">
|
||||
<label for="network_secondary_subnet">Subnet</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_gateway" name="network_secondary_gateway" placeholder="Gateway" value="<?php echo htmlspecialchars($data['secondary']['gateway']); ?>">
|
||||
<input type="text" id="network_secondary_gateway" name="network_secondary_gateway" pattern="^([0-9a-fA-F]{1,4}:){2,7}[0-9a-fA-F]{1,4}$" placeholder="Gateway" value="<?php echo htmlspecialchars($data['primary']['gateway']); ?>">
|
||||
<label for="network_secondary_gateway">Gateway</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_vlan" name="network_secondary_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['secondary']['vlan']); ?>">
|
||||
<input type="number" min="1" max="4094" id="network_secondary_vlan" name="network_secondary_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_secondary_vlan">Vlan</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_dns1" name="network_secondary_dns1" placeholder="1.1.1.1" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_secondary_dns1">DNS1</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_dns2" name="network_secondary_dns2" placeholder="8.8.8.8" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_secondary_dns2">DNS2</label>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">IPv6 mode :</span>
|
||||
<div class="dropdown">
|
||||
<select name="secondary_ipv6" id="secondary_ipv6">
|
||||
<option value="auto" <?php if ($data['secondary']['modev6'] == 'auto') echo 'selected'; ?>>SLAAC / Auto</option>
|
||||
<option value="dhcpv6" <?php if ($data['secondary']['modev6'] == 'dhcpv6') echo 'selected'; ?>>DHCPv6</option>
|
||||
<option value="static" <?php if ($data['secondary']['modev6'] == 'static') echo 'selected'; ?>>Static</option>
|
||||
<option value="disabled" <?php if ($data['secondary']['modev6'] == 'disabled') echo 'selected'; ?>>Disabled</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ipv6" name="network_secondary_ipv6" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ipv6">Address</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ipv6_prefix" name="network_secondary_ipv6_prefix" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ipv6_prefix">Prefix</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ipv6_gateway" name="network_secondary_ipv6_gateway" placeholder="Address" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ipv6_gateway">Gateway</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="number" min="1" max="4094" id="network_secondary_ipv6_vlan" name="network_secondary_ipv6_vlan" placeholder="Vlan" value="<?php echo htmlspecialchars($data['primary']['vlan']); ?>">
|
||||
<label for="network_secondary_ipv6_vlan">Vlan</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ipv6_dns1" name="network_secondary_ipv6_dns1" placeholder="2606:4700:4700::1111" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ipv6_dns1">DNS1</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="network_secondary_ipv6_dns2" name="network_secondary_ipv6_dns2" placeholder="2001:4860:4860::8888" pattern="^(?:(?:25[0-5]|2[0-4]\d|1?\d{1,2})\.){3}(?:25[0-5]|2[0-4]\d|1?\d{1,2})$" value="<?php echo htmlspecialchars($data['primary']['ip']); ?>">
|
||||
<label for="network_secondary_ipv6_dns2">DNS2</label>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card wide">
|
||||
<h3>Firewall</h3>
|
||||
<br>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_firewall" id="display">
|
||||
<option value="enable" <?php if ($data['service_firewall'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_firewall'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip1" name="ip1" placeholder="IP1" value="<?php echo htmlspecialchars($data['ips'][0] ?? ''); ?>">
|
||||
<label for="ip1">IP1</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip2" name="ip2" placeholder="IP2" value="<?php echo htmlspecialchars($data['ips'][1] ?? ''); ?>">
|
||||
<label for="ip2">IP2</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip3" name="ip3" placeholder="IP3" value="<?php echo htmlspecialchars($data['ips'][2] ?? ''); ?>">
|
||||
<label for="ip3">IP3</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip4" name="ip4" placeholder="IP4" value="<?php echo htmlspecialchars($data['ips'][3] ?? ''); ?>">
|
||||
<label for="ip4">IP4</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip5" name="ip5" placeholder="IP5" value="<?php echo htmlspecialchars($data['ips'][4] ?? ''); ?>">
|
||||
<label for="ip5">IP5</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip6" name="ip6" placeholder="IP6" value="<?php echo htmlspecialchars($data['ips'][4] ?? ''); ?>">
|
||||
<label for="ip6">IP6</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="ip7" name="ip7" placeholder="IP7" value="<?php echo htmlspecialchars($data['ips'][4] ?? ''); ?>">
|
||||
<label for="ip7">IP7</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center; width:100%; margin-top:12px;">
|
||||
<button type="submit" style="background:#c00;color:#fff;padding:10px 20px;border:none;font-weight:bold;border-radius:6px;">Save</button>
|
||||
<div style="text-align:center; width:100%; margin-top:12px;">
|
||||
<button type="submit" style="background:#c00;color:#fff;padding:10px 20px;border:none;font-weight:bold;border-radius:6px;">Save</button>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ rtmp {
|
|||
meta off;
|
||||
wait_video on;
|
||||
|
||||
push rtmp://192.168.2.45/live/live1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
276
html/output.php
276
html/output.php
|
|
@ -4,7 +4,6 @@
|
|||
$jsonFile = __DIR__ . '/output.json';
|
||||
|
||||
$defaults = [
|
||||
'output' => 'display',
|
||||
'video' => [
|
||||
'resolution' => '1920x1080',
|
||||
'format' => 'h264_qsv',
|
||||
|
|
@ -15,16 +14,21 @@ $defaults = [
|
|||
'audio' => [
|
||||
'format' => 'aac',
|
||||
'sample_rate' => '48000',
|
||||
'bit_rate' => '96k'
|
||||
'bit_rate' => '96k',
|
||||
'db_gain' => '0dB'
|
||||
],
|
||||
'service_display' => 'disable',
|
||||
'output_display' => '1920x1080@60.00',
|
||||
'output_display_audio' => '0,3',
|
||||
'rtmp_single' => '',
|
||||
'srt_single' => '',
|
||||
'service_rtmp_multiple' => 'disable',
|
||||
'service_rtmp_hls' => 'disable',
|
||||
'service_rtmp_dash' => 'disable',
|
||||
'service_srt_multiple' => 'disable',
|
||||
'service_udp' => 'disable',
|
||||
'service_custom' => 'disable',
|
||||
'rtmp_multiple' => [],
|
||||
'srt_multiple' => [],
|
||||
'udp_primary' => '',
|
||||
'udp_vlan' => '',
|
||||
'udp' => '',
|
||||
'custom_output' => ''
|
||||
];
|
||||
|
||||
|
|
@ -53,9 +57,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
};
|
||||
|
||||
$new = $data;
|
||||
|
||||
$new['output'] = $get('output', $defaults['output']);
|
||||
|
||||
$new['video']['resolution'] = $get('output_resolution', $defaults['video']['resolution']);
|
||||
$new['video']['format'] = $get('output_video_formate', $defaults['video']['format']);
|
||||
$new['video']['framerate'] = $get('output_video_framerate', $defaults['video']['framerate']);
|
||||
|
|
@ -65,16 +66,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
$new['audio']['format'] = $get('output_audio_formate', $defaults['audio']['format']);
|
||||
$new['audio']['sample_rate'] = $get('output_audio_sample_rate', $defaults['audio']['sample_rate']);
|
||||
$new['audio']['bit_rate'] = $get('output_audio_bit_rate', $defaults['audio']['bit_rate']);
|
||||
$new['audio']['db_gain'] = $get('output_audio_db_gain', $defaults['audio']['db_gain']);
|
||||
|
||||
$new['output_display'] = $get('output_display', $defaults['output_display']);
|
||||
$new['output_display_audio'] = $get('output_display_audio', $defaults['output_display_audio']);
|
||||
$new['service_display'] = $get('service_display', $defaults['service_display']);
|
||||
|
||||
|
||||
$new['rtmp_single'] = $get('rtmp_single', '');
|
||||
$new['srt_single'] = $get('srt_single', '');
|
||||
|
||||
$new['udp_primary'] = $get('udp_primary', '');
|
||||
$new['udp_vlan'] = $get('udp_vlan', '');
|
||||
$new['udp'] = $get('udp', '');
|
||||
$new['custom_output'] = $get('custom_output', '');
|
||||
|
||||
for ($i = 1; $i <= 11; $i++) {
|
||||
|
|
@ -108,28 +106,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
<form method="POST">
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Output :</span>
|
||||
<div class="dropdown">
|
||||
<select name="output" id="output">
|
||||
<option value="display" <?php if ($data['output'] == 'display') echo 'selected'; ?>>DISPLAY - HDMI - VGA</option>
|
||||
<option value="rtmp_single" <?php if ($data['output'] == 'rtmp_single') echo 'selected'; ?>>RTMP SINGLE</option>
|
||||
<option value="srt_single" <?php if ($data['output'] == 'srt_single') echo 'selected'; ?>>SRT SINGLE</option>
|
||||
<option value="rtmp_multiple" <?php if ($data['output'] == 'rtmp_multiple') echo 'selected'; ?>>RTMP MULTIPLE</option>
|
||||
<option value="srt_multiple" <?php if ($data['output'] == 'srt_multiple') echo 'selected'; ?>>SRT MULTIPLE</option>
|
||||
<option value="udp_primary" <?php if ($data['output'] == 'udp_primary') echo 'selected'; ?>>UDP PRIMARY INTERFACE</option>
|
||||
<option value="udp_vlan" <?php if ($data['output'] == 'udp_vlan') echo 'selected'; ?>>UDP VLAN INTERFACE</option>
|
||||
<option value="custom" <?php if ($data['output'] == 'custom') echo 'selected'; ?>>CUSTOM OUTPUT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Video Setting</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Output Resolution :</span>
|
||||
<span class="dropdown-label">Resolution :</span>
|
||||
<div class="dropdown">
|
||||
<select name="output_resolution" id="output_resolution">
|
||||
<option value="720x480" <?php if ($data['video']['resolution'] == '720x480') echo 'selected'; ?>>480p 720x480 NTSC DVD</option>
|
||||
|
|
@ -146,11 +126,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</div>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Output Video Formate :</span>
|
||||
<span class="dropdown-label">Formate :</span>
|
||||
<div class="dropdown">
|
||||
<select name="output_video_formate" id="output_video_formate">
|
||||
<option value="mpeg2video" <?php if ($data['video']['format'] == 'mpeg2video') echo 'selected'; ?>>mpeg2</option>
|
||||
<option value="mpeg4" <?php if ($data['video']['format'] == 'mpeg4') echo 'selected'; ?>>mpeg4</option>
|
||||
<option value="h264_qsv" <?php if ($data['video']['format'] == 'h264_qsv') echo 'selected'; ?>>h264</option>
|
||||
<option value="h265" <?php if ($data['video']['format'] == 'h265') echo 'selected'; ?>>h265</option>
|
||||
</select>
|
||||
|
|
@ -183,6 +162,27 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">DB Gain :</span>
|
||||
<div class="dropdown">
|
||||
<select name="output_audio_db_gain" id="output_audio_db_gain">
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-6dB') echo 'selected'; ?>>-6dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-5dB') echo 'selected'; ?>>-5dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-4dB') echo 'selected'; ?>>-4dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-3dB') echo 'selected'; ?>>-3dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-2dB') echo 'selected'; ?>>-2dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '-1dB') echo 'selected'; ?>>-1dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '0dB') echo 'selected'; ?>>0dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '1dB') echo 'selected'; ?>>1dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '2dB') echo 'selected'; ?>>2dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '3dB') echo 'selected'; ?>>3dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '4dB') echo 'selected'; ?>>4dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '5dB') echo 'selected'; ?>>5dB</option>
|
||||
<option value="mp2" <?php if ($data['audio']['db_gain'] == '6dB') echo 'selected'; ?>>6dB</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
<div class="input-group">
|
||||
<input type="text" id="output_audio_sample_rate" name="output_audio_sample_rate" placeholder="48000" value="<?php echo htmlspecialchars($data['audio']['sample_rate']); ?>">
|
||||
<label for="output_audio_sample_rate">Sample Rate :</label>
|
||||
|
|
@ -194,9 +194,18 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>DISPLAY - HDMI - VGA</h3>
|
||||
<h3>DISPLAY - HDMI - VGA - PORTS</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Video Size :</span>
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_display" id="display">
|
||||
<option value="enable" <?php if ($data['service_display'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_display'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Resolution :</span>
|
||||
<div class="dropdown">
|
||||
<select name="output_display" id="output_display">
|
||||
<!-- 4K (4096x2160p) -->
|
||||
|
|
@ -278,98 +287,127 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>RTMP SINGLE</h3>
|
||||
<h3>RTMP Output</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_rtmp_multiple" id="service_rtmp_multiple">
|
||||
<option value="enable" <?php if ($data['service_rtmp_multiple'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_rtmp_multiple'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">HLS :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_rtmp_hls" id="service_rtmp_hls">
|
||||
<option value="enable" <?php if ($data['service_rtmp_hls'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_rtmp_hls'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">DASH :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_rtmp_dash" id="service_rtmp_dash">
|
||||
<option value="enable" <?php if ($data['service_rtmp_dash'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_rtmp_dash'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php for ($i = 1; $i <= 11; $i++):
|
||||
$r = $data['rtmp_multiple'][$i];
|
||||
?>
|
||||
<div class="input-container">
|
||||
<div class="input-group">
|
||||
<input type="text" id="rtmp_<?php echo $i; ?>" name="rtmp_<?php echo $i; ?>" placeholder="rtmp" value="<?php echo htmlspecialchars($r['url']); ?>">
|
||||
<label for="rtmp_<?php echo $i; ?>">RTMP URL <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="rtmp_<?php echo $i; ?>_name" name="rtmp_<?php echo $i; ?>_name" placeholder="Rtmp Name <?php echo $i; ?>" value="<?php echo htmlspecialchars($r['name']); ?>">
|
||||
<label for="rtmp_<?php echo $i; ?>_name">Rtmp Name <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="rtmp_<?php echo $i; ?>_enable" name="rtmp_<?php echo $i; ?>_enable" <?php if (!empty($r['enabled'])) echo 'checked'; ?>>
|
||||
<label for="rtmp_<?php echo $i; ?>_enable">Enable or Disable</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>SRT Output</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_srt_multiple" id="service_srt_multiple">
|
||||
<option value="enable" <?php if ($data['service_srt_multiple'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_srt_multiple'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php for ($i = 1; $i <= 11; $i++):
|
||||
$s = $data['srt_multiple'][$i];
|
||||
?>
|
||||
<div class="input-container">
|
||||
<div class="input-group">
|
||||
<input type="text" id="srt_<?php echo $i; ?>" name="srt_<?php echo $i; ?>" placeholder="srt" value="<?php echo htmlspecialchars($s['url']); ?>">
|
||||
<label for="srt_<?php echo $i; ?>">SRT URL <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="srt_<?php echo $i; ?>_name" name="srt_<?php echo $i; ?>_name" placeholder="Srt Name <?php echo $i; ?>" value="<?php echo htmlspecialchars($s['name']); ?>">
|
||||
<label for="srt_<?php echo $i; ?>_name">SRT Name <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="srt_<?php echo $i; ?>_enable" name="srt_<?php echo $i; ?>_enable" <?php if (!empty($s['enabled'])) echo 'checked'; ?>>
|
||||
<label for="srt_<?php echo $i; ?>_enable">Enable or Disable</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>UDP</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_udp" id="service_udp">
|
||||
<option value="enable" <?php if ($data['service_udp'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_udp'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="rtmp_single" name="rtmp_single" placeholder="rtmp" value="<?php echo htmlspecialchars($data['rtmp_single']); ?>">
|
||||
<label for="rtmp_single">RTMP URL</label>
|
||||
<input type="text" id="udp" name="udp" placeholder="udp" value="<?php echo htmlspecialchars($data['udp']); ?>">
|
||||
<label for="udp">UDP Primary URL</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>SRT SINGLE</h3>
|
||||
<h3>CUSTOM OUTPUT</h3>
|
||||
<div class="dropdown-container">
|
||||
<span class="dropdown-label">Service Status :</span>
|
||||
<div class="dropdown">
|
||||
<select name="service_custom" id="service_custom">
|
||||
<option value="enable" <?php if ($data['service_custom'] == 'enable') echo 'selected'; ?>>Enable</option>
|
||||
<option value="disable" <?php if ($data['service_custom'] == 'disable') echo 'selected'; ?>>Disable</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="srt_single" name="srt_single" placeholder=" " value="<?php echo htmlspecialchars($data['srt_single']); ?>">
|
||||
<label for="srt_single">URL</label>
|
||||
<input type="text" id="custom_output" name="custom_output" placeholder="custom" value="<?php echo htmlspecialchars($data['custom_output']); ?>">
|
||||
<label for="custom_output">Custom Output</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>RTMP MULTIPLE OUTPUT</h3>
|
||||
|
||||
<?php for ($i = 1; $i <= 11; $i++):
|
||||
$r = $data['rtmp_multiple'][$i];
|
||||
?>
|
||||
<div class="input-container">
|
||||
<div class="input-group">
|
||||
<input type="text" id="rtmp_<?php echo $i; ?>" name="rtmp_<?php echo $i; ?>" placeholder="rtmp" value="<?php echo htmlspecialchars($r['url']); ?>">
|
||||
<label for="rtmp_<?php echo $i; ?>">RTMP URL <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="rtmp_<?php echo $i; ?>_name" name="rtmp_<?php echo $i; ?>_name" placeholder="Rtmp Name <?php echo $i; ?>" value="<?php echo htmlspecialchars($r['name']); ?>">
|
||||
<label for="rtmp_<?php echo $i; ?>_name">Rtmp Name <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="rtmp_<?php echo $i; ?>_enable" name="rtmp_<?php echo $i; ?>_enable" <?php if (!empty($r['enabled'])) echo 'checked'; ?>>
|
||||
<label for="rtmp_<?php echo $i; ?>_enable">Enable or Disable</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
<div style="text-align:center; width:100%; margin-top:12px;">
|
||||
<button type="submit" style="background:#c00;color:#fff;padding:10px 20px;border:none;font-weight:bold;border-radius:6px;">Save</button>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>SRT MULTIPLE OUTPUT</h3>
|
||||
|
||||
<?php for ($i = 1; $i <= 11; $i++):
|
||||
$s = $data['srt_multiple'][$i];
|
||||
?>
|
||||
<div class="input-container">
|
||||
<div class="input-group">
|
||||
<input type="text" id="srt_<?php echo $i; ?>" name="srt_<?php echo $i; ?>" placeholder="srt" value="<?php echo htmlspecialchars($s['url']); ?>">
|
||||
<label for="srt_<?php echo $i; ?>">SRT URL <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="srt_<?php echo $i; ?>_name" name="srt_<?php echo $i; ?>_name" placeholder="Srt Name <?php echo $i; ?>" value="<?php echo htmlspecialchars($s['name']); ?>">
|
||||
<label for="srt_<?php echo $i; ?>_name">SRT Name <?php echo $i; ?></label>
|
||||
</div>
|
||||
<div class="checkbox-group">
|
||||
<input type="checkbox" id="srt_<?php echo $i; ?>_enable" name="srt_<?php echo $i; ?>_enable" <?php if (!empty($s['enabled'])) echo 'checked'; ?>>
|
||||
<label for="srt_<?php echo $i; ?>_enable">Enable or Disable</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>UDP PRIMARY INTERFACE</h3>
|
||||
<div class="input-group">
|
||||
<input type="text" id="udp_primary" name="udp_primary" placeholder="udp" value="<?php echo htmlspecialchars($data['udp_primary']); ?>">
|
||||
<label for="udp_primary">UDP Primary URL</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>UDP VLAN INTERFACE</h3>
|
||||
<div class="input-group">
|
||||
<input type="text" id="udp_vlan" name="udp_vlan" placeholder="udp" value="<?php echo htmlspecialchars($data['udp_vlan']); ?>">
|
||||
<label for="udp_vlan">UDP VLAN URL</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card wide">
|
||||
<h3>CUSTOM OUTPUT</h3>
|
||||
<div class="input-group">
|
||||
<input type="text" id="custom_output" name="custom_output" placeholder="custom" value="<?php echo htmlspecialchars($data['custom_output']); ?>">
|
||||
<label for="custom_output">Custom Output</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="text-align:center; width:100%; margin-top:12px;">
|
||||
<button type="submit" style="background:#c00;color:#fff;padding:10px 20px;border:none;font-weight:bold;border-radius:6px;">Save</button>
|
||||
</div>
|
||||
<br><br><br>
|
||||
<br><br><br>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,292 @@
|
|||
<?php include 'header.php'; ?>
|
||||
<style>
|
||||
:root {
|
||||
--accent: #0b74de;
|
||||
--muted: #6b7280;
|
||||
--card: #ffffff;
|
||||
--bg: #f3f4f6
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Inter, system-ui, Arial, Helvetica, sans-serif;
|
||||
background: var(--bg);
|
||||
color: #111;
|
||||
margin: 0;
|
||||
padding: 32px
|
||||
}
|
||||
|
||||
.wrap {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin: 0;
|
||||
font-size: 20px
|
||||
}
|
||||
|
||||
.cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 16px
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
color: var(--accent)
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--muted);
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 8px
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #eef2f6;
|
||||
text-align: left;
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
th {
|
||||
background: transparent;
|
||||
font-weight: 600
|
||||
}
|
||||
|
||||
.feature {
|
||||
display: flex;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.pill {
|
||||
display: inline-block;
|
||||
background: #eef6ff;
|
||||
border-radius: 999px;
|
||||
padding: 6px 10px;
|
||||
font-size: 13px;
|
||||
margin-left: auto
|
||||
}
|
||||
|
||||
.cta {
|
||||
display: inline-block;
|
||||
padding: 10px 14px;
|
||||
border-radius: 10px;
|
||||
font-weight: 600;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.cta-primary {
|
||||
background: var(--accent);
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.cta-ghost {
|
||||
border: 1px solid #e6eefa;
|
||||
color: var(--accent)
|
||||
}
|
||||
|
||||
.benefits {
|
||||
margin-top: 18px
|
||||
}
|
||||
|
||||
.note {
|
||||
font-size: 13px;
|
||||
color: #374151;
|
||||
background: #fff;
|
||||
padding: 12px;
|
||||
border-radius: 8px
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 20px;
|
||||
font-size: 13px;
|
||||
color: var(--muted)
|
||||
}
|
||||
|
||||
@media (max-width:600px) {
|
||||
header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start
|
||||
}
|
||||
|
||||
header h1 {
|
||||
margin-bottom: 8px
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<section class="benefits">
|
||||
<div class="card">
|
||||
<h3 style="margin-top:0">Why choose hosted streaming over just buying a static IP from your ISP ?</h3>
|
||||
<ul style="margin:8px 0 0 18px">
|
||||
<li><strong>DDoS & attack protection:</strong> Professional hosts run network-level DDoS mitigation and web application firewalls (WAF) that absorb and block large-scale attacks before they reach your origin server.</li>
|
||||
<li><strong>Scalable bandwidth & CDN:</strong> Hosting + CDN provides globally distributed edge points and the ability to scale to many thousands of viewers without saturating a single home/office link.</li>
|
||||
<li><strong>Higher availability & SLA:</strong> Providers operate redundant infrastructure and SLAs that keep streams online even when single links or hardware fail.</li>
|
||||
<li><strong>Managed SSL, domain & DNS:</strong> Automated SSL issuance/renewal (Let's Encrypt), DNS features and a dedicated domain remove operational friction compared to configuring services on a raw ISP IP.</li>
|
||||
<li><strong>Security isolation:</strong> Dedicated servers and hosting accounts isolate your traffic and services from other customers, reducing risks that come with shared consumer-grade network equipment.</li>
|
||||
<li><strong>Monitoring & support:</strong> 24/7 monitoring, alerting and expert support are part of hosting plans — ISPs rarely provide application-level stream support.</li>
|
||||
<li><strong>Optional reserved (static) IPs:</strong> If you still need a static IP for whitelisting, we can provision a reserved IP on a dedicated plan and keep it behind our mitigation/CDN layer.</li>
|
||||
</ul>
|
||||
|
||||
<div class="note" style="margin-top:12px">
|
||||
<strong>Quick notes:</strong> "Unlimited data for links" refers to stream delivery (no per-GB charge on the plan level for the specified formats). Extremely large egress (multi-TB per month) or abusive usage may require a custom enterprise agreement. CDN bandwidth, archival storage and advanced security may be subject to fair-use or tiered pricing.
|
||||
</div>
|
||||
<div class="note" style="margin-top:12px">
|
||||
<strong>Hosting :</strong> All servers are hosted with our CDN ISP partners. This project aims to transform ISPs into data-center service providers through a hybrid partnership model. All billing is handled directly by the ISP. We found this is lowest letency and stable solutions for broadcastors . Price includes GST and 2 month will be free on yearly payment .
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cards">
|
||||
<!-- Shared Streaming -->
|
||||
<div class="card">
|
||||
<div style="display:flex;align-items:center;gap:12px;margin-bottom:8px">
|
||||
<div>
|
||||
<div class="muted">Shared Streaming</div>
|
||||
<div class="price">₹2,000 / month</div>
|
||||
</div>
|
||||
<div style="margin-left:auto;text-align:right">
|
||||
<div class="pill">Best for small producers</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Feature</th>
|
||||
<th>Included</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delivery formats</td>
|
||||
<td>HLS (m3u8), RTMP, SRT, DASH — unlimited data for links</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bandwidth</td>
|
||||
<td>Shared pool — burst-capable (fair-usage policy)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain</td>
|
||||
<td>Subdomain (example.customer.example.com)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SSL</td>
|
||||
<td>Let's Encrypt (shared certificate)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Support</td>
|
||||
<td>Email & chat (business hours)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uptime SLA</td>
|
||||
<td>99.5%</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div style="margin-top:12px;display:flex;gap:8px">
|
||||
<a class="cta cta-primary" href="contact_us.php">Contact Us</a>
|
||||
<a class="cta cta-ghost" href="https://urmic.org/trusted-partners/">Our ISP Partners</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Dedicated Streaming -->
|
||||
<div class="card">
|
||||
<div style="display:flex;align-items:center;gap:12px;margin-bottom:8px">
|
||||
<div>
|
||||
<div class="muted">Dedicated Streaming</div>
|
||||
<div class="price">₹4,000 / month</div>
|
||||
</div>
|
||||
<div style="margin-left:auto;text-align:right">
|
||||
<div class="pill">Recommended for events & scale</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Feature</th>
|
||||
<th>Included</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delivery formats</td>
|
||||
<td>HLS (m3u8), RTMP, SRT, DASH — unlimited data for links</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bandwidth</td>
|
||||
<td>Dedicated bandwidth allocation (higher sustained throughput up to 10gbe spike )</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Domain</td>
|
||||
<td>Dedicated domain included (example: yourbrand.live)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SSL</td>
|
||||
<td>Free SSL certificate (Let's Encrypt) + automated renewals</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DDoS / Attack protection</td>
|
||||
<td>Network-level mitigation & WAF</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Static IP</td>
|
||||
<td>Dedicated ip ipv4 and ipv6 available (reserved IP) — useful for whitelisting</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uptime SLA</td>
|
||||
<td>99.9% with priority support</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Support</td>
|
||||
<td>24/7 priority support & onboarding</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div style="margin-top:12px;display:flex;gap:8px">
|
||||
<a class="cta cta-primary" href="contact_us.php">Contact Us</a>
|
||||
<a class="cta cta-ghost" href="https://urmic.org/trusted-partners/">Our ISP Partners</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<footer>
|
||||
<div class="muted">Need an exportable copy of this pricing page or custom branding? Contact sales for a tailored quote and SLA.</div>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
// request_cert.php
|
||||
// Parameters (POST):
|
||||
// - domain (required)
|
||||
// - subdomains (optional, comma-separated)
|
||||
// - email (required)
|
||||
// - staging (0 or 1)
|
||||
|
||||
$FORM_PAGE = "domain.php"; // redirect back to your form
|
||||
|
||||
function alert_and_back($message) {
|
||||
global $FORM_PAGE;
|
||||
|
||||
// SAFELY escape entire message for JavaScript (supports newlines, quotes, etc.)
|
||||
$msg = json_encode($message, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
// Escape redirect target too
|
||||
$page = json_encode($FORM_PAGE);
|
||||
|
||||
echo "<script>
|
||||
(function(){
|
||||
var msg = $msg;
|
||||
var dest = $page;
|
||||
|
||||
// Run after DOM to avoid errors when printed inside <head>
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
alert(msg);
|
||||
window.location.href = dest;
|
||||
});
|
||||
} else {
|
||||
alert(msg);
|
||||
window.location.href = dest;
|
||||
}
|
||||
})();
|
||||
</script>";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Read POST values
|
||||
$domain = trim($_POST['domain'] ?? '');
|
||||
$subdomains_raw = trim($_POST['subdomains'] ?? '');
|
||||
$email = trim($_POST['email'] ?? '');
|
||||
$staging = ($_POST['staging'] ?? "0") === "1" ? 1 : 0;
|
||||
|
||||
// Validation helpers
|
||||
function valid_domain_name($d) {
|
||||
return (bool) preg_match(
|
||||
'/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/i',
|
||||
$d
|
||||
);
|
||||
}
|
||||
|
||||
// Validate domain
|
||||
if ($domain === '' || !valid_domain_name($domain)) {
|
||||
alert_and_back("Invalid domain name.");
|
||||
}
|
||||
|
||||
// Validate email
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
alert_and_back("Invalid email address.");
|
||||
}
|
||||
|
||||
// Process subdomains
|
||||
$subdomains = [];
|
||||
if ($subdomains_raw !== '') {
|
||||
$parts = preg_split('/[,\s;]+/', $subdomains_raw, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
foreach ($parts as $p) {
|
||||
$p = trim($p);
|
||||
if ($p === '') continue;
|
||||
|
||||
// If user only entered "www", convert -> www.domain.com
|
||||
if (strpos($p, '.') === FALSE) {
|
||||
$candidate = "$p.$domain";
|
||||
} else {
|
||||
$candidate = $p;
|
||||
}
|
||||
|
||||
if (!valid_domain_name($candidate)) {
|
||||
alert_and_back("Invalid subdomain: $p");
|
||||
}
|
||||
|
||||
$subdomains[] = $candidate;
|
||||
}
|
||||
}
|
||||
|
||||
// Merge primary domain + subdomains
|
||||
$domains = array_values(array_unique(array_merge([$domain], $subdomains)));
|
||||
|
||||
// Build Certbot -d parameters
|
||||
$dargs = "";
|
||||
foreach ($domains as $d) {
|
||||
$dargs .= " -d " . escapeshellarg($d);
|
||||
}
|
||||
|
||||
// Build certbot command
|
||||
$certbot = "/usr/bin/certbot";
|
||||
$cmd = "sudo $certbot --nginx --agree-tos --non-interactive --email "
|
||||
. escapeshellarg($email)
|
||||
. " $dargs";
|
||||
|
||||
if ($staging === 1) {
|
||||
$cmd .= " --staging";
|
||||
}
|
||||
|
||||
// Run certbot
|
||||
exec("$cmd 2>&1", $out, $rc);
|
||||
|
||||
if ($rc !== 0) {
|
||||
alert_and_back("Certbot failed:\n" . implode("\n", $out));
|
||||
}
|
||||
|
||||
// Test nginx
|
||||
exec("sudo nginx -t 2>&1", $test_out, $test_rc);
|
||||
|
||||
if ($test_rc !== 0) {
|
||||
alert_and_back("Certificate created, but nginx test failed:\n" . implode("\n", $test_out));
|
||||
}
|
||||
|
||||
// Reload nginx
|
||||
exec("sudo systemctl reload nginx 2>&1", $reload_out, $reload_rc);
|
||||
|
||||
if ($reload_rc !== 0) {
|
||||
alert_and_back("Cert created, nginx tested OK, but reload failed:\n" . implode("\n", $reload_out));
|
||||
}
|
||||
|
||||
// Success
|
||||
alert_and_back("Certificate installed successfully for:\n" . implode(", ", $domains));
|
||||
|
||||
?>
|
||||
|
|
@ -89,7 +89,7 @@ function update_service()
|
|||
$restart_cmd = 'sudo /bin/systemctl reload nginx';
|
||||
|
||||
|
||||
$input = "ffmpeg ";
|
||||
$input = "";
|
||||
$input_link = "";
|
||||
$input_source = "";
|
||||
$input_rtmp_port = "";
|
||||
|
|
@ -142,19 +142,17 @@ function update_service()
|
|||
|
||||
switch ($input_source) {
|
||||
case "hdmi":
|
||||
$input .= "-f v4l2 -input_format mjpeg -framerate " . $data['hdmi']['framerate'] . " -video_size " . $data['hdmi']['resolution'] . " -i /dev/video0 -f alsa -i " . $data['hdmi']['audio_source'];
|
||||
$input = "ffmpeg -thread_queue_size 512 -f v4l2 -input_format mjpeg -framerate " . $data['hdmi']['framerate'] . " -video_size " . $data['hdmi']['resolution'] . " -i /dev/video0 " .
|
||||
"-f alsa -i " . $data['hdmi']['audio_source'] . ' -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device hw -fflags +genpts -use_wallclock_as_timestamps 1 -vf "format=nv12,hwupload=extra_hw_frames=64,format=qsv" -c:v h264_qsv';
|
||||
break;
|
||||
case "url":
|
||||
$input .= "-stream_loop -1 -re -i " . $data['url'];
|
||||
$input_link = $data['url'];
|
||||
$input .= "ffmpeg -stream_loop -1 -re -i " . $data['url'];
|
||||
break;
|
||||
case "rtmp":
|
||||
$input .= "-stream_loop -1 -re -i rtmp://127.0.0.1:" . $data['rtmp']['port'] . "/" . $data['rtmp']['mount'] . "/" . $data['rtmp']['password'];
|
||||
$input_link = "rtmp://127.0.0.1:" . $data['rtmp']['port'] . "/" . $data['rtmp']['mount'] . "/" . $data['rtmp']['password'];
|
||||
break;
|
||||
case "srt":
|
||||
$input .= "-stream_loop -1 -re -i srt://127.0.0.1:" . $data['srt']['port'] . "/" . $data['srt']['stream_id_1'] . "/" . $data['srt']['stream_id_2'] . "/" . $data['srt']['stream_id_3'];
|
||||
$input_link = "srt://127.0.0.1:" . $data['srt']['port'] . "/" . $data['srt']['stream_id_1'] . "/" . $data['srt']['stream_id_2'] . "/" . $data['srt']['stream_id_3'];
|
||||
$input_port_srt = $data['srt']['port'];
|
||||
break;
|
||||
}
|
||||
|
|
@ -203,18 +201,23 @@ function update_service()
|
|||
|
||||
$rtmp_multiple = $data['rtmp_multiple'];
|
||||
$srt_multiple = $data['srt_multiple'];
|
||||
$output = $data['output'];
|
||||
|
||||
$input .= ' -b:v ' . $data['video']['data_rate'] . ' -maxrate ' . $data['video']['data_rate'] . ' -bufsize 10M -g ' . $data['video']['gop'] .' -af "aresample=async=1:first_pts=0" '.
|
||||
' -c:a ' . $data['audio']['format'] . ' -ar ' . $data['audio']['sample_rate'] . ' -b:a ' . $data['audio']['bit_rate'] . ' -vsync 1 -copytb 1 -f mpegts udp://239.255.255.254:39000?localaddr=127.0.0.1';
|
||||
|
||||
$service = $input;
|
||||
$file = "/var/www/main-encoder.sh";
|
||||
if (file_put_contents($file, $service) !== false) {
|
||||
echo "File saved.";
|
||||
} else {
|
||||
echo "Error writing file.";
|
||||
}
|
||||
|
||||
|
||||
switch ($data['output']) {
|
||||
case "display":
|
||||
if ($input_source === "hdmi") {
|
||||
echo "<script>alert('HDMI input and Disply Output is not supported');</script>";
|
||||
} else {
|
||||
$output_display_audio = $data['output_display_audio'];
|
||||
$input = "mpv --fs --loop --hwdec=auto --audio-device=alsa/plughw:" . $output_display_audio . " " . $input_link;
|
||||
}
|
||||
$output_display_audio = $data['output_display_audio'];
|
||||
$input = "mpv --fs --loop --hwdec=auto --audio-device=alsa/plughw:" . $output_display_audio . " udp://239.255.255.254:39000";
|
||||
break;
|
||||
case "rtmp_single":
|
||||
$input .= '-vf "scale=' . $data['video']['resolution'] . '" -c:v ' . $data['video']['format'] . ' -b:v ' . $data['video']['data_rate']
|
||||
|
|
@ -247,14 +250,6 @@ function update_service()
|
|||
break;
|
||||
}
|
||||
|
||||
$service = $input;
|
||||
$file = "/var/www/html/main-encoder.sh";
|
||||
if (file_put_contents($file, $service) !== false) {
|
||||
echo "File saved.";
|
||||
} else {
|
||||
echo "Error writing file.";
|
||||
}
|
||||
|
||||
if (empty($input_rtmp_port))
|
||||
$input_rtmp_port = "1935";
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
<?php include 'header.php'; ?>
|
||||
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<?php include 'footer.php'; ?>
|
||||
Loading…
Reference in New Issue