From 952925ef261dc2a2b6eb91ca3c3e7b3726e384dc Mon Sep 17 00:00:00 2001 From: Erik Lindsay Date: Mon, 24 Apr 2017 10:39:03 -0400 Subject: [PATCH] mostly admin things --- Wello/www/admin.php | 119 ++++++++++++++++++++++++++++++++++++ Wello/www/cred.php | 5 ++ Wello/www/css/well-card.css | 15 +++++ Wello/www/form.php | 11 ++-- 4 files changed, 144 insertions(+), 6 deletions(-) create mode 100644 Wello/www/admin.php create mode 100644 Wello/www/cred.php diff --git a/Wello/www/admin.php b/Wello/www/admin.php new file mode 100644 index 0000000..3f227c6 --- /dev/null +++ b/Wello/www/admin.php @@ -0,0 +1,119 @@ +connect_errno) { + printf("Connect failed: %s\n", $mysqli->connect_error); + exit(); +} + +function moveWell() { + $PermitNumber = $mysqli->real_escape_string(trim($_GET['move'])); + $copyquery = "INSERT INTO well_completion_report SELECT * FROM well_pending WHERE Permit_Number = '".$PermitNumber."'"; + $mysqli->query($copyquery); + + $deletequery = "DELETE FROM well_pending WHERE Permit_Number = '".$PermitNumber."'"; + $mysqli->query($deletequery); + } + + if (isset($_GET['move'])) { + moveWell(); + } + +$query = "SELECT CONCAT(Well_Street_Number, ' ', Well_Street_Name) AS 'WellAddress', Well_Town, Permit_Number + FROM well_pending + LIMIT 10"; + +?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Pending Wells

+ query($query)) { + + /* fetch associative array */ + while ($row = $result->fetch_assoc()) { + echo' + + '; + } + + /* free result set */ + $result->free(); + } + ?> +
+ + + + + + + + + + + + + + + + diff --git a/Wello/www/cred.php b/Wello/www/cred.php new file mode 100644 index 0000000..2251198 --- /dev/null +++ b/Wello/www/cred.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/Wello/www/css/well-card.css b/Wello/www/css/well-card.css index 9687e4d..3516958 100644 --- a/Wello/www/css/well-card.css +++ b/Wello/www/css/well-card.css @@ -35,6 +35,21 @@ div.well-card .well-img{ a.search-result{ color: inherit; } +div.pending{ + position: relative; + width: 100%; + max-width: 700px; +} +div.actions{ + position: absolute; + right: -6rem; + top: 3rem; + display: flex; + flex-direction: column; + height: 5rem; + justify-content: space-between + +} @media only screen and (min-width: 65em) { diff --git a/Wello/www/form.php b/Wello/www/form.php index b8fdc50..6ab8da1 100644 --- a/Wello/www/form.php +++ b/Wello/www/form.php @@ -236,10 +236,9 @@ if ($result = $mysqli->query($query)) {
  • - - " type="number" min="1" name="registrant-number" class="long-num"> + " type="text" min="1" name="registrant-number" class="long-num">
  • @@ -278,12 +277,12 @@ if ($result = $mysqli->query($query)) {
  • - +
  • - - + +