Commit 7f6fb603 authored by dmorley's avatar dmorley

switch from -20/+20 to a 100 pt scale like a normal human

parent ce6eab6d
......@@ -5,7 +5,7 @@ $tt=0;
if (!$dbh) {
die("Error in connection: " . pg_last_error());
}
$sql = "SELECT * FROM pods WHERE hidden <> 'no' AND score < -15 ORDER BY weightedscore";
$sql = "SELECT * FROM pods WHERE hidden <> 'no' AND score < 50 ORDER BY weightedscore";
$result = pg_query($dbh, $sql);
if (!$result) {
die("Error in SQL query: " . pg_last_error());
......@@ -41,7 +41,7 @@ Show as: <a href="?mapview=true">Map</a> | <a href="/">Simple Table</a> | <a hre
<th>Comments<a class="tipsy" title="Number of total comments on this pod.">?</a></th>
<th>Months<a class="tipsy" title="How many months has this pod been online? Click number for more history.">?</a></th>
<th>Rating<a class="tipsy" title="User and Admin rating for this pod.">?</a></th>
<th>Score<a class="tipsy" title="System Score on a -20 to +20 scale">?</a></th>
<th>Score<a class="tipsy" title="System Score on a 100 scale">?</a></th>
<th>Country<a class="tipsy" title="Pod location, based on IP Geolocation">?</a></th>
<th>Delete?<a class="tipsy" title="Delete this pod from DB?">?</a></th>
</tr>
......
......@@ -162,18 +162,6 @@ while ($row = pg_fetch_all($result)) {
}
$signup = $registrations_open;
if ($debug) {echo "<br>Signup Open: ".$signup."<br>";}
if ($score > 5) {
$hidden = "no";
} else {
$hidden = "yes";
}
if ($debug) {echo "Hidden: ".$hidden."<br>";}
// lets cap the scores or you can go too high or too low to never be effected by them
if ($score > 20) {
$score = 20;
} elseif ($score < -20) {
$score = -20;
}
$ip6 = escapeshellcmd('dig +nocmd '.$domain.' aaaa +noall +short');
$ip = escapeshellcmd('dig +nocmd '.$domain.' a +noall +short');
$ip6num = exec($ip6);
......@@ -281,6 +269,18 @@ while ($row = pg_fetch_all($result)) {
}
}
if ($softwarename == "diaspora") {$masterversion = $dmasterversion;} elseif ($softwarename == "friendica") {$masterversion = $fmasterversion;}
if ($score > 20) {
$hidden = "no";
} else {
$hidden = "yes";
}
if ($debug) {echo "Hidden: ".$hidden."<br>";}
// lets cap the scores or you can go too high or too low to never be effected by them
if ($score > 100) {
$score = 100;
} elseif ($score < 0) {
$score = 0;
}
$weightedscore = ($uptime + $score + ($active_users_monthly/19999) - ((10 - $weight) *.12));
//sql it
......@@ -295,7 +295,7 @@ while ($row = pg_fetch_all($result)) {
if (!$result) {
die("Error in SQL query3: " . pg_last_error());
}
if ($debug) {echo "<br>Score out of 20: ".$score."<br>";}
if ($debug) {echo "<br>Score out of 100: ".$score."<br>";}
if (!$debug) {echo "Success";}
//end foreach
}
......
......@@ -54,7 +54,7 @@ $tip="This pod does not offer SSL";
$verdiff = str_replace(".", "", $row["masterversion"]) - str_replace('.', '', $row["shortversion"]);
$pod_name = htmlentities($row["name"], ENT_QUOTES);
$tip.="\n This {$row["softwarename"]} pod {$pod_name} has been watched for {$row["monthsmonitored"]} months and with an uptime of {$row["uptimelast7"]}% this month and was last checked on {$row["dateupdated"]}. ";
$tip.="On a scale of -20 to +20 this pod is a {$row["score"]} right now";
$tip.="On a scale of 100 this pod is a {$row["score"]} right now";
echo "<tr><td><a class='$class' target='new' href='". $method . $row["domain"] ."'>" . $row["domain"] . "</a> <div title='$tip' class='tipsy morehover'> ?</div></td>";
"</div></td>";
......
......@@ -47,7 +47,7 @@ Show as: <a href="?mapview=true">Map</a> | <a href="/">Simple Table</a> | <a hre
<th>Comments<a class="tipsy" title="Number of total comments on this pod.">?</a></th>
<th>Months<a class="tipsy" title="How many months has this pod been online? Click number for more history.">?</a></th>
<th>Rating<a class="tipsy" title="User and Admin rating for this pod.">?</a></th>
<th>Score<a class="tipsy" title="System Score on a -20 to +20 scale">?</a></th>
<th>Score<a class="tipsy" title="System Score on a 100 point scale">?</a></th>
<th>Country<a class="tipsy" title="Pod location, based on IP Geolocation">?</a></th>
<th>Services<a class="tipsy" title="External Social Networks this pod can post to">?</a></th>
</tr>
......@@ -68,7 +68,7 @@ else {
$verdiff = str_replace(".", "", $row["masterversion"]) - str_replace('.', '', $row["shortversion"]);
$pod_name = htmlentities($row["name"], ENT_QUOTES);
$tip.="\n This {$row["softwarename"]} pod {$pod_name} has been watched for {$row["monthsmonitored"]} months with an uptime of {$row["uptimelast7"]}% this month and a response time average today of {$row["responsetimelast7"]}ms was last checked on {$row["dateupdated"]}. ";
$tip.="On a scale of -20 to +20 this pod is a {$row["score"]} right now";
$tip.="On a scale of 100 this pod is a {$row["score"]} right now";
echo "<tr><td><a class='$class' target='new' href='". $method . $row["domain"] ."'>" . $row["domain"] . " <div title='$tip' class='tipsy' style='display: inline-block'>?</div></a></td>";
"</div></td>";
......@@ -107,7 +107,7 @@ echo "✪";
}
echo "</div></a></td>";
echo "<td>" . $row["score"] . "</td>\n";
echo "<td>" . $row["score"] . "/100</td>\n";
echo "<td>" . $row["country"] . "</td>\n";
echo "<td class='' title=''>";
if ($row["service_facebook"] == "t") {echo "<div id='facebook' class='smlogo'></div>";}
......
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