ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/update_status_picked.php |
<?php session_start(); $clientId=$_SESSION['user']['id']; $clientLocation=$_SESSION['user']['location']; include "db.php"; $pickup_id=array(); $pickup_id =$_GET['pickup_id']; $pickup_id=explode(",",$pickup_id); $type =$_GET['type']; foreach($pickup_id as $id) { $sql="UPDATE `pickup_entry` SET status='picked' WHERE id=$id"; $result=$con->query($sql); /*Tracking Module Start*/ $statement ="INSERT INTO tbl_tracking (pickup_entry_id,user_id,location,status,description,remark) VALUES ($id,$clientId,'$clientLocation','picked','Entry Successfully Picked','Material Safe...')"; $result=$con->query($statement); /*Tracking Module End*/ } if($type=='pickup'){ if($result) echo"<script>alert('Status Updated Successfully...');window.location = 'pickup-entry.php';</script>"; else echo"<script>alert('Failed To Update...');window.location = 'pending-pickup-entry.php';</script>"; } else if($type=='cargo') { if($result) echo"<script>alert('Status Updated Successfully...');window.location = 'cargo-pickup-entry-list.php';</script>"; else echo"<script>alert('Failed To Update...');window.location = 'cargo-pickup-entry-list.php';</script>"; } else { if($result) echo"<script>alert('Status Updated Successfully...');window.location = 'modicare-pickup-entry.php';</script>"; else echo"<script>alert('Failed To Update...');window.location = 'pending-modicare-pickup-entry.php';</script>"; } ?>