table_prefix = "banana_"
+[Geoloc]
+use_map = 0
+webservice_url = ""
+dynamap_path = ""
+icon_path = ""
+
[Mail]
domain = ""
domain2 = ""
+++ /dev/null
-<?php
-/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program 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 this program; if not, write to the Free Software *
- * Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
- ***************************************************************************/
-
-// {{{ config HOOK
-
-class GeolocConfig
-{
- var $webservice_url = '';
- var $dynamap_path = false;
- var $icon_path = false;
-
- function use_map() {
- static $use_map;
- if (!isset($use_map))
- $use_map = $this->dynamap_path != false && is_file($this->dynamap_path) && is_file($this->icon_path);
- return $use_map;
- }
-}
-
-function geoloc_config()
-{
- global $globals;
- $globals->geoloc = new GeolocConfig;
-}
-
-// }}}
-
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
-?>
header("Content-type: application/x-shockwave-flash");
-if ($globals->geoloc->use_map())
+if ($globals->geoloc->use_map)
readfile($globals->geoloc->dynamap_path);
?>
require_once 'xnet.inc.php';
-if ($globals->asso('pub') == 'public')
- new_group_page('geoloc/index.tpl');
-else
- new_groupadmin_page('geoloc/index.tpl');
+if ($globals->asso('pub') == 'public') {
+ new_group_page('geoloc/index.tpl');
+} else {
+ new_groupadmin_page('geoloc/index.tpl');
+}
-$page->assign('use_map', $globals->geoloc->use_map());
$page->assign('no_annu', true);
$page->assign('dynamap_vars', 'none');
$page->run();
-?>
\ No newline at end of file
+?>
header("Content-type: application/x-shockwave-flash");
-if ($globals->geoloc->use_map())
- readfile($globals->geoloc->icon_path);
+if ($globals->geoloc->use_map) {
+ readfile($globals->geoloc->icon_path);
+}
?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-
// {{{ liste les pays ou les régions d'un pays
/** donne la liste déroulante des pays
* @param $current pays actuellement selectionné
return array($countries, $cities);
}
+// }}}
+
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
?>
$globals->core = new CoreConfig;
$globals->hook = new XOrgHook();
- $globals->hook->config(null);
-
$globals->read_config();
$globals->dbconnect();
$globals->core = new CoreConfig;
$globals->hook = new XOrgHook();
- $globals->hook->config(null);
-
$globals->read_config();
$globals->dbconnect();
}
// }}}
- // {{{ function config
-
- function config()
- {
- foreach ($this->_mods as $mod) {
- if (!function_exists($mod.'_config')) continue;
- call_user_func($mod.'_config');
- }
- }
-
- // }}}
// {{{ function subscribe
function subscribe($forlife, $uid, $promo, $pass)
if ($search) {
$page->assign('dynamap_vars', $search);
}
-
- $page->assign('use_map', $globals->geoloc->use_map());
}
function handler_icon(&$page)
header("Content-type: application/x-shockwave-flash");
- if ($globals->geoloc->use_map()) {
+ if ($globals->geoloc->use_map) {
readfile($globals->geoloc->icon_path);
exit;
}
header("Content-type: application/x-shockwave-flash");
- if ($globals->geoloc->use_map()) {
+ if ($globals->geoloc->use_map) {
readfile($globals->geoloc->dynamap_path);
exit;
}
$page->assign('advanced',1);
$page->assign('public_directory',0);
- $page->assign('use_map', $globals->geoloc->use_map());
if (!Env::has('rechercher')) {
$this->form_prepare();
Aujourd'hui {$localises} de nos camarades sont localisés grâce à leurs adresses personnelles.
</p>
{/if}
-{if $use_map}
+{if $globals->geoloc->use_map}
<p class="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="600" height="450" id="dynamap" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
f.submit();
}
{/literal}</script>
- {if $use_map}
+ {if $globals->geoloc->use_map}
<input type="button" value="Voir les résultats sur une carte" onclick="launch_form('geoloc/')"/>
{/if}
<input type="button" value="Chercher" onclick="launch_form('search/adv')"/>
{if $search_results_nb==0}Aucune{else}{$search_results_nb}{/if} réponse{if $search_results_nb>1}s{/if}.
</h1>
- {if $search_results_nb and $advanced and !$simple and $use_map}
+ {if $search_results_nb and $advanced and !$simple and $globals->geoloc->use_map}
<p>
[<a href='geoloc/?{$search_vars}'>Voir la recherche sur une carte</a>].
</p>
<div class="menu_title">Communauté X</div>
<div class="menu_item"><a href="search">Annuaire</a></div>
-{if $globals->geoloc->use_map()}
+{if $globals->geoloc->use_map}
<div class="menu_item"><a href="geoloc">Planisphère</a></div>
{/if}
<div class="menu_item"><a href="trombi">Trombi promo</a></div>