Onbekend |
|
hij geeft de serverload niet maar zegt de text(komt uit webtiger)(lig het aan host of aan scripting)
en myqsl versie een error
http://citycrime.ci.funpic.de/stats.php
hier zie je het zelf
<?
include "coonfig.php";
function ServerLoad( )
{
// Eerst maar eens kijken of de serverload wel berekend kan worden
if (!@file_exists('/proc/loadavg'))
{
return "De serverload kan niet worden berekend!";
}
else
{
$bestand = fopen( '/proc/loadavg' , 'r' );
$load = explode(' ' , fread( $bestand , 6 ) );
fclose( $bestand );
}
return trim( $load[ 0 ] ) ." Seconden!";
}
?>
<table width=100%>
<TR>
<TD vAlign=top align=middle width="53%">
<TABLE borderColor=black cellSpacing=0 cellPadding=2 width="99%" border=0>
<TR>
<td align=center background=topic.gif>Site Statistieken</TD>
<td align=center background=topic.gif></TD></TR>
<TR>
<?
$select = mysql_query("SELECT id FROM leden");
$member = mysql_num_rows($select);
?>
<TD class="mainTxt">Totaal leden:</TD>
<TD class="mainTxt"><b><? echo $member; ?></b></TD></TR>
<?
$dbres = mysql_query("SELECT cash FROM leden");
$cash = 0;
while($user1 = mysql_fetch_object($dbres))
$cash += $user1->cash;
?>
<TD class="mainTxt">Totaal contant:</TD>
<TD class="mainTxt"><b>$<? echo $cash; ?></b></TD></TR>
<?
$dbrees = mysql_query("SELECT bank FROM leden");
$bank = 0;
while($user = mysql_fetch_object($dbrees))
$bank += $user->bank;
?>
<TD class="mainTxt">Totaal op de bank:</TD>
<TD class="mainTxt"><b>$<? echo $bank; ?></b></TD></TR>
<TR>
<?
$select = mysql_query("SELECT * FROM leden");
$members = mysql_num_rows($select);
$total = round($bank+$cash);
?>
<TD class="mainTxt">Totaal geld:</TD>
<TD class="mainTxt"><b>$<? echo $total; ?></b></TD></TR>
<TR>
<?
$dbres = mysql_query("SELECT id FROM berichten");
$messages = mysql_num_rows($dbres);
?>
<TD class="mainTxt">Totaal berichten verstuurd:</TD>
<TD class="mainTxt"><b><? echo $messages; ?></b></TD></TR>
<TR>
<?
$dbres = mysql_query("SELECT health FROM leden WHERE health = '0'");
$dead = mysql_num_rows($dbres);
?>
<TD class="mainTxt">Vermoorde leden:</TD>
<TD class="mainTxt"><b><? echo $dead; ?> </b></TD></TR>
<TR>
<?
$dbres = mysql_query("SELECT health FROM leden WHERE health > '1'");
$alive = mysql_num_rows($dbres);
?>
<TD class="mainTxt">Levende leden:</TD>
<TD class="mainTxt"><b><? echo $alive; ?> </b></TD></TR>
</TABLE>
<TABLE class=sub2 borderColor=gris cellSpacing=0 cellPadding=0 width="99%" border=0>
<TR><TD align=right colSpan=4 class=mainTxt> </TD></TR>
</TABLE>
<TD vAlign=top align=middle width="0%">
<TABLE class=sub2 borderColor=black cellSpacing=0 cellPadding=2
width="99%" border=0>
<TR>
<td align=center>Nieuwste leden</TD>
<td align=center></TD></TR>
<?
$select = mysql_query("SELECT aanmelddatum, login FROM leden ORDER BY aanmelddatum DESC LIMIT 0,10");
while($list = mysql_fetch_object($select)) {
echo "
<TR>
<TD class=mainTxt><A href='profiel.php?x=$list->login'>$list->login</A></TD>
<TD class=mainTxt>$list->aanmelddatum</TD></TR>";
}
mysql_close();
?>
</table>
<?
echo "<b>Extra</b><br>";
echo "<b>Server load</b>: ".serverload()."<br>";
echo "<b>MYsql versie</b>: ".mysql_get_server_info()."<br>";
echo "<b>PHP versie</b>: ".phpversion()."<br>";
?>
<? include "coonfig.php"; function ServerLoad( ) { // Eerst maar eens kijken of de serverload wel berekend kan worden { return "De serverload kan niet worden berekend!"; } else { $bestand = fopen( '/proc/loadavg' , 'r' ); } return trim( $load[ 0 ] ) ." Seconden!"; } ?> <table width=100%> <TR> <TD vAlign=top align=middle width="53%"> <TABLE borderColor=black cellSpacing=0 cellPadding=2 width="99%" border=0> <TR> <td align=center background=topic.gif>Site Statistieken</TD> <td align=center background=topic.gif></TD></TR> <TR> <? ?> <TD class="mainTxt">Totaal leden:</TD> <TD class="mainTxt"><b> <? echo $member; ?></b></TD></TR> <? $cash = 0; $cash += $user1->cash; ?> <TD class="mainTxt">Totaal contant:</TD> <TD class="mainTxt"><b>$ <? echo $cash; ?></b></TD></TR> <? $bank = 0; $bank += $user->bank; ?> <TD class="mainTxt">Totaal op de bank:</TD> <TD class="mainTxt"><b>$ <? echo $bank; ?></b></TD></TR> <TR> <? $total = round($bank+$cash); ?> <TD class="mainTxt">Totaal geld:</TD> <TD class="mainTxt"><b>$ <? echo $total; ?></b></TD></TR> <TR> <? ?> <TD class="mainTxt">Totaal berichten verstuurd:</TD> <TD class="mainTxt"><b> <? echo $messages; ?></b></TD></TR> <TR> <? $dbres = mysql_query("SELECT health FROM leden WHERE health = '0'"); ?> <TD class="mainTxt">Vermoorde leden:</TD> <TD class="mainTxt"><b> <? echo $dead; ?> </b></TD></TR> <TR> <? $dbres = mysql_query("SELECT health FROM leden WHERE health > '1'"); ?> <TD class="mainTxt">Levende leden:</TD> <TD class="mainTxt"><b> <? echo $alive; ?> </b></TD></TR> </TABLE> <TABLE class=sub2 borderColor=gris cellSpacing=0 cellPadding=0 width="99%" border=0> <TR><TD align=right colSpan=4 class=mainTxt> </TD></TR> </TABLE> <TD vAlign=top align=middle width="0%"> <TABLE class=sub2 borderColor=black cellSpacing=0 cellPadding=2 width="99%" border=0> <TR> <td align=center>Nieuwste leden</TD> <td align=center></TD></TR> <? $select = mysql_query("SELECT aanmelddatum, login FROM leden ORDER BY aanmelddatum DESC LIMIT 0,10"); <TR> <TD class=mainTxt><A href='profiel.php?x=$list->login'>$list->login</A></TD> <TD class=mainTxt>$list->aanmelddatum</TD></TR>"; } ?> </table> <? echo "<b>Server load</b>: ".serverload ()."<br>"; ?>
|