".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é } //On évite de saisir 2 fois la même suggestion if (!suggestions::exists($userid, $tit, $aut, $edi, $code)) { $su = new suggestions(); $su->titre = stripslashes($tit); $su->editeur = stripslashes($edi); $su->auteur = stripslashes($aut); $su->code = stripslashes($code); $prix = str_replace(',','.',$prix); if (is_numeric($prix)) $su->prix = $prix; $su->nb = 1; $su->statut = $sug_map->getFirstStateId(); $su->url_suggestion = stripslashes($url_sug); $su->commentaires = stripslashes($comment); $su->date_creation = today(); $su->date_publi = stripslashes($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.= " "; if(!$_SESSION["id_empr_session"]) { $sug_form.= " "; } if ($opac_sugg_categ=='1') { $categ = new suggestions_categ($su->num_categ); $sug_form.= " "; } $sug_form.= " "; $source = new suggestion_source($su->sugg_src); $sug_form.= " "; $sug_form.= " "; $sug_form.= "
".htmlentities($msg["empr_sugg_tit"], ENT_QUOTES, $charset)." ".htmlentities($su->titre, ENT_QUOTES, $charset)."
".htmlentities($msg["empr_sugg_aut"], ENT_QUOTES, $charset)." ".htmlentities($su->auteur, ENT_QUOTES, $charset)."
".htmlentities($msg["empr_sugg_edi"], ENT_QUOTES, $charset)." ".htmlentities($su->editeur, ENT_QUOTES, $charset)."
".htmlentities($msg["empr_sugg_code"], ENT_QUOTES, $charset)." ".htmlentities($su->code, ENT_QUOTES, $charset)."
".htmlentities($msg["empr_sugg_prix"], ENT_QUOTES, $charset)." ".htmlentities($su->prix, ENT_QUOTES, $charset)."
".htmlentities($msg['empr_sugg_url'], ENT_QUOTES, $charset)." ".htmlentities($su->url_suggestion, ENT_QUOTES, $charset)."
".htmlentities($msg['empr_sugg_comment'], ENT_QUOTES, $charset)." ".htmlentities($su->commentaires, 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($su->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)."

"; $sug_form.= "".htmlentities($msg["empr_sugg_ok"], ENT_QUOTES, $charset)."

"; } else { //Mise en forme des données pour ré-affichage $tit = stripslashes($tit); $edi = stripslashes($edi); $aut = stripslashes($aut); $code = stripslashes($code); //Ré-affichage de la suggestion $sug_form.= " "; $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)."

"; $sug_form.= "".htmlentities($msg["empr_sugg_already_exist"], ENT_QUOTES, $charset)."

"; } } else { // Les données minimun n'ont pas été saisies $sug_form.= str_replace('\n','
',$msg["empr_sugg_ko"])."

"; $sug_form.= ""; } print $sug_form; ?>