/var/www/enzatesting.onesolution.hk/ivc_ftyrcpt_received.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
<?php 
$formid 
"Order";
require_once 
"inc/configure.php";

if( !
havePermission("RCu")){
    
myerror(INVALID.WS.PERMISSION); 
    exit;    
}

$refid                 = (int) filter_var($_REQUEST['refid'], FILTER_SANITIZE_NUMBER_INT);
//vdump($_REQUEST); exit;    
if( $_POST['action']=="ivc_ftyrcpt_received" && !empty($refid) ){

$dbh->beginTransaction();

    
$sql "UPDATE ivc_fty
            SET status = 'RECEIVED',
                lastupby = :lastupby, 
                lastupdate = GETDATE()
            WHERE refid = :refid"
;
    
$sth $dbh->prepare($sql);    
    
$q $sth->execute(  array(':refid' => $refid,
                                
':lastupby' => filter_var($_SESSION['user'], FILTER_SANITIZE_STRING)) );    
/*    echo $sth->getSQL(  array(':refid' => $refid,
                                 ':lastupby' => filter_var($_SESSION['user'], FILTER_SANITIZE_STRING)) );*/    
    
pdo_showerror($sth$q);
            
//exit;
$dbh->commit();    

//echo "msg=$msg";            
//exit;
    
header("Location: ivc_ftyrcpt_index.php?msg=Saved.");
    print 
"Saved.";
    exit;
}
print 
"Invalid Request";


?>