Commit 1296d54b by Manoj

changes

parent c1a1c5e5
......@@ -2479,77 +2479,90 @@ class ApplicationController extends CI_Controller
public function examSchedule()
{
$view_data['academic_year'] = $this->mcommon->records_all('accadamic_year',array('status',1));
$view_data['records'] = $this->mcommon->records_all('exam_schedule',array('status',1));
$data = array(
'title' => 'Exam Schedule',
'page' => 'Exam Schedule',
'content' => $this->load->view('masters/examSchedule', $view_data, true),
{
$view_data['academic_year'] = $this->mcommon->records_all('accadamic_year', array('status', 1));
$view_data['records'] = $this->mcommon->records_all('exam_schedule', array('status', 1));
$view_data['exam_type'] = $this->mcommon->records_all('exam_type', array('status', 1));
$data = array(
'title' => 'Exam Schedule',
'page' => 'Exam Schedule',
'content' => $this->load->view('masters/examSchedule', $view_data, true),
);
$this->load->view('base/base_template', $data);
}
public function addEditexamSchedule()
{
$id = $this->input->post('id');
$schedule = $this->input->post('schedule');
$academic = $this->input->post('academic');
$exam_type1 = $this->input->post('exam_type1');
$exam_type2 = $this->input->post('exam_type2');
$objective_date = $this->input->post('objective_date');
$objective_time = $this->input->post('objective_time');
$essay_date = $this->input->post('essay_date');
$essay_time = $this->input->post('essay_time');
if ($id) {
$update_array = array(
'exam_schedule' => $schedule,
'academic' => $academic,
'exam_type1' => $exam_type1,
'exam_type2' => $exam_type2,
'objective_date' => $objective_date,
'objective_time' => $objective_time,
'essay_date' => $essay_date,
'essay_time' => $essay_time,
'status' => 1,
);
$this->load->view('base/base_template', $data);
}
public function addEditexamSchedule()
{
$id = $this->input->post('id');
$schedule = $this->input->post('schedule');
$academic = $this->input->post('academic');
$date = $this->input->post('date');
$time = $this->input->post('time');
if ($id) {
$update_array = array(
'exam_schedule' => $schedule,
'academic' => $academic,
'date' => $date,
'time' => $time,
'status' => 1,
);
$update = $this->mcommon->common_edit('exam_schedule', $update_array, array('id' => $id));
if ($update) {
$this->session->set_flashdata('alert_success','Exam Schedule Updated Successfully!');
} else {
$this->session->set_flashdata('alert_danger', 'Something went wrong');
}
$update = $this->mcommon->common_edit('exam_schedule', $update_array, array('id' => $id));
if ($update) {
$this->session->set_flashdata('alert_success', 'Exam Schedule Updated Successfully!');
} else {
$user_array = array(
'exam_schedule' => $schedule,
'academic' => $academic,
'date' => $date,
'time' => $time,
'status' => 1,
);
$insert = $this->mcommon->common_insert('exam_schedule', $user_array);
if ($insert) {
$this->session->set_flashdata('alert_success', 'Exam Schedule Added successfully!');
} else {
$this->session->set_flashdata('alert_danger', 'Something went wrong');
}
$this->session->set_flashdata('alert_danger', 'Something went wrong');
}
} else {
$user_array = array(
'exam_schedule' => $schedule,
'academic' => $academic,
'exam_type1' => $exam_type1,
'exam_type2' => $exam_type2,
'objective_date' => $objective_date,
'objective_time' => $objective_time,
'essay_date' => $essay_date,
'essay_time' => $essay_time,
'status' => 1,
);
$insert = $this->mcommon->common_insert('exam_schedule', $user_array);
if ($insert) {
$this->session->set_flashdata('alert_success', 'Exam Schedule Added successfully!');
} else {
$this->session->set_flashdata('alert_danger', 'Something went wrong');
}
redirect('ApplicationController/examSchedule');
}
redirect('ApplicationController/examSchedule');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment