Commit 71d6707e authored by David Morley's avatar David Morley
Browse files

finish show.php, fix spelling error, clean sql

parent 49c2ee94
......@@ -9,7 +9,7 @@
$domain = pg_escape_string($_POST['domain']);
$email = pg_escape_string($_POST['email']);
$sql = "INSERT INTO pods (domain, pindomurl, email) VALUES('$domain', '$pingdomurl', '$email')";
$sql = "INSERT INTO pods (domain, pingdomurl, email) VALUES('$domain', '$pingdomurl', '$email')";
$result = pg_query($dbh, $sql);
if (!$result) {
die("Error in SQL query: " . pg_last_error());
......@@ -5,7 +5,7 @@
die("Error in connection: " . pg_last_error());
//foreach pod check it and update db
$sql = "SELECT domain,pindomurl FROM pods";
$sql = "SELECT domain,pingdomurl FROM pods";
$result = pg_query($dbh, $sql);
if (!$result) {
die("Error in SQL query: " . pg_last_error());
<table id="myTable" class="tablesorter" width="75%">
<th width="220px">Diaspora Pod<a class="tipsy" title="A pod is a site for you to set up your account.">?</a></th>
<th>Live Status<a class="tipsy" title="Up or Down according to Pingdom">?</a></th>
<th>Last Code Pull<a class="tipsy" title="Because the alpha is updated everyday pods with old software will not work correcly with pods with new software. This is the date the p
od last updated from the main Diaspora code.">?</a></th>
<th>Uptime<a class="tipsy" title="Percent of the time the pod is online for <?php echo date("F") ?>.">?</a></th>
<th>Months<a class="tipsy" title="How many months has this pod been online? Click number for more history.">?</a></th>
<th>Response Time<a class="tipsy" title="Average response time for <?php echo date("F") ?>.">?</a></th>
<th>Ipv6<a class="tipsy" title="Does this pod look to have ipv6">?</a></th>
$dbh = pg_connect("dbname=$pgdb user=$pguser password=$pgpass");
......@@ -10,21 +25,16 @@
die("Error in SQL query: " . pg_last_error());
while ($row = pg_fetch_array($result)) {
echo "pod" . $row["domain"] . "<br />";
echo "pingdom: " . $row["pindomurl"] . "<p />";
echo "gitdate: " . $row["hgitdate"] . "<p />";
echo "<td>" . $row["domain"] . "</td>";
echo "<td>" . $row["status"] . "</td>";
echo "<td>" . $row["hgitdate"] . "</td>";
echo "<td>" . $row["uptime"] . "</td>";
echo "<td>" . $row["monthsmonitored"] . "</td>";
echo "<td>" . $row["responsetimelast7"] . "</td>";
echo "<td>" . $row["ipv6"] . "</td>";
\ No newline at end of file
\ No newline at end of file
......@@ -6,14 +6,15 @@ CREATE TABLE pods (
ip cidr,
ptr text,
email text,
guid text,
ipv6 text,
secure text,
sslvalid text,
Hgitdate text,
Hgitref text,
Hruntime text,
Hencoding text,
pindomurl text,
pingdomurl text,
pingdomlast text,
monthsmonitored int,
uptimelast7 text,
status text,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment