Commit a37e9469 authored by David Morley's avatar David Morley

default to 0 now

parent 96f5e671
......@@ -9,7 +9,7 @@
}
//foreach pod check it and update db
if ($_GET['domain']) {$domain=$_GET['domain'];$sql = "SELECT domain,pingdomurl,score FROM pods WHERE domain = '$domain'";$sleep="0";}
else {$sql = "SELECT domain,pingdomurl,score FROM pods";$sleep="1";}
else {$sql = "SELECT domain,pingdomurl,score FROM pods";$sleep="19";}
$result = pg_query($dbh, $sql);
if (!$result) {
......@@ -46,9 +46,9 @@ echo $domain."\n";
echo $userrating."\n";
echo $adminrating."\n";
if (!$userrating) {$userrating=8;}
if (!$userrating) {$userrating=0;}
if ($userrating > 10) {$userrating=10;}
if (!$adminrating) {$adminrating=8;}
if (!$adminrating) {$adminrating=0;}
if ($adminrating > 10) {$adminrating=10;}
pg_free_result($ratings);
echo $userrating."\n";
......
......@@ -39,6 +39,7 @@ if ($row["secure"] == "true") {$method = "https://";$class="green";$tip="This po
echo "<td><div title='Last Check ".$row["dateupdated"]."' class='tipsy'><a target='new' href='".$row["pingdomurl"]."'>" . $row["monthsmonitored"] . "</a></div></td>";
if ($row["userrating"] >6) {$userratingclass="green";} elseif ($row["userrating"] <7) {$userratingclass="yellow";} elseif ($row["userrating"] <3) {$userratingclass="red";}
echo "<td><a rel=\"facebox\" href=\"rate.php?domain=".$row["domain"]."\"><div class='tipsy rating ".$userratingclass."' title='User rating is ".$row["userrating"]."'>";
if ($row["userrating"]) {echo "no rating yet";}
for ($i = 0; $i < $row["userrating"]; $i++) {
echo "✪";
}
......
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