Upstream tarball 10153
[amule.git] / src / webserver / default / stats.php
blob3d301b394d768873c3294540959d646679615ee6
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 caption {
16 font-family: Helvetica;
17 font-size: 18px;
18 font-weight: bold;
19 color: #003161;
21 th {
22 font-family: Helvetica;
23 font-size: 14px;
24 font-height: 22px;
25 font-weight: bold;
26 color: #003161;
28 a:link {
29 color: #003161;
30 text-decoration: none;
32 a:active {
33 color: #003161;
34 text-decoration: none;
36 a:visited {
37 color: #003161;
38 text-decoration: none;
40 a:hover {
41 color: #c0c0c0;
42 text-decoration: underline;
44 td {
45 font-family: Helvetica;
46 font-size: 12px;
47 font-weight: normal;
49 label {
50 font-family: Helvetica;
51 font-size: 14px;
52 font-weight: bold;
54 .texte {
55 font-family: Helvetica;
56 font-size: 12px;
57 font-weight: normal;
59 label {
60 font-family:"trebuchet ms",sans-serif;
61 font-size: 12px;
62 font-weight:bold
64 input {
65 border:1px solid #003161;
66 background-color: white;
67 font-family:"trebuchet ms",sans-serif;
68 font-size: 12px;
69 color: #003161;
71 select, option {
72 background-color: white;
73 font-size: 12px;
74 color: #003161;
76 textarea {
77 border:1px solid #003161;
78 background-color: #90B6DB;
79 font-family:"trebuchet ms",sans-serif;
80 font-size: 12px;
81 color: white;
83 -->
84 </style>
85 </head>
86 <table width="100%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
87 <tr valign="top">
88 <td width="65%"><strong>Ed2k : </strong>
89 <?php
90 $stats = amule_get_stats();
91 if ( $stats["id"] == 0 ) {
92 echo "Not connected";
93 } elseif ( $stats["id"] == 0xffffffff ) {
94 echo "Connecting ...";
95 } else {
96 echo "Connected with ", (($stats["id"] < 16777216) ? "low" : "high"), " ID to ",
97 $stats["serv_name"], " ", $stats["serv_addr"];
100 </td>
101 <td><strong>Kad :</strong>
102 <?php
103 $stats = amule_get_stats();
104 if ( $stats["kad_connected"] == 1 ) {
105 echo "Connected";
106 if ( $stats["kad_firewalled"] == 1 ) {
107 echo "(Firewalled)";
108 } else {
109 echo "(OK)";
111 } else {
112 echo "Disconnected";
115 </td>
116 </tr>
117 </table>
118 </html>