echo "<script src=\"http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers\"></script>"; } else { $AllowedMaps .= "0"; }; if (nnull(odbc_result($dsAllMaps,"Satellite"),1)==1) {$AllowedMaps .= "1";} else {$AllowedMaps .= "0";}; } else {*/ $AllowedMaps = "11111"; //} //echo $AllowedMaps; $AllowAddPoi = getPriv("AddPOI", session("user_id")); $AllowViewPoi = getPriv("ViewPOI", session("user_id")); $AllowAddZone = getPriv("AddZones", session("user_id")); $AllowViewZone = getPriv("ViewZones", session("user_id")); $cntz = dlookup("select count(*) from pointsofinterest where type=2 and clientid=" . session("client_id")); $TimeZone = DlookUP("select timezone from users where id=" . session("user_id")); $CurrentTime = DlookUP("select to_char(now() + cast('" . ($TimeZone - 1) . " hour' as interval), 'YYYY-MM-DD HH:MI:SS') DateTime"); ?> <script> AllowAddPoi = '<?php echo $AllowAddPoi; ?> ' AllowViewPoi = '<?php echo $AllowViewPoi; ?> ' AllowAddZone = '<?php echo $AllowAddZone; ?> ' AllowViewZone = '<?php
<div id="div-add" style="display:none" title=""></div> <div id="dialog-message" title="<?php echo dic("Reports.Message"); ?> " style="display:none"> <p> <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span> <div id="div-msgbox" style="font-size:14px"></div> </p> </div> <?php $id = getQUERY('id'); opendb(); $code = NNull(DlookUP("select Code from organisation where id=" . $id), ""); $name = NNull(DlookUP("select Name from organisation where id=" . $id), ""); $desc = NNull(DlookUP("select Description from organisation where id=" . $id), ""); ?> <table style="padding-left:20px;" class="text2_" width=50%> <tr style="height:10px"></tr> <tr > <td width=20% style="font-weight:bold"><?php dic("Fm.Code"); ?> :</td> <td width=30% style="padding-left:10px"><input id="code" value="<?php echo $code; ?> " type="text" size=22 style="color: #2F5185; font-family: Arial,Helvetica,sans-serif; font-size: 11px; height:25px; border: 1px solid #CCCCCC; border-radius: 5px 5px 5px 5px; width:161px; padding-left:5px"/></td> </tr>
$per = getQUERY("per"); $day = getQUERY("day"); $date1 = getQUERY("date1"); $saati = getQUERY("saati"); $email = getQUERY("email"); $uid = getQUERY("uid"); $path = getQUERY("path"); $doctype = getQUERY("doctype"); $Today = DateTimeFormat(now(), "Y-m-d H:i:s"); opendb(); $vehID = nnull(dlookup("select id from vehicles where registration = '" . $veh . "'"), 0); $dayInsert = ""; if ($per == "Weekly") { $dayInsert = $day; } if ($per == "Daily") { $dayInsert = ""; } if ($per == "Monthly") { $dayInsert = $date1; } $time = $saati . ":00"; /* echo "insert into Scheduler (clientID, userID, report, vehicle, period, day, time, email, subusers, range, vehID, path, CreationDate) values(" . Session("client_id") . "," . $uid . ", '" . $rep . "','" . $veh . "','" . $per . "','" . $dayInsert . "','" . $time . "','" . $email . "','', '" . $range . "', '" . $vehID . "', '" . $path . "', '" . $Today . "');"; */ RunSQL("delete from Scheduler where clientID = " . Session("client_id") . " and userID = " . $uid . " and report = '" . $rep . "' and vehicle = '" . $veh . "' and period = '" . $per . "' and day = '" . $dayInsert . "' and time = '" . $time . "' and email = '" . $email . "'"); $ret = DlookUP("insert into Scheduler (clientID, userID, report, vehicle, period, day, time, email, subusers, range, \r\n vehID, path, CreationDate, doctype) values(" . Session("client_id") . "," . $uid . ",\r\n '" . $rep . "','" . $veh . "','" . $per . "','" . $dayInsert . "','" . $time . "','" . $email . "','', \r\n '" . $range . "', '" . $vehID . "', '" . $path . "', '" . $Today . "', '" . $doctype . "') "); closedb(); echo $ret;
if ($DFormat1 == "dd-MM-yyyy") { $DFormat = "d-m-Y"; } else { if ($DFormat1 == "yyyy-MM-dd") { $DFormat = "Y-m-d"; } else { $DFormat = "m-d-Y"; } } if ($TFormat1 == "24 Hour Time") { $TFormat = "H:i:s"; } else { $TFormat = "h:i:s A"; } $DTFormat = $DFormat . " " . $TFormat; $dbDatum = DlookUP("select now() DateTime"); $position = ""; $stil = ""; $oldDate = "0"; if (abs(strtotime(pg_fetch_result($dsH, 0, "datetime")) - strtotime($dbDatum)) > 60) { $oldDate = "1"; } $address = dlookup("select latloninarea(" . $sLat . ", " . $sLon . ", " . session("client_id") . ")"); $alarm = pg_fetch_result($dsH, 0, "text"); if ($ClientTypeID == 2) { $pass = "******"; $tax = "1"; if ($ignition . "" == "1") { $stil = pg_fetch_result($dsStyles, 0, "EngineON"); } if ($ignition . "" == "0") {
//echo $AllowedMaps; $AllowAddPoi = getPriv("AddPOI", session("user_id")); $AllowViewPoi = getPriv("ViewPOI", session("user_id")); $AllowAddZone = getPriv("AddZones", session("user_id")); $AllowViewZone = getPriv("ViewZones", session("user_id")); $cntz = dlookup("select count(*) from pointsofinterest where active='1' and type=2 and clientid=" . session("client_id")); $dsFormats = query("select timezone, datetimeformat from users where id=" . session("user_id")); $TimeZone = pg_fetch_result($dsFormats, 0, 'timezone'); $FormatDT = pg_fetch_result($dsFormats, 0, 'datetimeformat'); $FormatDT1 = explode(" ", $FormatDT); if ($FormatDT1[1] == 'h:i:s') { $timeformat = 'HH12:MI:SS AM'; } else { $timeformat = 'HH24:MI:SS'; } $CurrentTime = DlookUP("select to_char(now() + cast('" . ($TimeZone - 1) . " hour' as interval), 'YYYY-MM-DD " . $timeformat . "') DateTime"); $ua = getBrowser(); $yourbrowser = (bool) strpos($ua['userAgent'], "iPad"); //echo $yourbrowser; //exit; $bojanakola = query("SELECT c1.name engineon, c2.name engineoff, c3.name engineoffpassengeron, c4.name satelliteoff, \r\n\tc5.name taximeteron, c6.name taximeteroffpassengeron, c7.name passiveon, c8.name activeoff\r\n\tfrom users us \r\n\tleft outer join statuscolors c1 on c1.id=us.engineon \r\n\tleft outer join statuscolors c2 on c2.id=us.engineoff \r\n\tleft outer join statuscolors c3 on c3.id=us.engineoffpassengeron \r\n\tleft outer join statuscolors c4 on c4.id=us.satelliteoff \r\n\tleft outer join statuscolors c5 on c5.id=us.taximeteron \r\n\tleft outer join statuscolors c6 on c6.id=us.taximeteroffpassengeron \r\n\tleft outer join statuscolors c7 on c7.id=us.passiveon \r\n\tleft outer join statuscolors c8 on c8.id=us.activeoff \r\n\twhere us.id = " . session("user_id")); $engineon = pg_fetch_result($bojanakola, 0, "engineon"); $engineoff = pg_fetch_result($bojanakola, 0, "engineoff"); $engineoffpassengeron = pg_fetch_result($bojanakola, 0, "engineoffpassengeron"); $satelliteoff = pg_fetch_result($bojanakola, 0, "satelliteoff"); $taximeteron = pg_fetch_result($bojanakola, 0, "taximeteron"); $taximeteroffpassengeron = pg_fetch_result($bojanakola, 0, "taximeteroffpassengeron"); $passiveon = pg_fetch_result($bojanakola, 0, "passiveon"); $activeoff = pg_fetch_result($bojanakola, 0, "activeoff"); addlog(2); $pass = dlookup("select md5(password) from users where clientid=" . session("client_id") . " and roleid=2 order by id asc limit 1");
<td width=200px style="padding-left:10px"> <select id="cbVehicles" onchange="changeKm('', '')" style="margin-top:4px; width: 180px; font-size: 11px; position: relative; top: 0px; z-index: 0; visibility: visible;" class="combobox text2"> <?php $vehicles = "select registration, id from vehicles where clientid =" . Session("client_id") . " order by code asc"; $dsVehicles = query($vehicles); $first = pg_fetch_result($dsVehicles, 0, "id"); $proKm = 0; $lastDateKm = dlookup("select datetime from currkm where vehicleid=" . $first); $pastKm = 0; $Km = 0; if ($lastDateKm != "") { $pastKm = nnull(dlookup("select SUM(distance)/1000 from rshortreport where vehicleid=" . $first . " and Datetime >= '" . DateTimeFormat($lastDateKm, "Y-m-d 23:59:59") . "' and Datetime <= '" . DateTimeFormat($dt, "Y-m-d" . " 23:59:59") . "'"), 0); $Km = nnull(dlookup("select km from currkm where vehicleid=" . $first), 0); $proKm = $pastKm + $Km; } else { $proKm = NNull(DlookUP("select SUM(distance)/1000 from rshortreport where vehicleid=" . $first), 0); } while ($drVehicles = pg_fetch_array($dsVehicles)) { ?> <option id="<?php echo $drVehicles["id"]; ?> " value="<?php echo $drVehicles["id"]; ?> "><?php echo $drVehicles["registration"]; ?> <?php } //end while
<option value="19:00" <?php echo $ttx19?>>19:00</option> <option value="20:00" <?php echo $ttx20?>>20:00</option> <option value="21:00" <?php echo $ttx21?>>21:00</option> <option value="22:00" <?php echo $ttx22?>>22:00</option> <option value="23:00" <?php echo $ttx23?>>23:00</option> <option value="24:00" <?php echo $ttx24?>>24:00</option> </select> </td> </tr> <tr> <td align="right" class="text5" style="font-size:12; vertical-align:top" ><div style="position:relative; top:5px"><?php dic("Reports.Email")?>:</div> </td> <td align="left" class="text5" style="width:200px; font-size:12;" colspan="3"> <div id="div-email"> <?php $role = $_SESSION['role_id']; $email = DlookUP("select email from scheduler where id=" . $idto); ?> <input type="checkbox" checked="checked" id="cb_<?php echo $_SESSION['user_id']?>" alt="<?php echo $_SESSION['user_id']?>" style="display:none" /> <input type="text" style="width:235;" id="email" class="textboxcalender corner5 text3" value="<?php echo nnull($email, "/") ?>" /></p> <script>$('#email_<?php echo $_SESSION['user_id'] ?>').text();</script> <div id="sNote" style="position:relative; top:-10px; color:red; width:235px; font-size:10px"> <?php dic("Reports.SchNote")?> </div> </div> </td> </tr> <tr> <td align="right" class="text5" style="font-size:12; vertical-align:top" ><div style="position:relative; top:5px"><?php echo dic("Settings.DocumentType")?>:</div> </td> <td class="text5"> <?php