id){ $opac_view_class->set_parameters(); $opac_view_filter_class=$opac_view_class->opac_filters; $_SESSION["opac_view"]=$opac_view_class->id; }else { $_SESSION["opac_view"]=0; } $css=$_SESSION["css"]=$opac_default_style; // } } require_once($base_path."/includes/notice_authors.inc.php"); require_once($base_path."/includes/notice_categories.inc.php"); require_once($base_path."/includes/check_session_time.inc.php"); // récupération localisation require_once($base_path.'/includes/localisation.inc.php'); // version actuelle de l'opac require_once($base_path.'/includes/opac_version.inc.php'); // fonctions de gestion de formulaire require_once($base_path.'/includes/javascript/form.inc.php'); require_once($base_path.'/includes/templates/common.tpl.php'); require_once($base_path.'/includes/divers.inc.php'); // classe de gestion des catégories require_once($base_path.'/classes/categorie.class.php'); require_once($base_path.'/classes/notice.class.php'); require_once($base_path.'/classes/notice_display.class.php'); // classe indexation interne require_once($base_path.'/classes/indexint.class.php'); // classe d'affichage des tags require_once($base_path.'/classes/tags.class.php'); // classe de gestion des réservations require_once($base_path.'/classes/resa.class.php'); // pour l'affichage correct des notices require_once($base_path."/includes/templates/notice.tpl.php"); require_once($base_path."/includes/navbar.inc.php"); require_once($base_path."/includes/explnum.inc.php"); require_once($base_path."/includes/notice_affichage.inc.php"); require_once($base_path."/includes/bulletin_affichage.inc.php"); // autenticazione LDAP - by MaxMan require_once($base_path."/includes/ldap_auth.inc.php"); // RSS require_once($base_path."/includes/includes_rss.inc.php"); // pour fonction de formulaire de connexion require_once($base_path."/includes/empr.inc.php"); // pour fonction de vérification de connexion require_once($base_path.'/includes/empr_func.inc.php'); //pour la gestion des tris require_once($base_path."/classes/sort.class.php"); require_once($base_path."/classes/suggestions.class.php"); if(file_exists($base_path."/includes/empr_extended.inc.php"))require_once($base_path."/includes/empr_extended.inc.php"); // 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'); } //Vérification de la session $log_ok=connexion_empr(); if($first_log && $_SESSION["opac_view"]){ if($opac_show_login_form_next) print ""; else print ""; exit; } // connexion en cours et paramètre de rebond ailleurs que sur le compte emprunteur if (($opac_show_login_form_next) && ($login) && ($first_log)) die (""); if ($is_opac_included) { $std_header = $inclus_header ; $footer = $inclus_footer ; } //Enrichissement OPAC if($opac_notice_enrichment){ require_once($base_path."/classes/enrichment.class.php"); $enrichment = new enrichment(); $std_header = str_replace("!!enrichment_headers!!",$enrichment->getHeaders(),$std_header); }else $std_header = str_replace("!!enrichment_headers!!","",$std_header); // si $opac_show_homeontop est à 1 alors on affiche le lien retour à l'accueil sous le nom de la bibliothèque dans la fiche empr if ($opac_show_homeontop==1) $std_header= str_replace("!!home_on_top!!",$home_on_top,$std_header); else $std_header= str_replace("!!home_on_top!!","",$std_header); // mise à jour du contenu opac_biblio_main_header $std_header= str_replace("!!main_header!!",$opac_biblio_main_header,$std_header); // RSS $std_header= str_replace("!!liens_rss!!",genere_link_rss(),$std_header); // l'image $logo_rss_si_rss est calculée par genere_link_rss() en global $liens_bas = str_replace("",$logo_rss_si_rss,$liens_bas); if($opac_parse_html || $cms_active){ ob_start(); } print $std_header; require_once ($base_path.'/includes/navigator.inc.php'); require_once($class_path."/serialcirc_empr.class.php"); if ($opac_empr_code_info) print $opac_empr_code_info; if (!$tab) { switch($lvl) { case 'change_password': case 'valid_change_password': case 'message': $tab='account'; break; case 'all': case 'old': case 'late': case 'pret': case 'retour': $tab='loan'; break; case 'resa': case 'resa_planning': $tab='reza'; break; case 'bannette': case 'bannette_gerer': case 'bannette_creer': $tab='dsi'; break; case 'make_sugg': case 'make_multi_sugg': case 'import_sugg': case 'transform_to_sugg': case 'valid_sugg': case 'view_sugg': case 'suppr_sugg': $tab='sugg'; break; case 'private_list': case 'public_list': $tab='lecture'; break; case 'demande_list': case 'do_dmde': case 'list_dmde': $tab='request'; break; default: $tab='account'; break; } } if ($log_ok) { require_once($base_path."/empr/empr.inc.php"); /* Affichage du bandeau action en bas de la page. A externaliser dans le template */ $empr_onglet_menu = "
"; print $empr_onglet_menu; $subitems = "
!!subonglet!!
"; switch($tab){ case 'loan': //Mes prêts $loan_item=""; $subitems = str_replace("!!subonglet!!",$loan_item,$subitems); break; case 'reza': //Mes resa $resa_item=""; $subitems = str_replace("!!subonglet!!",$resa_item,$subitems); break; case 'dsi': //Mes abonnements $abo_item =""; $subitems = str_replace("!!subonglet!!",$abo_item,$subitems); break; case 'sugg': //Mes suggestions if ($opac_show_suggest && $allow_sugg) { $sugg_onglet=" "; } $subitems = str_replace("!!subonglet!!",$sugg_onglet,$subitems); break; case 'lecture': //Mes listes de lecture if($opac_shared_lists && $allow_liste_lecture){ $liste_onglet = " "; } $subitems = str_replace("!!subonglet!!",$liste_onglet,$subitems); break; case 'request': //Mes demandes de recherche if($demandes_active && $opac_demandes_active && $allow_dema){ $demandes_onglet =" "; } $subitems = str_replace("!!subonglet!!",$demandes_onglet,$subitems); break; case "serialcirc" : if($opac_serialcirc_active){ $nb_virtual = count(serialcirc_empr::get_virtual_abo()); $serialcirc_submenu = " "; $subitems = str_replace("!!subonglet!!",$serialcirc_submenu,$subitems); break; } default: if (function_exists('empr_extended_tab_default')){ if(empr_extended_tab_default($tab))break; } //Mon Compte $my_account_item = ""; $subitems = str_replace("!!subonglet!!",$my_account_item,$subitems); break; } print $subitems; switch($lvl) { case 'change_password': $change_password_checked =" checked"; require_once($base_path.'/empr/change_password.inc.php'); break; case 'valid_change_password': $change_password_checked =" checked"; require_once($base_path.'/empr/valid_change_password.inc.php'); break; case 'message': $message_checked =" checked"; require_once($base_path.'/empr/message.inc.php'); break; case 'all': $all_checked =" checked"; print "
\n"; print "

