/** * Retourne l'identifiant de la notice cliquée ou développée */ function aff_notice_id($param, $parser) { $notice = get_info_notice($param, $parser); return $notice['notice_id']; }
/** * Fonction qui permet de classifier le sous type des pages selon un code */ function aff_sous_type_page($param, $parser) { $post = get_var_post($param, $parser); $get = get_var_get($param, $parser); $notice = get_info_notice($param, $parser); //récuperation des différentes variables nécessaires à l'identification des pages if ($post['lvl']) { $niveau = $post['lvl']; } elseif ($get['lvl']) { $niveau = $get['lvl']; } else { $niveau = ''; } //type recherche if ($post['search_type_asked']) { $type = $post['search_type_asked']; } elseif ($get['search_type_asked']) { $type = $get['search_type_asked']; } else { $type = ''; } //pour recherche prédéfinie if ($post['onglet_persopac']) { $perso = $post['onglet_persopac']; } elseif ($get['onglet_persopac']) { $perso = $get['onglet_persopac']; } else { $perso = ''; } //pour les types d'autorité if ($post['mode']) { $mode = $post['mode']; } elseif ($get['mode']) { $mode = $get['mode']; } else { $mode = ''; } //nivo biblio if ($notice['niveau_biblio']) { $biblio = $notice['niveau_biblio']; } else { $biblio = ''; } //suggestion if ($get['oresa']) { $sugg = $get['oresa']; } else { $url_ref = aff_url_ori($param, $parser); $sugg = strpos($url_ref, 'oresa=popup'); } //pour le panier if ($post['action']) { $action = $post['action']; } elseif ($get['action']) { $action = $get['action']; } else { $action = ''; } //url $url = aff_url_asked($param, $parser); //Avis et tags if (strpos($url, 'avis.php') && strpos($url, 'liste')) { return '1301'; } elseif (strpos($url, 'avis.php') && strpos($url, 'add')) { return '1302'; } elseif (strpos($url, 'addtags.php')) { return '1201'; } //Document numérique if (strpos($url, 'doc_num.php') || strpos($url, 'doc_num_data.php')) { return '2001'; } elseif (strpos($url, 'visionneuse.php')) { return '2002'; } $search_type = ''; switch ($niveau) { case 'author_see': $search_type = '501'; break; case 'categ_see': $search_type = '503'; break; case 'indexint_see': $search_type = '507'; break; case 'coll_see': $search_type = '505'; break; case 'more_results': switch ($mode) { case 'titre': case 'title': $search_type = '301'; break; case 'tous': $search_type = '302'; break; case 'docnum': $search_type = '303'; break; case 'auteur': $search_type = '401'; break; case 'editeur': $search_type = '402'; break; case 'categorie': $search_type = '403'; break; case 'titre_uniforme': $search_type = '404'; break; case 'collection': $search_type = '405'; break; case 'souscollection': $search_type = '406'; break; case 'indexint': $search_type = '407'; break; case 'keyword': $search_type = '408'; break; case 'abstract': $search_type = '409'; break; case 'extended': $search_type = '102'; break; case 'external': $search_type = '104'; break; default: break; } break; case 'notice_display': switch ($biblio) { case 's': $search_type = '602'; break; case 'b': $search_type = '603'; break; case 'a': $search_type = '604'; break; default: $search_type = '601'; break; } break; case 'bulletin_display': $search_type = '603'; break; case 'publisher_see': $search_type = '502'; break; case 'titre_uniforme_see': $search_type = '504'; break; case 'serie_see': $search_type = '508'; break; case 'search_result': switch ($type) { case 'external_search': $search_type = '204'; break; case 'term_search': $search_type = '203'; break; case 'extended_search': if ($perso) { $search_type = '206'; } else { $search_type = '202'; } break; case 'search_perso': $search_type = '206'; break; case 'tags_search': $search_type = '205'; break; case 'simple_search': $search_type = '201'; break; default: $search_type = '207'; break; } break; case 'subcoll_see': $search_type = '506'; break; case 'search_history': $search_type = '901'; break; case 'etagere_see': $search_type = '1001'; break; case 'etageres_see': $search_type = '1002'; break; case 'show_cart': $search_type = '801'; break; case 'resa_cart': $search_type = '804'; break; case 'section_see': $search_type = '1601'; break; case 'rss_see': $search_type = '1501'; break; case 'doc_command': $search_type = '1901'; break; case 'sort': $search_type = '1701'; break; case 'lastrecords': $search_type = '303'; break; case 'authperso_see': $search_type = '2101'; break; case 'information': $search_type = '1801'; break; case 'infopages': $search_type = '1101'; break; case 'extend': $search_type = '2601'; break; case 'perio_a2z_see': $search_type = '2201'; break; case 'cmspage': // pageid if (strpos($url, 'pageid')) { //sous-type commence par 25 suivi de l'identifiant de la page if (strpos(substr($url, strpos($url, 'pageid') + 7), '&')) { $search_type = "25" . str_pad(substr($url, strpos($url, 'pageid') + 7, strpos(substr($url, strpos($url, 'pageid') + 7), '&')), 2, "0", STR_PAD_LEFT); } else { $search_type = "25" . str_pad(substr($url, strpos($url, 'pageid') + 7), 2, "0", STR_PAD_LEFT); } } else { $search_type = "2500"; } break; case 'bannette_see': $search_type = '2301'; break; case "faq": $search_type = '2401'; break; case 'index': switch ($type) { case 'external_search': $search_type = '104'; break; case 'term_search': $search_type = '103'; break; case 'extended_search': if ($perso) { $search_type = '106'; } else { $search_type = '102'; } break; case 'search_perso': $search_type = '106'; break; case 'tags_search': $search_type = '105'; break; case 'simple_search': $search_type = '101'; break; default: $search_type = '107'; break; } break; case 'change_password': $search_type = '704'; break; case 'valid_change_password': $search_type = '705'; break; case 'message': //$type_page=$page['empr']; break; case 'all': $search_type = '702'; break; case 'old': $search_type = '719'; break; case 'pret': $search_type = '720'; break; case 'retour': $search_type = '721'; break; case 'resa': $search_type = '703'; break; case 'resa_planning': $search_type = '724'; break; case 'bannette': $search_type = '706'; break; case 'bannette_gerer': $search_type = '707'; break; case 'bannette_creer': $search_type = '708'; break; case 'make_sugg': if ($sugg) { $search_type = '1401'; } else { $search_type = '709'; } break; case 'valid_sugg': if ($sugg) { $search_type = '1402'; } else { $search_type = '710'; } break; case 'view_sugg': $search_type = '711'; break; case 'late': $search_type = '701'; break; case 'make_multi_sugg': $search_type = '712'; break; case 'import_sugg': $search_type = '722'; break; case 'transform_to_sugg': $search_type = '723'; break; case 'private_list': $search_type = '713'; break; case 'public_list': $search_type = '714'; break; case 'demande_list': $search_type = '715'; break; case 'do_dmde': $search_type = '717'; break; case 'list_dmde': $search_type = '718'; break; case 'cart': switch ($action) { case 'print_cart': $search_type = '802'; break; default: $search_type = '801'; break; } break; case 'list': switch ($action) { case 'print_list': $search_type = '716'; break; } break; default: switch ($type) { case 'external_search': $search_type = '104'; break; case 'term_search': $search_type = '103'; break; case 'extended_search': if ($perso) { $search_type = '106'; } else { $search_type = '102'; } break; case 'search_perso': $search_type = '106'; break; case 'tags_search': $search_type = '105'; break; case 'simple_search': $search_type = '101'; break; default: $search_type = '107'; break; } if ($action == 'export') { $search_type = '803'; } break; } return $search_type; }