This commit is contained in:
devdatt 2026-01-08 07:06:34 +05:30
parent 589d7a400a
commit a61e452acd
2 changed files with 96 additions and 50 deletions

View File

@ -271,7 +271,7 @@
<span class="pill"><a style="color: #ffffff;" href="certification.html">Certificate</a></span> <span class="pill"><a style="color: #ffffff;" href="certification.html">Certificate</a></span>
</div> </div>
<div class="pill-row"> <div class="pill-row">
<span class="pill"><a style="color: #ffffff;" href="login.html">Login</a></span> <span class="pill"><a style="color: #ffffff;" href="login.php">Login</a></span>
</div> </div>
<div class="footer"> <div class="footer">

View File

@ -1,19 +1,62 @@
<?php include 'header.php'; ?> <?php include 'header.php'; ?>
<style> <style>
body { font-family: Arial, sans-serif; padding: 20px; } body {
button { padding: 8px 14px; cursor: pointer; } font-family: Arial, sans-serif;
#popup { padding: 20px;
display:none; position: fixed; top: 50%; left: 50%; }
transform: translate(-50%, -50%); background: #fff;
padding: 20px; border:1px solid #333; width: 350px; button {
} padding: 8px 14px;
#popup input, #popup select { width: 100%; margin-bottom: 10px; padding: 6px; } cursor: pointer;
#overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.6); } }
.table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.table th, .table td { padding: 10px; border: 1px solid #ccc; text-align: left; } #popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
padding: 20px;
border: 1px solid #333;
width: 350px;
}
#popup input,
#popup select {
width: 100%;
margin-bottom: 10px;
padding: 6px;
}
#overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
}
.table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.table th,
.table td {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
}
</style> </style>
</head> </head>
<br>
<br>
<br>
<br>
<h2>Service List</h2> <h2>Service List</h2>
<button onclick="openPopup()">Add Service</button> <button onclick="openPopup()">Add Service</button>
@ -32,17 +75,17 @@ button { padding: 8px 14px; cursor: pointer; }
</tr> </tr>
<?php foreach ($data as $row): ?> <?php foreach ($data as $row): ?>
<tr> <tr>
<td><?= htmlspecialchars($row["id"]) ?></td> <td><?= htmlspecialchars($row["id"]) ?></td>
<td><?= htmlspecialchars($row["input_udp"]) ?></td> <td><?= htmlspecialchars($row["input_udp"]) ?></td>
<td><?= htmlspecialchars($row["output_udp"]) ?></td> <td><?= htmlspecialchars($row["output_udp"]) ?></td>
<td><?= htmlspecialchars($row["video_format"]) ?></td> <td><?= htmlspecialchars($row["video_format"]) ?></td>
<td><?= htmlspecialchars($row["audio_format"]) ?></td> <td><?= htmlspecialchars($row["audio_format"]) ?></td>
<td><?= htmlspecialchars($row["resolution"]) ?></td> <td><?= htmlspecialchars($row["resolution"]) ?></td>
<td><?= htmlspecialchars($row["video_bitrate"]) ?></td> <td><?= htmlspecialchars($row["video_bitrate"]) ?></td>
<td><?= htmlspecialchars($row["audio_bitrate"]) ?></td> <td><?= htmlspecialchars($row["audio_bitrate"]) ?></td>
<td><?= htmlspecialchars($row["status"]) ?></td> <td><?= htmlspecialchars($row["status"]) ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
@ -84,33 +127,36 @@ button { padding: 8px 14px; cursor: pointer; }
</div> </div>
<script> <script>
function openPopup() { function openPopup() {
document.getElementById("popup").style.display = "block"; document.getElementById("popup").style.display = "block";
document.getElementById("overlay").style.display = "block"; document.getElementById("overlay").style.display = "block";
} }
function closePopup() { function closePopup() {
document.getElementById("popup").style.display = "none"; document.getElementById("popup").style.display = "none";
document.getElementById("overlay").style.display = "none"; document.getElementById("overlay").style.display = "none";
} }
function saveService() { function saveService() {
let form = new FormData(); let form = new FormData();
form.append("action", "add"); form.append("action", "add");
form.append("input_udp", document.getElementById("in_udp").value); form.append("input_udp", document.getElementById("in_udp").value);
form.append("output_udp", document.getElementById("out_udp").value); form.append("output_udp", document.getElementById("out_udp").value);
form.append("video_format", document.getElementById("video_format").value); form.append("video_format", document.getElementById("video_format").value);
form.append("audio_format", document.getElementById("audio_format").value); form.append("audio_format", document.getElementById("audio_format").value);
form.append("resolution", document.getElementById("resolution").value); form.append("resolution", document.getElementById("resolution").value);
form.append("video_bitrate", document.getElementById("video_bitrate").value); form.append("video_bitrate", document.getElementById("video_bitrate").value);
form.append("audio_bitrate", document.getElementById("audio_bitrate").value); form.append("audio_bitrate", document.getElementById("audio_bitrate").value);
form.append("status", document.getElementById("status").value); form.append("status", document.getElementById("status").value);
fetch("input.php", { method: "POST", body: form }) fetch("input.php", {
.then(r => r.text()) method: "POST",
.then(res => { body: form
if (res === "OK") location.reload(); })
}); .then(r => r.text())
} .then(res => {
if (res === "OK") location.reload();
});
}
</script> </script>
<?php include 'footer.php'; ?> <?php include 'footer.php'; ?>