Ejemplo n.º 1
0
 /* GeoKretApi selector for logging Geokrets using GeoKretyApi */
 $dbConWpt = new dataBase();
 $dbConWpt->paramQuery("SELECT `secid` FROM `GeoKretyAPI` WHERE `userID` =:user_id LIMIT 1", array('user_id' => array('value' => $usr['userid'], 'data_type' => 'integer')));
 if ($dbConWpt->rowCount() > 0) {
     tpl_set_var('GeoKretyApiNotConfigured', 'none');
     tpl_set_var('GeoKretyApiConfigured', 'block');
     $databaseResponse = $dbConWpt->dbResultFetch();
     $secid = $databaseResponse['secid'];
     unset($dbConWpt);
     $dbConWpt = new dataBase();
     $dbConWpt->paramQuery("SELECT `wp_oc` FROM `caches` WHERE `cache_id` = :cache_id", array('cache_id' => array('value' => $cache_id, 'data_type' => 'integer')));
     $cwpt = $dbConWpt->dbResultFetch();
     $cache_waypt = $cwpt['wp_oc'];
     unset($dbConWpt);
     $GeoKretSelector = new GeoKretyApi($secid, $cache_waypt);
     $GKSelect = $GeoKretSelector->MakeGeokretSelector($cachename);
     $GKSelect2 = $GeoKretSelector->MakeGeokretInCacheSelector($cachename);
     tpl_set_var('GeoKretApiSelector', $GKSelect);
     tpl_set_var('GeoKretApiSelector2', $GKSelect2);
 } else {
     tpl_set_var('GeoKretyApiNotConfigured', 'block');
     tpl_set_var('GeoKretyApiConfigured', 'none');
     tpl_set_var('GeoKretApiSelector', '');
 }
 // descMode is depreciated. this was description type. Now all description are in html, then always use 3 for back compatibility
 $descMode = 3;
 // fuer alte Versionen von OCProp
 if (isset($_POST['submit']) && !isset($_POST['version2'])) {
     $descMode = 1;
     $_POST['submitform'] = $_POST['submit'];
     $log_text = iconv("ISO-8859-1", "UTF-8", $log_text);