MOD: Easy Server Stats

 
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
webzn
-


Joined: 01 Apr 2003
Posts: 27
Location: Canada

PostPosted: Thu Aug 12, 2004 4:33 pm    Post subject: MOD: Easy Server Stats Reply with quote

This latest mod is again more of a cosmetic thing than anything but it implements my last two mods and some more great features. If only we could use PHP *hint hint*

The following mod will create a table of general statistics right on the front page so there is no need for clicking. Please back up all modified files before beginning.

OPEN Chl/Home.chl

FIND
Code:
<TR>
<TD>  </TD>
<TD>  </TD>
<TD>  </TD>
</TR>


REPLACE WITH
Code:


<TR>
<TD height=10>  </TD>
<TD>  </TD>
<TD>  </TD>
</TR>
<TR>
<TD align=center bgcolor="#003366"><b><font color=white>Server Status</font></b>  </TD>
<TD align=center bgcolor="#003366"><b><font color=white>Access Stats</font></b>  </TD>
<TD align=center bgcolor="#003366"><b><font color=white>Server Variables</font></b>  </TD>
</TR>

<TD bgcolor="#f0f0f0" valign=top align=center><br><br><b>Current Server Status</b>:<Br><BR>

            <script>
            var statust = "^@status^";
            if(statust == "Stopped") { document.write("<font color=red><b>Stopped</b></font>"); }
            if(statust == "Running") { document.write("<font color=green><b>Running</b></font>"); }
            if(statust == "Halted") { document.write("<font color=yellow><b>Yellow</b></font>"); }
            </script> </TD>
<TD bgcolor="#f0f0f0"> <table>
<TR>
<TD ALIGN="RIGHT"><b>Server Uptime</b>:
         </TD>
<TD>
            ^@StatUpTime^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>Hits</b>:
         </TD>
<TD>
            ^@StatHits^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>Error Hits</b>:
         </TD>
<TD>
            ^@StatErrorHits^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>HTML Hits</b>:
         </TD>
<TD>
            ^@StatHTMLHits^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>Image Hits</b>:
         </TD>
<TD>
            ^@StatImageHits^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>Not Modified Hits</b>:
         </TD>
<TD>
            ^@StatNotModifiedHits^
         </TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><b>Output (Mb)</b>:
         </TD>
<TD>

<table cellpadding=0 cellspacing=0 height=18 width=100 border=1>
<script>var max = 10;
var stata = parseFloat(^@StatOutputKb^) / parseFloat(1024);
statb = parseFloat(parseFloat(stata) / parseFloat(max)) ;
statc = parseFloat(statb) * parseFloat(100);
document.write("<tr><td bgcolor=#000066 width=");
document.write(statc);
</script>
%></td><td></td></tr>
</table>


         </TD>
</TR></table>  </TD>
<TD bgcolor="#f0f0f0" valign=top><br><br>
<table>
<tr>
<td><b>Version</b>:</td>
<td>^@version^</td>
</tr>
<tr>
<td><b>Port</b>:</td>
<td>
^Port^
</td>
</tr>
<tr>
<td><b>Docs Path</b>:</td>
<td>^Path^</td>
</tr>
<tr>
<td><b>Server Root</b>:</td>
<td>^ServerRoot^</td>
</tr>

<tr>
<td><b>Console Port</b>:</td>
<td>^ConsolePort^</td>
</tr>
<tr>
<td><b>Username</b>:</td>
<td>^login^</td>
</tr>

</table>

  </TD>
</TR>



_________________
Carl (Webzn)
http://Neogenisis.net
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group