* @author Claire Figueras
* @author Jimmy Cédric Ndoumba
*/
include("session.php");
if(file_exists($_SESSION['config']['lang'].'.php'))
{
include($_SESSION['config']['lang'].'.php');
}
else
{
$_SESSION['error'] = "Language file missing...
";
}
require_once("class_functions.php");
require_once("class_db.php");
$func = new functions();
$db = new dbquery();
$db->connect();
$time = $db->get_session_time_expire();
?>
query("INSERT INTO ".$_SESSION['tablename']['notes']."
( RECORD_ID, INFO, DATE, USER_ID, ACCESS_SERVICES, ACCESS_USERS) VALUES (".$resid.", '".addslashes($_POST[$textareaName])."',
'".date("Y")."-".date("m")."-".date("d")." ".date("H:i:s")."',
'".$_SESSION['user']['UserId']."', '".$accessServicesValue."', '".$accessUsersValue."')");
include_once($_SESSION['config']['includedir'].'/addon_sendmail_notes.php');
if ($_SESSION['config']['mail_for_new_note'] == "true" )
{
sendmail_notes($resid, addslashes($_POST[$textareaName]));
}
//Mise à jour de l'historique
if($_SESSION['history']['notesadd'])
{
require_once("class_history.php");
$hist = new history();
$hist->add($_SESSION['tablechoice'], $resid ,"ADD", _ADDITION_NOTE);
}
?>