Ejemplo n.º 1
0
function show_list_biblio()
{
    global $msg, $charset;
    global $tab_bib, $nb_bib;
    global $current_module;
    //Affichage de la liste des bibliothèques auxquelles a accès l'utilisateur
    if ($nb_bib == '1') {
        show_list_coord($tab_bib[0][0]);
        exit;
    }
    $def_bibli = entites::getSessionBibliId();
    if (in_array($def_bibli, $tab_bib[0])) {
        show_list_coord($def_bibli);
        exit;
    }
    $aff = "<form class='form-" . $current_module . "' id='list_biblio_form' name='list_biblio_form' method='post' action=\"\" >";
    $aff .= "<h3>" . htmlentities($msg['acquisition_menu_chx_ent'], ENT_QUOTES, $charset) . "</h3><div class='row'></div>";
    $aff .= "<table>";
    $parity = 1;
    foreach ($tab_bib[0] as $k => $v) {
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='" . $pair_impair . "'\" onmousedown=\"document.forms['list_biblio_form'].setAttribute('action','./acquisition.php?categ=ach&sub=fourn&action=list&id_bibli=" . $v . "');document.forms['list_biblio_form'].submit(); \" ";
        $aff .= "<tr class='" . $pair_impair . "' " . $tr_javascript . " style='cursor: pointer'><td><i>" . htmlentities($tab_bib[1][$k], ENT_QUOTES, $charset) . "</i></td></tr>";
    }
    $aff .= "</table></form>";
    print $aff;
}
Ejemplo n.º 2
0
            $total7 = entites::has_actes($id, 1);
            if ($total2 + $total3 + $total4 + $total5 + $total7 == 0) {
                entites::delete($id);
                show_list_coord();
            } else {
                $msg_suppr_err = $msg[acquisition_entite_used];
                if ($total2) {
                    $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_fou];
                }
                if ($total3) {
                    $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_exe];
                }
                if ($total4) {
                    $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_bud];
                }
                if ($total5) {
                    $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_sug];
                }
                if ($total7) {
                    $msg_suppr_err .= "<br />- " . $msg[acquisition_entite_used_act];
                }
                error_message($msg[321], $msg_suppr_err, 1, 'admin.php?categ=acquisition&sub=entite');
            }
        } else {
            show_list_coord();
        }
        break;
    default:
        show_list_coord();
        break;
}