コード例 #1
0
ファイル: map.php プロジェクト: BackupTheBerlios/localis
<?php

$title = "Cartographie";
$db = true;
include "setup.php";
include_once PROOT . "/libs/lei_fct.inc";
// fonctions php
require_once "dl3tree.inc";
// fichier partag�contenant l'objet permettant de g��er des arboresences
//debug ("_REQUEST");
//debug ("_SESSION");
checkfontlist(PROOT . "/maps");
//include_once(PROOT."/libs/conf.php"); fait ds le setup
// sur le proto, on n'affiche la carte que si on est logg? avec un profil >=1 et que le code profil
$bool_map_disp = !empty($_SESSION['me']) && $_SESSION['profile'] >= 1 || $anonym_disp_maps;
$smarty->assign('bool_map_disp', $bool_map_disp);
$smarty->assign('bool_lei_stat', RecupLib("conf", "name", "value", "lei_stat"));
$smarty->assign('url_lei_stat', RecupLib("conf", "name", "value", "url_lei_stat"));
if (isset($_REQUEST['x'])) {
    $click_x = $_REQUEST['x'];
    $click_y = $_REQUEST['y'];
} else {
    $click_x = $click_y = false;
}
// enlevé: ne servait que quand on arrivait sur la carto pour la première fois
// maintenant c'est le zoom pardéfaut qui est sélectionné
//if (!isset($_REQUEST['action']))  $_REQUEST['action'] = "travel";
$zoom_factor = 1;
// défaut
if (isset($_REQUEST['purge']) and $_REQUEST['purge'] == 'all') {
    $_SESSION['track'] = array();
コード例 #2
0
ファイル: localis.php プロジェクト: BackupTheBerlios/localis
} elseif ($HTTP_GET_VARS['extent']) {
    $ext = split(' ', trim($HTTP_GET_VARS['extent']));
} else {
    $ext = split(' ', $conf[map][defext]);
}
list($extminx, $extminy, $extmaxx, $extmaxy) = split(' ', $conf[map][defext]);
$size = ($HTTP_GET_VARS['size'] and strstr($HTTP_GET_VARS['size'], 'x')) ? $HTTP_GET_VARS['size'] : $conf[map][defsize];
list($sizex, $sizey) = split('x', $size);
if ($sizex > 1200) {
    $sizex = '1200';
}
if ($sizey > 1200) {
    $sizey = '1200';
}
$conn = sig_connect();
checkfontlist($conf["map"]['path']);
// layer modification
if ($confdel and $drawlayer) {
    modlayer('killme!', $drawlayer);
    $drawlayer = '';
}
if ($editlay['add']) {
    if ($editlay['id']) {
        modlayer($editlay, $editlay['id']);
    } else {
        $drawlayer = modlayer($editlay, '');
    }
}
// points modification
if (is_array($add) and $add[submit]) {
    addobj($add);