Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- session_regenerate_id();
- include('connection.php');
- if(isset($_GET['id'])){
- $get_id = $_GET['id'];
- $selected_emp = mysql_query("Select * from loglocation where id = '{$get_id}'");
- $selected_id = mysql_fetch_array($selected_emp);
- $latitude = $selected_id['latitude'];
- $longitude = $selected_id['longitude'];
- $zoom = 10;
- }
- else{
- $get_id = NULL;
- $latitude = 12.879721;
- $longitude = 121.77401699999996;
- $zoom = 6;
- }
- ?>
- <?php
- // function getaddress($lat,$lng)
- // {
- // $url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat).','.trim($lng).'&sensor=false';
- // $json = @file_get_contents($url);
- // $data=json_decode($json);
- // $status = $data->status;
- // if($status=="OK")
- // return $data->results[0]->formatted_address;
- // else
- // return false;
- // }
- ?>
- <?php
- include('connection.php');
- $selected_userLog = mysql_query("Select * from loglocation where id = '{$get_id}'");
- $selected_idLog = mysql_fetch_array($selected_userLog);
- $latLog= $selected_idLog['latitude']; //latitude
- $lngLog= $selected_idLog['longitude']; //longitude
- //$addressLog= getaddress($latLog,$lngLog);
- ?>
- <html>
- <head>
- <title>Locator</title>
- <script src="https://maps.googleapis.com/maps/api/js"></script>
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
- <link rel="stylesheet" href="css/drop.css">
- <link rel="stylesheet" href="css/drop2.css">
- <link rel="stylesheet" href="css/table.css" type="text/css"/>
- <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
- <script src="js/script.js"></script>
- <link rel="stylesheet" href="css/design.css">
- <script src="js/script1.js"></script>
- <script src="js/script2.js"></script>
- <link rel="icon" href="images/icon.ico" />
- <style>
- ::-webkit-scrollbar {
- width: 8px;
- height: 8px;
- }
- ::-webkit-scrollbar-track {
- -webkit-box-shadow: outset 0 0 5px rgba(0,154,255,0.1);
- border-radius: 15px;
- background-color:#f0f0f0;
- }
- ::-webkit-scrollbar-thumb {
- border-radius: 5px;
- -webkit-box-shadow: inset 0 0 5px rgba(0,154,255,0.1);
- background-color:#d3d1d1;
- }
- </style>
- <script>
- //start of jquery
- $("document").ready(function() {
- $(".showz").click(function() {
- var a = document.getElementById("darkWindowS");
- var b = document.getElementById("bg");
- $("#whole").fadeTo("slow",0.9);
- //b.style.visibility="visible";
- //a.style.visibility="visible";
- });
- $("#hidez").click(function() {
- $("#whole").fadeToggle();
- });
- });
- </script>
- <style>
- .showz{
- cursor:pointer;
- }
- #bg
- {
- padding:10px;
- width:1100px;
- height:570px;
- background-color:#537C7C;
- opacity:2;
- position:absolute;
- margin-left:100px;
- margin-top:-620px;
- z-index:99;
- font-family:century gothic;
- font-size:10px;
- }
- #darkWindowS
- {
- padding:10px;
- width:100%;
- height:102%;
- background-color:#000;
- opacity: 0.7;
- margin-left:-8px;
- margin-top:-64px;
- z-index:99;
- font-family:century gothic;
- font-size:10px;
- }
- #btnSave{
- height:30px;
- width:156px;
- }
- #btnAdd{
- height:30px;
- width:156px;
- }
- #btnDel{
- height:30px;
- width:156px;
- }
- #f1{
- width:50px;
- }
- #f2{
- width:50px;
- margin-top:-198px;
- margin-left:200px;
- }
- #text{
- position:absolute;
- margin-top:-560px;
- margin-left:950px;
- }
- #msgSent{
- position:absolute;
- margin-top:150px;
- }
- #wel{
- font-family:century gothic;
- font-size:20px;
- position:fixed;
- margin-left:1000px;
- margin-top:30px;
- }
- #pangalan{
- font-family:century gothic;
- font-size:20px;
- position:fixed;
- margin-top:30px;
- margin-left:1105;
- color:#000;
- }
- #txtemail{
- background-color:teal;
- }
- #tabs{
- width:1320px;
- position:fixed;
- margin-left:5px;
- margin-top:40px;
- height:550px;
- }
- #tabs-1{
- margin-left:-20px;
- width:1310px;
- }
- #tabs-2{
- margin-left:-20px;
- width:605px;
- }
- #sobra{
- overflow:scroll;
- height:440px;
- background-color:#fff;
- overflow-x:hidden;
- margin-top:10px;
- }
- #sobra2{
- overflow:scroll;
- height:440px;
- background-color:#fff;
- overflow-x:hidden;
- margin-top:10px;
- }
- li{
- font-family:century gothic;
- font-size:13px;
- }
- #header{
- position:relative;
- margin-top:-8px;
- margin-left:-8px;
- width:101.2%;
- background-color:#00a8ff;
- height:80px;
- position:fixed;
- }
- #picheader{
- width:20%;
- margin-top:-8px;
- }
- #logout{
- position:fixed;
- margin-left:1230px;
- margin-top:-10px;
- }
- #searchbox{
- height:30px;
- border-radius:3px;
- font-family:century gothic;
- font-size:15px;
- margin-left:404px;
- }
- #searchbox1{
- height:30px;
- border-radius:3px;
- font-family:century gothic;
- font-size:15px;
- margin-left:404px;
- }
- .icon {
- background:#FFFFFF url(images/search.png) no-repeat 4px 4px;
- padding:14px 14px 14px 30px;
- height:0px;
- background-position:left;
- }
- </style>
- <?php
- include('connection.php');
- $selected_emp = mysql_query("Select * from loglocation where id = '{$get_id}'");
- $selected_id = mysql_fetch_array($selected_emp);
- ?>
- <script>
- function map(lat,lon)
- {
- var myCenter=new google.maps.LatLng(lat,lon);
- var mapProp = {
- center:myCenter,
- zoom:10,
- mapTypeId:google.maps.MapTypeId.ROADMAP
- };
- var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
- var marker=new google.maps.Marker({
- position:myCenter,
- });
- marker.setMap(map);
- var infowindow = new google.maps.InfoWindow({
- content:""
- });
- infowindow.open(map,marker);
- google.maps.event.addDomListener(window, 'load', map);
- }
- $(function() {
- $( "#tabs" ).tabs({
- collapsible: true
- });
- });
- function show(){
- var a = document.getElementById("shout");
- a.style.display="block";
- var b = document.getElementById("edit");
- b.style.display="none";
- var c = document.getElementById("del");
- c.style.display="none";
- }
- function show1(){
- var a = document.getElementById("edit");
- a.style.display="block";
- var b = document.getElementById("shout");
- b.style.display="none";
- var c = document.getElementById("del");
- c.style.display="none";
- }
- function show2(){
- var a = document.getElementById("edit");
- a.style.display="none";
- var b = document.getElementById("shout");
- b.style.display="none";
- var c = document.getElementById("del");
- c.style.display="block";
- }
- </script>
- <script>
- var val;
- function send(ci){
- var regexp = /^[a-zA-Z]+$/;
- val = prompt("Enter mobile number:");
- if(val>0){
- alert("Location sent to "+val);
- window.document.location.href = "smssender.php?value="+val+"&ci="+ci;
- }
- else if(val == ""){
- alert("Empty field is not allowed!");
- }
- else if(val.match(regexp)){
- alert("INVALID INPUT!");
- }
- }
- </script>
- <script>
- function search()
- {
- var titleOrig = document.getElementById("searchbox").value;
- var title = "searchbox="+titleOrig;
- //checking the value of searchbox
- if(titleOrig.length==0)
- {
- }
- //CHECKING OF BROWSER
- if(window.XMLHttpRequest)
- {
- xmlhttp = new XMLHttpRequest();
- }
- else
- {
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- }
- if(xmlhttp)
- {
- xmlhttp.onreadystatechange = pangresponse;
- xmlhttp.open("POST","ajaxBackEnd.php",true);
- xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- xmlhttp.send(title);
- }
- function pangresponse()
- {
- if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
- {
- document.getElementById("recordtable").innerHTML = xmlhttp.responseText;
- }
- else
- {
- }
- }
- }
- </script>
- <script>
- function search1()
- {
- var titleOrig = document.getElementById("searchbox1").value;
- var title = "searchbox1="+titleOrig;
- //checking the value of searchbox
- if(titleOrig.length==0)
- {
- }
- //CHECKING OF BROWSER
- if(window.XMLHttpRequest)
- {
- xmlhttp = new XMLHttpRequest();
- }
- else
- {
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- }
- if(xmlhttp)
- {
- xmlhttp.onreadystatechange = pangresponse;
- xmlhttp.open("POST","ajaxBackEnd1.php",true);
- xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
- xmlhttp.send(title);
- }
- function pangresponse()
- {
- if(xmlhttp.readyState == 4 && xmlhttp.status == 200)
- {
- document.getElementById("recordtable1").innerHTML = xmlhttp.responseText;
- }
- else
- {
- }
- }
- }
- </script>
- </head>
- <body>
- <div id="header"><img id="picheader" src="images/header.png" /> </div>
- <label id="wel">Welcome,</label> <label id="pangalan"><?php echo $_SESSION['login'];?></label>
- </br>
- <form method="post" action="logout.php">
- <a id="logout" href="logout.php" class="demo-pricing demo-pricing-1">Logout</a>
- </form>
- <form method = "get" action = "Home.php?id=<?php echo $selected_id['id']?>&location=<?php echo $selected_id['address'];?>;">
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1">Activity LOGS</a></li>
- <li><a href="#tabs-2">Web Users</a></li>
- <li><a href="#tabs-3">Mobile Users</a></li>
- <li><a href="#tabs-4">Station/Office</a></li>
- </ul>
- <div id="tabs-1">
- <input placeholder="Search" type="text" id="searchbox" class="icon" onkeyup="search();"/>
- <br/>
- <div id="sobra">
- <table id="recordtable" class="table-fill" align="">
- <tr id="fix">
- <th style='width:110px;text-align:center;'>Name</th>
- <th style='width:110px;text-align:center;'>Address</th>
- <th style='width:110px;text-align:center;'>Contact</th>
- <th style='width:110px;text-align:center;'>Current Location</th>
- <th style='width:110px;text-align:center;'>Date</th>
- <th colspan=4 style='width:110px;text-align:center;'>Action</th>
- </tr>
- <?php
- $query = mysql_query("SELECT * FROM loglocation where help_status = 1 order by ID DESC ");
- while($fet = mysql_fetch_array($query)){
- echo
- "<tr>
- <td class='text-left' style='width:410px;text-align:center;'>{$fet['fullname']}</td>
- <td class='text-left' style='width:410px;text-align:center;'>{$fet['address']}</td>
- <td class='text-left' style='width:110px;text-align:center;'>{$fet['number']}</td>
- <td class='text-left' style='padding:5px;width:440px;text-align:center;'>{$fet['currentLocation']}</td>
- <td class='text-left' style='width:300px;text-align:center;'>{$fet['date']}</td>
- <td class='text-left' style='padding:5px;width:120px;text-align:center;'><a onclick='send({$fet['id']})' href='#'><img src='images/send.png' style='width:50%;' title='send' /></a></td>
- <td class='text-left' style='padding:5px;width:120px;text-align:center;'><a href='delete.php?id={$fet['id']}'><img src='images/delete.png' style='width:50%;' title='delete' /></a></td>
- <td class='text-left' style='padding:5px;width:120px;text-align:center;'><a onclick='map({$fet['latitude']},{$fet['longitude']})' class='showz'><img src='images/plot.png' style='width:50%;' title='view map of current location' /></a></td>
- </tr>";
- }
- ?>
- </table>
- </div>
- </div>
- <div id="tabs-2">
- <input placeholder="Search" type="text" id="searchbox1" class="icon" onkeyup="search1();"/>
- <div id="sobra2">
- <table id="recordtable1" class="table-fill" align="">
- <tr id="fix">
- <th style='width:110px;text-align:center;'>Name</th>
- <th style='width:110px;text-align:center;'>Address</th>
- <th style='width:110px;text-align:center;'>Contact number</th>
- <th style='width:110px;text-align:center;'>Date</th>
- <th style='width:110px;text-align:center;'>Time</th>
- </tr>
- <?php
- $query = mysql_query("SELECT * FROM user order by user_id DESC ");
- while($fet = mysql_fetch_array($query)){
- echo
- "<tr>
- <td class='text-left' style='width:100px;text-align:center;'>{$fet['fullname']}</td>
- <td class='text-left' style='width:110px;text-align:center;'>{$fet['address']}</td>
- <td class='text-left' style='width:110px;text-align:center;'>{$fet['number']}</td>
- <td class='text-left' style='width:110px;text-align:center;'>{$fet['date']}</td>
- <td class='text-left' style='width:110px;text-align:center;'>{$fet['time']}</td>
- </tr>";
- }
- ?>
- </table>
- </div>
- </div>
- </div>
- </form>
- </br>
- <div id="whole" style="display:none;">
- <div id="darkWindowS" >
- </div>
- <div id="bg">
- <div id='googleMap' style='margin-left:auto;opacity:1;position:absolute;width:1100px;height:571px;'></div>
- <input id="hidez" type="image" src="images/delete.png" style="z-index:4;width:5%;position:absolute; right: -22px; top:-30px;" />
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement