1 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <title
>amule preferences page
</title
>
6 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf8">
7 <meta http
-equiv
="pragmas" content
="no-cache">
9 if ( $_SESSION["auto_refresh"] > 0 ) {
10 echo "<meta http-equiv=\"refresh\" content=\"", $_SESSION["auto_refresh"], '">';
13 <style type
="text/css">
32 background
-color
: #ffffff;
37 <script language
="JavaScript" type
="text/JavaScript">
38 var openImg
= new Image();
39 openImg
.src
= "tree-open.gif";
40 var closedImg
= new Image();
41 closedImg
.src
= "tree-closed.gif";
43 function showBranch(branch
){
44 var objBranch
= document
.getElementById(branch
).style
;
45 if(objBranch
.display
!="none")
46 objBranch
.display
="none";
48 objBranch
.display
="block";
51 function swapFolder(img
){
52 objImg
= document
.getElementById(img
);
53 if(objImg
.src
.indexOf('tree-closed.gif')>-1)
54 objImg
.src
= openImg
.src
;
56 objImg
.src
= closedImg
.src
;
60 <body onLoad
="showBranch('br_Stats');swapFolder('fl_Stats')">
63 function print_ident($i)
71 function print_item($it, $ident)
74 echo "<img src=\"tree-leaf.gif\">", $it, "<br>\n";
77 function print_folder($key, &$arr, $ident)
80 echo "<span class=\"trigger\" onClick=\"showBranch('br_",
81 $key, "');swapFolder('fl_", $key, "')\">\n";
82 print_ident($ident+
1);
83 echo "<img src=\"tree-open.gif\" border=\"0\" id=\"fl_", $key, "\">\n";
84 print_ident($ident+
1);
89 echo "<span class=\"branch\" id=\"br_", $key, "\">\n";
91 foreach ($arr as $k => $v) {
93 print_folder($k, $v, $ident+
1);
95 print_item($k, $ident+
1);
103 $stattree = amule_load_vars("stats_tree");
105 foreach ($stattree as $k => $v) {
107 print_folder($k, $v, $ident+
1);
109 print_item($k, $ident+
1);