Improve speed of category tab title updates
[amule.git] / src / webserver / default / amuleweb-main-log.php
blob22f0ff6155125e0aaf43712ad667f71ab4247db9
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>aMule control panel</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <script language="JavaScript" type="text/JavaScript">
8 <!--
9 function MM_swapImgRestore() { //v3.0
10 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
13 function MM_preloadImages() { //v3.0
14 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
15 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
16 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
19 function MM_findObj(n, d) { //v4.01
20 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
21 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
22 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
23 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
24 if(!x && d.getElementById) x=d.getElementById(n); return x;
27 function MM_swapImage() { //v3.0
28 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
29 if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
31 //-->
32 </script>
33 <link href="style.css" rel="stylesheet" type="text/css"><style type="text/css">
34 <!--
35 caption {
36 font-family: Helvetica;
37 font-size: 18px;
38 font-weight: bold;
39 color: #003161;
41 th {
42 font-family: Helvetica;
43 font-size: 14px;
44 font-height: 22px;
45 font-weight: bold;
46 color: #003161;
48 a:link {
49 color: #003161;
50 text-decoration: none;
52 a:active {
53 color: #003161;
54 text-decoration: none;
56 a:visited {
57 color: #003161;
58 text-decoration: none;
60 a:hover {
61 color: #c0c0c0;
62 text-decoration: underline;
64 td {
65 font-family: Helvetica;
66 font-size: 12px;
67 font-weight: normal;
69 label {
70 font-family: Helvetica;
71 font-size: 14px;
72 font-weight: bold;
74 .texte {
75 font-family: Helvetica;
76 font-size: 12px;
77 font-weight: normal;
79 label {
80 font-family:"trebuchet ms",sans-serif;
81 font-size: 12px;
82 font-weight:bold
84 input {
85 border:1px solid #003161;
86 background-color: white;
87 font-family:"trebuchet ms",sans-serif;
88 font-size: 12px;
89 color: #003161;
91 select, option {
92 background-color: white;
93 font-size: 12px;
94 color: #003161;
96 textarea {
97 border:1px solid #003161;
98 background-color: #90B6DB;
99 font-family:"trebuchet ms",sans-serif;
100 font-size: 12px;
101 color: white;
104 </style>
105 </head><script language="JavaScript" type="text/JavaScript">
106 function formCommandSubmit(command)
108 var frm=document.forms.mainform
109 frm.command.value=command
110 frm.submit()
113 var initvals = new Object;
115 <?php
116 // apply new options before proceeding
117 //var_dump($HTTP_GET_VARS);
118 if ( ($HTTP_GET_VARS["Submit"] == "Apply") && ($_SESSION["guest_login"] == 0) ) {
119 $file_opts = array("check_free_space", "extract_metadata",
120 "ich_en","aich_trust", "preview_prio","save_sources", "resume_same_cat",
121 "min_free_space", "new_files_paused", "alloc_full", "alloc_full_chunks",
122 "new_files_auto_dl_prio", "new_files_auto_ul_prio"
124 $conn_opts = array("max_line_up_cap","max_up_limit",
125 "max_line_down_cap","max_down_limit", "slot_alloc",
126 "tcp_port","udp_dis","max_file_src","max_conn_total","autoconn_en");
127 $webserver_opts = array("use_gzip", "autorefresh_time");
129 $all_opts;
130 foreach ($conn_opts as $i) {
131 $curr_value = $HTTP_GET_VARS[$i];
132 if ( $curr_value == "on") $curr_value = 1;
133 if ( $curr_value == "") $curr_value = 0;
135 $all_opts["connection"][$i] = $curr_value;
137 foreach ($file_opts as $i) {
138 $curr_value = $HTTP_GET_VARS[$i];
139 if ( $curr_value == "on") $curr_value = 1;
140 if ( $curr_value == "") $curr_value = 0;
142 $all_opts["files"][$i] = $curr_value;
144 foreach ($webserver_opts as $i) {
145 $curr_value = $HTTP_GET_VARS[$i];
146 if ( $curr_value == "on") $curr_value = 1;
147 if ( $curr_value == "") $curr_value = 0;
149 $all_opts["webserver"][$i] = $curr_value;
151 //var_dump($all_opts);
152 amule_set_options($all_opts);
154 $opts = amule_get_options();
155 //var_dump($opts);
156 $opt_groups = array("connection", "files", "webserver");
157 //var_dump($opt_groups);
158 foreach ($opt_groups as $group) {
159 $curr_opts = $opts[$group];
160 //var_dump($curr_opts);
161 foreach ($curr_opts as $opt_name => $opt_val) {
162 echo 'initvals["', $opt_name, '"] = "', $opt_val, '";';
167 <!-- Assign php generated data to controls -->
168 function init_data()
170 var frm = document.forms.mainform
172 var str_param_names = new Array(
173 "max_line_down_cap", "max_line_up_cap",
174 "max_up_limit", "max_down_limit", "max_file_src",
175 "slot_alloc", "max_conn_total",
176 "tcp_port", "udp_port",
177 "min_free_space",
178 "autorefresh_time"
180 for(i = 0; i < str_param_names.length; i++) {
181 frm[str_param_names[i]].value = initvals[str_param_names[i]];
183 var check_param_names = new Array(
184 "autoconn_en", "reconn_en", "udp_dis", "new_files_paused",
185 "aich_trust", "alloc_full", "alloc_full_chunks",
186 "check_free_space", "extract_metadata", "ich_en",
187 "new_files_auto_dl_prio", "new_files_auto_ul_prio",
188 "use_gzip"
190 for(i = 0; i < check_param_names.length; i++) {
191 frm[check_param_names[i]].checked = initvals[check_param_names[i]] == "1" ? true : false;
195 </script>
196 <body background="images/fond.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('images/transf_1.png','images/shared_1.png','images/search_1.png','images/edkserv_1.png','images/sheserv_1.png','images/stats_1.png');init_data();">
197 <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
198 <tr valign="top">
199 <td width="143" height="64"><img src="images/logo.png" width="143" height="64"></td>
200 <td width="100%" height="64" align="right" background="images/fond_haut.png"> <table border="0" cellspacing="0" cellpadding="0">
201 <tr>
202 <td><a href="amuleweb-main-dload.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('transfert','','images/transf_1.png',1)"><img src="images/transf_0.png" alt="transfert" name="transfert" width="52" height="50" border="0"></a></td>
203 <td><a href="amuleweb-main-shared.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('shared','','images/shared_1.png',1)"><img src="images/shared_0.png" alt="shared" name="shared" width="52" height="50" border="0"></a></td>
204 <td><a href="amuleweb-main-search.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('search','','images/search_1.png',1)"><img src="images/search_0.png" alt="search" name="search" width="52" height="50" border="0"></a></td>
205 <td><a href="amuleweb-main-servers.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('edkserver','','images/edkserv_1.png',1)"><img src="images/edkserv_0.png" alt="edkserver" name="edkserver" width="52" height="50" border="0"></a></td>
206 <td><a href="amuleweb-main-kad.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('sheserv','','images/sheserv_1.png',1)"><img src="images/sheserv_0.png" alt="sheserv" name="sheserv" width="52" height="50" border="0"></a></td>
207 <td><a href="amuleweb-main-stats.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('statistiques','','images/stats_1.png',1)"><img src="images/stats_0.png" alt="statistiques" name="statistiques" width="52" height="50" border="0"></a></td>
208 <td><img src="images/col.png"></td>
209 <td width="10"></td>
210 <td width="190" align="right" class="texteinv"><a href="login.php">exit</a><br>
211 <a href="amuleweb-main-log.php">log &bull;</a> <a href="amuleweb-main-prefs.php">configuration</a></td>
212 <td width="10"></td>
213 </tr>
214 </table></td>
215 </tr>
216 <tr align="center" valign="top">
217 <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
218 <caption>
219 AMULE LOG
220 </caption>
221 <tr>
222 <td width="24"><img src="images/tab_top_left.png" width="24" height="24"></td>
223 <td background="images/tab_top.png">&nbsp;</td>
224 <td width="24"><img src="images/tab_top_right.png" width="24" height="24"></td>
225 </tr>
226 <tr>
227 <td width="24" background="images/tab_left.png">&nbsp;</td>
228 <td bgcolor="#FFFFFF">
230 <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
231 <!--DWLayoutTable-->
232 <tr valign="top">
233 <td>
234 <h1 style="display:inline;">aMule log</h1>
235 <a href="log.php?rstlog=1" target="logframe" onclick="return confirm('Do you really want to reset aMule log?')">(Reset log)</a><br>
236 <iframe width="100%" height="400" name="logframe" src="log.php"></iframe>
237 </td>
238 </tr><tr>
239 <td>
240 <h1 style="display:inline;">Serverinfo</h1>
241 <a href="log.php?rstsrv=1" target="srvframe" onclick="return confirm('Do you really want to reset Serverinfo?')">(Reset Serverinfo)</a>
242 <iframe width="100%" height="200" name="srvframe" src="log.php?show=srv"></iframe>
243 </td>
244 </tr>
245 </tr>
246 </table>
247 </td>
248 <td width="24" background="images/tab_right.png">&nbsp;</td>
249 </tr>
250 <tr>
251 <td width="24"><img src="images/tab_bottom_left.png" width="24" height="24"></td>
252 <td background="images/tab_bottom.png">&nbsp;</td>
253 <td width="24"><img src="images/tab_bottom_right.png" width="24" height="24"></td>
254 </tr>
255 </table>
256 </td>
257 </tr>
258 <tr valign="bottom">
259 <td height="25" colspan="2"> <table width="100%" height="40" border="0" cellpadding="0" cellspacing="0">
260 <tr align="center" valign="middle">
261 <td width="50%"> <iframe name="stats" src="footer.php" height="35" width="100%" scrolling="no" frameborder="0">edklink</iframe>
262 </td>
263 <td width="50%"> <iframe name="stats" src="stats.php" height="35" width="100%" scrolling="no" frameborder="0">connection</iframe>
264 </td>
265 </tr>
266 </table></td>
267 </tr>
268 </table>
269 </body>
270 </html>