[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16737: {torstatus} (ticket:115) Fixing WHOIS, LICENSE, and CHANGES to work in a (in torstatus/trunk/web: . css img)



Author: kasimir
Date: 2008-09-03 12:25:15 -0400 (Wed, 03 Sep 2008)
New Revision: 16737

Added:
   torstatus/trunk/web/img/bgbad.png
Modified:
   torstatus/trunk/web/config_template.php
   torstatus/trunk/web/css/main.css
   torstatus/trunk/web/router_detail.php
Log:
(ticket:115) Fixing WHOIS, LICENSE, and CHANGES to work in any directory

Modified: torstatus/trunk/web/config_template.php
===================================================================
--- torstatus/trunk/web/config_template.php	2008-09-02 09:42:55 UTC (rev 16736)
+++ torstatus/trunk/web/config_template.php	2008-09-03 16:25:15 UTC (rev 16737)
@@ -55,7 +55,7 @@
 $UseTorDNSEL = 1;
 
 // Comment the following line if you do not provide a WHOIS service
-define("WHOISPath","/whois.php?ip=");
+define("WHOISPath","whois.php?ip=");
 // If you want to provide a bandwidth history, uncomment the following line
 //$BandwidthHistory = "true";
 
@@ -84,9 +84,9 @@
 $usePerlGraphs = 1;
 
 $footerText = "<b>
-<a class='plainbox' href='/CHANGES' target='_new'>View Complete Change History</a>
+<a class='plainbox' href='CHANGES' target='_new'>View Complete Change History</a>
 <br/>
-Source code is available under <a class='plainbox' href='/LICENSE' target='_new'>BSD license</a> at <a class='plainbox' href='http://project.torstatus.kgprog.com/' target='_new'>project.torstatus.kgprog.com</a>
+Source code is available under <a class='plainbox' href='LICENSE' target='_new'>BSD license</a> at <a class='plainbox' href='http://project.torstatus.kgprog.com/' target='_new'>project.torstatus.kgprog.com</a>
 <br/>
 The Tor<small><sup>TM</sup></small> trademark and Tor Onion Logo are trademarks of <a class='plainbox' href='https://www.torproject.org/'>The Tor Project</a>.
 </b>";

Modified: torstatus/trunk/web/css/main.css
===================================================================
--- torstatus/trunk/web/css/main.css	2008-09-02 09:42:55 UTC (rev 16736)
+++ torstatus/trunk/web/css/main.css	2008-09-03 16:25:15 UTC (rev 16737)
@@ -261,6 +261,22 @@
 	width: 40px;
 }
 