$msg[empr_loans]

"; $critere_requete=" AND empr.empr_login='$login' order by pret_retour "; require_once($base_path.'/empr/all.inc.php'); print "
"; break; case 'old': print "
\n"; print "

$msg[empr_loans_old]

"; require_once($base_path.'/empr/old.inc.php'); print "
\n"; break; case 'resa': print "
\n"; if ($allow_book) include($base_path.'/includes/resa.inc.php'); else print $msg[empr_no_allow_book]; print "
"; break; case 'resa_planning': include($base_path.'/includes/resa_planning.inc.php'); break; case 'bannette': print "
\n"; if ($allow_dsi_priv || $allow_dsi) require_once($base_path.'/includes/bannette.inc.php'); else print $msg[empr_no_allow_dsi]; print "
"; break; case 'bannette_gerer': print "
\n"; if ($allow_dsi_priv || $allow_dsi) require_once($base_path.'/includes/bannette_gerer.inc.php'); else print $msg[empr_no_allow_dsi]; print "
"; break; case 'bannette_creer': print "
\n"; if ($allow_dsi_priv) require_once($base_path.'/includes/bannette_creer.inc.php'); else print $msg[empr_no_allow_dsi_priv]; print "
"; break; case 'make_sugg': print "
\n"; if ($allow_sugg) require_once($base_path.'/empr/make_sugg.inc.php'); else print $msg[empr_no_allow_sugg]; print "
"; break; case 'make_multi_sugg': print "
\n"; if ($allow_sugg){ require_once($base_path.'/empr/make_multi_sugg.inc.php'); } else print $msg[empr_no_allow_sugg]; print "
"; break; case 'import_sugg': print "
\n"; if ($allow_sugg){ require_once($base_path.'/empr/import_sugg.inc.php'); } else print $msg[empr_no_allow_sugg]; print "
"; break; case 'transform_to_sugg': print "
\n"; if ($allow_sugg){ require_once($base_path.'/empr/make_multi_sugg.inc.php'); } else print $msg[empr_no_allow_sugg]; print "
"; break; case 'valid_sugg': print "
\n"; if ($allow_sugg) require_once($base_path.'/empr/valid_sugg.inc.php'); else print $msg[empr_no_allow_sugg]; print "
"; break; case 'view_sugg': print "
\n"; require_once($base_path.'/empr/view_sugg.inc.php'); print "
"; break; case 'suppr_sugg': print "
\n"; if ($allow_sugg && $id_sug){ suggestions::delete($id_sug); } print "
"; break; case 'private_list': case 'public_list': case 'demande_list': print "
\n"; require_once($base_path.'/empr/liste_lecture.inc.php'); print "
"; break; case 'do_dmde': print "
\n"; if ($allow_dema) require_once($base_path.'/empr/make_demande.inc.php'); else print $msg[empr_no_allow_dema]; print "
"; break; case 'list_dmde': print "
\n"; if ($allow_dema) require_once($base_path.'/empr/liste_demande.inc.php'); else print $msg[empr_no_allow_dema]; print "
"; break; case 'late': print "
\n"; print "

