marked ocprop triggers

This commit is contained in:
following
2013-03-27 22:17:37 +01:00
parent 92cee91169
commit b5d24350dc
23 changed files with 134 additions and 98 deletions

View File

@ -251,7 +251,7 @@
/* location of uploaded images
*/
$opt['logic']['pictures']['dir'] = $opt['rootpath'] . 'images/uploads';
$opt['logic']['pictures']['dir'] = $opt['rootpath'] . 'images/uploads'; // Ocprop
$opt['logic']['pictures']['url'] = 'http://devel.opencaching.de/images/uploads';
$opt['logic']['pictures']['maxsize'] = 153600;
$opt['logic']['pictures']['extensions'] = 'jpg;jpeg;gif;png;bmp';

View File

@ -65,7 +65,7 @@ function getWaypoints($cacheid)
{
//cacheid
$cache_id = 0;
if (isset($_REQUEST['cacheid']))
if (isset($_REQUEST['cacheid'])) // Ocprop
{
$cache_id = $_REQUEST['cacheid'];
}
@ -101,7 +101,7 @@ function getWaypoints($cacheid)
}
//here we read all used information from the form if submitted, otherwise from DB
$cache_name = isset($_POST['name']) ? $_POST['name'] : $cache_record['name'];
$cache_name = isset($_POST['name']) ? $_POST['name'] : $cache_record['name']; // Ocprop
$cache_type = isset($_POST['type']) ? $_POST['type'] : $cache_record['type'];
if (!isset($_POST['size']))
{
@ -118,9 +118,9 @@ function getWaypoints($cacheid)
{
$sel_size = isset($_POST['size']) ? $_POST['size'] : $cache_record['size'];
}
$cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d', strtotime($cache_record['date_hidden']));
$cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m', strtotime($cache_record['date_hidden']));
$cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y', strtotime($cache_record['date_hidden']));
$cache_hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d', strtotime($cache_record['date_hidden'])); // Ocprop
$cache_hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m', strtotime($cache_record['date_hidden'])); // Ocprop
$cache_hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y', strtotime($cache_record['date_hidden'])); // Ocprop
if(is_null($cache_record['date_activate']))
{
@ -137,18 +137,18 @@ function getWaypoints($cacheid)
$cache_activate_hour = isset($_POST['activate_hour']) ? $_POST['activate_hour'] : date('H', strtotime($cache_record['date_activate']));
}
$cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty'];
$cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain'];
$cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country'];
$cache_difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : $cache_record['difficulty']; // Ocprop
$cache_terrain = isset($_POST['terrain']) ? $_POST['terrain'] : $cache_record['terrain']; // Ocprop
$cache_country = isset($_POST['country']) ? $_POST['country'] : $cache_record['country']; // Ocprop
$show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
$status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status'];
$status = isset($_POST['status']) ? $_POST['status'] : $cache_record['status']; // Ocprop
$status_old = $cache_record['status'];
$search_time = isset($_POST['search_time']) ? $_POST['search_time'] : $cache_record['search_time'];
$way_length = isset($_POST['way_length']) ? $_POST['way_length'] : $cache_record['way_length'];
if($status_old == 5 && $status == 5)
{
if(isset($_POST['publish']))
if(isset($_POST['publish'])) // Ocprop
{
$publish = $_POST['publish'];
if(!($publish == 'now' || $publish == 'later' || $publish == 'notnow'))
@ -215,7 +215,7 @@ function getWaypoints($cacheid)
$log_pw = isset($_POST['log_pw']) ? mb_substr($_POST['log_pw'], 0, 20) : $cache_record['logpw'];
// fix #4356: gc waypoints are frequently copy&pasted with leading spaces
$wp_gc = isset($_POST['wp_gc']) ? trim($_POST['wp_gc']) : $cache_record['wp_gc'];
$wp_gc = isset($_POST['wp_gc']) ? trim($_POST['wp_gc']) : $cache_record['wp_gc']; // Ocprop
$wp_nc = isset($_POST['wp_nc']) ? trim($_POST['wp_nc']) : $cache_record['wp_nc'];
// name
@ -229,12 +229,12 @@ function getWaypoints($cacheid)
if (isset($_POST['latNS']))
{
//get coords from post-form
$coords_latNS = $_POST['latNS'];
$coords_lonEW = $_POST['lonEW'];
$coords_lat_h = $_POST['lat_h'];
$coords_lon_h = $_POST['lon_h'];
$coords_lat_min = $_POST['lat_min'];
$coords_lon_min = $_POST['lon_min'];
$coords_latNS = $_POST['latNS']; // Ocprop
$coords_lonEW = $_POST['lonEW']; // Ocprop
$coords_lat_h = $_POST['lat_h']; // Ocprop
$coords_lon_h = $_POST['lon_h']; // Ocprop
$coords_lat_min = $_POST['lat_min']; // Ocprop
$coords_lon_min = $_POST['lon_min']; // Ocprop
}
else
{
@ -416,7 +416,7 @@ function getWaypoints($cacheid)
}
//try to save to DB?
if (isset($_POST['submit']))
if (isset($_POST['submit'])) // Ocprop
{
//all validations ok?
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))
@ -497,6 +497,8 @@ function getWaypoints($cacheid)
//display cache-page
tpl_redirect('viewcache.php?cacheid=' . urlencode($cache_id));
// Ocprop: Location:\s*$viewcacheUrl\?cacheid=([0-9]+)
// (s.a. tpl_redirect() in common.inc.php
exit;
}
}

View File

