%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 122.154.253.140 / Your IP : 216.73.216.138 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/admin/ |
Upload File : |
<?PHP
session_start();
if($_SESSION["UserAccess"]=="")
{
header('Location: index.php');
exit();
}
?>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<!DOCTYPE html>
<html>
<style>
.bg {
/* The image used */
background-image: url("../img/img_main.jpg");
/* Full height */
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
</style>
<head>
<meta charset="UTF-8">
</head>
<body onload="SaveDep(1)">
<div class="jumbotron text-center">
<h1>จัดการ VDO</h1>
<p>ลบ VDO ที่ไม่ต้องการนำเสนอออกจากระบบ </p>
</div>
<div class="container">
<?PHP
include "conf.php";
$sql = "select * from vdo_present order by IDRun desc ";
//echo "Sql : ".$sql;
$result = $conn->query($sql) or die("Cant' query");
?>
<table class="table table-hover" border=0>
<thead>
<tr>
<th scope="col">ลำดับ</th>
<th scope="col">VDO</th>
<th scope="col">รายละเอียด VDO</th>
<th scope="col">ลบข้อมูล</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
while($row = $result->fetch_assoc()) {
?>
<tr>
<td scope="row"><?php echo $i; ?></td>
<th scope="col" width="250">
<object width="100%" height="150" data="<?PHP echo $row['vdo_url']; ?>">
</object>
</th>
<td><?PHP echo "Title : ".$row['txt_title']."<br>Detail : ".$row['txt_detail']; ?></td>
<td><button type="button" class="btn btn-danger" onclick="DeleteVDO(<?PHP echo $row["IDRun"]; ?>)">ลบข้อมูล</button></td>
</tr>
<?PHP $i++; } ?>
</tbody>
</table>
<div id="XXX"></div>
</body>
</html>
<script>
function DeleteVDO(IDRun) {
swal({
title: "Are you sure?",
text: "ยืนยันการลบข้อมูลที่ท่านเลือก",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//document.getElementById("XXX").innerHTML = this.responseText;
//alert(this.responseText);
if(this.responseText=="TRUE") {
swal({
title: "ลบข้อมูลเสร็จสิ้น",
text: "ข้อมูลที่ท่านเลือก ได้ทำการลบเป็นที่เรียบร้อยแล้ว ท่านต้องการ load ข้อมูลเพื่อแสดงใหม่หรือไม่ ?",
icon: "success",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
window.location.href = "vdo_list.php";
}
});
} else {
swal("ผิดพลาด ไม่สามารถลบข้อมูลรายการดังกล่าวได้!!!", {
icon: "warning",
});
}
}
};
//alert(dep_id);
xmlhttp.open("GET", "delete_vdo.php?IDRun=" + IDRun, true);
xmlhttp.send();
}
});
}
</script>