@@ -42,15 +42,15 @@ |
||
42 | 42 | $start_id = 0; //Set this to something else if you like |
43 | 43 | $profiles = _mysql_query("select * from profile where userid>$start_id order by userid"); |
44 | 44 | echo _mysql_error(); |
45 | - $i=0; |
|
46 | - while ($profile = _mysql_fetch_object($profiles)){ |
|
45 | + $i = 0; |
|
46 | + while ($profile = _mysql_fetch_object($profiles)) { |
|
47 | 47 | $i++; |
48 | 48 | if ($i%100 == 0) { //For every 100 profiles |
49 | - echo $profile->userid.". "; flush(); // print out where we are |
|
49 | + echo $profile->userid.". "; flush(); // print out where we are |
|
50 | 50 | //usleep(200000); |
51 | 51 | } |
52 | 52 | |
53 | - if ($profile->userid > $start_id){ |
|
53 | + if ($profile->userid > $start_id) { |
|
54 | 54 | fix_profile($profile); |
55 | 55 | } |
56 | 56 | } |
@@ -197,5 +197,5 @@ |
||
197 | 197 | |
198 | 198 | admin_page_tail(); |
199 | 199 | |
200 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
200 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
201 | 201 | ?> |
@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -44,5 +44,5 @@ |
||
44 | 44 | "; |
45 | 45 | page_tail(); |
46 | 46 | |
47 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
47 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
48 | 48 | ?> |
@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | if (!$hosts_per_page) { |
30 | 30 | $hosts_per_page = 20; |
31 | 31 | } |
32 | -define ('ITEM_LIMIT', 10000); |
|
32 | +define('ITEM_LIMIT', 10000); |
|
33 | 33 | |
34 | 34 | function get_top_hosts($offset, $sort_by) { |
35 | 35 | global $hosts_per_page; |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | $offset = get_int("offset", true); |
55 | -if (!$offset) $offset=0; |
|
56 | -if ($offset % $hosts_per_page) $offset = 0; |
|
55 | +if (!$offset) $offset = 0; |
|
56 | +if ($offset%$hosts_per_page) $offset = 0; |
|
57 | 57 | |
58 | 58 | if ($offset >= ITEM_LIMIT) { |
59 | 59 | error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT)); |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | |
62 | 62 | $cache_args = "sort_by=$sort_by&offset=$offset"; |
63 | 63 | $cacheddata = get_cached_data(TOP_PAGES_TTL, $cache_args); |
64 | -if ($cacheddata){ |
|
64 | +if ($cacheddata) { |
|
65 | 65 | $data = unserialize($cacheddata); |
66 | 66 | } else { |
67 | - $data = get_top_hosts($offset,$sort_by); |
|
67 | + $data = get_top_hosts($offset, $sort_by); |
|
68 | 68 | set_cached_data(TOP_PAGES_TTL, serialize($data), $cache_args); |
69 | 69 | }; |
70 | 70 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | top_host_table_start($sort_by); |
76 | 76 | $i = 1 + $offset; |
77 | 77 | $n = sizeof($data); |
78 | -foreach($data as $host) { |
|
78 | +foreach ($data as $host) { |
|
79 | 79 | show_host_row($host, $i, false, true, false); |
80 | 80 | $i++; |
81 | 81 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | } |
89 | 89 | |
90 | -if ($n==$hosts_per_page){ //If we aren't on the last page |
|
90 | +if ($n == $hosts_per_page) { //If we aren't on the last page |
|
91 | 91 | $new_offset = $offset + $hosts_per_page; |
92 | 92 | echo "<a href=top_hosts.php?sort_by=$sort_by&offset=$new_offset>".tra("Next %1", $hosts_per_page)."</a>"; |
93 | 93 | } |