当前位置: 首页>>代码示例>>PHP>>正文


PHP thesaurus::getSessionThesaurusId方法代码示例

本文整理汇总了PHP中thesaurus::getSessionThesaurusId方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::getSessionThesaurusId方法的具体用法?PHP thesaurus::getSessionThesaurusId怎么用?PHP thesaurus::getSessionThesaurusId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thesaurus的用法示例。


在下文中一共展示了thesaurus::getSessionThesaurusId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: categ_browser

 function categ_browser($parent = 0, $folder_link = '', $document_link = '', $id_thes = 0)
 {
     global $PHP_SELF;
     $this->parent = $parent;
     $this->folder_link = $folder_link;
     $this->document_link = $document_link;
     //recuperation du thesaurus session
     if (!$id_thes) {
         $id_thes = thesaurus::getSessionThesaurusId();
     } else {
         thesaurus::setSessionThesaurusId($id_thes);
     }
     if ($id_thes != -1) {
         $this->thes = new thesaurus($id_thes);
     }
     $this->id_thes = $id_thes;
     if ($this->id_thes != -1) {
         // 1 seul thesaurus
         if (!$this->parent) {
             $this->parent = $this->thes->num_noeud_racine;
         }
         $this->parents_tab = array();
         $this->children_tab = array();
         $caller = preg_replace('/\\/.*\\//', './', $PHP_SELF);
         if (!$this->folder_link) {
             $this->folder_link = "<a href='" . $caller . "?parent=!!id!!'>";
         }
         if (!$this->document_link) {
             $this->document_link = "<a href='" . $caller . "?id=!!id!!'>";
         }
         $this->get_children();
         $this->get_parents();
     }
     return TRUE;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:35,代码来源:categ_browser.class.php

示例2: term_search

 function term_search($search_term_name, $search_term_origin_name, $n_per_page = 200, $base_query, $url_for_term_show, $url_for_term_search, $keep_tilde = 0, $id_thes = 0)
 {
     global $page;
     //recuperation du thesaurus session
     if (!$id_thes) {
         $id_thes = thesaurus::getSessionThesaurusId();
     } else {
         thesaurus::setSessionThesaurusId($id_thes);
     }
     $this->search_term_name = $search_term_name;
     $this->search_term_origin_name = $search_term_origin_name;
     global ${$search_term_name};
     global ${$search_term_origin_name};
     $this->search_term = stripslashes(${$search_term_name});
     $this->search_term_origin = stripslashes(${$search_term_origin_name});
     $this->n_per_page = $n_per_page;
     $this->base_query = $base_query;
     $this->url_for_term_show = $url_for_term_show;
     $this->url_for_term_search = $url_for_term_search;
     $this->keep_tilde = $keep_tilde;
     $this->id_thes = $id_thes;
     if ($id_thes != -1) {
         $this->thes = new thesaurus($id_thes);
     }
     if ($page == "") {
         $page = 0;
     }
     $this->page = $page;
     $this->offset = $page * $this->n_per_page;
     //$this->get_term_count();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:term_search.class.php

示例3: die

<?php

// +-------------------------------------------------+
// � 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: main.inc.php,v 1.2 2007-03-10 09:03:17 touraine37 Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
// page de switch recherche sujets
require_once $class_path . "/searcher.class.php";
require_once "{$class_path}/thesaurus.class.php";
//recuperation du thesaurus session
if (!$id_thes) {
    $id_thes = thesaurus::getSessionThesaurusId();
} else {
    thesaurus::setSessionThesaurusId($id_thes);
}
$link = "./circ.php?categ=resa_planning&resa_action=add_resa&id_empr={$id_empr}&groupID={$groupID}&id_notice=!!id!!";
$link_serial = '';
$link_analysis = '';
$link_bulletin = '';
$unq = md5(microtime());
$browser_url = './circ/resa_planning/subjects/categ_browser.php?id_thes=' . $id_thes . '&id_empr=' . $id_empr . '&groupID=' . $groupID . '&unq=' . $unq;
$sh = new searcher_subject("./circ.php?categ=resa_planning&resa_action=search_resa&mode=1&id_empr={$id_empr}&groupID={$groupID}&unq={$unq}");
开发者ID:bouchra012,项目名称:PMB,代码行数:25,代码来源:main.inc.php

示例4: simple_search_content


//.........这里部分代码省略.........
            if ($opac_show_onglet_empr == 1 || $opac_show_onglet_empr == 2 && $_SESSION["user_code"]) {
                if (!$_SESSION["user_code"]) {
                    $others .= "<li><a href=\"./index.php?search_type_asked=connect_empr\">" . $msg["onglet_empr_connect"] . "</a></li>";
                } else {
                    $others .= "<li><a href=\"{$empr_link_onglet}\">" . $msg["onglet_empr_compte"] . "</a></li>";
                }
            }
            $others2 = "";
            $result = str_replace("!!others!!", $others, $result);
            $result = str_replace("!!others2!!", $others2, $result);
            $result = "<div id='search'>" . $result . "</div>";
            $result .= $onglets_search_perso_form;
            break;
            //Recherche par termes
        //Recherche par termes
        case "term_search":
            global $search_term;
            global $term_click;
            global $page_search;
            global $opac_term_search_height;
            global $opac_show_help;
            if (!$opac_term_search_height) {
                $height = 300;
            } else {
                $height = $opac_term_search_height;
            }
            $search_form_term = "\n\t\t\t<div id='search'>\n\t\t\t<ul class='search_tabs'>!!others!!" . ($opac_show_onglet_help ? "<li><a href=\"./index.php?lvl=infopages&pagesid={$opac_show_onglet_help}\">" . $msg["search_help"] . "</a></li>" : '') . "\n\t\t\t</ul>\n\t\t\t<div id='search_crl'></div>\n\t\t\t<form class='form-{$current_module}' name='term_search_form' method='post' action='./index.php?lvl={$lvl}&search_type_asked=term_search'>\n\t\t\t\t<div class='form-contenu'>\n\t\t\t\t<!-- sel_thesaurus -->\n\t\t\t\t\t\t\t<span class='libSearchTermes'>" . $msg["term_search_search_for"] . "</span><input type='text' class='saisie-50em' name='search_term' value='" . htmlentities(stripslashes($search_term), ENT_QUOTES, $charset) . "'>\n\t\t\t\t\t<!--\tBouton Rechercher -->\n\t\t\t\t\t\t<input type='submit' class='boutonrechercher' value='{$msg['142']}' onClick=\"this.form.page_search.value=''; this.form.term_click.value='';\"/>\n";
            if ($opac_show_help) {
                $search_form_term .= "<input type='submit' class='bouton' value='{$msg['search_help']}' onClick='window.open(\"help.php?whatis=search_terms\", \"search_help\", \"scrollbars=yes, toolbar=no, dependent=yes, width=400, height=400, resizable=yes\"); return false' />\n";
            }
            $search_form_term .= "<input type='hidden' name='term_click' value='" . htmlentities(stripslashes($term_click), ENT_QUOTES, $charset) . "'/>\n\t\t\t\t<input type='hidden' name='page_search' value='" . $page_search . "'/>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t\t<script type='text/javascript'>\n\t\t\t\tdocument.forms['term_search_form'].elements['search_term'].focus();\n\t\t\t\t</script>\n\t\t\t</div>\n\t\t\t";
            //recuperation du thesaurus session
            if (!$id_thes) {
                $id_thes = thesaurus::getSessionThesaurusId();
            } else {
                thesaurus::setSessionThesaurusId($id_thes);
            }
            //affichage du selectionneur de thesaurus et du lien vers les thesaurus
            $liste_thesaurus = thesaurus::getThesaurusList();
            $sel_thesaurus = '';
            $lien_thesaurus = '';
            if ($opac_thesaurus != 0) {
                //la liste des thesaurus n'est pas affichée en mode monothesaurus
                $sel_thesaurus = "<select class='saisie-30em' id='id_thes' name='id_thes' ";
                $sel_thesaurus .= "onchange = \"document.location = './index.php?lvl=index&search_type_asked=term_search&id_thes='+document.getElementById('id_thes').value; \">";
                foreach ($liste_thesaurus as $id_thesaurus => $libelle_thesaurus) {
                    $sel_thesaurus .= "<option value='" . $id_thesaurus . "' ";
                    if ($id_thesaurus == $id_thes) {
                        $sel_thesaurus .= " selected";
                    }
                    $sel_thesaurus .= ">" . htmlentities($libelle_thesaurus, ENT_QUOTES, $charset) . "</option>";
                }
                $sel_thesaurus .= "<option value=-1 ";
                if ($id_thes == -1) {
                    $sel_thesaurus .= "selected ";
                }
                $sel_thesaurus .= ">" . htmlentities($msg['thes_all'], ENT_QUOTES, $charset) . "</option>";
                $sel_thesaurus .= "</select>&nbsp;";
                $lien_thesaurus = "<a href='./autorites.php?categ=categories&sub=thes'>" . $msg[thes_lien] . "</a>";
            }
            $search_form_term = str_replace("<!-- sel_thesaurus -->", $sel_thesaurus, $search_form_term);
            $search_form_term = str_replace("<!-- lien_thesaurus -->", $lien_thesaurus, $search_form_term);
            $result = $search_form_term;
            $others = "";
            $others .= "<li><a href=\"./index.php?search_type_asked=simple_search\">" . $msg["simple_search"] . "</a></li>";
            if ($opac_allow_personal_search) {
开发者ID:bouchra012,项目名称:PMB,代码行数:67,代码来源:simple_search.inc.php

示例5: make_search

 function make_search()
 {
     global $opac_auto_postage_etendre_recherche, $opac_auto_postage_nb_descendant, $opac_auto_postage_nb_montant;
     global $opac_auto_postage_descendant, $opac_auto_postage_montant, $opac_auto_postage_etendre_recherche;
     global $gestion_acces_active, $gestion_acces_empr_notice, $class_path;
     global $opac_visionneuse_allow, $opac_photo_filtre_mimetype;
     $id = $_SESSION['last_module_search']['search_id'];
     $nb_level_enfants = $_SESSION["last_module_search"]["search_nb_level_enfants"];
     $nb_level_parents = $_SESSION["last_module_search"]["search_nb_level_parents"];
     //recuperation du thesaurus session
     if (!$id_thes) {
         $id_thes = thesaurus::getSessionThesaurusId();
     } else {
         thesaurus::setSessionThesaurusId($id_thes);
     }
     $thes = new thesaurus($id_thes);
     $id_top = $thes->num_noeud_racine;
     //FIL D'ARIANNE DANS LE THESAURUS
     $ourCateg = new categorie($id);
     //LISTE DES NOTICES ASSOCIEES
     //Lire le champ path du noeud pour étendre la recherche éventuellement au fils et aux père de la catégorie
     // lien Etendre auto_postage
     if (!$nb_level_enfants) {
         // non defini, prise des valeurs par défaut
         if (isset($_SESSION["nb_level_enfants"]) && $opac_auto_postage_etendre_recherche) {
             $nb_level_descendant = $_SESSION["nb_level_enfants"];
         } else {
             $nb_level_descendant = $opac_auto_postage_nb_descendant;
         }
     } else {
         $nb_level_descendant = $nb_level_enfants;
     }
     // lien Etendre auto_postage
     if (!isset($nb_level_parents)) {
         // non defini, prise des valeurs par défaut
         if (isset($_SESSION["nb_level_parents"]) && $opac_auto_postage_etendre_recherche) {
             $nb_level_montant = $_SESSION["nb_level_parents"];
         } else {
             $nb_level_montant = $opac_auto_postage_nb_montant;
         }
     } else {
         $nb_level_montant = $nb_level_parents;
     }
     $q = "select path from noeuds where id_noeud = '" . $id . "' ";
     $r = pmb_mysql_query($q, $dbh);
     if ($r && pmb_mysql_num_rows($r)) {
         $path = pmb_mysql_result($r, 0, 0);
         $nb_pere = substr_count($path, '/');
     } else {
         $path = "";
         $nb_pere = 0;
     }
     $acces_j = '';
     if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
         require_once "{$class_path}/acces.class.php";
         $ac = new acces();
         $dom_2 = $ac->setDomain(2);
         $acces_j = $dom_2->getJoin($_SESSION['id_empr_session'], 4, 'notcateg_notice');
     }
     if ($acces_j) {
         $statut_j = '';
         $statut_r = '';
     } else {
         $statut_j = ',notice_statut';
         $statut_r = "and statut=id_notice_statut and ((notice_visible_opac=1 and notice_visible_opac_abon=0)" . ($_SESSION["user_code"] ? " or (notice_visible_opac_abon=1 and notice_visible_opac=1)" : "") . ")";
     }
     if ($_SESSION["opac_view"] && $_SESSION["opac_view_query"]) {
         $opac_view_restrict = " notice_id in (select opac_view_num_notice from  opac_view_notices_" . $_SESSION["opac_view"] . ") ";
         $statut_r .= " and " . $opac_view_restrict;
     }
     // Si un path est renseigné et le paramètrage activé
     if ($path && ($opac_auto_postage_descendant || $opac_auto_postage_montant || $opac_auto_postage_etendre_recherche) && ($nb_level_montant || $nb_level_descendant)) {
         //Recherche des fils
         if (($opac_auto_postage_descendant || $opac_auto_postage_etendre_recherche) && $nb_level_descendant) {
             if ($nb_level_descendant != '*' && is_numeric($nb_level_descendant)) {
                 $liste_fils = " path regexp '^{$path}(\\/[0-9]*){0,{$nb_level_descendant}}\$' ";
             } else {
                 //$liste_fils=" path regexp '^$path(\\/[0-9]*)*' ";
                 $liste_fils = " path like '{$path}/%' or  path = '{$path}' ";
             }
         } else {
             $liste_fils = " id_noeud='" . $id . "' ";
         }
         // recherche des pères
         if (($opac_auto_postage_montant || $opac_auto_postage_etendre_recherche) && $nb_level_montant) {
             $id_list_pere = explode('/', $path);
             $stop_pere = 0;
             if ($nb_level_montant != '*' && is_numeric($nb_level_montant)) {
                 $stop_pere = $nb_pere - $nb_level_montant;
             }
             if ($stop_pere < 0) {
                 $stop_pere = 0;
             }
             for ($i = $nb_pere; $i >= $stop_pere; $i--) {
                 $liste_pere .= " or id_noeud='" . $id_list_pere[$i] . "' ";
             }
         }
         $suite_req = " FROM noeuds STRAIGHT_JOIN notices_categories on id_noeud=num_noeud join notices on notcateg_notice=notice_id {$acces_j} {$statut_j} ";
         $suite_req .= "WHERE ({$liste_fils} {$liste_pere}) {$statut_r} ";
     } else {
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:search.class.php


注:本文中的thesaurus::getSessionThesaurusId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。