<?php
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
include("../../php_crud/my_class.php");
$obj=new my_class();
// ============
extract($_POST);
$today_date = date("Y-m-d");

if($operation=='subject_atd_create' AND $department_id!=''){

	foreach($obj->View_colmn_By_Cond("_int_subject","_id","_dept_id='$department_id' AND _status='A'") as $value){
	extract($value);
	$subject_id = $value['_id'];

	$form_data = array(
	'_section_id'=>$section_id,
	'_subject_id'=>$subject_id,
	'_atd_status'=>'',
	'_approve_satus'=>'',
	'_entry_by'=>$_SESSION['LOGIN_USERID'],
	'_entry_date'=>date("Y:m:d h:i:s")
	);
	$obj->Insert_Data_By_Cond("_atd_daily_status_subject", $form_data,"_section_id='$section_id' AND _subject_id='$subject_id' AND DATE(_entry_date)='$today_date'");
	}
}
?>

