'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/sector' => $this->make_hook('ajax_sector', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/sub_sector' => $this->make_hook('ajax_sub_sector', AUTH_COOKIE, 'user', NO_AUTH),
+ 'profile/ajax/alternates' => $this->make_hook('ajax_alternates', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/searchname' => $this->make_hook('ajax_searchname', AUTH_COOKIE, 'user', NO_AUTH),
'profile/ajax/buildnames' => $this->make_hook('ajax_buildnames', AUTH_COOKIE, 'user', NO_AUTH),
'referent/country' => $this->make_hook('ref_country', AUTH_COOKIE, 'user', NO_AUTH),
'groupes-x' => $this->make_hook('xnet', AUTH_COOKIE),
+ 'groupes-x/logo' => $this->make_hook('xnetlogo', AUTH_PUBLIC),
'vcard' => $this->make_hook('vcard', AUTH_COOKIE, 'user', NO_HTTPS),
'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'),
'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'),
'admin/networking' => $this->make_hook('admin_networking', AUTH_MDP, 'admin'),
'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'),
- 'admin/fonctions' => $this->make_hook('admin_fonctions', AUTH_MDP, 'admin'),
+ 'admin/sectors' => $this->make_hook('admin_sectors', AUTH_MDP, 'admin'),
'admin/corps_enum' => $this->make_hook('admin_corps_enum', AUTH_MDP, 'admin'),
'admin/corps_rank' => $this->make_hook('admin_corps_rank', AUTH_MDP, 'admin'),
'admin/names' => $this->make_hook('admin_names', AUTH_MDP, 'admin'),
-
);
}
if (!intval($mat)) {
$page->kill("Le matricule AX de {$user->login()} est inconnu");
}
- http_redirect("http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&anc_id=$mat");
+ http_redirect("http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&ancc_id=$mat");
}
- function handler_p_edit(&$page, $opened_tab = null, $mode = null)
+ function handler_p_edit(&$page, $opened_tab = null, $mode = null, $success = null)
{
global $globals;
}
$page->setTitle('Mon Profil');
+ if (isset($success) && $success) {
+ $page->trigSuccess('Ton profil a bien été mis à jour.');
+ }
}
function handler_education_js(&$page)
$page->assign('i', $id);
$page->assign('job', array());
$page->assign('new', true);
- $res = XDB::query("SELECT id, name
+ $res = XDB::query("SELECT id, name AS label
FROM profile_job_sector_enum");
$page->assign('sectors', $res->fetchAllAssoc());
- $res = XDB::query("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) AS title
- FROM fonctions_def
- ORDER BY id");
- $page->assign('fonctions', $res->fetchAllAssoc());
require_once "emails.combobox.inc.php";
fill_email_combobox($page);
}
$page->assign('sel', $sssect);
}
+ function handler_ajax_alternates(&$page, $id, $sssect)
+ {
+ header('Content-Type: text/html; charset=utf-8');
+ $res = XDB::iterator('SELECT name
+ FROM profile_job_alternates
+ WHERE subsubsectorid = {?}
+ ORDER BY id',
+ $sssect);
+ $page->changeTpl('profile/jobs.alternates.tpl', NO_SKIN);
+ $alternate = $res->next();
+ $alternates = $alternate['name'];
+ while ($alternate = $res->next()) {
+ $alternates .= ', ' . $alternate['name'];
+ }
+ $page->assign('alternates', $alternates);
+ }
+
function handler_ajax_skill(&$page, $cat, $id)
{
header('Content-Type: text/html; charset=utf-8');
$page->assign('assos', $req->fetchAllAssoc());
}
+ function handler_xnetlogo(&$page, $id)
+ {
+ if (is_null($id)) {
+ return PL_NOT_FOUND;
+ }
+
+ $res = XDB::query('SELECT logo, logo_mime
+ FROM groupex.asso
+ WHERE id = {?}', $id);
+ list($logo, $logo_mime) = $res->fetchOneRow();
+
+ if (!empty($logo)) {
+ header("Content-type: $mime");
+ echo $logo;
+ } else {
+ header('Content-type: image/jpeg');
+ readfile(dirname(__FILE__) . '/../htdocs/images/dflt_carre.jpg');
+ }
+
+ exit;
+ }
+
function handler_vcard(&$page, $x = null)
{
if (is_null($x)) {
$table_editor->describe('text','intitulé',true);
$table_editor->apply($page, $action, $id);
}
- function handler_admin_fonctions(&$page, $action = 'list', $id = null) {
- $page->setTitle('Administration - Fonctions');
- $page->assign('title', 'Gestion des fonctions');
- $table_editor = new PLTableEditor('admin/fonctions', 'fonctions_def', 'id', true);
- $table_editor->describe('fonction_fr', 'intitulé', true);
- $table_editor->describe('fonction_en', 'intitulé (ang)', true);
- $table_editor->describe('flags', 'titre', true);
+ function handler_admin_sectors(&$page, $action = 'list', $id = null) {
+ $page->setTitle('Administration - Secteurs');
+ $page->assign('title', 'Gestion des secteurs');
+ $table_editor = new PLTableEditor('admin/sectors', 'profile_job_subsubsector_enum', 'id', true);
+ $table_editor->describe('sectorid', 'id du secteur', false);
+ $table_editor->describe('subsectorid', 'id du sous-secteur', false);
+ $table_editor->describe('name', 'nom', true);
+ $table_editor->describe('flags', 'affichage', true);
$table_editor->apply($page, $action, $id);
}
function handler_admin_networking(&$page, $action = 'list', $id = null) {