<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============

extract($_REQUEST);


$branch = $_SESSION["LOGIN_BRANCHES"];
$module_id = $module_id; 

$SESSION = date('Y');

$table_name = "_pf_std_basic_info b 
					LEFT JOIN _pf_std_personal_info p ON b._pid = p._id"  ;
		 
$column = "p._contact_mobile";
$where_cond = " b._section_id IN (".trim($section,'"').") AND p._status !='D' ";

	
if($section){
$student = $obj->View_all_data_row_column_By_Cond($table_name, $column, $where_cond);
 $smsstatus = false; 	
}

$change = "`";
$message = str_replace("'",$change,$message);

if(count($student)>0){
	$form_notice=array(
				'_institute_id'=>$_SESSION["LOGIN_INSTITUTE_ID"],
				'_branch_id'=>$_SESSION["LOGIN_BRANCH"],
				'_module_id'=>$module_id,
				'_student_type'=>substr($student_type, 1, -1),
				'_sections'=>substr($section, 1, -1),
				'_notice_subject'=>$subject,
				'_notice_body'=>$message,
				'_priority'=>$priority,
				'_status'=>1,
				'_entry_by'=>$_SESSION['LOGIN_USERID'],
				'_entry_date'=>date("Y:m:d h:i:s"),
				'_update_by'=>$_SESSION['LOGIN_USERID']
			);

//print_r($form_notice);

$notice=$obj->Insert_Data("_int_std_notice", $form_notice);

if($notice){ echo 'Your request has been successfully submited'; else echo 'Error has been occured';}
}
else {
	echo "Student Not Found !";
}
					
?>
