%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php defined('BASEPATH') OR exit('No direct script access allowed'); Class Managesubject extends CI_Controller { function __construct(){ parent::__construct(); $this->load->model('Common_Model'); if(! $this->session->userdata('adid')) { redirect('admin/login'); } } /* * Function : index * Desc : listing all records */ public function index() { $data = array(); $header = array(); $data['planArray'] = $this->Common_Model->getCommonIdArray('tbl_plan_master'); $data['recordsArray'] = $recordsArray = $this->Common_Model->getCommonQuery('tbl_subject_master'); $this->load->view('admin/managesubject/index',$data); setHistory('Go to manage Plan'); } /* * Function : addsubject * Desc : For particular Record */ public function addsubject($id='') { // School Array $data = array(); $data['planArray'] = $this->Common_Model->getAllRecords('tbl_plan_master','id, plan_name, plan_code',array('status'=>'1')); if($_POST){ $this->form_validation->set_rules('plan_id','Plan Name','required'); $this->form_validation->set_rules('subject_name','Subject Name','required'); $this->form_validation->set_rules('subject_code','Subject Code','required'); $this->form_validation->set_rules('status','Status','required'); if($this->form_validation->run()) { $plan_id = $this->input->post('plan_id'); $subject_name = $this->input->post('subject_name'); $subject_code = $this->input->post('subject_code'); $status = $this->input->post('status'); $data=array( 'plan_id'=>$plan_id, 'subject_name'=>$subject_name, 'subject_code'=>$subject_code, 'status'=>$status, 'is_deleted'=>'0', 'createdon'=>date('y-m-d H:i:s') ); if($this->input->post('id')){ $id = $this->input->post('id'); $this->Common_Model->updateinfo($tbl_name='tbl_subject_master',$data,'id',$id); setHistory('Subject Info Updated successfully'); } else { $this->Common_Model->saveinfo($tbl_name='tbl_subject_master',$data); setHistory('Subject Info Added successfully'); } redirect('admin/managesubject'); } else { $this->load->view('admin/managesubject/addrecord'); setHistory('Error! Add/Edit Subject'); } } else { $data['sd'] = $this->Common_Model->getSingleRecord('tbl_subject_master',' * ', array('id'=>$id)); $this->load->view('admin/managesubject/addrecord',$data); setHistory('Go to Add/Edit Subject'); } } /* * Function : deletesubject * Desc : For records deletion */ public function deletesubject($uid) { $this->Common_Model->deleterecords('tbl_subject_master',$uid); $this->session->set_flashdata('success', 'Data deleted'); setHistory('Subject record deleted successfully'); redirect('admin/managesubject'); } }