/var/www/hkosl.com/imusiccircle/webadmin/admin_msg_status.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
    $page_settings 
= array(
        
'formid'     => 'Approval'// for permission
        
'section'    => 'Master'// parent/page title
        
'subsection' => 'Message'// page title
        
'domain'     => 'admin_msg'// table/model name
        
'access'     => 'GNr'// for permission
    
); 

    require_once 
"check_login.php";

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

    
$sql "update admin_msg set status=case when status = 1 then 0 else 1 end, lastupdate=? where id = ?";
    
$parameters = array($nowdate$id);

    
bind_pdo($sql$parameters);

    
header("Location: admin_msg_index.php");