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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?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");
$index = $_POST["index"]; $companyid = $_POST["companyid"]; $nowdate = date("Y-m-d H:i:s"); //print_r($_POST); //exit;
$loginid = $_POST["loginid"]; if (is_array($loginid)){ foreach ($loginid as $x => $v) { $tloginid = $loginid[$x]; //Soft Delete User DB $sql = "update file_company_user set status='0', deleted='1', lastupby=:lastupby, lastupdate=:lastupdate where userid=:userid"; $sql_param = array(); $sql_param[':lastupby'] = $_SESSION['loginid']; $sql_param[':lastupdate'] = $nowdate; $sql_param[':userid'] = $tloginid; $sth = Db::getDbh()->prepare($sql); $sth->execute($sql_param); if( $error = $sth->getError($sql_param) ){ var_dump($error); } } }
if(!is_array($loginid)){ echo"<script language='javascript'> alert('Please Select A File.'); history.back(); </script>"; exit; }
$dbh = null;
header("Location: index.php?index=$index&companyid=$companyid"); ?>
|