@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | // add country-dependent town list for small map |
| 35 | 35 | $country = $login->getUserCountry(); |
| 36 | 36 | if ($opt['map']['towns']['enable'] && |
| 37 | - isset($build_map_towns_menu) && $build_map_towns_menu && // optimization |
|
| 37 | + isset($build_map_towns_menu) && $build_map_towns_menu && // optimization |
|
| 38 | 38 | isset($opt['map']['towns'][$country]['enable']) && $opt['map']['towns'][$country]['enable'] |
| 39 | 39 | ) { |
| 40 | 40 | $rsTowns = sqlf( |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | 'parent' => MNU_MAP |
| 74 | 74 | ]; |
| 75 | 75 | $menuitem[MNU_MAP]['subitems'][] = $menu_map; |
| 76 | - ++ $menu_map; |
|
| 76 | + ++$menu_map; |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $rsSubmenu = sqlf("SELECT `id` FROM `sys_menu` WHERE `parent`=0 ORDER BY `parent` ASC, `position` ASC"); |
| 101 | 101 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
| 102 | 102 | $aMenu[MNU_ROOT]['subitems'][$nPos] = $rSubmenu['id']; |
| 103 | - $nPos ++; |
|
| 103 | + $nPos++; |
|
| 104 | 104 | } |
| 105 | 105 | sql_free_result($rsSubmenu); |
| 106 | 106 | fwrite($f, "\n"); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ); |
| 138 | 138 | while ($rSubmenu = sql_fetch_assoc($rsSubmenu)) { |
| 139 | 139 | $aMenu[$r['id']]['subitems'][$nPos] = $rSubmenu['id']; |
| 140 | - $nPos ++; |
|
| 140 | + $nPos++; |
|
| 141 | 141 | } |
| 142 | 142 | sql_free_result($rsSubmenu); |
| 143 | 143 | } |
@@ -143,9 +143,9 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | } |
| 145 | 145 | $fnl = strlen($filename); |
| 146 | - $fh = "\x14\x00"; // ver needed to extract |
|
| 147 | - $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 148 | - $fh .= "\x08\x00"; // compression method |
|
| 146 | + $fh = "\x14\x00"; // ver needed to extract |
|
| 147 | + $fh .= "\x00\x00"; // gen purpose bit flag |
|
| 148 | + $fh .= "\x08\x00"; // compression method |
|
| 149 | 149 | $fh .= "\x00\x00\x00\x00"; // last mod time and date |
| 150 | 150 | $fh .= pack( |
| 151 | 151 | "V3v2", |
@@ -170,16 +170,16 @@ discard block |
||
| 170 | 170 | "va*v3V2", |
| 171 | 171 | 0, |
| 172 | 172 | $fh, |
| 173 | - 0, // file comment length |
|
| 174 | - 0, // disk number start |
|
| 175 | - 0, // internal file attributes |
|
| 176 | - $attr, // external file attributes - 'archive/directory' bit set |
|
| 173 | + 0, // file comment length |
|
| 174 | + 0, // disk number start |
|
| 175 | + 0, // internal file attributes |
|
| 176 | + $attr, // external file attributes - 'archive/directory' bit set |
|
| 177 | 177 | $this->offset |
| 178 | 178 | ) . $filename; |
| 179 | 179 | |
| 180 | 180 | $this->offset += 42 + $fnl + $gzsize; |
| 181 | 181 | $this->cdir[] = $cdir; |
| 182 | - $this->cnt ++; |
|
| 182 | + $this->cnt++; |
|
| 183 | 183 | $this->idx = $this->cnt - 1; |
| 184 | 184 | } |
| 185 | 185 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $cdsl, // size of central dir |
| 229 | 229 | $zdsl, // offset to start of central dir |
| 230 | 230 | 0 |
| 231 | - ); // .zip file comment length |
|
| 231 | + ); // .zip file comment length |
|
| 232 | 232 | return $this->zipfile; |
| 233 | 233 | } |
| 234 | 234 | |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | * |
| 21 | 21 | ***************************************************************************/ |
| 22 | 22 | |
| 23 | -define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
| 24 | -define('LOGIN_OK', 0); // login succeeded |
|
| 25 | -define('LOGIN_BADUSERPW', 1); // bad username or password |
|
| 26 | -define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
| 27 | -define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
| 23 | +define('LOGIN_UNKNOWN_ERROR', - 1); // unkown error occured |
|
| 24 | +define('LOGIN_OK', 0); // login succeeded |
|
| 25 | +define('LOGIN_BADUSERPW', 1); // bad username or password |
|
| 26 | +define('LOGIN_TOOMUCHLOGINS', 2); // too many logins in short time |
|
| 27 | +define('LOGIN_USERNOTACTIVE', 3); // the useraccount locked |
|
| 28 | 28 | define('LOGIN_EMPTY_USERPASSWORD', 4); // given username/password was empty |
| 29 | -define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
| 29 | +define('LOGIN_LOGOUT_OK', 5); // logout was successfull |
|
| 30 | 30 | |
| 31 | 31 | // login times in seconds |
| 32 | 32 | define('LOGIN_TIME', 60 * 60); |
@@ -185,10 +185,10 @@ discard block |
||
| 185 | 185 | // & escaped? |
| 186 | 186 | $escapesCount = 0; |
| 187 | 187 | while ((($nextarg - $escapesCount - 1) > 0) && (substr($sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
| 188 | - $escapesCount ++; |
|
| 188 | + $escapesCount++; |
|
| 189 | 189 | } |
| 190 | 190 | if (($escapesCount % 2) == 1) { |
| 191 | - $nextarg ++; |
|
| 191 | + $nextarg++; |
|
| 192 | 192 | } else { |
| 193 | 193 | $nextchar = substr($sql, $nextarg + 1, 1); |
| 194 | 194 | if (is_numeric($nextchar)) { |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | while (preg_match('/^[0-9]{1}/', $nextchar) == 1) { |
| 200 | 200 | $arg .= $nextchar; |
| 201 | 201 | |
| 202 | - $arglength ++; |
|
| 202 | + $arglength++; |
|
| 203 | 203 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -225,13 +225,13 @@ discard block |
||
| 225 | 225 | // strip apostroph and insert NULL |
| 226 | 226 | $filtered_sql = substr($filtered_sql, 0, strlen($filtered_sql) - 1); |
| 227 | 227 | $filtered_sql .= 'NULL'; |
| 228 | - $sqlpos ++; |
|
| 228 | + $sqlpos++; |
|
| 229 | 229 | } else { |
| 230 | 230 | $filtered_sql .= 'NULL'; |
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | - $sqlpos ++; |
|
| 234 | + $sqlpos++; |
|
| 235 | 235 | } else { |
| 236 | 236 | $arglength = 0; |
| 237 | 237 | $arg = ''; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | while (preg_match('/^[a-zA-Z0-9_]{1}/', $nextchar) == 1) { |
| 242 | 242 | $arg .= $nextchar; |
| 243 | 243 | |
| 244 | - $arglength ++; |
|
| 244 | + $arglength++; |
|
| 245 | 245 | $nextchar = substr($sql, $nextarg + $arglength + 1, 1); |
| 246 | 246 | } |
| 247 | 247 | |
@@ -288,12 +288,12 @@ discard block |
||
| 288 | 288 | $escapesCount = 0; |
| 289 | 289 | while ((($nextarg - $escapesCount - 1) > 0) |
| 290 | 290 | && (substr($filtered_sql, $nextarg - $escapesCount - 1, 1) == '\\')) { |
| 291 | - $escapesCount ++; |
|
| 291 | + $escapesCount++; |
|
| 292 | 292 | } |
| 293 | 293 | if (($escapesCount % 2) == 0) { |
| 294 | 294 | // strip escapes of & |
| 295 | 295 | $filtered_sql = substr($filtered_sql, 0, $nextarg) . '&' . substr($filtered_sql, $nextarg + 2); |
| 296 | - $nextarg --; |
|
| 296 | + $nextarg--; |
|
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | $nextarg = strpos($filtered_sql, '\&', $nextarg + 2); |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | AND `online`= 1 |
| 838 | 838 | AND (TIMESTAMP(NOW())-TIMESTAMP(`last_check`)+`time_diff`<'&1') |
| 839 | 839 | ORDER BY `w` DESC LIMIT 1", |
| 840 | - - 1, |
|
| 840 | + -1, |
|
| 841 | 841 | $nMaxTimeDiff |
| 842 | 842 | ); |
| 843 | 843 | |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | if (substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' || |
| 535 | 535 | substr($link, 0, 7) == 'mailto:' |
| 536 | 536 | ) { |
| 537 | - $this->_link_count ++; |
|
| 537 | + $this->_link_count++; |
|
| 538 | 538 | $this->_link_list .= "[" . $this->_link_count . "] $link\n"; |
| 539 | 539 | $additional = ' [' . $this->_link_count . ']'; |
| 540 | 540 | } elseif (substr($link, 0, 11) == 'javascript:') { |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | $additional = ''; |
| 543 | 543 | // what about href="#anchor" ? |
| 544 | 544 | } else { |
| 545 | - $this->_link_count ++; |
|
| 545 | + $this->_link_count++; |
|
| 546 | 546 | $this->_link_list .= "[" . $this->_link_count . "] " . $this->url; |
| 547 | 547 | if (substr($link, 0, 1) != '/') { |
| 548 | 548 | $this->_link_list .= '/'; |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | |
| 230 | 230 | while ($nCurPos < mb_strlen($str)) { |
| 231 | 231 | $nNextSep = mb_strlen($str); |
| 232 | - for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos ++) { |
|
| 232 | + for ($nSepPos = 0; $nSepPos < mb_strlen($sep); $nSepPos++) { |
|
| 233 | 233 | $nThisPos = mb_strpos($str, mb_substr($sep, $nSepPos, 1), $nCurPos); |
| 234 | 234 | if ($nThisPos !== false) { |
| 235 | 235 | if ($nNextSep > $nThisPos) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | WHERE option_id=6 AND user_id='&1'", true, $login->userid)) |
| 68 | 68 | ) { |
| 69 | 69 | $fullscreen = true; |
| 70 | - $tpl->popup = true; // disables page header and -frame |
|
| 70 | + $tpl->popup = true; // disables page header and -frame |
|
| 71 | 71 | $tpl->popupmargin = false; |
| 72 | 72 | } else { |
| 73 | 73 | $fullscreen = false; |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | $caches_found = 0; |
| 457 | 457 | while ($r = sql_fetch_assoc($rs)) { |
| 458 | 458 | echo '<cache name="' . xmlentities($r['name']) . '" wpoc="' . xmlentities($r['wp_oc']) . '" />' . "\n"; |
| 459 | - ++ $caches_found; |
|
| 459 | + ++$caches_found; |
|
| 460 | 460 | } |
| 461 | 461 | sql_free_result($rs); |
| 462 | 462 | |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | "SELECT `slave_id` |
| 497 | 497 | FROM `map2_result` |
| 498 | 498 | WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()", |
| 499 | - - 2, |
|
| 499 | + -2, |
|
| 500 | 500 | $nResultId, |
| 501 | 501 | $opt['map']['maxcacheage'] |
| 502 | 502 | ); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | // get logtext editormode (from form or from userprofile) |
| 122 | 122 | // 1 = text; 2 = HTML; 3 = tinyMCE |
| 123 | 123 | if (isset($_POST['descMode'])) { |
| 124 | - $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
| 124 | + $descMode = $_POST['descMode'] + 0; // Ocprop: 2 |
|
| 125 | 125 | if (($descMode < 1) || ($descMode > 3)) { |
| 126 | 126 | $descMode = 3; |
| 127 | 127 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | //here we read all used information from the form if submitted, otherwise from DB |
| 142 | - $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 142 | + $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 143 | 143 | $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type']; |
| 144 | 144 | if (!isset($_POST['size'])) { |
| 145 | 145 | if ($cache_type == 4 || $cache_type == 5) { |
@@ -153,15 +153,15 @@ discard block |
||
| 153 | 153 | $cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date( |
| 154 | 154 | 'd', |
| 155 | 155 | strtotime($cache_record['date_hidden']) |
| 156 | - ); // Ocprop |
|
| 156 | + ); // Ocprop |
|
| 157 | 157 | $cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date( |
| 158 | 158 | 'm', |
| 159 | 159 | strtotime($cache_record['date_hidden']) |
| 160 | - ); // Ocprop |
|
| 160 | + ); // Ocprop |
|
| 161 | 161 | $cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date( |
| 162 | 162 | 'Y', |
| 163 | 163 | strtotime($cache_record['date_hidden']) |
| 164 | - ); // Ocprop |
|
| 164 | + ); // Ocprop |
|
| 165 | 165 | |
| 166 | 166 | if (is_null($cache_record['date_activate'])) { |
| 167 | 167 | $cache_activate_day = isset($_POST['activate_day']) ? $_POST['activate_day'] : date('d'); |
@@ -187,11 +187,11 @@ discard block |
||
| 187 | 187 | ); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | - $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 191 | - $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 192 | - $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 190 | + $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 191 | + $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 192 | + $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 193 | 193 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
| 194 | - $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 194 | + $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 195 | 195 | $status_old = $cache_record['status']; |
| 196 | 196 | $search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time']; |
| 197 | 197 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw']; |
| 255 | 255 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
| 256 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 256 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 257 | 257 | $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0; |
| 258 | 258 | $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0; |
| 259 | 259 | |
@@ -265,12 +265,12 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | if (isset($_POST['latNS'])) { |
| 267 | 267 | //get coords from post-form |
| 268 | - $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 269 | - $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 270 | - $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 271 | - $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 272 | - $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 273 | - $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 268 | + $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 269 | + $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 270 | + $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 271 | + $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 272 | + $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 273 | + $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 274 | 274 | } else { |
| 275 | 275 | //get coords from DB |
| 276 | 276 | $coords_lon = $cache_record['longitude']; |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | $logtype = 13; |
| 565 | 565 | break; |
| 566 | 566 | default: |
| 567 | - $logtype = 0; // ??? |
|
| 567 | + $logtype = 0; // ??? |
|
| 568 | 568 | } |
| 569 | 569 | if ($logtype > 0) { |
| 570 | 570 | sql( |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | // update cache attributes |
| 587 | 587 | $attriblist = "999"; |
| 588 | - for ($i = 0; $i < count($cache_attribs); $i ++) { |
|
| 588 | + for ($i = 0; $i < count($cache_attribs); $i++) { |
|
| 589 | 589 | if ($cache_attribs[$i] + 0 > 0) { |
| 590 | 590 | sql( |
| 591 | 591 | "INSERT IGNORE INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES('&1', '&2')", |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
| 720 | 720 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
| 721 | 721 | $group_line .= $line; |
| 722 | - $nLineAttrCount ++; |
|
| 722 | + $nLineAttrCount++; |
|
| 723 | 723 | |
| 724 | 724 | $line = $cache_attrib_js; |
| 725 | 725 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | |
| 777 | 777 | //difficulty |
| 778 | 778 | $difficulty_options = ''; |
| 779 | - for ($i = 2; $i <= 10; $i ++) { |
|
| 779 | + for ($i = 2; $i <= 10; $i++) { |
|
| 780 | 780 | if ($cache_difficulty == $i) { |
| 781 | 781 | $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
| 782 | 782 | } else { |
@@ -788,7 +788,7 @@ discard block |
||
| 788 | 788 | |
| 789 | 789 | //build terrain options |
| 790 | 790 | $terrain_options = ''; |
| 791 | - for ($i = 2; $i <= 10; $i ++) { |
|
| 791 | + for ($i = 2; $i <= 10; $i++) { |
|
| 792 | 792 | if ($cache_terrain == $i) { |
| 793 | 793 | $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
| 794 | 794 | } else { |
@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | $tmp = mb_ereg_replace('{publish_notnow_checked}', ($publish == 'notnow') ? 'checked' : '', $tmp); |
| 956 | 956 | |
| 957 | 957 | $activation_hours = ''; |
| 958 | - for ($i = 0; $i <= 23; $i ++) { |
|
| 958 | + for ($i = 0; $i <= 23; $i++) { |
|
| 959 | 959 | if ($cache_activate_hour == $i) { |
| 960 | 960 | $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
| 961 | 961 | } else { |
@@ -983,7 +983,7 @@ discard block |
||
| 983 | 983 | $cache_id |
| 984 | 984 | ); |
| 985 | 985 | |
| 986 | - for ($i = 0; $i < mysql_num_rows($rspictures); $i ++) { |
|
| 986 | + for ($i = 0; $i < mysql_num_rows($rspictures); $i++) { |
|
| 987 | 987 | $tmpline = ($i == 0 ? $pictureline0 : $pictureline); |
| 988 | 988 | $pic_record = sql_fetch_array($rspictures); |
| 989 | 989 | |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : ''); |
| 1067 | 1067 | tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : ''); |
| 1068 | 1068 | |
| 1069 | - tpl_set_var('reset', $reset); // obsolete |
|
| 1069 | + tpl_set_var('reset', $reset); // obsolete |
|
| 1070 | 1070 | tpl_set_var('submit', $submit); |
| 1071 | 1071 | } else { |
| 1072 | 1072 | //TODO: not the owner |