Пример #1
0
 * @param cacheid -
 *
 * visualization of the search results:
 * @param searchdata + ... -
 *
 */
require_once './lib/common.inc.php';
require_once './lib/cachemap3_common.php';
//check if user logged in
handleUserLogged();
$tplname = 'cachemap-full';
// locate user for which map is displayed
$mapForUserObj = getMapUserObj();
tpl_set_var('userid', $mapForUserObj->getUserId());
// parse cords and zoom setings
parseCordsAndZoom($mapForUserObj);
// parse eventually printList changes
parsePrintList();
//parse PowerTrail filter in url
parsePowerTrailFilter(true);
//read from DB map settings and apply to the map
$filter = getDBFilter($usr['userid']);
//logged user or preview user?
setFilterSettings($filter);
//handle search-data - visualization of search results
parseSearchData();
tpl_set_var('username', $mapForUserObj->getUserName());
//actually not used in map-full now...
setTheRestOfCommonVars();
//...and lest run template in fullscrean mode...
tpl_BuildTemplate(true, true);
Пример #2
0
// check if user logged in
handleUserLogged();
$tplname = 'cachemap-mini';
// only logged user point of view is supported here
$mapForUserId = $usr['userid'];
// $usr is stored in sessions
tpl_set_var('userid', $mapForUserId);
// lat & lon params are required here
if (isset($_REQUEST['lat']) && $_REQUEST['lat'] != "" && isset($_REQUEST['lon']) && $_REQUEST['lon'] != "") {
    // use cords from request
    tpl_set_var('coords', $_REQUEST['lat'] . "," . $_REQUEST['lon']);
} else {
    tpl_set_var('coords', $country_coordinates);
}
// zoom param is required here
if (isset($_REQUEST['inputZoom']) && $_REQUEST['inputZoom'] != "") {
    tpl_set_var('zoom', $_REQUEST['inputZoom']);
} else {
    tpl_set_var('zoom', $default_country_zoom);
    // this is default zoom
}
// parse PowerTrail filter in url
parsePowerTrailFilter(false);
tpl_set_var('doopen', "false");
// donn not open any cache
tpl_set_var('map_type', "0");
// fixed to default map
setCommonMap3Vars();
tpl_set_var('cachemap_mapper', $cachemap_mapper);
// ...and lest run template in fullscrean mode...
tpl_BuildTemplate(true, true);