forked from opencaching/opencaching-pl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcachemap3.php
More file actions
63 lines (50 loc) · 1.52 KB
/
cachemap3.php
File metadata and controls
63 lines (50 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
use lib\Objects\GeoCache\PrintList;
use Utils\Uri\Uri;
/**
*
* Params in request - all are optional:
*
* @param userid - Id of the user, from which point of view the map is presented
*
* map location:
* @param lat,lon - coordinates where the map is centered
* @param inputZoom - zoom to set on the map
*
* handling of the cache clipboard operations:
* @param print_list -
* @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();
tpl_set_tplname('cachemap3');
$view = tpl_getView();
// 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
if (isset($_REQUEST['cacheid'])) {
PrintList::HandleRequest($_REQUEST['cacheid']);
}
// 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());
setTheRestOfCommonVars();
$view->loadJQuery();
$view->loadGMapApi();
$view->addLocalCss(Uri::getLinkWithModificationTime('/tpl/stdstyle/map/cachemap3.css'));
// ...and lest run template...
tpl_BuildTemplate();