Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
150 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?php | ||
require 'cred.php'; | ||
$mysqli = new mysqli("localhost", $username, $password, $database); | ||
|
||
/* check connection */ | ||
if ($mysqli->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"; | ||
|
||
?> | ||
|
||
<!doctype html> | ||
<html class="no-js" lang=""> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title></title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="apple-touch-icon" href="apple-touch-icon.png"> | ||
<!-- Place favicon.ico in the root directory --> | ||
<link rel="stylesheet" href="css/normalize.css"> | ||
<link rel="stylesheet" href="css/main.css"> | ||
<link rel="stylesheet" href="css/well-card.css"> | ||
<link rel="stylesheet" href="css/map-desktop.css"> | ||
<link rel="stylesheet" href="css/desktop.css"> | ||
|
||
<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 --> | ||
|
||
<main class="list admin"> | ||
<h1 class="title">Pending Wells</h1> | ||
<?php | ||
if ($result = $mysqli->query($query)) { | ||
|
||
/* fetch associative array */ | ||
while ($row = $result->fetch_assoc()) { | ||
echo' | ||
<div class="pending"> | ||
<a href="details.php?Well_ID='.$row["Permit_Number"].'"> | ||
<div class="well-card clearfix"> | ||
<div class="well-img"></div> | ||
<div> | ||
<h2>'.$row["WellAddress"].'</h2> | ||
<h2>'.$row["Well_Town"].'</h2> | ||
<p>Permit Number: '.$row["Permit_Number"].'</p> | ||
</div> | ||
</div> | ||
</a> | ||
<div class="actions"> | ||
<a href="http://wellreportapp.uconn.edu/admin.php?move='.$row["Permit_Number"].'">Approve</a> | ||
<a href="http://wellreportapp.uconn.edu/form.php?Well_ID='.$row["Permit_Number"].'">Edit</a> | ||
</div> | ||
</div> | ||
'; | ||
} | ||
|
||
/* free result set */ | ||
$result->free(); | ||
} | ||
?> | ||
</main> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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> | ||
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> | ||
<script> | ||
(function (b, o, i, l, e, r) { | ||
b.GoogleAnalyticsObject = l; | ||
b[l] || (b[l] = function () { | ||
(b[l].q = b[l].q || []).push(arguments) | ||
}); | ||
b[l].l = +new Date; | ||
e = o.createElement(i); | ||
r = o.getElementsByTagName(i)[0]; | ||
e.src = 'https://www.google-analytics.com/analytics.js'; | ||
r.parentNode.insertBefore(e, r) | ||
}(window, document, 'script', 'ga')); | ||
ga('create', 'UA-XXXXX-X', 'auto'); | ||
ga('send', 'pageview'); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$username="db10e41481317066"; | ||
$password="jXLUjNG/cQxm4VJ1SionhDKdcT4BT1Dos7sZMddIapa/8LYDpDNz+3hwGCz8Shon"; | ||
$database="db10e41481317066"; | ||
?> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.