本文整理汇总了PHP中thesaurus::getThesaurusList方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::getThesaurusList方法的具体用法?PHP thesaurus::getThesaurusList怎么用?PHP thesaurus::getThesaurusList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thesaurus
的用法示例。
在下文中一共展示了thesaurus::getThesaurusList方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list_thesauri
function list_thesauri($OPACUserId = -1)
{
$thesauri = thesaurus::getThesaurusList();
$results = array();
global $opac_thesaurus, $opac_thesaurus_defaut;
foreach ($thesauri as $id => $caption) {
if ($OPACUserId != -1 && $opac_thesaurus == 0 && $opac_thesaurus_defaut != $id) {
continue;
}
$athesaurus = new thesaurus($id);
$results[] = array('thesaurus_id' => $id, 'thesaurus_caption' => utf8_normalize($caption), 'thesaurus_num_root_node' => $athesaurus->num_noeud_racine, 'thesaurus_num_unclassed_node' => $athesaurus->num_noeud_nonclasses, 'thesaurus_num_orphans_node' => $athesaurus->num_noeud_orphelins);
}
return $results;
}
示例2: cleanCategoriesPath
function cleanCategoriesPath()
{
global $msg, $charset, $PMBusername;
if (SESSrights & ADMINISTRATION_AUTH) {
// Pour tous les thésaurus, on parcours les childs
$list_thesaurus = thesaurus::getThesaurusList();
foreach ($list_thesaurus as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$noeud_rac = $thes->num_noeud_racine;
$r = noeuds::listChilds($noeud_rac, 0);
while ($row = mysql_fetch_object($r)) {
noeuds::process_categ_path($row->id_noeud);
}
}
if ($thesaurus_auto_postage_search) {
categories::process_categ_index();
}
$result .= htmlentities($msg["clean_categories_path_end"], ENT_QUOTES, $charset);
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例3: foreach
if (!$parent) {
$parent = 0;
}
if (!$id) {
$id = 0;
}
//recuperation du thesaurus session
if (!$id_thes) {
$id_thes = thesaurus::getSessionThesaurusId();
} else {
thesaurus::setSessionThesaurusId($id_thes);
}
$liste_thesaurus = '';
$browser_top = '';
//affichage du selectionneur de thesaurus et du lien vers les thésaurus
$liste_thesaurus = thesaurus::getThesaurusList();
$sel_thesaurus = '';
$lien_thesaurus = '';
if ($thesaurus_mode_pmb != 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 = '" . $base_url . "&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) {
示例4: cleanCategories
function cleanCategories()
{
global $msg, $dbh, $charset, $PMBusername;
if ($deleted == "") {
$deleted = 0;
}
if (SESSrights & ADMINISTRATION_AUTH) {
$result .= "<h3>" . htmlentities($msg["nettoyage_suppr_categories"], ENT_QUOTES, $charset) . "</h3>";
$list_thesaurus = thesaurus::getThesaurusList();
foreach ($list_thesaurus as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$noeud_rac = $thes->num_noeud_racine;
$r = noeuds::listChilds($noeud_rac, 0);
while ($row = mysql_fetch_object($r)) {
noeuds::process_categ($row->id_noeud);
}
}
//TODO non repris >> Utilité ???
// $delete = mysql_query("delete from categories where categ_libelle='#deleted#'");
$result .= $deleted . " " . htmlentities($msg["nettoyage_res_suppr_categories"], ENT_QUOTES, $charset);
$optn = noeuds::optimize();
$optc = categories::optimize();
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例5: activation_surlignage
}
print "</b></font>";
print activation_surlignage();
print "</h3></span>";
if (!$opac_allow_affiliate_search) {
print "\n\t\t\t\t</div>";
}
print "\n\t\t\t\t<div id=\"resultatrech_liste\">\n\t\t\t\t<ul>";
$first_clause .= "catdef.libelle_categorie not like '~%' ";
$aq = new analyse_query(stripslashes($user_query), 0, 0, 1, 0, $opac_stemming_active);
$members_catdef = $aq->get_query_members('catdef', 'catdef.libelle_categorie', 'catdef.index_categorie', 'catdef.num_noeud');
$members_catlg = $aq->get_query_members('catlg', 'catlg.libelle_categorie', 'catlg.index_categorie', 'catlg.num_noeud');
$list_thes = array();
if ($id_thes == -1) {
//recherche dans tous les thesaurus
$list_thes = thesaurus::getThesaurusList();
} else {
//recherche dans le thesaurus transmis
$thes = new thesaurus($id_thes);
$list_thes[$id_thes] = $thes->libelle_thesaurus;
}
$q = "drop table if exists catjoin ";
$r = mysql_query($q, $dbh);
$q = "create temporary table catjoin ENGINE=MyISAM as select ";
foreach ($list_thes as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
if ($lang == $thes->langue_defaut || in_array($lang, thesaurus::getTranslationsList()) === false) {
$q .= "noeuds.num_thesaurus, ";
$q .= "noeuds.id_noeud as num_noeud, ";
$q .= "catdef.note_application as note_application, ";
$q .= "catdef.comment_public as comment_public, ";
示例6: make_first_search
function make_first_search()
{
global $search_subject;
global $search_indexint, $search_indexint_id, $aut_type;
global $msg;
global $charset;
global $browser, $search_form_categ, $browser_url;
global $lang;
global $dbh;
global $id_thes;
global $thesaurus_mode_pmb;
if ($search_indexint_id) {
$this->id = $search_indexint_id;
$aut_type = "indexint";
return AUT_SEARCH;
}
$this->nbresults = 0;
if ($search_subject) {
$aq = new analyse_query(stripslashes($search_subject));
if (!$aq->error) {
if ($id_thes != -1) {
$thes = new thesaurus($id_thes);
}
$requete = "SELECT SQL_CALC_FOUND_ROWS noeuds.id_noeud AS categ_id, ";
if ($id_thes != -1 && $thes->langue_defaut == $lang) {
$members = $aq->get_query_members("categories", "libelle_categorie", "index_categorie", "num_noeud");
$requete .= $members["select"] . " AS pert ";
$requete .= "FROM noeuds JOIN categories ON noeuds.id_noeud = categories.num_noeud AND categories.langue='" . addslashes($lang) . "' ";
$requete .= "WHERE noeuds.num_thesaurus = '" . $id_thes . "' ";
$requete .= "AND (" . $members["where"] . ") ";
$requete .= "AND categories.libelle_categorie NOT LIKE '~%' ";
$requete .= "ORDER BY pert DESC,categories.index_categorie";
} else {
$members_catdef = $aq->get_query_members("catdef", "catdef.libelle_categorie", "catdef.index_categorie", "catdef.num_noeud");
$members_catlg = $aq->get_query_members("catlg", "catlg.libelle_categorie", "catlg.index_categorie", "catlg.num_noeud");
$requete .= "IF (catlg.num_noeud IS NULL, catdef.index_categorie, catlg.index_categorie) as index_categorie, ";
$requete .= "IF (catlg.num_noeud IS NULL, " . $members_catdef["select"] . ", " . $members_catlg["select"] . ") as pert ";
if ($id_thes != -1) {
$requete .= "FROM noeuds JOIN categories AS catdef ON noeuds.id_noeud = catdef.num_noeud AND catdef.langue = '" . $thes->langue_defaut . "' ";
$requete .= "LEFT JOIN categories AS catlg ON catdef.num_noeud = catlg.num_noeud AND catlg.langue = '" . $lang . "' ";
$requete .= "WHERE noeuds.num_thesaurus = '" . $id_thes . "' ";
} else {
//Plusieurs thésaurus
$requete .= "FROM noeuds JOIN thesaurus ON thesaurus.id_thesaurus = noeuds.num_thesaurus ";
$requete .= "JOIN categories AS catdef ON noeuds.id_noeud = catdef.num_noeud AND catdef.langue = thesaurus.langue_defaut ";
$requete .= "LEFT JOIN categories AS catlg on catdef.num_noeud = catlg.num_noeud AND catlg.langue = '" . $lang . "' ";
$requete .= "WHERE 1 ";
}
$requete .= "AND catdef.libelle_categorie NOT LIKE '~%' ";
$requete .= "AND (IF (catlg.num_noeud IS NULL, " . $members_catdef["where"] . ", " . $members_catlg["where"] . ") ) ORDER BY pert DESC,index_categorie";
}
$this->s_query = pmb_mysql_query($requete, $dbh);
$qry = "SELECT FOUND_ROWS() AS NbRows";
if ($resnum = pmb_mysql_query($qry)) {
$this->nb_s = pmb_mysql_result($resnum, 0, 0);
}
} else {
$this->show_error($aq->current_car, $aq->input_html, $aq->error_message);
return;
}
}
if ($search_indexint) {
$aq = new analyse_query(stripslashes($search_indexint));
if (!$aq->error) {
$this->nb_id = @pmb_mysql_result(@pmb_mysql_query("select count(distinct indexint_id) from indexint where indexint_name like '" . str_replace("*", "%", $search_indexint) . "'"), 0, 0);
if ($this->nb_id) {
$this->id_query = @pmb_mysql_query("select indexint_id from indexint where indexint_name like '" . str_replace("*", "%", $search_indexint) . "' order by indexint_name*1, indexint_name");
if ($this->nb_id == 1) {
$id = @pmb_mysql_fetch_object($this->id_query);
$this->id = $id->indexint_id;
$aut_type = "indexint";
return AUT_SEARCH;
}
}
$this->nb_i = @pmb_mysql_result(@pmb_mysql_query($aq->get_query_count("indexint", "indexint_comment", "index_indexint", "indexint_id")), 0, 0);
if ($this->nb_i) {
$this->i_query = @pmb_mysql_query($aq->get_query("indexint", "indexint_comment", "index_indexint", "indexint_id"));
}
} else {
$this->show_error($aq->current_car, $aq->input_html, $aq->error_message);
return;
}
}
if ($this->nb_s + $this->nb_i + $this->nb_id == 0) {
//affichage du selectionneur de thesaurus et du lien vers les thésaurus
$liste_thesaurus = thesaurus::getThesaurusList();
$sel_thesaurus = '';
$lien_thesaurus = '';
if ($thesaurus_mode_pmb != 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 = '" . $this->base_url . "&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 ";
//.........这里部分代码省略.........
示例7: get_config_form
function get_config_form()
{
global $charset, $msg, $dbh;
global $thesaurus_default;
global $base_path;
if (!$this->config['used_thesaurus']) {
$this->config['used_thesaurus'] = $thesaurus_default;
}
if (!$this->config['base_uri']) {
$this->config['base_uri'] = "/";
}
if (!$this->config['tree']) {
$this->config['tree'] = array();
}
if (!$this->config['restricted_empr_write_permission']) {
$this->config['restricted_empr_write_permission'] = array();
}
if (!$this->config['restricted_user_write_permission']) {
$this->config['restricted_user_write_permission'] = array();
}
if (!$this->config['metasMapper_class']) {
$this->config['metasMapper_class'] = "";
}
if (!$this->config['upload_rep']) {
global $PMBuserid;
$query = "select deflt_upload_repertoire from users where userid = " . $PMBuserid;
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
$this->config['upload_rep'] = pmb_mysql_result($result, 0, 0);
} else {
$this->config['upload_rep'] = 0;
}
}
$result = parent::get_config_form();
//Included sets
$result .= "\n\t\t\t<div class='row'>\n\t\t\t\t<label for='base_uri'>" . htmlentities($this->msg['webdav_base_uri'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' name='base_uri' value='" . htmlentities($this->config['base_uri'], ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='base_uri'>" . htmlentities($this->msg['webdav_allow_web'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . htmlentities($this->msg['webdav_yes'], ENT_QUOTES, $charset) . " <input type='radio' name='allow_web' value='1' " . ($this->config['allow_web'] == 1 ? "checked='checked'" : "") . "/> \n\t\t\t\t" . htmlentities($this->msg['webdav_no'], ENT_QUOTES, $charset) . " <input type='radio' name='allow_web' value='0' " . ($this->config['allow_web'] == 0 ? "checked='checked'" : "") . "/>\n\t\t\t\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='authentication'>" . htmlentities($this->msg['webdav_authentication'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='authentication'>\n\t\t\t\t\t<option value='anonymous' " . ($this->config['authentication'] == "anonymous" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_anonymous'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='gestion' " . ($this->config['authentication'] == "gestion" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_authenticate_gest'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='opac' " . ($this->config['authentication'] == "opac" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_authenticate_opac'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='write_permission'>" . htmlentities($this->msg['webdav_write_permission'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . htmlentities($this->msg['webdav_yes'], ENT_QUOTES, $charset) . " <input type='radio' name='write_permission' value='1' " . ($this->config['write_permission'] == 1 ? "checked='checked'" : "") . "/> \n\t\t\t\t" . htmlentities($this->msg['webdav_no'], ENT_QUOTES, $charset) . " <input type='radio' name='write_permission' value='0' " . ($this->config['write_permission'] == 0 ? "checked='checked'" : "") . "/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_write_permission'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>";
//groupes d'utilisateurs
$result .= "\n\t\t\t\t<div class='colonne2'>\n\t\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_user_write_permission'], ENT_QUOTES, $charset) . "</label><br />";
$query = "SELECT grp_id, grp_name FROM users_groups ORDER BY grp_name ";
$res = pmb_mysql_query($query);
if (pmb_mysql_num_rows($res) > 0) {
$result .= "\n\t\t\t\t<select id='restricted_user_write_permission' name='restricted_user_write_permission[]' multiple>";
while ($obj = pmb_mysql_fetch_object($res)) {
$result .= "\n\t\t\t\t\t<option value='" . $obj->grp_id . "' " . (in_array($obj->grp_id, $this->config['restricted_user_write_permission']) ? "selected=selected" : "") . ">" . htmlentities($obj->grp_name, ENT_QUOTES, $charset) . "</option>";
}
$result .= " or id_noeud in (select id_noeud from noeuds where num_parent=" . $this->categ->id . "))\n\t\t\t\t\t</select>";
}
$result .= "\n\t\t\t\t</div>";
$result .= "\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_empr_write_permission'], ENT_QUOTES, $charset) . "</label><br />";
//catégories de lecteurs
$requete = "SELECT id_categ_empr, libelle FROM empr_categ ORDER BY libelle ";
$res = pmb_mysql_query($requete);
if (pmb_mysql_num_rows($res) > 0) {
$result .= "\n\t\t\t\t<select id='restricted_empr_write_permission' name='restricted_empr_write_permission[]' multiple>";
while ($obj = pmb_mysql_fetch_object($res)) {
$result .= "\n\t\t\t\t\t<option value='" . $obj->id_categ_empr . "' " . (in_array($obj->id_categ_empr, $this->config['restricted_empr_write_permission']) ? "selected=selected" : "") . ">" . htmlentities($obj->libelle, ENT_QUOTES, $charset) . "</option>";
}
$result .= "\n\t\t\t\t\t</select>";
}
$result .= "\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='included_sets'>" . htmlentities($this->msg['webdav_restricted_sets'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select MULTIPLE name='included_sets[]'>";
$sets = new connector_out_sets();
foreach ($sets->sets as &$aset) {
$result .= "\n\t\t\t\t\t<option " . (in_array($aset->id, $this->included_sets) ? "selected" : "") . " value='" . $aset->id . "'>" . htmlentities($aset->caption, ENT_QUOTES, $charset) . "</option>";
}
$result .= "\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='used_thesaurus'>" . htmlentities($this->msg['webdav_user_thesaurus'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='used_thesaurus'>";
$liste_thesaurus = thesaurus::getThesaurusList();
foreach ($liste_thesaurus as $id_thesaurus => $libelle_thesaurus) {
$result .= "\n\t\t\t\t\t<option value='" . $id_thesaurus . "' " . ($id_thesaurus == $this->config['used_thesaurus'] ? "selected='selected'" : "") . ">" . htmlentities($libelle_thesaurus, ENT_QUOTES, $charset) . "</option>";
}
$result .= "\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='only_with_notices'>" . htmlentities($this->msg['webdav_only_with_notices'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . $this->msg['webdav_yes'] . " <input type='radio' value='1' name='only_with_notices' " . ($this->config['only_with_notices'] ? "checked='checked'" : "") . "/>\n\t\t\t\t" . $this->msg['webdav_no'] . " <input type='radio' value='0' name='only_with_notices' " . ($this->config['only_with_notices'] ? "" : "checked='checked'") . "/> \n\t\t\t</div>";
$result .= "\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='tree'>" . htmlentities($this->msg['webdav_tree'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='tree_elem' id='select_tree_elem' onchange='load_tree_elem(this.value)'>\n\t\t\t\t\t<option value='0'>" . htmlentities($this->msg['webdav_select_tree_elem'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='typdoc'>typdoc</option>\n\t\t\t\t\t<option value='statut'>statut</option>\n\t\t\t\t\t<option value='categorie'>categorie</option>\n\t\t\t\t\t<option value='indexint'>indexint</option>\n\t\t\t\t</select><br />\n\t\t\t\t<table id='tree'>";
foreach ($this->config['tree'] as $pos => $elem) {
$result .= "\n\t\t\t\t\t<tr id='tree_elem_tr" . $pos . "'>\n\t\t\t\t\t\t<td recept='yes' recepttype='tree_elem' highlight='tree_elem_show_recept' downlight='tree_elem_hide_recept' id='tree_elem_td" . $pos . "' draggable='yes' callback_after='move_tree_elem' dragtype='tree_elem' dragicon='{$base_path}/images/icone_drag_notice.png' dragtext='" . $elem . "'>\n\t\t\t\t\t\t\t<input type='hidden' name='tree[]' value='" . $elem . "' />\n\t\t\t\t\t\t\t<img src='{$base_path}/images/sort.png' style='width:12px; vertical-align:middle'/>" . $elem . "</td>\n\t\t\t\t\t\t<td onclick='tree_elem_delete(\"tree_elem_tr" . $pos . "\");'><img src=\"{$base_path}/images/trash.png\" /></td>\n\t\t\t\t\t</tr>";
}
$result .= "\n\t\t\t\t</table>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tvar nb_tree_elems = " . count($this->config['tree']) . ";\n\t\t\t\t\tfunction load_tree_elem(elem){\n\t\t\t\t\t\tif(elem){\n\t\t\t\t\t\t\tvar tr = document.createElement('tr');\n\t\t\t\t\t\t\tdocument.getElementById('tree').appendChild(tr);\n\t\t\t\t\t\t\ttr.setAttribute('id','tree_elem_tr'+nb_tree_elems);\n\t\t\t\t\t\t\tvar td = document.createElement('td');\t\n\t\t\t\t\t\t\ttd.setAttribute('recept','yes');\n\t\t\t\t\t\t\ttd.setAttribute('recepttype','tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('highlight','tree_elem_show_recept');\n\t\t\t\t\t\t\ttd.setAttribute('downlight','tree_elem_hide_recept');\n\t\t\t\t\t\t\ttd.setAttribute('id','tree_elem_td'+nb_tree_elems);\n\t\t\t\t\t\t\ttd.setAttribute('draggable','yes');\n\t\t\t\t\t\t\ttd.setAttribute('callback_after','move_tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('dragtype','tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('dragicon','{$base_path}/images/icone_drag_notice.png');\n\t\t\t\t\t\t\ttd.setAttribute('dragtext',elem);\n\t\t\t\t\t\t\ttd.innerHTML = '<input type=\"hidden\" name=\"tree[]\" value=\"'+elem+'\" /> <img src=\"{$base_path}/images/sort.png\" style=\"width:12px; vertical-align:middle\"/>'+elem;\n\t\t\t\t\t\t\ttr.appendChild(td);\n\t\t\t\t\t\t\tvar td = document.createElement('td');\t\n\t\t\t\t\t\t\ttd.setAttribute('onclick','tree_elem_delete(\"tree_elem_tr'+nb_tree_elems+'\")');\n\t\t\t\t\t\t\ttd.innerHTML = '<img src=\"{$base_path}/images/trash.png\" />';\n\t\t\t\t\t\t\ttr.appendChild(td);\n\t\t\t\t\t\t\tnb_tree_elems++;\n\t\t\t\t\t\t\tinit_drag();\n\t\t\t\t\t\t\tdocument.getElementById('select_tree_elem').selectedIndex=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction move_tree_elem(elem,evt,target){\n\t\t\t\t\t\n\t\t\t\t\t\tif(target != 'false' || target != 'null'){\n\t\t\t\t\t\t\telem = elem.parentNode;\n\t\t\t\t\t\t\ttarget = document.getElementById(target).parentNode;\n\t\t\t\t\t\t\tparent = target.parentNode;\n\t\t\t\t\t\t\tparent.insertBefore(elem,target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_show_recept(obj){\n\t\t\t\t\t\tobj.style.background='#DDD';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_hide_recept(obj){\n\t\t\t\t\t\tobj.style.background='';\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_delete(id){\n\t\t\t\t\t\tdocument.getElementById(id).parentNode.removeChild(document.getElementById(id));\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_statut'>" . htmlentities($this->msg['webdav_metasMapper_class'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\t\t\n\t\t\t\t<input type='text' name='metasMapper_class' value='" . htmlentities($this->config['metasMapper_class'], ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_statut'>" . htmlentities($this->msg['webdav_default_statut'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>";
$query = "select id_notice_statut, gestion_libelle from notice_statut order by gestion_libelle";
$res = pmb_mysql_query($query);
if (pmb_mysql_num_rows($res)) {
$result .= "\n\t\t\t\t<select name='default_statut'>";
while ($row = pmb_mysql_fetch_object($res)) {
$result .= "\n\t\t\t\t\t<option value='" . $row->id_notice_statut . "'" . ($row->id_notice_statut == $this->config['default_statut'] ? "selected='selected'" : "") . ">" . htmlentities($row->gestion_libelle, ENT_QUOTES, $charset) . "</option>";
}
$result .= "\n\t\t\t\t</select>";
}
$result .= "\t\t\t\t\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<script src=\"./javascript/select.js\" type='text/javascript'></script>\n\t\t\t<script src=\"./javascript/upload.js\" type='text/javascript'></script>";
//Intégration de la gestion de l'interface de l'upload
//statut docunum
$result .= "\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_docnum_statut'>" . htmlentities($this->msg['webdav_default_docnum_statut'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>";
$query = "select id_explnum_statut, gestion_libelle from explnum_statut order by gestion_libelle";
$res = pmb_mysql_query($query);
if (pmb_mysql_num_rows($res)) {
$result .= "\n\t\t\t\t<select name='default_docnum_statut'>";
while ($row = pmb_mysql_fetch_object($res)) {
$result .= "\n\t\t\t\t\t<option value='" . $row->id_explnum_statut . "'" . ($row->id_explnum_statut == $this->config['default_docnum_statut'] ? "selected='selected'" : "") . ">" . htmlentities($row->gestion_libelle, ENT_QUOTES, $charset) . "</option>";
}
$result .= "\n\t\t\t\t</select>";
}
$result .= "\n\t\t\t</div>";
global $pmb_docnum_in_database_allow, $pmb_docnum_in_directory_allow;
$result .= "<div class='row'>";
//.........这里部分代码省略.........
示例8: extrait_info_notice
//.........这里部分代码省略.........
if ($aut[0]) {
if ($aut[5] == 0) {
$lib_resp_type = $msg["export_main_author"];
} else {
if ($aut[5] == 1) {
$lib_resp_type = $msg["export_other_author"];
} else {
if ($aut[5] == 2) {
$lib_resp_type = $msg["export_secondary_author"];
}
}
}
}
$worksheet->write_string($debligne_excel, $iaut * 6 + 6 + $nbr_champs, $lib_resp_type);
}
$q = "drop table if exists catlg ";
$r = mysql_query($q, $dbh);
$q = "CREATE TEMPORARY TABLE catlg ENGINE=MyISAM as ";
$q .= "SELECT categories.num_noeud, categories.libelle_categorie ";
$q .= "FROM noeuds, categories, notices_categories ";
$q .= "WHERE notices_categories.notcateg_notice = '" . $id_notice . "' ";
$q .= "AND categories.langue = '" . $lang . "' ";
$q .= "AND categories.num_noeud = notices_categories.num_noeud ";
$q .= "AND categories.num_noeud = noeuds.id_noeud ";
$q .= "ORDER BY ordre_categorie";
$r = mysql_query($q, $dbh);
$q = "DROP TABLE IF EXISTS catdef ";
$r = mysql_query($q, $dbh);
$q = "CREATE TEMPORARY TABLE catdef ( ";
$q .= "num_noeud int(9) unsigned not null default '0', ";
$q .= "num_thesaurus int(3) unsigned not null default '0', ";
$q .= "libelle_categorie text not null ) ENGINE=MyISAM ";
$r = mysql_query($q, $dbh);
$thes_list = thesaurus::getThesaurusList();
$q = '';
foreach ($thes_list as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$q = "INSERT INTO catdef ";
$q .= "SELECT categories.num_noeud, noeuds.num_thesaurus, categories.libelle_categorie ";
$q .= "FROM noeuds, categories, notices_categories ";
$q .= "WHERE noeuds.num_thesaurus={$id_thesaurus} and notices_categories.notcateg_notice = '" . $id_notice . "' ";
$q .= "AND categories.langue = '" . $thes->langue_defaut . "' ";
$q .= "AND categories.num_noeud = notices_categories.num_noeud ";
$q .= "AND categories.num_noeud = noeuds.id_noeud ";
$q .= "ORDER BY ordre_categorie";
$r = mysql_query($q, $dbh);
}
$q = "select catdef.num_thesaurus as num_thesaurus, ";
$q .= "if (catlg.num_noeud is null, catdef.libelle_categorie, catlg.libelle_categorie) as libelle_categorie ";
$q .= "from catdef left join catlg on catdef.num_noeud = catlg.num_noeud ";
if (!$thesaurus_mode_pmb) {
$q .= "where catdef.num_thesaurus = '" . $thesaurus_defaut . "' ";
}
$res_desc = mysql_query($q, $dbh);
$lib_desc = "";
while ($desc = mysql_fetch_object($res_desc)) {
$lib_desc .= $lib_desc ? $pmb_keyword_sep : "";
if ($thesaurus_mode_pmb) {
$lib_desc .= '[' . thesaurus::getLibelle($desc->num_thesaurus) . '] ';
}
$lib_desc .= $desc->libelle_categorie;
}
$worksheet->write_string($debligne_excel, $max_aut * 6 + $nbr_champs + 1, "{$lib_desc}");
$p_perso = new parametres_perso($libelle_caddie_type);
//Champs personalisés
if (!$p_perso->no_special_fields) {
示例9: search_categories
function search_categories()
{
global $opac_search_other_function, $typdoc, $dbh, $charset, $opac_thesaurus_defaut, $lang, $opac_thesaurus;
global $opac_stemming_active;
$first_clause .= "categories.libelle_categorie not like '~%' ";
$q = 'drop table if exists catjoin ';
$r = pmb_mysql_query($q, $dbh);
$q = 'create temporary table catjoin ( ';
$q .= "num_thesaurus int(3) unsigned not null default '0', ";
$q .= "num_noeud int(9) unsigned not null default '0', ";
$q .= 'key (num_noeud,num_thesaurus) ';
$q .= ") ENGINE=MyISAM ";
$r = pmb_mysql_query($q, $dbh);
$list_thes = array();
if ($opac_thesaurus) {
//mode multithesaurus
$list_thes = thesaurus::getThesaurusList();
$id_thes_for_link = -1;
} else {
//mode monothesaurus
$thes = new thesaurus($opac_thesaurus_defaut);
$list_thes[$opac_thesaurus_defaut] = $thes->libelle_thesaurus;
$id_thes_for_link = $opac_thesaurus_defaut;
}
$aq = new analyse_query(stripslashes($this->user_query), 0, 0, 1, 0, $opac_stemming_active);
$members_catdef = $aq->get_query_members('catdef', 'catdef.libelle_categorie', 'catdef.index_categorie', 'catdef.num_noeud');
$members_catlg = $aq->get_query_members('catlg', 'catlg.libelle_categorie', 'catlg.index_categorie', 'catlg.num_noeud');
foreach ($list_thes as $id_thesaurus => $libelle_thesaurus) {
$thes = new thesaurus($id_thesaurus);
$q = "INSERT INTO catjoin SELECT noeuds.num_thesaurus, noeuds.id_noeud FROM ";
if ($lang == $thes->langue_defaut || in_array($lang, thesaurus::getTranslationsList()) === false) {
$q .= "noeuds JOIN categories as catdef on noeuds.id_noeud = catdef.num_noeud AND catdef.langue = '" . $thes->langue_defaut . "'";
//$q.=" WHERE noeuds.num_thesaurus='".$id_thesaurus."' AND not_use_in_indexation='0' AND catdef.libelle_categorie not like '~%' and ".$members_catdef["where"];
$q .= " WHERE noeuds.num_thesaurus='" . $id_thesaurus . "' AND catdef.libelle_categorie not like '~%' and " . $members_catdef["where"];
} else {
$q .= "noeuds JOIN categories as catdef on noeuds.id_noeud = catdef.num_noeud AND catdef.langue='" . $thes->langue_defaut . "' JOIN categories as catlg on catdef.num_noeud=catlg.num_noeud and catlg.langue = '" . $lang . "'";
//$q.=" WHERE noeuds.num_thesaurus='".$id_thesaurus."' AND not_use_in_indexation='0' AND if(catlg.num_noeud is null, ".$members_catdef["where"].", ".$members_catlg["where"].") AND if(catlg.num_noeud is null,catdef.libelle_categorie not like '~%',catlg.libelle_categorie not like '~%')";
$q .= " WHERE noeuds.num_thesaurus='" . $id_thesaurus . "' AND if(catlg.num_noeud is null, " . $members_catdef["where"] . ", " . $members_catlg["where"] . ") AND if(catlg.num_noeud is null,catdef.libelle_categorie not like '~%',catlg.libelle_categorie not like '~%')";
}
$r = pmb_mysql_query($q, $dbh);
}
$clause = '';
$add_notice = '';
if ($opac_search_other_function) {
$add_notice = search_other_function_clause();
}
if ($typdoc || $add_notice) {
$clause .= ' JOIN notices_categories ON notices_categories.num_noeud=catjoin.num_noeud JOIN notices ON notices_categories.notcateg_notice=notices.notice_id WHERE 1 ';
} else {
$clause .= ' WHERE 1 ';
}
if ($typdoc) {
$clause .= " and typdoc='" . $typdoc . "' ";
}
if ($add_notice) {
$clause .= ' and notice_id in (' . $add_notice . ')';
}
$q = 'select count(distinct catjoin.num_noeud) from catjoin ' . $clause;
$r = pmb_mysql_query($q);
$nb_result_categories = pmb_mysql_result($r, 0, 0);
if ($nb_result_categories) {
$form = "<form name=\"search_categorie\" action=\"./index.php?lvl=more_results\" method=\"post\">";
$form .= "<input type=\"hidden\" name=\"user_query\" value=\"" . htmlentities(stripslashes($this->user_query), ENT_QUOTES, $charset) . "\">\n";
if (function_exists("search_other_function_post_values")) {
$form .= search_other_function_post_values();
}
$form .= "<input type=\"hidden\" name=\"mode\" value=\"categorie\">\n";
$form .= "<input type=\"hidden\" name=\"search_type_asked\" value=\"simple_search\">\n";
$form .= "<input type=\"hidden\" id=\"count\" name=\"count\" value=\"" . $nb_result_categories . "\">\n";
$form .= "<input type=\"hidden\" name=\"clause\" value=\"" . htmlentities($clause, ENT_QUOTES, $charset) . "\">\n";
$form .= "<input type=\"hidden\" id=\"id_thes\" name=\"id_thes\" value=\"" . $id_thes_for_link . "\"></form>\n";
$_SESSION["level1"]["category"]["form"] = $form;
$_SESSION["level1"]["category"]["count"] = $nb_result_categories;
}
return $nb_result_categories;
}
示例10: simple_search_content
//.........这里部分代码省略.........
}
}
$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> ";
$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) {
$others .= "<li><a href=\"./index.php?search_type_asked=search_perso\">" . $msg["search_perso_menu"] . "</a></li>";
}
$others .= $onglets_search_perso;
if ($opac_allow_extended_search) {
$others .= "<li><a href=\"./index.php?search_type_asked=extended_search\">" . $msg["extended_search"] . "</a></li>";
示例11: while
while ($sub_categ = pmb_mysql_fetch_object($result_bis)) {
if (!$sub_categ->num_renvoi_voir) {
$id = $sub_categ->num_noeud;
$link = $sub_categ->libelle_categorie;
} else {
$id = $sub_categ->num_renvoi_voir;
$link = '<i>' . $sub_categ->libelle_categorie . '@</i>';
}
// Si il y a présence d'un commentaire affichage du layer
$result_com = categorie::zoom_categ($id, $sub_categ->comment_public);
$child[] = "<a href='./index.php?lvl=categ_see&id={$id}&main=1&id_thes=" . $sub_categ->num_thesaurus . "'" . $result_com['java_com'] . ">" . $link . "</a>" . $result_com['zoom'];
}
$categ_array[] = array(categ => $categ, child => $child);
}
//affichage des liens vers les autres thésaurus
$liste_thesaurus = thesaurus::getThesaurusList($opac_show_categ_browser_home_id_thes);
if ($opac_show_categ_browser_home_id_thes_tab) {
$liste_thesaurus_tmp = array();
foreach ($opac_show_categ_browser_home_id_thes_tab as $value) {
if ($liste_thesaurus[$value]) {
$liste_thesaurus_tmp[$value] = $liste_thesaurus[$value];
unset($liste_thesaurus[$value]);
}
}
foreach ($liste_thesaurus as $key => $value) {
$liste_thesaurus_tmp[$key] = $value;
}
$liste_thesaurus = $liste_thesaurus_tmp;
}
$liens_thesaurus = '';
if ($opac_thesaurus != 0) {