dec($task);}} switch($task) { case "default": $this->fn_default_cancelcrg(); break; case $task: $task="fn_".$task; if(method_exists($this,$task)){$this->$task();} break; default: $this->fn_default_cancelcrg(); break; } } public function fn_default_cancelcrg() { echo $this->FN_CREATEHEADER(); echo ""; echo ""; echo $this->FN_CLOSEHEADER(); echo $this->FN_CREATEBODY("e8f1ff"); echo "
"; echo "
"; $qry="select filepdf from ".DB_APORTIL.".tbl_manualbook where isdeleted=0 and filepdf='cancelcrgket_passenger.pdf'"; $filepdf=$this->fn_get_fieldvalue("filepdf",$qry); $urlmanualbook=" MANUAL BOOK"; $url="location.reload();"; $myuri=array("CARGO INFORMATION"=>"$url|id='a_newticket'","$urlmanualbook"=>"|id='a_manualbook'"); echo $this->MULTIPLE_LINK($myuri); echo "
".$this->CREATE_IMAGE("loadergrid.gif")."
"; echo $this->FN_CREATEFOOTER(); } public function fn_grdrecord() { $keyword=$_REQUEST["keyword"]; header("Content-type: text/xml"); echo(''); echo ""; $qry="select id,0 ischecklist,idship,shipname,tiketnumber,tiketnumberpassenger,voynumber,inctiket,idcategory,cargodescription,passengername, idcardtype,cardtype,cardnumber,dates,idroutestart,routenamestart,idrouteend, routenameend,price,quantity,weight,totalprice,units,modifcount,status from ".DB_APORTIL.".tbl_cargo_tiket where (tiketnumber like '%$keyword%' or voynumber like '%$keyword%' or passengername like '%$keyword%') and isdeleted=0 and status=0 order by id desc limit ".TBL_PAGE_LIMIT; $rs=$this->selectquery($qry); if($rs) { $i=1; while($row=$this->data_row_array($rs)) { $color='green'; if($row["status"]==1){$color='blue';} echo (""); print(""); print(""); print("".$i.""."]]>"); $status=$this->fn_get_fieldvalue("description","select description from ".DB_APORTIL.".tbl_cargo_tiket_status where status='".$row['status']."'"); print("".$status.""."]]>"); print(""); print("".$row["shipname"].""."]]>"); print("".$row["tiketnumber"].""."]]>"); print("".$row["voynumber"].""."]]>"); print("".$row["passengername"].""."]]>"); print("".$row["cardtype"]."/".$row["cardnumber"].""."]]>"); print("".date("Y-m-d",strtotime($row["dates"])).""."]]>"); print("".$row["routenamestart"]." to ".$row['routenameend'].""."]]>"); print("".$row["cargodescription"].""."]]>"); print("".$row["price"]." \$"."]]>"); print("".$row["quantity"].""."]]>"); print("".$row["weight"].""."]]>"); print("".$row["totalprice"]." \$"."]]>"); echo (""); $i+=1; } } else { echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file
"; } echo "
"; } public function fn_cancelcrg() { $idcargo=$_REQUEST['idcargo']; $remark=$_REQUEST['remark']; $qry="update ".DB_APORTIL.".tbl_cargo_tiket set status=-2,remark='$remark',uby='".$_SESSION['nik']."',udt=now() "; $qry.="where id='$idcargo'"; if($this->executequery($qry)){ $qry="insert into ".DB_APORTIL.".tbl_cargo_tiket_log set idcargoticket='$idcargo',dates='".date("Y-m-d")."',status=-2,remarkstatus='Cancel Cargo Tiket', remark='$remark',iby='".$_SESSION['nik']."',idt=now()"; if($this->executequery($qry)){ echo "ok|$idcargo"; } } } } ?>