6 Commits

4 changed files with 10 additions and 57 deletions

View File

@ -33,8 +33,8 @@
DEFINE("EMAIL_SENDERNAME",""); DEFINE("EMAIL_SENDERNAME","");
DEFINE("EMAIL_SENDERALIAS","Telkomcel"); DEFINE("EMAIL_SENDERALIAS","Telkomcel");
DEFINE("EMAIL_SUBJECT","Info Telkomcel"); DEFINE("EMAIL_SUBJECT","Info Telkomcel");
// DEFINE("DB_HOST_NAME","172.17.12.21"); DEFINE("DB_HOST_NAME","172.17.12.21");
DEFINE("DB_HOST_NAME","192.168.1.4"); // DEFINE("DB_HOST_NAME","192.168.1.4");
//DEFINE("DB_HOST_NAME","172.17.12.71"); //DEFINE("DB_HOST_NAME","172.17.12.71");
// DEFINE("DB_USER_NAME","ssotcel"); // DEFINE("DB_USER_NAME","ssotcel");
DEFINE("DB_USER_NAME","appaportil"); DEFINE("DB_USER_NAME","appaportil");

View File

@ -48,7 +48,6 @@
array("type"=>"fieldset","width"=>"1080","label"=>"Search", array("type"=>"fieldset","width"=>"1080","label"=>"Search",
"list"=>array( "list"=>array(
array("type"=>"hidden","name"=>"txt_idcargo"), array("type"=>"hidden","name"=>"txt_idcargo"),
array("type"=>"hidden","name"=>"txt_duration"),
array("type"=>"input","name"=>"txtsearch","label"=>"Insert Your Keyword","info"=>"true","inputWidth"=>"240", array("type"=>"input","name"=>"txtsearch","label"=>"Insert Your Keyword","info"=>"true","inputWidth"=>"240",
"tooltip"=>"Insert Your Keyword","maxLength"=>"","className"=>"txtleft","labelWidth"=>"210"), "tooltip"=>"Insert Your Keyword","maxLength"=>"","className"=>"txtleft","labelWidth"=>"210"),
array("type"=>"newcolumn"), array("type"=>"newcolumn"),
@ -95,18 +94,13 @@
"Price "=>"right,ro,120,right,int,false", "Price "=>"right,ro,120,right,int,false",
"Quantity "=>"right,ro,144,right,int,false", "Quantity "=>"right,ro,144,right,int,false",
"Weight "=>"right,ro,144,right,int,false", "Weight "=>"right,ro,144,right,int,false",
"Total "=>"right,ro,120,right,int,false", "Total "=>"right,ro,120,right,int,false");
"Insert Date "=>"center,ro,170,center,str,false",
"Duration ( Hours ) "=>"center,ro,120,center,str,false"
);
$this->FN_DHTMLXGRIDVIEW($grdinit,$gridproperties,"bricks","","fn_grid_loaddata()"); $this->FN_DHTMLXGRIDVIEW($grdinit,$gridproperties,"bricks","","fn_grid_loaddata()");
$oneditcell="if(colid==1&&stage==1)"; $oneditcell="if(colid==1&&stage==1)";
$oneditcell.="{"; $oneditcell.="{";
$oneditcell.=" var status=dgresult.cells(rowid,4).getValue();"; $oneditcell.=" var status=dgresult.cells(rowid,4).getValue();";
$oneditcell.=" var idcargo=dgresult.cells(rowid,0).getValue();"; $oneditcell.=" var idcargo=dgresult.cells(rowid,0).getValue();";
$oneditcell.=" var duration=dgresult.cells(rowid,18).getValue();";
$oneditcell.=" myFormsearch.setItemValue('txt_duration',duration);";
$oneditcell.=" var tiketnumber=dgresult.cells(rowid,7).getValue();"; $oneditcell.=" var tiketnumber=dgresult.cells(rowid,7).getValue();";
$oneditcell.=" if(status!=0){fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number!!');return false;}"; $oneditcell.=" if(status!=0){fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number!!');return false;}";
$oneditcell.=" myFormsearch.setItemValue('txt_idcargo',idcargo+'|'+tiketnumber);"; $oneditcell.=" myFormsearch.setItemValue('txt_idcargo',idcargo+'|'+tiketnumber);";
@ -128,13 +122,7 @@
function fn_cancelcrg() function fn_cancelcrg()
{ {";
var duration=myFormsearch.getItemValue('txt_duration');
if(duration>6)
{
fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number, because the duration is <b>more than 6 hours</b>!!');
return false;
}";
//var idcargo=myFormsearch.getItemValue('txt_idcargo'); //var idcargo=myFormsearch.getItemValue('txt_idcargo');
//var url='?ajax=1&sec=1&option=".$this->enc("obj_ss")."&obj=".$this->enc("ss_necheck")."&task=".$this->enc("viewchecklist")."&idchecklist='+idchecklist+'&checklistnumber='+checklistnumber+'&category='+category;"; //var url='?ajax=1&sec=1&option=".$this->enc("obj_ss")."&obj=".$this->enc("ss_necheck")."&task=".$this->enc("viewchecklist")."&idchecklist='+idchecklist+'&checklistnumber='+checklistnumber+'&category='+category;";
$rtn="var idcargo=myFormsearch.getItemValue('txt_idcargo');"; $rtn="var idcargo=myFormsearch.getItemValue('txt_idcargo');";
@ -293,7 +281,7 @@
$qry="select id,0 ischecklist,idship,shipname,tiketnumber,tiketnumberpassenger,voynumber,inctiket,idcategory,cargodescription,passengername, $qry="select id,0 ischecklist,idship,shipname,tiketnumber,tiketnumberpassenger,voynumber,inctiket,idcategory,cargodescription,passengername,
idcardtype,cardtype,cardnumber,dates,idroutestart,routenamestart,idrouteend, idcardtype,cardtype,cardnumber,dates,idroutestart,routenamestart,idrouteend,
routenameend,price,quantity,weight,totalprice,units,modifcount,status,iby,idt routenameend,price,quantity,weight,totalprice,units,modifcount,status
from ".DB_APORTIL.".tbl_cargo_tiket from ".DB_APORTIL.".tbl_cargo_tiket
where (tiketnumber like '%$keyword%' or voynumber like '%$keyword%' or passengername like '%$keyword%') and isdeleted=0 and status=0 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; order by id desc limit ".TBL_PAGE_LIMIT;
@ -325,17 +313,6 @@
print("<cell><![CDATA["."<span style='color:$color'>".$row["quantity"]."</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:$color'>".$row["quantity"]."</span>"."]]></cell>");
print("<cell><![CDATA["."<span style='color:$color'>".$row["weight"]."</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:$color'>".$row["weight"]."</span>"."]]></cell>");
print("<cell><![CDATA["."<span style='color:$color'>".$row["totalprice"]." \$</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:$color'>".$row["totalprice"]." \$</span>"."]]></cell>");
print("<cell><![CDATA[".date("Y-m-d H:i:s",strtotime($row["idt"]))."]]></cell>");
$now=date("Y-m-d H:i:s");
$idt=date("Y-m-d H:i:s",strtotime($row["idt"]));
$df=$this->NewDateDiff($idt,$now);
$durationinhours=0;
if(count($df)>0)
{
$durationindays=$df['day']*24;
$durationinhours=$df['hour']+$durationindays;
}
print("<cell><![CDATA[".$durationinhours."]]></cell>");
echo ("</row>"); echo ("</row>");
$i+=1; $i+=1;
} }

View File

@ -48,7 +48,6 @@
array("type"=>"fieldset","width"=>"1080","label"=>"Search", array("type"=>"fieldset","width"=>"1080","label"=>"Search",
"list"=>array( "list"=>array(
array("type"=>"hidden","name"=>"txt_idticketing"), array("type"=>"hidden","name"=>"txt_idticketing"),
array("type"=>"hidden","name"=>"txt_duration"),
array("type"=>"input","name"=>"txtsearch","label"=>"Insert Your Keyword","info"=>"true","inputWidth"=>"240", array("type"=>"input","name"=>"txtsearch","label"=>"Insert Your Keyword","info"=>"true","inputWidth"=>"240",
"tooltip"=>"Insert Your Keyword","maxLength"=>"","className"=>"txtleft","labelWidth"=>"210"), "tooltip"=>"Insert Your Keyword","maxLength"=>"","className"=>"txtleft","labelWidth"=>"210"),
array("type"=>"newcolumn"), array("type"=>"newcolumn"),
@ -78,7 +77,7 @@
$footerevent.="</div>"; $footerevent.="</div>";
$grdinit=array("gridname"=>"dgresult","divtarget"=>"div_dgresult","divpaging"=>"div_dgresultpaging","paginglimit"=>PAGE_LIMIT, $grdinit=array("gridname"=>"dgresult","divtarget"=>"div_dgresult","divpaging"=>"div_dgresultpaging","paginglimit"=>PAGE_LIMIT,
"showloader"=>"true","enableMultiline"=>"true","footer"=>"$footerevent","footerspan"=>"21"); "showloader"=>"true","enableMultiline"=>"true","footer"=>"$footerevent","footerspan"=>"16");
$gridproperties=array("id"=>"right,ro,96,right,int,false,true", $gridproperties=array("id"=>"right,ro,96,right,int,false,true",
"<font color='green'><b>C&nbsp;&nbsp;</b></font>"=>"center,ra,30,center,int,false", "<font color='green'><b>C&nbsp;&nbsp;</b></font>"=>"center,ra,30,center,int,false",
"No.&nbsp;"=>"right,ro,35,center,int,false", "No.&nbsp;"=>"right,ro,35,center,int,false",
@ -98,17 +97,12 @@
"Quantity&nbsp;"=>"right,ro,110,right,int,false", "Quantity&nbsp;"=>"right,ro,110,right,int,false",
"Price&nbsp;"=>"right,ro,120,right,int,false", "Price&nbsp;"=>"right,ro,120,right,int,false",
"Baggage&nbsp;"=>"right,ro,136,right,int,false", "Baggage&nbsp;"=>"right,ro,136,right,int,false",
"Price baggage&nbsp;"=>"right,ro,120,right,int,false", "Price&nbsp;"=>"right,ro,120,right,int,false");
"Insert Date&nbsp;"=>"center,ro,170,center,str,false",
"Duration ( Hours )&nbsp;"=>"center,ro,120,center,str,false"
);
$this->FN_DHTMLXGRIDVIEW($grdinit,$gridproperties,"bricks","","fn_grid_loaddata()"); $this->FN_DHTMLXGRIDVIEW($grdinit,$gridproperties,"bricks","","fn_grid_loaddata()");
$oneditcell="if(colid==1&&stage==1)"; $oneditcell="if(colid==1&&stage==1)";
$oneditcell.="{"; $oneditcell.="{";
$oneditcell.=" var status=dgresult.cells(rowid,4).getValue();"; $oneditcell.=" var status=dgresult.cells(rowid,4).getValue();";
$oneditcell.=" var duration=dgresult.cells(rowid,21).getValue();";
$oneditcell.=" myFormsearch.setItemValue('txt_duration',duration);";
$oneditcell.=" var idticketing=dgresult.cells(rowid,0).getValue();"; $oneditcell.=" var idticketing=dgresult.cells(rowid,0).getValue();";
$oneditcell.=" var tiketnumber=dgresult.cells(rowid,7).getValue();"; $oneditcell.=" var tiketnumber=dgresult.cells(rowid,7).getValue();";
$oneditcell.=" if(status!=0){fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number!!');return false;}"; $oneditcell.=" if(status!=0){fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number!!');return false;}";
@ -131,13 +125,7 @@
function fn_cancelticketing() function fn_cancelticketing()
{ {";
var duration=myFormsearch.getItemValue('txt_duration');
if(duration>6)
{
fn_dhtmlxmessage('error','I\'m sorry you can\'t cancel this Tiket number, because the duration is <b>more than 6 hours</b>!!');
return false;
}";
//var idticketing=myFormsearch.getItemValue('txt_idticketing'); //var idticketing=myFormsearch.getItemValue('txt_idticketing');
//var url='?ajax=1&sec=1&option=".$this->enc("obj_ss")."&obj=".$this->enc("ss_necheck")."&task=".$this->enc("viewchecklist")."&idchecklist='+idchecklist+'&checklistnumber='+checklistnumber+'&category='+category;"; //var url='?ajax=1&sec=1&option=".$this->enc("obj_ss")."&obj=".$this->enc("ss_necheck")."&task=".$this->enc("viewchecklist")."&idchecklist='+idchecklist+'&checklistnumber='+checklistnumber+'&category='+category;";
$rtn="var idticketing=myFormsearch.getItemValue('txt_idticketing');"; $rtn="var idticketing=myFormsearch.getItemValue('txt_idticketing');";
@ -295,8 +283,7 @@
echo "<rows id='0'>"; echo "<rows id='0'>";
$qry="select id,0 ischecklist,idship,tiketnumber,inctiket,shipname,shipnumber,passengername,picdata,dates,idroutestart, $qry="select id,0 ischecklist,idship,tiketnumber,inctiket,shipname,shipnumber,passengername,picdata,dates,idroutestart,
routenamestart,idrouteend,routenameend,seatnumber,quantity,price,baggageinkg,pricebaggage,modifcount,status, routenamestart,idrouteend,routenameend,seatnumber,quantity,price,baggageinkg,pricebaggage,modifcount,status
idt
from ".DB_APORTIL.".tbl_passenger_tiket from ".DB_APORTIL.".tbl_passenger_tiket
where (tiketnumber like '%$keyword%' or passengername like '%$keyword%') and isdeleted=0 and status=0 where (tiketnumber like '%$keyword%' or passengername like '%$keyword%') and isdeleted=0 and status=0
order by id desc limit ".TBL_PAGE_LIMIT; order by id desc limit ".TBL_PAGE_LIMIT;
@ -331,17 +318,6 @@
print("<cell><![CDATA["."<span style='color:black'>"."\$".$row["price"]."</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:black'>"."\$".$row["price"]."</span>"."]]></cell>");
print("<cell><![CDATA["."<span style='color:black'>".$row["baggageinkg"]."</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:black'>".$row["baggageinkg"]."</span>"."]]></cell>");
print("<cell><![CDATA["."<span style='color:black'>"."\$".$row["pricebaggage"]."</span>"."]]></cell>"); print("<cell><![CDATA["."<span style='color:black'>"."\$".$row["pricebaggage"]."</span>"."]]></cell>");
print("<cell><![CDATA[".date("Y-m-d H:i:s",strtotime($row["idt"]))."]]></cell>");
$now=date("Y-m-d H:i:s");
$idt=date("Y-m-d H:i:s",strtotime($row["idt"]));
$df=$this->NewDateDiff($idt,$now);
$durationinhours=0;
if(count($df)>0)
{
$durationindays=$df['day']*24;
$durationinhours=$df['hour']+$durationindays;
}
print("<cell><![CDATA[".$durationinhours."]]></cell>");
echo ("</row>"); echo ("</row>");
$i+=1; $i+=1;
} }