<?php
include_once '../session/admin-session.php';
include_once '../classes/class_admin.php';
include_once '../classes/validation.php';
include_once '../classes/common.php';
include_once 'read-configration.php';

$log = new common();
$objadm = new class_admin();
$val = new validation();
$ObjDB = new class_db();
$admin_roll = $_SESSION['user_sesroll']; 

$today = date("Y-m-d H:i:s");
$stu_roll = $val->ValidateString($_POST['stu_roll']);

$reco2 = $_POST['reco2'];
$reco2 = str_replace("'", "&#39;", $reco2);
$reco2 = str_replace('"', "&#34;", $reco2);
$reco2 = str_replace("\n", "&#nl", $reco2);
$reco2 = str_replace("\r", "&#rl", $reco2);
if($reco2 != '') {
	$qup = "insert into isr_stu_notes_tbl (stu_roll, admin_roll, note_text, note_date) values ('$stu_roll', '$admin_roll', '$reco2', '$today')";
	$ObjDB->sproc_name = $qup;
        $ObjDB->ExecuteQuery();
}
header('Location: reports-stu-notes-save.php?stu_roll='.$stu_roll);
?>