load_js(); } public function process(){ global $base_path,$msg; global $empty_pwd,$ext_pwd; global $action; global $callback_func; global $callback_url,$new_tab; $this->callback_func = $callback_func; $this->callback_url = $callback_url; $this->new_tab = $new_tab; switch($action){ case 'check_auth' : //On tente la connexion // si paramétrage authentification particulière $empty_pwd=true; $ext_auth=false; if (file_exists($base_path.'/includes/ext_auth.inc.php')) { $file_orig="empr.php"; require_once($base_path.'/includes/ext_auth.inc.php'); } $log_ok = connexion_empr(); if($log_ok){ //réussie, on poursuit le tout... $this->success_callback(); }else{ print $this->get_form($msg['auth_failed']); } break; case 'get_form' : default : if(!$_SESSION['user_code']){ print $this->get_form(); }else{ $this->success_callback(); } break; } } public function success_callback(){ $html = " "; print $html; } public function load_js(){ global $include_path; // print ""; } public function show_form(){ print "
". genere_form_connexion_empr(true)."
"; print " "; } public function get_form($message=""){ global $base_path,$charset; global $opac_websubscribe_show,$opac_password_forgotten_show,$msg; if(!$message){ $message = $msg["need_auth"]; } $form= "

".$message."



   "; $form.="
"; if($opac_password_forgotten_show) $form.="".$msg["mdp_forgotten"].""; if ($opac_websubscribe_show) $form .= "
".$msg["subs_not_yet_subscriber"].""; $form.="
"; return $form; } }