Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
some fix?
  • Loading branch information
etl12003 committed Apr 26, 2017
1 parent c50235c commit 25b653a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 41 deletions.
76 changes: 36 additions & 40 deletions Wello/www/form.php
Expand Up @@ -108,7 +108,6 @@ if($_SERVER['REQUEST_METHOD']=='POST') {
}

if ($_GET['Admin'] == 1) {
// echo'<script>alert("hi");</script>';
$query = "SELECT
Date_Well_Completed,
Date_of_Report,
Expand Down Expand Up @@ -201,9 +200,6 @@ else {
$Admin = 0;
}


echo'<script>alert("' .$query. '");</script>';

if ($result = $mysqli->query($query)) {
$row = $result->fetch_assoc();
foreach ($row as &$value) {
Expand Down Expand Up @@ -248,42 +244,42 @@ if ($result = $mysqli->query($query)) {
<div class="group">
<ul class="inputs" id="report-metadata">
<li>
<label for="well-completion-date">Date well completed</label>
<label for="well-completion-date">Date Well Completed</label>
<?php
$W_Completion_Date = date("m/d/Y", strtotime($row['Date_Well_Completed']));
echo'<input name="well-completion-date" value="'.$W_Completion_Date.'" readonly>';
?>
</li>

<li>
<label for="report-completion-date">Date of report</label>
<label for="report-completion-date">Date of Report</label>
<?php
$R_Completion_Date = date("m/d/Y", strtotime($row['Date_of_Report']));
echo'<input name="report-completion-date" value="'.$W_Completion_Date.'" readonly>';
?>
</li>

<li>
<label for="permit-number">Permit number</label>
<label for="permit-number">Permit Number</label>
<?php
echo'<input type="number" min="1" name="permit-number" class="long-num" value="'.$Well_ID.'" readonly>';
?>
</li>

<li>
<label for="registrant-number">Registrant number</label>
<label for="registrant-number">Registrant Number</label>
<input value="<?php
echo $row['Registration_Number'];?>
" type="text" min="1" name="registrant-number" class="long-num">
</li>

<li>
<label for="state-well-number">State well number</label>
<label for="state-well-number">State Well Number</label>
<input value="<?php echo $row['State_Well_No'];?>" type="number" min="1" name="state-well-number" class="long-num">
</li>

<li>
<label for="other-number">Other number</label>
<label for="other-number">Other Number</label>
<input value="<?php echo $row['Other_No'];?>" type="number" min="1" name="other-number" class="long-num">
</li>
</ul>
Expand Down Expand Up @@ -327,20 +323,20 @@ if ($result = $mysqli->query($query)) {
</li>

<li>
<label for="zip-code">Zip code</label>
<label for="zip-code">Zip Code</label>
<input value="" type="number" min="1" name="zip-code" class="med-num">
</li>

<li>
<label for="lot-number">Lot number</label>
<label for="lot-number">Lot Number</label>
<input value="<?php
//Should add ternary operator for nulls and blanks
echo $row['Well_Lot_Number'];
?>" type="number" min="1" name="lot-number" class="med-num" step="any">
</li>

<li name="get-gps-local">
<label for="gps-coordinates">GPS coordinates
<label for="gps-coordinates">GPS Coordinates
<img onclick="getLocation()" alt="get location" src="img/gps-black.svg">
</label>
<p name="demo"></p>
Expand Down Expand Up @@ -439,15 +435,15 @@ if ($result = $mysqli->query($query)) {
</li>

<li>
<label for="drive-shoe">Drive shoe</label>
<input <?php if ($row['Drive_Shoe'] == '1'){echo 'checked="checked"';} ?> value="" type="radio" name="drive-shoe" value="1"> yes
<input <?php if ($row['Drive_Shoe'] == '0'){echo 'checked="checked"';} ?> value="" type="radio" name="drive-shoe" value="0"> no
<label for="drive-shoe">Drive Shoe?</label>
<input <?php if ($row['Drive_Shoe'] == '1'){echo 'checked="checked"';} ?> value="" type="radio" name="drive-shoe" value="1"> Yes
<input <?php if ($row['Drive_Shoe'] == '0'){echo 'checked="checked"';} ?> value="" type="radio" name="drive-shoe" value="0"> No
</li>

<li>
<label for="casing-grouting">Was casing grouted</label>
<input <?php if ($row['Grouted'] == '1'){echo 'checked="checked"';} ?> type="radio" name="casing-grouting" value="1"> yes
<input <?php if ($row['Grouted'] == '0'){echo 'checked="checked"';} ?> type="radio" name="casing-grouting" value="0"> no
<label for="casing-grouting">Was Casing Grouted?</label>
<input <?php if ($row['Grouted'] == '1'){echo 'checked="checked"';} ?> type="radio" name="casing-grouting" value="1"> Yes
<input <?php if ($row['Grouted'] == '0'){echo 'checked="checked"';} ?> type="radio" name="casing-grouting" value="0"> No
</li>
</ul>
</div>
Expand All @@ -463,12 +459,12 @@ if ($result = $mysqli->query($query)) {
</select>
</li>
<li>
<label for="yield-hours">Test duration</label>
<label for="yield-hours">Test Duration</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Yield_Test_Hours'];
?>" type="number" min="1" name="yield-hours" step="any"> hours
?>" type="number" min="1" name="yield-hours" step="any"> Hours
</li>

<li>
Expand All @@ -477,11 +473,11 @@ if ($result = $mysqli->query($query)) {
//Should add ternary operator for nulls and blanks

echo $row['Yield_GPM'];
?>" type="number" min="1" name="yield-gpm" step="any"> gallons per minute
?>" type="number" min="1" name="yield-gpm" step="any"> Gallons Per Minute
</li>

<li>
<label for="yield-test-notes">Yield test notes</label>
<label for="yield-test-notes">Yield Test Notes</label>
<textarea value="<?php
//Should add ternary operator for nulls and blanks

Expand All @@ -495,30 +491,30 @@ if ($result = $mysqli->query($query)) {
<h2>Water Level</h2>
<ul class="inputs" name="yield-test">
<li>
<label for="water-from-surface">From land surface</label>
<label for="water-from-surface">From Land Surface</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Static_Water_Level_Feet'];
?>" type="number" min="1" name="water-from-surface" step="any"> feet
?>" type="number" min="1" name="water-from-surface" step="any"> Feet
</li>

<li>
<label for="water-level-during-yield-test">During yield test</label>
<label for="water-level-during-yield-test">During Yield Test</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Yield_Test_Water_Level_Feet'];
?>" type="number" min="1" name="water-level-during-yield-test" step="any"> feet
?>" type="number" min="1" name="water-level-during-yield-test" step="any"> Feet
</li>

<li>
<label for="depth-of-well">Depth of complete well</label>
<label for="depth-of-well">Depth of Complete Well</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Well_Depth_Feet'];
?>" type="number" min="1" name="depth-of-well" step="any"> feet
?>" type="number" min="1" name="depth-of-well" step="any"> Feet
</li>

</ul>
Expand All @@ -536,16 +532,16 @@ if ($result = $mysqli->query($query)) {
</li>

<li>
<label for="length-open-to-aquifier">Length open to aquifier</label>
<label for="length-open-to-aquifier">Length Open to Aquifier</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Open_Screen_Length_Feet'];
?>" type="number" min="1" name="length-open-to-aquifier" step="any"> feet
?>" type="number" min="1" name="length-open-to-aquifier" step="any"> Feet
</li>

<li>
<label for="slot-size">Slot size</label>
<label for="slot-size">Slot Size</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

Expand All @@ -559,7 +555,7 @@ if ($result = $mysqli->query($query)) {
//Should add ternary operator for nulls and blanks

echo $row['Screen_Diameter_Inches'];
?>" type="number" min="1" name="screen-diameter" step="any"> inches
?>" type="number" min="1" name="screen-diameter" step="any"> Inches
</li>

<li>
Expand All @@ -569,34 +565,34 @@ if ($result = $mysqli->query($query)) {
</li>

<li>
<label for="diameter-including-gravel-pack">Diameter including gravel pack</label>
<label for="diameter-including-gravel-pack">Diameter (Including Gravel Pack)</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Well_Diameter_Inches'];
?>" type="number" min="1" name="diameter-including-gravel-pack" step="any"> inches
?>" type="number" min="1" name="diameter-including-gravel-pack" step="any"> Inches
</li>

<li>
<label for="gravel-size">Gravel size</label>
<label for="gravel-size">Gravel Size</label>
<input value="<?php
//Should add ternary operator for nulls and blanks

echo $row['Gravel_Size_Inches'];
?>" type="number" min="1" name="gravel-size" step="any"> inches
?>" type="number" min="1" name="gravel-size" step="any"> Inches
</li>

<li>
<label for="gravel-pack-location">Gravel pack location</label>
<label for="gravel-pack-location">Gravel Pack Location</label>
<input value="<?php
//Should add ternary operator for nulls and blanks
echo $row['Depth_To_Top_Of_Gravel_Pack'];
?>" type="number" min="1" name="gravel-pack-location-from" step="any"> feet
?>" type="number" min="1" name="gravel-pack-location-from" step="any"> Feet
<br>to<br>
<input value="<?php
//Should add ternary operator for nulls and blanks
echo $row['Depth_To_Bottom_Of_Gravel_Pack'];
?>" type="number" min="1" name="gravel-pack-location-to" step="any"> feet
?>" type="number" min="1" name="gravel-pack-location-to" step="any"> Feet
</li>

</ul>
Expand Down
File renamed without changes
7 changes: 6 additions & 1 deletion Wello/www/map.php
Expand Up @@ -68,7 +68,12 @@
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: new google.maps.LatLng(41.31412, -72.23311),
zoom: 16
zoom: 16,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
position: google.maps.ControlPosition.RIGHT_CENTER
}
});
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
Expand Down

0 comments on commit 25b653a

Please sign in to comment.