update
This commit is contained in:
parent
589d7a400a
commit
a61e452acd
|
|
@ -271,7 +271,7 @@
|
|||
<span class="pill"><a style="color: #ffffff;" href="certification.html">Certificate</a></span>
|
||||
</div>
|
||||
<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 class="footer">
|
||||
|
|
|
|||
|
|
@ -1,19 +1,62 @@
|
|||
<?php include 'header.php'; ?>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; padding: 20px; }
|
||||
button { padding: 8px 14px; cursor: pointer; }
|
||||
#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; }
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 8px 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#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>
|
||||
</head>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Service List</h2>
|
||||
<button onclick="openPopup()">Add Service</button>
|
||||
|
||||
|
|
@ -84,17 +127,17 @@ button { padding: 8px 14px; cursor: pointer; }
|
|||
</div>
|
||||
|
||||
<script>
|
||||
function openPopup() {
|
||||
function openPopup() {
|
||||
document.getElementById("popup").style.display = "block";
|
||||
document.getElementById("overlay").style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function closePopup() {
|
||||
function closePopup() {
|
||||
document.getElementById("popup").style.display = "none";
|
||||
document.getElementById("overlay").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function saveService() {
|
||||
function saveService() {
|
||||
let form = new FormData();
|
||||
form.append("action", "add");
|
||||
form.append("input_udp", document.getElementById("in_udp").value);
|
||||
|
|
@ -106,11 +149,14 @@ function saveService() {
|
|||
form.append("audio_bitrate", document.getElementById("audio_bitrate").value);
|
||||
form.append("status", document.getElementById("status").value);
|
||||
|
||||
fetch("input.php", { method: "POST", body: form })
|
||||
fetch("input.php", {
|
||||
method: "POST",
|
||||
body: form
|
||||
})
|
||||
.then(r => r.text())
|
||||
.then(res => {
|
||||
if (res === "OK") location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
Loading…
Reference in New Issue