* @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("UPDATE ".$_SESSION['tablename']['notes']." SET
INFO = '".addslashes($_POST[$textareaName])."', DATE = '".date("Y")."-".date("m")."-".date("d")." ".date("H:i:s")."', ACCESS_USERS = '".$accessUsersValue."', ACCESS_SERVICES = '".$accessServicesValue."'
WHERE ID = ".$s_id);
//Mise a jour de l'historique
if($_SESSION['history']['notesup'])
{
require_once("class_history.php");
$hist = new history();
$hist->add($_SESSION['tablechoice'], $resid ,"UP", _NOTE_UPDATED);
}
?>
query("select ID, RECORD_ID, INFO, DATE, USER_ID, ACCESS_SERVICES, ACCESS_USERS
from ".$_SESSION['tablename']['notes']."
where ID= ".$s_id." and USER_ID = '".$_SESSION['user']['UserId']."'");
//$db->show();
$line = $db->fetch_object();
if (strcasecmp(strip_tags($func->show($line->INFO)), $func->show($line->INFO)) == 0) {
$noteType = 'spl';
}
else{
$noteType = 'adv';
}
?>
ACCESS_USERS);
if($line->ACCESS_SERVICES == 'not'){echo 'checked="checked"';} ?> onclick="showHide('departement', 'users', 'users');" />
ACCESS_SERVICES != 'not'){echo 'style="display:none; visibility:hidden;"';} ?> >