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


PHP get_notice_authors函数代码示例

本文整理汇总了PHP中get_notice_authors函数的典型用法代码示例。如果您正苦于以下问题:PHP get_notice_authors函数的具体用法?PHP get_notice_authors怎么用?PHP get_notice_authors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_info_expl

function get_info_expl($cb_doc)
{
    global $dbh, $msg;
    $requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, expl_cote, expl_location,pret_date, pret_retour, tdoc_libelle, section_libelle, location_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
    $requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
    $requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
    $requete .= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol ";
    $requete .= " FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type, docs_section, docs_location, pret ";
    $requete .= " WHERE expl_cb='" . $cb_doc . "' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id  ";
    $res = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error());
    $expl = pmb_mysql_fetch_object($res);
    $responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
    $as = array_search("0", $responsabilites["responsabilites"]);
    if ($as !== FALSE && $as !== NULL) {
        $auteur_0 = $responsabilites["auteurs"][$as];
        $auteur = new auteur($auteur_0["id"]);
        $header_aut .= $auteur->isbd_entry;
    } else {
        $aut1_libelle = array();
        $as = array_keys($responsabilites["responsabilites"], "1");
        for ($i = 0; $i < count($as); $i++) {
            $indice = $as[$i];
            $auteur_1 = $responsabilites["auteurs"][$indice];
            $auteur = new auteur($auteur_1["id"]);
            $aut1_libelle[] = $auteur->isbd_entry;
        }
        $header_aut .= implode(", ", $aut1_libelle);
    }
    $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
    $expl->header_aut = $header_aut;
    // récupération du titre de série
    if ($expl->tparent_id && $expl->m_id) {
        $parent = new serie($expl->tparent_id);
        $tit_serie = $parent->name;
        if ($expl->tnvol) {
            $tit_serie .= ', ' . $expl->tnvol;
        }
    }
    if ($tit_serie) {
        $expl->tit = $tit_serie . '. ' . $expl->tit;
    }
    return $expl;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:43,代码来源:func.inc.php

