Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added more variables.
  • Loading branch information
MFox committed Mar 29, 2017
1 parent e5a55f7 commit 70fe3b6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
53 changes: 39 additions & 14 deletions html-ONLY-site/details-content.php
Expand Up @@ -28,8 +28,11 @@
</li>

<li>
<h3>Registrant number</h3>
<p id="registrant-number" class="long-num">STILLTODO</p>
<h3>Registration number</h3>
<?php
//Should add ternary operator for nulls and blanks
echo'<p id="registrant-number" class="long-num">'.$row['Registration_Number'].'</p>';
?>
</li>

<li>
Expand All @@ -53,7 +56,10 @@
<h2>Owner Info</h2>
<ul class="inputs" id="owner-info">
<li><h3>Name</h3>
<p id="name">STILLTODO</p>
<?php
//Should add ternary operator for nulls and blanks
echo'<p id="name">'.$row['Owner_Name'].'</p>';
?>
</li>

<li>
Expand Down Expand Up @@ -104,10 +110,20 @@

<li id="get-gps-local">
<h3>GPS coordinates </h3>
<h4>Latitude</h4>
<p id="gps-coordinates-latitude">STILLTODO</p>
<h4 for="gps-coordinates">Latitude</h4>
<?php
//Should add ternary operator for nulls and blanks
//Rounding the latitude to 6 decimal places for neatness
$RoundLat = round($row['Well_Latitude'], 6);
echo'<p id="gps-coordinates-latitude">'.$RoundLat.'</p>';
?>
<h4 for="gps-coordinates">Longitude</h4>
<p id="gps-coordinates-longitude">STILLTODO</p>
<?php
//Should add ternary operator for nulls and blanks
//Rounding the longitude to 6 decimal places for neatness
$RoundLong = round($row['Well_Longitude'], 6);
echo'<p id="gps-coordinates-longitude">'.$RoundLong.'</p>';
?>

</li>

Expand All @@ -123,7 +139,10 @@

<li>
<h3>Drilling equipment</h3>
<p id="other-equipment">STILLTODO</p>
<?php
//Should add ternary operator for nulls and blanks
echo'<p id="other-equipment">'.$row['Drilling_Equipment'].'</p>';
?>
</li>

</ul>
Expand Down Expand Up @@ -216,17 +235,17 @@

<li>
<h3>Length open to aquifier</h3>
<p id="length-open-to-aquifier">STILLTODO</p>
<p id="length-open-to-aquifier">STILLTODO</p>
</li>

<li>
<h3>Slot size</h3>
<p id="slot-size">STILLTODO</p>
<p id="slot-size">STILLTODO</p>
</li>

<li>
<h3>Diameter</h3>
<p id="diameter">STILLTODO</p>
<p id="diameter">STILLTODO</p>
</li>

<li>
Expand All @@ -236,19 +255,25 @@

<li>
<h3>Diameter including gravel pack</h3>
<p id="diameter-including-gravel-pack">STILLTODO</p>
<p id="diameter-including-gravel-pack">STILLTODO</p>
</li>

<li>
<h3>Gravel size</h3>
<p id="gravel-size">STILLTODO</p>
<p id="gravel-size">STILLTODO</p>
</li>

<li>
<h3>Gravel pack location</h3>
<p id="gravel-pack-location-from">STILLTODO</p>
<?php
//Should add ternary operator for nulls and blanks
echo'<p id="gravel-pack-location-from">'.$row['Depth_To_Top_Of_Gravel_Pack'].'</p>';
?>
to
<p id="gravel-pack-location-to">STILLTODO</p>
<?php
//Should add ternary operator for nulls and blanks
echo'<p id="gravel-pack-location-to">'.$row['Depth_To_Bottom_Of_Gravel_Pack'].'</p>';
?>
</li>

</ul>
Expand Down
15 changes: 4 additions & 11 deletions html-ONLY-site/details.php
Expand Up @@ -10,7 +10,10 @@ else {
$Well_ID = "0";
}

$query = "SELECT Date_Well_Completed, Date_of_Report, State_Well_No, Other_No, CONCAT(Well_Street_Number, ' ', Well_Street_Name) AS 'WellAddress', Well_Town
$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)) {
Expand All @@ -34,22 +37,12 @@ if ($result = $mysqli->query($query)) {
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>






<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->






<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>
Expand Down
2 changes: 1 addition & 1 deletion html-ONLY-site/map.php
Expand Up @@ -91,7 +91,7 @@

<nav class="fabs">
<button class="gps"><img src="img/gps.svg" alt="get location" /></button>
<button class="add-well"><a href="form.html"> <img src="img/add.svg" alt="add well" /></a></button>
<button class="add-well"><a href="form.php"> <img src="img/add.svg" alt="add well" /></a></button>
</nav>


Expand Down

0 comments on commit 70fe3b6

Please sign in to comment.