-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry_status_post.php
47 lines (36 loc) · 928 Bytes
/
entry_status_post.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php include ('inc_php_funtions.php'); ?>
<?php
// Ok Transactions Status
if (isset($_POST['approve_entry']))
{
//$CatsID = $_POST['CatID'];
$VISITED_URL = $_POST['VISITED_URL']; //Transaction ID
$sMem = $_POST['tranx_check']; //Transaction ID
//echo $sMemi = implode(',', $_POST['tranx_num']);
//exit;
if(empty($sMem))
{
header("location: $VISITED_URL?err=3");
}
else
{
$N = count($sMem);
for($i=0; $i < $N; $i++)
{
//Update Transaction List with OK Status
$sql2="UPDATE `statement` SET STATUS='1', APPROVED_DATE=NOW(), APPROVED_BY='$EMPLOYEEID_LOGIN' WHERE VNO='$sMem[$i]' AND STATUS='2' ";
if(!mysqli_query($link, $sql2)){
echo "ERROR: Could not able to execute $sql2. " . mysqli_error($link);
}
}
}
if(empty($sMem))
{
header("location: $VISITED_URL?err=3");
}
else
{
header("location: $VISITED_URL?err=1");
}
}
?>