$msg[empr_late]

"; $critere_requete=" AND pret_retour < '".date('Y-m-d')."' AND empr.empr_login='$login' order by pret_retour "; require_once($base_path.'/empr/all.inc.php'); print "
\n"; break; case 'pret': print "
\n"; print "

".$msg["empr_checkout_title"]."

"; require_once($base_path.'/empr/self_checkout.inc.php'); print "
"; break; case 'retour': print "
\n"; print "

".$msg["empr_checkin_title"]."

"; require_once($base_path.'/empr/self_checkin.inc.php'); print "
"; break; //circulation des périos case "list_abo" : case "list_virtual_abo": case "add_resa": case "copy": case "point": case "ask" : if($opac_serialcirc_active){ print "
"; require_once($base_path.'/empr/serialcirc.inc.php'); print "
"; break; } default: if (function_exists('empr_extended_lvl_default')){ if(empr_extended_lvl_default($lvl))break; } print pmb_bidi($empr_identite); break; } } else { // Si la connexion n'a pas pu être établie switch ($erreur_connexion) { case "1": //L'abonnement du lecteur est expiré print "
".$msg["empr_expire"]."


"; break; case "2": //Le statut de l'abonné ne l'autorise pas à se connecter print "
".$msg["empr_connexion_interdite"]."


"; break; case "3": //Erreur de saisi du mot de passe ou du login ou de connexion avec le ldap print "
".$msg["empr_bad_login"]."


"; break; default: //La session est expiré print "
".sprintf($msg["session_expired"],round($opac_duration_session_auth/60))."


