load_lang(); $func = new functions(); $db = new dbquery(); $db->connect(); //Get the table if(!empty($_SESSION['current_basket']['view'])) { $table = $_SESSION['current_basket']['view']; } else { $table = $_SESSION['current_basket']['table']; } $coll_id = $_SESSION['current_basket']['coll_id']; $basket_id = $_SESSION['current_basket']['id']; //get the res_id if(isset($_REQUEST['id'])) { $rid = $_REQUEST['id']; } //If submit if (isset($_REQUEST['submit'])) { $res_id = $_REQUEST['rid']; $text = $func->protect_string_db($_REQUEST['notes']); $db->query("INSERT INTO ".$_SESSION['tablename']['not_notes']." ( identifier, note_text, date, user_id, coll_id, tablename) VALUES ( ".$res_id.", '".$text."', '".date("Y")."-".date("m")."-".date("d")." ".date("H:i:s")."', '".$_SESSION['user']['UserId']."', '".$coll_id."', '".$basket_id."')"); if($_SESSION['history']['noteadd']) { $hist = new history(); $hist->add($table, $res_id, "ADD", _POSTINDEXING_NOTE_ADDED._ON_DOC_NUM.$res_id , $_SESSION['config']['databasetype'],'notes'); } ?> query("select n.date_note, n.user_id, n.note_text, u.lastname, u.firstname from ".$_SESSION['tablename']['not_notes']." n inner join ".$_SESSION['tablename']['users']." u on n.user_id = u.user_id where n.identifier = ".$rid." and tablename = '".$basket_id."' and coll_id = '".$coll_id."'"); $line = $db->fetch_object(); $user = $func->show_string($line->lastname." ".$line->firstname); $text = $func->show_string($line->note_text); $user_id = $line->user_id; $date = $line->date; } $core_tools->load_html(); $core_tools->load_header(_ADD_POSTINDEXING_NOTE); ?>

".$user." (".$date.") ";?>