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>
|
<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">
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
||||||
|
|
@ -84,17 +127,17 @@ 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);
|
||||||
|
|
@ -106,11 +149,14 @@ function saveService() {
|
||||||
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", {
|
||||||
|
method: "POST",
|
||||||
|
body: form
|
||||||
|
})
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res === "OK") location.reload();
|
if (res === "OK") location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php include 'footer.php'; ?>
|
<?php include 'footer.php'; ?>
|
||||||
Loading…
Reference in New Issue