Upstream tarball 20080304
[amule.git] / src / webserver / php-default / stats.php
bloba1114c1d3658d0ddc281fefaa400ef053b44c78e
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <title>amule control page</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 <meta http-equiv="pragmas" content="no-cache">
8 <?php
9 if ( $_SESSION["auto_refresh"] > 0 ) {
10 echo "<meta http-equiv=\"refresh\" content=\"", $_SESSION["auto_refresh"], '">';
13 <style type="text/css">
14 <!--
15 body {
16 margin-left: 0px;
17 margin-top: 0px;
18 margin-right: 0px;
19 margin-bottom: 0px;
20 background-color: #6699CC;
22 -->
23 </style>
24 </head>
25 <table width="800" border="0" cellpadding="0" cellspacing="0">
26 <!--DWLayoutTable-->
27 <tr>
28 <td width="21" height="9"></td>
29 <td width="22"></td>
30 <td width="152"></td>
31 <td width="16"></td>
32 <td width="530"></td>
33 <td width="59"></td>
34 </tr>
35 <tr>
36 <td height="20">&nbsp;</td>
37 <td valign="top"><img src="connect.gif" width="16" height="16"></td>
38 <td valign="top"><strong>Connection status : </strong></td>
39 <td>&nbsp;</td>
40 <td valign="top">
41 <?php
42 $stats = amule_get_stats();
43 if ( $stats["id"] == 0 ) {
44 echo "Not connected";
45 } elseif ( $stats["id"] == 0xffffffff ) {
46 echo "Connecting ...";
47 } else {
48 echo "Connected with ", (($stats["id"] < 16777216) ? "low" : "high"), " ID to ",
49 $stats["serv_name"], " ", $stats["serv_addr"];
52 </td>
53 <td>&nbsp;</td>
54 </tr>
55 <tr>
56 <td height="20">&nbsp;</td>
57 <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
58 <td valign="top"><strong>Kad status : </strong></td>
59 <td>&nbsp;</td>
60 <td valign="top">
61 <?php
62 $stats = amule_get_stats();
63 if ( $stats["kad_connected"] == 1 ) {
64 echo "Connected";
65 if ( $stats["kad_firewalled"] == 1 ) {
66 echo "(Firewalled)";
67 } else {
68 echo "(OK)";
70 } else {
71 echo "Disconnected";
74 </td>
75 <td>&nbsp;</td>
76 </tr>
77 <tr>
78 <td height="15"></td>
79 <td></td>
80 <td></td>
81 <td></td>
82 <td></td>
83 <td></td>
84 </tr>
85 </table>
88 </html>