home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / KOMUNIK / progweb / progweb.exe / phpnuke / html / stats.php < prev    next >
PHP Script  |  2000-12-05  |  22KB  |  414 lines

  1. <?php
  2.  
  3. ######################################################################
  4. # PHP-NUKE: Web Portal System
  5. # ===========================
  6. #
  7. # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
  8. # http://phpnuke.org
  9. #
  10. # This modules is to produce statistics about access at your site
  11. #
  12. # This program is free software. You can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License.
  15. ######################################################################
  16.  
  17.  
  18. if (!isset($mainfile)) { include("mainfile.php"); }
  19. include("header.php");
  20.  
  21. function ServerInfo() {
  22.  
  23. $time = (exec("date"));
  24. $uptime_info = "Uptime:" . trim(exec("uptime")) . "\n\n";
  25. $memory_info = ". " . round(filesize("/proc/kcore") / 1024 / 1024) . "  MB\n";
  26. $cpuinfo = file("/proc/cpuinfo");
  27. for ($i = 0; $i < count($cpuinfo); $i++) {
  28.                 list($item, $data) = split(":", $cpuinfo[$i], 2);
  29.                 $item = chop($item);
  30.                 $data = chop($data);
  31.                 if ($item == "processor") {
  32.                                 $total_cpu++;
  33.                                 $cpu_info = $total_cpu;
  34.                 }
  35.                 if ($item == "vendor_id") { $cpu_info .= $data; }
  36.                 if ($item == "model name") { $cpu_info .= $data; }
  37.                 if ($item == "cpu MHz") {
  38.                                 $cpu_info .= " " . floor($data);
  39.                                 $found_cpu = "yes";
  40.                 }
  41.                 if ($item == "cache size") { $cache = $data;}
  42.                 if ($item == "bogomips") { $bogomips = $data;}
  43. }
  44. if($found_cpu != "yes") { $cpu_info .= " <b>unknown</b>"; }
  45. $cpu_info .= " MHz Processor(s)\n";
  46. $meminfo = file("/proc/meminfo");
  47. for ($i = 0; $i < count($meminfo); $i++) {
  48.                 list($item, $data) = split(":", $meminfo[$i], 2);
  49.                 $item = chop($item);
  50.                 $data = chop($data);
  51.                 if ($item == "MemTotal") { $total_mem =$data;        }
  52.                 if ($item == "MemFree") { $free_mem = $data; }
  53.                 if ($item == "SwapTotal") { $total_swap = $data; }
  54.                 if ($item == "SwapFree") { $free_swap = $data; }
  55.                 if ($item == "Buffers") { $buffer_mem = $data; }
  56.                 if ($item == "Cached") { $cache_mem = $data; }
  57.                 if ($item == "MemShared") {$shared_mem = $data; }
  58. }
  59. $used_mem = ( $total_mem - $free_mem );
  60. $used_swap = ( $total_swap - $free_swap );
  61. $percent_free = round( $free_mem / $total_mem * 100 );
  62. $percent_used = round( $used_mem / $total_mem * 100 );
  63. $percent_swap = round( ( $total_swap - $free_swap ) / $total_swap * 100 );
  64. $percent_swap_free = round( $free_swap / $total_swap * 100 );
  65. $percent_buff = round( $buffer_mem / $total_mem * 100 );
  66. $percent_cach = round( $cache_mem / $total_mem * 100 );
  67. $percent_shar = round( $shared_mem / $total_mem * 100 );
  68. exec ("df", $x);
  69. $sicount = 1;
  70. while ($sicount < sizeof($x)) {
  71.                 list($drive[$sicount], $size[$sicount], $used[$sicount], $avail[$sicount], $percent[$sicount], $mount[$sicount]) = split(" +", $x[$sicount]);
  72.                 $percent_part[$sicount] = str_replace( "%", "", $percent[$sicount] );
  73. $sicount++;
  74. }
  75.  
  76.     echo "<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0 BGCOLOR=000000><TR><TD COLSPAN=2>";
  77.     echo "<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=0 BGCOLOR=FFFFFF>";
  78.     echo "<font color=White><center><b>".translate("Server Info")."</b></center></font>";
  79.     echo "<tr><td>";
  80.     echo "".translate("Local Time:")." $time<br>";
  81.     echo "".translate("Uptime:")." $uptime_info<br><br>";
  82.     echo "".translate("CPU Type:")." $cpu_info<br>";
  83.     echo "".translate("Level II Cache:")." $cache<br>";
  84.     echo "".translate("RAM Installed:")." $memory_info</b><br>";
  85.     echo "".translate("Bogomips:")." $bogomips<br><br>";
  86.     echo "<center><font size=2>".translate("Memory Status")."<br>";
  87.     echo "<table width=100% border=0><tr><td>";
  88.     echo "<div align=center>";
  89.     echo "<table border=1 bgcolor=#D3D3D3><tr><td></td></tr><tr><td>";
  90.     echo "<table cellspacing=5 border=0><tr><td></td><td align=CENTER>";
  91.     echo "<font size=-1>".translate("Total")."</font>";
  92.     echo "</td><td align=CENTER>";
  93.     echo "<font size=-1>".translate("Usage")."</font>";
  94.     echo "</td><td align=CENTER>";
  95.     echo "<font size=-1>%</font>";
  96.     echo "</td></tr><tr><td>";
  97.     echo "<font size=-1>".translate("Used:")."</font>";
  98.     echo "</td><td>";
  99.     echo "<font color=#800000 size=1>$used_mem</font>";
  100.     echo "</td><td>";
  101.     echo "<img src=\"images/stats/bar4.gif\" height=11 width=$percent_used>";
  102.     echo "</td><td>";
  103.     echo "<font color=#800000 size=1>$percent_used</font>";
  104.     echo "<font color=#800000 size=1>%</font>";
  105.     echo "</td></tr>";
  106.     echo "<tr><td>";
  107.     echo "<font size=-1>".translate("Free")."</font>";
  108.     echo "</td><td>";
  109.     echo "<font color=#800000 size=1>$free_mem</font>";
  110.     echo "</td><td>";
  111.     echo "<img src=\"images/stats/bar1.gif\" height=11 width=$percent_free>";
  112.     echo "</td><td>";
  113.     echo "<font color=#800000 size=1>$percent_free</font>";
  114.     echo "<font color=#800000 size=1>%</font>";
  115.     echo "</td></tr><tr>";
  116.     echo "<td>";
  117.     echo "<font size=-1>".translate("buffered")."</font>";
  118.     echo "</td>";
  119.     echo "<td>";
  120.     echo "<font color=#800000 size=1>$buffer_mem</font>";
  121.     echo "</td>";
  122.     echo "<td>";
  123.     echo "<img src=\"images/stats/bar2.gif\" height=11 width=$percent_buff>";
  124.     echo "</td>";
  125.     echo "<td>";
  126.     echo "<font color=#800000 size=1>$percent_buff</font>";
  127.     echo "<font color=#800000 size=1>%</font>";
  128.     echo "</td>";
  129.     echo "</tr>";
  130.     echo "<tr>";
  131.     echo "<td>";
  132.     echo "<font size=-1>".translate("cached")."</font>";
  133.     echo "</td>";
  134.     echo "<td>";
  135.     echo "<font color=#800000 size=1>$cache_mem</font>";
  136.     echo "</td>";
  137.     echo "<td>";
  138.     echo "<img src=\"images/stats/bar5.gif\" height=11 width=$percent_cach>";
  139.     echo "</td>";
  140.     echo "<td>";
  141.     echo "<font color=#800000 size=1>$percent_cach</font>";
  142.     echo "<font color=#800000 size=1>%</font>";
  143.     echo "</td>";
  144.     echo "</tr>";
  145.     echo "</table>";
  146.     echo "</td>";
  147.     echo "</tr>";
  148.     echo "</table>";
  149.     echo "</div><br><br";
  150.     echo "</td>";
  151.     echo "</tr>";
  152.     echo "</table>";
  153.     echo "     <font size=2>".translate("Swap Status")."</font><BR>";
  154.     echo "<table width=100% border=0>";
  155.     echo "<tr>";
  156.     echo "<td>";
  157.     echo "<div align=center>";
  158.     echo "<table border=1 bgcolor=#D3D3D3>";
  159.     echo "<tr>";
  160.     echo "<td>";
  161.     echo "</td>";
  162.     echo "</tr>";
  163.     echo "<tr>";
  164.     echo "<td>";
  165.     echo "<table cellspacing=5 border=0>";
  166.     echo "<tr>";
  167.     echo "<td>";
  168.     echo "</td>";
  169.     echo "<td>";
  170.     echo "<font size=-1>".translate("Total:")."</font>";
  171.     echo "</td>";
  172.     echo "<td>";
  173.     echo "<font size=-1>".translate("Usage:")."</font>";
  174.     echo "</td>";
  175.     echo "<td>";
  176.     echo "<font size=-1>%</font>";
  177.     echo "</td>";
  178.     echo "</tr>";
  179.     echo "<tr>";
  180.     echo "<td>";
  181.     echo "<font size=-1>".translate("Used:")."</font>";
  182.     echo "</td>";
  183.     echo "<td>";
  184.     echo "<font color=#800000 size=1>$used_swap</font>";
  185.     echo "</td>";
  186.     echo "<td>";
  187.     echo "<img src=\"images/stats/bar4.gif\" height=11 width=$percent_swap>";
  188.     echo "</td>";
  189.     echo "<td>";
  190.     echo "<font color=#800000 size=1>$percent_swap</font>";
  191.     echo "<font color=#800000 size=1>%</font>";
  192.     echo "</td>";
  193.     echo "</tr>";
  194.     echo "<tr>";
  195.     echo "<td>";
  196.     echo "<font size=-1>".translate("Free:")."</font>";
  197.     echo "</td>";
  198.     echo "<td>";
  199.     echo "<font color=#800000 size=1>$free_swap</font>";
  200.     echo "</td>";
  201.     echo "<td>";
  202.     echo "<img src=\"images/stats/bar1.gif\" height=11 width=$percent_swap_free>";
  203.     echo "</td>";
  204.     echo "<td>";
  205.     echo "<font color=#800000 size=1>$percent_swap_free</font>";
  206.     echo "<font color=#800000 size=1>%</font>";
  207.     echo "</td>";
  208.     echo "</tr>";
  209.     echo "</td>";
  210.     echo "</tr>";
  211.     echo "</table>";
  212.     echo "</td>";
  213.     echo "</tr>";
  214.     echo "</table>";
  215.     echo "</div><br><br>";
  216.     echo "</td>";
  217.     echo "</tr>";
  218.     echo "</table>";
  219.     echo "     <font size=2>".translate("Partitions Status")."</font><BR>";
  220.     echo "<table width=100% border=0>";
  221.     echo "<tr>";
  222.     echo "<td>";
  223.     echo "<div align=center>";
  224.     echo "<table border=1 bgcolor=#D3D3D3>";
  225.     echo "<tr>";
  226.     echo "<td>";
  227.     echo "</td>";
  228.     echo "</tr>";
  229.     echo "<tr>";
  230.     echo "<td>";
  231.     echo "<table cellspacing=5 border=1>";
  232.     echo "<tr>";
  233.     echo "<td><font size=-1>".translate("Mount")."</font></td>";
  234.     echo "<td><font size=-1>".translate("Size")."</font></td>";
  235.     echo "<td><font size=-1>".translate("Free")."</font></td>";
  236.     echo "<td><font size=-1>".translate("Used")."</font></td>";
  237.     echo "<td width=100><font size=-1>".translate("Usage")."</font></td>";
  238.     echo "<td><font size=-1>".translate("Percent")."</font></td>";
  239.     echo "</tr>";
  240.     $count=1;
  241.     while ($count < sizeof($x)) {
  242.                 print("<tr>");
  243.                 echo "<td><font size=-1>$mount[$count]</font></td><td><font color=#800000 size=1>$size[$count]</font></td><td><font color=#800000 size=1>$avail[$count]</font></td><td><font color=#800000 size=1>$used[$count]</font></td><td><img src=\"images/stats/bar$count.gif\" height=11 width=$percent_part[$count]></td><td><font color=#800000 size=1>$percent[$count]</font></td></tr>";
  244.                 $count++;
  245.     }
  246.     echo "</td>";
  247.     echo "</tr>";
  248.     echo "</table>";
  249.     echo "</td>";
  250.     echo "</tr>";
  251.     echo "</table>";
  252.     echo "</div><br><br>";
  253.     echo "</td>";
  254.     echo "</tr>";
  255.     echo "</table>";
  256.     echo "</td>";
  257.     echo "</tr>";
  258.     echo "</table>";
  259.     echo "</TD></TR></TABLE>";
  260.     echo "</TD></TR></TABLE>";
  261.     echo "<br><br></center>";
  262. }
  263.  
  264.  
  265. $dkn = mysql_query("select type, var, count from counter order by type desc");
  266. if (!$dkn) { echo mysql_errno(). ": ".mysql_error(). "<br>";    exit(); }
  267. while(list($type, $var, $count) = mysql_fetch_row($dkn)) {
  268.     if(($type == "total") && ($var == "hits")) {
  269.         $total = $count;
  270.     } elseif($type == "browser") {
  271.         if($var == "Netscape") {
  272.             $netscape[] = $count;
  273.             $netscape[] =  substr(100 * $count / $total, 0, 5);
  274.         } elseif($var == "MSIE") {
  275.             $msie[] = $count;
  276.             $msie[] =  substr(100 * $count / $total, 0, 5);
  277.         } elseif($var == "Konqueror") {
  278.             $konqueror[] = $count;
  279.             $konqueror[] =  substr(100 * $count / $total, 0, 5);
  280.         } elseif($var == "Opera") {
  281.             $opera[] = $count;
  282.             $opera[] =  substr(100 * $count / $total, 0, 5);
  283.         } elseif($var == "Lynx") {
  284.             $lynx[] = $count;
  285.             $lynx[] =  substr(100 * $count / $total, 0, 5);
  286.         } elseif($var == "WebTV") {
  287.             $webtv[] = $count;
  288.             $webtv[] =  substr(100 * $count / $total, 0, 5);
  289.         } elseif($var == "Bot") {
  290.             $bot[] = $count;
  291.             $bot[] =  substr(100 * $count / $total, 0, 5);
  292.         } elseif(($type == "browser") && ($var == "Other")) {
  293.             $b_other[] = $count;
  294.             $b_other[] =  substr(100 * $count / $total, 0, 5);
  295.         }
  296.     } elseif($type == "os") {
  297.         if($var == "Windows") {
  298.             $windows[] = $count;
  299.             $windows[] =  substr(100 * $count / $total, 0, 5);
  300.         } elseif($var == "Mac") {
  301.             $mac[] = $count;
  302.             $mac[] =  substr(100 * $count / $total, 0, 5);
  303.         } elseif($var == "Linux") {
  304.             $linux[] = $count;
  305.             $linux[] =  substr(100 * $count / $total, 0, 5);
  306.         } elseif($var == "FreeBSD") {
  307.             $freebsd[] = $count;
  308.             $freebsd[] =  substr(100 * $count / $total, 0, 5);
  309.         } elseif($var == "SunOS") {
  310.             $sunos[] = $count;
  311.             $sunos[] =  substr(100 * $count / $total, 0, 5);
  312.         } elseif($var == "IRIX") {
  313.             $irix[] = $count;
  314.             $irix[] =  substr(100 * $count / $total, 0, 5);
  315.         } elseif($var == "BeOS") {
  316.             $beos[] = $count;
  317.             $beos[] =  substr(100 * $count / $total, 0, 5);
  318.         } elseif($var == "OS/2") {
  319.             $os2[] = $count;
  320.             $os2[] =  substr(100 * $count / $total, 0, 5);
  321.         } elseif($var == "AIX") {
  322.             $aix[] = $count;
  323.             $aix[] =  substr(100 * $count / $total, 0, 5);
  324.         } elseif(($type == "os") && ($var == "Other")) {
  325.             $os_other[] = $count;
  326.             $os_other[] =  substr(100 * $count / $total, 0, 5);
  327.         }
  328.     }
  329. }
  330.  
  331. echo "<center>".translate("We received")." <b>$total</b> ".translate("page views since")." $startdate<br><br>";
  332.  
  333. echo "<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0 BGCOLOR=000000><TR><TD COLSPAN=2>";
  334. echo "<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=0 BGCOLOR=FFFFFF>";
  335. echo "<font color=White><center><b>".translate("Browsers")."</b></center>";
  336. echo "<tr><td><img src=images/stats/explorer.gif border=0> MSIE: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Internet Explorer\"><img src=\"images/mainbar.gif\" Alt=\"Internet Explorer\" height=14 width=", $msie[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Internet Explorer\"> $msie[1] % ($msie[0])</td></tr>\n";
  337. echo "<tr><td><img src=images/stats/netscape.gif border=0> Netscape: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Netscape\"><img src=\"images/mainbar.gif\" Alt=\"Netscape\" height=14 width=", $netscape[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Netscape\"> $netscape[1] % ($netscape[0])</td></tr>\n";
  338. echo "<tr><td><img src=images/stats/opera.gif border=0> Opera: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Opera\"><img src=\"images/mainbar.gif\" Alt=\"Opera\" height=14 width=", $opera[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Opera\"> $opera[1] % ($opera[0])</td></tr>\n";
  339. echo "<tr><td><img src=images/stats/webtv.gif border=0> WebTV: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"WebTV\"><img src=\"images/mainbar.gif\" Alt=\"WebTV\" height=14 width=", $webtv[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"WebTV\"> $webtv[1] % ($webtv[0])</td></tr>\n";
  340. echo "<tr><td><img src=images/stats/konqueror.gif border=0> Konqueror: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Konqueror\"><img src=\"images/mainbar.gif\" Alt=\"Konqueror (KDE)\" height=14 width=", $konqueror[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Konqueror\"> $konqueror[1] % ($konqueror[0])</td></tr>\n";
  341. echo "<tr><td><img src=images/stats/lynx.gif border=0> Lynx: </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Lynx\"><img src=\"images/mainbar.gif\" Alt=\"Lynx\" height=14 width=", $lynx[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Lynx\"> $lynx[1] % ($lynx[0])</td></tr>\n";
  342. echo "<tr><td><img src=images/stats/altavista.gif border=0> ".translate("Search Engines").": </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Robots - Spiders - Buscadores\"><img src=\"images/mainbar.gif\" Alt=\"Robots - Spiders - Buscadores\" height=14 width=", $bot[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"".translate("Robots - Spiders")."\"> $bot[1] % ($bot[0])</td></tr>\n";
  343. echo "<tr><td><img src=images/stats/question.gif border=0> ".translate("Unknown").": </td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Otros - Desconocidos\"><img src=\"images/mainbar.gif\" Alt=\"Otros - Desconocidos\" height=14 width=", $b_other[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Otros - Desconocidos\"> $b_other[1] % ($b_other[0])";
  344. echo "</FONT>";
  345. echo "</TD></TR></TABLE>";
  346. echo "</TD></TR></TABLE>";
  347. echo "<br><br><center>";
  348. echo "<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0 BGCOLOR=000000><TR><TD COLSPAN=2>";
  349. echo "<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=0 BGCOLOR=FFFFFF>";
  350. echo "<font color=White><center><b>".translate("Operating Systems")."</b></center></font>";
  351. echo "<tr><td><img src=images/stats/windows.gif border=0> Windows:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Windows\"><img src=\"images/mainbar.gif\" Alt=\"Windows\" height=14 width=", $windows[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Windows\"> $windows[1] % ($windows[0])</td></tr>\n";
  352. echo "<tr><td><img src=images/stats/linux.gif border=0> Linux:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Linux\"><img src=\"images/mainbar.gif\" Alt=\"Linux\" height=14 width=", $linux[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Linux\"> $linux[1] % ($linux[0])</td></tr>\n";
  353. echo "<tr><td><img src=images/stats/mac.gif border=0> Mac/PPC:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Mac/PPC\"><img src=\"images/mainbar.gif\" Alt=\"Mac - PPC\" height=14 width=", $mac[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Mac/PPC\"> $mac[1] % ($mac[0])</td></tr>\n";
  354. echo "<tr><td><img src=images/stats/bsd.gif border=0> FreeBSD:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"FreeBSD\"><img src=\"images/mainbar.gif\" Alt=\"FreeBSD\" height=14 width=", $freebsd[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"FreeBSD\"> $freebsd[1] % ($freebsd[0])</td></tr>\n";
  355. echo "<tr><td><img src=images/stats/sun.gif border=0> SunOS:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"SunOS\"><img src=\"images/mainbar.gif\" Alt=\"SunOS\" height=14 width=", $sunos[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"SunOS\"> $sunos[1] % ($sunos[0])</td></tr>\n";
  356. echo "<tr><td><img src=images/stats/irix.gif border=0> IRIX:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"SGI Irix\"><img src=\"images/mainbar.gif\" Alt=\"SGI Irix\" height=14 width=", $irix[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"SGI Irix\"> $irix[1] % ($irix[0])</td></tr>\n";
  357. echo "<tr><td><img src=images/stats/be.gif border=0> BeOS:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"BeOS\"><img src=\"images/mainbar.gif\" Alt=\"BeOS\" height=14 width=", $beos[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"BeOS\"> $beos[1] % ($beos[0])</td></tr>\n";
  358. echo "<tr><td><img src=images/stats/os2.gif border=0> OS/2:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"OS/2\"><img src=\"images/mainbar.gif\" Alt=\"OS/2\" height=14 width=", $os2[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"OS/2\"> $os2[1] % ($os2[0])</td></tr>\n";
  359. echo "<tr><td><img src=images/stats/aix.gif border=0> AIX:</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"AIX\"><img src=\"images/mainbar.gif\" Alt=\"AIX\" height=14 width=", $aix[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"AIX\"> $aix[1] % ($aix[0])</td></tr>\n";
  360. echo "<tr><td><img src=images/stats/question.gif border=0> ".translate("Unknown").":</td><td><img src=\"images/leftbar.gif\" height=14 width=7 Alt=\"Otros - Desconocidos\"><img src=\"images/mainbar.gif\" ALt=\"Otros - Desconocidos\" height=14 width=", $os_other[1] * 2, "><img src=\"images/rightbar.gif\" height=14 width=7 Alt=\"Otros - Desconocidos\"> $os_other[1] % ($os_other[0])";
  361. echo "</FONT>";
  362. echo "</TD></TR></TABLE>";
  363. echo "</TD></TR></TABLE>";
  364. echo "<br><br><center>";
  365.  
  366. $result = mysql_query("select * from users");
  367. $unum = mysql_num_rows($result);
  368. $result = mysql_query("select * from authors");
  369. $anum = mysql_num_rows($result);
  370. $result = mysql_query("select * from stories");
  371. $snum = mysql_num_rows($result);
  372. $result = mysql_query("select * from comments");
  373. $cnum = mysql_num_rows($result);
  374. $result = mysql_query("select * from sections");
  375. $secnum = mysql_num_rows($result);
  376. $result = mysql_query("select * from seccont");
  377. $secanum = mysql_num_rows($result);
  378. $result = mysql_query("select * from queue");
  379. $subnum = mysql_num_rows($result);
  380. $result = mysql_query("select * from topics");
  381. $tnum = mysql_num_rows($result);
  382. $result = mysql_query("select * from links_links");
  383. $links = mysql_num_rows($result);
  384. $result = mysql_query("select * from links_categories");
  385. $cat1 = mysql_num_rows($result);
  386. $result = mysql_query("select * from links_subcategories");
  387. $cat2 = mysql_num_rows($result);
  388. $cat = $cat1+$cat2;
  389.  
  390. echo "<TABLE CELLSPACING=0 CELLPADDING=2 BORDER=0 BGCOLOR=000000><TR><TD COLSPAN=2>";
  391. echo "<TABLE CELLSPACING=0 CELLPADDING=3 BORDER=0 BGCOLOR=FFFFFF>";
  392. echo "<font color=White><center><b>".translate("Miscelaneous Stats")."</b></center></font>";
  393. echo "<tr><td><img src=images/stats/users.gif border=0> ".translate("Registered Users: ")."</td><td><b>$unum</b></td></tr>\n";
  394. echo "<tr><td><img src=images/stats/authors.gif border=0> ".translate("Active Authors: ")."</td><td><b>$anum</b></td></tr>\n";
  395. echo "<tr><td><img src=images/stats/news.gif border=0> ".translate("Stories Published: ")."</td><td><b>$snum</b></td></tr>\n";
  396. echo "<tr><td><img src=images/stats/topics.gif border=0> ".translate("Active Topics: ")."</td><td><b>$tnum</b></td></tr>\n";
  397. echo "<tr><td><img src=images/stats/comments.gif border=0> ".translate("Comments Posted: ")."</td><td><b>$cnum</b></td></tr>\n";
  398. echo "<tr><td><img src=images/stats/sections.gif border=0> ".translate("Special Sections: ")."</td><td><b>$secnum</b></td></tr>\n";
  399. echo "<tr><td><img src=images/stats/articles.gif border=0> ".translate("Articles in Sections: ")."</td><td><b>$secanum</b></td></tr>\n";
  400. echo "<tr><td><img src=images/stats/topics.gif border=0> ".translate("Links in Web Links: ")."</td><td><b>$links</b></td></tr>\n";
  401. echo "<tr><td><img src=images/stats/sections.gif border=0> ".translate("Categories in Web Links: ")."</td><td><b>$cat</b></td></tr>\n";
  402. echo "<tr><td><img src=images/stats/waiting.gif border=0> ".translate("News Waiting to be Published: ")."</td><td><b>$subnum</b></td></tr>\n";
  403. echo "<tr><td><img src=images/stats/sections.gif border=0> ".translate("PHP-Nuke version: ")."</td><td><b>$Version_Num</b></td></tr>\n";
  404. echo "</TD></TR></TABLE>";
  405. echo "</TD></TR></TABLE>";
  406. echo "<br><br></center>";
  407.  
  408. if ($admin AND $advancedstats) {
  409.     ServerInfo();
  410. }
  411.  
  412. include("footer.php");
  413.  
  414. ?>