@@ -174,8 +174,7 @@ |
||
| 174 | 174 | array("agree_to_terms_of_use", "", false), |
| 175 | 175 | ); |
| 176 | 176 | form_checkboxes(tra("Do you agree to the terms of use above?"), $myitems, 'tabindex="0"'); |
| 177 | - } |
|
| 178 | - else { |
|
| 177 | + } else { |
|
| 179 | 178 | // error - no terms of use for user to agree to! |
| 180 | 179 | } |
| 181 | 180 | |
@@ -41,14 +41,12 @@ |
||
| 41 | 41 | // Obtain data from cookies |
| 42 | 42 | if (isset($_COOKIE['tempuserid'])) { |
| 43 | 43 | $userid = $_COOKIE['tempuserid']; |
| 44 | -} |
|
| 45 | -else { |
|
| 44 | +} else { |
|
| 46 | 45 | error_page(tra("Website error when attempting to agree to terms of use. Please contact the site administrators.")); |
| 47 | 46 | } |
| 48 | 47 | if (isset($_COOKIE['tempperm'])) { |
| 49 | 48 | $perm = $_COOKIE['tempperm']; |
| 50 | -} |
|
| 51 | -else { |
|
| 49 | +} else { |
|
| 52 | 50 | error_page(tra("Website error when attempting to agree to terms of use. Please contact the site administrators.")); |
| 53 | 51 | } |
| 54 | 52 | $user = BoincUser::lookup_id_nocache($userid); |
@@ -81,11 +81,11 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | if ($disable_account_creation || defined('INVITE_CODES')) { |
| 84 | - echo " <account_creation_disabled/>\n"; |
|
| 84 | + echo " <account_creation_disabled/>\n"; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if (defined('INVITE_CODES')) { |
| 88 | - echo " <invite_code_required/>\n"; |
|
| 88 | + echo " <invite_code_required/>\n"; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | echo " <min_passwd_length>$min_passwd_length</min_passwd_length>\n"; |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | // project has not defined the constant TERMSOFUSE_FILE, then look for |
| 108 | 108 | // the terms_of_use.txt file in the project base directory. |
| 109 | 109 | if (defined('TERMSOFUSE_FILE')) { |
| 110 | - $tou_file = TERMSOFUSE_FILE; |
|
| 110 | + $tou_file = TERMSOFUSE_FILE; |
|
| 111 | 111 | } |
| 112 | 112 | else { |
| 113 | - $tou_file = "../../terms_of_use.txt"; |
|
| 113 | + $tou_file = "../../terms_of_use.txt"; |
|
| 114 | 114 | } |
| 115 | 115 | if (file_exists($tou_file)) { |
| 116 | 116 | $terms_of_use = trim(file_get_contents($tou_file)); |
@@ -28,10 +28,10 @@ discard block |
||
| 28 | 28 | // |
| 29 | 29 | function show_platforms() { |
| 30 | 30 | $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml")); |
| 31 | - if ($xmlFragment==false){ |
|
| 31 | + if ($xmlFragment==false) { |
|
| 32 | 32 | $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", ""); |
| 33 | 33 | $xmlFragment = " <platforms>"; |
| 34 | - foreach ($platforms as $platform){ |
|
| 34 | + foreach ($platforms as $platform) { |
|
| 35 | 35 | $xmlFragment .= " |
| 36 | 36 | <platform> |
| 37 | 37 | <platform_name>$platform->name</platform_name> |
@@ -108,8 +108,7 @@ discard block |
||
| 108 | 108 | // the terms_of_use.txt file in the project base directory. |
| 109 | 109 | if (defined('TERMSOFUSE_FILE')) { |
| 110 | 110 | $tou_file = TERMSOFUSE_FILE; |
| 111 | -} |
|
| 112 | -else { |
|
| 111 | +} else { |
|
| 113 | 112 | $tou_file = "../../terms_of_use.txt"; |
| 114 | 113 | } |
| 115 | 114 | if (file_exists($tou_file)) { |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | // set to 1. |
| 105 | 105 | if ($consent_flag==0) { |
| 106 | 106 | $rc = consent_to_a_policy($user, $ctid, 0, 1, $source); |
| 107 | - } else { |
|
| 107 | + } else { |
|
| 108 | 108 | $rc = consent_to_a_policy($user, $ctid, 1, 0, $source); |
| 109 | 109 | } |
| 110 | 110 | if (!$rc) { |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | $mys = BoincDb::escape_string($source); |
| 28 | 28 | if ($ctime==0) { |
| 29 | 29 | $mytime = $user->create_time; |
| 30 | - } |
|
| 31 | - else { |
|
| 30 | + } else { |
|
| 32 | 31 | $mytime = $ctime; |
| 33 | 32 | } |
| 34 | 33 | return BoincConsent::insert( |
@@ -76,8 +75,7 @@ discard block |
||
| 76 | 75 | send_cookie('tempperm', $perm, false); |
| 77 | 76 | $save_url = $in_next_url; |
| 78 | 77 | return "user_agreetermsofuse.php?next_url=$save_url"; |
| 79 | - } |
|
| 80 | - else { |
|
| 78 | + } else { |
|
| 81 | 79 | send_cookie('auth', $user->authenticator, $perm); |
| 82 | 80 | return $in_next_url; |
| 83 | 81 | } |
@@ -64,8 +64,7 @@ discard block |
||
| 64 | 64 | $t->user_postal_code = decode($t->user_postal_code); |
| 65 | 65 | $t->user_url = decode($t->user_url); |
| 66 | 66 | return $t; |
| 67 | - } |
|
| 68 | - else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>'); |
|
| 67 | + } else if (strstr($s, '<name>')) $t->name = parse_element($s, '<name>'); |
|
| 69 | 68 | else if (strstr($s, '<url>')) $t->url = parse_element($s, '<url>'); |
| 70 | 69 | else if (strstr($s, '<type>')) $t->type = parse_element($s, '<type>'); |
| 71 | 70 | else if (strstr($s, '<name_html>')) $t->name_html = parse_element($s, '<name_html>'); |
@@ -74,14 +73,12 @@ discard block |
||
| 74 | 73 | if (strstr($s, '</description>')) break; |
| 75 | 74 | $t->description .= $s; |
| 76 | 75 | } |
| 77 | - } |
|
| 78 | - else if (strstr($s, '<country>')) $t->country = parse_element($s, '<country>'); |
|
| 76 | + } else if (strstr($s, '<country>')) $t->country = parse_element($s, '<country>'); |
|
| 79 | 77 | else if (strstr($s, '<id>')) $t->id = parse_element($s, '<id>'); |
| 80 | 78 | else if (strstr($s, '<user_email_munged>')) { |
| 81 | 79 | $user_email_munged = parse_element($s, '<user_email_munged>'); |
| 82 | 80 | $t->user_email = str_rot13($user_email_munged); |
| 83 | - } |
|
| 84 | - else if (strstr($s, '<user_name>')) $t->user_name = parse_element($s, '<user_name>'); |
|
| 81 | + } else if (strstr($s, '<user_name>')) $t->user_name = parse_element($s, '<user_name>'); |
|
| 85 | 82 | else if (strstr($s, '<user_country>')) $t->user_country = parse_element($s, '<user_country>'); |
| 86 | 83 | else if (strstr($s, '<user_postal_code>')) $t->user_postal_code = parse_element($s, '<user_postal_code>'); |
| 87 | 84 | else if (strstr($s, '<user_url>')) $t->user_url = parse_element($s, '<user_url>'); |
@@ -140,8 +137,7 @@ discard block |
||
| 140 | 137 | list($checkct, $ctid) = check_consent_type(CONSENT_TYPE_ENROLL); |
| 141 | 138 | if ($checkct) { |
| 142 | 139 | echo " cannot make user when an consent to terms of use is required\n"; |
| 143 | - } |
|
| 144 | - else { |
|
| 140 | + } else { |
|
| 145 | 141 | echo " making user $t->user_email\n"; |
| 146 | 142 | $user = make_user($t->user_email, $t->user_name, random_string()); |
| 147 | 143 | if (!$user) { |
@@ -46,8 +46,7 @@ discard block |
||
| 46 | 46 | if ($toggle == "Click to Enable") { |
| 47 | 47 | $state = 1; |
| 48 | 48 | $action = "Enabled"; |
| 49 | - } |
|
| 50 | - else { |
|
| 49 | + } else { |
|
| 51 | 50 | $state = 0; |
| 52 | 51 | $action = "Disabled"; |
| 53 | 52 | } |
@@ -91,12 +90,10 @@ discard block |
||
| 91 | 90 | if (!in_rops()) { |
| 92 | 91 | if (!($ct->enabled)) { |
| 93 | 92 | echo " <td><input class=\"btn btn-default\" name=toggleenabled type=submit value=\"Click to Enable\"></td>"; |
| 94 | - } |
|
| 95 | - else { |
|
| 93 | + } else { |
|
| 96 | 94 | echo " <td><input class=\"btn btn-default\" name=toggleenabled type=submit value=\"Click to Disable\"></td>"; |
| 97 | 95 | } |
| 98 | - } |
|
| 99 | - else { |
|
| 96 | + } else { |
|
| 100 | 97 | echo " <td>$ct->enabled</td>"; |
| 101 | 98 | } |
| 102 | 99 | |
@@ -107,12 +104,10 @@ discard block |
||
| 107 | 104 | if (!in_rops()) { |
| 108 | 105 | if (!($ct->privacypref)) { |
| 109 | 106 | echo " <td><input class=\"btn btn-default\" name=toggleprivacypref type=submit value=\"Click to Enable\"></td>"; |
| 110 | - } |
|
| 111 | - else { |
|
| 107 | + } else { |
|
| 112 | 108 | echo " <td><input class=\"btn btn-default\" name=toggleprivacypref type=submit value=\"Click to Disable\"></td>"; |
| 113 | 109 | } |
| 114 | - } |
|
| 115 | - else { |
|
| 110 | + } else { |
|
| 116 | 111 | echo " <td>$ct->privacypref</td>"; |
| 117 | 112 | } |
| 118 | 113 | |
@@ -156,11 +151,9 @@ discard block |
||
| 156 | 151 | |
| 157 | 152 | if (post_str("add_consenttype", true)) { |
| 158 | 153 | add_consenttype(); |
| 159 | -} |
|
| 160 | -else if (post_str("toggleenabled", true)) { |
|
| 154 | +} else if (post_str("toggleenabled", true)) { |
|
| 161 | 155 | mct_toggle_field("enabled"); |
| 162 | -} |
|
| 163 | -else if (post_str("toggleprivacypref", true)) { |
|
| 156 | +} else if (post_str("toggleprivacypref", true)) { |
|
| 164 | 157 | mct_toggle_field("privacypref"); |
| 165 | 158 | } |
| 166 | 159 | |