Commit 0a7d3a0a authored by David Morley's avatar David Morley

i dont know

parent 802c51aa
......@@ -30,15 +30,17 @@
}
$numratings = pg_num_rows($ratings);
while($myrow = pg_fetch_assoc($ratings)) {
if ($myrow['admin'] =0) {
if ($myrow['admin'] == 0) {
$userratingavg[] = $myrow['rating'];$userrate++;
} elseif ($myrow['admin'] =1) {
} elseif ($myrow['admin'] == 1) {
$adminratingavg[] = $myrow['rating'];$adminrate++;
}
}
$userrating = array_sum($userratingavg) / $userrate;
$adminrating = array_sum($adminratingavg) / $adminrate;
echo $userrating;
if (!$userrating) {$userrating=8;}
echo $userrating;
if ($userrating > 10) {$userrating=10;}
if (!$adminrating) {$adminrating=8;}
if ($adminrating > 10) {$adminrating=10;}
......@@ -192,7 +194,7 @@ elseif (strpos($pingdom,"class=\"down\"")) { $live="down"; }
elseif (strpos($pingdom,"class=\"paused\"")) { $live="paused";}
else {$live="error";}
echo $userrating;
//sql it
$timenow = date('Y-m-d H:i:s');
$sql = "UPDATE pods SET Hgitdate='$gitdate', Hencoding='$encoding', secure='$secure', hidden='$hidden', Hruntime='$runtime', Hgitref='$gitrev', ip='$ipnum', ipv6='$ipv6', monthsmonitored='$months', uptimelast7='$uptime', status='$live', dateLaststats='$pingdomdate', dateUpdated='$timenow', responsetimelast7='$responsetime', score='$score', adminrating='$adminrating', userrating='$userrating' WHERE domain='$domain'";
......
......@@ -103,6 +103,7 @@ This site is a service of <a href="https://diasp.org">Diasp.org Pod</a><br>
<div id="add">
Pod Host? <u style="cursor: pointer; cursor: hand;">Click here</u> to manage your listing.<br>
Our source is on <a href="https://github.com/diasporg/Poduptime">GitHub</a><br><br>
Some pods are <a href="http://podupti.me/?hidden=true">Hidden</a> That have too many issues.<br><br>
</div>
<div id="howto" style="display:none; margin-left:50px">
<br>
......
......@@ -38,7 +38,7 @@ if ($row["secure"] == "true") {$method = "https://";$class="green";$tip="This po
echo "<td>" . $row["uptimelast7"] . "</td>";
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["adminrating"]."'>";
echo "<td><a rel=\"facebox\" href=\"rate.php?domain=".$row["domain"]."\"><div class='tipsy rating ".$userratingclass."' title='User rating is ".$row["userrating"]."'>";
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