/var/www/hkosl.com/ergofito/webadmin/content/sys_cms_user/sys_cms_user_status.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
    
include_once('check_login.php');

    
$nowdate date("Y-m-d H:i:s");
    
$loginid = (int)$_GET["loginid"];

    
$sth1      $dbh->prepare("update sys_cms_login set cmsstatus=case when cmsstatus = 1 then 0 else 1 end, lastupdate=?, lastupby=? where cmsloginid = ?");
    
$parameter = array($nowdate$_SESSION['cmsloginid'], $loginid);
    if (!
$sth1->execute($parameter))
        throw new 
Exception('[' $sth1->errorCode() . ']: ' print_r($sth1->errorInfo()));
    else
        
header("Location: sys_cms_user_index.php?msg=Update Successful");

    
$dbh null;

?>