Add version files and new GIF images for UI components
This commit is contained in:
319
objectx/obj_home/home_ticket_20200110.php
Normal file
319
objectx/obj_home/home_ticket_20200110.php
Normal file
@ -0,0 +1,319 @@
|
||||
<?php
|
||||
class HOME_TICKET extends HOME
|
||||
{
|
||||
public function home_ticket_javainit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function fn_ticket_init()
|
||||
{
|
||||
if(isset($_REQUEST['task'])){$task=trim(strtolower($_REQUEST['task']));}
|
||||
if(isset($_POST['task'])){$task=trim(strtolower($_POST['task']));}
|
||||
if($_REQUEST||$_POST){if($_REQUEST['sec']||$_POST['sec']){$task=$this->dec($task);}}
|
||||
|
||||
switch($task)
|
||||
{
|
||||
case "default":
|
||||
$this->fn_default_sum();
|
||||
break;
|
||||
|
||||
case $task:
|
||||
$task="fn_".$task;
|
||||
if(method_exists($this,$task)){$this->$task();}
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->fn_default_sum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function fn_default_sum()
|
||||
{
|
||||
echo $this->FN_CREATEHEADER();
|
||||
|
||||
echo "<style>
|
||||
.besidebtnsave {margin-left:80px;margin-top:-6px;position:absolute;}
|
||||
</style>";
|
||||
echo "<script>
|
||||
var myForm,myFormsearch,dgtra;
|
||||
function initObject()
|
||||
{";
|
||||
echo "var multiple_dataset = [
|
||||
{ sales:\"20\", sales2:\"35\", year:\"02\" },
|
||||
{ sales:\"40\", sales2:\"24\", year:\"03\" },
|
||||
{ sales:\"44\", sales2:\"20\", year:\"04\" },
|
||||
{ sales:\"23\", sales2:\"50\", year:\"05\" },
|
||||
{ sales:\"21\", sales2:\"36\", year:\"06\" },
|
||||
{ sales:\"50\", sales2:\"40\", year:\"07\" },
|
||||
{ sales:\"30\", sales2:\"65\", year:\"08\" },
|
||||
{ sales:\"90\", sales2:\"62\", year:\"09\" },
|
||||
{ sales:\"55\", sales2:\"40\", year:\"10\" },
|
||||
{ sales:\"72\", sales2:\"45\", year:\"11\" }
|
||||
];";
|
||||
echo "var myBarChart = new dhtmlXChart({
|
||||
view:\"bar\",
|
||||
container:\"div_ticketbaralarm\",
|
||||
value:\"#sales#\",
|
||||
color: \"#58dccd\",
|
||||
gradient:\"rising\",
|
||||
tooltip:{
|
||||
template:\"#sales#\"
|
||||
},
|
||||
width:60,
|
||||
xAxis:{
|
||||
template:\"'#year#\"
|
||||
},
|
||||
yAxis:{
|
||||
start:0,
|
||||
step:10,
|
||||
end:100
|
||||
},
|
||||
legend:{
|
||||
values:[{text:\"Atauro\",color:\"#58dccd\"},{text:\"Oekuse\",color:\"#a7ee70\"}],
|
||||
valign:\"middle\",
|
||||
align:\"bottom\",
|
||||
width:190,
|
||||
layout:\"x\"
|
||||
}
|
||||
});
|
||||
myBarChart.addSeries({
|
||||
value:\"#sales2#\",
|
||||
color:\"#a7ee70\",
|
||||
tooltip:{
|
||||
template:\"#sales2#\"
|
||||
}
|
||||
});
|
||||
myBarChart.parse(multiple_dataset,\"json\");
|
||||
|
||||
|
||||
var data = {
|
||||
first_name: \"Richard\",
|
||||
last_name: \"Wilson\",
|
||||
addr1: \"Upton Avenue 1870\",
|
||||
addr2: \"Liberty Square 4949\",
|
||||
company: \"Monk Home Loans\"
|
||||
};
|
||||
|
||||
var parentObj = document.getElementById(\"previewData\");
|
||||
parentObj.innerHTML = window.dhx4.template(parentObj.innerHTML, data);
|
||||
|
||||
|
||||
var destination = [
|
||||
{ id:1, percent:45, dest:\"Oekuse\", color: \"#ee9e36\"},
|
||||
{ id:2, percent:55, dest:\"Atauro\", color: \"#eeea36\"}
|
||||
];
|
||||
myPieChart = new dhtmlXChart({
|
||||
view:\"pie\",
|
||||
container:\"div_pieshippasstrend\",
|
||||
value:\"#percent#\",
|
||||
color:\"#color#\",
|
||||
labelLines: true,
|
||||
label:\"#dest#: #percent# %\",
|
||||
shadow:0
|
||||
});
|
||||
myPieChart.parse(destination,\"json\");
|
||||
|
||||
|
||||
var destination = [
|
||||
{ id:1, percent:45, dest:\"Oekuse\", color: \"#ee9e36\"},
|
||||
{ id:2, percent:55, dest:\"Atauro\", color: \"#eeea36\"}
|
||||
];
|
||||
myPieChart1 = new dhtmlXChart({
|
||||
view:\"pie\",
|
||||
container:\"div_pieshiptriptrend\",
|
||||
value:\"#percent#\",
|
||||
color:\"#color#\",
|
||||
labelLines: true,
|
||||
label:\"#dest#: #percent# %\",
|
||||
shadow:0
|
||||
});
|
||||
myPieChart1.parse(destination,\"json\");";
|
||||
|
||||
echo " };
|
||||
</script>";
|
||||
echo $this->FN_CLOSEHEADER();
|
||||
echo $this->FN_CREATEBODY("white");
|
||||
echo "<table width=\"98%\" height=\"100%\">";
|
||||
echo " <tr>
|
||||
<td valign=\"top\" width=\"70%\">
|
||||
<div style=\"width:100%;text-align:center;text-decoration:underline;font-size:24px;color:blue\">Nakroma Passenger Performance Period ".date("Y")."</div>
|
||||
<div id=\"div_ticketbaralarm\" style=\"width:100%;height:330px;\"></div>
|
||||
</td>
|
||||
<td valign=\"top\" rowspan=\"2\">
|
||||
<div style=\"height:200\">
|
||||
<table width=\"100%\">";
|
||||
$arr=array("4-H"=>"#f1c40f","5-C"=>"#f1c40f","5-F"=>"#f1c40f","5-G"=>"#f1c40f","5-H"=>"#f1c40f","20-C"=>"#2980b9","20-D"=>"#2980b9","30-D"=>"#2980b9");
|
||||
// === Seat Code
|
||||
echo "<tr>";
|
||||
for($h=1;$h<=10;$h++){
|
||||
if($h==1){
|
||||
echo "<td width=\"1px\"> </td>";
|
||||
}
|
||||
echo "<td width=\"10\" style=\"font-size:8pt;\"> ".chr(64+$h)."</td>";
|
||||
if($h==5){
|
||||
echo "<td width=\"20px\"> </td>";
|
||||
}
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
// === SEAT Number
|
||||
for($i=1;$i<=30;$i++){
|
||||
echo "<tr>";
|
||||
for($j=1;$j<=10;$j++)
|
||||
{
|
||||
$colors="#ecf0f1";
|
||||
//if($i==4&&$j==8){$colors="#f1c40f";}
|
||||
if(array_key_exists("$i-".chr(64+$j),$arr)){
|
||||
$colors=$arr["$i-".chr(64+$j)];
|
||||
}
|
||||
if($j==1){
|
||||
echo "<td width=\"1px\" style=\"font-size:10pt;color:black\">$i.</td>";
|
||||
}
|
||||
echo "<td width=\"10px\" height=\"8px\" style=\"height:8px;background-color:none\">
|
||||
<div style=\"border: 1px solid transparent;border-radius: 2px;background-color:$colors;width:15px;height:8px\">
|
||||
|
||||
</div>
|
||||
</td>";
|
||||
if($j==5){
|
||||
echo "<td width=\"20px\"> </td>";
|
||||
}
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo " </table>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=\"top\" style=\"background-color:none\">
|
||||
<table width=\"100%\">
|
||||
<tr>
|
||||
<td>
|
||||
<div class=\"preview_tpl\" id=\"previewData\" style=\"\">
|
||||
<div class=\"header_tpl\" style=\"font-weight:bold\">Nakroma Passenger</div>
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width:400px\">
|
||||
<tr>
|
||||
<td>
|
||||
<div style=\"text-align:center;text-decoration:underline;font-size:20px;color:blue;margin-top:10px\">
|
||||
Period ".date("Y")."
|
||||
</div>
|
||||
<div id=\"div_pieshippasstrend\" style=\"height:200px;margin-top:0px;\"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Atauro</td>
|
||||
<td>: 55% (1.5K)</td>
|
||||
<td>Oekuse</td>
|
||||
<td>: 45% (800)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td valign=\"top\">
|
||||
<div class=\"preview_tpl\" id=\"previewData\" style=\"margin-left:20px\">
|
||||
<div class=\"header_tpl\" style=\"font-weight:bold\">Nakroma Manifest</div>
|
||||
<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width:450px\">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan=\"5\">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Nacroma Tonase</td>
|
||||
<td>:</td>
|
||||
<td><span style=\"font-size:19px\">200</span> ton</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Threshold</td>
|
||||
<td>:</td>
|
||||
<td><span style=\"font-size:19px\">180</span> ton</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style=\"border-bottom:1px solid black;border-right:1px solid black\"></td>
|
||||
<td style=\"border-bottom:1px solid black;\">Unit</td>
|
||||
<td align=\"right\" style=\"border-bottom:1px solid black\">Qty</td>
|
||||
<td align=\"right\" style=\"border-bottom:1px solid black\">( \$ )</td>
|
||||
<td align=\"right\" style=\"border-bottom:1px solid black\">( ton )</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=\"border-right:1px solid black\">Passenger</td>
|
||||
<td>Person</td>
|
||||
<td align=\"right\">300</td>
|
||||
<td align=\"right\">\$1.800</td>
|
||||
<td align=\"right\">15.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=\"border-right:1px solid black\">Vehichle</td>
|
||||
<td>unit</td>
|
||||
<td align=\"right\">10</td>
|
||||
<td align=\"right\">\$6.800</td>
|
||||
<td align=\"right\">20.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=\"border-right:1px solid black\">Non Vehichle</td>
|
||||
<td>unit</td>
|
||||
<td align=\"right\">10</td>
|
||||
<td align=\"right\">\$4.700</td>
|
||||
<td align=\"right\">18.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=\"border-top:1px dashed black;border-right:1px solid black\">Total</td>
|
||||
<td style=\"border-top:1px dashed black\"></td>
|
||||
<td align=\"right\" style=\"border-top:1px dashed black;color:blue;\">330</td>
|
||||
<td align=\"right\" style=\"border-top:1px dashed black;color:blue;\">\$13.300</td>
|
||||
<td align=\"right\" style=\"border-top:1px dashed black;color:blue;\">54.0</td>
|
||||
</tr>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan=\"5\">
|
||||
<table width=\"100%\" style=\"background-color:none\">
|
||||
<tr>
|
||||
<td width=\"220px\" style=\"font-Size:12pt;\">GAP ( Ton )</td>
|
||||
<td width=\"1px\" style=\"font-Size:12pt;\">-></td>
|
||||
<td width=\"220px\" style=\"font-Size:12pt;\">180.0 - 54.0</td>
|
||||
<td width=\"1px\" style=\"font-Size:12pt;\">=</td>
|
||||
<td style=\"font-Size:14pt;\">
|
||||
<div style=\"background-color:green;color:white;padding:5px;border: 2px solid green;border-radius: 5px 2px;\">
|
||||
126.0
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=\"5\" style=\"font-Size:14pt;\">
|
||||
<span>Tonase Status</span>
|
||||
<span>:</span>
|
||||
<span style=\"color:green;font-size:16pt;font-weight:bold\">GOOD</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>";
|
||||
echo "</table>";
|
||||
echo $this->FN_CREATEFOOTER();
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user