\n" ;
$nb_liste=mysql_numrows($resultat_liste);
if ($nb_liste==0) {
$gen_liste_str.="\n" ;
} else {
if ($option_premier_info!="") {
$gen_liste_str.="\n" ;
$i++;
}
}
$gen_liste_str.="\n" ;
return $gen_liste_str ;
} /* fin gen_combo_box */
function zshow_isbd($isbd, $lien) {
global $msg;
$retour="
$lien
$isbd
";
return $retour;
}
function showButRes(){
print "
";
flush();
}
function hideJoke(){
print "
";
flush();
}
function affiche_jsscript ($texte, $couleur, $ID_bib) {
print ("\n");
flush ();
}
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 = mysql_query($requete, $dbh);
$nbr_lignes = @mysql_num_rows($res);
if ($nbr_lignes) {
$valid_requete = 0 ;
$lu=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 = mysql_query($requete, $dbh);
$expl_retour = mysql_insert_id();
audit::insert_creation(AUDIT_EXPL,$expl_retour) ;
$new_expl=1;
}
$retour = array($new_expl,$expl_retour);
return $retour;
}
// -------------------------------- LLIUREX 31/10/2013
// Chequeamos la tabla z_attr para ver si es correcta
// Si no lo es, la inyectamos nueva. Esto soluciona el problema de z3950.
function check_z_attr_table() {
$requete="SELECT * FROM z_attr WHERE attr_bib_id=1 AND attr_libelle LIKE 'sujet' AND attr_attr=21";
$resultat=mysql_query($requete);
if (mysql_num_rows($resultat)!=1) {
require("./includes/db_param.inc.php");
$nom_fich="./lliurex/z_attr.sql";
$comando= "cat ". $nom_fich ." | mysql -u ". USER_NAME ." --password=". USER_PASS ." ". DATA_BASE;
system($comando, $salida);
}
}
// -------------------------------- FIN LLIUREX 31/10/2013