@ -29,10 +29,10 @@
require($stylepath . '/editdesc.inc.php');
// check for old-style parameters
if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid']))
if (isset($_REQUEST['cacheid']) && isset($_REQUEST['desclang']) && !isset($_REQUEST['descid'])) // Ocprop
{
$cache_id = $_REQUEST['cacheid'];
$desc_lang = $_REQUEST['desclang'];
$cache_id = $_REQUEST['cacheid']; // Ocprop
$desc_lang = $_REQUEST['desclang']; // Ocprop
$rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $desc_lang);
if (mysql_num_rows($rs) == 1)
@ -89,10 +89,10 @@
$show_all_langs = false;
//save to DB?
if (isset($_POST['post']))
if (isset($_POST['post'])) // Ocprop
{
//here we read all used information from the form if submitted
$descMode = isset($_POST['descMode']) ? $_POST['descMode'] : 1;
$descMode = isset($_POST['descMode']) ? $_POST['descMode'] : 1; // Ocprop
// fuer alte Versionen von OCProp
if (isset($_POST['submit']) && !isset($_POST['version2']))
@ -116,7 +116,7 @@
$desc_html = 0;
break;
}
$short_desc = $_POST['short_desc'];
$short_desc = $_POST['short_desc']; // Ocprop
$hint = htmlspecialchars($_POST['hints'], ENT_COMPAT, 'UTF-8');
$desclang = $_POST['desclang'];
$show_all_langs = isset($_POST['show_all_langs_value']) ? $_POST['show_all_langs_value'] : 0;
@ -132,7 +132,7 @@
if ($desc_html == 1)
{
// Text from textarea
$desc = $_POST['desc'];
$desc = $_POST['desc']; // Ocprop
// fuer alte Versionen von OCProp
if (isset($_POST['submit']) && !isset($_POST['version2']))
@ -156,7 +156,7 @@
}
}
if (isset($_POST['submitform']))
if (isset($_POST['submitform'])) // Ocprop
{
// prüfen, ob sprache nicht schon vorhanden
$rs = sql("SELECT COUNT(*) `count` FROM `cache_desc` WHERE `cache_id`='&1' AND `id` != '&2' AND `language`='&3'", $desc_record['cache_id'], $descid, $desclang);

View File

@ -33,6 +33,7 @@
$diff_not_ok_message = '&nbsp;<span class="errormsg">' . t('Choose both valuations!') . '</span>';
$nopictures = '<tr><td colspan="2">' . t('No pictures available') . '</td></tr>';
$pictureline = '<tr><td colspan="2"><a href="{link}">{title}</a> [<a href="picture.php?action=edit&uuid={uuid}">' . t('Edit') . '</a>] [<a href="picture.php?action=delete&uuid={uuid}">' . t('Delete') . '</a>]</td></tr>';
// Ocprop: <a href=\"http://.*?\.opencaching\.de/images/uploads/.*?\">(.*?)<\/a>.*?\[<a href=\"picture\.php\?action=[a-z]*?\&uuid=(.*?)\">
$picturelines = '{lines}<tr><td colspan="2">&nbsp;</td></tr>';
$nowaypoints = '<tr><td colspan="2">' . t('No waypoints available') . '</td></tr>';

View File

@ -112,7 +112,7 @@ function toggleAttr(id)
</div>
<form action="editcache.php" method="post" enctype="application/x-www-form-urlencoded" name="editcache_form" dir="ltr">
<input type="hidden" name="cacheid" value="{cacheid}"/>
<input type="hidden" name="cacheid" value="{cacheid}"/> <!-- Ocprop -->
<input type="hidden" id="cache_attribs" name="cache_attribs" value="{cache_attribs}" />
<input type="hidden" name="show_all_countries" value="{show_all_countries}"/>
<table class="table">
@ -282,7 +282,7 @@ function toggleAttr(id)
<img src="lang/de/ocstyle/images/description/22x22-image.png" width="22" height="22" align="middle" border="0">
{t}Pictures{/t}&nbsp;&nbsp;
<img src="lang/de/ocstyle/images/action/16x16-addimage.png" width="16" height="16" align="middle" border="0">
<span style="font-weight: 400;font-size: small;">[<a href="picture.php?action=add&cacheuuid={cacheuuid_urlencode}">{t}Upload a picture{/t}</a>]</span>
<span style="font-weight: 400;font-size: small;">[<!-- Ocprop >> --><a href="picture.php?action=add&cacheuuid={cacheuuid_urlencode}">{t}Upload a picture{/t}</a>]</span>
</p>
</div>
</td>
@ -323,7 +323,7 @@ function toggleAttr(id)
</tr>
<tr><td class="spacer" colspan="2"></td></tr>
<tr>
<td>{t}Hidden since:{/t}</td>
<td>{t}Hidden since:{/t}</td><!-- << Ocprop -->
<td>
<input class="input20" type="text" name="hidden_day" maxlength="2" value="{date_day}"/>.
<input class="input20" type="text" name="hidden_month" maxlength="2" value="{date_month}"/>.

View File

@ -20,6 +20,7 @@
$submit = t('Log this cache');
$date_message = '<span class="errormsg">' . t('date is invalid') . '</span>';
// Ocprop: <td colspan=\"2\">\s*Kennwort zum Loggen:\s*<input
$log_pw_field = '<tr><td colspan="2">' . t('passwort to log:') . ' <input class="input100" type="text" name="log_pw" maxlength="20" value="" /> ' . t('(only for found-logs)') . '</td></tr><tr><td class="spacer" colspan="2"></td></tr>';
$log_pw_field_pw_not_ok = '<tr><td colspan="2">' . t('passwort to log:') . ' <input type="text" name="log_pw" maxlength="20" size="20" value=""/><span class="errormsg"> ' . t('Invalid password!') . '</span></td></tr><tr><td class="spacer" colspan="2"></td></tr>';

View File

@ -4,7 +4,7 @@
<td width="45" class="{bgcolor}">{distance}&nbsp;</td>
<td width="32" class="{bgcolor}" rowspan="2"><img src='lang/de/ocstyle/images/{icon_large}' alt='{cachetype}' title='{cachetype}'></td>
<td width="46" class="{bgcolor}" rowspan="2" nowrap="nowarp">{diffpic}{terrpic}</td>
<td width="448" class="{bgcolor}">{new}<a href="viewcache.php?cacheid={urlencode_cacheid}">{cachename}</a> {string_by} <a href="viewprofile.php?userid={urlencode_userid}">{username}</a></td>
<td width="448" class="{bgcolor}">{new} <!-- Ocprop >> --><a href="viewcache.php?cacheid={urlencode_cacheid}">{cachename}</a> {string_by} <a href="viewprofile.php?userid={urlencode_userid}">{username}</a><!-- << --></td>
<td width="74" class="{bgcolor}" rowspan="2" style="padding: 0px">{oconly}</td>
<td width="110" valign="top" class="{bgcolor}">{logimage1} {logdate1}&nbsp;</td>
</tr>

View File

@ -54,6 +54,27 @@
</groundspeak:cache>
</wpt>
{cache_waypoints}';
/* Ocprop:
* <wpt\s+lat=\"([0-9\-\+\.]+)\"\s+lon=\"([0-9\-\+\.]+)\">
* <time>(.*?)<\/time>
* (Date: ^([0-9]{4})\-([0-9]{2})\-([0-9]{2})T[0-9\:\-\.]+(Z)?$/s)
* <name>(.*?)<\/name>
* <url>http:\/\/www\.opencaching\.de\/viewcache\.php\?cacheid=([0-9]+)<\/url>
* <sym>(.*?)<\/sym>
* <groundspeak:cache\s+id=\"[0-9]+\"\s+available=\"(True|False)\"\s+archived=\"(True|False)\"
* <groundspeak:name>(.*?)<\/groundspeak:name>
* <groundspeak:placed_by>(.*?)<\/groundspeak:placed_by>
* <groundspeak:owner id="([0-9])+">(.*?)<\/groundspeak:owner>
* <groundspeak:type>(.*?)<\/groundspeak:type>
* <groundspeak:container>(.*?)<\/groundspeak:container>
* <groundspeak:difficulty>(.*?)<\/groundspeak:difficulty>
* <groundspeak:terrain>(.*?)<\/groundspeak:terrain>
* <groundspeak:country>(.*?)<\/groundspeak:country>
* <groundspeak:state>(.*?)<\/groundspeak:state>
* <groundspeak:short_description html="(.*?)".*?>(.*?)<\/groundspeak:short_description>
* <groundspeak:long_description html="(.*?)".*?>(.*?)<\/groundspeak:long_description>
* <groundspeak:encoded_hints>(.*?)<\/groundspeak:encoded_hints>
*/
$gpxAttributes = ' <groundspeak:attribute id="{attrib_id}" inc="{attrib_inc}">{attrib_name}</groundspeak:attribute>';
@ -209,10 +230,10 @@
}
//startat?
$startat = isset($_REQUEST['startat']) ? $_REQUEST['startat'] : 0;
$startat = isset($_REQUEST['startat']) ? $_REQUEST['startat'] : 0; // Ocprop
if (!is_numeric($startat)) $startat = 0;
if (isset($_REQUEST['count']))
if (isset($_REQUEST['count'])) // Ocprop
$count = $_REQUEST['count'];
else
$count = $caches_per_page;
@ -243,7 +264,7 @@
$sFilebasename = 'ocde' . $options['queryid'];
$bUseZip = ($rCount['count'] > 20);
$bUseZip = $bUseZip || (isset($_REQUEST['zip']) && ($_REQUEST['zip'] == '1'));
$bUseZip = $bUseZip || (isset($_REQUEST['zip']) && ($_REQUEST['zip'] == '1')); // Ocprop
if ($bUseZip == true)
{
@ -323,6 +344,7 @@
if ($r['hint'] == '')
$thisline = mb_ereg_replace('{hints}', '', $thisline);
else
// Ocprop: <groundspeak:encoded_hints>(.*?)<\/groundspeak:encoded_hints>
$thisline = mb_ereg_replace('{hints}', ' <groundspeak:encoded_hints>' . xmlentities(strip_tags($r['hint'])) . '</groundspeak:encoded_hints>
', $thisline);

View File

@ -256,7 +256,7 @@
//more than one page?
if ($startat > 0)
{
{ // Ocprop: queryid=([0-9]+)
$pages = t('Seite:') . ' <a href="search.php?queryid=' . $options['queryid'] . '&startat=0">&lt;&lt;</a> <a href="search.php?queryid=' . $options['queryid'] . '&startat=' . ($startat - $caches_per_page) . '">&lt;</a> ';
}
else

View File

@ -53,7 +53,7 @@
if (!isset($emailaddr)) $emailaddr = 'contact@opencaching.de';
// location of cache images
if (!isset($picdir)) $picdir = $rootpath . 'images/uploads';
if (!isset($picdir)) $picdir = $rootpath . 'images/uploads'; // Ocprop
if (!isset($picurl)) $picurl = 'http://www.opencaching.de/images/uploads';
// Thumbsize

View File

@ -24,6 +24,7 @@ tinyMCE.init({
oninit : "postInit",
content_css : "lib/tinymce/config/content.css"
// Ocprop: lib\/tinymce
});
var fileBrowserReturnURL = "";

View File

@ -24,6 +24,7 @@ tinyMCE.init({
oninit : "postInit",
content_css : "lib/tinymce/config/content.css"
// Ocprop: lib\/tinymce
});
var fileBrowserReturnURL = "";

View File

@ -66,6 +66,7 @@ class coordinate
// d° mm.mmm
function getDecimalMinutes()
{
// Ocprop: ([N|S].*?)&#039;
$nLat = $this->nLat;
$bLatN = ($nLat < 0) ? false : true;
if (!$bLatN) $nLat = -$nLat;
@ -76,6 +77,7 @@ class coordinate
else
$sLat = 'S ' . sprintf("%02d", $nLatDeg) . '° ' . sprintf("%06.3f", $nLatMin) . '\'';
// Ocprop: ([E|W].*?)&#039;
$nLon = $this->nLon;
$bLonE = ($nLon < 0) ? false : true;
if (!$bLonE) $nLon = -$nLon;

View File

@ -20,7 +20,7 @@
if (mb_strtolower(mb_substr($target, 0, 9)) == 'login.php')
$target = 'myhome.php';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; // Ocprop
if ($action == 'cookieverify')
{
@ -50,8 +50,8 @@
if ($login->userid != 0)
$tpl->error(ERROR_ALREADY_LOGGEDIN);
$username = isset($_POST['email']) ? $_POST['email'] : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
$username = isset($_POST['email']) ? $_POST['email'] : ''; // Ocprop
$password = isset($_POST['password']) ? $_POST['password'] : ''; // Ocprop
$retval = $login->try_login($username, $password, null);
$password = '';

View File

@ -61,7 +61,7 @@
tpl_set_var('type_message', '');
tpl_set_var('diff_message', '');
$sel_type = isset($_POST['type']) ? $_POST['type'] : 0;
$sel_type = isset($_POST['type']) ? $_POST['type'] : 0; // Ocprop
if (!isset($_POST['size']))
{
if ($sel_type == 4 || $sel_type == 5)
@ -75,15 +75,15 @@
}
else
{
$sel_size = isset($_POST['size']) ? $_POST['size'] : -1;
$sel_size = isset($_POST['size']) ? $_POST['size'] : -1; // Ocprop
}
$sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;
$sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry();
$sel_country = isset($_POST['country']) ? $_POST['country'] : getUserCountry(); // Ocprop
$show_all_countries = isset($_POST['show_all_countries']) ? $_POST['show_all_countries'] : 0;
$show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
//coords
$lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW;
$lonEW = isset($_POST['lonEW']) ? $_POST['lonEW'] : $default_EW; // Ocprop
if ($lonEW == 'E')
{
tpl_set_var('lonEsel', ' selected="selected"');
@ -94,13 +94,13 @@
tpl_set_var('lonEsel', '');
tpl_set_var('lonWsel', ' selected="selected"');
}
$lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0';
$lon_h = isset($_POST['lon_h']) ? $_POST['lon_h'] : '0'; // Ocprop
tpl_set_var('lon_h', htmlspecialchars($lon_h, ENT_COMPAT, 'UTF-8'));
$lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000';
$lon_min = isset($_POST['lon_min']) ? $_POST['lon_min'] : '00.000'; // Ocprop
tpl_set_var('lon_min', htmlspecialchars($lon_min, ENT_COMPAT, 'UTF-8'));
$latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS;
$latNS = isset($_POST['latNS']) ? $_POST['latNS'] : $default_NS; // Ocprop
if ($latNS == 'N')
{
tpl_set_var('latNsel', ' selected="selected"');
@ -111,14 +111,14 @@
tpl_set_var('latNsel', '');
tpl_set_var('latSsel', ' selected="selected"');
}
$lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0';
$lat_h = isset($_POST['lat_h']) ? $_POST['lat_h'] : '0'; // Ocprop
tpl_set_var('lat_h', htmlspecialchars($lat_h, ENT_COMPAT, 'UTF-8'));
$lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000';
$lat_min = isset($_POST['lat_min']) ? $_POST['lat_min'] : '00.000'; // Ocprop
tpl_set_var('lat_min', htmlspecialchars($lat_min, ENT_COMPAT, 'UTF-8'));
//name
$name = isset($_POST['name']) ? $_POST['name'] : '';
$name = isset($_POST['name']) ? $_POST['name'] : ''; // Ocprop
tpl_set_var('name', htmlspecialchars($name, ENT_COMPAT, 'UTF-8'));
//shortdesc
@ -130,7 +130,7 @@
tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8'));
// descMode auslesen, falls nicht gesetzt aus dem Profil laden
if (isset($_POST['descMode']))
if (isset($_POST['descMode'])) // Ocprop
$descMode = $_POST['descMode']+0;
else
{
@ -144,7 +144,7 @@
// fuer alte Versionen von OCProp
if (isset($_POST['submit']) && !isset($_POST['version2']))
{
$descMode = (isset($_POST['desc_html']) && ($_POST['desc_html']==1)) ? 2 : 1;
$descMode = (isset($_POST['desc_html']) && ($_POST['desc_html']==1)) ? 2 : 1; // Ocprop
$_POST['submitform'] = $_POST['submit'];
$short_desc = iconv("ISO-8859-1", "UTF-8", $short_desc);
@ -209,16 +209,16 @@
}
//tos
$tos = isset($_POST['TOS']) ? 1 : 0;
$tos = isset($_POST['TOS']) ? 1 : 0; // Ocprop
if ($tos == 1)
tpl_set_var('toschecked', ' checked="checked"');
else
tpl_set_var('toschecked', '');
//hidden_since
$hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d');
$hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m');
$hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y');
$hidden_day = isset($_POST['hidden_day']) ? $_POST['hidden_day'] : date('d'); // Ocprop
$hidden_month = isset($_POST['hidden_month']) ? $_POST['hidden_month'] : date('m'); // Ocprop
$hidden_year = isset($_POST['hidden_year']) ? $_POST['hidden_year'] : date('Y'); // Ocprop
tpl_set_var('hidden_day', htmlspecialchars($hidden_day, ENT_COMPAT, 'UTF-8'));
tpl_set_var('hidden_month', htmlspecialchars($hidden_month, ENT_COMPAT, 'UTF-8'));
tpl_set_var('hidden_year', htmlspecialchars($hidden_year, ENT_COMPAT, 'UTF-8'));
@ -235,7 +235,7 @@
tpl_set_var('publish_later_checked', '');
tpl_set_var('publish_notnow_checked', '');
$publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2';
$publish = isset($_POST['publish']) ? $_POST['publish'] : 'now2'; // Ocprop
if($publish == 'now2')
{
tpl_set_var('publish_now_checked', 'checked');
@ -273,14 +273,14 @@
// gc- and nc-waypoints
// fix #4356: gc waypoints are frequently copy&pasted with leading spaces
$wp_gc = isset($_POST['wp_gc']) ? trim($_POST['wp_gc']) : '';
$wp_gc = isset($_POST['wp_gc']) ? trim($_POST['wp_gc']) : ''; // Ocprop
tpl_set_var('wp_gc', htmlspecialchars($wp_gc, ENT_COMPAT, 'UTF-8'));
$wp_nc = isset($_POST['wp_nc']) ? trim($_POST['wp_nc']) : '';
tpl_set_var('wp_nc', htmlspecialchars($wp_nc, ENT_COMPAT, 'UTF-8'));
//difficulty
$difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1;
$difficulty = isset($_POST['difficulty']) ? $_POST['difficulty'] : 1; // Ocprop
$difficulty_options = '<option value="1">'.$sel_message.'</option>';
for ($i = 2; $i <= 10; $i++)
{
@ -297,7 +297,7 @@
tpl_set_var('difficulty_options', $difficulty_options);
//terrain
$terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1;
$terrain = isset($_POST['terrain']) ? $_POST['terrain'] : 1; // Ocprop
$terrain_options = '<option value="1">'.$sel_message.'</option>';;
for ($i = 2; $i <= 10; $i++)
{
@ -520,7 +520,7 @@
tpl_set_var('jsattributes_array', $cache_attrib_array);
tpl_set_var('cache_attribs', $cache_attribs_string);
if (isset($_POST['submitform']))
if (isset($_POST['submitform'])) // Ocprop
{
//check the entered data

View File

@ -57,12 +57,12 @@
//get the posted data
$show_all_langs = isset($_POST['show_all_langs']) ? $_POST['show_all_langs'] : 0;
$short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : '';
$short_desc = isset($_POST['short_desc']) ? $_POST['short_desc'] : ''; // Ocprop
$hints = isset($_POST['hints']) ? $_POST['hints'] : '';
$sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang;
$desc = isset($_POST['desc']) ? $_POST['desc'] : '';
$descMode = isset($_POST['descMode']) ? ($_POST['descMode']+0) : 3;
$hints = isset($_POST['hints']) ? $_POST['hints'] : ''; // Ocprop
$sel_lang = isset($_POST['desc_lang']) ? $_POST['desc_lang'] : $default_lang; // Ocprop
$desc = isset($_POST['desc']) ? $_POST['desc'] : ''; // Ocprop
$descMode = isset($_POST['descMode']) ? ($_POST['descMode']+0) : 3; // Ocprop
if (($descMode < 1) || ($descMode > 3)) $descMode = 3;
// fuer alte Versionen von OCProp
@ -87,7 +87,7 @@
$desc_lang_exists = false;
//save to db?
if (isset($_POST['submitform']))
if (isset($_POST['submitform'])) // Ocprop
{
//check if the entered language already exists
$desc_rs = sql("SELECT `id` FROM `cache_desc` WHERE `cache_id`='&1' AND `language`='&2'", $cache_id, $sel_lang);

View File

@ -33,11 +33,11 @@
$tpl->assign('action', $action);
$tpl->assign('redirect', $redirect);
if ($action == 'add')
if ($action == 'add') // Ocprop
{
$picture = new picture();
if (isset($_REQUEST['cacheuuid']))
if (isset($_REQUEST['cacheuuid'])) // Ocprop
{
$cache = cache::fromUUID($_REQUEST['cacheuuid']);
if ($cache === null)
@ -51,7 +51,7 @@
$cache = null;
}
else if (isset($_REQUEST['loguuid']))
else if (isset($_REQUEST['loguuid'])) // Ocprop
{
$cachelog = cachelog::fromUUID($_REQUEST['loguuid']);
if ($cachelog === null)
@ -71,15 +71,15 @@
$tpl->error(ERROR_INVALID_OPERATION);
// uploaded file ok?
if (isset($_REQUEST['ok']))
if (isset($_REQUEST['ok'])) // Ocprop
{
$bError = false;
$picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler']=='1');
$picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay']=='1') == false);
$picture->setSpoiler(isset($_REQUEST['spoiler']) && $_REQUEST['spoiler']=='1'); // Ocprop
$picture->setDisplay((isset($_REQUEST['notdisplay']) && $_REQUEST['notdisplay']=='1') == false); // Ocprop
$picture->setMapPreview(isset($_REQUEST['mappreview']) && $_REQUEST['mappreview']=='1');
$title = isset($_REQUEST['title']) ? $_REQUEST['title'] : '';
$title = isset($_REQUEST['title']) ? $_REQUEST['title'] : ''; // Ocprop
if ($title == '')
{
$tpl->assign('errortitle', true);
@ -88,7 +88,7 @@
else
$picture->setTitle($title);
if (!isset($_FILES['file']))
if (!isset($_FILES['file'])) // Ocprop
{
$tpl->assign('errorfile', ERROR_UPLOAD_ERR_NO_FILE);
$bError = true;

View File

@ -54,7 +54,7 @@
$multiplier['nm'] = 0.53996;
if (isset($_REQUEST['queryid']) || isset($_REQUEST['showresult']))
{
{ // Ocprop: showresult, queryid
$bCookieQueryid = false;
$queryid = isset($_REQUEST['queryid']) ? $_REQUEST['queryid'] : 0;
}
@ -132,7 +132,7 @@
if (isset($_REQUEST['output']))
$options['output'] = $_REQUEST['output'];
if (isset($_REQUEST['showresult']))
if (isset($_REQUEST['showresult'])) // Ocprop
{
$options['showresult'] = $_REQUEST['showresult'];
}
@ -145,7 +145,7 @@
}
// finderid in finder umsetzen
$options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0;
$options['finderid'] = isset($options['finderid']) ? $options['finderid'] + 0 : 0; // Ocprop
if(isset($options['finder']) && $options['finderid'] > 0)
{
$rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['finderid']);
@ -159,7 +159,7 @@
}
// ownerid in owner umsetzen
$options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0;
$options['ownerid'] = isset($options['ownerid']) ? $options['ownerid'] + 0 : 0; // Ocprop
if(isset($options['owner']) && $options['ownerid'] > 0)
{
$rs_name = sql("SELECT `username` FROM `user` WHERE `user_id`='&1'", $options['ownerid']);
@ -195,9 +195,9 @@
$options['f_inactive'] = isset($_REQUEST['f_inactive']) ? $_REQUEST['f_inactive'] : 1;
$options['f_ignored'] = isset($_REQUEST['f_ignored']) ? $_REQUEST['f_ignored'] : 1;
$options['f_otherPlatforms'] = isset($_REQUEST['f_otherPlatforms']) ? $_REQUEST['f_otherPlatforms'] : 0;
$options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0;
$options['expert'] = isset($_REQUEST['expert']) ? $_REQUEST['expert'] : 0; // Ocprop: 0
$options['showresult'] = isset($_REQUEST['showresult']) ? $_REQUEST['showresult'] : 0;
$options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML';
$options['output'] = isset($_REQUEST['output']) ? $_REQUEST['output'] : 'HTML'; // Ocprop: HTML
$options['bbox'] = isset($_REQUEST['bbox']) ? $_REQUEST['bbox'] : false;
if (isset($_REQUEST['cache_attribs']))
@ -254,20 +254,20 @@
if (!isset($_REQUEST['utf8']))
$options['cachename'] = iconv("ISO-8859-1", "UTF-8", $options['cachename']);
}
elseif (isset($_REQUEST['searchbyowner']))
elseif (isset($_REQUEST['searchbyowner'])) // Ocprop
{
$options['searchtype'] = 'byowner';
$options['ownerid'] = isset($_REQUEST['ownerid']) ? $_REQUEST['ownerid'] : 0;
$options['owner'] = isset($_REQUEST['owner']) ? stripslashes($_REQUEST['owner']) : '';
}
elseif (isset($_REQUEST['searchbyfinder']))
elseif (isset($_REQUEST['searchbyfinder'])) // Ocprop
{
$options['searchtype'] = 'byfinder';
$options['finderid'] = isset($_REQUEST['finderid']) ? $_REQUEST['finderid'] : 0;
$options['finder'] = isset($_REQUEST['finder']) ? stripslashes($_REQUEST['finder']) : '';
$options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7';
$options['logtype'] = isset($_REQUEST['logtype']) ? $_REQUEST['logtype'] : '1,7'; // Ocprop
}
elseif (isset($_REQUEST['searchbyort']))
{
@ -289,6 +289,7 @@
{
$options['searchtype'] = 'bydistance';
// Ocprop: all of the following options
if (isset($_REQUEST['lat']) && isset($_REQUEST['lon']))
{
$options['lat'] = $_REQUEST['lat']+0;
@ -428,7 +429,7 @@
//make a list of cache-ids that are in the result
if(!isset($options['expert'])) $options['expert']='';
if ($options['expert'] == 0)
if ($options['expert'] == 0) // Ocprop
{
$sql_select = array();
$sql_from = '';
@ -714,7 +715,7 @@
}
$sql_where[] = '`cache_logs`.`type` IN (' . $idNumbers . ')';
}
elseif ($options['searchtype'] == 'bydistance')
elseif ($options['searchtype'] == 'bydistance') // Ocprop
{
//check the entered data
if (isset($options['lat']) && isset($options['lon']))
@ -875,15 +876,15 @@
}
// additional options
if(!isset($options['f_userowner'])) $options['f_userowner']='0';
if(!isset($options['f_userowner'])) $options['f_userowner']='0'; // Ocprop
if($options['f_userowner'] != 0) { $sql_where[] = '`caches`.`user_id`!=\'' . $usr['userid'] .'\''; }
if(!isset($options['f_userfound'])) $options['f_userfound']='0';
if(!isset($options['f_userfound'])) $options['f_userfound']='0'; // Ocprop
if($options['f_userfound'] != 0)
{
$sql_where[] = '`caches`.`cache_id` NOT IN (SELECT `cache_logs`.`cache_id` FROM `cache_logs` WHERE `cache_logs`.`user_id`=\'' . sql_escape($usr['userid']) . '\' AND `cache_logs`.`type` IN (1, 7))';
}
if(!isset($options['f_inactive'])) $options['f_inactive']='0';
if(!isset($options['f_inactive'])) $options['f_inactive']='0'; // Ocprop
if($options['f_inactive'] != 0) $sql_where[] = '`caches`.`status`=1';
if(isset($usr))
@ -1008,6 +1009,7 @@
}
//go to final output preparation
// Ocprop: HTML, gpx
if (!file_exists($opt['rootpath'] . 'lib/search.' . mb_strtolower($options['output']) . '.inc.php'))
{
tpl_set_var('tplname', $tplname);
@ -1065,7 +1067,7 @@ function outputSearchForm($options)
tpl_set_var('bydistance_enabled', ($homecoords ? "" : 'disabled="disabled"'));
if (isset($options['sort']))
$bBynameChecked = ($options['sort'] == 'byname');
$bBynameChecked = ($options['sort'] == 'byname'); // Ocprop
else
$bBynameChecked = ($usr['userid'] == 0);
tpl_set_var('byname_checked', ($bBynameChecked == true) ? ' checked="checked"' : '');

View File

@ -20,6 +20,7 @@
</p>
</div>
{* Ocprop: (find|us|own)erid=([0-9]+) *}
<p style="line-height: 1.6em;">[<a href="search.php?showresult=1&amp;expert=0&amp;output=HTML&amp ;sort=byname&amp;finderid={$login.userid}&amp;searchbyfinder=&amp;f_inactive=0&amp;logtype=1,7">{t}Show all{/t}</a>] - <b>{t}Your latest log entries:{/t}</b></p>
<table class="table">
@ -73,6 +74,7 @@
</div>
<p style="line-height: 1.6em;">
{* Ocprop: (find|us|own)erid=([0-9]+) *}
[<a href="search.php?showresult=1&amp;expert=0&amp;output=HTML&amp;sort=byname&amp;ownerid={$login.userid}&amp;searchbyowner=&amp;f_inactive=0"">{t}Show all{/t}</a>] -
<b>{t}Your latest Geocaches hidden:{/t}</b>
</p>

View File

@ -10,7 +10,7 @@
<img src="resource2/{$opt.template.style}/images/cacheicon/unknown.gif" alt="{t}Unknown Geocache{/t}" title="{t}Unknown Geocache{/t}" border="0" width="32" height="32" class="icon32" id="viewcache-cacheicon" />
{elseif $cachetype==2}
<img src="resource2/{$opt.template.style}/images/cacheicon/traditional.gif" alt="{t}Traditional Geocache{/t}" title="{t}Traditional Geocache{/t}" border="0" width="32" height="32" class="icon32" id="viewcache-cacheicon" />
{elseif $cachetype==3}
{elseif $cachetype==3} {* Ocprop: \/cacheicon\/multi\.gif"\s+alt="Multicache" *}
<img src="resource2/{$opt.template.style}/images/cacheicon/multi.gif" alt="{t}Multicache{/t}" title="{t}Multicache{/t}" border="0" width="32" height="32" class="icon32" id="viewcache-cacheicon" />
{elseif $cachetype==4}
<img src="resource2/{$opt.template.style}/images/cacheicon/virtual.gif" alt="{t}Virtual Geocache{/t}" title="{t}Virtual Geocache{/t}" border="0" width="32" height="32" class="icon32" id="viewcache-cacheicon" />

View File

@ -3,7 +3,7 @@
*
* Unicode Reminder メモ
***************************************************************************}
<div class="content-txtbox-noshade"> {* Ocprop: /<div class="content-txtbox-noshade">(.*?)<\/div>/sig *}
<div class="content-txtbox-noshade"> {* Ocprop: <div class="content-txtbox-noshade">(.*?)<\/div> *}
<div class="logs" id="log{$logItem.id}">
<p class="content-title-noshade-size1" style="display:inline;">
{include file="res_logtype.tpl" type=$logItem.type}
@ -16,9 +16,9 @@
<a href="viewprofile.php?userid={$logItem.userid}">{$logItem.username|escape}</a>
{/capture}
{if $logItem.type==1}
{if $logItem.type==1} {* Ocprop: $htmluserid<\/a>\s*(hat das Event besucht|hat den Geocache gefunden|found the Geocache|has visited the event) *}
{t 1=$smarty.capture.username}%1 found the Geocache{/t}
{elseif $logItem.type==2}
{elseif $logItem.type==2} {* Ocprop: $htmluserid<\/a>.\s*(hat den Geocache nicht gefunden|didn't find the Geocache|didn't find the Geoacache) *}
{t 1=$smarty.capture.username}%1 didn't find the Geoacache{/t}
{elseif $logItem.type==3}
{t 1=$smarty.capture.username}%1 wrote a note{/t}

View File

@ -109,7 +109,8 @@
&nbsp;
{if $login.userid==0}
<b><form action="login.php" method="post" enctype="application/x-www-form-urlencoded" name="login" dir="ltr" style="display: inline;">{t}User{/t}:&nbsp;&nbsp;<input name="email" size="10" type="text" class="textboxes" value="" />&nbsp;&nbsp;&nbsp;{t}Password{/t}:&nbsp;&nbsp;<input name="password" size="10" type="password" class="textboxes" value="" />&nbsp;<input type="hidden" name="action" value="login" /><input type="hidden" name="target" value="{$opt.page.target|escape}" />&nbsp;<input name="LogMeIn" value="{t}Login{/t}" class="formbuttons" style="width: 65px;" type="submit"></form></b>
{else}
{else} {* Ocprop: <a href="myhome.php">(.*?)<\/a>.*?<a href="login.php
<a href="myhome.php">.*?<a href="login.php\?action=logout"> *}
<b>{t}Logged in as{/t} <a href="myhome.php">{$login.username|escape}</a></b> - <a href="login.php?action=logout">{t}Logout{/t}</a>
{/if}
{/nocache}

View File

@ -162,13 +162,14 @@
<div class="content2-container-2col-left" id="viewcache-baseinfo">
<p class="content-title-noshade-size2">
<img src="resource2/{$opt.template.style}/images/viewcache/kompass.png" class="icon32" alt="" title="" />
<b><nobr>{$coordinates.lat|escape}</nobr> <nobr>{$coordinates.lon|escape}</nobr></b> <span class="content-title-noshade-size0">(WGS84)</span><br />
<b><nobr>{$coordinates.lat|escape}</nobr> <nobr>{$coordinates.lon|escape}</nobr></b> <span class="content-title-noshade-size0">(WGS84)</span><br /> {* Ocprop: <b><nobr>([N|S].*?)&#039;<\/nobr> <nobr>([E|W].*?)&#039;<\/nobr><\/b>.*?WGS84 *}
</p>
<p style="line-height: 1.6em;">
<img src="resource2/{$opt.template.style}/images/viewcache/map.png" class="icon16" alt="" title="" align="middle" />&nbsp;<a href="#" onclick="window.open('coordinates.php?lat={$cache.latitude}&lon={$cache.longitude}&popup=y&wp={$cache.wpoc}','{t escape=js}Coordinates{/t}','width=280,height=430,resizable=no,scrollbars=0')">{t}Convert coordinates{/t}</a><br />
<!-- <img src="resource2/{$opt.template.style}/images/viewcache/box.png" class="icon16" alt="" title="" align="middle" />&nbsp;Cache type: <b>Traditional</b><br /> -->
<img src="resource2/{$opt.template.style}/images/viewcache/package_green.png" class="icon16" alt="" title="" align="middle" />&nbsp;{t}Size{/t}: <b>{$cache.sizeName|escape}</b><br />
<img src="resource2/{$opt.template.style}/images/viewcache/page.png" class="icon16" alt="" title="" align="middle" />{if $cache.status!=1}
<img src="resource2/{$opt.template.style}/images/viewcache/page.png" class="icon16" alt="" title="" align="middle" />
{if $cache.status!=1} {* Ocprop: Status: <span class=\"errormsg\">Gesperrt<\/span> *}
{t}State{/t}: <span class="errormsg">{$cache.statusName|escape}</span>
{else}
{t}State{/t}: {$cache.statusName|escape}
@ -182,10 +183,10 @@
{if $cache.searchtime>0 || $cache.waylength>0}<br />{/if}
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" />&nbsp;{if $cache.type==6}{t}Event date{/t}{else}{t}Hidden at{/t}{/if}: {$cache.datehidden|date_format:$opt.format.datelong}<br />
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" />&nbsp;{if $cache.is_publishdate==0}{t}Listed since{/t}{else}{t}Published on{/t}{/if}: {$cache.datecreated|date_format:$opt.format.datelong}<br />
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" />&nbsp;{t}Last update{/t}: {$cache.lastmodified|date_format:$opt.format.datelong}<br />
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" />&nbsp;{t}Last update{/t}: {$cache.lastmodified|date_format:$opt.format.datelong}<br /> {* Ocprop: <br />\s*Wegpunkt: (OC[A-Z0-9]+)\s*<br /> -- Waypoint: <b>(OC[A-Z0-9]+)<\/b><br \/> *}
<img src="resource2/{$opt.template.style}/images/viewcache/arrow_in.png" class="icon16" alt="" title="" align="middle" />&nbsp;{t}Waypoint{/t}: <b>{$cache.wpoc}</b><br />
{if $cache.wpgc!='' || $cache.wpnc!=''}<img src="resource2/{$opt.template.style}/images/viewcache/link.png" class="icon16" alt="" title="" align="middle" />
{t}Also listed at{/t}:
{t}Also listed at{/t}: {* Ocprop: Auch gelistet auf: <a href=\"http://www\.geocaching\.com/seek/cache_details\.aspx\?wp=(GC[0-9A-Z]{1,5})\" target=\"_blank\">geocaching.com</a> *}
{if $cache.wpgc!=''}
<a href="http://www.geocaching.com/seek/cache_details.aspx?wp={$cache.wpgc}" target="_blank">geocaching.com&nbsp;</a>
{/if}