".htmlentities($msg["empr_make_sugg"], ENT_QUOTES, $charset)."\n"; // Contrôle des données saisies if (($tit != "") && ($aut != "" || $edi != "" || $code != "" || $_FILES['piece_jointe_sug']['name'] != "") ) { //Les données minimun ont été saisies $userid = $_SESSION["id_empr_session"]; if (!$userid) { $type = '2'; //Visiteur non authentifié $userid= $mail; } else { $type = '1'; //Abonné } //Mise en forme des données pour ré-affichage $tit = stripslashes($tit); $edi = stripslashes($edi); $aut = stripslashes($aut); $code = stripslashes($code); $url_sug = stripslashes($url_sug); $comment = stripslashes($comment); $date_publi = stripslashes($date_publi); //On évite de saisir 2 fois la même suggestion if (!suggestions::exists($userid, $tit, $aut, $edi, $code)) { $su = new suggestions(); $su->titre = $tit; $su->editeur = $edi; $su->auteur = $aut; $su->code = $code; $prix = str_replace(',','.',$prix); if (is_numeric($prix)) $su->prix = $prix; $su->nb = 1; $su->statut = $sug_map->getFirstStateId(); $su->url_suggestion = $url_sug; $su->commentaires = $comment; $su->date_creation = today(); $su->date_publi = $date_publi; $su->sugg_src = $sug_src; $su->num_notice = $id_notice; // chargement de la PJ if($_FILES['piece_jointe_sug']['name']){ $explnum_doc = new explnum_doc(); $explnum_doc->load_file($_FILES['piece_jointe_sug']); $explnum_doc->analyse_file(); } if ($opac_sugg_categ == '1' ) { if (!suggestions_categ::exists($num_categ) ){ $num_categ = $opac_sugg_categ_default; } if (!suggestions_categ::exists($num_categ) ) { $num_categ = '1'; } $su->num_categ = $num_categ; } $su->sugg_location=$sugg_location_id; $su->save($explnum_doc); } $orig = new suggestions_origine($userid, $su->id_suggestion); $orig->type_origine = $type; $orig->save(); //Ré-affichage de la suggestion $sug_form.= "
".htmlentities($msg["empr_sugg_tit"], ENT_QUOTES, $charset)." | ".htmlentities($tit, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_aut"], ENT_QUOTES, $charset)." | ".htmlentities($aut, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_edi"], ENT_QUOTES, $charset)." | ".htmlentities($edi, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_code"], ENT_QUOTES, $charset)." | ".htmlentities($code, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_prix"], ENT_QUOTES, $charset)." | ".htmlentities($prix, ENT_QUOTES, $charset)." |
".htmlentities($msg['empr_sugg_url'], ENT_QUOTES, $charset)." | ".htmlentities($url_sug, ENT_QUOTES, $charset)." |
".htmlentities($msg['empr_sugg_comment'], ENT_QUOTES, $charset)." | ".htmlentities($comment, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_mail"], ENT_QUOTES, $charset)." | ".htmlentities($mail, ENT_QUOTES, $charset)." |
".htmlentities($msg['acquisition_categ'], ENT_QUOTES, $charset)." | ".htmlentities($categ->libelle_categ, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_datepubli"], ENT_QUOTES, $charset)." | ".htmlentities($date_publi, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_src"], ENT_QUOTES, $charset)." | ".htmlentities($source->libelle_source, ENT_QUOTES, $charset)." |
".htmlentities($msg["empr_sugg_piece_jointe"], ENT_QUOTES, $charset)." | ".htmlentities($explnum_doc->explnum_doc_nomfichier, ENT_QUOTES, $charset)." |