+.bad0 
+{
+	background-image: url(../img/routerdown.png); 
+	background-repeat: no-repeat; 
+	background-position: center center; 
+	width: 40px;
+}
+
+.bad1
+{
+	background-image: url(../img/bgbad.png); 
+	background-repeat: no-repeat; 
+	background-position: center center; 
+	width: 40px;
+}
+
 .TRAR 
 {
 	background-color:#ffffff; 
@@ -376,10 +392,12 @@
 span.usingTor
 {
 	color: #00dd00;
+	font-size: 1.2em;
 }
 span.notUsingTor
 {
 	color: #ff0000;
+	font-size: 1.2em;
 }
 table.notUsingTor
 {
@@ -668,6 +686,7 @@
 td.content
 {
 	padding: 10px;
+	font-size: .9em;
 }
 
 /* Search box */

Added: torstatus/trunk/web/img/bgbad.png
===================================================================
(Binary files differ)


Property changes on: torstatus/trunk/web/img/bgbad.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: torstatus/trunk/web/router_detail.php
===================================================================
--- torstatus/trunk/web/router_detail.php	2008-09-02 09:42:55 UTC (rev 16736)
+++ torstatus/trunk/web/router_detail.php	2008-09-03 16:25:15 UTC (rev 16737)
@@ -213,7 +213,7 @@
 <table class="displayTable" cellspacing="0" cellpadding="0" width='100%' align='center'>
 <tr>
 <td class='HRN' colspan='2'>Router Information</td>
-<td class='HRN' style='border-left-color: #000072; border-left-style: solid; border-left-width: 1px;'>Exit Policy Information</td>
+<td class='HRN' style='border-left-color: #000072; border-left-style: solid; border-left-width: 1px;'>Router Flags</td>
 </tr>
 <td class="TRS" colspan='2' style="vertical-align: top;">
 <table>
@@ -315,7 +315,7 @@
 	// Display Bandwidth stats
 	echo "<tr>\n";
 	echo "<td class='TRAR'><b>Bandwidth (Max/Burst/Observed - In Bps):</b></td>\n";
-	echo "<td class='TRSB'>$Bandwidth_MAX&nbsp;/&nbsp;$Bandwidth_BURST&nbsp;/&nbsp;$Bandwidth_OBSERVED</td>\n";
+	echo "<td class='TRSB'>$Bandwidth_MAX&nbsp;/&nbsp;$Bandwidth_BURST&nbsp;/&nbsp;$Bandwidth_OBSERVED (In Kbps: ".round($Bandwidth_MAX/1024,2)." / ".round($Bandwidth_BURST/1024,2)." / ".round($Bandwidth_OBSERVED/1024,2).")</td>\n";
 	echo "</tr>\n";
 
 	// Display Family info
@@ -387,25 +387,98 @@
 
 </td>
 
-<td class='TRS' style='padding: 10px; border-left-color: #59990e; border-left-style: solid; border-left-width: 1px; vertical-align: top;'><b>
+<td class='TRS' style='padding: 10px; border-left-color: #59990e; border-left-style: solid; border-left-width: 1px; vertical-align: top;'>
+<table cellspacing='0' cellpadding='0'>
 <?php
-	
 
-	for ($i=0 ; $i<count($ExitPolicy_DATA_ARRAY) ; $i++)
-	{
-		echo "$ExitPolicy_DATA_ARRAY[$i]<br/>\n";
-	}
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Running:</b></td>\n";
+	echo "<td class='F$FRunning'>";
+	echo "</td>\n";
+	echo "</tr>\n";
 
-	echo "<br/>\n";
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Valid:</b></td>\n";
+	echo "<td class='F$FValid'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Fast:</b></td>\n";
+	echo "<td class='F$FFast'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Exit:</b></td>\n";
+	echo "<td class='F$FExit'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Named:</b></td>\n";
+	echo "<td class='F$FNamed'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Stable:</b></td>\n";
+	echo "<td class='F$FStable'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Guard:</b></td>\n";
+	echo "<td class='F$FGuard'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Hibernating:</b></td>\n";
+	echo "<td class='F$FHibernating'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Bad Exit:</b></td>\n";
+	echo "<td class='bad$FBadExit'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'><td colspan='2' style='background-color: #59990E; height: 1px;'></td></tr>";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Directory (v2):</b></td>\n";
+	echo "<td class='F$FV2Dir'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>HSDir:</b></td>\n";
+	echo "<td class='F$FHSDir'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Authority:</b></td>\n";
+	echo "<td class='F$FAuthority'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
+	echo "<tr class='nr'>\n";
+	echo "<td class='TRAR'><b>Bad Directory:</b></td>\n";
+	echo "<td class='bad$FBadDirectory'>";
+	echo "</td>\n";
+	echo "</tr>\n";
+
 ?>
-</b>
+</table>
 </td>
 
-
 </tr>
 <tr>
 <td class='HRN' colspan='2'>Bandwidth</td>
-<td class='HRN' style='border-left-color: #000072; border-left-style: solid; border-left-width: 1px;'>Router Flags</td>
+<td class='HRN' style='border-left-color: #000072; border-left-style: solid; border-left-width: 1px;'>Exit Policy Information</td>
 </tr>
 <tr>
 <td class='TRS' style="text-align: center;">
@@ -459,90 +532,21 @@
 <?php } ?>
 </td>
 
-<td class='TRS' style='padding: 10px; border-left-color: #59990e; border-left-style: solid; border-left-width: 1px; vertical-align: top;'>
-<table cellspacing='0' cellpadding='0'>
+<td class='TRS' style='padding: 10px; border-left-color: #59990e; border-left-style: solid; border-left-width: 1px; vertical-align: top;'><b>
 <?php
+	
 
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Authority:</b></td>\n";
-	echo "<td class='F$FAuthority'>";
-	echo "</td>\n";
-	echo "</tr>\n";
+	for ($i=0 ; $i<count($ExitPolicy_DATA_ARRAY) ; $i++)
+	{
+		echo "$ExitPolicy_DATA_ARRAY[$i]<br/>\n";
+	}
 
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Bad Directory:</b></td>\n";
-	echo "<td class='F$FBadDirectory'>";
-	echo "</td>\n";
-	echo "</tr>\n";
+	echo "<br/>\n";
+?>
+</b>
+</td>
 
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Bad Exit:</b></td>\n";
-	echo "<td class='F$FBadExit'>";
-	echo "</td>\n";
-	echo "</tr>\n";
 
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Exit:</b></td>\n";
-	echo "<td class='F$FExit'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Fast:</b></td>\n";
-	echo "<td class='F$FFast'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Guard:</b></td>\n";
-	echo "<td class='F$FGuard'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Hibernating:</b></td>\n";
-	echo "<td class='F$FHibernating'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Named:</b></td>\n";
-	echo "<td class='F$FNamed'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Stable:</b></td>\n";
-	echo "<td class='F$FStable'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Running:</b></td>\n";
-	echo "<td class='F$FRunning'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>Valid:</b></td>\n";
-	echo "<td class='F$FValid'>";
-	echo "</td>\n";
-	echo "</tr>\n";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>V2Dir:</b></td>\n";
-	echo "<td class='F$FV2Dir'>";
-
-	echo "<tr class='nr'>\n";
-	echo "<td class='TRAR'><b>HSDir:</b></td>\n";
-	echo "<td class='F$FHSDir'>";
-
-	echo "</td>\n";
-	echo "</tr>\n";
-
-?>
-</table>
-</td>
 </tr>
 
 <tr>