MMCT TEAM
Server IP : 2a02:4780:3:1493:0:3736:a38e:7  /  Your IP : 216.73.216.139
Web Server : LiteSpeed
System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/src/../conver2pdf/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/src/../conver2pdf/../SchoolGPS_PHP.php
//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';
   }
}
?>

MMCT - 2023