Skip to content

Commit

Permalink
added maps
Browse files Browse the repository at this point in the history
  • Loading branch information
bindumareedu committed Apr 23, 2019
2 parents 1c9a327 + dd50d5c commit d987d60
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 222 deletions.
2 changes: 1 addition & 1 deletion backend/lookup.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
require('connect.php');

$data = $_GET['searchbox'];
$data = $_GET['search'];

$query="SELECT * FROM imagestore WHERE (photographer_id like '%".$data."%') or (category like '%".$data."%') or (tags like '%".$data."%')";
$result = pg_query($connection, $query) or die('Query failed: ' . pg_last_error());
Expand Down
28 changes: 28 additions & 0 deletions backend/profile-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,34 @@
}
}

// if(!empty($address)){
// //Formatted address
// $formattedAddr = str_replace(' ','+',$address);
// //Send request and receive json data by address
// $geocodeFromAddr = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address='.$formattedAddr.'&sensor=false');
// $output = json_decode($geocodeFromAddr);
// //Get latitude and longitute from json data
// $data['latitude'] = $output->results[0]->geometry->location->lat;
// $data['longitude'] = $output->results[0]->geometry->location->lng;
// //Return latitude and longitude of the given address
// if(!empty($data)){
// $lat= $data['latitude'] ;
// $lng= $data['longitude'];
// }else{
// return false;
// }
// }else{
// echo "Error";
// }
// echo "$lat";
// // $query3="UPDATE public.users_info SET latitude='$lat',longitude='$lng' WHERE email = '$photographer'";
// // $result3 = pg_query($connection, $query3) or die('Query failed: ' . pg_last_error());
// // if(!$result3){
// // echo 'failed';
// // }



pg_close($connection);
// echo 'success';
}
Expand Down
2 changes: 1 addition & 1 deletion dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<!-- ============================================================== -->
<div class="row page-titles">
<div class="col-md-5 align-self-center">
<h3 class="text-themecolor">Dashboard</h3>
<!-- <h3 class="text-themecolor">Dashboard</h3> -->
</div>
</div>
<?php
Expand Down
2 changes: 1 addition & 1 deletion portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
echo '<a id="active" href="portfolio.php?id=' .$id. '">About</a>' ;
echo '<a id="side" href="gallery.php?id=' .$id. '">Gallery</a>' ;
echo '<a id="side" href="skills.php?id=' .$id . '">Skills</a>' ;
echo '<a id="side" href="portfoliocontact.php?id=' .$id . '">Contact Me</a>';
echo '<a id="side" href="portfoliocontact.php?id='.$id .'">Contact Me</a>';
?>
</div>
<div class="main">
Expand Down
Loading

0 comments on commit d987d60

Please sign in to comment.