//session_start(); include_once('../config.php'); include_once(__DOCUMENT_ROOT.'/reports/private/master.php'); include_once(__DOCUMENT_ROOT.'/reports/private/common.php'); $masterObj = new master(); $obj = new MyClass(); /* -------------------------------------------------------------- */ require_once('../redis-files/geoget.php'); //redis geo data file require_once('../redis-files/hget_pois.php'); //redis geo data file require_once('../redis-files/redis_instance.php');// redis instance /*----------------------------------------------------------------- */ //$sess_userid = $_SESSION['UserId'];//user session id using in redis if($_SESSION['ParentId']!=1) { $sess_userid=$_SESSION['ParentId']; } else { $sess_userid=$_SESSION['UserId']; } $date = date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d')))); $RunningvehicleDetails = $masterObj->getRunningVechiles($_SESSION['vehId'],$date); $runningSeesionData=$RunningvehicleDetails; //echo "
";print_r($runningSeesionData);die();
function SetTempGreateVal($set_temp,$set_temp_to,$temprature)
{
if($set_temp == 18 && $set_temp_to == 25)
{
if($temprature>25 && $temprature<=28)
{
$temprature = 24;
}
else if($temprature>28 && $temprature<=30)
{
$temprature = 24.3;
}
else if($temprature>30 && $temprature<=35)
{
$temprature = 24.6;
}
else if($temprature>35 && $temprature<45)
{
$temprature = 25;
}
}
else if($set_temp == 18 && $set_temp_to == 22)
{
if($temprature>22 && $temprature<=22.5)
{
$temprature = 18.1;
}
else if($temprature>22.5 && $temprature<=23)
{
$temprature = 18.2;
}
else if($temprature>23 && $temprature<=23.5)
{
$temprature = 18.3;
}
else if($temprature>23.5 && $temprature<=24)
{
$temprature = 18.4;
}
else if($temprature>24 && $temprature<=24.5)
{
$temprature = 18.5;
}
else if($temprature>24.5 && $temprature<=25)
{
$temprature = 18.6;
}
else if($temprature>25 && $temprature<=25.5)
{
$temprature = 18.7;
}
else if($temprature>25.5 && $temprature<=26)
{
$temprature = 18.8;
}
else if($temprature>26 && $temprature<=26.5)
{
$temprature = 18.9;
}
else if($temprature>26.5 && $temprature<=27)
{
$temprature = 19;
}
else if($temprature>27 && $temprature<=27.5)
{
$temprature = 19.1;
}
else if($temprature>27.5 && $temprature<=28)
{
$temprature = 19.2;
}
else if($temprature>28 && $temprature<=28.5)
{
$temprature = 19.3;
}
else if($temprature>28.5 && $temprature<=29)
{
$temprature = 19.4;
}
else if($temprature>29 && $temprature<=29.5)
{
$temprature = 19.5;
}
else if($temprature>29.5 && $temprature<=30)
{
$temprature = 19.6;
}
else if($temprature>30 && $temprature<=30.5)
{
$temprature = 19.7;
}
else if($temprature>30.5 && $temprature<=31)
{
$temprature = 19.8;
}
else if($temprature>31 && $temprature<=31.5)
{
$temprature = 19.9;
}
else if($temprature>31.5 && $temprature<=32)
{
$temprature = 20;
}
else if($temprature>32 && $temprature<=32.5)
{
$temprature = 20.1;
}
else if($temprature>32.5 && $temprature<=33)
{
$temprature = 20.2;
}
else if($temprature>33 && $temprature<=33.5)
{
$temprature = 20.3;
}
else if($temprature>33.5 && $temprature<=34)
{
$temprature = 20.4;
}
else if($temprature>34 && $temprature<=34.5)
{
$temprature = 20.5;
}
else if($temprature>34.5 && $temprature<=35)
{
$temprature = 20.6;
}
else if($temprature>35 && $temprature<=35.5)
{
$temprature = 20.7;
}
else if($temprature>35.5 && $temprature<=36)
{
$temprature = 20.8;
}
else if($temprature>36 && $temprature<=36.5)
{
$temprature = 20.9;
}
else if($temprature>36.5 && $temprature<=37)
{
$temprature = 21;
}
else if($temprature>37 && $temprature<=37.5)
{
$temprature = 21.1;
}
else if($temprature>37.5 && $temprature<=38)
{
$temprature = 21.2;
}
else if($temprature>38 && $temprature<=38.5)
{
$temprature = 21.3;
}
else if($temprature>38.5 && $temprature<=39)
{
$temprature = 21.4;
}
else if($temprature>39 && $temprature<=39.5)
{
$temprature = 21.5;
}
else if($temprature>39.5 && $temprature<=40)
{
$temprature = 21.6;
}
else if($temprature>40)
{
$temprature = 22;
}
}
elseif($set_temp == 0 && $set_temp_to == 4)
{
if($temprature > 4 && $temprature <= 8)
{
$temprature = 3;
}
else if($temprature > 8 && $temprature <= 12)
{
$temprature = 3.3;
}
else if($temprature > 12 && $temprature <= 16)
{
$temprature = 3.7;
}
else if($temprature > 16 && $temprature <= 20)
{
$temprature = 4;
}
}
elseif($set_temp == -25 && $set_temp_to == -18)
{
if($temprature > -8.5 && $temprature <= -8)
{
$temprature = -18.1;
}
else if($temprature > -9 && $temprature <= -8.5)
{
$temprature = -18.3;
}
else if($temprature > -9.5 && $temprature <= -9)
{
$temprature = -18.6;
}
else if($temprature > -10 && $temprature <=-9.5)
{
$temprature = -18.9;
}
else if($temprature > -10.5 && $temprature <= -10)
{
$temprature = -19.3;
}
else if($temprature > -11 && $temprature <= -10.5)
{
$temprature = -19.6;
}
else if($temprature > -11.5 && $temprature <=-11)
{
$temprature = -20;
}
else if($temprature > -12 && $temprature <= -11.5)
{
$temprature = -20.7;
}
else if($temprature > -12.5 && $temprature <=-12)
{
$temprature = -21;
}
else if($temprature > -13 && $temprature <= -12.5)
{
$temprature = -20.7;
}
else if($temprature > -13.5 && $temprature <=-13)
{
$temprature = -21.5;
}
else if($temprature > -14 && $temprature <= -13.5)
{
$temprature = -20.7;
}
else if($temprature > -14.5 && $temprature <=-14)
{
$temprature = -21.5;
}
else if($temprature > -15 && $temprature <=-14.5)
{
$temprature = -21.5;
}
else if($temprature > -6.5 && $temprature <=-6)
{
$temprature = -21.2;
}
else if($temprature > -7 && $temprature <=-6.5)
{
$temprature = -21.8;
}
}
elseif($set_temp == 4 && $set_temp_to == 8)
{
if($temprature >= 0 && $temprature <= 4)
{
$temprature = 4;
}
else if($temprature > 4 && $temprature <= 8)
{
$temprature = $temprature;
}
else if($temprature>8 && $temprature<=9)
{
$temprature = 4.1;
}
else if($temprature>9 && $temprature<=10)
{
$temprature = 4.2;
}
else if($temprature>10 && $temprature<=11)
{
$temprature = 4.3;
}
else if($temprature>11 && $temprature<=12)
{
$temprature = 4.4;
}
else if($temprature>12 && $temprature<=13)
{
$temprature = 4.5;
}
else if($temprature>13 && $temprature<=14)
{
$temprature = 4.6;
}
else if($temprature>14 && $temprature<=15)
{
$temprature = 4.7;
}
else if($temprature>15 && $temprature<=16)
{
$temprature = 4.8;
}
else if($temprature>16 && $temprature<=17)
{
$temprature = 4.9;
}
else if($temprature>17 && $temprature<=18)
{
$temprature = 5;
}
else if($temprature>18 && $temprature<=19)
{
$temprature = 5.1;
}
else if($temprature>19 && $temprature<=20)
{
$temprature = 5.2;
}
else if($temprature>20 && $temprature<=21)
{
$temprature = 5.3;
}
else if($temprature>21 && $temprature<=22)
{
$temprature = 5.4;
}
else if($temprature>22 && $temprature<=23)
{
$temprature = 5.5;
}
else if($temprature>23 && $temprature<=24)
{
$temprature = 5.6;
}
else if($temprature>24 && $temprature<=25)
{
$temprature = 5.7;
}
else if($temprature>25 && $temprature<=26)
{
$temprature = 5.8;
}
else if($temprature>26 && $temprature<=27)
{
$temprature = 5.9;
}
else if($temprature>27 && $temprature<=28)
{
$temprature = 6;
}
else if($temprature>28 && $temprature<=29)
{
$temprature = 6.1;
}
else if($temprature>29 && $temprature<=30)
{
$temprature = 6.2;
}
else if($temprature>30 && $temprature<=31)
{
$temprature = 6.3;
}
else if($temprature>31 && $temprature<=32)
{
$temprature = 6.4;
}
else if($temprature>32 && $temprature<=33)
{
$temprature = 6.5;
}
else if($temprature>33 && $temprature<=34)
{
$temprature = 6.6;
}
else if($temprature>34 && $temprature<=35)
{
$temprature = 6.7;
}
else if($temprature>35 && $temprature<=36)
{
$temprature = 6.8;
}
else if($temprature>36 && $temprature<=37)
{
$temprature = 6.9;
}
else if($temprature>37 && $temprature<=38)
{
$temprature = 7;
}
else if($temprature>38 && $temprature<=39)
{
$temprature = 7.1;
}
else if($temprature>39 && $temprature<=40)
{
$temprature = 7.2;
}
else if($temprature>40 && $temprature<=41)
{
$temprature = 7.3;
}
else if($temprature>41 && $temprature<=42)
{
$temprature = 7.4;
}
else if($temprature>42)
{
$temprature = 7.5;
}
}
return $temprature;
}
function SetTempLessVal($set_temp,$set_temp_to,$temprature)
{
if($set_temp == 18 && $set_temp_to == 25)
{
if($temprature>=0 && $temprature<=8)
{
$temprature = 18;
}
else if($temprature>8 && $temprature<=12)
{
$temprature = 18.3;
}
else if($temprature>12 && $temprature<=14)
{
$temprature = 18.5;
}
else if($temprature>14 && $temprature<18)
{
$temprature = 19;
}
}
else if($set_temp == 18 && $set_temp_to == 22)
{
if($temprature>=0 && $temprature<=8)
{
$temprature = 18;
}
else if($temprature>8 && $temprature<=12)
{
$temprature = 18.5;
}
else if($temprature>12 && $temprature<=14)
{
$temprature = 19;
}
else if($temprature>14 && $temprature<18)
{
$temprature = 19.5;
}
else if($temprature >= -50 && $temprature<0)
{
$temprature = 18.2;
}
}
elseif($set_temp == 0 && $set_temp_to == 4)
{
if($temprature < 0 && $temprature >= -8)
{
$temprature = 0;
}
else if($temprature < -8 && $temprature >= -12)
{
$temprature = 0.3;
}
else if($temprature < -12 && $temprature >= -14)
{
$temprature = 0.5;
}
else if($temprature < -14 && $temprature > -18)
{
$temprature = 1;
}
else if($temprature < -18 && $temprature > -40)
{
$temprature = 0;
}
/*else if($navData[$na]["tel_temperature"] < -18 && $navData[$na]["tel_temperature"] > -40)
{
$navData[$na]["tel_temperature"] = 0;
}*/
}
elseif($set_temp == -25 && $set_temp_to == -18)
{
if($temprature > -8.5 && $temprature <= -8)
{
$temprature = -18.1;
}
else if($temprature > -9 && $temprature <= -8.5)
{
$temprature = -18.3;
}
else if($temprature > -9.5 && $temprature <= -9)
{
$temprature = -18.6;
}
else if($temprature > -10 && $temprature <=-9.5)
{
$temprature = -18.9;
}
else if($temprature > -10.5 && $temprature <= -10)
{
$temprature = -19.3;
}
else if($temprature > -11 && $temprature <= -10.5)
{
$temprature = -19.6;
}
else if($temprature > -11.5 && $temprature <=-11)
{
$temprature = -20;
}
else if($temprature > -12 && $temprature <= -11.5)
{
$temprature = -20.7;
}
else if($temprature > -12.5 && $temprature <=-12)
{
$temprature = -21;
}
else if($temprature > -13 && $temprature <= -12.5)
{
$temprature = -20.7;
}
else if($temprature > -13.5 && $temprature <=-13)
{
$temprature = -21.5;
}
else if($temprature > -14 && $temprature <= -13.5)
{
$temprature = -20.7;
}
else if($temprature > -14.5 && $temprature <=-14)
{
$temprature = -21.5;
}
else if($temprature > -15 && $temprature <=-14.5)
{
$temprature = -21.5;
}
else if($temprature > -6.5 && $temprature <=-6)
{
$temprature = -21.2;
}
else if($temprature > -7 && $temprature <=-6.5)
{
$temprature = -21.8;
}
}
elseif($set_temp == 4 && $set_temp_to == 8)
{
if($temprature >= 0 && $temprature <= 4)
{
$temprature = 4;
}
else if($temprature < 0 && $temprature >= -8)
{
$temprature = 4;
}
else if($temprature < -8 && $temprature >= -12)
{
$temprature = 4.3;
}
else if($temprature < -12 && $temprature >= -14)
{
$temprature = 4.5;
}
else if($temprature < -14 && $temprature > -18)
{
$temprature = 5;
}
else if($temprature < -18 && $temprature >= -50)
{
$temprature = 0.1;
}
}
return $temprature;
}
if($_REQUEST['RefTime'] == "")
{
if(in_array($_SESSION['sys_group_id'], $refresh30sec) || in_array($_SESSION['sys_group_id_parent'], $refresh30sec)) {
$RefTime = 0.5;
} else {
$RefTime = 30;
}
}
else
{
$RefTime = $_REQUEST['RefTime'];
}
$_SESSION['clientid'] = $obj->ClientUniqueID();
$Action = isset($_GET['request']) ? $_GET['request'] : "";
if($Action!="")
{
if (in_array($_SESSION['sys_group_id'], $ShowTempIndashboard) or in_array($_SESSION['sys_group_id_parent'], $ShowTempIndashboard))
{
$html.= '| Vehicle Number | '; if( in_array($_SESSION['sys_group_id'], $extraShowInBranch)) { $html.='Controlling Branch | '; } if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) { $html.= 'Type | '; } if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { $html.= 'AC Status | '; } $html.='Location Name | Last Update | Last Running Time | Speed | Temperature | '; $html.='||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SNo | Vehicle Number | '; if (in_array($_SESSION['sys_group_id'], $ecomvehicle) || in_array($_SESSION['sys_group_id_parent'], $ecomvehicle)) { $html.= 'Run Type | Vendor Name | '; } if( in_array($_SESSION['sys_group_id'], $extraShowInBranch)) { $html.='Controlling Branch | '; } if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) { $html.= 'Type | '; } if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { $html.= 'AC Status | '; } $html.='Location Name | Last Update | Last Running Time | Speed | '; if (in_array($_SESSION['sys_group_id'], $batteryshowGT) or in_array($_SESSION['sys_group_id_parent'], $batteryshowGT)) { $html.= 'Battery Status | Headlight Status | '; } if(in_array($_SESSION['sys_group_id'], $ExtraColShow) || in_array($_SESSION['sys_group_id_parent'], $ExtraColShow)) { $html.= 'Circle Name | SDO | '; } else { $html.= 'Nearest POI | '; } if (in_array($_SESSION['sys_group_id'], $vehTripStatus) or in_array($_SESSION['sys_group_id_parent'], $vehTripStatus)){ $html.= 'Vehicle Status | '; } if (in_array($_SESSION['sys_group_id'], $distStateShow) or in_array($_SESSION['sys_group_id_parent'], $distStateShow)) { $html.= 'District | State | '; } $html.='||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'.$VehicleNumber.' | ';
if( in_array($_SESSION['sys_group_id'], $extraShowInBranch))
{
$html.=''.$controlling_branch.' | '; } if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) { $html.=''.$veh_status.' | '; } if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { $html.=''.$aconoff_excel.' | '; } $html.=''.$LocationName.' | '.$lastUpdate.' | '.$lastrunning.' | '.$Speed.' | '.$showTemp.' | ||||||||||||
| '.$SlNo.' | '.$VehicleNumber.' | ';
if (in_array($_SESSION['sys_group_id'], $ecomvehicle) || in_array($_SESSION['sys_group_id_parent'], $ecomvehicle)){
// $html.='hello | '; // $html.='RUnt type | '; $html.=''.$runtype1.' | '; $html.=''.$vendorName1.' | '; } if( in_array($_SESSION['sys_group_id'], $extraShowInBranch)) { $html.=''.$controlling_branch.' | '; } if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) { $html.=''.$veh_status.' | '; } if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { $html.=''.$aconoff_excel.' | '; } $html.=''.$LocationName.' | '.$lastUpdate.' | '.$lastrunning.' | '.$Speed.' | '; if (in_array($_SESSION['sys_group_id'], $batteryshowGT) or in_array($_SESSION['sys_group_id_parent'], $batteryshowGT)) { if($runningSeesionData[$r]["tel_input_3"] == 1) { $headlight = "ON"; } else { $headlight = "OFF"; } $SHowVoltage=""; if($runningSeesionData[$r]["tel_rfid"]==6) { $SHowVoltage="80% to 100%"; } if($runningSeesionData[$r]["tel_rfid"]==5) { $SHowVoltage="60% to 80%"; } if($runningSeesionData[$r]["tel_rfid"]==4) { $SHowVoltage="40% to 60%"; } if($runningSeesionData[$r]["tel_rfid"]==3) { $SHowVoltage="20% to 40%"; } if($runningSeesionData[$r]["tel_rfid"]==2) { $SHowVoltage="10% to 20%"; } if($runningSeesionData[$r]["tel_rfid"]==1) { $SHowVoltage="5% to 10%"; } if($SHowVoltage=="") { $voltagecheck=$masterObj->GEtbatterystatusSOC($sys_service_id); $SHowVoltage=$voltagecheck; } if($SHowVoltage=="" && $_SESSION['sys_group_id']!=53594) { if($runningSeesionData[$r]["tel_voltage"]>=4 ) { $SHowVoltage="80% to 100%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.8 && $runningSeesionData[$r]["tel_voltage"]<4) { $SHowVoltage="60% to 80%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.6 && $runningSeesionData[$r]["tel_voltage"]<3.8) { $SHowVoltage="40% to 60%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.4 && $runningSeesionData[$r]["tel_voltage"]<3.6) { $SHowVoltage="20% to 40%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]<3.4) { $SHowVoltage="10% to 20%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } } //echo $SHowVoltage; $html.=''.$SHowVoltage.' | '; $html.=''.$headlight.' | '; } if(in_array($_SESSION['sys_group_id'], $ExtraColShow) || in_array($_SESSION['sys_group_id_parent'], $ExtraColShow)) { $html.= ''.$runningSeesionData[$r]["veh_trasport_name"].' | '.$runningSeesionData[$r]["thana_name"].' | '; } else { $html.= ''.$KMFromNearPOI.' | ';
}
if (in_array($_SESSION['sys_group_id'], $vehTripStatus) or in_array($_SESSION['sys_group_id_parent'], $vehTripStatus)){
$getInTransitVeh = db__select("select trip_status from matrix.client_veh_trip_status where
sys_service_id=".$runningSeesionData[$r]["sys_service_id"]." and is_active='1' ", "");
$trip_status = $getInTransitVeh[0]["trip_status"];
$html.=''.$trip_status.' | '; } if (in_array($_SESSION['sys_group_id'], $distStateShow) or in_array($_SESSION['sys_group_id_parent'], $distStateShow)) { $latlng = $runningSeesionData[$r]["gps_latitude"].",".$runningSeesionData[$r]["gps_longitude"]; if( $runningSeesionData[$r]["gps_latitude"] != "0.000000000" && $runningSeesionData[$r]["gps_longitude"] != "0.000000000") { $get_latlng = $masterObj->nearestDistState($latlng); } else {$get_latlng = "";} $ArrayData = explode(",",$get_latlng); $html.= ''.$ArrayData[0].' | '.$ArrayData[1].' | '; } $html.='
Running vehicle detail generated at '.date("Y-m-d H:i").' |
| Temp | } else {?>SNo | }?>Vehicle Number | if (in_array($_SESSION['sys_group_id'], $ecomvehicle) || in_array($_SESSION['sys_group_id_parent'], $ecomvehicle)) {?>Run Type | Vendor Name | } ?> if( in_array($_SESSION['sys_group_id'], $extraShowInBranch)) {?>Controlling Branch | } ?> if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) {?>Type | } if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { ?>AC Status | } ?>Location Name | Last update | Last Running Time | Speed | if (in_array($_SESSION['sys_group_id'], $batteryshowGT) or in_array($_SESSION['sys_group_id_parent'], $batteryshowGT)) {?>Battery Status | Headlight Status | } ?> if(in_array($_SESSION['sys_group_id'], $ExtraColShow) || in_array($_SESSION['sys_group_id_parent'], $POInotShow)) {?>Circle Name | SDO | } else if($_SESSION['UserId']!="80932" && $_SESSION['sys_group_id_parent']!="80932") { ?>KM from Nearest POI | if (in_array($_SESSION['sys_group_id'], $vehTripStatus) or in_array($_SESSION['sys_group_id_parent'], $vehTripStatus)){?>Vehicle Status | }?> if (in_array($_SESSION['sys_group_id'], $distStateShow) or in_array($_SESSION['sys_group_id_parent'], $distStateShow)) {?>District | State | } ?> } ?>||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| >=$showTemp?> | =$VehicleNumber?> | } else {?>=$SlNo?> | if (in_array($_SESSION['sys_group_id'], $StopVehicleProfile) or in_array($_SESSION['sys_group_id_parent'], $StopVehicleProfile)){?>=$VehicleNumber?> | } else {?>=$VehicleNumber?> | } } ?> if (in_array($_SESSION['sys_group_id'], $ecomvehicle) || in_array($_SESSION['sys_group_id_parent'], $ecomvehicle)) {?>=ucfirst($runtype);?> | =ucfirst($vendorName);?> | }?> if( in_array($_SESSION['sys_group_id'], $extraShowInBranch)) { $controlling_branch=$runningSeesionData[$r]["thana_name"];?>=$controlling_branch?> | } ?> if (in_array($_SESSION['sys_group_id'], $vehicle_type) or in_array($_SESSION['sys_group_id_parent'], $vehicle_type)) {?>=$veh_status;?> | } ?> if(in_array($_SESSION['sys_group_id'], $ShowACStatusAll) or in_array($_SESSION['sys_group_id_parent'], $ShowACStatusAll)) { if($runningSeesionData[$r]["aconoff"] == 1){$aconoff = 'ON';}else{$aconoff = 'OFF';} ?>=$aconoff;?> | } ?>if (in_array($_SESSION['sys_group_id'], $googleviewmap) or in_array($_SESSION['sys_group_id_parent'], $googleviewmap)) {?> }else {?> }?> =$LocationName?> | =$lastUpdate?> | =$lastrunning?> | =$Speed?> | if (in_array($_SESSION['sys_group_id'], $batteryshowGT) or in_array($_SESSION['sys_group_id_parent'], $batteryshowGT)) { if($runningSeesionData[$r]["tel_input_3"] == 1) { $headlight = "ON"; } else { $headlight = "OFF"; } ?>$SHowVoltage=""; if($runningSeesionData[$r]["tel_rfid"]==6) { $SHowVoltage="80% to 100%"; } if($runningSeesionData[$r]["tel_rfid"]==5) { $SHowVoltage="60% to 80%"; } if($runningSeesionData[$r]["tel_rfid"]==4) { $SHowVoltage="40% to 60%"; } if($runningSeesionData[$r]["tel_rfid"]==3) { $SHowVoltage="20% to 40%"; } if($runningSeesionData[$r]["tel_rfid"]==2) { $SHowVoltage="10% to 20%"; } if($runningSeesionData[$r]["tel_rfid"]==1) { $SHowVoltage="5% to 10%"; } if($SHowVoltage=="") { $voltagecheck=$masterObj->GEtbatterystatusSOC($sys_service_id); $SHowVoltage=$voltagecheck; } if($SHowVoltage=="" && $_SESSION['sys_group_id']!=53594) { if($runningSeesionData[$r]["tel_voltage"]>=4 ) { $SHowVoltage="80% to 100%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.8 && $runningSeesionData[$r]["tel_voltage"]<4) { $SHowVoltage="60% to 80%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.6 && $runningSeesionData[$r]["tel_voltage"]<3.8) { $SHowVoltage="40% to 60%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]>=3.4 && $runningSeesionData[$r]["tel_voltage"]<3.6) { $SHowVoltage="20% to 40%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } if($runningSeesionData[$r]["tel_voltage"]<3.4) { $SHowVoltage="10% to 20%"."(".round($runningSeesionData[$r]["tel_voltage"],2).")"; } } echo $SHowVoltage; ?> | =$headlight;?> | } ?> if(in_array($_SESSION['sys_group_id'], $ExtraColShow) || in_array($_SESSION['sys_group_id_parent'], $ExtraColShow)) {?>=$runningSeesionData[$r]["veh_trasport_name"];?> | =$runningSeesionData[$r]["thana_name"];?> | } else {?>if (in_array($_SESSION['sys_group_id'], $googleviewmap) or in_array($_SESSION['sys_group_id_parent'], $googleviewmap)) {?> }else {?> }?> | } if (in_array($_SESSION['sys_group_id'], $vehTripStatus) or in_array($_SESSION['sys_group_id_parent'], $vehTripStatus)){ $getInTransitVeh = db__select("select trip_status from matrix.client_veh_trip_status where sys_service_id=".$runningSeesionData[$r]["sys_service_id"]." and is_active='1' ", ""); $trip_status = $getInTransitVeh[0]["trip_status"]; ?>','=$sess_userid;?>','=$VehicleNumber;?>','=$r;?>');" data-toggle="modal" data-target=".bs-example-modal-sm-popup" id="tripstat=$r;?>"> =$getInTransitVeh[0]["trip_status"];?> | " /> } if (in_array($_SESSION['sys_group_id'], $distStateShow) or in_array($_SESSION['sys_group_id_parent'], $distStateShow)){ $latlng = $runningSeesionData[$r]["gps_latitude"].",".$runningSeesionData[$r]["gps_longitude"]; if( $runningSeesionData[$r]["gps_latitude"] != "0.000000000" && $runningSeesionData[$r]["gps_longitude"] != "0.000000000") { $get_latlng = $masterObj->nearestDistState($latlng); } else {$get_latlng = "";} $ArrayData = explode(",",$get_latlng); //$getDist = substr($get_latlng, strpos($get_latlng, "District:-") + 1); //$getstate = substr($get_latlng, strpos($get_latlng, ",State:-") + 1); ?>echo $ArrayData[0];?> | echo $ArrayData[1];?> | } ?> if($_SESSION['UserId']!="80932" && $_SESSION['sys_group_id_parent']!="80932") { /*if($_SESSION['ParentId']!=1) { $poi_user_id=$_SESSION['ParentId']; } else { $poi_user_id=$_SESSION['UserId']; } */ ?>