"; break; } } if ($erreur_session) print $erreur_session ; //insertions des liens du bas dans le $footer si $opac_show_liensbas if ($opac_show_liensbas==1) $footer = str_replace("!!div_liens_bas!!",$liens_bas,$footer); else $footer = str_replace("!!div_liens_bas!!","",$footer); //affichage du bandeau de gauche si $opac_show_bandeaugauche = 1 if ($opac_show_bandeaugauche==0) { $footer= str_replace("!!contenu_bandeau!!","",$footer); } else { $footer = str_replace("!!contenu_bandeau!!","
!!contenu_bandeau!!
",$footer); $home_on_left=str_replace("!!welcome_page!!",$msg["welcome_page"],$home_on_left); $adresse=str_replace("!!common_tpl_address!!",$msg["common_tpl_address"],$adresse); $adresse=str_replace("!!common_tpl_contact!!",$msg["common_tpl_contact"],$adresse); // loading the languages avaiable in OPAC - martizva >> Eric require_once($base_path.'/includes/languages.inc.php'); $home_on_left = str_replace("!!common_tpl_lang_select!!", show_select_languages("empr.php"), $home_on_left); if (!$_SESSION["user_code"]) { $loginform=str_replace('',$msg["common_tpl_login_invite"],$loginform); $loginform__ = genere_form_connexion_empr(); } else { $loginform__.="".$empr_prenom." ".$empr_nom."
\n"; $loginform__.="".$msg["empr_my_account"]."
".$msg["empr_logout"].""; } $loginform = str_replace("!!login_form!!",$loginform__,$loginform); $footer= str_replace("!!contenu_bandeau!!",$home_on_left.$loginform.$meteo.$adresse,$footer); } $cms_build_info=""; if($cms_build_activate || $_SESSION["cms_build_activate"]){ // issu de la gestion if($pageid){ require_once($base_path."/classes/cms/cms_pages.class.php"); $page= new cms_page($pageid); $cms_build_info['page']=$page->get_env(); } global $log, $infos_notice, $infos_expl, $nb_results_tab; $cms_build_info['input']="index.php"; $cms_build_info['session']=$_SESSION; $cms_build_info['post']=$_POST; $cms_build_info['get']=$_GET; $cms_build_info['lvl']=$lvl; $cms_build_info['tab']=$tab; $cms_build_info['log']=$log; $cms_build_info['infos_notice']=$infos_notice; $cms_build_info['infos_expl']=$infos_expl; $cms_build_info['nb_results_tab']=$nb_results_tab; $cms_build_info['search_type_asked']=$search_type_asked; $cms_build_info=rawurlencode(serialize($cms_build_info)); $cms_build_info= ""; $cms_build_info.=" "; $_SESSION["cms_build_activate"]="1"; } $footer=str_replace("!!cms_build_info!!",$cms_build_info,$footer); print $footer; // LOG OPAC global $pmb_logs_activate; if($pmb_logs_activate){ global $log, $infos_notice, $infos_expl; $rqt= " select empr_prof,empr_cp, empr_ville as ville, empr_year, empr_sexe, empr_date_adhesion, empr_date_expiration, count(pret_idexpl) as nbprets, count(resa.id_resa) as nbresa, code.libelle as codestat, es.statut_libelle as statut, categ.libelle as categ, gr.libelle_groupe as groupe,dl.location_libelle as location from empr e left join empr_codestat code on code.idcode=e.empr_codestat left join empr_statut es on e.empr_statut=es.idstatut left join empr_categ categ on categ.id_categ_empr=e.empr_categ left join empr_groupe eg on eg.empr_id=e.id_empr left join groupe gr on eg.groupe_id=gr.id_groupe left join docs_location dl on e.empr_location=dl.idlocation left join resa on e.id_empr=resa_idempr left join pret on e.id_empr=pret_idempr where e.empr_login='".addslashes($login)."' group by resa_idempr, pret_idempr"; $res=mysql_query($rqt); if($res){ $empr_carac = mysql_fetch_array($res); $log->add_log('empr',$empr_carac); } $log->add_log('num_session',session_id()); $log->add_log('expl',$infos_expl); $log->add_log('docs',$infos_notice); //Enregistrement multicritere global $search; if($search) { $search_stat = new search(); $log->add_log('multi_search', $search_stat->serialize_search()); $log->add_log('multi_human_query', $search_stat->make_human_query()); } $log->save(); } if($opac_parse_html || $cms_active){ $htmltoparse= parseHTML(ob_get_contents()); ob_end_clean(); if($cms_active) { require_once($base_path."/classes/cms/cms_build.class.php"); $cms=new cms_build(); $htmltoparse = $cms->transform_html($htmltoparse); } print $htmltoparse; } /* Fermeture de la connexion */ mysql_close($dbh); ?>