* @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['notes'])."',
'".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['notes']));
}
//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);
}
?>
query("SELECT u.USER_ID as ID, u.LASTNAME as NOM, u.FIRSTNAME as PRENOM
FROM ".$_SESSION['tablename']['users']." u WHERE u.DEPARTMENT IN (".$strServicesID.") AND u.USER_ID <> '".$_SESSION['user']['UserId']."' order by u.LASTNAME asc");
$color = ' class="col"';
while($res = $db->fetch_object())
{
if($color == ' class="col"')
{
$color = '';
}
else
{
$color = ' class="col"';
}
?>