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


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
    $page_settings 
= array(
        
'formid'     => 'Spj_Student_PostJob'// for permission
        
'section'    => 'Master'// parent/page title
        
'subsection' => 'Student Post Job'// page title
        
'domain'     => 'student_postjob'// table/model name
        
'access'     => 'GNu'// for permission
    
);

    require_once 
"check_login.php";

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

    
$sql "update student_postjob set status=case when status = 1 then 0 else 1 end, lastupdate=?, lastupby=? where id = ?";
    
$parameters = array($nowdate$_SESSION['cmsloginid'], $id);

    
bind_pdo($sql$parameters);

    if(
$_GET['type']=='detail'){
        
header("Location: student_postjob_form.php?id=".$id);
    }else{
        
header("Location: student_postjob_index.php?msg=2");
    }