%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 : |
<meta charset="utf-8">
<?PHP
session_start();
if($_SESSION["UserAccess"]=="")
{
header('Location: index.php');
exit();
}
?>
<?php
include "conf.php";
?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<P></P>
<div class="container">
<div class="row">
<div class="col-10">
<h3>ข้อมูลรายการกิจกรรม</h3>
</div>
<div class="col-2">
<button type="button" class="form-control btn btn-secondary" onclick="self.close()">X Close</button>
</div>
</div>
<hr>
<?php
$sql = "select * from activity order by activity_date desc";
//echo "Sql : ".$sql;
$result = $conn->query($sql) or die("Cant' query");
?>
<span id="txtHint"></span>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">ลำดับ</th>
<th scope="col">ชื่อกิจกรรม</th>
<th scope="col">วันที่จัดกิจกรรม</th>
<th scope="col">-</th>
<th scope="col">-</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
while($row = $result->fetch_assoc()) {
?>
<tr>
<td><?PHP echo $i; ?></th>
<td><?PHP echo $row['IDRun']." : ".$row["Activity_Name"]; ?></td>
<td><?PHP echo $row["Activity_Date"]; ?></td>
<td><button type="button" class="btn btn-danger" onclick="DeleteActivity(<?PHP echo $row["IDRun"]; ?>,'<?PHP echo $row["Activity_Folder"]; ?>');">Delete</button></td>
<td><button type="button" class="btn btn-Secondary">Edit</button></td>
</tr>
<?PHP $i++; } ?>
</tbody>
</table>
</div>
<script>
function DeleteActivity(IDRun,ActivityFolder) {
//alert(ActivityFolder);
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//document.getElementById("txtHint").innerHTML = this.responseText;
//alert(this.responseText);
if(this.responseText=="YES") {
swal("Good job!", "ลบข้อมูลกิจกรรมเสร็จสมบูรณ์...", "success");
setTimeout(location.reload.bind(location), 1000);
} else {
swal("Good job!", "ผิดพลาดไม่สามารถลบข้อมูลกิจกรรมได้", "warning");
}
}
};
xmlhttp.open("GET", "activity_delete.php?IDRun=" + IDRun+"&ActivityFolder="+ActivityFolder, true);
xmlhttp.send();
}
</script>