function getFilters($podData = false) { if (!$podData) { $dateField = 't'; } else { $dateField = $podData->dateField; } $filters = array('siteFilters' => array('name' => 'siteSelect', 'type' => 'drop_down', 'label' => 'Select Site', 'options' => getSites(), 'default_option' => '0', 'group' => 'memberFilters', 'authorization' => array('all')), 'memberFilters' => array('name' => 'membersOptions', 'type' => 'radio', 'label' => 'Member Types', 'options' => array('all' => array('label' => 'All Users', 'default' => true, 'sql' => ''), 'membersOnly' => array('label' => 'All Members', 'default' => false, 'sql' => 'User.isMember = 1'), 'teamEligibleOnly' => array('label' => 'Inside Study', 'default' => false, 'sql' => "User.optInStudy = 1 AND User.eligiblity = 'team'")), 'default_option' => 'all', 'group' => 'memberFilters', 'authorization' => array('all')), 'dateFilters' => array('name' => 'dateSelect', 'type' => 'yui_date_filters', 'label' => 'Date Filters', 'options' => array('all' => array('label' => 'All Time', 'sql' => "Log.{$dateField} > '1984-05-22 07:21:12'"), 'day' => array('label' => 'Daily', 'sql' => "Log.{$dateField} > '1984-05-22 07:21:12'")), 'default_option' => 'all', 'group' => 'dateFilters', 'authorization' => array('all'))); return $filters; }
function createSiteEntries(&$pos, &$label, &$type, &$url, &$icon, $q, $cats) { $data = getSites($q); foreach ($data as $point) { $pos[$point['url']] += 1000; $label[$point['name']] += 1000; $type[$point['name']] = "site"; $url[$point['name']] = $point['url']; $icon[$point['name']] = 'http://opendatamap.ecs.soton.ac.uk/resources/numbericon.php?n=' . substr($point['name'], 0, 1); } }
/*************************************************************************** * You can find the license in the docs directory * * Unicode Reminder メモ * * Display some status information about the server and Opencaching ***************************************************************************/ require './lib2/web.inc.php'; $tpl->name = 'sitemap'; $tpl->menuitem = MNU_SITEMAP; $tpl->caching = true; $tpl->cache_lifetime = 7 * 24 * 60 * 60; $viewall = isset($_REQUEST['viewall']) && $_REQUEST['viewall'] == '1' && $login->admin; if (!$tpl->is_cached()) { $tpl->assign('sites', getSites($viewall)); } $tpl->display(); function getSites($viewall) { $aItems = array(); pAppendSites(0, $viewall, 0, $aItems); return $aItems; } function pAppendSites($parentId, $viewall, $sublevel, &$aItems) { global $opt; $rs = sql("SELECT `sys_menu`.`id`, \r\n\t IF(`sys_menu`.`title`='', \r\n\t IFNULL(`ttMenu`.`text`, `sys_menu`.`menustring`), \r\n\t IFNULL(`ttTitle`.`text`, `sys_menu`.`title`)) AS `name`, \r\n\t `sys_menu`.`href`, \r\n\t `sys_menu`.`sitemap` \r\n\t FROM `sys_menu` \r\n\t LEFT JOIN `sys_trans` AS `tTitle` ON `sys_menu`.`title_trans_id`=`tTitle`.`id` AND `sys_menu`.`title`=`tTitle`.`text` \r\n\t LEFT JOIN `sys_trans_text` AS ttTitle ON `tTitle`.`id`=`ttTitle`.`trans_id` AND `ttTitle`.`lang`='&2' \r\n\t LEFT JOIN `sys_trans` AS `tMenu` ON `sys_menu`.`menustring_trans_id`=`tMenu`.`id` AND `sys_menu`.`menustring`=`tMenu`.`text` \r\n\t LEFT JOIN `sys_trans_text` AS `ttMenu` ON `tMenu`.`id`=`ttMenu`.`trans_id` AND `ttMenu`.`lang`='&2' \r\n\t WHERE `sys_menu`.`access`=0 AND `sys_menu`.`parent`='&1' AND (&3=1 OR `sys_menu`.`sitemap`=1)\r\n\t ORDER BY `sys_menu`.`parent` ASC, `sys_menu`.`position` ASC", $parentId, $opt['template']['locale'], $viewall ? 1 : 0); while ($r = sql_fetch_assoc($rs)) { $r['sublevel'] = $sublevel; $aItems[] = $r;
(at your option) any later version. VisuGps is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with VisuGps; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Copyright (c) 2008 Victor Berchet, <http://www.victorb.fr> */ header('Content-type: text/plain; charset=ISO-8859-1'); header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); $lat = isset($_GET['lat']) ? floatval($_GET['lat']) : 44; $lon = isset($_GET['lon']) ? floatval($_GET['lon']) : 6; echo getSites($lat, $lon); function getSites($lat, $lon) { $url = "http://www.paraglidingearth.com/takeoff_around.php?lat={$lat}&lng={$lon}&distance=100&limit=15"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $data = curl_exec($ch); curl_close($ch); $xml = @simplexml_load_string($data); if ($xml === false) { return ""; }
<?php include $VERSION_PATH . "core/header.php"; if ($prop = sanitize($_GET['prop'])) { $siteArray = array(); if ($result = getSites($prop)) { while ($row = mysql_fetch_array($result)) { $site = new SiteMapItem($row['loc'], $row['lastmod'], $row['changefreq'], $row['priority']); array_push($siteArray, $site); } } $sitemapXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; $sitemapXML .= "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"; foreach ($siteArray as $s) { $sitemapXML .= $s->getSiteMapBlock(); } $sitemapXML .= "</urlset>"; print_to_file($FILE_PATH . $prop . ".xml", $sitemapXML); } else { echo "You need to supply a property"; } include $VERSION_PATH . "core/footer.php"; ?>
<?php getGenericOfferings(); ?> </select><br/> or...<br/> <select id='specific' onchange='selectSpecificOffering(this.options[selectedIndex].value)'> <?php getSpecificOfferings(); ?> </select> </div> <div style='border:solid 3px gray; margin:10px; padding:10px;'> near...<br/> <select name='site' id='site' onchange='selectSite(this.options[selectedIndex].value)'> <?php getSites(); ?> </select><br/> or...<br/> <select id='building-number' onchange='selectBuilding(this.options[selectedIndex].value)'> <?php getBuildingsNumber(); ?> </select> <select id='building-name' onchange='selectBuilding(this.options[selectedIndex].value)'> <?php getBuildingsName(); ?> </select><br/> or...<br/> <input type='button' value='Near my current location' onclick='geoloc()' /><span id='geoinfo'></span>
<?php include "settings.php"; include "dbConn.php"; include "sql.php"; include "sitemapClass.php"; $siteArray = array(); if ($result = getSites($_GET['site'])) { while ($row = mysql_fetch_array($result)) { $site = new SiteMapItem($row['loc'], $row['lastmod'], $row['changefreq'], $row['priority']); array_push($siteArray, $site); } } echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"; foreach ($siteArray as $s) { echo $s->getSiteMapBlock(); } echo "</urlset>"; mysql_close($conn);