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


PHP pmb_mysql_fetch_array函数代码示例

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


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

示例1: get_info_expl_old

function get_info_expl_old($cb_expl)
{
    global $dbh, $msg;
    if ($cb_expl) {
        $query = "select * from exemplaires  left join docs_type on exemplaires.expl_typdoc=docs_type.idtyp_doc where expl_cb='{$cb_expl}' ";
        $result = pmb_mysql_query($query, $dbh);
        if ($r = pmb_mysql_fetch_array($result)) {
            $info_expl->error_message = "";
            // empr ok
            $info_expl->id_expl = $r['expl_id'];
            $info_expl->cb_expl = $r['expl_cb'];
            $info_expl->tdoc_libelle = $r['tdoc_libelle'];
            $info_expl->expl_notice = $r['expl_notice'];
            if ($info_expl->expl_notice) {
                $notice = new mono_display($info_expl->expl_notice, 0);
                $info_expl->libelle = $notice->header;
            } else {
                $bulletin = new bulletinage_display($r['expl_bulletin']);
                $info_expl->libelle = $bulletin->display;
                $info_expl->expl_notice = $r['expl_bulletin'];
            }
            $pos = strpos($info_expl->libelle, '<a');
            if ($pos) {
                $info_expl->libelle = substr($info_expl->libelle, 0, strpos($info_expl->libelle, '<a'));
            }
        } else {
            $info_expl->error_message = $msg[367];
        }
    } else {
        $info_expl->error_message = $msg[367];
    }
    return $info_expl;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:33,代码来源:func.inc.php

示例2: _get_footer_

function _get_footer_($output_params)
{
    $export = new synchro_rdf(session_id());
    $contenuRdf = $export->exportStoreXml();
    //Suppression des tables temporaires
    $res = pmb_mysql_query("SHOW TABLES LIKE '" . session_id() . "%'");
    while ($row = pmb_mysql_fetch_array($res)) {
        pmb_mysql_query("DROP TABLE " . $row[0]);
    }
    return $contenuRdf;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:11,代码来源:output_rdf.inc.php

示例3: get_values

 function get_values($id)
 {
     //Récupération des valeurs stockées
     if (!$this->no_special_fields && $id) {
         $this->values = array();
         $requete = "select " . $this->prefix . "_custom_champ," . $this->prefix . "_custom_origine," . $this->prefix . "_custom_small_text, " . $this->prefix . "_custom_text, " . $this->prefix . "_custom_integer, " . $this->prefix . "_custom_date, " . $this->prefix . "_custom_float from " . $this->prefix . "_custom_values where " . $this->prefix . "_custom_origine=" . $id;
         $resultat = pmb_mysql_query($requete);
         while ($r = pmb_mysql_fetch_array($resultat)) {
             $this->values[$r[$this->prefix . "_custom_champ"]][] = $r[$this->prefix . "_custom_" . $this->t_fields[$r[$this->prefix . "_custom_champ"]]["DATATYPE"]];
         }
     } else {
         $this->values = array();
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:14,代码来源:parametres_perso.class.php

示例4: addTaskCron

 function addTaskCron($id)
 {
     global $dbh;
     $requete = "select id_planificateur, num_type_tache, libelle_tache, desc_tache, calc_next_date_deb, calc_next_heure_deb \n\t\t\tfrom planificateur \n\t\t\twhere statut='1' \n\t\t\tand id_planificateur= '" . $id . "'";
     $res = pmb_mysql_query($requete, $dbh);
     while ($row = pmb_mysql_fetch_array($res)) {
         $oldCrontab = array();
         /* récupère les informations de l'ancien crontab */
         $newCrontab = array();
         /* ajoute le nouveau crontab */
         exec('crontab -l', $oldCrontab);
         /* on récupère l'ancienne crontab dans $oldCrontab */
         $calc_next_date_deb = explode("-", $row["calc_next_date_deb"]);
         $calc_next_heure_deb = explode(":", $row["calc_next_heure_deb"]);
         $ident = "pmb_" . $row["id_planificateur"] . "." . $row["num_type_tache"];
         if ($row["desc_tache"] != '') {
             $comment = $row["desc_tache"];
         } else {
             $comment = ' Aucun commentaire';
         }
         $chpCommande = "/rep/le fichier php";
         $trouve = false;
         //on vérifie si cette tâche est déjà dans le cron
         foreach ($oldCrontab as $index => $ligne) {
             if (preg_match("/^# " . $ident . "/", $oldCrontab[$index], $matches, PREG_OFFSET_CAPTURE) == "1") {
                 $oldCrontab[$index] = "# " . $ident . " : " . $comment;
                 $oldCrontab[$index + 1] = $calc_next_heure_deb[0] . ' ' . $calc_next_heure_deb[1] . ' ' . $calc_next_date_deb[2] . ' ' . $calc_next_date_deb[1] . ' * ' . $chpCommande;
                 $trouve = true;
             }
             $newCrontab[] = $oldCrontab[$index];
         }
         //si la tâche n'est pas trouvée, on l'ajoute
         if (!$trouve) {
             $newCrontab[] = "# " . $ident . " : " . $comment;
             $newCrontab[] = $calc_next_heure_deb[0] . ' ' . $calc_next_heure_deb[1] . ' ' . $calc_next_date_deb[2] . ' ' . $calc_next_date_deb[1] . ' * ' . $chpCommande;
         }
         $f = fopen('/var/spool/cron/apache', 'w');
         /* on crée le fichier s'il n'existe pas */
         fwrite($f, implode(chr(10), $newCrontab));
         fclose($f);
         exec('crontab /var/spool/cron/apache');
         /* on le soumet comme crontab */
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:44,代码来源:crontab.class.php

示例5: create_expl

function create_expl($f_ex_cb, $id, $f_ex_typdoc, $f_ex_cote, $f_ex_section, $f_ex_statut, $f_ex_location, $f_ex_cstat, $f_ex_note, $f_ex_prix, $f_ex_owner, $f_ex_comment = '')
{
    global $dbh;
    $new_expl = 0;
    $expl_retour = 0;
    $requete = "SELECT expl_id FROM exemplaires WHERE expl_cb='{$f_ex_cb}' ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr_lignes = @pmb_mysql_num_rows($res);
    if ($nbr_lignes) {
        $valid_requete = 0;
        $lu = pmb_mysql_fetch_array($res);
        $expl_retour = $lu['expl_id'];
    } else {
        $valid_requete = 1;
    }
    if ($valid_requete) {
        $requete = 'INSERT INTO exemplaires SET create_date=sysdate(), ';
        $requete .= "expl_cb='{$f_ex_cb}'";
        $requete .= ", expl_notice={$id}";
        $requete .= ", expl_typdoc={$f_ex_typdoc}";
        $requete .= ", expl_cote='{$f_ex_cote}'";
        $requete .= ", expl_section={$f_ex_section}";
        $requete .= ", expl_statut={$f_ex_statut}";
        $requete .= ", expl_location={$f_ex_location}";
        $requete .= ", expl_codestat={$f_ex_cstat}";
        $requete .= ", expl_note='" . ${f_ex_note} . "'";
        $requete .= ", expl_comment='" . ${f_ex_comment} . "'";
        $requete .= ", expl_prix='{$f_ex_prix}'";
        $requete .= ", expl_owner='{$f_ex_owner}'";
        $result = pmb_mysql_query($requete, $dbh);
        $expl_retour = pmb_mysql_insert_id();
        audit::insert_creation(AUDIT_EXPL, $expl_retour);
        $new_expl = 1;
    }
    $retour = array($new_expl, $expl_retour);
    return $retour;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:37,代码来源:z3950_func.inc.php

示例6: recup_explnum_infos

/**
 * Récupère les infos du document numérique
 */
function recup_explnum_infos($id_explnum)
{
    global $infos_explnum, $dbh;
    $rqt_explnum = "SELECT explnum_id, explnum_notice, explnum_bulletin, IF(location_libelle IS null, '', location_libelle) AS location_libelle, explnum_nom, explnum_mimetype, explnum_url, explnum_extfichier, IF(explnum_nomfichier IS null, '', explnum_nomfichier) AS nomfichier, explnum_path, IF(rep.repertoire_nom IS null, '', rep.repertoire_nom) AS nomrepertoire\n\t\tfrom explnum ex_n\n\t\tLEFT JOIN explnum_location ex_l ON ex_n.explnum_id= ex_l.num_explnum\n\t\tLEFT JOIN docs_location dl ON ex_l.num_location= dl.idlocation\n\t\tLEFT JOIN upload_repertoire rep ON ex_n.explnum_repertoire= rep.repertoire_id\n\t\twhere explnum_id='" . $id_explnum . "'";
    $res_explnum = pmb_mysql_query($rqt_explnum, $dbh);
    while ($explnum = pmb_mysql_fetch_array($res_explnum, MYSQL_ASSOC)) {
        $infos_explnum[] = $explnum;
    }
}
开发者ID:hogsim,项目名称:PMB,代码行数:12,代码来源:doc_num_data.php

示例7: explnum_test_rights_per_id

function explnum_test_rights_per_id($id_explnum)
{
    global $gestion_acces_active, $gestion_acces_empr_docnum;
    //droits d'acces emprunteur/document numérique
    if ($gestion_acces_active == 1 && $gestion_acces_empr_docnum == 1) {
        $ac = new acces();
        $dom_3 = $ac->setDomain(3);
        $rights = $dom_3->getRights($_SESSION['id_empr_session'], $id_explnum);
    }
    //Accessibilité du document numérique aux abonnés en opac
    $req_restriction_abo = "SELECT explnum_visible_opac, explnum_visible_opac_abon FROM explnum,explnum_statut WHERE explnum_id='" . $id_explnum . "' AND explnum_docnum_statut=id_explnum_statut ";
    $result = pmb_mysql_query($req_restriction_abo);
    if ($result && pmb_mysql_num_rows($result)) {
        $expl_num = pmb_mysql_fetch_array($result, MYSQL_ASSOC);
        if ($rights & 16 || is_null($dom_3) && $expl_num["explnum_visible_opac"] && (!$expl_num["explnum_visible_opac_abon"] || $expl_num["explnum_visible_opac_abon"] && $_SESSION["user_code"])) {
            return true;
        }
    }
    return false;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:20,代码来源:notice_tpl.inc.php

示例8: show_consultation_form

 function show_consultation_form()
 {
     global $form_consult_action, $form_see_docnum, $msg, $charset, $pmb_gestion_devise, $dbh, $pmb_type_audit;
     $form_consult_action = str_replace('!!form_title!!', htmlentities($this->sujet_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!idstatut!!', htmlentities($this->statut_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!type_action!!', htmlentities($this->workflow->getTypeCommentById($this->type_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!statut_action!!', htmlentities($this->workflow->getStateCommentById($this->statut_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!detail_action!!', htmlentities($this->detail_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_action!!', htmlentities(formatdate($this->date_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!date_butoir_action!!', htmlentities(formatdate($this->deadline_action), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!time_action!!', htmlentities($this->time_elapsed . $msg['demandes_action_time_unit'], ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!cout_action!!', htmlentities($this->cout, ENT_QUOTES, $charset) . $pmb_gestion_devise, $form_consult_action);
     $form_consult_action = str_replace('!!progression_action!!', htmlentities($this->progression_action, ENT_QUOTES, $charset) . '%', $form_consult_action);
     $form_consult_action = str_replace('!!idaction!!', htmlentities($this->id_action, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!iddemande!!', htmlentities($this->num_demande, ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!createur!!', htmlentities($this->getCreateur($this->actions_num_user, $this->actions_type_user), ENT_QUOTES, $charset), $form_consult_action);
     $form_consult_action = str_replace('!!prive_action!!', htmlentities($this->prive_action ? $msg[40] : $msg[39], ENT_QUOTES, $charset), $form_consult_action);
     $path = "<a href=./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}>" . htmlentities($this->libelle_demande, ENT_QUOTES, $charset) . "</a>";
     $form_consult_action = str_replace('!!path!!', $path, $form_consult_action);
     $act_cancel = "document.location='./demandes.php?categ=gestion&act=see_dmde&iddemande={$this->num_demande}'";
     $form_consult_action = str_replace('!!cancel_action!!', $act_cancel, $form_consult_action);
     $states_btn = $this->getDisplayStateBtn($this->workflow->getStateList($this->statut_action));
     $form_consult_action = str_replace('!!btn_etat!!', $states_btn, $form_consult_action);
     // bouton audit
     if ($pmb_type_audit) {
         $btn_audit = "&nbsp;<input class='bouton' type='button' onClick=\"openPopUp('./audit.php?type_obj=15&object_id={$this->id_action}', 'audit_popup', 700, 500, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" title=\"" . $msg['audit_button'] . "\" value=\"" . $msg['audit_button'] . "\" />&nbsp;";
     } else {
         $btn_audit = "";
     }
     $form_consult_action = str_replace('!!btn_audit!!', $btn_audit, $form_consult_action);
     print $form_consult_action;
     //Notes
     print demandes_notes::show_dialog($this->notes, $this->id_action, $this->num_demande);
     //Documents Numériques
     $req = "select * from explnum_doc join explnum_doc_actions on num_explnum_doc=id_explnum_doc \n\t\twhere num_action='" . $this->id_action . "'";
     $res = pmb_mysql_query($req, $dbh);
     if (pmb_mysql_num_rows($res)) {
         $tab_docnum = array();
         while ($docnums = pmb_mysql_fetch_array($res)) {
             $tab_docnum[] = $docnums;
         }
         $explnum_doc = new explnum_doc();
         $liste_docnum = $explnum_doc->show_docnum_table($tab_docnum, './demandes.php?categ=action&act=modif_docnum&idaction=' . $this->id_action);
         $form_see_docnum = str_replace('!!list_docnum!!', $liste_docnum, $form_see_docnum);
     } else {
         $form_see_docnum = str_replace('!!list_docnum!!', htmlentities($msg['demandes_action_no_docnum'], ENT_QUOTES, $charset), $form_see_docnum);
     }
     $form_see_docnum = str_replace('!!idaction!!', $this->id_action, $form_see_docnum);
     print $form_see_docnum;
     // Annulation de l'alerte sur l'action en cours après lecture des nouvelles notes si c'est la personne à laquelle est affectée l'action qui la lit
     $this->actions_read_gestion = demandes_actions::action_read($this->id_action, true, "_gestion");
     // Mise à jour de la demande dont est issue l'action
     demandes_actions::action_majParentEnfant($this->id_action, $this->num_demande, "_gestion");
 }
开发者ID:hogsim,项目名称:PMB,代码行数:54,代码来源:demandes_actions.class.php

示例9: die

<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: log.inc.php,v 1.1.2.1 2015-08-13 07:30:45 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
global $log, $infos_notice, $infos_expl;
$rqt = " select empr_prof,empr_cp, empr_ville as ville, empr_year, empr_sexe, empr_login,  empr_date_adhesion, empr_date_expiration, count(pret_idexpl) as nbprets, count(resa.id_resa) as nbresa, code.libelle as codestat, es.statut_libelle as statut, categ.libelle as categ, gr.libelle_groupe as groupe,dl.location_libelle as location\n\t\t\tfrom empr e\n\t\t\tleft join empr_codestat code on code.idcode=e.empr_codestat\n\t\t\tleft join empr_statut es on e.empr_statut=es.idstatut\n\t\t\tleft join empr_categ categ on categ.id_categ_empr=e.empr_categ\n\t\t\tleft join empr_groupe eg on eg.empr_id=e.id_empr\n\t\t\tleft join groupe gr on eg.groupe_id=gr.id_groupe\n\t\t\tleft join docs_location dl on e.empr_location=dl.idlocation\n\t\t\tleft join resa on e.id_empr=resa_idempr\n\t\t\tleft join pret on e.id_empr=pret_idempr\n\t\t\twhere e.empr_login='" . addslashes($login) . "'\n\t\t\tgroup by resa_idempr, pret_idempr";
$res = pmb_mysql_query($rqt);
if ($res) {
    $empr_carac = pmb_mysql_fetch_array($res);
    $log->add_log('empr', $empr_carac);
}
$log->add_log('num_session', session_id());
$log->save();
开发者ID:hogsim,项目名称:PMB,代码行数:18,代码来源:log.inc.php

示例10: resa_ranger_list

function resa_ranger_list()
{
    global $base_path, $dbh;
    global $msg;
    global $current_module;
    global $begin_result_liste;
    global $end_result_liste;
    global $deflt_docs_location;
    global $pmb_lecteurs_localises;
    global $f_loc;
    $aff_final = "";
    if ($pmb_lecteurs_localises) {
        if ($f_loc == "") {
            $f_loc = $deflt_docs_location;
        }
        if ($f_loc) {
            $sql_expl_loc = " where expl_location='" . $f_loc . "' ";
        }
    }
    if ($pmb_lecteurs_localises) {
        //la liste de sélection de la localisation
        $aff_final .= "<form class='form-{$current_module}' name='check_docranger' action='" . $base_path . "/circ.php?categ=listeresa&sub=docranger' method='post'>";
        $aff_final .= "<br />" . $msg["transferts_circ_resa_lib_localisation"];
        $aff_final .= "<select name='f_loc' onchange='document.check_docranger.submit();'>";
        $res = pmb_mysql_query("SELECT idlocation, location_libelle FROM docs_location order by location_libelle");
        $aff_final .= "<option value='0'>" . $msg["all_location"] . "</option>";
        //on parcours la liste des options
        while ($value = pmb_mysql_fetch_array($res)) {
            //debut de l'option
            $aff_final .= "<option value='" . $value[0] . "'";
            if ($value[0] == $f_loc) {
                $aff_final .= " selected";
            }
            //c'est l'option par défaut
            $aff_final .= ">" . $value[1] . "</option>";
        }
        $aff_final .= "</select></form>";
    }
    $sql = "SELECT resa_cb, expl_id from resa_ranger left join exemplaires on resa_cb=expl_cb " . $sql_expl_loc;
    $res = pmb_mysql_query($sql, $dbh);
    while ($ranger = pmb_mysql_fetch_object($res)) {
        if ($ranger->expl_id) {
            if ($stuff = get_expl_info($ranger->expl_id)) {
                $stuff = check_pret($stuff);
                $aff_final .= print_info($stuff, 0, 0, 0);
            } else {
                $aff_final .= "<strong>" . $ranger->resa_cb . "&nbsp;: {$msg[395]}</strong><br>";
            }
        } else {
            $aff_final .= "<strong>" . $ranger->resa_cb . "&nbsp;: {$msg[395]}</strong><br>";
        }
    }
    if ($aff_final) {
        return $begin_result_liste . $aff_final . $end_result_liste;
    } else {
        return $msg['resa_liste_docranger_nodoc'];
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:58,代码来源:resa_func.inc.php

示例11: explode

            break;
        default:
            break;
    }
    $i++;
}
//visibilité des exemplaires
if ($pmb_droits_explr_localises) {
    $explr_tab_invis = explode(",", $explr_invisible);
    $explr_tab_unmod = explode(",", $explr_visible_unmod);
    $explr_tab_modif = explode(",", $explr_visible_mod);
    $visibilite_expl_user = "\n\t\t<div class='row'><hr /></div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>" . $msg["expl_visibilite"] . "&nbsp;:&nbsp;</div>\n\t\t\t<div class='colonne_suite'>&nbsp;</div>\n\t\t</div>\n";
    $requete_droits_expl = "select idlocation, location_libelle from docs_location order by location_libelle";
    $resultat_droits_expl = pmb_mysql_query($requete_droits_expl);
    $temp = "";
    while ($j = pmb_mysql_fetch_array($resultat_droits_expl)) {
        $temp .= $j["idlocation"] . ",";
        $visibilite_expl_user .= "\n\t\t\t<div class='row'>\n\t\t\t\t<div class='colonne3' align='right'>" . $j["location_libelle"] . " : </div>\n\t\t\t\t<div class='colonne_suite'>&nbsp;<select name=\"form_expl_visibilite_" . $j["idlocation"] . "\">\n\t\t\t";
        $as_invis = array_search($j["idlocation"], $explr_tab_invis);
        $as_unmod = array_search($j["idlocation"], $explr_tab_unmod);
        $as_mod = array_search($j["idlocation"], $explr_tab_modif);
        $visibilite_expl_user .= "\n<option value='explr_invisible' " . ($as_invis !== FALSE && $as_invis !== NULL ? "selected='selected' " : "") . ">" . $msg["explr_invisible"] . "</option>";
        if ($as_mod !== FALSE && $as_mod !== NULL || $as_unmod !== FALSE && $as_unmod !== NULL || $as_invis !== FALSE && $as_invis !== NULL) {
            $visibilite_expl_user .= "\n<option value='explr_visible_unmod' " . ($as_unmod !== FALSE && $as_unmod !== NULL ? "selected='selected' " : "") . ">" . $msg["explr_visible_unmod"] . "</option>";
        } else {
            $visibilite_expl_user .= "\n<option value='explr_visible_unmod' selected='selected' >" . $msg["explr_visible_unmod"] . "</option>";
        }
        $visibilite_expl_user .= "\n<option value='explr_visible_mod' " . ($as_mod !== FALSE && $as_mod !== NULL ? "selected='selected' " : "") . ">" . $msg["explr_visible_mod"] . "</option>";
        $visibilite_expl_user .= "</select></div></div>\n";
    }
    pmb_mysql_free_result($resultat_droits_expl);
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:user_modif.inc.php

示例12: maj_indexation


//.........这里部分代码省略.........
             //la table pour les recherche exacte
             $req_del = "delete from cms_editorial_fields_global_index where num_obj='" . $this->id . "' and type = '" . $this->type . "'";
             pmb_mysql_query($req_del, $dbh);
         } else {
             foreach ($tab_code_champ as $subfields) {
                 foreach ($subfields as $subfield) {
                     $req_del = "delete from cms_editorial_words_global_index where num_obj='" . $this->id . "' and type = '" . $this->type . "' and code_champ='" . $subfield['champ'] . "'";
                     pmb_mysql_query($req_del, $dbh);
                     //la table pour les recherche exacte
                     $req_del = "delete from cms_editorial_fields_global_index where num_obj='" . $this->id . "' and type = '" . $this->type . "' and code_champ='" . $subfield['champ'] . "'";
                     pmb_mysql_query($req_del, $dbh);
                     break;
                 }
             }
             //Les champs perso
             if (count($tab_pp)) {
                 foreach ($tab_pp as $id) {
                     $req_del = "delete from cms_editorial_words_global_index where num_obj='" . $this->id . "' and type = '" . $this->type . "' and code_champ='" . $id . "' ";
                     pmb_mysql_query($req_del, $dbh);
                     //la table pour les recherche exacte
                     $req_del = "delete from cms_editorial_fields_global_index where num_obj='" . $this->id . "' and type = '" . $this->type . "' and code_champ='" . $id . "' ";
                     pmb_mysql_query($req_del, $dbh);
                 }
             }
         }
         //qu'est-ce qu'on met a jour ?
         $tab_insert = array();
         $tab_field_insert = array();
         foreach ($tab_req as $k => $v) {
             $r = pmb_mysql_query($v["rqt"], $dbh);
             $tab_mots = array();
             $tab_fields = array();
             if (pmb_mysql_num_rows($r)) {
                 while ($tab_row = pmb_mysql_fetch_array($r, MYSQL_ASSOC)) {
                     if (isset($tab_row[$tab_languages[$k]])) {
                         $lang = $tab_row[$tab_languages[$k]];
                         unset($tab_row[$tab_languages[$k]]);
                     } else {
                         $lang = "";
                     }
                     foreach ($tab_row as $nom_champ => $liste_mots) {
                         if ($tab_code_champ[$k][$nom_champ]['marctype']) {
                             $marclist = new marc_list($tab_code_champ[$k][$nom_champ]['marctype']);
                             $liste_mots = $marclist->table[$liste_mots];
                         }
                         if ($liste_mots != '') {
                             $liste_mots = strip_tags($liste_mots);
                             $tab_tmp = array();
                             if (!in_array($k, $tab_keep_empty)) {
                                 $tab_tmp = explode(' ', strip_empty_words($liste_mots));
                             } else {
                                 $tab_tmp = explode(' ', strip_empty_chars(clean_string($liste_mots)));
                             }
                             //	if($lang!="") $tab_tmp[]=$lang;
                             //la table pour les recherche exacte
                             if (!$tab_fields[$nom_champ]) {
                                 $tab_fields[$nom_champ] = array();
                             }
                             $tab_fields[$nom_champ][] = array('value' => trim($liste_mots), 'lang' => $lang);
                             if (!$tab_code_champ[$k][$nom_champ]['no_words']) {
                                 foreach ($tab_tmp as $mot) {
                                     if (trim($mot)) {
                                         $tab_mots[$nom_champ][$mot] = $lang;
                                     }
                                 }
                             }
开发者ID:hogsim,项目名称:PMB,代码行数:67,代码来源:cms_editorial.class.php

示例13: recup_notice_infos

/**
 * Récupère les infos de la notice
 */
function recup_notice_infos($id_notice)
{
    global $infos_notice, $infos_expl;
    $rqt = "select notice_id, typdoc, niveau_biblio, index_l, libelle_categorie, name_pclass, indexint_name \n\t\tfrom notices n \n\t\tleft join notices_categories nc on nc.notcateg_notice=n.notice_id \n\t\tleft join categories c on nc.num_noeud=c.num_noeud \n\t\tleft join indexint i on n.indexint=i.indexint_id \n\t\tleft join pclassement pc on i.num_pclass=pc.id_pclass\n\t\twhere notice_id='" . $id_notice . "'";
    $res_noti = pmb_mysql_query($rqt);
    while ($noti = pmb_mysql_fetch_array($res_noti)) {
        $infos_notice = $noti;
        $rqt_expl = " select section_libelle, location_libelle, statut_libelle, codestat_libelle, expl_date_depot, expl_date_retour, tdoc_libelle \n\t\t\t\t\tfrom exemplaires e\n\t\t\t\t\tleft join docs_codestat co on e.expl_codestat = co.idcode\n\t\t\t\t\tleft join docs_location dl on e.expl_location=dl.idlocation\n\t\t\t\t\tleft join docs_section ds on ds.idsection=e.expl_section\n\t\t\t\t\tleft join docs_statut dst on e.expl_statut=dst.idstatut \n\t\t\t\t\tleft join docs_type dt on dt.idtyp_doc=e.expl_typdoc\n\t\t\t\t\twhere expl_notice='" . $id_notice . "'";
        $res_expl = pmb_mysql_query($rqt_expl);
        while ($expl = pmb_mysql_fetch_array($res_expl)) {
            $infos_expl[] = $expl;
        }
    }
}
开发者ID:hogsim,项目名称:PMB,代码行数:17,代码来源:do_resa.php

示例14: import_profs

function import_profs($separateur, $dbh, $type_import)
{
    //La structure du fichier texte doit être la suivante :
    //nom, prénom (le cb est généré automatiquement)
    $prof = array("Numéro auto", "Nom", "Prénom");
    $date_auj = date("Y-m-d", time());
    $date_an_proch = date("Y-m-d", time() + 3600 * 24 * 30.42 * 12);
    //Upload du fichier
    if (!$_FILES['import_lec']['tmp_name']) {
        print "Cliquez sur Pr&eacute;c&eacute;dent et choisissez un fichier";
    } elseif (!move_uploaded_file($_FILES['import_lec']['tmp_name'], "./temp/" . basename($_FILES['import_lec']['tmp_name']))) {
        print "Le fichier n'a pas pu être téléchargé. Voici plus d'informations :<br />";
        print_r($_FILES) . "<p>";
    }
    $fichier = @fopen("./temp/" . basename($_FILES['import_lec']['tmp_name']), "r");
    if ($fichier) {
        if ($type_import == 'maj_complete') {
            //Vide la table empr_groupe
            pmb_mysql_query("DELETE FROM empr_groupe", $dbh);
            echo $type_import;
            //Supprime les profs qui n'ont pas de prêts en cours
            $req_select_verif_pret = "SELECT id_empr FROM empr left join pret on id_empr=pret_idempr WHERE pret_idempr is null and empr_cb NOT LIKE 'P%'";
            $select_verif_pret = pmb_mysql_query($req_select_verif_pret, $dbh);
            while ($verif_pret = pmb_mysql_fetch_array($select_verif_pret)) {
                //pour tous les emprunteurs qui n'ont pas de pret en cours
                emprunteur::del_empr($verif_pret["id_empr"]);
            }
        }
        //Récupération dans la table 'empr' du 'empr_cb' maximum
        $req = pmb_mysql_query("SELECT MAX(empr_cb) AS cbmax FROM empr WHERE empr_categ=2 and empr_codestat=1", $dbh);
        $cb = pmb_mysql_result($req, 0, "cbmax");
        if (!$cb) {
            $numeroP = "000";
        } else {
            $numeroP = substr($cb, 1, 3);
        }
        while (!feof($fichier)) {
            $buffer = fgets($fichier, 4096);
            $buffer = pmb_mysql_escape_string($buffer);
            $tab = explode($separateur, $buffer);
            $buf_prenom = explode("\\", $tab[1]);
            $prenom = $buf_prenom[0];
            // Traitement du prof
            $select = pmb_mysql_query("SELECT id_empr FROM empr WHERE empr_nom = '" . $tab[0] . "' AND empr_prenom = '" . $prenom . "'", $dbh);
            $nb_enreg = pmb_mysql_num_rows($select);
            if (!$tab[0] || $tab[0] == "") {
                print "<b> Professeur non pris en compte car \"Nom\" non renseigné : </b><br />";
                for ($i = 1; $i < 3; $i++) {
                    print $prof[$i] . " : " . $tab[$i - 1] . ", ";
                }
                print "<br />";
                $nb_enreg = 2;
            }
            //Gestion du sexe
            switch ($tab[8][0]) {
                case M:
                    $sexe = 1;
                    break;
                case F:
                    $sexe = 2;
                    break;
                default:
                    $sexe = 0;
                    break;
            }
            //Génération du code-barre
            $numeroP = $numeroP + 1;
            if ($numeroP < 10) {
                $prof_cb = "P00" . $numeroP;
            } elseif ($numeroP < 100) {
                $prof_cb = "P0" . $numeroP;
            } elseif ($numeroP < 1000) {
                $prof_cb = "P" . $numeroP;
            }
            //Génération du login
            $login = cre_login($tab[0], $prenom, $dbh);
            //Pour l'instant login = mdp car lors de l'import des profs, aucune date de naissance n'est fournie
            switch ($nb_enreg) {
                case 0:
                    //Ce prof n'est pas enregistré
                    $req_insert = "INSERT INTO empr(empr_cb, empr_nom, empr_prenom, empr_adr1, empr_adr2, empr_cp, empr_ville, ";
                    $req_insert .= "empr_mail, empr_tel1, empr_year, empr_categ, empr_codestat, empr_creation, empr_sexe,  ";
                    $req_insert .= "empr_login, empr_password, empr_date_adhesion, empr_date_expiration) ";
                    $req_insert .= "VALUES ('{$prof_cb}','{$tab['0']}','{$prenom}', '{$tab['2']}', '{$tab['3']}', '{$tab['4']}', '{$tab['5']}', '{$tab['9']}', '{$tab['6']}', '{$tab['7']}', ";
                    $req_insert .= "2, 1, '{$date_auj}', {$sexe}, '{$login}', replace(replace('" . $tab[7] . "','\n',''),'\r',''), '{$date_auj}', '{$date_an_proch}' )";
                    $insert = pmb_mysql_query($req_insert, $dbh);
                    if (!$insert) {
                        print "<b>Echec de la création du professeur suivant (Erreur : " . pmb_mysql_error() . ") : </b><br />";
                        for ($i = 1; $i < 3; $i++) {
                            print $prof[$i] . " : " . $tab[$i - 1] . ", ";
                        }
                        print "<br />";
                    } else {
                        emprunteur::update_digest($login, str_replace(array("\n", "\r"), "", $tab[7]));
                        emprunteur::hash_password($login, str_replace(array("\n", "\r"), "", $tab[7]));
                        $cpt_insert++;
                    }
                    $j++;
                    break;
                case 1:
//.........这里部分代码省略.........
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:101,代码来源:import_bretagne_2.inc.php

示例15: getRelancesBySupplier

 static function getRelancesBySupplier($id_fou = 0)
 {
     global $dbh, $msg;
     $tab = array();
     if ($id_fou) {
         $q = "select id_acte, type_acte, date_format(date_acte, '" . $msg["format_date"] . "') as date_acte, numero as numero, ";
         $q .= "num_ligne, date_format(date_relance, '" . $msg["format_date"] . "') as date_rel , type_ligne, num_acquisition, num_rubrique, num_produit, num_type, ";
         $q .= "libelle, code, prix, tva, nb, lignes_actes_relances.statut as statut, remise, debit_tva, commentaires_gestion, commentaires_opac ";
         $q .= "from actes join lignes_actes_relances on num_acte=id_acte where num_fournisseur ='" . $id_fou . "' ";
         $q .= "order by date_relance desc, num_acte ";
         $r = pmb_mysql_query($q, $dbh);
         if (pmb_mysql_num_rows($r)) {
             while ($row = pmb_mysql_fetch_array($r, MYSQL_ASSOC)) {
                 $tab[] = $row;
             }
         }
     }
     return $tab;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:19,代码来源:lignes_actes.class.php


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