\n";
if (!$grille_typdoc) $grille_typdoc='a' ;
if (!$grille_niveau_biblio) $grille_niveau_biblio='m' ;
$requete = "select name from notices_custom order by ordre ";
$res = mysql_query($requete, $dbh) or die(mysql_error()."
$requete");
if ($grille_niveau_biblio=='m') {
$grille_standard="
".
(mysql_num_rows($res)?"":"")."
";
if ($pmb_use_uniform_title) $grille_standard.="";
$grille_standard.="
";
while ($champ=mysql_fetch_object($res))
$grille_standard.=" \n";
$grille_standard.="
";
}
if ($grille_niveau_biblio=='s') {
$grille_standard="
".
(mysql_num_rows($res)?"":"")."
";
while ($champ=mysql_fetch_object($res))
$grille_standard.=" \n";
$grille_standard.="
";
}
if ($grille_niveau_biblio=='a') {
$grille_standard="
".
(mysql_num_rows($res)?"":"")."
";
while ($champ=mysql_fetch_object($res))
$grille_standard.=" \n";
$grille_standard.="
";
}
if ($grille_niveau_biblio=='b') {
$grille_standard="
".
(mysql_num_rows($res)?"":"")."
";
while ($champ=mysql_fetch_object($res))
$grille_standard.=" \n";
$grille_standard.="
";
}
$requete = "select grille_typdoc, grille_niveau_biblio, grille_localisation, descr_format from grilles where grille_niveau_biblio='$grille_niveau_biblio' and grille_typdoc='$grille_typdoc' ";
$res = mysql_query($requete, $dbh) or die(mysql_error()."
$requete");
if (!$grille_location) $grille_location=$deflt_docs_location;
while ($grille=mysql_fetch_object($res)) {
if (($grille->grille_localisation==$grille_location)&&($grille->descr_format)) {
$descr_format=$grille->descr_format;
break;
} else if (($grille->grille_localisation==0)&&($grille->descr_format)) {
$descr_format=$grille->descr_format;
}
}
if ($descr_format) {
print $descr_format;
} else print $grille_standard;