- return PL_NOT_FOUND;
- }
-
- function handler_init(&$page)
- {
- global $globals;
-
- new_nonhtml_page('geoloc/geolocInit.tpl', AUTH_COOKIE);
-
- header('Content-type: text/xml');
- $page->assign('querystring', $this->_make_qs());
-
- return PL_OK;
- }
-
- function handler_city(&$page)
- {
- global $globals;
-
- header("Content-type: text/xml");
-
- new_nonhtml_page('geoloc/getCityInfos.tpl', AUTH_COOKIE);
- // to debug sql use the next line
- //new_skinned_page('', AUTH_COOKIE);
-
- require_once('geoloc.inc.php');
- require_once('search.inc.php');
-
- $usual_fields = advancedSearchFromInput();
- $fields = new SFieldGroup(true, $usual_fields);
- $where = $fields->get_where_statement();
- if ($where) $where = "WHERE ".$where;
-
- $users = $globals->xdb->iterator("
- SELECT u.user_id AS id, u.prenom, u.nom, u.promo
- FROM adresses AS a
- INNER JOIN auth_user_md5 AS u ON(u.user_id = a.uid)
- INNER JOIN auth_user_quick AS q ON(q.user_id = a.uid)
- ".$fields->get_select_statement()."
- ".$where."
- GROUP BY u.user_id LIMIT 11", $id);
-
- $page->assign('users', $users);
-
- return PL_OK;
- }
-
- function handler_data(&$page)
- {
- global $globals;
-
- // to debug sql use the next line
- if (Env::has('debug')) {
- $page->changeTpl('geoloc/getData.tpl');
- $page->assign('simple', true);
- } else {
- header("Content-type: text/xml");
- new_nonhtml_page('geoloc/getData.tpl', AUTH_COOKIE);