Skip to content
Permalink
Browse files

marked ocprop triggers

  • Loading branch information...
following
following committed Mar 27, 2013
1 parent 92cee91 commit b5d24350dcc4c24f0fe2c4f635a13c56c1f72a3d
@@ -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';
@@ -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;
}
}
@@ -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);
@@ -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>';
@@ -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}"/>.
@@ -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>';
@@ -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>
@@ -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);
@@ -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
@@ -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
@@ -24,6 +24,7 @@
oninit : "postInit",

content_css : "lib/tinymce/config/content.css"
// Ocprop: lib\/tinymce
});

var fileBrowserReturnURL = "";
@@ -24,6 +24,7 @@
oninit : "postInit",

content_css : "lib/tinymce/config/content.css"
// Ocprop: lib\/tinymce
});

var fileBrowserReturnURL = "";
@@ -66,6 +66,7 @@ function getDecimal()
// 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 @@ function getDecimalMinutes()
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;
@@ -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 = '';
Oops, something went wrong.

0 comments on commit b5d2435

Please sign in to comment.
You can’t perform that action at this time.