本文整理汇总了PHP中create_tableau_mimetype函数的典型用法代码示例。如果您正苦于以下问题:PHP create_tableau_mimetype函数的具体用法?PHP create_tableau_mimetype怎么用?PHP create_tableau_mimetype使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_tableau_mimetype函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_notice_by_meta
function get_notice_by_meta($name, $filename)
{
global $pmb_keyword_sep;
global $pmb_type_audit;
global $webdav_current_user_name, $webdav_current_user_id;
\create_tableau_mimetype();
$mimetype = \trouve_mimetype($filename, extension_fichier($name));
//on commence avec la gymnatisque des métas...
if ($mimetype == "application/epub+zip") {
//pour les ebook, on gère ca directement ici !
$epub = new \epubData(realpath($filename));
$metas = $epub->metas;
$img = imagecreatefromstring($epub->getCoverContent());
$file = tempnam(sys_get_temp_dir(), "vign");
imagepng($img, $file);
$metas['thumbnail_content'] = file_get_contents($file);
unlink($file);
} else {
$metas = \extract_metas(realpath($filename), $mimetype);
}
if ($this->config['metasMapper_class']) {
$className = "Sabre\\PMB\\" . $this->config['metasMapper_class'];
if (class_exists($className)) {
$metasMapper = new $className($this->config, $metas, $mimetype, $name);
}
}
if (!is_object($metasMapper)) {
$metasMapper = new metasMapper($this->config, $metas, $mimetype, $name);
}
return $metasMapper->get_notice_id();
}
示例2: analyse_file
function analyse_file()
{
if ($this->explnum_doc_file) {
create_tableau_mimetype();
$userfile_name = $this->explnum_doc_file['name'];
$userfile_temp = $this->explnum_doc_file['tmp_name'];
$userfile_moved = basename($userfile_temp);
$userfile_name = preg_replace("/ |'|\\|\"|\\//m", "_", $userfile_name);
$userfile_ext = '';
if ($userfile_name) {
$userfile_ext = extension_fichier($userfile_name);
}
move_uploaded_file($userfile_temp, "./temp/" . $userfile_moved);
$file_name = "./temp/" . $userfile_moved;
$fp = fopen($file_name, "r");
$contenu = fread($fp, filesize($file_name));
fclose($fp);
$mime = trouve_mimetype($userfile_moved, $userfile_ext);
if (!$mime) {
$mime = "application/data";
}
$this->explnum_doc_mime = $mime;
$this->explnum_doc_nomfichier = $userfile_name;
$this->explnum_doc_extfichier = $userfile_ext;
$this->explnum_doc_contenu = $contenu;
unlink($file_name);
}
}
示例3: get_notice_by_meta
function get_notice_by_meta($name, $filename)
{
\create_tableau_mimetype();
$mimetype = \trouve_mimetype($filename, extension_fichier($name));
//on commence avec la gymnatisque des métas...
if ($mimetype == "application/epub+zip") {
//pour les ebook, on gère ca directement ici !
$epub = new \epubData(realpath($filename));
$metas = $epub->metas;
$img = imagecreatefromstring($epub->getCoverContent());
$file = tempnam(sys_get_temp_dir(), "vign");
imagepng($img, $file);
$metas['thumbnail_content'] = file_get_contents($file);
unlink($file);
} else {
$metas = \extract_metas(realpath($filename), $mimetype);
}
$metasMapper = $this->load_metas_mapper();
return $metasMapper->get_notice_id($metas, $mimetype, $name);
}
示例4: construire_tableau
/**
* Affichage sous forme de tableau des exemplaires
*/
function construire_tableau()
{
global $_mimetypes_bymimetype_, $_mimetypes_byext_, $dbh, $charset, $opac_url_base;
global $opac_visionneuse_allow;
if (!$this->tableau_id) {
$this->display = "";
} else {
create_tableau_mimetype();
$url_docnum = "";
switch ($this->type_elt) {
case DOCNUM_DMDE:
$url_docnum = "/explnum_doc.php?explnumdoc_id=";
$requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom, explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t FROM explnum_doc join explnum_doc_actions on id_explnum_doc=num_explnum_doc WHERE prive=0 and num_action in (" . implode(',', $this->tableau_id) . ")";
break;
case DOCNUM_SUGG:
$url_docnum = "/explnum_doc.php?explnumdoc_id=";
$requete = "SELECT id_explnum_doc as explnum_id, explnum_doc_nomfichier as explnum_nom, explnum_doc_mimetype as explnum_mimetype,\n\t\t\t\t\t\t explnum_doc_url as explnum_url, explnum_doc_data as explnum_data, explnum_doc_extfichier as explnum_extfichier\n\t\t\t\t\t\t FROM explnum_doc join explnum_doc_sugg on id_explnum_doc=num_explnum_doc WHERE num_suggestion in (" . implode(',', $this->tableau_id) . ")";
break;
case DOCNUM_NOTI:
default:
// récupération des infos des explnum
$requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype,\n\t\t\t\t\t\t explnum_url, explnum_data, explnum_vignette, explnum_nomfichier, explnum_extfichier\n\t\t\t\t\t\t FROM explnum WHERE explnum_id in (" . implode(',', $this->tableau_id) . ")";
$url_docnum = "/doc_num.php?explnum_id=";
break;
}
$res = mysql_query($requete, $dbh);
$i = 1;
$allowed_mimetype = array();
if ($opac_visionneuse_allow) {
global $opac_photo_filtre_mimetype;
$allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
}
while ($expl = mysql_fetch_object($res)) {
if ($expl->explnum_notice) {
$notice_aff = new notice_affichage($expl->explnum_notice, '');
$notice_aff->do_header_without_html();
$titre = $notice_aff->notice_header_without_html;
} elseif ($expl->explnum_bulletin) {
$titre = $this->get_header_bulletin($expl->explnum_bulletin);
}
if ($i == 1) {
$ligne = "<div class='row'><div class='colonne3' >!!1!!</div><div class='colonne3' width='33%'>!!2!!</div><div class='colonne3' >!!3!!</div></div>";
}
$alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
if ($expl->explnum_vignette) {
$obj = "<img src='" . $opac_url_base . "/vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
} else {
// trouver l'icone correspondant au mime_type
$obj = "<img src='" . $opac_url_base . "/images/mimetype/" . icone_mimetype($expl->explnum_mimetype, $expl->explnum_extfichier) . "' alt='{$alt}' title='{$alt}' border='0'>";
}
$lien = "";
if ($expl->explnum_notice) {
$lien = "index.php?lvl=notice_display&id=" . $expl->explnum_notice;
} elseif ($expl->explnum_bulletin) {
$lien = "index.php?lvl=bulletin_display&id=" . $expl->explnum_bulletin;
}
$words_to_find = "";
if ($expl->explnum_mimetype == 'application/pdf' || $expl->explnum_mimetype == 'URL' && strpos($expl->explnum_nom, '.pdf') !== false) {
$words_to_find = "#search=\"" . $this->termes_recherche . "\"";
}
$expl_liste_obj = "<div class='explnum-titre' style=\"margin-top:20px;margin-bottom:10px;text-align:center;font-weight:bold;\" ><a href='{$lien}'>{$titre}</a></div>";
$expl_liste_obj .= "<div style=\"text-align:center; word-wrap: break-word\">";
if ($allowed_mimetype && in_array($expl->explnum_mimetype, $allowed_mimetype)) {
$link = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneuse," . $expl->explnum_id . ");return false;\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
$expl_liste_obj .= $link;
} else {
$expl_liste_obj .= "<a href='" . $opac_url_base . $url_docnum . $expl->explnum_id . $words_to_find . "' alt='{$alt}' title='{$alt}' target='_blank'>" . $obj . "</a><br />";
}
if ($_mimetypes_byext_[$expl->explnum_extfichier]["label"]) {
$explmime_nom = $_mimetypes_byext_[$expl->explnum_extfichier]["label"];
} elseif ($_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"]) {
$explmime_nom = $_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"];
} else {
$explmime_nom = $expl->explnum_mimetype;
}
$expl_liste_obj .= htmlentities($expl->explnum_nom, ENT_QUOTES, $charset) . "<div class='explnum_type'>" . htmlentities($explmime_nom, ENT_QUOTES, $charset) . "</div>";
$expl_liste_obj .= "</div>";
$ligne = str_replace("!!{$i}!!", $expl_liste_obj, $ligne);
$i++;
if ($i == 4) {
$ligne_finale .= $ligne;
$i = 1;
}
}
if (!$ligne_finale) {
$ligne_finale = $ligne;
} elseif ($i != 1) {
$ligne_finale .= $ligne;
}
$ligne_finale = str_replace('!!2!!', " ", $ligne_finale);
$ligne_finale = str_replace('!!3!!', " ", $ligne_finale);
$this->display = $ligne_finale;
}
}
示例5: show_docnum_table
function show_docnum_table($docnum_tab = array(), $action)
{
global $charset;
create_tableau_mimetype();
$display = "";
if ($docnum_tab) {
$nb_doc = 0;
for ($i = 0; $i < count($docnum_tab); $i++) {
$nb_doc++;
if ($nb_doc == 1) {
$display .= "<tr >";
}
$alt = htmlentities($docnum_tab[$i]['tache_docnum_nomfichier'], ENT_QUOTES, $charset) . ' - ' . htmlentities($docnum_tab[$i]['tache_docnum_mimetype'], ENT_QUOTES, $charset);
$display .= "<td class='docnum' style='width:25%;border:1px solid #CCCCCC;padding : 5px 5px'>\n\t\t\t\t\t\t<a target='_blank' alt='{$alt}' title='{$alt}' href=\"./tache_docnum.php?tache_docnum_id=" . $docnum_tab[$i]['id_tache_docnum'] . "\">\n\t\t\t\t\t\t\t<img src='./images/mimetype/" . icone_mimetype($docnum_tab[$i]['tache_docnum_mimetype'], $docnum_tab[$i]['tache_docnum_extfichier']) . "' alt='{$alt}' title='{$alt}' >\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<a target='_blank' href='./tache_docnum.php?tache_docnum_id=" . $docnum_tab[$i]['id_tache_docnum'] . "'>" . htmlentities($docnum_tab[$i]['tache_docnum_nomfichier'], ENT_QUOTES, $charset) . "\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<div class='explnum_type'>" . $docnum_tab[$i]['tache_docnum_mimetype'] . "</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t";
if ($nb_doc == 4) {
$display .= "</tr>";
$nb_doc = 0;
}
}
}
return $display;
}
示例6: create_docnum
function create_docnum($doc)
{
global $bull_id;
global $notice_id;
$id_rep = 1;
$rep = new upload_folder($id_rep);
$name = $doc['nom_fic'] ? $doc['nom_fic'] : $doc['titre'];
$filename = strtolower(implode("_", explode(" ", $name)));
$filename = checkIfExist($rep->repertoire_path, $filename, $filename);
file_put_contents($rep->repertoire_path . $filename, file_get_contents($doc['url']));
$ext_fichier = extension_fichier($filename);
if ($doc['mimetype'] == "") {
create_tableau_mimetype();
$mimetype = trouve_mimetype($filename, $ext_fichier);
} else {
$mimetype = $doc['mimetype'];
}
$insert = "insert into explnum set ";
if ($bull_id != 0) {
$insert .= "explnum_bulletin = {$bull_id}, ";
} else {
$insert .= "explnum_notice = {$notice_id}, ";
}
$insert .= "explnum_nom = '" . $doc['titre'] . "', ";
$insert .= "explnum_mimetype = '{$mimetype}', ";
$insert .= "explnum_nomfichier = '" . $filename . "', ";
$insert .= "explnum_extfichier = '{$ext_fichier}', ";
$insert .= "explnum_repertoire = {$id_rep}, ";
$insert .= "explnum_path = '/'";
$result = mysql_query($insert);
$explnum_id = mysql_insert_id();
return $explnum_id;
}
示例7: show_docnum_table
function show_docnum_table($docnum_tab = array())
{
global $charset;
create_tableau_mimetype();
$display = "";
if ($docnum_tab) {
$nb_doc = 0;
$display .= "<table>\r\n\t\t\t<tbody>";
for ($i = 0; $i < count($docnum_tab); $i++) {
$nb_doc++;
if ($nb_doc == 1) {
$display .= "<tr>";
}
$alt = htmlentities($docnum_tab[$i]['explnum_doc_nomfichier'], ENT_QUOTES, $charset) . ' - ' . htmlentities($docnum_tab[$i]['explnum_doc_mimetype'], ENT_QUOTES, $charset);
$display .= "<td class='docnum' style='width:25%;border:1px solid #CCCCCC;padding : 5px 5px'>\r\n\t\t\t\t<a target='_blank' alt='{$alt}' title='{$alt}' href=\"./explnum_doc.php?explnumdoc_id=" . $docnum_tab[$i]['id_explnum_doc'] . "\">\r\n\t\t\t\t<img src='" . get_url_icon('mimetype/' . icone_mimetype($docnum_tab[$i]['explnum_doc_mimetype'], $docnum_tab[$i]['explnum_doc_extfichier'])) . "' alt='{$alt}' title='{$alt}' >\r\n\t\t\t\t</a>\r\n\t\t\t\t<br />\r\n\t\t\t\t<div class='explnum_type'>" . $docnum_tab[$i]['explnum_doc_mimetype'] . "</div>\r\n\t\t\t\t</td>\r\n\t\t\t\t";
if ($nb_doc == 4) {
$display .= "</tr>";
$nb_doc = 0;
}
}
$display .= "</tbody></table>";
}
return $display;
}
示例8: getMetadata
/**
* @param $name : file name
* @param $filename : file name with path
* @return Array : le tableau des métadonnées du fichier
*/
static function getMetadata($filename, $name)
{
\create_tableau_mimetype();
$mimetype = \trouve_mimetype($filename, extension_fichier($name));
if ($mimetype == "application/epub+zip") {
//récupération de l'image
$epub = new \epubData(realpath($filename));
//TODO : Vérifier la récupération des métadonnées d'un epub avec \extract_metas(), sinon rétablir les commentaires ici et le else plus bas
// $tmp=array();
// $tmp=$epub->metas;
// foreach($tmp as $key=>$val){
// $metas[strtoupper(substr($key,0,1)).substr($key,1)]=$val;
// }
$img = imagecreatefromstring($epub->getCoverContent());
$file = tempnam(sys_get_temp_dir(), "vign");
imagepng($img, $file);
$entry['thumbnail_url'] = 'data:image/png;base64,' . base64_encode(file_get_contents($file));
unlink($file);
}
// else{
return \extract_metas(realpath($filename), $mimetype);
// }
}
示例9: show_explnum_per_id
/**
* Fonction retournant les infos d'exemplaires numériques pour une notice ou un bulletin donné
* @param int $explnum_id Identifiant du document numérique
* @return string
*/
function show_explnum_per_id($explnum_id, $link_explnum = "")
{
global $dbh;
global $charset;
global $opac_url_base;
global $opac_visionneuse_allow;
global $opac_photo_filtre_mimetype;
global $opac_explnum_order;
global $opac_show_links_invisible_docnums;
global $gestion_acces_active, $gestion_acces_empr_notice, $gestion_acces_empr_docnum;
global $search_terms;
if (!$explnum_id) {
return "";
}
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
create_tableau_mimetype();
// récupération des infos du document
$query = "select explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier , explnum_docnum_statut FROM explnum WHERE explnum_id = " . $explnum_id;
$result = pmb_mysql_query($query, $dbh);
if ($result && pmb_mysql_num_rows($result)) {
if ($explnum = pmb_mysql_fetch_object($result)) {
$docnum_visible = true;
$id_for_right = $explnum->explnum_notice;
if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
$ac = new acces();
$dom_2 = $ac->setDomain(2);
$docnum_visible = $dom_2->getRights($_SESSION['id_empr_session'], $id_for_right, 16);
} else {
$requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='" . $id_for_right . "' and id_notice_statut=statut ";
$myQuery = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($myQuery)) {
$statut_temp = pmb_mysql_fetch_object($myQuery);
if (!$statut_temp->explnum_visible_opac) {
$docnum_visible = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$docnum_visible = false;
}
} else {
$docnum_visible = false;
}
}
if ($docnum_visible) {
if ($gestion_acces_active == 1 && $gestion_acces_empr_docnum == 1) {
$ac = new acces();
$dom_3 = $ac->setDomain(3);
$docnum_visible = $dom_3->getRights($_SESSION['id_empr_session'], $explnum->explnum_id, 16);
} else {
$requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM explnum, explnum_statut WHERE explnum_id ='" . $explnum->explnum_id . "' and id_explnum_statut=explnum_docnum_statut ";
$myQuery = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($myQuery)) {
$statut_temp = pmb_mysql_fetch_object($myQuery);
if (!$statut_temp->explnum_visible_opac) {
$docnum_visible = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$docnum_visible = false;
}
} else {
$docnum_visible = false;
}
}
}
if ($link_explnum) {
$tlink = str_replace("!!explnum_id!!", $explnum->explnum_id, $link_explnum);
$tlink = str_replace("!!notice_id!!", $explnum->explnum_notice, $tlink);
$tlink = str_replace("!!bulletin_id!!", $explnum->explnum_bulletin, $tlink);
}
$alt = htmlentities($explnum->explnum_nom . " - " . $explnum->explnum_mimetype, ENT_QUOTES, $charset);
// couleur de l'img en fonction du statut
if ($expl->explnum_docnum_statut) {
$rqt_st = "SELECT * FROM explnum_statut WHERE id_explnum_statut='" . $expl->explnum_docnum_statut . "' ";
$Query_statut = pmb_mysql_query($rqt_st, $dbh) or die($rqt_st . " " . pmb_mysql_error());
$r_statut = pmb_mysql_fetch_object($Query_statut);
$class_img = " class='docnum_" . $r_statut->class_html . "' ";
if ($expl->explnum_docnum_statut > 1) {
$txt = $r_statut->opac_libelle;
} else {
$txt = "";
}
$statut_libelle_div = "\r\n\t\t\t\t\t<div id='zoom_statut_docnum" . $expl->explnum_id . "' style='border: 2px solid rgb(85, 85, 85); background-color: rgb(255, 255, 255); position: absolute; z-index: 2000; display: none;'>\r\n\t\t\t\t\t\t<b>{$txt}</b>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t";
} else {
$class_img = " class='docnum_statutnot1' ";
$txt = "";
}
if ($explnum->explnum_vignette) {
$obj = "<img src='" . $opac_url_base . "vig_num.php?explnum_id={$explnum->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
} else {
// trouver l'icone correspondant au mime_type
$obj = "<img src='" . get_url_icon('mimetype/' . icone_mimetype($explnum->explnum_mimetype, $explnum->explnum_extfichier), 1) . "' alt='{$alt}' title='{$alt}' border='0'>";
}
$explnum_liste_obj = "<center>";
$obj .= "{$statut_libelle_div}\r\n\t\t\t\t<a href='#' onmouseout=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display='none'; \" onmouseover=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display=''; \">\r\n\t\t\t\t\t<div class='vignette_doc_num' ><img {$class_img} width='10' height='10' src='./images/spacer.gif'></div>\r\n\t\t\t\t</a>\r\n\t\t\t";
$words_to_find = "";
if ($explnum->explnum_mimetype == 'application/pdf' || $explnum->explnum_mimetype == 'URL' && strpos($explnum->explnum_nom, '.pdf') !== false) {
//.........这里部分代码省略.........
示例10: run_index
/**
* Exécution du processus d'indexation
*/
function run_index()
{
if ($this->mimetype == 'URL') {
//récupération par cURL
$this->get_file_from_curl($this->file_url);
create_tableau_mimetype();
$this->mimetype = trouve_mimetype($this->fichier);
if (!$this->mimetype) {
//Test sur l'extension du fichier
$this->ext = extension_fichier($this->file_url);
$this->mimetype = trouve_mimetype($this->file_url, $this->ext);
}
if (!$this->mimetype && $this->explnum_nomfichier) {
//Test sur l'extension du fichier
$this->ext = extension_fichier($this->explnum_nomfichier);
$this->mimetype = trouve_mimetype($this->file_url, $this->ext);
}
if ($this->mimetype && !$this->ext) {
$this->ext = extension_fichier($this->file_url);
}
if ($this->mimetype && $this->explnum_nomfichier && !$this->ext) {
$this->ext = extension_fichier($this->explnum_nomfichier);
}
if (!$this->mimetype) {
$this->mimetype = "URL";
}
global $prefix_url_image;
if ($prefix_url_image) {
$tmpprefix_url_image = $prefix_url_image;
} else {
$tmpprefix_url_image = "./";
}
if ($tmp = construire_vignette('', "", $this->file_url)) {
$this->vignette = $tmp;
} else {
$this->vignette = construire_vignette('', $tmpprefix_url_image . "images/mimetype/" . icone_mimetype($this->mimetype, $this->ext));
}
} else {
//récupération dans la base
$this->get_file($this->file_content);
create_tableau_mimetype();
if (!$this->mimetype) {
$this->mimetype = trouve_mimetype($this->fichier);
}
if (!$this->mimetype && $this->explnum_nomfichier) {
//Test sur l'extension du fichier
$this->ext = extension_fichier($this->explnum_nomfichier);
$this->mimetype = trouve_mimetype($this->fichier, $this->ext);
}
}
if (file_exists($this->fichier)) {
//On parse le XML pour recupérer le nom de la classe
$this->parse_xml();
//On choisit la classe correspondant au traitement du type MIME
$this->choose_class($this->class_associee);
}
}
示例11: get_file_from_temp
function get_file_from_temp($filename, $name, $upload_place)
{
global $base_path;
global $ck_index;
global $id_rep, $up_place;
$up_place = $upload_place;
create_tableau_mimetype();
$ck_index = true;
//Initialisation des tableaux d'infos
$this->infos_docnum = $this->params = array();
$this->infos_docnum["mime"] = trouve_mimetype($filename, extension_fichier($name));
$this->infos_docnum["nom"] = substr($name, 0, strrpos($name, "."));
if (!$this->infos_docnum["nom"]) {
$this->infos_docnum["nom"] = $name;
}
$this->infos_docnum["notice"] = $this->explnum_notice;
$this->infos_docnum["bull"] = $this->explnum_bulletin;
$this->infos_docnum["url"] = "";
$this->infos_docnum["fic"] = false;
$this->infos_docnum["contenu_vignette"] = construire_vignette('', substr($filename, strrpos($filename, "/")));
$this->infos_docnum["userfile_name"] = $name;
$this->infos_docnum["userfile_ext"] = extension_fichier($name);
if ($up_place && $id_rep != 0) {
$upfolder = new upload_folder($id_rep);
$chemin_hasher = "/";
if ($upfolder->isHashing()) {
$rep = $upfolder->hachage($this->infos_docnum["userfile_name"]);
@mkdir($rep);
$chemin_hasher = $upfolder->formate_path_to_nom($rep);
$file_name = $rep . $this->infos_docnum["userfile_name"];
$chemin = $upfolder->formate_path_to_save($chemin_hasher);
} else {
$file_name = $upfolder->get_path($this->infos_docnum["userfile_name"]) . $this->infos_docnum["userfile_name"];
$chemin = $upfolder->formate_path_to_save("/");
}
$this->infos_docnum["path"] = $chemin;
$file_name = $upfolder->encoder_chaine($file_name);
if (!$this->explnum_nomfichier) {
//Si je suis en création de fichier numérique
$nom_tmp = $this->infos_docnum["userfile_name"];
$continue = true;
$compte = 1;
do {
$query = "select explnum_notice,explnum_id from explnum where explnum_nomfichier = '" . addslashes($nom_tmp) . "' AND explnum_repertoire='" . $id_rep . "' AND explnum_path='" . addslashes($this->infos_docnum["path"]) . "'";
$result = mysql_query($query);
if (mysql_num_rows($result) && mysql_result($result, 0, 0) != $this->infos_docnum["notice"]) {
//Si j'ai déjà un document numérique avec ce fichier pour une autre notice je dois le renommer pour ne pas perdre l'ancien
if (preg_match("/^(.+)(\\..+)\$/i", $this->infos_docnum["userfile_name"], $matches)) {
$nom_tmp = $matches[1] . "_" . $compte . $matches[2];
} else {
$nom_tmp = $this->infos_docnum["userfile_name"] . "_" . $compte;
}
$compte++;
} else {
if (mysql_num_rows($result)) {
//J'ai déjà ce fichier pour cette notice
//Je dois enlever l'ancien document numérique pour ne pas l'avoir en double
$old_docnum = new explnum(mysql_result($result, 0, 1));
$old_docnum->delete();
} else {
}
$continue = false;
}
} while ($continue);
if ($compte != 1) {
$this->infos_docnum["userfile_name"] = $nom_tmp;
if ($upfolder->isHashing()) {
$file_name = $rep . $this->infos_docnum["userfile_name"];
} else {
$file_name = $upfolder->get_path($this->infos_docnum["userfile_name"]) . $this->infos_docnum["userfile_name"];
}
$file_name = $upfolder->encoder_chaine($file_name);
} else {
}
} else {
}
rename($filename, $file_name);
} else {
//enregistrement en base
$this->infos_docnum["contenu"] = file_get_contents($filename);
}
$this->params["maj_mimetype"] = true;
$this->params["maj_data"] = true;
$this->params["maj_vignette"] = true;
}
示例12: show_explnum_per_notice
function show_explnum_per_notice($no_notice, $no_bulletin, $link_expl = '')
{
global $class_path;
require_once $class_path . "/auth_popup.class.php";
// params :
// $link_expl= lien associé à l'exemplaire avec !!explnum_id!! à mettre à jour
global $dbh, $msg, $charset;
global $opac_url_base;
global $opac_visionneuse_allow;
global $opac_photo_filtre_mimetype;
global $opac_explnum_order;
global $opac_show_links_invisible_docnums;
global $gestion_acces_active, $gestion_acces_empr_notice;
if (!$no_notice && !$no_bulletin) {
return "";
}
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
create_tableau_mimetype();
// récupération du nombre d'exemplaires
$requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier FROM explnum WHERE ";
if ($no_notice && !$no_bulletin) {
$requete .= "explnum_notice='{$no_notice}' ";
} elseif (!$no_notice && $no_bulletin) {
$requete .= "explnum_bulletin='{$no_bulletin}' ";
} elseif ($no_notice && $no_bulletin) {
$requete .= "explnum_bulletin='{$no_bulletin}' or explnum_notice='{$no_notice}' ";
}
if ($opac_explnum_order) {
$requete .= " order by " . $opac_explnum_order;
} else {
$requete .= " order by explnum_mimetype, explnum_nom, explnum_id ";
}
$res = pmb_mysql_query($requete, $dbh);
$nb_ex = pmb_mysql_num_rows($res);
$docnum_visible = true;
$id_for_right = $no_notice;
if ($no_bulletin) {
$query = "select num_notice,bulletin_notice from bulletins where bulletin_id = " . $no_bulletin;
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
$infos = pmb_mysql_fetch_object($result);
if ($infos->num_notice) {
$id_for_right = $infos->num_notice;
} else {
$id_for_right = $infos->bulletin_notice;
}
}
}
if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
$ac = new acces();
$dom_2 = $ac->setDomain(2);
$docnum_visible = $dom_2->getRights($_SESSION['id_empr_session'], $id_for_right, 16);
} else {
$requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='" . $id_for_right . "' and id_notice_statut=statut ";
$myQuery = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($myQuery)) {
$statut_temp = pmb_mysql_fetch_object($myQuery);
if (!$statut_temp->explnum_visible_opac) {
$docnum_visible = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$docnum_visible = false;
}
} else {
$docnum_visible = false;
}
}
//on peut appeller cette méthode sans avoir le droit de voir les documents...
if (!$docnum_visible && $opac_show_links_invisible_docnums) {
$auth_popup = new auth_popup();
}
if ($nb_ex) {
// on récupère les données des exemplaires
$i = 1;
global $search_terms;
while ($expl = pmb_mysql_fetch_object($res)) {
if ($i == 1) {
$ligne = "<tr><td class='docnum' width='33%'>!!1!!</td><td class='docnum' width='33%'>!!2!!</td><td class='docnum' width='33%'>!!3!!</td></tr>";
}
if ($link_expl) {
$tlink = str_replace("!!explnum_id!!", $expl->explnum_id, $link_expl);
$tlink = str_replace("!!notice_id!!", $expl->explnum_notice, $tlink);
$tlink = str_replace("!!bulletin_id!!", $expl->explnum_bulletin, $tlink);
}
$alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
if ($expl->explnum_vignette) {
$obj = "<img src='" . $opac_url_base . "vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
} else {
// trouver l'icone correspondant au mime_type
$obj = "<img src='" . $opac_url_base . "images/mimetype/" . icone_mimetype($expl->explnum_mimetype, $expl->explnum_extfichier) . "' alt='{$alt}' title='{$alt}' border='0'>";
}
$expl_liste_obj = "<center>";
$words_to_find = "";
if ($expl->explnum_mimetype == 'application/pdf' || $expl->explnum_mimetype == 'URL' && strpos($expl->explnum_nom, '.pdf') !== false) {
if (is_array($search_terms)) {
$words_to_find = "#search=\"" . trim(str_replace('*', '', implode(' ', $search_terms))) . "\"";
}
}
//si l'affichage du lien vers les documents numériques est forcé et qu'on est pas connecté, on propose l'invite de connexion!
if (!$docnum_visible && !$_SESSION['user_code'] && $opac_show_links_invisible_docnums) {
//.........这里部分代码省略.........
示例13: get_explnums_datas
/**
* Retourne les infos de documents numériques associés à la notice
* @return array
*/
public function get_explnums_datas()
{
if (!isset($this->explnums_datas)) {
global $dbh;
global $charset;
global $opac_url_base;
global $opac_visionneuse_allow;
global $opac_photo_filtre_mimetype;
global $opac_explnum_order;
global $opac_show_links_invisible_docnums;
global $gestion_acces_active, $gestion_acces_empr_notice, $gestion_acces_empr_docnum;
$this->explnums_datas = array('nb_explnums' => 0, 'explnums' => array(), 'visionneuse_script' => '
<script type="text/javascript">
if(typeof(sendToVisionneuse) == "undefined"){
var sendToVisionneuse = function (explnum_id){
document.getElementById("visionneuseIframe").src = "visionneuse.php?"+(typeof(explnum_id) != "undefined" ? "explnum_id="+explnum_id : "");
}
}
</script>');
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
if (!count($_mimetypes_bymimetype_)) {
create_tableau_mimetype();
}
$this->get_bul_info();
// récupération du nombre d'exemplaires
$query = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier, explnum_docnum_statut FROM explnum WHERE ";
if ($this->get_niveau_biblio() != 'b') {
$query .= "explnum_notice='" . $this->id . "' ";
} else {
$query .= "explnum_bulletin='" . $this->parent['bulletin_id'] . "' or explnum_notice='" . $this->id . "' ";
}
$query .= "union SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier, explnum_docnum_statut\n\t\t\tFROM explnum, bulletins\n\t\t\tWHERE bulletin_id = explnum_bulletin\n\t\t\tAND bulletins.num_notice='" . $this->id . "'";
if ($opac_explnum_order) {
$query .= " order by " . $opac_explnum_order;
} else {
$query .= " order by explnum_mimetype, explnum_nom, explnum_id ";
}
$res = pmb_mysql_query($query, $dbh);
$nb_explnums = pmb_mysql_num_rows($res);
$docnum_visible = true;
if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
$docnum_visible = $this->dom_2->getRights($_SESSION['id_empr_session'], $this->id, 16);
} else {
$query = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='" . $this->id . "' and id_notice_statut=statut ";
$result = pmb_mysql_query($query, $dbh);
if ($result && pmb_mysql_num_rows($result)) {
$statut_temp = pmb_mysql_fetch_object($result);
if (!$statut_temp->explnum_visible_opac) {
$docnum_visible = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$docnum_visible = false;
}
} else {
$docnum_visible = false;
}
}
if ($nb_explnums && ($docnum_visible || $opac_show_links_invisible_docnums)) {
// on récupère les données des exemplaires
global $search_terms;
while ($expl = pmb_mysql_fetch_object($res)) {
// couleur de l'img en fonction du statut
if ($expl->explnum_docnum_statut) {
$rqt_st = "SELECT * FROM explnum_statut WHERE id_explnum_statut='" . $expl->explnum_docnum_statut . "' ";
$Query_statut = pmb_mysql_query($rqt_st, $dbh) or die($rqt_st . " " . pmb_mysql_error());
$r_statut = pmb_mysql_fetch_object($Query_statut);
$explnum_class = 'docnum_' . $r_statut->class_html;
if ($expl->explnum_docnum_statut > 1) {
$explnum_opac_label = $r_statut->opac_libelle;
} else {
$explnum_opac_label = '';
}
} else {
$explnum_class = 'docnum_statutnot1';
$explnum_opac_label = '';
}
$explnum_docnum_visible = true;
$explnum_docnum_consult = true;
if ($gestion_acces_active == 1 && $gestion_acces_empr_docnum == 1) {
$explnum_docnum_visible = $this->dom_3->getRights($_SESSION['id_empr_session'], $expl->explnum_id, 16);
$explnum_docnum_consult = $this->dom_3->getRights($_SESSION['id_empr_session'], $expl->explnum_id, 4);
} else {
$requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon, explnum_consult_opac, explnum_consult_opac_abon FROM explnum, explnum_statut WHERE explnum_id ='" . $expl->explnum_id . "' and id_explnum_statut=explnum_docnum_statut ";
$myQuery = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($myQuery)) {
$statut_temp = pmb_mysql_fetch_object($myQuery);
if (!$statut_temp->explnum_visible_opac) {
$explnum_docnum_visible = false;
}
if (!$statut_temp->explnum_consult_opac) {
$explnum_docnum_consult = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$explnum_docnum_visible = false;
}
if ($statut_temp->explnum_consult_opac_abon && !$_SESSION['id_empr_session']) {
//.........这里部分代码省略.........
示例14: show_explnum_per_id
/**
* Fonction retournant les infos d'exemplaires numériques pour une notice ou un bulletin donné
* @param int $explnum_id Identifiant du document numérique
* @return string
*/
function show_explnum_per_id($explnum_id, $link_explnum = "")
{
global $dbh;
global $charset;
global $opac_url_base;
global $opac_visionneuse_allow;
global $opac_photo_filtre_mimetype;
global $opac_explnum_order;
global $opac_show_links_invisible_docnums;
global $gestion_acces_active, $gestion_acces_empr_notice;
global $search_terms;
if (!$explnum_id) {
return "";
}
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
create_tableau_mimetype();
// récupération des infos du document
$query = "select explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier FROM explnum WHERE explnum_id = " . $explnum_id;
$result = mysql_query($query, $dbh);
if ($result && mysql_num_rows($result)) {
if ($explnum = mysql_fetch_object($result)) {
$docnum_visible = true;
$id_for_right = $explnum->explnum_notice;
if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
$ac = new acces();
$dom_2 = $ac->setDomain(2);
$docnum_visible = $dom_2->getRights($_SESSION['id_empr_session'], $id_for_right, 16);
} else {
$requete = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM notices, notice_statut WHERE notice_id ='" . $id_for_right . "' and id_notice_statut=statut ";
$myQuery = mysql_query($requete, $dbh);
if (mysql_num_rows($myQuery)) {
$statut_temp = mysql_fetch_object($myQuery);
if (!$statut_temp->explnum_visible_opac) {
$docnum_visible = false;
}
if ($statut_temp->explnum_visible_opac_abon && !$_SESSION['id_empr_session']) {
$docnum_visible = false;
}
} else {
$docnum_visible = false;
}
}
//on peut appeller cette méthode sans avoir le droit de voir les documents...
if (!$docnum_visible && $opac_show_links_invisible_docnums) {
$auth_popup = new auth_popup();
}
if ($link_explnum) {
$tlink = str_replace("!!explnum_id!!", $explnum->explnum_id, $link_explnum);
$tlink = str_replace("!!notice_id!!", $explnum->explnum_notice, $tlink);
$tlink = str_replace("!!bulletin_id!!", $explnum->explnum_bulletin, $tlink);
}
$alt = htmlentities($explnum->explnum_nom . " - " . $explnum->explnum_mimetype, ENT_QUOTES, $charset);
if ($explnum->explnum_vignette) {
$obj = "<img src='" . $opac_url_base . "vig_num.php?explnum_id={$explnum->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
} else {
// trouver l'icone correspondant au mime_type
$obj = "<img src='" . $opac_url_base . "images/mimetype/" . icone_mimetype($explnum->explnum_mimetype, $explnum->explnum_extfichier) . "' alt='{$alt}' title='{$alt}' border='0'>";
}
$explnum_liste_obj = "<center>";
$words_to_find = "";
if ($explnum->explnum_mimetype == 'application/pdf' || $explnum->explnum_mimetype == 'URL' && strpos($explnum->explnum_nom, '.pdf') !== false) {
if (is_array($search_terms)) {
$words_to_find = "#search=\"" . trim(str_replace('*', '', implode(' ', $search_terms))) . "\"";
}
}
//si l'affichage du lien vers les documents numériques est forcé et qu'on est pas connecté, on propose l'invite de connexion!
if (!$docnum_visible && !$_SESSION['user_code'] && $opac_show_links_invisible_docnums) {
if ($opac_visionneuse_allow) {
$allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
}
if ($allowed_mimetype && in_array($explnum->explnum_mimetype, $allowed_mimetype)) {
$link = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction sendToVisionneuse_" . $explnum->explnum_id . "(){\n\t\t\t\t\t\t\t\topen_visionneuse(sendToVisionneuse," . $explnum->explnum_id . ");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"auth_popup('./ajax.php?module=ajax&categ=auth&callback_func=sendToVisionneuse_" . $explnum->explnum_id . "');\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
$explnum_liste_obj .= $link;
} else {
$link = "\n\t\t\t\t\t\t<a href='#' onclick=\"auth_popup('./ajax.php?module=ajax&categ=auth&new_tab=1&callback_url=" . rawurlencode($opac_url_base . "doc_num.php?explnum_id=" . $explnum->explnum_id) . "')\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
$explnum_liste_obj .= $link;
}
} else {
if ($opac_visionneuse_allow) {
$allowed_mimetype = explode(",", str_replace("'", "", $opac_photo_filtre_mimetype));
}
if ($allowed_mimetype && in_array($explnum->explnum_mimetype, $allowed_mimetype)) {
$link = "\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tif(typeof(sendToVisionneuse) == 'undefined'){\n\t\t\t\t\t\t\t\tvar sendToVisionneuse = function (explnum_id){\n\t\t\t\t\t\t\t\t\tdocument.getElementById('visionneuseIframe').src = 'visionneuse.php?'+(typeof(explnum_id) != 'undefined' ? 'explnum_id='+explnum_id+\"\" : '\\'');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>\n\t\t\t\t\t\t<a href='#' onclick=\"open_visionneuse(sendToVisionneuse," . $explnum->explnum_id . ");return false;\" alt='{$alt}' title='{$alt}'>" . $obj . "</a><br />";
$explnum_liste_obj .= $link;
} else {
$suite_url_explnum = "doc_num.php?explnum_id={$explnum->explnum_id}";
$explnum_liste_obj .= "<a href='" . $opac_url_base . $suite_url_explnum . "' alt='{$alt}' title='{$alt}' target='_blank'>" . $obj . "</a><br />";
}
}
if ($_mimetypes_byext_[$explnum->explnum_extfichier]["label"]) {
$explnummime_nom = $_mimetypes_byext_[$explnum->explnum_extfichier]["label"];
} elseif ($_mimetypes_bymimetype_[$explnum->explnum_mimetype]["label"]) {
$explnummime_nom = $_mimetypes_bymimetype_[$explnum->explnum_mimetype]["label"];
} else {
$explnummime_nom = $explnum->explnum_mimetype;
//.........这里部分代码省略.........
示例15: show_explnum_in_relation
function show_explnum_in_relation($no_notice, $link_expl = '', $param_aff = array())
{
global $dbh;
global $charset;
global $base_path, $msg;
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
global $prefix_url_image;
if (!$no_notice) {
return "";
}
create_tableau_mimetype();
// recuperation du nombre d'exemplaires
$requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_url, explnum_vignette, explnum_nomfichier, explnum_extfichier, explnum_docnum_statut\n\t\t\tFROM explnum \n\t\t\tJOIN index_concept on index_concept.num_object = explnum_id AND index_concept.type_object=11\n\t\t\tJOIN vedette_link on vedette_link.num_object=index_concept.num_concept AND vedette_link.type_object=1\n\t\t\tJOIN vedette_object on vedette_object.num_vedette=vedette_link.num_vedette AND vedette_object.object_type=10 and vedette_object.object_id='{$no_notice}'\n\t\t\tORDER BY explnum_mimetype, explnum_id ";
$res = pmb_mysql_query($requete, $dbh) or die($requete . " " . pmb_mysql_error());
$nb_ex = pmb_mysql_num_rows($res);
if ($nb_ex) {
// on recupere les donnees des exemplaires
$i = 1;
while ($expl = pmb_mysql_fetch_object($res)) {
// couleur de l'img en fonction du statut
if ($expl->explnum_docnum_statut) {
$rqt_st = "SELECT * FROM explnum_statut WHERE id_explnum_statut='" . $expl->explnum_docnum_statut . "' ";
$Query_statut = pmb_mysql_query($rqt_st, $dbh) or die($rqt_st . " " . pmb_mysql_error());
$r_statut = pmb_mysql_fetch_object($Query_statut);
$class_img = " class='docnum_" . $r_statut->class_html . "' ";
if ($expl->explnum_docnum_statut > 1) {
$txt = $r_statut->opac_libelle;
} else {
$txt = "";
}
$statut_libelle_div = "\n\t\t\t\t\t<div id='zoom_statut_docnum" . $expl->explnum_id . "' style='border: 2px solid rgb(85, 85, 85); background-color: rgb(255, 255, 255); position: absolute; z-index: 2000; display: none;'>\n\t\t\t\t\t<b>{$txt}</b>\n\t\t\t\t\t</div>\n\t\t\t\t\t";
} else {
$class_img = " class='docnum_statutnot1' ";
$txt = "";
}
if ($i == 1) {
$ligne = "<tr><td class='docnum' width='25%'>!!1!!</td><td class='docnum' width='25%'>!!2!!</td><td class='docnum' width='25%'>!!3!!</td><td class='docnum' width='25%'>!!4!!</td></tr>";
}
if ($link_expl) {
$tlink = str_replace("!!explnum_id!!", $expl->explnum_id, $link_expl);
$tlink = str_replace("!!notice_id!!", $expl->explnum_notice, $tlink);
$tlink = str_replace("!!bulletin_id!!", $expl->explnum_bulletin, $tlink);
}
$alt = htmlentities($expl->explnum_nom . " - " . $expl->explnum_mimetype, ENT_QUOTES, $charset);
if ($prefix_url_image) {
$tmpprefix_url_image = $prefix_url_image;
} else {
$tmpprefix_url_image = "./";
}
if ($expl->explnum_vignette) {
$obj = "<img src='" . $tmpprefix_url_image . "vig_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' border='0'>";
} else {
// trouver l'icone correspondant au mime_type
$obj = "<img src='" . $tmpprefix_url_image . "images/mimetype/" . icone_mimetype($expl->explnum_mimetype, $expl->explnum_extfichier) . "' alt='{$alt}' title='{$alt}' border='0'>";
}
$obj_suite = "{$statut_libelle_div}\n\t\t\t<a href='#' onmouseout=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display='none'; \" onmouseover=\"z=document.getElementById('zoom_statut_docnum" . $expl->explnum_id . "'); z.style.display=''; \">\n\t\t\t<div class='vignette_doc_num' ><img {$class_img} width='10' height='10' src='./images/spacer.gif'></div>\n\t\t\t</a>\n\t\t\t";
$expl_liste_obj = "<center>";
$expl_liste_obj .= "<a href='" . $tmpprefix_url_image . "doc_num.php?explnum_id={$expl->explnum_id}' alt='{$alt}' title='{$alt}' target='_blank'>" . $obj . "</a>{$obj_suite}<br />";
if ($_mimetypes_byext_[$expl->explnum_extfichier]["label"]) {
$explmime_nom = $_mimetypes_byext_[$expl->explnum_extfichier]["label"];
} elseif ($_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"]) {
$explmime_nom = $_mimetypes_bymimetype_[$expl->explnum_mimetype]["label"];
} else {
$explmime_nom = $expl->explnum_mimetype;
}
if ($param_aff["mine_type"]) {
$explmime_nom = "";
}
if ($tlink) {
$expl_liste_obj .= "<a href='{$tlink}'>";
$expl_liste_obj .= htmlentities($expl->explnum_nom, ENT_QUOTES, $charset) . "</a><div class='explnum_type'>" . htmlentities($explmime_nom, ENT_QUOTES, $charset) . "</div>";
} else {
$expl_liste_obj .= htmlentities($expl->explnum_nom, ENT_QUOTES, $charset) . "<div class='explnum_type'>" . htmlentities($explmime_nom, ENT_QUOTES, $charset) . "</div>";
}
//recherche des concepts...
$query = "select num_concept,value from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where num_object = " . $expl->explnum_id . " and type_object = 11 order by order_concept";
$result = pmb_mysql_query($query, $dbh);
$concept = "";
if (pmb_mysql_num_rows($result)) {
while ($row = pmb_mysql_fetch_object($result)) {
if ($concept) {
$concept .= " / ";
}
if (SESSrights & AUTORITES_AUTH) {
$concept .= "<a href='" . $base_path . "/autorites.php?categ=see&sub=concept&id=" . $row->num_concept . "' title='" . addslashes($msg['concept_menu'] . ": " . htmlentities($row->value, ENT_QUOTES, $charset)) . "'>" . htmlentities($row->value, ENT_QUOTES, $charset) . "</a>";
} else {
$concept .= "<span title='" . addslashes($msg['concept_menu'] . ": " . htmlentities($row->value, ENT_QUOTES, $charset)) . "'>" . htmlentities($row->value, ENT_QUOTES, $charset) . "</span>";
}
}
}
$expl_liste_obj .= $concept . "</center>";
$ligne = str_replace("!!{$i}!!", $expl_liste_obj, $ligne);
$i++;
if ($i == 5) {
$ligne_finale .= $ligne;
$i = 1;
}
}
if (!$ligne_finale) {
$ligne_finale = $ligne;
//.........这里部分代码省略.........