@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $tplname = 'login'; |
| 85 | 85 | |
| 86 | 86 | tpl_set_var('username', ''); |
| 87 | - tpl_set_var('target', 'editcache.php?cacheid=' . urlencode($cache_id)); |
|
| 87 | + tpl_set_var('target', 'editcache.php?cacheid='.urlencode($cache_id)); |
|
| 88 | 88 | tpl_set_var('message_start', ""); |
| 89 | 89 | tpl_set_var('message_end', ""); |
| 90 | 90 | tpl_set_var('message', $login_required); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | if ($cache_record['user_id'] == $usr['userid'] || $login->listingAdmin()) { |
| 131 | 131 | $tplname = 'editcache'; |
| 132 | 132 | |
| 133 | - require $stylepath . '/editcache.inc.php'; |
|
| 133 | + require $stylepath.'/editcache.inc.php'; |
|
| 134 | 134 | |
| 135 | 135 | if ($cache_record['node'] != $oc_nodeid) { |
| 136 | 136 | tpl_errorMsg('editcache', $error_wrong_node); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | //here we read all used information from the form if submitted, otherwise from DB |
| 141 | - $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 141 | + $cache_name = trim(isset($_POST['name']) ? $_POST['name'] : $cache_record['name']); // Ocprop |
|
| 142 | 142 | $cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type']; |
| 143 | 143 | if (!isset($_POST['size'])) { |
| 144 | 144 | if ($cache_type == 4 || $cache_type == 5) { |
@@ -152,15 +152,15 @@ discard block |
||
| 152 | 152 | $cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date( |
| 153 | 153 | 'd', |
| 154 | 154 | strtotime($cache_record['date_hidden']) |
| 155 | - ); // Ocprop |
|
| 155 | + ); // Ocprop |
|
| 156 | 156 | $cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date( |
| 157 | 157 | 'm', |
| 158 | 158 | strtotime($cache_record['date_hidden']) |
| 159 | - ); // Ocprop |
|
| 159 | + ); // Ocprop |
|
| 160 | 160 | $cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date( |
| 161 | 161 | 'Y', |
| 162 | 162 | strtotime($cache_record['date_hidden']) |
| 163 | - ); // Ocprop |
|
| 163 | + ); // Ocprop |
|
| 164 | 164 | |
| 165 | 165 | if (is_null($cache_record['date_activate'])) { |
| 166 | 166 | $cache_activate_day = isset($_POST['activate_day']) ? $_POST['activate_day'] : date('d'); |
@@ -186,11 +186,11 @@ discard block |
||
| 186 | 186 | ); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 190 | - $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 191 | - $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 189 | + $cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop |
|
| 190 | + $cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop |
|
| 191 | + $cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop |
|
| 192 | 192 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
| 193 | - $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 193 | + $status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop |
|
| 194 | 194 | $status_old = $cache_record['status']; |
| 195 | 195 | $search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time']; |
| 196 | 196 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | |
| 252 | 252 | $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw']; |
| 253 | 253 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
| 254 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 254 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
| 255 | 255 | $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0; |
| 256 | 256 | $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0; |
| 257 | 257 | |
@@ -263,12 +263,12 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | if (isset($_POST['latNS'])) { |
| 265 | 265 | //get coords from post-form |
| 266 | - $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 267 | - $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 268 | - $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 269 | - $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 270 | - $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 271 | - $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 266 | + $coords_latNS = $_POST['latNS']; // Ocprop |
|
| 267 | + $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
| 268 | + $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
| 269 | + $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
| 270 | + $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
| 271 | + $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
| 272 | 272 | } else { |
| 273 | 273 | //get coords from DB |
| 274 | 274 | $coords_lon = $cache_record['longitude']; |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $activation_date = 'NULL'; |
| 455 | 455 | } elseif ($publish == 'later') { |
| 456 | 456 | $status = 5; |
| 457 | - $activation_date = "'" . sql_escape( |
|
| 457 | + $activation_date = "'".sql_escape( |
|
| 458 | 458 | date( |
| 459 | 459 | 'Y-m-d H:i:s', |
| 460 | 460 | mktime( |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | $cache_activate_year |
| 467 | 467 | ) |
| 468 | 468 | ) |
| 469 | - ) . "'"; |
|
| 469 | + )."'"; |
|
| 470 | 470 | } elseif ($publish == 'notnow') { |
| 471 | 471 | $status = 5; |
| 472 | 472 | $activation_date = 'NULL'; |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | $logtype = 13; |
| 562 | 562 | break; |
| 563 | 563 | default: |
| 564 | - $logtype = 0; // ??? |
|
| 564 | + $logtype = 0; // ??? |
|
| 565 | 565 | } |
| 566 | 566 | if ($logtype > 0) { |
| 567 | 567 | sql( |
@@ -582,25 +582,25 @@ discard block |
||
| 582 | 582 | |
| 583 | 583 | // update cache attributes |
| 584 | 584 | $attriblist = "999"; |
| 585 | - for ($i = 0; $i < count($cache_attribs); $i ++) { |
|
| 585 | + for ($i = 0; $i < count($cache_attribs); $i++) { |
|
| 586 | 586 | if ($cache_attribs[$i] + 0 > 0) { |
| 587 | 587 | sql( |
| 588 | 588 | "INSERT IGNORE INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES('&1', '&2')", |
| 589 | 589 | $cache_id, |
| 590 | 590 | $cache_attribs[$i] + 0 |
| 591 | 591 | ); |
| 592 | - $attriblist .= "," . ($cache_attribs[$i] + 0); |
|
| 592 | + $attriblist .= ",".($cache_attribs[$i] + 0); |
|
| 593 | 593 | } |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | sql( |
| 597 | - "DELETE FROM `caches_attributes` WHERE `cache_id`='&1' AND `attrib_id` NOT IN (" . $attriblist . ")", |
|
| 597 | + "DELETE FROM `caches_attributes` WHERE `cache_id`='&1' AND `attrib_id` NOT IN (".$attriblist.")", |
|
| 598 | 598 | // SQL injections in $attriblist prevented by adding 0 above |
| 599 | 599 | $cache_id |
| 600 | 600 | ); |
| 601 | 601 | |
| 602 | 602 | //call eventhandler |
| 603 | - require_once $opt['rootpath'] . 'lib/eventhandler.inc.php'; |
|
| 603 | + require_once $opt['rootpath'].'lib/eventhandler.inc.php'; |
|
| 604 | 604 | event_edit_cache($cache_id, $usr['userid'] + 0); |
| 605 | 605 | |
| 606 | 606 | // if old status is not yet published and new status is published => notify-event |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | //display cache-page |
| 612 | - tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id)); |
|
| 612 | + tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id)); |
|
| 613 | 613 | // Ocprop: Location:\s*$viewcacheUrl\?cacheid=([0-9]+) (s.a. tpl_redirect() in common.inc.php |
| 614 | 614 | exit; |
| 615 | 615 | } |
@@ -650,15 +650,15 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | while ($record = sql_fetch_assoc($rs)) { |
| 652 | 652 | $sSelected = ($record['short'] == $cache_country) ? ' selected="selected"' : ''; |
| 653 | - $countriesoptions .= '<option value="' . htmlspecialchars( |
|
| 653 | + $countriesoptions .= '<option value="'.htmlspecialchars( |
|
| 654 | 654 | $record['short'], |
| 655 | 655 | ENT_COMPAT, |
| 656 | 656 | 'UTF-8' |
| 657 | - ) . '"' . $sSelected . '>' . htmlspecialchars( |
|
| 657 | + ).'"'.$sSelected.'>'.htmlspecialchars( |
|
| 658 | 658 | $record['name'], |
| 659 | 659 | ENT_COMPAT, |
| 660 | 660 | 'UTF-8' |
| 661 | - ) . '</option>' . "\n"; |
|
| 661 | + ).'</option>'."\n"; |
|
| 662 | 662 | } |
| 663 | 663 | tpl_set_var('countryoptions', $countriesoptions); |
| 664 | 664 | sql_free_result($rs); |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
| 716 | 716 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
| 717 | 717 | $group_line .= $line; |
| 718 | - $nLineAttrCount ++; |
|
| 718 | + $nLineAttrCount++; |
|
| 719 | 719 | |
| 720 | 720 | $line = $cache_attrib_js; |
| 721 | 721 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -772,11 +772,11 @@ discard block |
||
| 772 | 772 | |
| 773 | 773 | //difficulty |
| 774 | 774 | $difficulty_options = ''; |
| 775 | - for ($i = 2; $i <= 10; $i ++) { |
|
| 775 | + for ($i = 2; $i <= 10; $i++) { |
|
| 776 | 776 | if ($cache_difficulty == $i) { |
| 777 | - $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
| 777 | + $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
| 778 | 778 | } else { |
| 779 | - $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
| 779 | + $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
| 780 | 780 | } |
| 781 | 781 | $difficulty_options .= "\n"; |
| 782 | 782 | } |
@@ -784,11 +784,11 @@ discard block |
||
| 784 | 784 | |
| 785 | 785 | //build terrain options |
| 786 | 786 | $terrain_options = ''; |
| 787 | - for ($i = 2; $i <= 10; $i ++) { |
|
| 787 | + for ($i = 2; $i <= 10; $i++) { |
|
| 788 | 788 | if ($cache_terrain == $i) { |
| 789 | - $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
| 789 | + $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
| 790 | 790 | } else { |
| 791 | - $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
| 791 | + $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
| 792 | 792 | } |
| 793 | 793 | $terrain_options .= "\n"; |
| 794 | 794 | } |
@@ -801,16 +801,16 @@ discard block |
||
| 801 | 801 | FROM `cache_type` |
| 802 | 802 | LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id` |
| 803 | 803 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
| 804 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
| 804 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
| 805 | 805 | ORDER BY `cache_type`.`ordinal` ASC" |
| 806 | 806 | ); |
| 807 | 807 | while ($rType = sql_fetch_assoc($rsTypes)) { |
| 808 | 808 | $sSelected = ($rType['id'] == $cache_type) ? ' selected="selected"' : ''; |
| 809 | - $types .= '<option value="' . $rType['id'] . '"' . $sSelected . '>' . htmlspecialchars( |
|
| 809 | + $types .= '<option value="'.$rType['id'].'"'.$sSelected.'>'.htmlspecialchars( |
|
| 810 | 810 | $rType['name'], |
| 811 | 811 | ENT_COMPAT, |
| 812 | 812 | 'UTF-8' |
| 813 | - ) . '</option>'; |
|
| 813 | + ).'</option>'; |
|
| 814 | 814 | } |
| 815 | 815 | sql_free_result($rsTypes); |
| 816 | 816 | tpl_set_var('typeoptions', $types); |
@@ -822,16 +822,16 @@ discard block |
||
| 822 | 822 | FROM `cache_size` |
| 823 | 823 | LEFT JOIN `sys_trans` ON `cache_size`.`trans_id`=`sys_trans`.`id` |
| 824 | 824 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
| 825 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
| 825 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
| 826 | 826 | ORDER BY `cache_size`.`ordinal` ASC" |
| 827 | 827 | ); |
| 828 | 828 | while ($rSize = sql_fetch_assoc($rsSizes)) { |
| 829 | 829 | $sSelected = ($rSize['id'] == $sel_size) ? ' selected="selected"' : ''; |
| 830 | - $sizes .= '<option value="' . $rSize['id'] . '"' . $sSelected . '>' . htmlspecialchars( |
|
| 830 | + $sizes .= '<option value="'.$rSize['id'].'"'.$sSelected.'>'.htmlspecialchars( |
|
| 831 | 831 | $rSize['name'], |
| 832 | 832 | ENT_COMPAT, |
| 833 | 833 | 'UTF-8' |
| 834 | - ) . '</option>'; |
|
| 834 | + ).'</option>'; |
|
| 835 | 835 | } |
| 836 | 836 | sql_free_result($rsSizes); |
| 837 | 837 | tpl_set_var('sizeoptions', $sizes); |
@@ -842,14 +842,14 @@ discard block |
||
| 842 | 842 | $gc_com_refs = false; |
| 843 | 843 | foreach ($desclangs AS $desclang) { |
| 844 | 844 | if (count($desclangs) > 1) { |
| 845 | - $remove_url = 'removedesc.php?cacheid=' . urlencode($cache_id) . '&desclang=' . urlencode( |
|
| 845 | + $remove_url = 'removedesc.php?cacheid='.urlencode($cache_id).'&desclang='.urlencode( |
|
| 846 | 846 | $desclang |
| 847 | 847 | ); |
| 848 | - $removedesc = ' [<a href="' . htmlspecialchars( |
|
| 848 | + $removedesc = ' [<a href="'.htmlspecialchars( |
|
| 849 | 849 | $remove_url, |
| 850 | 850 | ENT_COMPAT, |
| 851 | 851 | 'UTF-8' |
| 852 | - ) . '">' . $remove . '</a>]'; |
|
| 852 | + ).'">'.$remove.'</a>]'; |
|
| 853 | 853 | } else { |
| 854 | 854 | $removedesc = ''; |
| 855 | 855 | } |
@@ -865,17 +865,17 @@ discard block |
||
| 865 | 865 | } |
| 866 | 866 | sql_free_result($resp); |
| 867 | 867 | |
| 868 | - $edit_url = 'editdesc.php?cacheid=' . urlencode($cache_id) . '&desclang=' . urlencode($desclang); |
|
| 868 | + $edit_url = 'editdesc.php?cacheid='.urlencode($cache_id).'&desclang='.urlencode($desclang); |
|
| 869 | 869 | |
| 870 | - $cache_descs .= '<tr><td colspan="2">' . htmlspecialchars( |
|
| 870 | + $cache_descs .= '<tr><td colspan="2">'.htmlspecialchars( |
|
| 871 | 871 | db_LanguageFromShort($desclang), |
| 872 | 872 | ENT_COMPAT, |
| 873 | 873 | 'UTF-8' |
| 874 | - ) . ' [<a href="' . htmlspecialchars( |
|
| 874 | + ).' [<a href="'.htmlspecialchars( |
|
| 875 | 875 | $edit_url, |
| 876 | 876 | ENT_COMPAT, |
| 877 | 877 | 'UTF-8' |
| 878 | - ) . '">' . $edit . '</a>]' . $removedesc . '</td></tr>'; |
|
| 878 | + ).'">'.$edit.'</a>]'.$removedesc.'</td></tr>'; |
|
| 879 | 879 | } |
| 880 | 880 | tpl_set_var('cache_descs', $cache_descs); |
| 881 | 881 | |
@@ -895,33 +895,33 @@ discard block |
||
| 895 | 895 | FROM `cache_status` |
| 896 | 896 | LEFT JOIN `sys_trans` ON `cache_status`.`trans_id`=`sys_trans`.`id` |
| 897 | 897 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
| 898 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
| 898 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
| 899 | 899 | WHERE `cache_status`.`id` NOT IN (4, 5, 7) OR `cache_status`.`id`='" . sql_escape( |
| 900 | 900 | $status_old + 0 |
| 901 | - ) . "' |
|
| 901 | + )."' |
|
| 902 | 902 | ORDER BY `cache_status`.`id` ASC" |
| 903 | 903 | ); |
| 904 | 904 | while ($rStatus = sql_fetch_assoc($rsStatus)) { |
| 905 | 905 | $sSelected = ($rStatus['id'] == $status) ? ' selected="selected"' : ''; |
| 906 | 906 | if ($sSelected != '' || $status_old == 5) { |
| 907 | - $statusoptions .= '<option value="' . htmlspecialchars( |
|
| 907 | + $statusoptions .= '<option value="'.htmlspecialchars( |
|
| 908 | 908 | $rStatus['id'], |
| 909 | 909 | ENT_COMPAT, |
| 910 | 910 | 'UTF-8' |
| 911 | - ) . '"' . $sSelected . '>' . htmlspecialchars( |
|
| 911 | + ).'"'.$sSelected.'>'.htmlspecialchars( |
|
| 912 | 912 | $rStatus['name'], |
| 913 | 913 | ENT_COMPAT, |
| 914 | 914 | 'UTF-8' |
| 915 | - ) . '</option>'; |
|
| 915 | + ).'</option>'; |
|
| 916 | 916 | } |
| 917 | 917 | } |
| 918 | 918 | sql_free_result($rsStatus); |
| 919 | 919 | } else { |
| 920 | - $statusoptions .= '<option value="7" selected="selected">' . htmlspecialchars( |
|
| 920 | + $statusoptions .= '<option value="7" selected="selected">'.htmlspecialchars( |
|
| 921 | 921 | t("Locked, invisible"), |
| 922 | 922 | ENT_COMPAT, |
| 923 | 923 | 'UTF-8' |
| 924 | - ) . '</option>'; |
|
| 924 | + ).'</option>'; |
|
| 925 | 925 | } |
| 926 | 926 | tpl_set_var('statusoptions', $statusoptions); |
| 927 | 927 | tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1', $cache_id, $status_change)); |
@@ -951,11 +951,11 @@ discard block |
||
| 951 | 951 | $tmp = mb_ereg_replace('{publish_notnow_checked}', ($publish == 'notnow') ? 'checked' : '', $tmp); |
| 952 | 952 | |
| 953 | 953 | $activation_hours = ''; |
| 954 | - for ($i = 0; $i <= 23; $i ++) { |
|
| 954 | + for ($i = 0; $i <= 23; $i++) { |
|
| 955 | 955 | if ($cache_activate_hour == $i) { |
| 956 | - $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
|
| 956 | + $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'; |
|
| 957 | 957 | } else { |
| 958 | - $activation_hours .= '<option value="' . $i . '">' . $i . '</option>'; |
|
| 958 | + $activation_hours .= '<option value="'.$i.'">'.$i.'</option>'; |
|
| 959 | 959 | } |
| 960 | 960 | $activation_hours .= "\n"; |
| 961 | 961 | } |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | $cache_id |
| 980 | 980 | ); |
| 981 | 981 | |
| 982 | - for ($i = 0; $i < mysql_num_rows($rspictures); $i ++) { |
|
| 982 | + for ($i = 0; $i < mysql_num_rows($rspictures); $i++) { |
|
| 983 | 983 | $tmpline = ($i == 0 ? $pictureline0 : $pictureline); |
| 984 | 984 | $pic_record = sql_fetch_array($rspictures); |
| 985 | 985 | |
@@ -1054,7 +1054,7 @@ discard block |
||
| 1054 | 1054 | $st_hours = floor($search_time); |
| 1055 | 1055 | $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60); |
| 1056 | 1056 | |
| 1057 | - tpl_set_var('search_time', $st_hours . ':' . $st_minutes); |
|
| 1057 | + tpl_set_var('search_time', $st_hours.':'.$st_minutes); |
|
| 1058 | 1058 | |
| 1059 | 1059 | tpl_set_var('way_length', $way_length); |
| 1060 | 1060 | tpl_set_var('log_pw', htmlspecialchars($log_pw, ENT_COMPAT, 'UTF-8')); |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : ''); |
| 1063 | 1063 | tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : ''); |
| 1064 | 1064 | |
| 1065 | - tpl_set_var('reset', $reset); // obsolete |
|
| 1065 | + tpl_set_var('reset', $reset); // obsolete |
|
| 1066 | 1066 | tpl_set_var('submit', $submit); |
| 1067 | 1067 | } else { |
| 1068 | 1068 | //TODO: not the owner |
@@ -76,7 +76,8 @@ discard block |
||
| 76 | 76 | if ($error == false) { |
| 77 | 77 | //cacheid |
| 78 | 78 | $cache_id = 0; |
| 79 | - if (isset($_REQUEST['cacheid'])) { // Ocprop |
|
| 79 | + if (isset($_REQUEST['cacheid'])) { |
|
| 80 | +// Ocprop |
|
| 80 | 81 | $cache_id = $_REQUEST['cacheid']; |
| 81 | 82 | } |
| 82 | 83 | |
@@ -196,7 +197,8 @@ discard block |
||
| 196 | 197 | $way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length']; |
| 197 | 198 | |
| 198 | 199 | if ($status_old == 5 && $status == 5) { |
| 199 | - if (isset($_POST['publish'])) { // Ocprop |
|
| 200 | + if (isset($_POST['publish'])) { |
|
| 201 | +// Ocprop |
|
| 200 | 202 | $publish = $_POST['publish']; |
| 201 | 203 | if (!($publish == 'now' || $publish == 'later' || $publish == 'notnow')) { |
| 202 | 204 | // somebody messed up the POST-data, so we do not publish the cache, since he isn't published right now (status=5) |
@@ -226,12 +228,14 @@ discard block |
||
| 226 | 228 | $status = $status_old; |
| 227 | 229 | } |
| 228 | 230 | |
| 229 | - if ($status_old == 7) // cache is locked |
|
| 231 | + if ($status_old == 7) { |
|
| 232 | + // cache is locked |
|
| 230 | 233 | { |
| 231 | 234 | // only admins can change status of locked caches |
| 232 | 235 | if (($bAdmin & ADMIN_USER) != ADMIN_USER) { |
| 233 | 236 | // no status change allowed for normal user |
| 234 | 237 | $status = $status_old; |
| 238 | + } |
|
| 235 | 239 | } |
| 236 | 240 | } |
| 237 | 241 | |
@@ -437,7 +441,8 @@ discard block |
||
| 437 | 441 | } |
| 438 | 442 | |
| 439 | 443 | //try to save to DB? |
| 440 | - if (isset($_POST['submit'])) { // Ocprop |
|
| 444 | + if (isset($_POST['submit'])) { |
|
| 445 | +// Ocprop |
|
| 441 | 446 | //all validations ok? |
| 442 | 447 | if (!($hidden_date_not_ok || $lat_not_ok || $lon_not_ok || $name_not_ok || $time_not_ok || $way_length_not_ok || $size_not_ok || $activate_date_not_ok || $status_not_ok || $diff_not_ok || $attribs_not_ok || $wpgc_not_ok)) { |
| 443 | 448 | $cache_lat = $coords_lat_h + $coords_lat_min / 60; |
@@ -927,9 +932,11 @@ discard block |
||
| 927 | 932 | tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1', $cache_id, $status_change)); |
| 928 | 933 | |
| 929 | 934 | // show activation form? |
| 930 | - if ($status_old == 5) // status = not yet published |
|
| 935 | + if ($status_old == 5) { |
|
| 936 | + // status = not yet published |
|
| 931 | 937 | { |
| 932 | 938 | $tmp = $activation_form; |
| 939 | + } |
|
| 933 | 940 | |
| 934 | 941 | $tmp = mb_ereg_replace( |
| 935 | 942 | '{activate_day}', |