<?PHP
/***************************************************************************/
/* BLOC-NOTES engine for NPDS V  / Net Portal Dynamic System               */
/*                                                                         */
/* This version name NPDS Copyright (c) 2002-2005 by Philippe Brunier      */
/*                                                                         */
/* This BLOC-NOTES version Copyright (c) 2003-2005 by Arnaud Latourrette   */
/*                                                                         */
/* This program is free software. You can redistribute it and/or modify    */
/* it under the terms of the GNU General Public License as published by    */
/* the Free Software Foundation; either version 2 of the License.          */
/***************************************************************************/

if (strstr($bnid,"..") || strstr($bnid,"./") || stristr($bnid, "script") || stristr($bnid, "cookie") || stristr($bnid, "iframe") || stristr($bnid, "applet") || stristr($bnid, "object") || stristr($bnid, "meta") ) {
   die();
}
$result = mysql_query("select texte from ".$NPDS_Prefix."blocnotes where bnid='$bnid'");
if (mysql_num_rows($result) > 0) {
   list($texte)=mysql_fetch_row($result);
}
$texte=StripSlashes(split_string_without_space($texte, 20));
echo "document.write('<script>document.A$bnid.texteBlocNote.value=unescape(\'".str_replace(chr(13).chr(10),"\\\\n",str_replace("'","\\\\\'",$texte))."\');</script>')";
?>