1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php include 'config.php';
// Check if the user is logged in
if ((!isSet($_SESSION['loginname'])) || ($loggin <> '1')) { header("Location: login.php"); exit; } require("configure.php"); $menuid = check_input($_REQUEST["menuid"]);
$gdetid = check_input($_GET["gdetid"]); $galleryid = check_input($_GET["galleryid"]); $nowdate = date("Y-m-d H:i:s");
$sql = "update gallery_detail set gdetstatus=case when gdetstatus = 1 then 0 else 1 end, lastupdate='$nowdate', lastupby='". $_SESSION['cmsloginid']. "' "; $sql .= " where gdetid=". $gdetid ." "; mysql_query($sql); mysql_close($dbh);
header("Location: gallery_detail_index.php?menuid=$menuid&galleryid=$galleryid&msg=Update Successful"); ?>
|