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
26
27
28
29
30
31
32
|
<?php $page_settings = array( 'formid' => 'Teacher', // for permission 'section' => 'System Setting', // parent/page title 'subsection' => 'Teacher', // page title 'domain' => 'teacher', // table/model name 'access' => 'GNu', // for permission ); require_once "check_login.php";
//security_checking("product_detail_modifyform", $data=array("product_id" => (int)$_GET["id"]));
$id = (int)$_GET["id"]; $sql = "select cmsloginid,status from `tutor_main` where id = ? and deleted = ? LIMIT 1"; $parameters = array($id, 0); $row = bind_pdo($sql, $parameters, "selectone"); $sql = "update tutor_main set deleted = 1, lastupdate=?, lastupby=? where id = ?"; $parameters = array($nowdate,$_SESSION['cmsloginid'],$id); bind_pdo($sql, $parameters); $sql = "update sys_cms_login set deleted = ?, cmsstatus = ?, lastupdate = ?, lastupby =? WHERE cmsloginid=?"; $parameters = array(1, 0, $nowdate, $_SESSION["cmsloginid"], $row['cmsloginid']); bind_pdo($sql, $parameters); if($row['status'] > 2){ $status = 2; }else if($row['status'] <= 2){ $status = 1; } header("Location: teacher_index.php?status=".$status);
|