Viewing file: PhotosStore_Del.php (1.28 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include 'index_IncludeAdmin.php'; ?>
<?php
if (isset($_GET[PhotosStoreID])){ $_SESSION[PhotosStoreID] = $_GET[PhotosStoreID]; } $PhotosStoreID = $_SESSION[PhotosStoreID] ;
$PhotosStore_SL = " SELECT * FROM PhotosStore WHERE PhotosStoreID = '$PhotosStoreID'"; $PhotosStore_QR = mysqli_query($con,$PhotosStore_SL); $PhotosStore = mysqli_fetch_array($PhotosStore_QR);
@unlink("../Files/PhotosStoreFile/".$PhotosStore['PhotosStoreFile']);
$PhotosStore_Del ="DELETE FROM `PhotosStore` WHERE PhotosStoreID = '$PhotosStoreID' "; $PhotosStore_Qurey = mysqli_query($con,$PhotosStore_Del);
$Historylog = " INSERT INTO `Historylog` ( HistorylogDate, HistorylogTime , HistorylogIP, HistorylogAgent, Historyloglanguage, HistorylogActivities, AdminID, AdminName ) VALUES (NOW(), NOW(),'$_SERVER[REMOTE_ADDR]','$_SERVER[HTTP_USER_AGENT]','$_SERVER[HTTP_ACCEPT_LANGUAGE]','PhotosStore Del ','$_SESSION[AdminID]','$LoginData[AdminName]')"; $HistorylogQuery = mysqli_query($con,$Historylog);
if($PhotosStore_Qurey) { echo"<script> window.location='PhotosStore.php?DELETE'; </script>"; } else { echo"<script>alert('เกิดข้อผิดพลาด'); window.history.back(); </script>"; }
?> <!DOCTYPE html> <html> <head> <?php include 'index_link.php'; ?> </head> <body>
</body> </html>
|