@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | </form> |
53 | 53 | <hr> |
54 | 54 | "; |
55 | - if (strcmp($err_msg,"")!=0){ |
|
55 | + if (strcmp($err_msg, "") != 0) { |
|
56 | 56 | echo "<p>$err_msg<hr>"; |
57 | 57 | } |
58 | 58 | $files = array(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } else { |
67 | 67 | sort($files); |
68 | 68 | start_table(); |
69 | - table_header("Name<br><p class=\"text-muted\">(click to view)</p>", "Modified", "Size (bytes)", "MD5", "Delete","Download"); |
|
69 | + table_header("Name<br><p class=\"text-muted\">(click to view)</p>", "Modified", "Size (bytes)", "MD5", "Delete", "Download"); |
|
70 | 70 | foreach ($files as $f) { |
71 | 71 | $path = "$dir/$f"; |
72 | 72 | list($error, $size, $md5) = sandbox_parse_link_file($path); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $s = stat($tmp_name); |
117 | 117 | $size = $s['size']; |
118 | 118 | list($exist, $elf) = sandbox_lf_exist($user, $md5); |
119 | - if ($exist){ |
|
119 | + if ($exist) { |
|
120 | 120 | $notice .= "<strong>Notice:</strong> Invalid Upload<br/>"; |
121 | 121 | $notice .= "You are trying to upload file <strong>$name</strong><br/>"; |
122 | 122 | $notice .= "Another file <strong>$elf</strong> with the same content (md5: $md5) already exists!<br/>"; |
@@ -149,15 +149,15 @@ discard block |
||
149 | 149 | error_page("no such physical file"); |
150 | 150 | } |
151 | 151 | $bused = sandbox_file_in_use($user, $name); |
152 | - if ($bused){ |
|
152 | + if ($bused) { |
|
153 | 153 | $notice = "<strong>$name</strong> is being used by batch(es), you can not delete it now!<br/>"; |
154 | - } else{ |
|
154 | + } else { |
|
155 | 155 | $notice = "<strong>$name</strong> is not being used by any batch(es) and successfully deleted from your sandbox<br/>"; |
156 | 156 | unlink("$dir/$name"); |
157 | 157 | unlink($p); |
158 | 158 | |
159 | 159 | } |
160 | - list_files($user,$notice); |
|
160 | + list_files($user, $notice); |
|
161 | 161 | //Header("Location: sandbox.php"); |
162 | 162 | } |
163 | 163 | function download_file($user) { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | if (!$action) $action = post_str('action', true); |
195 | 195 | |
196 | 196 | switch ($action) { |
197 | -case '': list_files($user,""); break; |
|
197 | +case '': list_files($user, ""); break; |
|
198 | 198 | case 'upload_file': upload_file($user); break; |
199 | 199 | case 'delete_file': delete_file($user); break; |
200 | 200 | case 'download_file': download_file($user); break; |
@@ -82,7 +82,7 @@ |
||
82 | 82 | echo "<rpc_response>\n"; |
83 | 83 | echo "<count>$count</count>\n"; |
84 | 84 | echo "<threads>\n"; |
85 | - foreach($threads as $thread) { |
|
85 | + foreach ($threads as $thread) { |
|
86 | 86 | echo "<thread>\n"; |
87 | 87 | echo " <id>$thread->id</id>\n"; |
88 | 88 | echo " <forumid>$thread->forum</forumid>\n"; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $venue = get_str("venue"); |
30 | 30 | $confirmed = get_str("confirmed", true); |
31 | 31 | $columns = get_int("cols", true); |
32 | -$c = $columns?"&cols=$columns":""; |
|
32 | +$c = $columns ? "&cols=$columns" : ""; |
|
33 | 33 | |
34 | 34 | if ($confirmed) { |
35 | 35 | if ($subset == "global") { |
@@ -56,5 +56,5 @@ discard block |
||
56 | 56 | page_tail(); |
57 | 57 | } |
58 | 58 | |
59 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
59 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
60 | 60 | ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // See if "action" is provided - either through post or get |
39 | 39 | if (!post_str('action', true)) { |
40 | - if (!get_str('action', true)){ |
|
40 | + if (!get_str('action', true)) { |
|
41 | 41 | error_page(tra("You must specify an action...")); |
42 | 42 | } else { |
43 | 43 | $action = get_str('action'); |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $userid = post_int('userid'); |
50 | -$user=BoincUser::lookup_id($userid); |
|
50 | +$user = BoincUser::lookup_id($userid); |
|
51 | 51 | |
52 | -if ($action!="start"){ |
|
52 | +if ($action != "start") { |
|
53 | 53 | error_page("Unknown action"); |
54 | 54 | } |
55 | 55 | |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | $mod_category = tra("Other"); |
66 | 66 | } |
67 | 67 | |
68 | -if (post_str('reason', true)){ |
|
69 | - start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
|
68 | +if (post_str('reason', true)) { |
|
69 | + start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason")); |
|
70 | 70 | } else { |
71 | - start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
|
71 | + start_vote($config, $logged_in_user, $user, $mod_category, "None given"); |
|
72 | 72 | } |
73 | 73 | |
74 | -$cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit |
|
74 | +$cvs_version_tracker[] = "\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit |
|
75 | 75 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $userid = get_int("userid"); |
29 | 29 | $offset = get_int("offset", true); |
30 | -if (!$offset) $offset=0; |
|
30 | +if (!$offset) $offset = 0; |
|
31 | 31 | $items_per_page = 20; |
32 | 32 | |
33 | 33 | $user = BoincUser::lookup_id($userid); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | break; |
113 | 113 | } |
114 | 114 | if ($n >= $offset) { |
115 | - show_post_and_context($post, $thread, $forum, $options, $n+1); |
|
115 | + show_post_and_context($post, $thread, $forum, $options, $n + 1); |
|
116 | 116 | } |
117 | 117 | $n++; |
118 | 118 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } else { |
40 | 40 | $last_mod_time = time(); |
41 | 41 | } |
42 | -$create_date = gmdate('D, d M Y H:i:s', $last_mod_time) . ' GMT'; |
|
42 | +$create_date = gmdate('D, d M Y H:i:s', $last_mod_time).' GMT'; |
|
43 | 43 | |
44 | 44 | header("Expires: ".gmdate('D, d M Y H:i:s', time())." GMT"); |
45 | 45 | header("Last-Modified: ".$create_date); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | $users = BoincUser::enum("teamid=$team->id"); |
50 | 50 | $ninactive_users = 0; |
51 | -foreach($users as $user) { |
|
51 | +foreach ($users as $user) { |
|
52 | 52 | if ($user->id == $logged_in_user->id) continue; |
53 | 53 | if ($user->id == $team->userid) continue; |
54 | 54 | $user_total_credit = format_credit($user->total_credit); |
@@ -107,7 +107,7 @@ |
||
107 | 107 | row_array( |
108 | 108 | array( |
109 | 109 | "Total", |
110 | - number_format($total_nhosts, 0). " computers", |
|
110 | + number_format($total_nhosts, 0)." computers", |
|
111 | 111 | "", |
112 | 112 | "", |
113 | 113 | number_format($total_gflops/1e3, 2)." TeraFLOPS" |
@@ -45,7 +45,7 @@ |
||
45 | 45 | rowify(tra("Your vote to reject this profile has been recorded.")); |
46 | 46 | } |
47 | 47 | end_table(); |
48 | -echo "<br><a href=\"view_profile.php?userid=", $userid ,"\">" . tra("Return to profile.") . "</a>"; |
|
48 | +echo "<br><a href=\"view_profile.php?userid=", $userid, "\">".tra("Return to profile.")."</a>"; |
|
49 | 49 | |
50 | 50 | page_tail(); |
51 | 51 |