@@ -9,10 +9,10 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
12 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
13 | 13 | $opt['gui'] = GUI_HTML; |
14 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
15 | -require_once __DIR__ . '/lib2/edithelper.inc.php'; |
|
14 | +require_once __DIR__.'/lib/common.inc.php'; |
|
15 | +require_once __DIR__.'/lib2/edithelper.inc.php'; |
|
16 | 16 | |
17 | 17 | $no_tpl_build = false; |
18 | 18 | |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | |
34 | 34 | //set here the template to process |
35 | 35 | $tplname = 'newcache'; |
36 | - require_once $stylepath . '/' . $tplname . '.inc.php'; |
|
36 | + require_once $stylepath.'/'.$tplname.'.inc.php'; |
|
37 | 37 | |
38 | 38 | //set template replacements |
39 | - tpl_set_var('reset', $reset); // obsolete |
|
39 | + tpl_set_var('reset', $reset); // obsolete |
|
40 | 40 | tpl_set_var('submit', $submit); |
41 | 41 | tpl_set_var('general_message', ''); |
42 | 42 | tpl_set_var('hidden_since_message', ''); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | tpl_set_var('diff_message', ''); |
54 | 54 | tpl_set_var('safari_message', ''); |
55 | 55 | |
56 | - $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
56 | + $sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop |
|
57 | 57 | if (!isset($_POST['size'])) { |
58 | 58 | if ($sel_type == 4 || $sel_type == 5) { |
59 | 59 | $sel_size = 7; |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | $sel_size = - 1; |
62 | 62 | } |
63 | 63 | } else { |
64 | - $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
64 | + $sel_size = isset($_POST['size']) ? $_POST['size'] : - 1; // Ocprop |
|
65 | 65 | } |
66 | 66 | $sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; |
67 | - $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
67 | + $sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop |
|
68 | 68 | $show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0; |
69 | 69 | $show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0; |
70 | 70 | |
71 | 71 | //coords |
72 | - $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
72 | + $lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop |
|
73 | 73 | if ($lonEW == 'E') { |
74 | 74 | tpl_set_var('lonEsel', ' selected="selected"'); |
75 | 75 | tpl_set_var('lonWsel', ''); |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | tpl_set_var('lonEsel', ''); |
78 | 78 | tpl_set_var('lonWsel', ' selected="selected"'); |
79 | 79 | } |
80 | - $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
80 | + $lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop |
|
81 | 81 | tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8')); |
82 | 82 | |
83 | - $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
83 | + $lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop |
|
84 | 84 | tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8')); |
85 | 85 | |
86 | - $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
86 | + $latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop |
|
87 | 87 | if ($latNS == 'N') { |
88 | 88 | tpl_set_var('latNsel', ' selected="selected"'); |
89 | 89 | tpl_set_var('latSsel', ''); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | tpl_set_var('latNsel', ''); |
92 | 92 | tpl_set_var('latSsel', ' selected="selected"'); |
93 | 93 | } |
94 | - $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
94 | + $lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop |
|
95 | 95 | tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8')); |
96 | 96 | |
97 | - $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
97 | + $lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop |
|
98 | 98 | tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8')); |
99 | 99 | |
100 | 100 | //name |
101 | - $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
101 | + $name = isset($_POST['name']) ? trim($_POST['name']) : ''; // Ocprop |
|
102 | 102 | tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8')); |
103 | 103 | |
104 | 104 | //shortdesc |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $oldDescMode = $descMode; |
121 | 121 | } |
122 | 122 | } else { |
123 | - if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='" . sql_escape($usr['userid']) . "'", 1) == 1) { |
|
123 | + if (sqlValue("SELECT `no_htmledit_flag` FROM `user` WHERE `user_id`='".sql_escape($usr['userid'])."'", 1) == 1) { |
|
124 | 124 | $descMode = 1; |
125 | 125 | } else { |
126 | 126 | $descMode = 3; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | // fuer alte Versionen von OCProp |
132 | 132 | if (isset($_POST['submit']) && !isset($_POST['version2'])) { |
133 | - $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
133 | + $descMode = (isset($_POST['desc_html']) && ($_POST['desc_html'] == 1)) ? 2 : 1; // Ocprop |
|
134 | 134 | $_POST['submitform'] = $_POST['submit']; |
135 | 135 | |
136 | 136 | $short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc); |
@@ -152,13 +152,13 @@ discard block |
||
152 | 152 | |
153 | 153 | tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8')); |
154 | 154 | |
155 | - $headers = tpl_get_var('htmlheaders') . "\n"; |
|
155 | + $headers = tpl_get_var('htmlheaders')."\n"; |
|
156 | 156 | if ($descMode == 3) { |
157 | 157 | // TinyMCE |
158 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>' . "\n"; |
|
159 | - $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang=' . strtolower($locale) . '"></script>' . "\n"; |
|
158 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/tiny_mce_gzip.js"></script>'."\n"; |
|
159 | + $headers .= '<script language="javascript" type="text/javascript" src="resource2/tinymce/config/desc.js.php?cacheid=0&lang='.strtolower($locale).'"></script>'."\n"; |
|
160 | 160 | } |
161 | - $headers .= '<script language="javascript" type="text/javascript" src="' . editorJsPath() . '"></script>' . "\n"; |
|
161 | + $headers .= '<script language="javascript" type="text/javascript" src="'.editorJsPath().'"></script>'."\n"; |
|
162 | 162 | tpl_set_var('htmlheaders', $headers); |
163 | 163 | |
164 | 164 | //effort |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $st_hours = floor($search_time); |
183 | 183 | $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60); |
184 | 184 | |
185 | - tpl_set_var('search_time', $st_hours . ':' . $st_minutes); |
|
185 | + tpl_set_var('search_time', $st_hours.':'.$st_minutes); |
|
186 | 186 | tpl_set_var('way_length', $way_length); |
187 | 187 | |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | //tos |
199 | - $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
199 | + $tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop |
|
200 | 200 | if ($tos == 1) { |
201 | 201 | tpl_set_var('toschecked', ' checked="checked"'); |
202 | 202 | } else { |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | //hidden_since |
207 | - $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | - $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | - $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
207 | + $hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop |
|
208 | + $hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop |
|
209 | + $hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop |
|
210 | 210 | tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8')); |
211 | 211 | tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8')); |
212 | 212 | tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8')); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | tpl_set_var('publish_later_checked', ''); |
224 | 224 | tpl_set_var('publish_notnow_checked', ''); |
225 | 225 | |
226 | - $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
226 | + $publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop |
|
227 | 227 | if ($publish == 'now2') { |
228 | 228 | tpl_set_var('publish_now_checked', 'checked'); |
229 | 229 | } elseif ($publish == 'later') { |
@@ -237,11 +237,11 @@ discard block |
||
237 | 237 | // fill activate hours |
238 | 238 | $activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] + 0 : date('H') + 0; |
239 | 239 | $activation_hours = ''; |
240 | - for ($i = 0; $i <= 23; $i ++) { |
|
240 | + for ($i = 0; $i <= 23; $i++) { |
|
241 | 241 | if ($activate_hour == $i) { |
242 | - $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
|
242 | + $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'; |
|
243 | 243 | } else { |
244 | - $activation_hours .= '<option value="' . $i . '">' . $i . '</option>'; |
|
244 | + $activation_hours .= '<option value="'.$i.'">'.$i.'</option>'; |
|
245 | 245 | } |
246 | 246 | $activation_hours .= "\n"; |
247 | 247 | } |
@@ -253,30 +253,30 @@ discard block |
||
253 | 253 | |
254 | 254 | // gc- and nc-waypoints |
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'])) : ''; // Ocprop |
|
256 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : ''; // Ocprop |
|
257 | 257 | tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8')); |
258 | 258 | |
259 | 259 | //difficulty |
260 | - $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | - $difficulty_options = '<option value="1">' . $sel_message . '</option>'; |
|
262 | - for ($i = 2; $i <= 10; $i ++) { |
|
260 | + $difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop |
|
261 | + $difficulty_options = '<option value="1">'.$sel_message.'</option>'; |
|
262 | + for ($i = 2; $i <= 10; $i++) { |
|
263 | 263 | if ($difficulty == $i) { |
264 | - $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
264 | + $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
265 | 265 | } else { |
266 | - $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
266 | + $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
267 | 267 | } |
268 | 268 | $difficulty_options .= "\n"; |
269 | 269 | } |
270 | 270 | tpl_set_var('difficulty_options', $difficulty_options); |
271 | 271 | |
272 | 272 | //terrain |
273 | - $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | - $terrain_options = '<option value="1">' . $sel_message . '</option>'; |
|
275 | - for ($i = 2; $i <= 10; $i ++) { |
|
273 | + $terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop |
|
274 | + $terrain_options = '<option value="1">'.$sel_message.'</option>'; |
|
275 | + for ($i = 2; $i <= 10; $i++) { |
|
276 | 276 | if ($terrain == $i) { |
277 | - $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
277 | + $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
278 | 278 | } else { |
279 | - $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
279 | + $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
280 | 280 | } |
281 | 281 | $terrain_options .= "\n"; |
282 | 282 | } |
@@ -284,34 +284,34 @@ discard block |
||
284 | 284 | |
285 | 285 | //sizeoptions |
286 | 286 | $sSelected = ($sel_size == - 1) ? ' selected="selected"' : ''; |
287 | - $sizes = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
287 | + $sizes = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
288 | 288 | $rsSizes = sql( |
289 | 289 | "SELECT `cache_size`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_size`.`name`) AS `name` |
290 | 290 | FROM `cache_size` |
291 | 291 | LEFT JOIN `sys_trans` ON `cache_size`.`trans_id`=`sys_trans`.`id` |
292 | 292 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
293 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
293 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
294 | 294 | ORDER BY `cache_size`.`ordinal` ASC" |
295 | 295 | ); |
296 | 296 | while ($rSize = sql_fetch_assoc($rsSizes)) { |
297 | 297 | $sSelected = ($rSize['id'] == $sel_size) ? ' selected="selected"' : ''; |
298 | - $sizes .= '<option value="' . $rSize['id'] . '"' . $sSelected . '>' . htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
298 | + $sizes .= '<option value="'.$rSize['id'].'"'.$sSelected.'>'.htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
299 | 299 | } |
300 | 300 | sql_free_result($rsSizes); |
301 | 301 | tpl_set_var('sizeoptions', $sizes); |
302 | 302 | |
303 | 303 | //typeoptions |
304 | 304 | $sSelected = ($sel_type == - 1) ? ' selected="selected"' : ''; |
305 | - $types = '<option value="-1"' . $sSelected . '>' . htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8') . '</option>'; |
|
305 | + $types = '<option value="-1"'.$sSelected.'>'.htmlspecialchars(t('Please select!'), ENT_COMPAT, 'UTF-8').'</option>'; |
|
306 | 306 | $rsTypes = sql("SELECT `cache_type`.`id`, IFNULL(`sys_trans_text`.`text`, `cache_type`.`en`) AS `name` |
307 | 307 | FROM `cache_type` |
308 | 308 | LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id` |
309 | 309 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
310 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
310 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
311 | 311 | ORDER BY `cache_type`.`ordinal` ASC"); |
312 | 312 | while ($rType = sql_fetch_assoc($rsTypes)) { |
313 | 313 | $sSelected = ($rType['id'] == $sel_type) ? ' selected="selected"' : ''; |
314 | - $types .= '<option value="' . $rType['id'] . '"' . $sSelected . '>' . htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8') . '</option>'; |
|
314 | + $types .= '<option value="'.$rType['id'].'"'.$sSelected.'>'.htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8').'</option>'; |
|
315 | 315 | } |
316 | 316 | sql_free_result($rsTypes); |
317 | 317 | tpl_set_var('typeoptions', $types); |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | tpl_set_var('show_all_langs', '0'); |
343 | 343 | tpl_set_var( |
344 | 344 | 'show_all_langs_submit', |
345 | - '<input type="submit" name="show_all_langs_submit" value="' . $show_all . '"/>' |
|
345 | + '<input type="submit" name="show_all_langs_submit" value="'.$show_all.'"/>' |
|
346 | 346 | ); |
347 | 347 | |
348 | 348 | $rs = sql( |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | while ($record = sql_fetch_assoc($rs)) { |
378 | 378 | $sSelected = ($record['short'] == $sel_lang) ? ' selected="selected"' : ''; |
379 | - $langsoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
379 | + $langsoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | tpl_set_var('langoptions', $langsoptions); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | if ($show_all_countries == 0) { |
401 | 401 | tpl_set_var('show_all_countries', '0'); |
402 | - tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="' . $show_all . '" onclick="submitbutton(\'showallcountries\')" />'); |
|
402 | + tpl_set_var('show_all_countries_submit', '<input type="submit" id="showallcountries" class="formbutton" name="show_all_countries_submit" value="'.$show_all.'" onclick="submitbutton(\'showallcountries\')" />'); |
|
403 | 403 | |
404 | 404 | $rs = sql( |
405 | 405 | "SELECT `countries`.`short`, IFNULL(`sys_trans_text`.`text`, `countries`.`name`) AS `name` |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | // build the "country" dropdown list, preselect $sel_country |
435 | 435 | while ($record = sql_fetch_array($rs)) { |
436 | 436 | $sSelected = ($record['short'] == $sel_country) ? ' selected="selected"' : ''; |
437 | - $countriesoptions .= '<option value="' . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') . '</option>' . "\n"; |
|
437 | + $countriesoptions .= '<option value="'.htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8').'"'.$sSelected.'>'.htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8').'</option>'."\n"; |
|
438 | 438 | } |
439 | 439 | sql_free_result($rs); |
440 | 440 | |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | LEFT JOIN `sys_trans_text` AS `ttdesc` |
489 | 489 | ON `tdesc`.`id`=`ttdesc`.`trans_id` |
490 | 490 | AND `ttdesc`.`lang`='&1' |
491 | - WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0) . " |
|
491 | + WHERE `cache_attrib`.`group_id`=" . ($rAttrGroup['id'] + 0)." |
|
492 | 492 | AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1 |
493 | 493 | AND `cache_attrib`.`selectable`!=0 |
494 | 494 | ORDER BY `cache_attrib`.`group_id`, `cache_attrib`.`id`", |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
509 | 509 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
510 | 510 | $group_line .= $line; |
511 | - $nLineAttrCount ++; |
|
511 | + $nLineAttrCount++; |
|
512 | 512 | |
513 | 513 | $line = $cache_attrib_js; |
514 | 514 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -673,8 +673,8 @@ discard block |
||
673 | 673 | "SELECT MIN(wp_oc) |
674 | 674 | FROM `caches` |
675 | 675 | WHERE `status`=1 |
676 | - AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude) . "',6) |
|
677 | - AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude) . "',6)", |
|
676 | + AND ROUND(`longitude`,6)=ROUND('" . sql_escape($longitude)."',6) |
|
677 | + AND ROUND(`latitude`,6)=ROUND('" . sql_escape($latitude)."',6)", |
|
678 | 678 | null |
679 | 679 | ); |
680 | 680 | if ($duplicate_wpoc) { |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | } elseif ($publish == 'later') { |
814 | 814 | $sel_status = 5; |
815 | 815 | $activation_date = |
816 | - "'" . date( |
|
816 | + "'".date( |
|
817 | 817 | 'Y-m-d H:i:s', |
818 | 818 | mktime( |
819 | 819 | $activate_hour, |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $activate_day, |
824 | 824 | $activate_year |
825 | 825 | ) |
826 | - ) . "'"; |
|
826 | + )."'"; |
|
827 | 827 | } elseif ($publish == 'notnow') { |
828 | 828 | $sel_status = 5; |
829 | 829 | $activation_date = 'NULL'; |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | ); |
904 | 904 | |
905 | 905 | // insert cache-attributes |
906 | - for ($i = 0; $i < count($cache_attribs); $i ++) { |
|
906 | + for ($i = 0; $i < count($cache_attribs); $i++) { |
|
907 | 907 | if (($cache_attribs[$i] + 0) > 0) { |
908 | 908 | sql( |
909 | 909 | "INSERT INTO `caches_attributes` (`cache_id`, `attrib_id`) VALUES ('&1', '&2')", |
@@ -916,14 +916,14 @@ discard block |
||
916 | 916 | // only if cache is published NOW or activate_date is in the past |
917 | 917 | if ($publish == 'now2' || ($publish == 'later' && mktime($activate_hour, 0, 0, $activate_month, $activate_day, $activate_year) <= $today)) { |
918 | 918 | //do event handling |
919 | - include_once(__DIR__ . '/lib/eventhandler.inc.php'); |
|
919 | + include_once(__DIR__.'/lib/eventhandler.inc.php'); |
|
920 | 920 | |
921 | 921 | event_notify_new_cache($cache_id + 0); |
922 | 922 | event_new_cache($usr['userid'] + 0); |
923 | 923 | } |
924 | 924 | |
925 | 925 | // redirection |
926 | - tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id)); |
|
926 | + tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id)); |
|
927 | 927 | } else { |
928 | 928 | tpl_set_var('general_message', $error_general); |
929 | 929 | } |
@@ -106,7 +106,8 @@ discard block |
||
106 | 106 | tpl_set_var('short_desc', htmlspecialchars($short_desc, ENT_COMPAT, 'UTF-8')); |
107 | 107 | |
108 | 108 | // descMode auslesen, falls nicht gesetzt aus dem Profil laden |
109 | - if (isset($_POST['descMode'])) {// Ocprop |
|
109 | + if (isset($_POST['descMode'])) { |
|
110 | +// Ocprop |
|
110 | 111 | $descMode = $_POST['descMode'] + 0; |
111 | 112 | if (($descMode < 1) || ($descMode > 3)) { |
112 | 113 | $descMode = 3; |
@@ -569,7 +570,8 @@ discard block |
||
569 | 570 | |
570 | 571 | tpl_set_var('firstcache_note', mb_ereg_replace('%1', $opt['page']['sitename'], $firstcache_note)); |
571 | 572 | |
572 | - if (isset($_POST['submitform'])) { // Ocprop |
|
573 | + if (isset($_POST['submitform'])) { |
|
574 | +// Ocprop |
|
573 | 575 | // check the entered data |
574 | 576 | |
575 | 577 | // check coordinates |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | use Oc\Libse\ChildWp\HandlerChildWp; |
14 | 14 | use Oc\Libse\Coordinate\FormatterCoordinate; |
15 | 15 | |
16 | -require_once __DIR__ . '/lib/consts.inc.php'; |
|
16 | +require_once __DIR__.'/lib/consts.inc.php'; |
|
17 | 17 | $opt['gui'] = GUI_HTML; |
18 | -require_once __DIR__ . '/lib/common.inc.php'; |
|
18 | +require_once __DIR__.'/lib/common.inc.php'; |
|
19 | 19 | |
20 | 20 | function getWaypoints($cacheid) |
21 | 21 | { |
@@ -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']; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | $log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw']; |
252 | 252 | // fix #4356: gc waypoints are frequently copy&pasted with leading spaces |
253 | - $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
253 | + $wp_gc = isset($_POST['wp_gc']) ? strtoupper(trim($_POST['wp_gc'])) : $cache_record['wp_gc']; // Ocprop |
|
254 | 254 | $showlists = isset($_POST['showlists']) ? 1 : $cache_record['show_cachelists'] + 0; |
255 | 255 | $protect_old_coords = isset($_POST['protect_old_coords']) ? 1 : $cache_record['protect_old_coords'] + 0; |
256 | 256 | |
@@ -262,12 +262,12 @@ discard block |
||
262 | 262 | |
263 | 263 | if (isset($_POST['latNS'])) { |
264 | 264 | //get coords from post-form |
265 | - $coords_latNS = $_POST['latNS']; // Ocprop |
|
266 | - $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
267 | - $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
268 | - $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
269 | - $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
270 | - $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
265 | + $coords_latNS = $_POST['latNS']; // Ocprop |
|
266 | + $coords_lonEW = $_POST['lonEW']; // Ocprop |
|
267 | + $coords_lat_h = $_POST['lat_h']; // Ocprop |
|
268 | + $coords_lon_h = $_POST['lon_h']; // Ocprop |
|
269 | + $coords_lat_min = $_POST['lat_min']; // Ocprop |
|
270 | + $coords_lon_min = $_POST['lon_min']; // Ocprop |
|
271 | 271 | } else { |
272 | 272 | //get coords from DB |
273 | 273 | $coords_lon = $cache_record['longitude']; |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } elseif ($publish == 'later') { |
458 | 458 | $status = 5; |
459 | 459 | $activation_date = |
460 | - "'" . sql_escape( |
|
460 | + "'".sql_escape( |
|
461 | 461 | date( |
462 | 462 | 'Y-m-d H:i:s', |
463 | 463 | mktime( |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $cache_activate_year |
470 | 470 | ) |
471 | 471 | ) |
472 | - ) . "'"; |
|
472 | + )."'"; |
|
473 | 473 | } elseif ($publish == 'notnow') { |
474 | 474 | $status = 5; |
475 | 475 | $activation_date = 'NULL'; |
@@ -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,25 +585,25 @@ 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')", |
592 | 592 | $cache_id, |
593 | 593 | $cache_attribs[$i] + 0 |
594 | 594 | ); |
595 | - $attriblist .= "," . ($cache_attribs[$i] + 0); |
|
595 | + $attriblist .= ",".($cache_attribs[$i] + 0); |
|
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
599 | 599 | sql( |
600 | - "DELETE FROM `caches_attributes` WHERE `cache_id`='&1' AND `attrib_id` NOT IN (" . $attriblist . ")", |
|
600 | + "DELETE FROM `caches_attributes` WHERE `cache_id`='&1' AND `attrib_id` NOT IN (".$attriblist.")", |
|
601 | 601 | // SQL injections in $attriblist prevented by adding 0 above |
602 | 602 | $cache_id |
603 | 603 | ); |
604 | 604 | |
605 | 605 | //call eventhandler |
606 | - require_once $opt['rootpath'] . 'lib/eventhandler.inc.php'; |
|
606 | + require_once $opt['rootpath'].'lib/eventhandler.inc.php'; |
|
607 | 607 | event_edit_cache($cache_id, $usr['userid'] + 0); |
608 | 608 | |
609 | 609 | // if old status is not yet published and new status is published => notify-event |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | } |
613 | 613 | |
614 | 614 | //display cache-page |
615 | - tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id)); |
|
615 | + tpl_redirect('viewcache.php?cacheid='.urlencode($cache_id)); |
|
616 | 616 | // Ocprop: Location:\s*$viewcacheUrl\?cacheid=([0-9]+) |
617 | 617 | // (s.a. tpl_redirect() in common.inc.php |
618 | 618 | exit; |
@@ -657,9 +657,9 @@ discard block |
||
657 | 657 | $countriesoptions .= |
658 | 658 | '<option value="' |
659 | 659 | . htmlspecialchars($record['short'], ENT_COMPAT, 'UTF-8') |
660 | - . '"' . $sSelected . '>' |
|
660 | + . '"'.$sSelected.'>' |
|
661 | 661 | . htmlspecialchars($record['name'], ENT_COMPAT, 'UTF-8') |
662 | - . '</option>' . "\n"; |
|
662 | + . '</option>'."\n"; |
|
663 | 663 | } |
664 | 664 | tpl_set_var('countryoptions', $countriesoptions); |
665 | 665 | sql_free_result($rs); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | $line = mb_ereg_replace('{name}', escape_javascript($record['name']), $line); |
717 | 717 | $line = mb_ereg_replace('{color}', $rAttrGroup['color'], $line); |
718 | 718 | $group_line .= $line; |
719 | - $nLineAttrCount ++; |
|
719 | + $nLineAttrCount++; |
|
720 | 720 | |
721 | 721 | $line = $cache_attrib_js; |
722 | 722 | $line = mb_ereg_replace('{id}', $record['id'], $line); |
@@ -773,11 +773,11 @@ discard block |
||
773 | 773 | |
774 | 774 | //difficulty |
775 | 775 | $difficulty_options = ''; |
776 | - for ($i = 2; $i <= 10; $i ++) { |
|
776 | + for ($i = 2; $i <= 10; $i++) { |
|
777 | 777 | if ($cache_difficulty == $i) { |
778 | - $difficulty_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
778 | + $difficulty_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
779 | 779 | } else { |
780 | - $difficulty_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
780 | + $difficulty_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
781 | 781 | } |
782 | 782 | $difficulty_options .= "\n"; |
783 | 783 | } |
@@ -785,11 +785,11 @@ discard block |
||
785 | 785 | |
786 | 786 | //build terrain options |
787 | 787 | $terrain_options = ''; |
788 | - for ($i = 2; $i <= 10; $i ++) { |
|
788 | + for ($i = 2; $i <= 10; $i++) { |
|
789 | 789 | if ($cache_terrain == $i) { |
790 | - $terrain_options .= '<option value="' . $i . '" selected="selected">' . $i / 2 . '</option>'; |
|
790 | + $terrain_options .= '<option value="'.$i.'" selected="selected">'.$i / 2.'</option>'; |
|
791 | 791 | } else { |
792 | - $terrain_options .= '<option value="' . $i . '">' . $i / 2 . '</option>'; |
|
792 | + $terrain_options .= '<option value="'.$i.'">'.$i / 2.'</option>'; |
|
793 | 793 | } |
794 | 794 | $terrain_options .= "\n"; |
795 | 795 | } |
@@ -802,13 +802,13 @@ discard block |
||
802 | 802 | FROM `cache_type` |
803 | 803 | LEFT JOIN `sys_trans` ON `cache_type`.`trans_id`=`sys_trans`.`id` |
804 | 804 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
805 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
805 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
806 | 806 | ORDER BY `cache_type`.`ordinal` ASC" |
807 | 807 | ); |
808 | 808 | while ($rType = sql_fetch_assoc($rsTypes)) { |
809 | 809 | $sSelected = ($rType['id'] == $cache_type) ? ' selected="selected"' : ''; |
810 | 810 | $types .= |
811 | - '<option value="' . $rType['id'] . '"' . $sSelected . '>' |
|
811 | + '<option value="'.$rType['id'].'"'.$sSelected.'>' |
|
812 | 812 | . htmlspecialchars($rType['name'], ENT_COMPAT, 'UTF-8') |
813 | 813 | . '</option>'; |
814 | 814 | } |
@@ -822,13 +822,13 @@ 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 | 830 | $sizes .= |
831 | - '<option value="' . $rSize['id'] . '"' . $sSelected . '>' |
|
831 | + '<option value="'.$rSize['id'].'"'.$sSelected.'>' |
|
832 | 832 | . htmlspecialchars($rSize['name'], ENT_COMPAT, 'UTF-8') |
833 | 833 | . '</option>'; |
834 | 834 | } |
@@ -842,12 +842,12 @@ discard block |
||
842 | 842 | foreach ($desclangs as $desclang) { |
843 | 843 | if (count($desclangs) > 1) { |
844 | 844 | $remove_url = |
845 | - 'removedesc.php?cacheid=' . urlencode($cache_id) |
|
846 | - . '&desclang=' . urlencode($desclang); |
|
845 | + 'removedesc.php?cacheid='.urlencode($cache_id) |
|
846 | + . '&desclang='.urlencode($desclang); |
|
847 | 847 | $removedesc = |
848 | 848 | ' [<a href="' |
849 | 849 | . htmlspecialchars($remove_url, ENT_COMPAT, 'UTF-8') |
850 | - . '">' . $remove . '</a>]'; |
|
850 | + . '">'.$remove.'</a>]'; |
|
851 | 851 | } else { |
852 | 852 | $removedesc = ''; |
853 | 853 | } |
@@ -863,13 +863,13 @@ discard block |
||
863 | 863 | } |
864 | 864 | sql_free_result($resp); |
865 | 865 | |
866 | - $edit_url = 'editdesc.php?cacheid=' . urlencode($cache_id) . '&desclang=' . urlencode($desclang); |
|
866 | + $edit_url = 'editdesc.php?cacheid='.urlencode($cache_id).'&desclang='.urlencode($desclang); |
|
867 | 867 | |
868 | 868 | $cache_descs .= |
869 | 869 | '<tr><td colspan="2">' |
870 | 870 | . htmlspecialchars(db_LanguageFromShort($desclang), ENT_COMPAT, 'UTF-8') |
871 | - . ' [<a href="' . htmlspecialchars($edit_url, ENT_COMPAT, 'UTF-8') |
|
872 | - . '">' . $edit . '</a>]' . $removedesc . '</td></tr>'; |
|
871 | + . ' [<a href="'.htmlspecialchars($edit_url, ENT_COMPAT, 'UTF-8') |
|
872 | + . '">'.$edit.'</a>]'.$removedesc.'</td></tr>'; |
|
873 | 873 | } |
874 | 874 | tpl_set_var('cache_descs', $cache_descs); |
875 | 875 | |
@@ -889,10 +889,10 @@ discard block |
||
889 | 889 | FROM `cache_status` |
890 | 890 | LEFT JOIN `sys_trans` ON `cache_status`.`trans_id`=`sys_trans`.`id` |
891 | 891 | LEFT JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND |
892 | - `sys_trans_text`.`lang`='" . sql_escape($locale) . "' |
|
892 | + `sys_trans_text`.`lang`='" . sql_escape($locale)."' |
|
893 | 893 | WHERE `cache_status`.`id` NOT IN (4, 5, 7) OR `cache_status`.`id`='" . sql_escape( |
894 | 894 | $status_old + 0 |
895 | - ) . "' |
|
895 | + )."' |
|
896 | 896 | ORDER BY `cache_status`.`id` ASC" |
897 | 897 | ); |
898 | 898 | while ($rStatus = sql_fetch_assoc($rsStatus)) { |
@@ -901,7 +901,7 @@ discard block |
||
901 | 901 | $statusoptions .= |
902 | 902 | '<option value="' |
903 | 903 | . htmlspecialchars($rStatus['id'], ENT_COMPAT, 'UTF-8') |
904 | - . '"' . $sSelected . '>' |
|
904 | + . '"'.$sSelected.'>' |
|
905 | 905 | . htmlspecialchars($rStatus['name'], ENT_COMPAT, 'UTF-8') |
906 | 906 | . '</option>'; |
907 | 907 | } |
@@ -940,11 +940,11 @@ discard block |
||
940 | 940 | $tmp = mb_ereg_replace('{publish_notnow_checked}', ($publish == 'notnow') ? 'checked' : '', $tmp); |
941 | 941 | |
942 | 942 | $activation_hours = ''; |
943 | - for ($i = 0; $i <= 23; $i ++) { |
|
943 | + for ($i = 0; $i <= 23; $i++) { |
|
944 | 944 | if ($cache_activate_hour == $i) { |
945 | - $activation_hours .= '<option value="' . $i . '" selected="selected">' . $i . '</option>'; |
|
945 | + $activation_hours .= '<option value="'.$i.'" selected="selected">'.$i.'</option>'; |
|
946 | 946 | } else { |
947 | - $activation_hours .= '<option value="' . $i . '">' . $i . '</option>'; |
|
947 | + $activation_hours .= '<option value="'.$i.'">'.$i.'</option>'; |
|
948 | 948 | } |
949 | 949 | $activation_hours .= "\n"; |
950 | 950 | } |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | $cache_id |
969 | 969 | ); |
970 | 970 | |
971 | - for ($i = 0; $i < mysql_num_rows($rspictures); $i ++) { |
|
971 | + for ($i = 0; $i < mysql_num_rows($rspictures); $i++) { |
|
972 | 972 | $tmpline = ($i == 0 ? $pictureline0 : $pictureline); |
973 | 973 | $pic_record = sql_fetch_array($rspictures); |
974 | 974 | |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | $st_hours = floor($search_time); |
1044 | 1044 | $st_minutes = sprintf('%02.0F', ($search_time - $st_hours) * 60); |
1045 | 1045 | |
1046 | - tpl_set_var('search_time', $st_hours . ':' . $st_minutes); |
|
1046 | + tpl_set_var('search_time', $st_hours.':'.$st_minutes); |
|
1047 | 1047 | |
1048 | 1048 | tpl_set_var('way_length', $way_length); |
1049 | 1049 | tpl_set_var('log_pw', htmlspecialchars($log_pw, ENT_COMPAT, 'UTF-8')); |
@@ -1051,7 +1051,7 @@ discard block |
||
1051 | 1051 | tpl_set_var('showlists_checked', $showlists ? 'checked="checked"' : ''); |
1052 | 1052 | tpl_set_var('protectcoords_checked', $protect_old_coords ? 'checked="checked"' : ''); |
1053 | 1053 | |
1054 | - tpl_set_var('reset', $reset); // obsolete |
|
1054 | + tpl_set_var('reset', $reset); // obsolete |
|
1055 | 1055 | tpl_set_var('submit', $submit); |
1056 | 1056 | } else { |
1057 | 1057 | //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,7 +228,8 @@ 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 | // only admins can change status of locked caches |
231 | 234 | if (($bAdmin & ADMIN_USER) != ADMIN_USER) { |
232 | 235 | // no status change allowed for normal user |
@@ -434,7 +437,8 @@ discard block |
||
434 | 437 | } |
435 | 438 | |
436 | 439 | //try to save to DB? |
437 | - if (isset($_POST['submit'])) { // Ocprop |
|
440 | + if (isset($_POST['submit'])) { |
|
441 | +// Ocprop |
|
438 | 442 | // all validations ok? |
439 | 443 | if (!( |
440 | 444 | $hidden_date_not_ok || $lat_not_ok || $lon_not_ok || $name_not_ok || |
@@ -917,7 +921,8 @@ discard block |
||
917 | 921 | tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1', $cache_id, $status_change)); |
918 | 922 | |
919 | 923 | // show activation form? |
920 | - if ($status_old == 5) { // status = not yet published |
|
924 | + if ($status_old == 5) { |
|
925 | +// status = not yet published |
|
921 | 926 | $tmp = $activation_form; |
922 | 927 | |
923 | 928 | $tmp = mb_ereg_replace( |
@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | * bin/dbsv-update.php will then migrate the tables' charset. |
16 | 16 | */ |
17 | 17 | $opt['charset']['iconv'] = 'UTF-8'; // 'ISO-8859-1'; // use iconv compatible charset-name |
18 | -$opt['charset']['mysql'] = 'utf8'; // use mysql compatible charset-name |
|
18 | +$opt['charset']['mysql'] = 'utf8'; // use mysql compatible charset-name |
|
19 | 19 | |
20 | 20 | // handling of SQL and PHP errors |
21 | 21 | $opt['db']['error']['display'] = false; |
22 | -$opt['db']['error']['mail'] = 'root'; // set '' to disable |
|
22 | +$opt['db']['error']['mail'] = 'root'; // set '' to disable |
|
23 | 23 | |
24 | 24 | // page title |
25 | 25 | $opt['page']['title'] = 'OPENCACHING'; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * Additionally, the cookie domain (different vor lib1 and lib2) can be overwritten. |
58 | 58 | * See examples for overriding in settings-sample.inc.php. |
59 | 59 | */ |
60 | -$opt['page']['meta']['keywords'] = 'Geocaching, Geocache, Cache, Schatzsuche, GPS, kostenlos, GPX, Koordinaten, Hobby, Natur'; // 5-10 keywords are recommended |
|
60 | +$opt['page']['meta']['keywords'] = 'Geocaching, Geocache, Cache, Schatzsuche, GPS, kostenlos, GPX, Koordinaten, Hobby, Natur'; // 5-10 keywords are recommended |
|
61 | 61 | // see http://forum.opencaching.de/index.php?topic=3065.0 |
62 | 62 | // and http://forum.opencaching.de/index.php?topic=3065.0 regarding description |
63 | 63 | $opt['page']['meta']['description'] = 'Opencaching.de ist das freie Portal für Geocaching, ein Schatzsuche-Spiel. Mittels GPS-Koordinaten sind Behälter oder Objekte zu finden.'; |
@@ -98,12 +98,12 @@ discard block |
||
98 | 98 | // see also setting in lib/settings.inc.php! |
99 | 99 | $opt['logic']['admin']['team_comments_only_for_reports'] = true; |
100 | 100 | $opt['logic']['admin']['enable_listing_admins'] = false; |
101 | -$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
101 | +$opt['logic']['admin']['listingadmin_notification'] = ''; // Email address(es), comma separated |
|
102 | 102 | |
103 | 103 | /* |
104 | 104 | * html purifier |
105 | 105 | */ |
106 | -$opt['html_purifier']['cache_path'] = dirname(__FILE__) . '/../cache2/html_purifier/'; |
|
106 | +$opt['html_purifier']['cache_path'] = dirname(__FILE__).'/../cache2/html_purifier/'; |
|
107 | 107 | |
108 | 108 | /* |
109 | 109 | * CMS links for external pages |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | $primary_httpsdefault = $opt['page']['https']['is_default']; |
179 | 179 | } |
180 | 180 | if ($primary_httpsdefault) { |
181 | - $opt['page']['default_primary_url'] = 'https' . strstr($primary_site_url, '://'); |
|
181 | + $opt['page']['default_primary_url'] = 'https'.strstr($primary_site_url, '://'); |
|
182 | 182 | } else { |
183 | - $opt['page']['default_primary_url'] = 'http' . strstr($primary_site_url, '://'); |
|
183 | + $opt['page']['default_primary_url'] = 'http'.strstr($primary_site_url, '://'); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | // 2. create settings for the current domain |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if (isset($opt['domain'][$current_domain]['url'])) { |
192 | 192 | $current_site_url = $opt['domain'][$current_domain]['url']; |
193 | 193 | } else { |
194 | - $current_site_url = 'x://' . $current_domain . parse_url($primary_site_url, PHP_URL_PATH); |
|
194 | + $current_site_url = 'x://'.$current_domain.parse_url($primary_site_url, PHP_URL_PATH); |
|
195 | 195 | } |
196 | 196 | if (substr($current_site_url, - 1, 1) != '/') { |
197 | 197 | $current_site_url .= '/'; |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | $adr = strstr($current_site_url, '://'); |
206 | - $opt['page']['absolute_http_url'] = 'http' . $adr; |
|
207 | - $opt['page']['absolute_https_url'] = 'https' . $adr; |
|
206 | + $opt['page']['absolute_http_url'] = 'http'.$adr; |
|
207 | + $opt['page']['absolute_https_url'] = 'https'.$adr; |
|
208 | 208 | $opt['page']['https']['active'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'); |
209 | 209 | |
210 | 210 | if ($opt['page']['https']['active']) { |
@@ -235,19 +235,19 @@ discard block |
||
235 | 235 | $opt['page']['default_primary_shortlink_url'] = false; |
236 | 236 | } else { |
237 | 237 | if ($primary_httpsdefault) { |
238 | - $opt['page']['default_primary_shortlink_url'] = 'https://' . $primary_shortlink_domain . '/'; |
|
238 | + $opt['page']['default_primary_shortlink_url'] = 'https://'.$primary_shortlink_domain.'/'; |
|
239 | 239 | } else { |
240 | - $opt['page']['default_primary_shortlink_url'] = 'http://' . $primary_shortlink_domain . '/'; |
|
240 | + $opt['page']['default_primary_shortlink_url'] = 'http://'.$primary_shortlink_domain.'/'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | if (isset($opt['domain'][$current_domain]['shortlink_domain']) && $opt['domain'][$current_domain]['shortlink_domain']) { |
244 | - $opt['page']['shortlink_url'] = $opt['page']['protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
245 | - $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'] . '://' . $opt['domain'][$current_domain]['shortlink_domain'] . '/'; |
|
244 | + $opt['page']['shortlink_url'] = $opt['page']['protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
245 | + $opt['page']['default_shortlink_url'] = $opt['page']['default_protocol'].'://'.$opt['domain'][$current_domain]['shortlink_domain'].'/'; |
|
246 | 246 | } else { |
247 | 247 | if ($current_domain == $primary_domain) { |
248 | 248 | $opt['page']['default_shortlink_url'] = $opt['page']['default_primary_shortlink_url']; |
249 | 249 | $opt['page']['shortlink_url'] = |
250 | - $opt['page']['protocol'] . strstr($opt['page']['default_shortlink_url'], '://'); |
|
250 | + $opt['page']['protocol'].strstr($opt['page']['default_shortlink_url'], '://'); |
|
251 | 251 | } else { |
252 | 252 | $opt['page']['shortlink_url'] = false; |
253 | 253 | $opt['page']['default_shortlink_url'] = false; |
@@ -258,16 +258,16 @@ discard block |
||
258 | 258 | // 4. set location of uploaded images |
259 | 259 | |
260 | 260 | if (!isset($opt['logic']['pictures']['dir'])) { |
261 | - $opt['logic']['pictures']['dir'] = dirname(__FILE__) . '/../images/uploads'; |
|
261 | + $opt['logic']['pictures']['dir'] = dirname(__FILE__).'/../images/uploads'; |
|
262 | 262 | } // Ocprop, OKAPI ! |
263 | 263 | if (!isset($opt['logic']['pictures']['url'])) { |
264 | - $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'] . 'images/uploads'; |
|
264 | + $opt['logic']['pictures']['url'] = $opt['page']['default_primary_url'].'images/uploads'; |
|
265 | 265 | } |
266 | 266 | if (!isset($opt['logic']['pictures']['thumb_dir'])) { |
267 | - $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'] . '/thumbs'; |
|
267 | + $opt['logic']['pictures']['thumb_dir'] = $opt['logic']['pictures']['dir'].'/thumbs'; |
|
268 | 268 | } |
269 | 269 | if (!isset($opt['logic']['pictures']['thumb_url'])) { |
270 | - $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs'; |
|
270 | + $opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'].'/thumbs'; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | $build_map_towns_menu = true; |
11 | 11 | |
12 | -require __DIR__ . '/lib2/web.inc.php'; |
|
12 | +require __DIR__.'/lib2/web.inc.php'; |
|
13 | 13 | |
14 | 14 | /* because the map does access some private info like |
15 | 15 | * ignored caches, we need to verify the login data |
@@ -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; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $tpl->error($translate->t('There is no google maps key registered for this domain.', '', '', 0)); |
134 | 134 | } |
135 | 135 | |
136 | -$tpl->add_header_javascript($opt['page']['protocol'] . '://maps.googleapis.com/maps/api/js?sensor=false&key=' . urlencode($sGMKey) . '&language=' . strtolower($opt['template']['locale'])); |
|
136 | +$tpl->add_header_javascript($opt['page']['protocol'].'://maps.googleapis.com/maps/api/js?sensor=false&key='.urlencode($sGMKey).'&language='.strtolower($opt['template']['locale'])); |
|
137 | 137 | // https is supported by google, but may make problems in some environments, |
138 | 138 | // e.g. does not work with MSIE 7 on WinXP |
139 | 139 | $tpl->add_header_javascript('resource2/misc/map/dragzoom_packed.js'); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | global $login; |
280 | 280 | |
281 | 281 | $rsCache = sql_slave( |
282 | - "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance) . " AS `distance`, |
|
282 | + "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, $nDistance)." AS `distance`, |
|
283 | 283 | `caches`.`wp_oc` |
284 | 284 | FROM `caches` |
285 | 285 | INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` |
@@ -389,42 +389,42 @@ discard block |
||
389 | 389 | $wphandler = new HandlerChildWp(); |
390 | 390 | $waypoints = $wphandler->getChildWps($rCache['cache_id'], true); |
391 | 391 | |
392 | - echo '<caches>' . "\n"; |
|
392 | + echo '<caches>'."\n"; |
|
393 | 393 | echo ' <cache '; |
394 | - echo 'name="' . xmlentities($rCache['name']) . '" '; |
|
395 | - echo 'wpoc="' . xmlentities($rCache['wp_oc']) . '" '; |
|
396 | - echo 'coords="' . $rCache['longitude'] . ',' . $rCache['latitude'] . '" '; |
|
397 | - echo 'inactive="' . xmlentities($rCache['inactive']) . '" '; |
|
398 | - echo 'status_text="' . xmlentities($rCache['statustext']) . '" '; |
|
399 | - echo 'type_id="' . xmlentities($rCache['type_id']) . '" '; |
|
400 | - echo 'type_text="' . xmlentities($rCache['type_text']) . '" '; |
|
401 | - echo 'size="' . xmlentities($rCache['size']) . '" '; |
|
402 | - echo 'difficulty="' . xmlentities($rCache['difficulty'] / 2) . '" '; |
|
403 | - echo 'terrain="' . xmlentities($rCache['terrain'] / 2) . '" '; |
|
404 | - echo 'listed_since="' . xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))) . '" '; |
|
405 | - echo 'is_publishdate="' . xmlentities($rCache['is_publishdate']) . '" '; |
|
406 | - echo 'toprating="' . xmlentities($rCache['toprating']) . '" '; |
|
407 | - echo 'geokreties="' . xmlentities($nGeokretyCount) . '" '; |
|
408 | - echo 'found="' . xmlentities(($nFoundCount > 0) ? 1 : 0) . '" '; |
|
409 | - echo 'notfound="' . xmlentities(($nNotFoundCount > 0) ? 1 : 0) . '" '; |
|
410 | - echo 'attended="' . xmlentities(($nAttendedCount > 0) ? 1 : 0) . '" '; |
|
411 | - echo 'oconly="' . xmlentities($rCache['oconly']) . '" '; |
|
412 | - echo 'owner="' . xmlentities($rCache['owner']) . '" '; |
|
413 | - echo 'username="' . xmlentities($rCache['username']) . '" '; |
|
414 | - echo 'userid="' . xmlentities($rCache['user_id']) . '" '; |
|
415 | - echo 'picurl="' . xmlentities($rCache['picurl']) . '" '; |
|
416 | - echo 'pictitle="' . xmlentities(trim($rCache['pictitle'])) . '" >\n'; |
|
394 | + echo 'name="'.xmlentities($rCache['name']).'" '; |
|
395 | + echo 'wpoc="'.xmlentities($rCache['wp_oc']).'" '; |
|
396 | + echo 'coords="'.$rCache['longitude'].','.$rCache['latitude'].'" '; |
|
397 | + echo 'inactive="'.xmlentities($rCache['inactive']).'" '; |
|
398 | + echo 'status_text="'.xmlentities($rCache['statustext']).'" '; |
|
399 | + echo 'type_id="'.xmlentities($rCache['type_id']).'" '; |
|
400 | + echo 'type_text="'.xmlentities($rCache['type_text']).'" '; |
|
401 | + echo 'size="'.xmlentities($rCache['size']).'" '; |
|
402 | + echo 'difficulty="'.xmlentities($rCache['difficulty'] / 2).'" '; |
|
403 | + echo 'terrain="'.xmlentities($rCache['terrain'] / 2).'" '; |
|
404 | + echo 'listed_since="'.xmlentities(strftime($opt['locale'][$opt['template']['locale']]['format']['date'], strtotime($rCache['date_created']))).'" '; |
|
405 | + echo 'is_publishdate="'.xmlentities($rCache['is_publishdate']).'" '; |
|
406 | + echo 'toprating="'.xmlentities($rCache['toprating']).'" '; |
|
407 | + echo 'geokreties="'.xmlentities($nGeokretyCount).'" '; |
|
408 | + echo 'found="'.xmlentities(($nFoundCount > 0) ? 1 : 0).'" '; |
|
409 | + echo 'notfound="'.xmlentities(($nNotFoundCount > 0) ? 1 : 0).'" '; |
|
410 | + echo 'attended="'.xmlentities(($nAttendedCount > 0) ? 1 : 0).'" '; |
|
411 | + echo 'oconly="'.xmlentities($rCache['oconly']).'" '; |
|
412 | + echo 'owner="'.xmlentities($rCache['owner']).'" '; |
|
413 | + echo 'username="'.xmlentities($rCache['username']).'" '; |
|
414 | + echo 'userid="'.xmlentities($rCache['user_id']).'" '; |
|
415 | + echo 'picurl="'.xmlentities($rCache['picurl']).'" '; |
|
416 | + echo 'pictitle="'.xmlentities(trim($rCache['pictitle'])).'" >\n'; |
|
417 | 417 | |
418 | 418 | foreach ($waypoints as $waypoint) { |
419 | 419 | echo ' <wpt '; |
420 | - echo 'typeid="' . xmlentities($waypoint['type']) . '" '; |
|
421 | - echo 'typename="' . xmlentities($waypoint['name']) . '" '; |
|
422 | - echo 'typepreposition="' . xmlentities($waypoint['preposition']) . '" '; |
|
423 | - echo 'image="' . xmlentities($waypoint['image']) . '" '; |
|
420 | + echo 'typeid="'.xmlentities($waypoint['type']).'" '; |
|
421 | + echo 'typename="'.xmlentities($waypoint['name']).'" '; |
|
422 | + echo 'typepreposition="'.xmlentities($waypoint['preposition']).'" '; |
|
423 | + echo 'image="'.xmlentities($waypoint['image']).'" '; |
|
424 | 424 | echo 'imagewidth="38" imageheight="38" '; |
425 | - echo 'latitude="' . xmlentities($waypoint['latitude']) . '" '; |
|
426 | - echo 'longitude="' . xmlentities($waypoint['longitude']) . '" '; |
|
427 | - echo 'description="' . xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))) . '" />\n'; |
|
425 | + echo 'latitude="'.xmlentities($waypoint['latitude']).'" '; |
|
426 | + echo 'longitude="'.xmlentities($waypoint['longitude']).'" '; |
|
427 | + echo 'description="'.xmlentities(mb_ereg_replace('\r\n', '<br />', htmlentities(trim($waypoint['description']), ENT_NOQUOTES, 'UTF-8'))).'" />\n'; |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | echo ' </cache>\n'; |
@@ -438,9 +438,9 @@ discard block |
||
438 | 438 | { |
439 | 439 | global $login, $opt; |
440 | 440 | |
441 | - echo '<caches>' . "\n"; |
|
441 | + echo '<caches>'."\n"; |
|
442 | 442 | $rs = sql_slave( |
443 | - "SELECT " . geomath::getSqlDistanceFormula($nLon, $nLat, 0) . " AS `distance`, |
|
443 | + "SELECT ".geomath::getSqlDistanceFormula($nLon, $nLat, 0)." AS `distance`, |
|
444 | 444 | `caches`.`name`, `caches`.`wp_oc` |
445 | 445 | FROM `map2_data` |
446 | 446 | INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id` |
@@ -449,30 +449,30 @@ discard block |
||
449 | 449 | AND (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&3') |
450 | 450 | AND `map2_data`.`result_id`='&2' |
451 | 451 | ORDER BY `distance` ASC LIMIT 30", |
452 | - '%' . $sName . '%', |
|
452 | + '%'.$sName.'%', |
|
453 | 453 | $nResultId, |
454 | 454 | $login->userid |
455 | 455 | ); |
456 | 456 | $caches_found = 0; |
457 | 457 | while ($r = sql_fetch_assoc($rs)) { |
458 | - echo '<cache name="' . xmlentities($r['name']) . '" wpoc="' . xmlentities($r['wp_oc']) . '" />' . "\n"; |
|
459 | - ++ $caches_found; |
|
458 | + echo '<cache name="'.xmlentities($r['name']).'" wpoc="'.xmlentities($r['wp_oc']).'" />'."\n"; |
|
459 | + ++$caches_found; |
|
460 | 460 | } |
461 | 461 | sql_free_result($rs); |
462 | 462 | |
463 | 463 | if (!$caches_found && preg_match('/^[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}\.[^\s[:punct:]]{2,}$/', $sName)) { |
464 | - $result = @file_get_contents('http://api.what3words.com/w3w?key=' . $opt['lib']['w3w']['apikey'] |
|
465 | - . '&string=' . urlencode($sName)); |
|
464 | + $result = @file_get_contents('http://api.what3words.com/w3w?key='.$opt['lib']['w3w']['apikey'] |
|
465 | + . '&string='.urlencode($sName)); |
|
466 | 466 | if ($result) { |
467 | 467 | $json = json_decode($result, true); |
468 | 468 | if (!is_null($json['words']) && !is_null($json['position']) && count($json['position']) == 2) { |
469 | - echo '<coord name="' . xmlentities(implode('.', $json['words'])) . |
|
470 | - '" latitude="' . xmlentities($json["position"][0]) . |
|
471 | - '" longitude="' . xmlentities($json["position"][1]) . '" />' . "\n"; |
|
469 | + echo '<coord name="'.xmlentities(implode('.', $json['words'])). |
|
470 | + '" latitude="'.xmlentities($json["position"][0]). |
|
471 | + '" longitude="'.xmlentities($json["position"][1]).'" />'."\n"; |
|
472 | 472 | } |
473 | 473 | } |
474 | 474 | } |
475 | - echo '</caches>' . "\n"; |
|
475 | + echo '</caches>'."\n"; |
|
476 | 476 | |
477 | 477 | exit; |
478 | 478 | } |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | "SELECT `slave_id` |
496 | 496 | FROM `map2_result` |
497 | 497 | WHERE `result_id`='&1' AND DATE_ADD(`date_created`, INTERVAL '&2' SECOND)>NOW()", |
498 | - - 2, |
|
498 | + -2, |
|
499 | 499 | $nResultId, |
500 | 500 | $opt['map']['maxcacheage'] |
501 | 501 | ); |
@@ -561,8 +561,8 @@ discard block |
||
561 | 561 | $bMaxRecordReached = ($nRecordCount > $maxrecords); |
562 | 562 | |
563 | 563 | // output data |
564 | - echo '<searchresult count="' . xmlentities($nRecordCount) . '" available="1"' . |
|
565 | - ' maxrecordreached="' . ($bMaxRecordReached ? '1' : '0') . '">' . "\n"; |
|
564 | + echo '<searchresult count="'.xmlentities($nRecordCount).'" available="1"'. |
|
565 | + ' maxrecordreached="'.($bMaxRecordReached ? '1' : '0').'">'."\n"; |
|
566 | 566 | |
567 | 567 | if (!$bMaxRecordReached) { |
568 | 568 | $namequery = ($cachenames ? ", `caches`.`name` AS `cachename`" : ""); |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | IF(`found_logs`.`id` IS NULL, 0, 1) AS `found`, |
578 | 578 | IF(`found_logs`.`id` IS NULL AND `notfound_logs`.`id` IS NOT NULL, 1, 0) AS `notfound`, |
579 | 579 | IF(`caches_attributes`.`attrib_id` IS NULL, 0, 1) AS `oconly`" . |
580 | - $namequery . " |
|
580 | + $namequery." |
|
581 | 581 | FROM `map2_data` |
582 | 582 | INNER JOIN `caches` ON `map2_data`.`cache_id`=`caches`.`cache_id` |
583 | 583 | INNER JOIN `user` ON `user`.`user_id`=`caches`.`user_id` |
@@ -624,19 +624,19 @@ discard block |
||
624 | 624 | echo |
625 | 625 | '<c d="' |
626 | 626 | . xmlentities( |
627 | - $r['wp_oc'] . '/' . round($r['longitude'], 5) . '/' . |
|
628 | - round($r['latitude'], 5) . '/' . $r['type'] . '/' . $flags |
|
629 | - ) . '"' |
|
630 | - . (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') |
|
627 | + $r['wp_oc'].'/'.round($r['longitude'], 5).'/'. |
|
628 | + round($r['latitude'], 5).'/'.$r['type'].'/'.$flags |
|
629 | + ).'"' |
|
630 | + . (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : '') |
|
631 | 631 | . ' />'; |
632 | 632 | } else { |
633 | 633 | echo |
634 | - '<cache wp="' . xmlentities($r['wp_oc']) . '"' . |
|
635 | - ' lon="' . xmlentities(round($r['longitude'], 5)) . '"' . |
|
636 | - ' lat="' . xmlentities(round($r['latitude'], 5)) . '"' . |
|
637 | - ' type="' . xmlentities($r['type']) . '"' . |
|
638 | - (isset($r['cachename']) ? ' n="' . xmlentities($r['cachename']) . '"' : '') . |
|
639 | - ' f="' . xmlentities($flags) . '" />' . "\n"; |
|
634 | + '<cache wp="'.xmlentities($r['wp_oc']).'"'. |
|
635 | + ' lon="'.xmlentities(round($r['longitude'], 5)).'"'. |
|
636 | + ' lat="'.xmlentities(round($r['latitude'], 5)).'"'. |
|
637 | + ' type="'.xmlentities($r['type']).'"'. |
|
638 | + (isset($r['cachename']) ? ' n="'.xmlentities($r['cachename']).'"' : ''). |
|
639 | + ' f="'.xmlentities($flags).'" />'."\n"; |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | sql_free_result($rs); |
@@ -27,7 +27,8 @@ |
||
27 | 27 | $for_cachedesc, |
28 | 28 | $html, |
29 | 29 | $twolines = false |
30 | -) { |
|
30 | +) |
|
31 | +{ |
|
31 | 32 | global $opt, $translate; |
32 | 33 | |
33 | 34 | $ltext = ""; |
@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | * Unicode Reminder メモ |
10 | 10 | ***************************************************************************/ |
11 | 11 | |
12 | -$opt['rootpath'] = __DIR__ . '/../../htdocs/'; |
|
13 | -require $opt['rootpath'] . 'lib2/cli.inc.php'; |
|
12 | +$opt['rootpath'] = __DIR__.'/../../htdocs/'; |
|
13 | +require $opt['rootpath'].'lib2/cli.inc.php'; |
|
14 | 14 | |
15 | 15 | if (!($opt['debug'] & DEBUG_DEVELOPER)) { |
16 | 16 | die("This script deletes lot of data and must be run only on development systems.\n"); |
17 | 17 | } |
18 | 18 | if ($argc != 2 || $argv[1] != 'go') { |
19 | 19 | die( |
20 | - "This script deletes lot of data. Make sure that you really want to dos this,\n" . |
|
20 | + "This script deletes lot of data. Make sure that you really want to dos this,\n". |
|
21 | 21 | "and confirm it by adding the parameter 'go'.\n" |
22 | 22 | ); |
23 | 23 | } |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | echo "clearing user data\n"; |
64 | 64 | sql('TRUNCATE `cache_adoption`'); |
65 | 65 | sql('TRUNCATE `cache_ignore`'); |
66 | -sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data |
|
66 | +sql('DELETE FROM `cache_lists` WHERE `is_public`<2'); // trigger deletes dependent data |
|
67 | 67 | sql('TRUNCATE `cache_list_bookmarks`'); |
68 | 68 | sql('TRUNCATE `cache_list_watches`'); |
69 | 69 | sql('TRUNCATE `cache_watches`'); |
70 | -sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords |
|
70 | +sql('DELETE FROM `coordinates` WHERE `type`=2'); // personal cache notes and coords |
|
71 | 71 | sql('TRUNCATE `queries`'); |
72 | 72 | sql('TRUNCATE `user_options`'); |
73 | 73 | sql( |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | |
133 | 133 | echo "clearing other nonpublic data\n"; |
134 | 134 | sql('TRUNCATE `news`'); |
135 | -$rs = sql("SHOW TABLES WHERE `Tables_in_" . $opt['db']['placeholder']['db'] . "` LIKE '\_%'"); |
|
135 | +$rs = sql("SHOW TABLES WHERE `Tables_in_".$opt['db']['placeholder']['db']."` LIKE '\_%'"); |
|
136 | 136 | $tables = sql_fetch_column($rs); |
137 | 137 | foreach ($tables as $table) { |
138 | - sql('DROP TABLE ' . $table); |
|
138 | + sql('DROP TABLE '.$table); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | echo "done.\n"; |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | * $opt['locale'] |
18 | 18 | ***************************************************************************/ |
19 | 19 | |
20 | -define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | -define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | -define('OC_LOCALE_DISABLED', 0); // disable language |
|
20 | +define('OC_LOCALE_ACTIVE', 2); // enable language and show language button in header line |
|
21 | +define('OC_LOCALE_HIDDEN', 1); // enable language but hide language button in header line |
|
22 | +define('OC_LOCALE_DISABLED', 0); // disable language |
|
23 | 23 | |
24 | 24 | $opt['template']['locales']['DE']['status'] = OC_LOCALE_ACTIVE; |
25 | 25 | $opt['template']['locales']['DE']['flag'] = 'images/flag/DE.png'; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="resource2/ocstyle/images/media/cc-by-nc-nd-small.png" /></a><div style="text-align:center; margin:8px 0 0 6px;">Die <a href="articles.php?page=impressum#datalicense">Inhalte</a> von {site} stehen unter der Creative-Commons-Lizenz <a rel="license" href="%1">BY-NC-ND 3.0 DE</a>.</div>'; |
132 | 132 | $opt['locale']['DE']['helpwiki'] = 'http://wiki.opencaching.de/index.php/'; |
133 | 133 | $opt['locale']['DE']['mostly_translated'] = true; |
134 | -$opt['locale']['DE']['what3words'] = true; // "beta" |
|
134 | +$opt['locale']['DE']['what3words'] = true; // "beta" |
|
135 | 135 | |
136 | 136 | $opt['locale']['IT']['format']['dateshort'] = '%d/%m/%y'; |
137 | 137 | $opt['locale']['IT']['format']['dm'] = '%d/%m'; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching'; |
233 | 233 | $opt['locale']['SV']['page']['subtitle2'] = ''; |
234 | 234 | $opt['locale']['SV']['mostly_translated'] = false; |
235 | -$opt['locale']['SV']['what3words'] = true; // "beta" |
|
235 | +$opt['locale']['SV']['what3words'] = true; // "beta" |
|
236 | 236 | |
237 | 237 | $opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y'; |
238 | 238 | $opt['locale']['NO']['format']['dm'] = '%d.%m.'; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $opt['locale']['RU']['format']['colonspace'] = ''; |
280 | 280 | $opt['locale']['RU']['country'] = 'RU'; |
281 | 281 | $opt['locale']['RU']['mostly_translated'] = false; |
282 | -$opt['locale']['RU']['what3words'] = true; // "beta" |
|
282 | +$opt['locale']['RU']['what3words'] = true; // "beta" |
|
283 | 283 | |
284 | 284 | $opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y'; |
285 | 285 | $opt['locale']['DA']['format']['dm'] = '%d.%m.'; |