<?php 
session_start();
// ============
include("../../asset/theme/css/myfunc.php");
//include("../../php_crud/my_class_for_web.php");
include("../../php_crud/my_class.php");
$obj = new my_class();
//$branch_id = $_SESSION['LOGIN_BRANCH'];
extract($_POST);

/*
$form_data=array(
				'selection_status'=>0,
		);
$up=$obj->Update_Data('_students_admission_mark_entry',$form_data,' branch_id='.$branch_id
	 
);*/


	
	$form_data=array(
				'selection_status'=>0,'list_type'=>'rejected'
		);
		$where_cond = 'mark_entry_id="'.$mark.'" AND branch_id='.$branch_id;
	 $up=$obj->Update_Data('_students_admission_mark_entry',$form_data,'mark_entry_id="'.$mark.'" AND branch_id='.$branch_id);
	 if($up!=NULL){
		$table_name="_students_admission_form f left join _students_admission_mark_entry e on f.admission_id=e.admission_id";
		//$columns="f.admission_id";
		$where_cond="e.mark_entry_id=".$mark;
		$up=$obj->Details_By_Cond($table_name, $where_cond);
		$admission_id=$up['admission_id'];
		
		$form_data1=array(
			'_candidate_status'=>'RE'
		);
		$up=$obj->Update_Data('_students_admission_form',$form_data1,'admission_id='.$admission_id);
		
	}

//echo $where_cond;
if($up) echo 'Unapprove successfully';
?>