<?php
// check user is loged in or not
if($_SESSION['seas_user_id'] <=0) {
	header("location: home");
}


require_once($application_path . "model/survey.mdl.php");
$SEAS_Survey_Model = new survey_Model();

// For deleting selected survey on click
if(isset($_REQUEST['del_id'])) {
	$SEAS_Survey_Model->del_survey($_REQUEST['del_id']);
}

// Delete from group selected by check box
foreach($_REQUEST as $ctrl=>$val) {
	if(substr($ctrl,0,4) == "chk_") {
		$SEAS_Survey_Model->del_survey(substr($ctrl,4));
	}
}

$survey_list = $SEAS_Survey_Model->list_survey($_SESSION['seas_user_id']);



?>