示例2: get_data_resa

 public function get_data_resa($id_resa_print)
 {
     global $dbh, $msg;
     $dates_resa_sql = " date_format(resa_date_debut, '" . $msg["format_date"] . "') as aff_resa_date_debut, date_format(resa_date_fin, '" . $msg["format_date"] . "') as aff_resa_date_fin ";
     $requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, resa_date_debut, resa_date_fin, resa_cb, resa_loc_retrait, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, " . $dates_resa_sql;
     $requete .= "FROM (((resa LEFT JOIN notices AS notices_m ON resa_idnotice = notices_m.notice_id ) LEFT JOIN bulletins ON resa_idbulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) ";
     $requete .= "WHERE id_resa='" . $id_resa_print . "' ";
     $res = pmb_mysql_query($requete, $dbh);
     $expl = pmb_mysql_fetch_object($res);
     $responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
     $as = array_search("0", $responsabilites["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $responsabilites["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $header_aut .= $auteur->isbd_entry;
     } else {
         $aut1_libelle = array();
         $as = array_keys($responsabilites["responsabilites"], "1");
         for ($i = 0; $i < count($as); $i++) {
             $indice = $as[$i];
             $auteur_1 = $responsabilites["auteurs"][$indice];
             $auteur = new auteur($auteur_1["id"]);
             $aut1_libelle[] = $auteur->isbd_entry;
         }
         $header_aut .= implode(", ", $aut1_libelle);
     }
     //$header_aut ? $auteur=" / ".$header_aut : $auteur="";
     $rqt_detail = "select resa_confirmee, resa_cb,location_libelle, expl_cote from resa\r\n\t\tleft join exemplaires on expl_cb=resa_cb\r\n\t\tleft join docs_location on idlocation=expl_location\r\n\t\twhere id_resa ={$id_resa_print}  and resa_cb is not null and resa_cb!='' ";
     $res_detail = pmb_mysql_query($rqt_detail);
     $expl_detail = pmb_mysql_fetch_object($res_detail);
     $data_resa["id"] = $id_resa_print;
     $data_resa["titre"] = $expl->tit;
     $data_resa["auteur"] = $header_aut;
     $data_resa["cb"] = $expl->resa_cb;
     $data_resa["cote"] = $expl->expl_cote;
     $data_resa["date_debut"] = $expl->aff_resa_date_debut;
     $data_resa["date_fin"] = $expl->aff_resa_date_fin;
     $i = count($this->data["resa_list"]);
     $this->data["resa_list"][$i] = $data_resa;
     return $data_resa;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:41,代码来源:printer_data.class.php

示例3: m_not_bull_info_resa

function m_not_bull_info_resa($id_empr, $notice, $bulletin)
{
    global $msg;
    $res_final = array();
    $dates_resa_sql = "date_format(resa_date, '" . $msg["format_date"] . "') as date_pose_resa, IF(resa_date_fin>sysdate() or resa_date_fin='0000-00-00',0,1) as perimee, if(resa_date_debut='0000-00-00', '', date_format(resa_date_debut, '" . $msg["format_date"] . "')) as aff_resa_date_debut, if(resa_date_fin='0000-00-00', '', date_format(resa_date_fin, '" . $msg["format_date"] . "')) as aff_resa_date_fin ";
    if ($notice) {
        $requete = "SELECT notice_id, resa_date, resa_idempr, tit1 as tit, " . $dates_resa_sql;
        $requete .= "FROM notices, resa ";
        $requete .= "WHERE notice_id='" . $notice . "' and resa_idnotice=notice_id order by resa_date ";
    } else {
        $requete = "SELECT notice_id, resa_date, resa_idempr, trim(concat(tit1,' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, " . $dates_resa_sql;
        $requete .= "FROM bulletins, resa, notices ";
        $requete .= "WHERE resa_idbulletin='{$bulletin}' and resa_idbulletin = bulletins.bulletin_id and bulletin_notice = notice_id order by resa_date ";
    }
    $res = pmb_mysql_query($requete) or die("<br />" . pmb_mysql_error());
    $nb_resa = pmb_mysql_num_rows($res);
    for ($j = 0; $j < $nb_resa; $j++) {
        $resa = pmb_mysql_fetch_object($res);
        if ($resa->resa_idempr == $id_empr) {
            $responsabilites = get_notice_authors($resa->notice_id);
            $as = array_search("0", $responsabilites["responsabilites"]);
            if ($as !== FALSE && $as !== NULL) {
                $auteur_0 = $responsabilites["auteurs"][$as];
                $auteur = new auteur($auteur_0["id"]);
                $header_aut .= $auteur->isbd_entry;
            } else {
                $aut1_libelle = array();
                $as = array_keys($responsabilites["responsabilites"], "1");
                for ($i = 0; $i < count($as); $i++) {
                    $indice = $as[$i];
                    $auteur_1 = $responsabilites["auteurs"][$indice];
                    $auteur = new auteur($auteur_1["id"]);
                    $aut1_libelle[] = $auteur->isbd_entry;
                }
                $header_aut .= implode(", ", $aut1_libelle);
            }
            $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
            if ($resa->aff_resa_date_debut) {
                $tmpmsg_res = $msg['fpdf_reserve_du'] . " " . $resa->aff_resa_date_debut . " " . $msg['fpdf_adherent_au'] . " " . $resa->aff_resa_date_fin;
            } else {
                $tmpmsg_res = $msg['fpdf_attente_valid'];
            }
            $res_final[] = "<b>" . $resa->tit . $auteur . "</b>";
            $res_final[] = "<blockquote>" . $tmpmsg_res;
            $date_resa = " " . $msg['fpdf_reserv_enreg'] . " " . $resa->date_pose_resa . ".";
            $res_final[] = $msg['fpdf_rang'] . " " . ($j + 1) . $date_resa . "</blockquote>";
        }
    }
    // fin for
    return implode("\n", $res_final);
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:51,代码来源:mailing.inc.php

示例4: send_mail

function send_mail($id_empr, $relance)
{
    global $pmb_gestion_devise, $msg, $charset;
    global $biblio_name, $biblio_email, $biblio_phone, $PMBuseremailbcc;
    // l'objet du mail
    $var = "mailretard_" . $relance . "objet";
    global ${$var};
    eval("\$objet=\"" . ${$var} . "\";");
    // la formule de politesse du bas (le signataire)
    $var = "mailretard_" . $relance . "fdp";
    global ${$var};
    eval("\$fdp=\"" . ${$var} . "\";");
    // le texte après la liste des ouvrages en retard
    $var = "mailretard_" . $relance . "after_list";
    global ${$var};
    eval("\$after_list=\"" . ${$var} . "\";");
    // le texte avant la liste des ouvrges en retard
    $var = "mailretard_" . $relance . "before_list";
    global ${$var};
    eval("\$before_list=\"" . ${$var} . "\";");
    // le "Madame, Monsieur," ou tout autre truc du genre "Cher adhérent,"
    $var = "mailretard_" . $relance . "madame_monsieur";
    global ${$var};
    eval("\$madame_monsieur=\"" . ${$var} . "\";");
    if ($madame_monsieur) {
        $texte_mail .= $madame_monsieur . "\r\n\r\n";
    }
    if ($before_list) {
        $texte_mail .= $before_list . "\r\n\r\n";
    }
    //Récupération des exemplaires
    $rqt = "select pret_idempr, expl_id, expl_cb from pret, exemplaires where pret_idempr='" . $id_empr . "' and pret_retour < curdate() and pret_idexpl=expl_id order by pret_date ";
    $req = pmb_mysql_query($rqt) or die('Erreur SQL !<br />' . $rqt . '<br />' . pmb_mysql_error());
    $i = 0;
    $total_amendes = 0;
    //Calcul des frais de relance
    $id_compte = comptes::get_compte_id_from_empr($id_empr, 2);
    if ($id_compte) {
        $cpte = new comptes($id_compte);
        $frais_relance = $cpte->summarize_transactions("", "", 0, $realisee = -1);
        if ($frais_relance < 0) {
            $frais_relance = -$frais_relance;
        } else {
            $frais_relance = 0;
        }
    }
    while ($data = pmb_mysql_fetch_array($req)) {
        //Calcul des amendes
        $valeur = 0;
        $amende = new amende($data["pret_idempr"]);
        $amd = $amende->get_amende($data["expl_id"]);
        if ($amd["valeur"]) {
            $valeur = $amd["valeur"];
            $total_amendes += $valeur;
        }
        /* Récupération des infos exemplaires et prêt */
        $requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, pret_date, pret_retour, tdoc_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
        $requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
        $requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
        $requete .= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol ";
        $requete .= "FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type , pret ";
        $requete .= "WHERE expl_cb='" . addslashes($data['expl_cb']) . "' and expl_typdoc = idtyp_doc and pret_idexpl = expl_id  ";
        $res = pmb_mysql_query($requete);
        $expl = pmb_mysql_fetch_object($res);
        $responsabilites = array();
        $header_aut = "";
        $responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
        $as = array_search("0", $responsabilites["responsabilites"]);
        if ($as !== FALSE && $as !== NULL) {
            $auteur_0 = $responsabilites["auteurs"][$as];
            $auteur = new auteur($auteur_0["id"]);
            $header_aut .= $auteur->isbd_entry;
        } else {
            $aut1_libelle = array();
            $as = array_keys($responsabilites["responsabilites"], "1");
            for ($i = 0; $i < count($as); $i++) {
                $indice = $as[$i];
                $auteur_1 = $responsabilites["auteurs"][$indice];
                $auteur = new auteur($auteur_1["id"]);
                $aut1_libelle[] = $auteur->isbd_entry;
            }
            $header_aut .= implode(", ", $aut1_libelle);
        }
        $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
        // récupération du titre de série
        $tit_serie = "";
        if ($expl->tparent_id && $expl->m_id) {
            $parent = new serie($expl->tparent_id);
            $tit_serie = $parent->name;
            if ($expl->tnvol) {
                $tit_serie .= ', ' . $expl->tnvol;
            }
        }
        if ($tit_serie) {
            $expl->tit = $tit_serie . '. ' . $expl->tit;
        }
        $texte_mail .= $expl->tit . $auteur . "\r\n";
        $texte_mail .= "    -" . sprintf($msg["relance_mail_retard_dates"], $expl->aff_pret_date, $expl->aff_pret_retour);
        if ($valeur) {
            $texte_mail .= " " . sprintf($msg["relance_mail_retard_amende"], comptes::format_simple($valeur));
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:relance.inc.php

示例5: notice_resa_planning

function notice_resa_planning($id_resa_print, $x, $y, $largeur, $retrait, $link)
{
    global $ourPDF;
    global $msg;
    global $pmb_pdf_font;
    $dates_resa_sql = " date_format(resa_date_debut, '" . $msg["format_date"] . "') as aff_resa_date_debut, date_format(resa_date_fin, '" . $msg["format_date"] . "') as aff_resa_date_fin ";
    $requete = "SELECT notice_id, resa_date_debut, resa_date_fin, trim(tit1) as tit, " . $dates_resa_sql;
    $requete .= "FROM resa_planning LEFT JOIN notices ON resa_idnotice = notice_id  ";
    $requete .= "WHERE id_resa='" . $id_resa_print . "' ";
    $res = mysql_query($requete, $link) or die(mysql_error() . " {$requete}");
    $expl = mysql_fetch_object($res);
    $responsabilites = get_notice_authors($expl->notice_id);
    $as = array_search("0", $responsabilites["responsabilites"]);
    if ($as !== FALSE && $as !== NULL) {
        $auteur_0 = $responsabilites["auteurs"][$as];
        $auteur = new auteur($auteur_0["id"]);
        $header_aut .= $auteur->isbd_entry;
    } else {
        $aut1_libelle = array();
        $as = array_keys($responsabilites["responsabilites"], "1");
        for ($i = 0; $i < count($as); $i++) {
            $indice = $as[$i];
            $auteur_1 = $responsabilites["auteurs"][$indice];
            $auteur = new auteur($auteur_1["id"]);
            $aut1_libelle[] = $auteur->isbd_entry;
        }
        $header_aut .= implode(", ", $aut1_libelle);
    }
    $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
    $ourPDF->SetXY($x, $y);
    $ourPDF->setFont($pmb_pdf_font, 'BU', 10);
    $ourPDF->multiCell($largeur - $x, 8, $expl->tit . $auteur, 0, 'L', 0);
    $ourPDF->SetXY($x + $retrait, $y + 4);
    $ourPDF->setFont($pmb_pdf_font, '', 10);
    $ourPDF->multiCell($largeur - $retrait - $x, 8, $msg['resa_planning_date_debut'] . " " . $expl->aff_resa_date_debut . " " . $msg['resa_planning_date_fin'] . " " . $expl->aff_resa_date_fin, 0, 'L', 0);
}
开发者ID:bouchra012,项目名称:PMB,代码行数:36,代码来源:fpdf.inc.php

示例6: curdate

$rqt = "select expl_cb from pret, exemplaires where pret_idempr='" . $id_empr . "' and pret_retour < curdate() and pret_idexpl=expl_id order by pret_date ";
$req = pmb_mysql_query($rqt) or die('Erreur SQL !<br />' . $rqt . '<br />' . pmb_mysql_error());
$i = 0;
while ($data = pmb_mysql_fetch_array($req)) {
    /* Récupération des infos exemplaires et prêt */
    $requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, pret_date, pret_retour, tdoc_libelle, section_libelle, location_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
    $requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
    $requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
    $requete .= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol ";
    $requete .= "FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type, docs_section, docs_location, pret ";
    $requete .= "WHERE expl_cb='" . addslashes($data['expl_cb']) . "' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id  ";
    $res = pmb_mysql_query($requete);
    $expl = pmb_mysql_fetch_object($res);
    $responsabilites = array();
    $header_aut = "";
    $responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
    $as = array_search("0", $responsabilites["responsabilites"]);
    if ($as !== FALSE && $as !== NULL) {
        $auteur_0 = $responsabilites["auteurs"][$as];
        $auteur = new auteur($auteur_0["id"]);
        $header_aut .= $auteur->isbd_entry;
    } else {
        $aut1_libelle = array();
        $as = array_keys($responsabilites["responsabilites"], "1");
        for ($i = 0; $i < count($as); $i++) {
            $indice = $as[$i];
            $auteur_1 = $responsabilites["auteurs"][$indice];
            $auteur = new auteur($auteur_1["id"]);
            $aut1_libelle[] = $auteur->isbd_entry;
        }
        $header_aut .= implode(", ", $aut1_libelle);
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:mail-retard.inc.php

示例7: fetch_analysis_data

 function fetch_analysis_data()
 {
     global $dbh;
     global $fonction_auteur;
     $myQuery = pmb_mysql_query("SELECT * FROM notices WHERE notice_id='" . $this->analysis_id . "' LIMIT 1", $dbh);
     $myAnalysis = pmb_mysql_fetch_object($myQuery);
     // type du document
     $this->analysis_typdoc = $myAnalysis->typdoc;
     // statut
     $this->analysis_statut = $myAnalysis->statut;
     $this->analysis_commentaire_gestion = $myAnalysis->commentaire_gestion;
     $this->analysis_thumbnail_url = $myAnalysis->thumbnail_url;
     // mentions de titre
     $this->analysis_tit1 = $myAnalysis->tit1;
     $this->analysis_tit2 = $myAnalysis->tit2;
     $this->analysis_tit3 = $myAnalysis->tit3;
     $this->analysis_tit4 = $myAnalysis->tit4;
     // libelle des auteurs
     $this->responsabilites_dep = get_notice_authors($this->analysis_id);
     // Mention de pagination
     $this->analysis_pages = $myAnalysis->npages;
     // zone des notes
     $this->analysis_n_gen = $myAnalysis->n_gen;
     $this->analysis_n_contenu = $myAnalysis->n_contenu;
     $this->analysis_n_resume = $myAnalysis->n_resume;
     // mise à jour des catégories
     $this->analysis_categories = get_notice_categories($this->analysis_id);
     // indexation interne
     if ($myAnalysis->indexint) {
         $this->analysis_indexint = $myAnalysis->indexint;
         $indexint = new indexint($this->analysis_indexint);
         if ($indexint->comment) {
             $this->analysis_indexint_lib = $indexint->name . " - " . $indexint->comment;
         } else {
             $this->analysis_indexint_lib = $indexint->name;
         }
     }
     // indexation libre
     $this->analysis_index_l = $myAnalysis->index_l;
     // libelle des langues
     $this->analysis_langues = get_notice_langues($this->analysis_id, 0);
     // langues de la publication
     $this->analysis_languesorg = get_notice_langues($this->analysis_id, 1);
     // langues originales
     $this->analysis_indexation_lang = $myAnalysis->indexation_lang;
     $this->analysis_is_new = $myAnalysis->notice_is_new;
     $this->analysis_date_is_new = $myAnalysis->notice_date_is_new;
     $this->notice_link = array();
     //liens vers autres notices
     $requete = "SELECT * FROM notices_relations WHERE num_notice=" . $this->analysis_id . " OR linked_notice=" . $this->analysis_id . " ORDER BY rank";
     $result_rel = pmb_mysql_query($requete);
     if (pmb_mysql_num_rows($result_rel)) {
         $i = 0;
         while ($r_rel = pmb_mysql_fetch_object($result_rel)) {
             if ($r_rel->linked_notice == $this->analysis_id) {
                 //notice en cours est notice fille
                 $this->notice_link['down'][$i]['relation_direction'] = 'down';
                 $this->notice_link['down'][$i]['id_notice'] = $r_rel->num_notice;
                 $this->notice_link['down'][$i]['title_notice'] = $this->get_notice_title($r_rel->num_notice);
                 $this->notice_link['down'][$i]['rank'] = $r_rel->rank;
                 $this->notice_link['down'][$i]['relation_type'] = $r_rel->relation_type;
             } elseif ($r_rel->num_notice == $this->analysis_id) {
                 //notice en cours est notice mere
                 $this->notice_link['up'][$i]['relation_direction'] = 'up';
                 $this->notice_link['up'][$i]['id_notice'] = $r_rel->linked_notice;
                 $this->notice_link['up'][$i]['title_notice'] = $this->get_notice_title($r_rel->linked_notice);
                 $this->notice_link['up'][$i]['rank'] = $r_rel->rank;
                 $this->notice_link['up'][$i]['relation_type'] = $r_rel->relation_type;
             }
             $i++;
         }
     }
     // lien vers une ressource électronique
     $this->analysis_lien = $myAnalysis->lien;
     if ($this->analysis_lien) {
         $this->analysis_eformat = $myAnalysis->eformat;
     } else {
         $this->analysis_eformat = "";
     }
     $this->analysis_create_date = $myAnalysis->create_date;
     $this->analysis_update_date = $myAnalysis->update_date;
     return $myQuery->nbr_rows;
 }
开发者ID:hogsim,项目名称:PMB,代码行数:83,代码来源:serials.class.php

示例8: while

 }
 //Valeurs
 $loc_cours = "";
 while ($data = pmb_mysql_fetch_array($req)) {
     $line++;
     $x = 0;
     if ($loc_cours != $data['location_libelle']) {
         $loc_cours = $data['location_libelle'];
         $worksheet->write($line, $x, $msg["expl_header_location_libelle"] . " : " . $loc_cours, $heading_12);
         $line++;
     }
     $id_expl = $data['expl_cb'];
     $titre = $data['tit'];
     $responsab = array("responsabilites" => array(), "auteurs" => array());
     // les auteurs
     $responsab = get_notice_authors($data['not_id']);
     $as = array_search("0", $responsab["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $responsab["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $mention_resp = $auteur->isbd_entry;
     } else {
         $as = array_keys($responsab["responsabilites"], "1");
         $aut1_libelle = array();
         for ($i = 0; $i < count($as); $i++) {
             $indice = $as[$i];
             $auteur_1 = $responsab["auteurs"][$indice];
             $auteur = new auteur($auteur_1["id"]);
             $aut1_libelle[] = $auteur->isbd_entry;
         }
         $mention_resp = implode(", ", $aut1_libelle);
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:all.inc.php

示例9: fetch_data


//.........这里部分代码省略.........
             $this->memo_notice_bulletin = $bull;
             $this->bulletin_mention_date = $bull->mention_date;
             $this->bulletin_date_date = formatdate($bull->date_date);
             $this->bulletin_numero = $bull->bulletin_numero;
         }
     }
     $this->memo_complement_titre = $res->tit4;
     $this->memo_titre_parallele = $res->tit3;
     $this->memo_notice = $res;
     //mention d'édition
     $this->memo_mention_edition = $res->mention_edition;
     //Titre du pério pour les notices de bulletin
     if ($res->niveau_biblio == 'b' && $res->niveau_hierar == '2') {
         $req_bulletin = "SELECT bulletin_id, bulletin_numero, date_date, mention_date, bulletin_titre, bulletin_numero, tit1 as titre from bulletins, notices WHERE bulletin_notice=notice_id AND num_notice=" . $res->notice_id;
         $result_bull = pmb_mysql_query($req_bulletin);
         while ($bull = pmb_mysql_fetch_object($result_bull)) {
             $this->memo_notice_bulletin = $bull;
             $this->memo_bulletin = $bull;
             $this->serial_title = $bull->titre;
             $this->bulletin_mention_date = $bull->mention_date;
             $this->bulletin_date_date = formatdate($bull->date_date);
             $this->bulletin_numero = $bull->bulletin_numero;
             $this->bulletin_id = $bull->bulletin_id;
         }
     }
     //Langage
     $this->memo_lang = get_notice_langues($this->notice_id, 0);
     // langues de la publication
     $this->memo_lang_or = get_notice_langues($this->notice_id, 1);
     // langues originales
     //Auteurs
     $this->authors = array();
     //Recherche des auteurs;
     $this->responsabilites = get_notice_authors($this->notice_id);
     $mention_resp = $mention_resp_1 = $mention_resp_2 = array();
     $isbd_entry_1 = $isbd_entry_2 = array();
     $as = array_search("0", $this->responsabilites["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $this->responsabilites["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $auteur->fonction = $fonction_auteur[$auteur_0["fonction"]];
         $this->authors[] = $auteur;
         if ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
             $mention_resp_lib = $auteur->isbd_entry_lien_gestion;
         }
         if (!$this->print_mode) {
             $mention_resp_lib .= $auteur->author_web_link;
         }
         if ($auteur_0["fonction"]) {
             $mention_resp_lib .= ", " . $fonction_auteur[$auteur_0["fonction"]];
         }
         $mention_resp[] = $mention_resp_lib;
         $this->memo_auteur_principal = $auteur->isbd_entry;
     }
     $as = array_keys($this->responsabilites["responsabilites"], "1");
     for ($i = 0; $i < count($as); $i++) {
         $indice = $as[$i];
         $auteur_1 = $this->responsabilites["auteurs"][$indice];
         $auteur = new auteur($auteur_1["id"]);
         $auteur->fonction = $fonction_auteur[$auteur_1["fonction"]];
         $this->authors[] = $auteur;
         if ($this->print_mode) {
             $mention_resp_lib = $auteur->isbd_entry;
         } else {
开发者ID:hogsim,项目名称:PMB,代码行数:67,代码来源:notice_info.class.php

示例10: autres_lectures

 function autres_lectures($notice_id = 0, $bulletin_id = 0)
 {
     global $dbh, $msg;
     global $opac_autres_lectures_tri;
     global $opac_autres_lectures_nb_mini_emprunts;
     global $opac_autres_lectures_nb_maxi;
     global $opac_autres_lectures_nb_jours_maxi;
     global $opac_autres_lectures;
     global $gestion_acces_active, $gestion_acces_empr_notice;
     if (!$opac_autres_lectures || !$notice_id && !$bulletin_id) {
         return "";
     }
     if (!$opac_autres_lectures_nb_maxi) {
         $opac_autres_lectures_nb_maxi = 999999;
     }
     if ($opac_autres_lectures_nb_jours_maxi) {
         $restrict_date = " date_add(oal.arc_fin, INTERVAL {$opac_autres_lectures_nb_jours_maxi} day)>=sysdate() AND ";
     }
     if ($notice_id) {
         $pas_notice = " oal.arc_expl_notice!={$notice_id} AND ";
     }
     if ($bulletin_id) {
         $pas_bulletin = " oal.arc_expl_bulletin!={$bulletin_id} AND ";
     }
     // Ajout ici de la liste des notices lues par les lecteurs de cette notice
     $rqt_autres_lectures = "SELECT oal.arc_expl_notice, oal.arc_expl_bulletin, count(*) AS total_prets,\n\t\t\t\t\ttrim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if(mention_date, concat(' (',mention_date,')') ,if (date_date, concat(' (',date_format(date_date, '%d/%m/%Y'),')') ,'')))) as tit, if(notices_m.notice_id, notices_m.notice_id, notices_s.notice_id) as not_id \n\t\t\t\tFROM ((((pret_archive AS oal JOIN\n\t\t\t\t\t(SELECT distinct arc_id_empr FROM pret_archive nbec where (nbec.arc_expl_notice='" . $notice_id . "' AND nbec.arc_expl_bulletin='" . $bulletin_id . "') AND nbec.arc_id_empr !=0) as nbec\n\t\t\t\t\tON (oal.arc_id_empr=nbec.arc_id_empr and oal.arc_id_empr!=0 and nbec.arc_id_empr!=0))\n\t\t\t\t\tLEFT JOIN notices AS notices_m ON arc_expl_notice = notices_m.notice_id )\n\t\t\t\t\tLEFT JOIN bulletins ON arc_expl_bulletin = bulletins.bulletin_id) \n\t\t\t\t\tLEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id)\n\t\t\t\tWHERE {$restrict_date} {$pas_notice} {$pas_bulletin} oal.arc_id_empr !=0\n\t\t\t\tGROUP BY oal.arc_expl_notice, oal.arc_expl_bulletin\n\t\t\t\tHAVING total_prets>={$opac_autres_lectures_nb_mini_emprunts} \n\t\t\t\tORDER BY {$opac_autres_lectures_tri} \n\t\t\t\t";
     $res_autres_lectures = mysql_query($rqt_autres_lectures) or die("<br />" . mysql_error() . "<br />" . $rqt_autres_lectures . "<br />");
     if (mysql_num_rows($res_autres_lectures)) {
         $odd_even = 1;
         $inotvisible = 0;
         $ret = "";
         //droits d'acces emprunteur/notice
         $acces_j = '';
         if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
             $ac = new acces();
             $dom_2 = $ac->setDomain(2);
             $acces_j = $dom_2->getJoin($_SESSION['id_empr_session'], 4, 'notice_id');
         }
         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)" : "") . ")";
         }
         while ($data = mysql_fetch_array($res_autres_lectures)) {
             // $inotvisible<=$opac_autres_lectures_nb_maxi
             $requete = "SELECT  1  ";
             $requete .= " FROM notices {$acces_j} {$statut_j}  WHERE notice_id='" . $data[not_id] . "' {$statut_r} ";
             $myQuery = mysql_query($requete, $dbh);
             if (mysql_num_rows($myQuery) && $inotvisible <= $opac_autres_lectures_nb_maxi) {
                 // mysql_num_rows($myQuery)
                 $inotvisible++;
                 $titre = $data['tit'];
                 // **********
                 $responsab = array("responsabilites" => array(), "auteurs" => array());
                 // les auteurs
                 $responsab = get_notice_authors($data['not_id']);
                 $as = array_search("0", $responsab["responsabilites"]);
                 if ($as !== FALSE && $as !== NULL) {
                     $auteur_0 = $responsab["auteurs"][$as];
                     $auteur = new auteur($auteur_0["id"]);
                     $mention_resp = $auteur->isbd_entry;
                 } else {
                     $aut1_libelle = array();
                     $as = array_keys($responsab["responsabilites"], "1");
                     for ($i = 0; $i < count($as); $i++) {
                         $indice = $as[$i];
                         $auteur_1 = $responsab["auteurs"][$indice];
                         $auteur = new auteur($auteur_1["id"]);
                         $aut1_libelle[] = $auteur->isbd_entry;
                     }
                     $mention_resp = implode(", ", $aut1_libelle);
                 }
                 $mention_resp ? $auteur = $mention_resp : ($auteur = "");
                 // on affiche les résultats
                 if ($odd_even == 0) {
                     $pair_impair = "odd";
                     $odd_even = 1;
                 } else {
                     if ($odd_even == 1) {
                         $pair_impair = "even";
                         $odd_even = 0;
                     }
                 }
                 if ($data['arc_expl_notice']) {
                     $tr_javascript = " class='{$pair_impair}' onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./index.php?lvl=notice_display&id=" . $data['not_id'] . "&seule=1';\" style='cursor: pointer' ";
                 } else {
                     $tr_javascript = " class='{$pair_impair}' onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./index.php?lvl=bulletin_display&id=" . $data['arc_expl_bulletin'] . "';\" style='cursor: pointer' ";
                 }
                 $ret .= "<tr {$tr_javascript}>";
                 $ret .= "<td>" . $titre . "</td>";
                 $ret .= "<td>" . $auteur . "</td>";
                 $ret .= "</tr>\n";
             }
         }
         if ($ret) {
             $ret = "<h3 class='autres_lectures'>" . $msg['autres_lectures'] . "</h3><table style='width:100%;'>" . $ret . "</table>";
         }
     } else {
//.........这里部分代码省略.........
开发者ID:bouchra012,项目名称:PMB,代码行数:101,代码来源:notice_affichage.class.php

示例11: show_lig_cde_from_sug

function show_lig_cde_from_sug($sugchk)
{
    global $dbh, $charset;
    global $acquisition_gestion_tva;
    global $modif_cde_row_form, $deflt3lgstatcde;
    $form = "\t\n\t<script type='text/javascript'>\t\n\t\tacquisition_force_ttc='" . $msg["acquisition_force_ttc"] . "';\n\t\tacquisition_force_ht='" . $msg["acquisition_force_ht"] . "';\n\t</script>\n\t";
    $i = 0;
    $lgstat_form = lgstat::getHtmlSelect(array(0 => $deflt3lgstatcde), FALSE, array('id' => 'lg_statut[!!i!!]', 'name' => 'lg_statut[!!i!!]'));
    $arrchk = unserialize(rawurldecode(stripslashes($sugchk)));
    foreach ($arrchk as $value) {
        $i++;
        $sug = new suggestions($value);
        $form .= $modif_cde_row_form;
        $code = "";
        $taec = "";
        $prix = '0';
        $nb = 'none';
        if ($sug->num_notice) {
            $q = "select niveau_biblio from notices where notice_id='" . $sug->num_notice . "' ";
            $r = pmb_mysql_query($q, $dbh);
            if (pmb_mysql_num_rows($r)) {
                $nb = pmb_mysql_result($r, 0, 0);
            }
        }
        switch ($nb) {
            case 'a':
                $typ_lig = 1;
                $notice = new sel_article_display($sug->num_notice, '');
                $notice->getData();
                $notice->responsabilites = get_notice_authors($sug->num_notice);
                $notice->doHeader();
                $taec = $notice->titre;
                if ($notice->auteur1) {
                    $taec .= "\n" . $notice->auteur1;
                }
                if ($notice->in_bull) {
                    $taec .= "\n" . $notice->in_bull;
                }
                $prix = $notice->prix;
                break;
            case 'm':
                $typ_lig = 1;
                $notice = new sel_mono_display($sug->num_notice, '');
                $notice->getData();
                $notice->responsabilites = get_notice_authors($sug->num_notice);
                $notice->doHeader();
                $code = $notice->code;
                $taec = $notice->titre;
                if ($notice->auteur1) {
                    $taec .= "\n" . $notice->auteur1;
                }
                if ($notice->editeur1) {
                    $taec .= "\n" . $notice->editeur1;
                }
                if ($notice->editeur1 && $notice->ed_date) {
                    $taec .= ", " . $notice->ed_date;
                } elseif ($notice->ed_date) {
                    $taec .= $notice->ed_date;
                }
                if ($notice->collection) {
                    $taec .= "\n" . $notice->collection;
                }
                $prix = $notice->prix;
                break;
            default:
                $typ_lig = 0;
                $code = htmlentities($sug->code, ENT_QUOTES, $charset);
                $taec = htmlentities($sug->titre, ENT_QUOTES, $charset);
                if ($sug->auteur != "") {
                    $taec .= "\n" . htmlentities($sug->auteur, ENT_QUOTES, $charset);
                }
                if ($sug->editeur != "") {
                    $taec .= "\n" . htmlentities($sug->editeur, ENT_QUOTES, $charset);
                    if ($sug->date_publi != "0000-00-00") {
                        $taec .= "," . htmlentities($sug->date_publi, ENT_QUOTES, $charset);
                    }
                }
                $prix = htmlentities($sug->prix, ENT_QUOTES, $charset);
                break;
        }
        $form = str_replace('!!no!!', $i, $form);
        $form = str_replace('!!code!!', $code, $form);
        $form = str_replace('!!lib!!', $taec, $form);
        $form = str_replace('!!qte!!', $sug->nb, $form);
        $form = str_replace('!!prix!!', $prix, $form);
        if ($acquisition_gestion_tva) {
            $form = str_replace('!!tva!!', $row->tva, $form);
            if ($acquisition_gestion_tva == 1) {
                $prix_ttc = round($row->prix + $row->prix / 100 * $row->tva, 2);
                $onchange_tva = "\n\t\t\t\t\tonChange='document.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=\n\t\t\t\t\t\tht_to_ttc(document.getElementById(\"prix[{$i}]\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t' ";
                $convert_prix = "\n\t\t\t\t\tonChange='document.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=\n\t\t\t\t\t\tht_to_ttc(document.getElementById(\"prix[{$i}]\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t' ";
                $convert_ht_ttc = "\n\t\t\t\t<span class='convert_ht_ttc' id='convert_ht_ttc_{$i}' \n\t\t\t\t\tonclick='\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").value=\"\";\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"visible\"; \n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").focus();\n\t\t\t\t\t'\t\t\t\t\t\t\t\n\t\t\t\t>" . $prix_ttc . "</span>\n\t\t\t\t<input style='visibility:hidden' type='text' id='input_convert_ht_ttc_{$i}' name='convert_ht_ttc_{$i}' value='' \t\t\t\t\n\t\t\t\t\tonBlur='document.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"hidden\";'\t\t\t\t\n\t\t\t\t\tonChange='document.getElementById(\"prix[{$i}]\").value=\n\t\t\t\t\t\tttc_to_ht(document.getElementById(\"input_convert_ht_ttc_{$i}\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"hidden\"; \n\t\t\t\t\t\tdocument.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=document.getElementById(\"input_convert_ht_ttc_{$i}\").value;\n\t\t\t\t\t'  \n\t\t\t\t/>";
            } elseif ($acquisition_gestion_tva == 2) {
                $prix = $row->prix;
                $tva = $row->tva;
                $prix_ht = round($prix / ($tva / 100 + 1), 2);
                $onchange_tva = "\n\t\t\t\t\tonChange='document.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=\n\t\t\t\t\t\tttc_to_ht(document.getElementById(\"prix[{$i}]\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t' ";
                $convert_prix = "\n\t\t\t\t\tonChange='document.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=\n\t\t\t\t\t\tttc_to_ht(document.getElementById(\"prix[{$i}]\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t' ";
                $convert_ht_ttc = "\n\t\t\t\t<span class='convert_ht_ttc' id='convert_ht_ttc_{$i}' \n\t\t\t\t\tonclick='\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").value=\"\";\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"visible\"; \n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").focus();\n\t\t\t\t\t'\t\t\t\t\t\t\t\n\t\t\t\t>" . $prix_ht . "</span>\n\t\t\t\t<input style='visibility:hidden' type='text' id='input_convert_ht_ttc_{$i}' name='convert_ht_ttc_{$i}' value='{$prix_ttc}' \t\t\t\t\n\t\t\t\t\tonBlur='document.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"hidden\";'\t\t\t\t\n\t\t\t\t\tonChange='document.getElementById(\"prix[{$i}]\").value=\n\t\t\t\t\t\tht_to_ttc(document.getElementById(\"input_convert_ht_ttc_{$i}\").value,document.getElementById(\"tva[{$i}]\").value);\n\t\t\t\t\t\tdocument.getElementById(\"input_convert_ht_ttc_{$i}\").style.visibility=\"hidden\"; \n\t\t\t\t\t\tdocument.getElementById(\"convert_ht_ttc_{$i}\").innerHTML=document.getElementById(\"input_convert_ht_ttc_{$i}\").value;\n\t\t\t\t\t'  \n\t\t\t\t/>";
            }
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:commandes.inc.php

示例12: pmb_mysql_query

 $requete .= " left join lenders lend on e.expl_owner=lend.idlender ";
 $requete .= " left join notices n on e.expl_notice=n.notice_id ";
 $requete .= " WHERE e.expl_cb='" . $noex . "'";
 $requete .= " LIMIT 1";
 $result = pmb_mysql_query($requete, $dbh) or die(pmb_mysql_error() . " " . $requete);
 if (pmb_mysql_num_rows($result)) {
     $item = pmb_mysql_fetch_object($result);
     $header = "";
     if ($item->tparent_id) {
         $serie = new serie($item->tparent_id);
         $tparent = $serie->name;
     }
     $tparent ? $header = $tparent : ($header = '');
     $item->tnvol && $header ? $header .= ", {$item->tnvol}" : ($header = '');
     $header ? $header .= '. ' : ($header = '');
     $responsabilites = get_notice_authors($item->notice_id);
     $as = array_search("0", $responsabilites["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $responsabilites["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $header_aut .= $auteur->isbd_entry;
     } else {
         $aut1_libelle = array();
         $as = array_keys($responsabilites["responsabilites"], "1");
         for ($i = 0; $i < count($as); $i++) {
             $indice = $as[$i];
             $auteur_1 = $responsabilites["auteurs"][$indice];
             $auteur = new auteur($auteur_1["id"]);
             $aut1_libelle[] = $auteur->isbd_entry;
         }
         $header_aut .= implode(", ", $aut1_libelle);
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:pointage_expl.php

示例13: notice_resa_planning

 function notice_resa_planning($id_resa_print)
 {
     global $msg, $dbh, $charset;
     $dates_resa_sql = " date_format(resa_date_debut, '" . $msg["format_date"] . "') as aff_resa_date_debut, date_format(resa_date_fin, '" . $msg["format_date"] . "') as aff_resa_date_fin ";
     $requete = "SELECT notice_id, resa_date_debut, resa_date_fin, trim(tit1) as tit, " . $dates_resa_sql;
     $requete .= "FROM resa_planning LEFT JOIN notices ON resa_idnotice = notice_id  ";
     $requete .= "WHERE id_resa='" . $id_resa_print . "' ";
     $res = mysql_query($requete, $dbh) or die(mysql_error() . " {$requete}");
     $expl = mysql_fetch_object($res);
     $responsabilites = get_notice_authors($expl->notice_id);
     $as = array_search("0", $responsabilites["responsabilites"]);
     if ($as !== FALSE && $as !== NULL) {
         $auteur_0 = $responsabilites["auteurs"][$as];
         $auteur = new auteur($auteur_0["id"]);
         $header_aut .= $auteur->isbd_entry;
     } else {
         $aut1_libelle = array();
         $as = array_keys($responsabilites["responsabilites"], "1");
         for ($i = 0; $i < count($as); $i++) {
             $indice = $as[$i];
             $auteur_1 = $responsabilites["auteurs"][$indice];
             $auteur = new auteur($auteur_1["id"]);
             $aut1_libelle[] = $auteur->isbd_entry;
         }
         $header_aut .= implode(", ", $aut1_libelle);
     }
     $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
     $this->notice_resa_planning .= "\t<notice_resa>\n";
     $this->notice_resa_planning .= "\t\t<tit>" . htmlspecialchars($expl->tit, ENT_QUOTES, $charset) . "</tit>\n";
     $this->notice_resa_planning .= "\t\t<author>" . htmlspecialchars($auteur, ENT_QUOTES, $charset) . "</author>\n";
     $this->notice_resa_planning .= "\t\t<start_date>" . htmlspecialchars($expl->aff_resa_date_debut, ENT_QUOTES, $charset) . "</start_date>\n";
     $this->notice_resa_planning .= "\t\t<deadline>" . htmlspecialchars($expl->aff_resa_date_fin, ENT_QUOTES, $charset) . "</deadline>\n";
     $this->notice_resa_planning .= "\t</notice_resa>\n";
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:34,代码来源:lettre.class.php

示例14: also_borrowed

 function also_borrowed($notice_id = 0, $bulletin_id = 0)
 {
     global $dbh, $msg;
     global $opac_autres_lectures_tri;
     global $opac_autres_lectures_nb_mini_emprunts;
     global $opac_autres_lectures_nb_maxi;
     global $opac_autres_lectures_nb_jours_maxi;
     global $opac_autres_lectures;
     global $gestion_acces_active, $gestion_acces_empr_notice;
     $results = array();
     if (!$opac_autres_lectures || !$notice_id && !$bulletin_id) {
         return $results;
     }
     if (!$opac_autres_lectures_nb_maxi) {
         $opac_autres_lectures_nb_maxi = 999999;
     }
     if ($opac_autres_lectures_nb_jours_maxi) {
         $restrict_date = " date_add(oal.arc_fin, INTERVAL {$opac_autres_lectures_nb_jours_maxi} day)>=sysdate() AND ";
     }
     if ($notice_id) {
         $pas_notice = " oal.arc_expl_notice!={$notice_id} AND ";
     }
     if ($bulletin_id) {
         $pas_bulletin = " oal.arc_expl_bulletin!={$bulletin_id} AND ";
     }
     // Ajout ici de la liste des notices lues par les lecteurs de cette notice
     $rqt_autres_lectures = "SELECT oal.arc_expl_notice, oal.arc_expl_bulletin, count(*) AS total_prets,\n\t\t\t\t\ttrim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if(mention_date, concat(' (',mention_date,')') ,if (date_date, concat(' (',date_format(date_date, '%d/%m/%Y'),')') ,'')))) as tit, if(notices_m.notice_id, notices_m.notice_id, notices_s.notice_id) as not_id \n\t\t\t\tFROM ((((pret_archive AS oal JOIN\n\t\t\t\t\t(SELECT distinct arc_id_empr FROM pret_archive nbec where (nbec.arc_expl_notice='" . $notice_id . "' AND nbec.arc_expl_bulletin='" . $bulletin_id . "') AND nbec.arc_id_empr !=0) as nbec\n\t\t\t\t\tON (oal.arc_id_empr=nbec.arc_id_empr and oal.arc_id_empr!=0 and nbec.arc_id_empr!=0))\n\t\t\t\t\tLEFT JOIN notices AS notices_m ON arc_expl_notice = notices_m.notice_id )\n\t\t\t\t\tLEFT JOIN bulletins ON arc_expl_bulletin = bulletins.bulletin_id) \n\t\t\t\t\tLEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id)\n\t\t\t\tWHERE {$restrict_date} {$pas_notice} {$pas_bulletin} oal.arc_id_empr !=0\n\t\t\t\tGROUP BY oal.arc_expl_notice, oal.arc_expl_bulletin\n\t\t\t\tHAVING total_prets>={$opac_autres_lectures_nb_mini_emprunts} \n\t\t\t\tORDER BY {$opac_autres_lectures_tri} \n\t\t\t\t";
     $res_autres_lectures = pmb_mysql_query($rqt_autres_lectures);
     if (!$res_autres_lectures) {
         return $results;
     }
     if (pmb_mysql_num_rows($res_autres_lectures)) {
         $odd_even = 1;
         $inotvisible = 0;
         $aresult = array();
         //droits d'acces emprunteur/notice
         $acces_j = '';
         if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1) {
             $ac = new acces();
             $dom_2 = $ac->setDomain(2);
             $acces_j = $dom_2->getJoin($_SESSION['id_empr_session'], 4, 'notice_id');
         }
         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)" : "") . ")";
         }
         while ($data = pmb_mysql_fetch_array($res_autres_lectures)) {
             // $inotvisible<=$opac_autres_lectures_nb_maxi
             $requete = "SELECT  1  ";
             $requete .= " FROM notices {$acces_j} {$statut_j}  WHERE notice_id='" . $data[not_id] . "' {$statut_r} ";
             $myQuery = pmb_mysql_query($requete, $dbh);
             if (pmb_mysql_num_rows($myQuery) && $inotvisible <= $opac_autres_lectures_nb_maxi) {
                 // pmb_mysql_num_rows($myQuery)
                 $inotvisible++;
                 $titre = $data['tit'];
                 // **********
                 $responsab = array("responsabilites" => array(), "auteurs" => array());
                 // les auteurs
                 $responsab = get_notice_authors($data['not_id']);
                 $as = array_search("0", $responsab["responsabilites"]);
                 if ($as !== FALSE && $as !== NULL) {
                     $auteur_0 = $responsab["auteurs"][$as];
                     $auteur = new auteur($auteur_0["id"]);
                     $mention_resp = $auteur->isbd_entry;
                 } else {
                     $as = array_keys($responsab["responsabilites"], "1");
                     for ($i = 0; $i < count($as); $i++) {
                         $indice = $as[$i];
                         $auteur_1 = $responsab["auteurs"][$indice];
                         $auteur = new auteur($auteur_1["id"]);
                         $aut1_libelle[] = $auteur->isbd_entry;
                     }
                     $mention_resp = implode(", ", $aut1_libelle);
                 }
                 $mention_resp ? $auteur = $mention_resp : ($auteur = "");
                 // on affiche les résultats
                 if ($odd_even == 0) {
                     $pair_impair = "odd";
                     $odd_even = 1;
                 } else {
                     if ($odd_even == 1) {
                         $pair_impair = "even";
                         $odd_even = 0;
                     }
                 }
                 $aresult["notice_id"] = $data['not_id'];
                 $aresult["notice_title"] = $titre;
                 $aresult["notice_author"] = $auteur;
                 $results[] = $aresult;
             }
         }
     }
     return $results;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:97,代码来源:pmbesOPACGeneric.class.php

示例15: mysql_query

        echo "<table class='fiche-lecteur' width=100%>";
        echo "<tr><td class='jauge' colspan='2'>" . $msg[circ_preteur] . "</td><td class='jauge'>" . $msg[296] . "</td><td class='jauge'>" . $msg[circ_CB] . "</td><td class='jauge'>" . $msg[233] . "</td><td class='jauge'>" . $msg[234] . "</td></tr>";
        break;
    default:
        $sql = $sql . " LIMIT " . $limite_mysql . ", " . $limite_page;
        echo "<h1>" . $msg[1110] . "&nbsp;:&nbsp;" . $msg[1113] . "</h1>";
        echo "<table class='fiche-lecteur' width=100%>";
        echo "<tr><td class='jauge' colspan='2'>" . $msg[circ_preteur] . "</td><td class='jauge'>" . $msg[296] . "</td><td class='jauge'>" . $msg[circ_CB] . "</td><td class='jauge'>" . $msg[233] . "</td><td class='jauge'>" . $msg[234] . "</td></tr>";
        break;
}
// on lance la requête (mysql_query) et on impose un message d'erreur si la requête ne se passe pas bien (or die)
$req = mysql_query($sql) or die("Erreur SQL !<br />" . $sql . "<br />" . mysql_error());
// on va scanner tous les tuples un par un
$odd_even = 0;
while ($data = mysql_fetch_array($req)) {
    $responsabilites = get_notice_authors($data['m_id'] + $data['s_id']);
    $as = array_search("0", $responsabilites["responsabilites"]);
    if ($as !== FALSE && $as !== NULL) {
        $auteur_0 = $responsabilites["auteurs"][$as];
        $auteur = new auteur($auteur_0["id"]);
        $header_aut .= $auteur->isbd_entry;
    } else {
        $aut1_libelle = array();
        $as = array_keys($responsabilites["responsabilites"], "1");
        for ($i = 0; $i < count($as); $i++) {
            $indice = $as[$i];
            $auteur_1 = $responsabilites["auteurs"][$indice];
            $auteur = new auteur($auteur_1["id"]);
            $aut1_libelle[] = $auteur->isbd_entry;
        }
        $header_aut .= implode(", ", $aut1_libelle);
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:expl_owner.inc.php


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