@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | $acquired = $acquired - $required; |
74 | 74 | $progress = 100; |
75 | 75 | } else { |
76 | - $progress = round($acquired / ($required) * 100); |
|
77 | - $progress2 = round($acquired / ($required) * 100,1); |
|
76 | + $progress = round($acquired/($required)*100); |
|
77 | + $progress2 = round($acquired/($required)*100, 1); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | $col2 = "<input style=\"float: left\" type=\"radio\" name=\"item_id\" value=\"".$row->id."\""; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } elseif ($progress == 100) { |
90 | 90 | $col2 .= "<div style=\"float: left; width: 300px; height: 18px; background-color: green; border: 1px solid #000000\">"; |
91 | 91 | } else { |
92 | - $col2 .= "<div style=\"float: left; width: ".($progress*3 - 1)."px; height: 18px; background-color: green; border: 1px solid #000000;\" align=\"right\"><b>".$progress2."</b>%</div><div style=\"float: left; width: ".((100-$progress)*3 - 1)."px; height: 18px; background-color: red; border: 1px solid #000000;\">"; |
|
92 | + $col2 .= "<div style=\"float: left; width: ".($progress*3 - 1)."px; height: 18px; background-color: green; border: 1px solid #000000;\" align=\"right\"><b>".$progress2."</b>%</div><div style=\"float: left; width: ".((100 - $progress)*3 - 1)."px; height: 18px; background-color: red; border: 1px solid #000000;\">"; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | row2($col1, $col2); |
@@ -98,50 +98,35 @@ |
||
98 | 98 | $amount = "<select class=\"form-control\" name=\"from\" onchange=\"Cvalue();numberFormat();\" style=\"width: 200px;\">\n"; |
99 | 99 | if (DONATION_CURRENCY == "EUR") { |
100 | 100 | $amount .= "<option value=\"51\">Euros</option>\n"; |
101 | -} |
|
102 | -elseif (DONATION_CURRENCY == "CAD") { |
|
101 | +} elseif (DONATION_CURRENCY == "CAD") { |
|
103 | 102 | $amount .= "<option value=\"30\">Canadian Dollars</option>\n"; |
104 | -} |
|
105 | -elseif (DONATION_CURRENCY == "GBP") { |
|
103 | +} elseif (DONATION_CURRENCY == "GBP") { |
|
106 | 104 | $amount .= "<option value=\"24\">Pounds Sterling</option>\n"; |
107 | -} |
|
108 | -elseif (DONATION_CURRENCY == "USD") { |
|
105 | +} elseif (DONATION_CURRENCY == "USD") { |
|
109 | 106 | $amount .= "<option value=\"3\">U.S. Dollars</option>\n"; |
110 | -} |
|
111 | -elseif (DONATION_CURRENCY == "JPY") { |
|
107 | +} elseif (DONATION_CURRENCY == "JPY") { |
|
112 | 108 | $amount .= "<option value=\"72\">Yen</option>\n"; |
113 | -} |
|
114 | -elseif (DONATION_CURRENCY == "AUD") { |
|
109 | +} elseif (DONATION_CURRENCY == "AUD") { |
|
115 | 110 | $amount .= "<option value=\"9\">Australian Dollars</option>\n"; |
116 | -} |
|
117 | -elseif (DONATION_CURRENCY == "NZD") { |
|
111 | +} elseif (DONATION_CURRENCY == "NZD") { |
|
118 | 112 | $amount .= "<option value=\"102\">New Zealand Dollars</option>\n"; |
119 | -} |
|
120 | -elseif (DONATION_CURRENCY == "CHF") { |
|
113 | +} elseif (DONATION_CURRENCY == "CHF") { |
|
121 | 114 | $amount .= "<option value=\"139\">Swiss Francs</option>\n"; |
122 | -} |
|
123 | -elseif (DONATION_CURRENCY == "HKD") { |
|
115 | +} elseif (DONATION_CURRENCY == "HKD") { |
|
124 | 116 | $amount .= "<option value=\"63\">Hong Kong Dollars</option>\n"; |
125 | -} |
|
126 | -elseif (DONATION_CURRENCY == "SGD") { |
|
117 | +} elseif (DONATION_CURRENCY == "SGD") { |
|
127 | 118 | $amount .= "<option value=\"126\">Singapore Dollars</option>\n"; |
128 | -} |
|
129 | -elseif (DONATION_CURRENCY == "SEK") { |
|
119 | +} elseif (DONATION_CURRENCY == "SEK") { |
|
130 | 120 | $amount .= "<option value=\"138\">Swedish Kronor</option>\n"; |
131 | -} |
|
132 | -elseif (DONATION_CURRENCY == "DKK") { |
|
121 | +} elseif (DONATION_CURRENCY == "DKK") { |
|
133 | 122 | $amount .= "<option value=\"42\">Danish Kroner</option>\n"; |
134 | -} |
|
135 | -elseif (DONATION_CURRENCY == "PLN") { |
|
123 | +} elseif (DONATION_CURRENCY == "PLN") { |
|
136 | 124 | $amount .= "<option value=\"114\">Polish Zloty</option>\n"; |
137 | -} |
|
138 | -elseif (DONATION_CURRENCY == "NOK") { |
|
125 | +} elseif (DONATION_CURRENCY == "NOK") { |
|
139 | 126 | $amount .= "<option value=\"106\">Norwegian Kroner</option>\n"; |
140 | -} |
|
141 | -elseif (DONATION_CURRENCY == "HUF") { |
|
127 | +} elseif (DONATION_CURRENCY == "HUF") { |
|
142 | 128 | $amount .= "<option value=\"64\">Hungarian Forint</option>\n"; |
143 | -} |
|
144 | -elseif (DONATION_CURRENCY == "CZK") { |
|
129 | +} elseif (DONATION_CURRENCY == "CZK") { |
|
145 | 130 | $amount .= "<option value=\"41\">Czech Koruna</option>\n"; |
146 | 131 | } |
147 | 132 | $amount .= "</select>\n"; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | BoincForumPrefs::lookup($user); |
31 | 31 | |
32 | -if (post_str("action", true)=="reset_confirm"){ |
|
32 | +if (post_str("action", true) == "reset_confirm") { |
|
33 | 33 | page_head(tra("Confirm reset")); |
34 | 34 | echo tra("This action will erase any changes you have made in your community preferences. To cancel, click your browser's Back button.")." |
35 | 35 | <p> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // If the user has requested a reset of preferences; |
46 | 46 | // preserve a few fields. |
47 | 47 | // |
48 | -if (post_str("action", true)=="reset"){ |
|
48 | +if (post_str("action", true) == "reset") { |
|
49 | 49 | $posts = $user->prefs->posts; |
50 | 50 | $last_post = $user->prefs->last_post; |
51 | 51 | $rated_posts = $user->prefs->rated_posts; |
@@ -67,30 +67,30 @@ discard block |
||
67 | 67 | if (!DISABLE_FORUMS) { |
68 | 68 | |
69 | 69 | $avatar_type = post_int("avatar_select"); |
70 | -$newfile=IMAGE_PATH.$user->id."_avatar.jpg"; |
|
70 | +$newfile = IMAGE_PATH.$user->id."_avatar.jpg"; |
|
71 | 71 | |
72 | 72 | // Update the user avatar |
73 | -if ($avatar_type<0 or $avatar_type>3) $avatar_type=0; |
|
74 | -if ($avatar_type==0){ |
|
75 | - if (file_exists($newfile)){ |
|
73 | +if ($avatar_type < 0 or $avatar_type > 3) $avatar_type = 0; |
|
74 | +if ($avatar_type == 0) { |
|
75 | + if (file_exists($newfile)) { |
|
76 | 76 | // Delete the file on the server if the user |
77 | 77 | // decides not to use an avatar |
78 | 78 | // |
79 | 79 | unlink($newfile); |
80 | 80 | } |
81 | - $avatar_url=""; |
|
81 | + $avatar_url = ""; |
|
82 | 82 | } elseif ($avatar_type == 1) { |
83 | 83 | $avatar_url = "//www.gravatar.com/avatar/".md5($user->email_addr)."?s=100&d=identicon"; |
84 | -} elseif ($avatar_type==2){ |
|
85 | - if (($rpc && (post_str("avatar_url", true) != null)) || ($_FILES['picture']['tmp_name']!="")) { |
|
86 | - if ($_FILES['picture']['tmp_name']!="") { |
|
84 | +} elseif ($avatar_type == 2) { |
|
85 | + if (($rpc && (post_str("avatar_url", true) != null)) || ($_FILES['picture']['tmp_name'] != "")) { |
|
86 | + if ($_FILES['picture']['tmp_name'] != "") { |
|
87 | 87 | $file = $_FILES['picture']['tmp_name']; |
88 | 88 | } else { |
89 | 89 | // Remote image. Download and store locally |
90 | 90 | $file = post_str("avatar_url"); |
91 | 91 | } |
92 | 92 | $size = getImageSize($file); |
93 | - if ($size[2]!=2 and $size[2]!=3){ |
|
93 | + if ($size[2] != 2 and $size[2] != 3) { |
|
94 | 94 | //Not the right kind of file |
95 | 95 | error_page(tra("Error: Not the right kind of file, only PNG and JPEG are supported.")); |
96 | 96 | } |
@@ -99,30 +99,30 @@ discard block |
||
99 | 99 | $image2 = intelligently_scale_image($file, 100, 100); |
100 | 100 | ImageJPEG($image2, $newfile); |
101 | 101 | } |
102 | - if (file_exists($newfile)){ |
|
103 | - $avatar_url=IMAGE_URL.$user->id."_avatar.jpg"; //$newfile; |
|
102 | + if (file_exists($newfile)) { |
|
103 | + $avatar_url = IMAGE_URL.$user->id."_avatar.jpg"; //$newfile; |
|
104 | 104 | } else { |
105 | 105 | //User didn't upload a compatible file or it went lost on the server |
106 | - $avatar_url=""; |
|
106 | + $avatar_url = ""; |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | -$images_as_links = (isset($_POST["forum_images_as_links"]) && $_POST["forum_images_as_links"]!="")?1:0; |
|
111 | -$link_popup = (isset($_POST["forum_link_popup"]) && $_POST["forum_link_popup"]!="")?1:0; |
|
112 | -$hide_avatars = (isset($_POST["forum_hide_avatars"]) && $_POST["forum_hide_avatars"]!="")?1:0; |
|
113 | -$hide_signatures = (isset($_POST["forum_hide_signatures"]) && $_POST["forum_hide_signatures"]!="")?1:0; |
|
114 | -$highlight_special = (isset($_POST["forum_highlight_special"]) && $_POST["forum_highlight_special"]!="")?1:0; |
|
115 | -$jump_to_unread = (isset($_POST["forum_jump_to_unread"]) && $_POST["forum_jump_to_unread"]!="")?1:0; |
|
116 | -$ignore_sticky_posts = (isset($_POST["forum_ignore_sticky_posts"]) && $_POST["forum_ignore_sticky_posts"]!="")?1:0; |
|
117 | -$no_signature_by_default = (isset($_POST["signature_by_default"]) && $_POST["signature_by_default"]!="")?0:1; |
|
110 | +$images_as_links = (isset($_POST["forum_images_as_links"]) && $_POST["forum_images_as_links"] != "") ? 1 : 0; |
|
111 | +$link_popup = (isset($_POST["forum_link_popup"]) && $_POST["forum_link_popup"] != "") ? 1 : 0; |
|
112 | +$hide_avatars = (isset($_POST["forum_hide_avatars"]) && $_POST["forum_hide_avatars"] != "") ? 1 : 0; |
|
113 | +$hide_signatures = (isset($_POST["forum_hide_signatures"]) && $_POST["forum_hide_signatures"] != "") ? 1 : 0; |
|
114 | +$highlight_special = (isset($_POST["forum_highlight_special"]) && $_POST["forum_highlight_special"] != "") ? 1 : 0; |
|
115 | +$jump_to_unread = (isset($_POST["forum_jump_to_unread"]) && $_POST["forum_jump_to_unread"] != "") ? 1 : 0; |
|
116 | +$ignore_sticky_posts = (isset($_POST["forum_ignore_sticky_posts"]) && $_POST["forum_ignore_sticky_posts"] != "") ? 1 : 0; |
|
117 | +$no_signature_by_default = (isset($_POST["signature_by_default"]) && $_POST["signature_by_default"] != "") ? 0 : 1; |
|
118 | 118 | $signature = post_str("signature", true); |
119 | -if (strlen($signature)>250) { |
|
119 | +if (strlen($signature) > 250) { |
|
120 | 120 | error_page(tra("Your signature was too long, please keep it less than 250 characters.")); |
121 | 121 | } |
122 | 122 | $forum_sort = post_int("forum_sort"); |
123 | 123 | $thread_sort = post_int("thread_sort"); |
124 | 124 | $display_wrap_postcount = post_int("forum_display_wrap_postcount"); |
125 | -if ($display_wrap_postcount<1) $display_wrap_postcount=1; |
|
125 | +if ($display_wrap_postcount < 1) $display_wrap_postcount = 1; |
|
126 | 126 | |
127 | 127 | $signature = BoincDb::escape_string($signature); |
128 | 128 | |
@@ -130,10 +130,10 @@ discard block |
||
130 | 130 | |
131 | 131 | } // DISABLE_FORUMS |
132 | 132 | |
133 | -$add_user_to_filter = (isset($_POST["add_user_to_filter"]) && $_POST["add_user_to_filter"]!=""); |
|
134 | -if ($add_user_to_filter){ |
|
133 | +$add_user_to_filter = (isset($_POST["add_user_to_filter"]) && $_POST["add_user_to_filter"] != ""); |
|
134 | +if ($add_user_to_filter) { |
|
135 | 135 | $user_to_add = trim($_POST["forum_filter_user"]); |
136 | - if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))){ |
|
136 | + if ($user_to_add != "" and $user_to_add == strval(intval($user_to_add))) { |
|
137 | 137 | $other_user = BoincUser::lookup_id($user_to_add); |
138 | 138 | if (!$other_user) { |
139 | 139 | echo tra("No such user:")." ".$user_to_add; |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | // Or remove some from the ignore list |
147 | 147 | // |
148 | 148 | $ignored_users = get_ignored_list($user); |
149 | -for ($i=0;$i<sizeof($ignored_users);$i++){ |
|
149 | +for ($i = 0; $i < sizeof($ignored_users); $i++) { |
|
150 | 150 | $remove = "remove".trim($ignored_users[$i]); |
151 | - if (isset($_POST[$remove]) && $_POST[$remove]!=""){ |
|
151 | + if (isset($_POST[$remove]) && $_POST[$remove] != "") { |
|
152 | 152 | $other_user = BoincUser::lookup_id($ignored_users[$i]); |
153 | 153 | if (!$other_user) { |
154 | 154 | echo tra("No such user:")." ".$ignored_users[$j]; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | BoincForumPrefs::lookup($user); |
31 | 31 | |
32 | -if (post_str("action", true)=="reset_confirm"){ |
|
32 | +if (post_str("action", true)=="reset_confirm") { |
|
33 | 33 | page_head(tra("Confirm reset")); |
34 | 34 | echo tra("This action will erase any changes you have made in your community preferences. To cancel, click your browser's Back button.")." |
35 | 35 | <p> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // If the user has requested a reset of preferences; |
46 | 46 | // preserve a few fields. |
47 | 47 | // |
48 | -if (post_str("action", true)=="reset"){ |
|
48 | +if (post_str("action", true)=="reset") { |
|
49 | 49 | $posts = $user->prefs->posts; |
50 | 50 | $last_post = $user->prefs->last_post; |
51 | 51 | $rated_posts = $user->prefs->rated_posts; |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | |
72 | 72 | // Update the user avatar |
73 | 73 | if ($avatar_type<0 or $avatar_type>3) $avatar_type=0; |
74 | -if ($avatar_type==0){ |
|
75 | - if (file_exists($newfile)){ |
|
74 | +if ($avatar_type==0) { |
|
75 | + if (file_exists($newfile)) { |
|
76 | 76 | // Delete the file on the server if the user |
77 | 77 | // decides not to use an avatar |
78 | 78 | // |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $avatar_url=""; |
82 | 82 | } elseif ($avatar_type == 1) { |
83 | 83 | $avatar_url = "//www.gravatar.com/avatar/".md5($user->email_addr)."?s=100&d=identicon"; |
84 | -} elseif ($avatar_type==2){ |
|
84 | +} elseif ($avatar_type==2) { |
|
85 | 85 | if (($rpc && (post_str("avatar_url", true) != null)) || ($_FILES['picture']['tmp_name']!="")) { |
86 | 86 | if ($_FILES['picture']['tmp_name']!="") { |
87 | 87 | $file = $_FILES['picture']['tmp_name']; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $file = post_str("avatar_url"); |
91 | 91 | } |
92 | 92 | $size = getImageSize($file); |
93 | - if ($size[2]!=2 and $size[2]!=3){ |
|
93 | + if ($size[2]!=2 and $size[2]!=3) { |
|
94 | 94 | //Not the right kind of file |
95 | 95 | error_page(tra("Error: Not the right kind of file, only PNG and JPEG are supported.")); |
96 | 96 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $image2 = intelligently_scale_image($file, 100, 100); |
100 | 100 | ImageJPEG($image2, $newfile); |
101 | 101 | } |
102 | - if (file_exists($newfile)){ |
|
102 | + if (file_exists($newfile)) { |
|
103 | 103 | $avatar_url=IMAGE_URL.$user->id."_avatar.jpg"; //$newfile; |
104 | 104 | } else { |
105 | 105 | //User didn't upload a compatible file or it went lost on the server |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | } // DISABLE_FORUMS |
132 | 132 | |
133 | 133 | $add_user_to_filter = (isset($_POST["add_user_to_filter"]) && $_POST["add_user_to_filter"]!=""); |
134 | -if ($add_user_to_filter){ |
|
134 | +if ($add_user_to_filter) { |
|
135 | 135 | $user_to_add = trim($_POST["forum_filter_user"]); |
136 | - if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))){ |
|
136 | + if ($user_to_add!="" and $user_to_add==strval(intval($user_to_add))) { |
|
137 | 137 | $other_user = BoincUser::lookup_id($user_to_add); |
138 | 138 | if (!$other_user) { |
139 | 139 | echo tra("No such user:")." ".$user_to_add; |
@@ -146,9 +146,9 @@ discard block |
||
146 | 146 | // Or remove some from the ignore list |
147 | 147 | // |
148 | 148 | $ignored_users = get_ignored_list($user); |
149 | -for ($i=0;$i<sizeof($ignored_users);$i++){ |
|
149 | +for ($i=0;$i<sizeof($ignored_users);$i++) { |
|
150 | 150 | $remove = "remove".trim($ignored_users[$i]); |
151 | - if (isset($_POST[$remove]) && $_POST[$remove]!=""){ |
|
151 | + if (isset($_POST[$remove]) && $_POST[$remove]!="") { |
|
152 | 152 | $other_user = BoincUser::lookup_id($ignored_users[$i]); |
153 | 153 | if (!$other_user) { |
154 | 154 | echo tra("No such user:")." ".$ignored_users[$j]; |
@@ -32,23 +32,23 @@ |
||
32 | 32 | $nvidia_credit_sum = 0; |
33 | 33 | $intel_gpu_scale_sum = 0; |
34 | 34 | $intel_gpu_credit_sum = 0; |
35 | -$total_credit_sum= 0; |
|
35 | +$total_credit_sum = 0; |
|
36 | 36 | |
37 | 37 | $apps = BoincApp::enum("deprecated=0"); |
38 | 38 | foreach ($apps as $app) { |
39 | 39 | $avs = BoincAppVersion::enum("appid=$app->id and deprecated=0"); |
40 | 40 | foreach ($avs as $av) { |
41 | 41 | if (strstr($av->plan_class, "ati")) { |
42 | - $ati_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
42 | + $ati_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
43 | 43 | $ati_credit_sum += $av->expavg_credit; |
44 | 44 | } else if (strstr($av->plan_class, "nvidia") || strstr($av->plan_class, "cuda")) { |
45 | - $nvidia_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
45 | + $nvidia_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
46 | 46 | $nvidia_credit_sum += $av->expavg_credit; |
47 | 47 | } else if (strstr($av->plan_class, "intel_gpu")) { |
48 | - $intel_gpu_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
48 | + $intel_gpu_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
49 | 49 | $intel_gpu_credit_sum += $av->expavg_credit; |
50 | 50 | } else { |
51 | - $cpu_scale_sum += $av->pfc_scale * $av->expavg_credit; |
|
51 | + $cpu_scale_sum += $av->pfc_scale*$av->expavg_credit; |
|
52 | 52 | $cpu_credit_sum += $av->expavg_credit; |
53 | 53 | } |
54 | 54 | $total_credit_sum += $av->expavg_credit; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if ($user->id != $team->userid) { //don't show current founder |
96 | 96 | $user_total_credit = format_credit($user->total_credit); |
97 | 97 | $user_expavg_credit = format_credit($user->expavg_credit); |
98 | - $selected = ($user->id == $team->ping_user)?"selected":""; |
|
98 | + $selected = ($user->id == $team->ping_user) ? "selected" : ""; |
|
99 | 99 | echo ' |
100 | 100 | <tr> |
101 | 101 | <td><input type="radio" name="userid" value="'.$user->id.'"> |
@@ -121,5 +121,5 @@ discard block |
||
121 | 121 | echo "</form>"; |
122 | 122 | page_tail(); |
123 | 123 | |
124 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
124 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
125 | 125 | ?> |
@@ -92,7 +92,8 @@ |
||
92 | 92 | |
93 | 93 | $navailable_users = 0; |
94 | 94 | foreach ($users as $user) { |
95 | - if ($user->id != $team->userid) { //don't show current founder |
|
95 | + if ($user->id != $team->userid) { |
|
96 | +//don't show current founder |
|
96 | 97 | $user_total_credit = format_credit($user->total_credit); |
97 | 98 | $user_expavg_credit = format_credit($user->expavg_credit); |
98 | 99 | $selected = ($user->id == $team->ping_user)?"selected":""; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // hardwired app name for now |
46 | 46 | define('APP_NAME', 'remote_test'); |
47 | 47 | |
48 | -$project = $master_url; // from project.inc |
|
48 | +$project = $master_url; // from project.inc |
|
49 | 49 | $user = get_logged_in_user(); |
50 | 50 | $auth = $user->authenticator; |
51 | 51 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $user_submit = BoincUserSubmit::lookup_userid($user->id); |
159 | 159 | if (!$user_submit) return null; |
160 | 160 | $a = array(); |
161 | - foreach($apps as $app) { |
|
161 | + foreach ($apps as $app) { |
|
162 | 162 | if ($user_submit->submit_all) { |
163 | 163 | $a[] = $app; |
164 | 164 | } else { |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | $input_url = get_str('input_url'); |
236 | 236 | if (!$input_url) error_page("missing input URL"); |
237 | 237 | $param_lo = (double)get_str('param_lo'); |
238 | - if ($param_lo<0 || $param_lo>60) error_page("param lo must be in 0..60"); |
|
238 | + if ($param_lo < 0 || $param_lo > 60) error_page("param lo must be in 0..60"); |
|
239 | 239 | $param_hi = (double)get_str('param_hi'); |
240 | - if ($param_hi<0 || $param_hi>60 || $param_hi <= $param_lo) { |
|
240 | + if ($param_hi < 0 || $param_hi > 60 || $param_hi <= $param_lo) { |
|
241 | 241 | error_page("param hi must be in 0..60 and > param lo"); |
242 | 242 | } |
243 | 243 | $param_inc = (double)get_str('param_inc'); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $f->source = $input_url; |
255 | 255 | $f->mode = 'semilocal'; |
256 | 256 | |
257 | - for ($x=$param_lo; $x<$param_hi; $x += $param_inc) { |
|
257 | + for ($x = $param_lo; $x < $param_hi; $x += $param_inc) { |
|
258 | 258 | $job = new StdClass; |
259 | 259 | $job->rsc_fpops_est = $x*1e9; |
260 | 260 | $job->command_line = "--t $x"; |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | "status", |
344 | 344 | "Canonical instance<br><p class=\"text-muted\">click to see result page on BOINC server</p>" |
345 | 345 | ); |
346 | - foreach($batch->jobs as $job) { |
|
346 | + foreach ($batch->jobs as $job) { |
|
347 | 347 | $id = (int)$job->id; |
348 | 348 | $resultid = (int)$job->canonical_instance_id; |
349 | 349 | if ($resultid) { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | "Instance ID<br><p class=\"text-muted\">click for result page on BOINC server</p>", |
387 | 387 | "State", "Output files" |
388 | 388 | ); |
389 | - foreach($reply->instances as $inst) { |
|
389 | + foreach ($reply->instances as $inst) { |
|
390 | 390 | echo "<tr> |
391 | 391 | <td><a href=result.php?resultid=$inst->id>$inst->id</a></td> |
392 | 392 | <td>$inst->state</td> |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | list($batch, $errmsg) = boinc_query_batch($req); |
303 | 303 | if ($errmsg) error_page(htmlentities($errmsg)); |
304 | 304 | |
305 | - page_head("Batch $req->batch_id"); |
|
305 | + page_head("batch $req->batch_id"); |
|
306 | 306 | start_table(); |
307 | 307 | row2("name", $batch->name); |
308 | 308 | row2("application", $batch->app_name); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | list($reply, $errmsg) = boinc_query_job($req); |
379 | 379 | if ($errmsg) error_page(htmlentities($errmsg)); |
380 | 380 | |
381 | - page_head("Job $req->job_id"); |
|
381 | + page_head("job $req->job_id"); |
|
382 | 382 | echo "<a href=$project/workunit.php?wuid=$req->job_id>View workunit page on BOINC server</a>\n"; |
383 | 383 | echo "<h2>Instances</h2>\n"; |
384 | 384 | start_table(); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | check_get_args(array("id")); |
23 | 23 | |
24 | 24 | function show_credit_wap($user) { |
25 | - $retstr = "<br/>User TotCred: " . format_credit($user->total_credit) . "<br/>"; |
|
26 | - $retstr .= "User AvgCred: " . format_credit($user->expavg_credit) . "<br/>"; |
|
25 | + $retstr = "<br/>User TotCred: ".format_credit($user->total_credit)."<br/>"; |
|
26 | + $retstr .= "User AvgCred: ".format_credit($user->expavg_credit)."<br/>"; |
|
27 | 27 | return $retstr; |
28 | 28 | } |
29 | 29 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | $wapstr .= show_credit_wap($user); |
46 | 46 | if ($user->teamid && $team) { |
47 | 47 | $wapstr .= "<br/>".tra("Team:")." ".$team->name."<br/>"; |
48 | - $wapstr .= tra("Team TotCred:")." " . format_credit($team->total_credit) . "<br/>"; |
|
49 | - $wapstr .= tra("Team AvgCred:")." " . format_credit($team->expavg_credit) . "<br/>"; |
|
48 | + $wapstr .= tra("Team TotCred:")." ".format_credit($team->total_credit)."<br/>"; |
|
49 | + $wapstr .= tra("Team AvgCred:")." ".format_credit($team->expavg_credit)."<br/>"; |
|
50 | 50 | } else { |
51 | 51 | $wapstr .= "<br/>".tra("Team: None")."<br/>"; |
52 | 52 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | start_table(); |
53 | 53 | row2("From:", "$user->name <$user->email_addr>"); |
54 | -for ($i=0; $i<6; $i++) { |
|
54 | +for ($i = 0; $i < 6; $i++) { |
|
55 | 55 | row2(tra("To:"), "<input size=30 name=e$i>"); |
56 | 56 | } |
57 | 57 | row2(tra("Subject"), "<input size=80 name=subject value=\"$subject\">"); |
@@ -58,5 +58,5 @@ |
||
58 | 58 | <p>".tra("These other projects are not associated with %1, and we cannot vouch for their security practices or the nature of their research. Join them at your own risk.", PROJECT); |
59 | 59 | } |
60 | 60 | page_tail(); |
61 | -$cvs_version_tracker[]="\$Id$"; |
|
61 | +$cvs_version_tracker[] = "\$Id$"; |
|
62 | 62 | ?> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | show_forum_header($user); |
75 | 75 | |
76 | -if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){ |
|
76 | +if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) { |
|
77 | 77 | $categories = BoincCategory::enum("true order by orderID"); |
78 | 78 | } else { |
79 | 79 | echo "<p>" |
@@ -140,5 +140,5 @@ discard block |
||
140 | 140 | page_tail(); |
141 | 141 | BoincForumLogging::cleanup(); |
142 | 142 | |
143 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
143 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
144 | 144 | ?> |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | show_forum_header($user); |
75 | 75 | |
76 | -if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){ |
|
76 | +if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) { |
|
77 | 77 | $categories = BoincCategory::enum("true order by orderID"); |
78 | 78 | } else { |
79 | 79 | echo "<p>" |
@@ -87,7 +87,7 @@ |
||
87 | 87 | if ($first) { |
88 | 88 | $first = false; |
89 | 89 | echo "<p>"; |
90 | - show_forum_title($category, NULL, NULL); |
|
90 | + show_forum_title($category, null, null); |
|
91 | 91 | echo "<p>"; |
92 | 92 | show_mark_as_read_button($user); |
93 | 93 | start_table('table-striped'); |