@@ -100,7 +100,7 @@ |
||
100 | 100 | $f = fopen("temp.xml", "w"); |
101 | 101 | $teams = BoincTeam::enum(null); |
102 | 102 | fwrite($f, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<teams>\n"); |
103 | - foreach($teams as $team) { |
|
103 | + foreach ($teams as $team) { |
|
104 | 104 | handle_team($team, $f); |
105 | 105 | } |
106 | 106 | fwrite($f, "</teams>\n"); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $i = 0; |
40 | 40 | foreach ($badges as $badge) { |
41 | 41 | echo "<tr class=row$i valign=top><form action=badge_admin.php method=POST>"; |
42 | - $i = 1-$i; |
|
42 | + $i = 1 - $i; |
|
43 | 43 | echo "<td>$badge->id</td>\n"; |
44 | 44 | echo "<input type=hidden name=id value=$badge->id>"; |
45 | 45 | $nu = BoincBadgeUser::count("badge_id=$badge->id"); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | $db_revision = 0; |
23 | 23 | if (file_exists("../../db_revision")) { |
24 | - $db_revision = (int) file_get_contents("../../db_revision"); |
|
24 | + $db_revision = (int)file_get_contents("../../db_revision"); |
|
25 | 25 | } |
26 | 26 | require_once("db_update.php"); |
27 | 27 |
@@ -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 | ?> |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $post = array(); |
59 | 59 | $post["request"] = $xml; |
60 | 60 | if ($req->type == "upload") { |
61 | - $i=0; |
|
61 | + $i = 0; |
|
62 | 62 | foreach ($files as $f) { |
63 | 63 | if ($f['path'] != "") { |
64 | 64 | $post["file_$i"] = '@'.$f['path']; |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | curl_setopt($ch, CURLOPT_POSTFIELDS, $post); |
71 | 71 | $reply = curl_exec($ch); |
72 | 72 | if ($reply) { |
73 | - print $reply . "\n"; |
|
73 | + print $reply."\n"; |
|
74 | 74 | } else { |
75 | - print curl_error($ch) . "\n"; |
|
75 | + print curl_error($ch)."\n"; |
|
76 | 76 | } |
77 | 77 | curl_close($ch); |
78 | 78 | } |
@@ -29,5 +29,5 @@ |
||
29 | 29 | echo "Host RPC time cleared for host ID: $hostid\n"; |
30 | 30 | |
31 | 31 | admin_page_tail(); |
32 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
32 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
33 | 33 | ?> |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | if ($is_helpdesk) { |
42 | 42 | $diff = ($now - $thread->create_time)/86400; |
43 | - $activity = ($thread->sufferers+1)/$diff; |
|
43 | + $activity = ($thread->sufferers + 1)/$diff; |
|
44 | 44 | echo "thread $thread->id helpdesk $diff $activity\n"; |
45 | 45 | } else { |
46 | 46 | $posts = BoincPost::enum("thread=$thread->id"); |
@@ -26,25 +26,25 @@ |
||
26 | 26 | row_array(array("Name", "Engine", "Version", "Row Format", "Rows", "Avg Row Length (KB)", "Data Length (MB)", "Max Data Length (MB)", "Index Length (MB)", "Data free (MB)", "Create Time", "Update Time", "Check Time", "Create Options", "Comment")); |
27 | 27 | _mysql_select_db($db); |
28 | 28 | $result = _mysql_query("show table status"); |
29 | - while($row = _mysql_fetch_array($result)) { |
|
29 | + while ($row = _mysql_fetch_array($result)) { |
|
30 | 30 | $size += ($row["Data_length"] + $row["Index_length"]); |
31 | 31 | $engine = $row["Engine"]; |
32 | 32 | if (!$engine) $engine = $row["Type"]; |
33 | 33 | row_array(array( |
34 | 34 | $row["Name"], |
35 | 35 | $engine, |
36 | - $row["Version"] , |
|
37 | - $row["Row_format"] , |
|
38 | - $row["Rows"] , |
|
39 | - round($row["Avg_row_length"]/1024,2) , |
|
40 | - round($row["Data_length"]/(1024*1024),2) , |
|
41 | - round($row["Max_data_length"]/(1024*1024),2) , |
|
42 | - round($row["Index_length"]/(1024*1024),2) , |
|
43 | - round($row["Data_free"]/(1024*1024),2) , |
|
44 | - $row["Create_time"] , |
|
45 | - $row["Update_time"] , |
|
46 | - $row["Check_time"] , |
|
47 | - $row["Create_options"] , |
|
36 | + $row["Version"], |
|
37 | + $row["Row_format"], |
|
38 | + $row["Rows"], |
|
39 | + round($row["Avg_row_length"]/1024, 2), |
|
40 | + round($row["Data_length"]/(1024*1024), 2), |
|
41 | + round($row["Max_data_length"]/(1024*1024), 2), |
|
42 | + round($row["Index_length"]/(1024*1024), 2), |
|
43 | + round($row["Data_free"]/(1024*1024), 2), |
|
44 | + $row["Create_time"], |
|
45 | + $row["Update_time"], |
|
46 | + $row["Check_time"], |
|
47 | + $row["Create_options"], |
|
48 | 48 | $row["Comment"] |
49 | 49 | )); |
50 | 50 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $n = 0; |
52 | 52 | while (1) { |
53 | 53 | $n++; |
54 | - if ($n % 1000 == 0) echo "$n\n"; |
|
54 | + if ($n%1000 == 0) echo "$n\n"; |
|
55 | 55 | $x = fgets($fres); |
56 | 56 | if (!$x) break; |
57 | 57 | list($reswuid, $resid) = sscanf($x, "%d %d"); |