Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
etl12003 committed Apr 22, 2017
2 parents 3600f08 + 9bd9fd8 commit cdeab9e
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 27 deletions.
8 changes: 5 additions & 3 deletions Wello/www/details.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$mysqli = new mysqli("localhost", "db10e41481317066", "jXLUjNG/cQxm4VJ1SionhDKdcT4BT1Dos7sZMddIapa/8LYDpDNz+3hwGCz8Shon", "db10e41481317066");
<?php require 'cred.php';
$mysqli = new mysqli("localhost", $username, $password, $database);
if ( (isset($_GET['Well_ID'])) && (is_numeric($_GET['Well_ID'])) ) {
$Well_ID = $_GET['Well_ID'];
}
Expand Down Expand Up @@ -61,7 +61,9 @@

<nav class="top-nav">
<button><a href="map.php"><img alt="back" src="img/back.svg" ></a></button> <h1>Details</h1>
<button><a href="form.php"><img alt="edit" src="img/edit.svg" ></a></button>
<?php
echo'<button><a href="form.php?Well_ID='.$Well_ID.'"><img alt="edit" src="img/edit.svg" ></a></button>';
?>
</nav>
<main class="details">

Expand Down
24 changes: 22 additions & 2 deletions Wello/www/form.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
<?php

<?php
require 'cred.php';
$mysqli = new mysqli("localhost", $username, $password, $database);
if ( (isset($_GET['Well_ID'])) && (is_numeric($_GET['Well_ID'])) ) {
$Well_ID = $_GET['Well_ID'];
}
else if ( (isset($_POST['Well_ID'])) && (is_numeric($_POST['Well_ID'])) ) {
$Well_ID = $_POST['Well_ID'];
}
else {
$Well_ID = "0";
}

$query = "SELECT Date_Well_Completed, Date_of_Report, Registration_Number, State_Well_No, Other_No,
CONCAT(Owner_First_Name, ' ', Owner_Last_Name) AS 'Owner_Name',
CONCAT(Well_Street_Number, ' ', Well_Street_Name) AS 'WellAddress', Well_Town, Well_Latitude, Well_Longitude,
Drilling_Equipment, Depth_To_Top_Of_Gravel_Pack, Depth_To_Bottom_Of_Gravel_Pack
FROM well_completion_report
WHERE Permit_Number = $Well_ID";
if ($result = $mysqli->query($query)) {
$row = $result->fetch_assoc();
}
?>
<!doctype html>
<html class="no-js" lang="">
Expand Down
13 changes: 0 additions & 13 deletions Wello/www/js/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
function initMap() {
var location = {lat: 41.812013, lng: -72.249019};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 16,
center: location
});
var marker = new google.maps.Marker({
position: location,
map: map
});
}


$('select').change(function() {

if ($(this).val() == "Other"){
Expand Down
10 changes: 2 additions & 8 deletions Wello/www/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<nav class="top-nav">
<div class="main-bttns">
<button onclick="document.getElementById('menu').classList.toggle('closed'); document.getElementById('close-menu').classList.toggle('closed')"><img src="img/menu.svg" alt="menu" /></button> <h1>Well Report App</h1>
<a href="search.html"><button><img src="img/search.svg" alt="menu" /></button></a>
<a href="search.php"><button><img src="img/search.svg" alt="menu" /></button></a>
</div>

<div class="close-menu closed" id="close-menu" onclick="document.getElementById('menu').classList.toggle('closed'); document.getElementById('close-menu').classList.toggle('closed')"></div>
Expand Down Expand Up @@ -65,7 +65,7 @@
<div>
<h2>Well Name</h2>
<p>short well description</p>
<a href="details.html">DETAILS</a>
<a href="details.php">DETAILS</a>
</div>
</div>

Expand All @@ -88,19 +88,13 @@
<button class="add-well"><a href="form.php"> <img src="img/add.svg" alt="add well" /></a></button>
</nav>






<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')
</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>


<script>

function initMap() {
Expand Down
2 changes: 1 addition & 1 deletion Wello/www/multiplemarkers.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function savePosition(position){
// once you get the geolocation: we proceed to getting a list of elements from my mysql database which we will use to find the array of location
</script>
var currentlocation = getLoaction();
var currentlocation = getLocation();
<!-- this is where the current location will be stored-->
<script>
Expand Down
5 changes: 5 additions & 0 deletions cred.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$username="db10e41481317066";
$password="jXLUjNG/cQxm4VJ1SionhDKdcT4BT1Dos7sZMddIapa/8LYDpDNz+3hwGCz8Shon";
$database="db10e41481317066";
?>

0 comments on commit cdeab9e

Please sign in to comment.