@@ -14,40 +14,40 @@ |
||
14 | 14 | * set template specific language variables |
15 | 15 | ****************************************************************************/ |
16 | 16 | |
17 | - $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
18 | - |
|
19 | - $submit = t('Submit cache'); |
|
20 | - $default_country = t('EN'); |
|
21 | - $default_lang = t('EN'); |
|
22 | - $show_all = t('Show all'); |
|
23 | - $default_NS = 'N'; |
|
24 | - $default_EW = 'E'; |
|
25 | - $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
26 | - |
|
27 | - $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . '</b></td></tr>'; |
|
28 | - $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
29 | - $error_lat_not_ok = $error_long_not_ok . '<br />'; |
|
30 | - $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
31 | - $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
32 | - $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
33 | - $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
34 | - $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
35 | - $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
36 | - $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
37 | - $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
38 | - $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
39 | - $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
40 | - $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
41 | - $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
42 | - |
|
43 | - $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
44 | - |
|
45 | - $sel_message = t('Select'); |
|
46 | - |
|
47 | - $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
48 | - $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
49 | - |
|
50 | - $cache_attrib_group = |
|
17 | + $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
18 | + |
|
19 | + $submit = t('Submit cache'); |
|
20 | + $default_country = t('EN'); |
|
21 | + $default_lang = t('EN'); |
|
22 | + $show_all = t('Show all'); |
|
23 | + $default_NS = 'N'; |
|
24 | + $default_EW = 'E'; |
|
25 | + $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
26 | + |
|
27 | + $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . '</b></td></tr>'; |
|
28 | + $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
29 | + $error_lat_not_ok = $error_long_not_ok . '<br />'; |
|
30 | + $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
31 | + $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
32 | + $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
33 | + $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
34 | + $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
35 | + $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
36 | + $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
37 | + $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
38 | + $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
39 | + $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
40 | + $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
41 | + $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
42 | + |
|
43 | + $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
44 | + |
|
45 | + $sel_message = t('Select'); |
|
46 | + |
|
47 | + $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
48 | + $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
49 | + |
|
50 | + $cache_attrib_group = |
|
51 | 51 | '<div class="attribgroup"><table cellspacing="0" style="display:inline;border-spacing:0px;"> |
52 | 52 | <tr><td bgcolor="{color}" style="line-height:9px;padding-top:2px;margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;"><font size="1">{name}</font></td></tr> |
53 | 53 | <tr><td bgcolor="#F8F8F8" style="margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-bottom:1px solid gray;">{attribs}</td></tr> |
@@ -313,25 +313,25 @@ |
||
313 | 313 | return null; |
314 | 314 | } |
315 | 315 | |
316 | - $rs = sql( |
|
317 | - "SELECT `id` |
|
316 | + $rs = sql( |
|
317 | + "SELECT `id` |
|
318 | 318 | FROM `cache_logs` |
319 | 319 | WHERE `cache_id`='&1' |
320 | 320 | ORDER BY `date`, `id` DESC |
321 | 321 | LIMIT &2", |
322 | - $this->getCacheId(), |
|
323 | - MAX_LOGENTRIES_ON_CACHEPAGE |
|
324 | - ); |
|
325 | - $firstlogs = false; |
|
326 | - while ($r = sql_fetch_assoc($rs)) { |
|
327 | - if ($r['id'] == $this->getLogId()) { |
|
328 | - $firstlogs = true; |
|
329 | - } |
|
330 | - } |
|
331 | - |
|
332 | - sql_free_result($rs); |
|
333 | - |
|
334 | - return $firstlogs; |
|
322 | + $this->getCacheId(), |
|
323 | + MAX_LOGENTRIES_ON_CACHEPAGE |
|
324 | + ); |
|
325 | + $firstlogs = false; |
|
326 | + while ($r = sql_fetch_assoc($rs)) { |
|
327 | + if ($r['id'] == $this->getLogId()) { |
|
328 | + $firstlogs = true; |
|
329 | + } |
|
330 | + } |
|
331 | + |
|
332 | + sql_free_result($rs); |
|
333 | + |
|
334 | + return $firstlogs; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | public function getCacheId() |