Example #1
0
require_once $base_path . '/classes/suggestions_map.class.php';
require_once $base_path . '/classes/suggestion_source.class.php';
$sug_map = new suggestions_map();
$sug_form .= "\n<div id='view_sugg'>\n\t<h3><span>" . htmlentities($msg['empr_view_sugg'], ENT_QUOTES, $charset) . "<span></h3>\n\t<div id='empr_view-container'>\n\t<!-- affichage liste des suggestions -->\n\t<table width='100%'><tr>\n\t\t<th>" . htmlentities($msg['acquisition_sug_dat_cre'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['acquisition_sug_tit'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['acquisition_sug_edi'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['acquisition_sug_aut'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['acquisition_sug_etat'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['empr_sugg_datepubli'], ENT_QUOTES, $charset) . "</th>\n\t\t<th>" . htmlentities($msg['empr_sugg_src'], ENT_QUOTES, $charset) . "</th>";
if ($opac_sugg_categ == '1') {
    $sug_form .= "<th>" . htmlentities($msg['acquisition_categ'], ENT_QUOTES, $charset) . "</th>";
}
$sug_form .= "<th>" . htmlentities($msg['empr_sugg_piece_jointe'], ENT_QUOTES, $charset) . "</th>";
$sug_form .= "<th>&nbsp;</th></tr>";
$q = suggestions::listSuggestionsByOrigine($id_empr, '1');
$res = pmb_mysql_query($q, $dbh);
$nbr = pmb_mysql_num_rows($res);
if ($nbr) {
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        $lib_statut = $sug_map->getHtmlComment($row->statut);
        if ($parity++ % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        if ($row->statut == 1) {
            //Si la suggestion n'est pas validée on peut la modifier
            $modif_sugg = "onclick=\"document.location='" . $opac_url_base . "empr.php?lvl=make_sugg&id_sug={$row->id_suggestion}'\" ";
            $pointer = "style='cursor:pointer'";
        } else {
            $modif_sugg = "";
            $pointer = "";
        }
        $sug_form .= "\n\t\t\t<tr class='{$pair_impair}' >\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . formatdate($row->date_suggestion) . "</td>\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . htmlentities($row->titre, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . htmlentities($row->editeur, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . htmlentities($row->auteur, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . $lib_statut . "</td>\n\t\t\t\t<td {$modif_sugg} {$pointer}>" . htmlentities($row->date_publication, ENT_QUOTES, $charset) . "</td>";
        $source = new suggestion_source($row->sugg_source);