X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile.php;h=ccbd047a86aa29c52ea2fa54e2cd325f63734dc9;hb=2dcac0f527e8207d754af8974d81b2bce3f433d9;hp=2e4d29e83ab24fea634303e12cdb977094cc9c0b;hpb=77842972c12563954727e415c9f236e8d159eb96;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index 2e4d29e..ccbd047 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -33,8 +33,10 @@ class ProfileModule extends PLModule 'profile/ax' => $this->make_hook('ax', AUTH_COOKIE, 'admin'), 'profile/edit' => $this->make_hook('p_edit', AUTH_MDP), 'profile/ajax/address' => $this->make_hook('ajax_address', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH), - 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/tel' => $this->make_hook('ajax_tel', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/medal' => $this->make_hook('ajax_medal', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH), 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC), 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP), 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP), @@ -371,6 +373,26 @@ class ProfileModule extends PLModule $page->assign('ajaxdeco', true); } + function handler_ajax_job(&$page, $id) + { + $page->changeTpl('profile/jobs.job.tpl', NO_SKIN); + $page->assign('i', $id); + $page->assign('job', array()); + $page->assign('ajaxjob', true); + $page->assign('new', true); + } + + function handler_ajax_secteur(&$page, $id, $sect, $ssect = -1) + { + $res = XDB::iterator("SELECT id, label + FROM emploi_ss_secteur + WHERE secteur = {?}", $sect); + $page->changeTpl('profile/jobs.secteur.tpl', NO_SKIN); + $page->assign('id', $id); + $page->assign('ssecteurs', $res); + $page->assign('sel', $ssect); + } + function handler_p_orange(&$page) { $page->changeTpl('profile/orange.tpl');