X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile.php;h=3755368643e0323f783f21c885f5f1205a9ee040;hb=5841308dadbbf7df3427fe92ef4435f19105bc5d;hp=f7668443bdcb0f489f9dfdd0ba7e9fd281729380;hpb=ff3eb9b7ade4406804e721579111384a768e7791;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index f766844..3755368 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -30,11 +30,13 @@ class ProfileModule extends PLModule 'fiche.php' => $this->make_hook('fiche', AUTH_PUBLIC), 'profile' => $this->make_hook('profile', AUTH_PUBLIC), 'profile/private' => $this->make_hook('profile', AUTH_COOKIE), + 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'), 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP), 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP), 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP), 'referent' => $this->make_hook('referent', AUTH_COOKIE), + 'emploi' => $this->make_hook('ref_search', AUTH_COOKIE), 'referent/search' => $this->make_hook('ref_search', AUTH_COOKIE), 'referent/ssect' => $this->make_hook('ref_sect', AUTH_COOKIE, 'user', NO_AUTH), 'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH), @@ -185,7 +187,7 @@ class ProfileModule extends PLModule $new = Env::v('modif') == 'new'; $user = get_user_details($login, S::v('uid'), $view); $user['freetext'] = MiniWiki::WikiToHTML($user['freetext']); - $user['cv'] = MiniWiki::WikiToHTML($user['cv']); + $user['cv'] = MiniWiki::WikiToHTML($user['cv'], true); $title = $user['prenom'] . ' ' . empty($user['nom_usage']) ? $user['nom'] : $user['nom_usage']; $page->assign('xorg_title', $title); @@ -235,6 +237,24 @@ class ProfileModule extends PLModule header('Last-Modified: ' . date('r', strtotime($user['date']))); } + function handler_ax(&$page, $user = null) + { + require_once 'user.func.inc.php'; + $user = get_user_forlife($user); + if (!$user) { + return PL_NOT_FOUND; + } + $res = XDB::query('SELECT matricule_ax + FROM auth_user_md5 AS u + INNER JOIN aliases AS a ON (a.type = "a_vie" AND a.id = u.user_id) + WHERE a.alias = {?}', $user); + $mat = $res->fetchOneCell(); + if (!intval($mat)) { + $page->kill("Le matricule AX de $user est inconnu"); + } + http_redirect("http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&anc_id=$mat"); + } + function handler_p_edit(&$page, $opened_tab = 'general') { global $globals; @@ -455,7 +475,7 @@ class ProfileModule extends PLModule $page->assign('prenom', $prenom); $page->assign('nom', $nom); $page->assign('promo', $promo); - $page->assign('cv', $cv); + $page->assign('cv', MiniWiki::WikiToHTML($cv, true)); $page->assign('bestalias', $bestalias); $page->assign('adr_pro', get_user_details_pro($user_id)); @@ -493,6 +513,8 @@ class ProfileModule extends PLModule function handler_ref_search(&$page, $action = null, $subaction = null) { + require_once 'wiki.inc.php'; + wiki_require_page('Docs.Emploi'); $page->assign('xorg_title', 'Polytechnique.org - Conseil Pro'); //recuperation des noms de secteurs @@ -546,7 +568,7 @@ class ProfileModule extends PLModule function handler_ref_sect(&$page, $sect) { header('Content-Type: text/html; charset=utf-8'); - $page->changeTpl('include/select.field.tpl', NO_SKIN); + $page->changeTpl('include/field.select.tpl', NO_SKIN); $page->assign('onchange', 'setSSecteurs()'); $page->assign('id', 'ssect_field'); $page->assign('name', 'ss_secteur'); @@ -559,7 +581,7 @@ class ProfileModule extends PLModule function handler_ref_country(&$page, $sect, $ssect = '') { header('Content-Type: text/html; charset=utf-8'); - $page->changeTpl('include/select.field.tpl', NO_SKIN); + $page->changeTpl('include/field.select.tpl', NO_SKIN); $page->assign('name', 'pays_sel'); $where = ($ssect ? ' AND ms.ss_secteur = {?}' : ''); $it = XDB::iterator("SELECT a2 AS id, pays AS field