1 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <meta http
-equiv
="content-type" content
="text/html; charset=UTF-8">
5 <META HTTP
-EQUIV
="PRAGMAS" CONTENT
="NO-CACHE">
7 echo "<title>aMule " , amule_get_version(), " - Web Control Panel</title>";
9 <style type
="text/css">
14 a
, a
:active
, a
:link
, a
:visited
18 .down
-header
, .down
-header
-left
, .down
-header
-right
,
19 .down
-line
, .down
-line
-good
, .down
-line
-left
, .down
-line
-good
-left
,
20 .down
-line
-right
, .down
-line
-good
-right
,
21 .up
-header
, .up
-header
-left
, .up
-line
, .up
-line
-left
,
22 .server
-header
, .server
-header
-left
, .server
-line
, .server
-line
-left
,
23 .shared
-header
, .shared
-header
-left
, .shared
-line
, .shared
-line
-changed
,
24 .shared
-line
-left
, .shared
-line
-left
-changed
,
25 .header
, .smallheader
, .commontext
,
26 .upqueue
-header
, .upqueue
-line
, .upqueue
-line
-left
,
27 .websearch
-header
, .websearch
-line
, .addserver
-header
, .addserver
-line
36 background
-color
: #3399FF;
38 .down
-header
, .down
-line
, .down
-line
-good
, .up
-header
, .up
-line
,
39 .server
-header
, .server
-line
, .shared
-header
, .shared
-line
, .shared
-line
-changed
,
40 .upqueue
-header
, .upqueue
-line
,
41 .websearch
-header
, .websearch
-line
, .addserver
-header
, .addserver
-line
45 .down
-header
-left
, .down
-line
-left
, .down
-line
-good
-left
,
46 .server
-header
-left
, .server
-line
-left
, .shared
-header
-left
,
47 .up
-header
-left
, .up
-line
-left
, .shared
-line
-left
, .shared
-line
-left
-changed
, .upqueue
-line
-left
51 .down
-line
-right
, .down
-line
-good
-right
, .down
-header
-right
55 .down
-header
, .down
-header
-left
, .down
-header
-right
,
56 .up
-header
, .up
-header
-left
, .server
-header
, .server
-header
-left
,
57 .shared
-header
, .shared
-header
-left
, .upqueue
-header
,
58 .websearch
-header
, .addserver
-header
60 background
-color
: #0066CC;
64 background
-color
: #0046AC;
68 background
-color
: #003399;
73 background
-color
: #FFFFFF;
76 .down
-line
, .down
-line
-good
, .down
-line
-left
, .down
-line
-good
-left
,
77 .down
-line
-right
, .down
-line
-good
-right
,
78 .up
-line
, .up
-line
-left
, .server
-line
, .server
-line
-left
,
79 .shared
-line
, .shared
-line
-changed
, .shared
-line
-left
, .shared
-line
-left
-changed
,
80 .upqueue
-line
, .upqueue
-line
-left
,
81 .websearch
-line
, .addserver
-line
83 background
-color
: #3399FF;
85 .down
-line
-good
, .down
-line
-good
-left
, .down
-line
-good
-right
, .shared
-line
-changed
, .shared
-line
-left
-changed
91 border
:0px solid
#000000;
92 border
-collapse
: collapse
;
107 <body bgcolor
="#FBDE9C" text
=white link
="#3399FF" vlink
="#3399FF" alink
="#3399FF" marginwidth
=0 marginheight
=0 topmargin
=0 leftmargin
=0 style
="margin:0px">
108 <table border
=0 width
="100%" align
=center cellpadding
=4 cellspacing
=0>
110 <td
class="tabs" align
="left" colspan
="2">
112 <table border
="0" cellpadding
="4" cellspacing
="0">
114 <td
class="tabs" align
="center">
115  
;<a href
="http://www.amule.org" target
="_blank"><img src
="emule.gif"></a
>
116 <font face
="Tahoma" style
="font-size:13pt;" color
="#000000">aMule
<br
>Web Control Panel
</font
>
118 <td
class="tabs" align
="center" width
="30"> 
; </td
>
120 <td align
="center" class="tabs" width
="95">
121 <a href
="servers.php">
122 <img src
="cp_servers.gif"><br
>
126 <td align
="center" class="tabs" width
="95">
127 <a href
="downloads.php">
128 <img src
="cp_download.gif"><br
>
133 <td align
="center" class="tabs" width
="95">
134 <a href
="search.php">
135 <img src
="cp_search.gif"><br
>
139 <td align
="center" class="tabs" width
="95">
141 <a href
="shared.php">
142 <img src
="cp_shared.gif"><br
>
145 <td align
="center" class="tabs" width
="110">
146 <a href
="stat_tree.php">
147 <img src
="cp_stats.gif"><br
>
149 <font color
="#000000">|
</font
>
151 <a href
="stat_graphs.php">Graphs
</a
>
154 <td align
="center" class="tabs" width
="95">
155 <a href
="preferences.php">
156 <img src
="cp_settings.gif"><br
>
161 <td
class="tabs" align
="center" width
="30"> 
;</td
>
162 <td align
="left" class="tabs" width
="95">
163 <img src
="log.gif"> <a href
="index.php?serverinfo=1">Serverinfo
</a
><br
>
164 <img src
="log.gif"> <a href
="index.php?log=1">Log
</a
>
172 <td style
="background-color: #000000; height: 1px" colspan
="2">
177  
; 
;<b
>Connection
:</b
>
179 function CastToXBytes($size)
181 if ( $size < 1024 ) {
182 $result = $size . " bytes";
183 } elseif ( $size < 1048576 ) {
184 $result = ($size / 1024.0) . "KB";
185 } elseif ( $size < 1073741824 ) {
186 $result = ($size / 1048576.0) . "MB";
188 $result = ($size / 1073741824.0) . "GB";
193 $stats = amule_get_stats();
194 if ( $stats["kad_connected"] == 1 ) {
196 if ( $stats["kad_firewalled"] == 1 ) {
197 echo " to KAD (firewalled), ";
202 echo "Not connected to KAD, ";
204 if ( $stats["id"] == 0 ) {
205 echo "not connected to ED2K";
206 } elseif ( $stats["id"] == 0xffffffff ) {
207 echo "connecting to ED2k";
209 echo "connected with ", (($stats["id"] < 16777216) ?
"low" : "high"), " ID to ",
210 $stats["serv_name"], " ", $stats["serv_addr"];
212 echo '<br> <b>Speed:</b> Up: ', CastToXBytes($stats["speed_up"]), 'ps',
213 ' | Down: ', CastToXBytes($stats["speed_down"]), 'ps',
214 '<small> (Limits: ', CastToXBytes($stats["speed_limit_up"]), 'ps/',
215 CastToXBytes($stats["speed_limit_down"]), 'ps)</small> ';
220 <script type
="text/javascript" language
="javascript">
222 s
= "[ " + d
.getDate() +
"/" +
(d
.getMonth() +
1) +
"/" + d
.getFullYear() +
" " + d
.getHours() +
":" +
(d
.getMinutes() < 10 ?
"0" : "") + d
.getMinutes() +
":" +
(d
.getSeconds() < 10 ?
"0" : "") + d
.getSeconds() +
" ]";
227 <td align
=left
class=tabs
>
229 <input type
="button" value
="ed2k://Download" onClick
='self.location.href="index.php?links=1"'>
230 <input type
="button" value
="Logout" onClick
='self.location.href="login.php"'>
239 // reload graphs data
240 amule_load_vars("stats_graph");
243 <table border
=0 align
=center cellpadding
=4 cellspacing
=0>
245 <td
class="websearch-line"><img src
="amule_stats_download.png" width
="500" height
="200" border
="0" alt
="" title
="" /></td
>
248 <td width
="600" class="websearch-line"><b
><font face
=Tahoma style
="font-size:8pt;">Download speed
</font
></b
></td
>
252 <table border
=0 align
=center cellpadding
=4 cellspacing
=0>
254 <td
class="websearch-line"><img src
="amule_stats_upload.png" width
="500" height
="200" border
="0" alt
="" title
="" /></td
>
257 <td width
="600" class="websearch-line"><b
><font face
=Tahoma style
="font-size:8pt;">Upload speed
</font
></b
></td
>
261 <table border
=0 align
=center cellpadding
=4 cellspacing
=0>
263 <td
class="websearch-line"><img src
="amule_stats_conncount.png" width
="500" height
="200" border
="0" alt
="" title
="" /></td
>
266 <td width
="600" class="websearch-line"><b
><font face
=Tahoma style
="font-size:8pt;">Number of connections
</font
></b
></td
>