403Webshell
Server IP : 94.136.191.34  /  Your IP : 216.73.216.25
Web Server : Apache
System : Linux hostpanel.netbiz.in 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User : omkar.com_6nnuz6y629h ( 10087)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  /var/www/vhosts/omkar.com/httpdocs/application/controllers/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/omkar.com/httpdocs/application/controllers/Home_8apr2019.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');
ob_start();
require_once APPPATH.'libraries/swift_mailer/swift_required.php';

class Home extends CI_Controller {



	public function __construct() {
        parent::__construct();

		$this->load->model('ui/ui_model', 'ui_model');
		$this->set_roadblock_cookie();

    }



    public function download_cpkit($name){	
    // echo '='.$name.'=';exit;	

		$this->force_download_new('assets/cpkitpdf/'.$name,NULL);

	}



	public function download_broucher($name){	

	//SSecho FCPATH.'uploads/brochures/'.$name;exit;	

		$name = urlencode($name);

		$this->force_download_new('uploads/brochures/'.$name,NULL);

	}

	public function download_broucher_project($name){	
		$name = trim($name);
		$this->session->set_userdata(array('brochure' => base_url().'uploads/brochures/'.$name));
		redirect('home/thank_you/brochure');
	}

	public function whatsapp_enquiry(){

		$data = array("name" => $_POST['name'],
					  "mobile_no" => $_POST['mobile_no'],
					  "country" => $_POST['country'],
					  "dialcode" => $_POST['dialcode']
					  );

		$res = $this->ui_model->save_whatsapp_enquiry($data);

		if($res){
			$html = "<html><title></title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta name='viewport' content='width=device-width' /><body><p>";

			// $setBodyText .= "Hi,<br/><br/>";

			$html .= "You have received a lead from WhatsApp Enquiry Form.<br/><br/>";
			$html .= "Details are as mentioned below: <br/><br/>";	
			$html .= "<b>Name :</b> ".$_POST['name']."<br/>";
			$html .= "<b>Mobile Number :</b> ".$_POST['dialcode'].'-'.$_POST['mobile_no']."<br/>";
			$html .= "<b>Country :</b> ".$_POST['country']."<br/>";
			$html .= "</body></html>";

			$this->send_email($html,'sales@omkar.com',array('ankur.kaithal@omkar.com','nikita.jaiswal@omkar.com','ankit.dave@omkar.com','anamika.chaudhary@omkar.com','atulya.khobragade@omkar.com'),$_POST['name'],'Lead from Corporate website - WhatsApp Platform');
			
		}

		echo $res;

	}



	public function save_nri_details(){

		//print_r($_POST);exit;

		$data = array("full_name" => $_POST['full_name'],

					  "email_id" => $_POST['nri_email'],

					  "phone_no" => $_POST['phone'],

					  "dialcode" => $_POST['dialcode'],

					  "country" => $_POST['country'],

					  //"location" => $_POST['location']

					  );

		$res = $this->ui_model->save_nri_details($data);

		if($res){
			$html = "<html><title></title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta name='viewport' content='width=device-width' /><body><p>";

			// $setBodyText .= "Hi,<br/><br/>";

			$html .= "You have received a lead from Corporate website NRI page.<br/><br/>";
			$html .= "Details are as mentioned below: <br/><br/>";	
			$html .= "<b>Name :</b> ".$_POST['full_name']."<br/>";
			$html .= "<b>Email :</b> ".$_POST['nri_email']."<br/>";
			$html .= "<b>Phone Number :</b> ".$_POST['phone']."<br/>";
			$html .= "<b>Country :</b> ".$_POST['country']."<br/>";
			$html .= "</body></html>";

			$this->send_email($html,$_POST['nri_email'],array('nrisales@omkar.com'),$_POST['full_name'],'Lead from Corporate website - NRI Page');
		}

		echo $res;exit;

	}



    public function check_cplist(){

    	//print_r($_POST);exit;

    	$email = $_POST['email'];

    	$project_name = $_POST['project'];

    	$res = $this->ui_model->check_cplist($email,$project_name);

    	//print_r($res);exit;

    	if(empty($res)){

    		$data['status'] = 'error';

    	}else{

    		$data['status'] = 'success';



    	}

    	echo $data['status'];exit;

    }



    public function test(){

    	$data['project_info'] = $this->ui_model->fetch_blogs();

    	print_r($data['project_info']);exit;

    }

	

	public function index($id = '')

	{

		$data['page_info'] = $this->ui_model->page_info('1');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'home';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->home_page_projects();

		$data['banners'] = $this->ui_model->home_page_banners();

		$data['news_info'] = $this->ui_model->home_page_news();

		if(BLOG_ENVIRONMENT == 'TESTING'){

			$data['blogs_info'] = array();

		}else{

			$data['blogs_info'] = $this->ui_model->fetch_blogs();

		}

		$this->load->view('home', $data);

	}

	

	public function about()

	{

		$data['page_info'] = $this->ui_model->page_info('2');

		$data['awards_info'] = $this->ui_model->fetch_awards_details();

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'about';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$this->load->view('about', $data);

	}

	/* changes */

	public function residential_ongoing_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('32');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		

		$data['page_active'] = 'projects';

		$data['project_type'] = 'residential';

		$data['pt']='rop';

		$data['url_tab1'] = base_url().'ongoing-residential-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-residential-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-residential-projects-mumbai';

		$data['tab_active1'] = 'active';

		$data['tab_active2'] = '';

		$data['tab_active3'] = '';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Residential');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Residential','ongoing_project');

		$this->load->view('ongoing_projects', $data);

	}

	public function iframe_for_plans($floor_plan_id){
		$data['project_iframe_info'] = $this->ui_model->iframe_for_plans($floor_plan_id);
		$data['is_filter'] = 0;
		//$data['_view'] = 'front_end/map_iframe';

		$this->load->view('plan_iframe', $data);
	}

	

	public function residential_completed_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('31');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['project_type'] = 'residential';

		$data['pt']='rop';

		$data['page_active'] = 'projects';

		$data['url_tab1'] = base_url().'ongoing-residential-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-residential-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-residential-projects-mumbai';

		$data['tab_active1'] = '';

		$data['tab_active2'] = 'active';

		$data['tab_active3'] = '';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Residential');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Residential','completed_project');

		$this->load->view('completed_projects', $data);

	}

	

	public function residential_upcoming_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('3');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}



		$data['pt']='rop';

		$data['page_active'] = 'projects';

        $data['project_type1']='residential_upcoming_projects';

        $data['project_type'] = 'residential';

		$data['url_tab1'] = base_url().'ongoing-residential-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-residential-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-residential-projects-mumbai';

		$data['tab_active1'] = '';

		$data['tab_active2'] = '';

		$data['tab_active3'] = 'active';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Residential');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Residential','upcoming_project');

		$this->load->view('upcoming_projects', $data);

	}

	

	public function commercial_ongoing_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('29');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		

		$data['page_active'] = 'projects';

		$data['project_type'] = 'commercial';

		

		$data['pt']='cop';

		$data['url_tab1'] = base_url().'ongoing-commercial-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-commercial-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-commercial-projects-mumbai';

		$data['tab_active1'] = 'active';		

		$data['tab_active2'] = '';

		$data['tab_active3'] = '';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Commercial');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Commercial','ongoing_project');

		$this->load->view('ongoing_projects', $data);

	}

	

	public function commercial_completed_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('4');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['project_type'] = 'commercial';

		

		$data['pt']='cop';

		$data['page_active'] = 'projects';

		$data['url_tab1'] = base_url().'ongoing-commercial-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-commercial-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-commercial-projects-mumbai';

		$data['tab_active1'] = '';

		$data['tab_active2'] = 'active';

		$data['tab_active3'] = '';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Commercial');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Commercial','completed_project');

		$this->load->view('completed_projects', $data);

	}

	

	public function commercial_upcoming_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('30');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['project_type'] = 'commercial';

		

		$data['pt']='cop';

		$data['page_active'] = 'projects';

		$data['project_type1']='commercial_upcoming_projects';

		$data['url_tab1'] = base_url().'ongoing-commercial-projects-mumbai';

		$data['url_tab2'] = base_url().'completed-commercial-projects-mumbai';

		$data['url_tab3'] = base_url().'upcoming-commercial-projects-mumbai';

		$data['tab_active1'] = '';

		$data['tab_active2'] = '';

		$data['tab_active3'] = 'active';

		$data['locations'] = $this->ui_model->get_location_on_property_type('Commercial');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->get_projects_list('Commercial','upcoming_project');

		$this->load->view('upcoming_projects', $data);

	}

//added new method to save resdential/commercial form on 01/09/2017

    public function save_upcoming_project_form(){

    	$name = $this->input->post('name');

    	$phone = $this->input->post('phone');

    	$city = $this->input->post('city');

    	$email_id = $this->input->post('email_id');

    	$project_type = $this->input->post('project_type');

    	$selected_project = $this->input->post('selected_project');



		$data =	array(

			'name'=>$name,

			'phone'=>$phone,

			'city'=>$city,

			'email_id'=>$email_id,

            'project_type'=>$project_type,

			'selected_project_type'=>$selected_project,

			'created_date'=>date('Y-m-d h:i:s')

			);


		$status = $this->ui_model->save_upcoming_project_form($data);

		if($status>0){



//email code



        $html = "<html><title></title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta name='viewport' content='width=device-width' /><body><p>";

		// $setBodyText .= "Hi,<br/><br/>";

		$html .= "A new user has enquired with us.<br/><br/>";

		$html .= "Details are as mentioned below: <br/><br/>";		

		$html .= "<b>Name :</b> ".$name."<br/>";

		$html .= "<b>Email :</b> ".$email_id."<br/>";

		$html .= "<b>Phone Number :</b> ".$phone."<br/>";

		$html .= "<b>City :</b> ".$city."<br/>";

		$html .= "<b>Project Type :</b> ".$project_type."<br/>";

		$html .= "<b>Selected Project Type  :</b> ".$selected_project."<br/><br/><br/>";

		



		

		$html .= "</body></html>";



		$this->send_email($html,$email_id,array('sales@omkar.com'),$name,'Someone is interested in upcoming projects.');



			$this->session->set_flashdata('success', 'Thank you for your message');

		//	redirect($_SERVER['HTTP_REFERER'].'#resi_comm_upcoming_prjct_form');

			//redirect('home/'.$project_type);

		}else{

			$this->session->set_flashdata('error', 'Some error occured');

			//redirect($_SERVER['HTTP_REFERER'].'#resi_comm_upcoming_prjct_form');

			//redirect('home/'.$project_type);

		}
		#code added by Aparna to send sms otp
		$res['id'] = $status;
		$res['redirect_path'] = $project_type;

		echo json_encode($res);

    }





	/* changes */

	public function ongoing_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('3');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'projects';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->ongoing_projects_list();

		$this->load->view('ongoing_projects', $data);

	}



	public function completed_projects()

	{

		$data['page_info'] = $this->ui_model->page_info('4');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'projects';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['rz1'] = $this->ui_model->completed_projects_list();

		$this->load->view('completed_projects', $data);

	}

	

	public function media()

	{

		$data['page_info'] = $this->ui_model->page_info('5');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'media';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['news_info'] = $this->ui_model->fetch_news_details();

		$data['news_range'] = $this->ui_model->news_range();

		$data['press_relese_info'] = $this->ui_model->fetch_press_release_details();

		$data['press_range'] = $this->ui_model->press_range();

		$data['media_kit_info'] = $this->ui_model->fetch_media_kit_details();

		$data['awards_info'] = $this->ui_model->fetch_awards_details();

		$data['corporate_magazine_info'] = $this->ui_model->fetch_corporate_magazine_details();

		$data['video_gallery_info'] = $this->ui_model->fetch_video_gallery_details();

		$data['newsletter_info'] = $this->ui_model->fetch_newsletter_details();

		$data['newsletter_range'] = $this->ui_model->newsletter_range();

		// print_r($data);exit;

		$this->load->view('media', $data);

	}



	public function buyers_guide()

	{

		$data['page_info'] = $this->ui_model->page_info('6');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'buyers_guide';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		//print_r($data['page_info']);exit;

		$this->load->view('buyers_guide', $data);

	}



	public function career()

	{

		$data['page_info'] = $this->ui_model->page_info('7');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'career';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['current_openings'] = $this->ui_model->current_openings_list();

		$data['event_gallery'] = $this->ui_model->fetch_event_gallery('CAREERS');

		$data['testimonials'] = $this->ui_model->testimonials_list('Careers');

		$this->load->view('career', $data);

	}



	public function mbassy()

	{

		$data['page_info'] = $this->ui_model->page_info('8');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'mbassy';

		$data['event_gallery'] = $this->ui_model->fetch_event_gallery('MBassy');

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$data['testimonials'] = $this->ui_model->testimonials_list('Mbassy');

		$this->load->view('mbassy', $data);

	}



	public function contact_us()

	{

		$data['page_info'] = $this->ui_model->page_info('9');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'contact_us';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		//print_r($data['page_info']);exit;

		$this->load->view('contact_us', $data);

	}



	public function nri()

	{

		$data['page_info'] = $this->ui_model->page_info('33');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'nri';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		//print_r($data['page_info']);exit;

		$this->load->view('nri', $data);

	}



	public function sitemap()

	{

		$data['page_info'] = $this->ui_model->page_info('27');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'sitemap';

		//print_r($data['page_info']);exit;

		$this->load->view('sitemap', $data);

	}



	public function show_404()

	{

		

		$this->load->view('page_not_found');

	}



	public function disclaimer()

	{

		$data['page_info'] = $this->ui_model->page_info('28');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'disclaimer';

		//print_r($data['page_info']);exit;

		$this->load->view('disclaimer', $data);

	}


	public function notices()

	{
		$data['page_info'] = $this->ui_model->page_info('34');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		

		$data['page_active'] = 'notices';

		

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$this->load->view('notices', $data);

	}

	public function nri_privacy_policy()

	{
		$data['page_info'] = $this->ui_model->page_info('35');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		

		$data['page_active'] = 'nri-privacy-policy';

		

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		$this->load->view('nri_privacy_policy', $data);

	}



	public function channel_partner()

	{

		$data['page_info'] = $this->ui_model->page_info('10');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'channel-partner';

		$data['project_list'] = $this->ui_model->mbassy_project_list();

		//print_r($data['page_info']);exit;

		$this->load->view('channel_partner', $data);

	}

	

	public function project_details($name, $id)

	{

		$data['page_info'] = $this->ui_model->project_info($id);

		if(!empty($data['page_info'])){

			$data['page_active'] = 'projects';

			$data['banner'] = $this->ui_model->banner_info($id);

			$data['description'] = $this->ui_model->description_info($id);

			$data['brochure'] = $this->ui_model->brochure_info($id);

			//echo "<pre>";print_r($data['brochure']);exit;

			$data['gallery'] = $this->ui_model->gallery_info($id);

			$data['key_description'] = $this->ui_model->key_description($id);

			$data['amenity'] = $this->ui_model->amenity_info($id);

			$data['video'] = $this->ui_model->video_info($id);

			$data['specification'] = $this->ui_model->specification_info($id);

			$data['locations_adv'] = $this->ui_model->locations_adv($id);

			//echo "<pre>";print_r($data['locations_adv']);exit;

			$data['construction_updates'] = $this->ui_model->construction_updates($id);

			$data['invest'] = $this->ui_model->invest($id);

			$data['location'] = $this->ui_model->location_info($id);

				//echo "<pre>";print_r($data['location']);exit;
			$data['related_news'] = $this->ui_model->project_related_news($id);

			$data['project_list'] = $this->ui_model->mbassy_project_list();

			$data['project_info'] = $this->ui_model->project_info($id);

			$data['master_plans'] = $this->ui_model->fetch_plans($id, 'master plan');

			$data['floor_plans'] = $this->ui_model->fetch_plans($id, 'floor plan');

			//$data['floor_plans'] = $this->ui_model->fetch_plans($id);

			$data['project_gallary'] = $this->ui_model->fetch_project_gallary_images($id);

			$data['walkthrough'] = $this->ui_model->fetch_project_walkthrough($id);

			$data['partners'] = $this->ui_model->fetch_project_partner($id);

			$data['showreel'] = $this->ui_model->fetch_project_showreel($id);

			/*added by shubhangi to fetch flor plan images*/
			$data['flr_pln_img'] = $this->ui_model->fetch_floor_plan_image($id);

			$data['contact_enquire_image'] = $this->ui_model->contact_enquire_image($id);

				//echo "<pre>";print_r($data['contact_enquire_image']);exit;
			/*added by Aparna to fetch sample flat images*/
			$data['sampleflat'] = $this->ui_model->sampleflat_info($id);


			

			$this->load->view('project_details', $data);

		}else{

			$this->show_404();

		}

		

	}

		

	public function current_openings()

	{

		$data['page_info'] = $this->ui_model->current_openings();

		$data['info'] = $this->ui_model->current_openings_list();

		$this->load->view('current_openings', $data);

	}



	public function current_opening_description($id){

		if(isset($id)){

			$data['page_info'] = $this->ui_model->current_openings();

			$data['project_list'] = $this->ui_model->mbassy_project_list();

			$data['info'] = $this->ui_model->current_openings_description($id);

			$this->load->view('job_description', $data);

		}else{

			redirect('home/current_openings/');

		}

	}



	public function apply_job_opening($id){

		if(isset($id)){

			$data['page_info'] = $this->ui_model->current_openings();

			$data['project_list'] = $this->ui_model->mbassy_project_list();

			$data['info'] = $this->ui_model->current_openings_description($id);

			$this->load->view('apply', $data);

		}else{

			redirect('home/current_openings/');

		}

	}



	public function save_job_application($id){

		$candidate_fname = $this->input->post('candidate_fname');

		$candidate_lname = $this->input->post('candidate_lname');

		$candidate_gender = $this->input->post('candidate_gender');

		$candidate_mobile = $this->input->post('candidate_mobile');

		$candidate_phone = $this->input->post('candidate_phone');

		$candidate_email = $this->input->post('candidate_email');

		$candidate_area_interest = $this->input->post('candidate_area_interest');

		$candidate_address = $this->input->post('candidate_address');



		if ($this->form_validation->run() == FALSE){

			redirect('home/current_openings/');

		}else{

			if(isset($id)){

				$data = array(

					'job_id'=>$id,

					'first_name'=>$candidate_fname,

					'last_name'=>$candidate_lname,

					'gender'=>$candidate_gender,

					'mobile_no'=>$candidate_mobile,

					'phone_no'=>$candidate_phone,

					'email_id'=>$candidate_email,

					'area_interest'=>$candidate_area_interest,

					'address'=>$candidate_address,

					'created_date' => date('Y-m-d H:i:s')

					);

				$result = $this->ui_model->save_job_application($data, $_FILES);

				if($result!=""){

					$data['page_info'] = $this->ui_model->current_openings();

					$data['info'] = $this->ui_model->current_openings_description($id);

					$data['info']['message_type'] = 'success';

					$data['info']['message'] = "Thank you for apply this job. We will contact you soon.";

					$this->load->view('apply', $data);



				}else{

					$data['page_info'] = $this->ui_model->current_openings();

					$this->load->view('apply', $data);

				}



			}else{

				redirect('home/current_openings/');

			}

		}

	}

	

	public function campus_recruitment()

	{

		$data['page_info'] = $this->ui_model->campus_recruitment();

		//print_r($data['page_info']);exit;

		$this->load->view('campus_recruitment', $data);

	}

	

	public function residental_project_listing()

	{

		$data['page_info'] = $this->ui_model->residental_info();

		//print_r($data['page_info']);exit;

		$this->load->view('residental_project_listing', $data);

	}

	

	public function commercial_project_listing()

	{

		$data['page_info'] = $this->ui_model->commercial_info();

		//print_r($data['page_info']);exit;

		$this->load->view('commercial_project_listing', $data);

	}

	

	/*public function schedule_visit(){

		$visitor_name = $_POST['visitor_name'];

		$visit_project_location = $_POST['visit_project_location'];

		$visit_select_project = $_POST['visit_select_project'];

		$visit_email_id = $_POST['visit_email_id'];

		$datetimepicker2 = $_POST['datetimepicker2'];

		$datetimepicker1 = $_POST['datetimepicker1'];

		$visitor_mobile = $_POST['visitor_mobile'];

		

		$data = array(

		'name' => $visitor_name,

		'location'=> $visit_project_location,

		'project' => $visit_select_project,

		'email_id'=> $visit_select_project,

		'date'=> $datetimepicker2,

		'time'=> $datetimepicker1,

		'mobile_no'=> $visitor_mobile,

		'created_date' => date('Y-m-d H:i:s')

		);



		$result = $this->ui_model->schedule_visit($data);

		echo  $result;

		exit;

	}*/



	/*public function get_partner_us(){

		$partner_name = $_POST['partner_name'];

		$identity = $_POST['identity'];

		$partner_email_id = $_POST['partner_email_id'];

		$partner_mobile_no = $_POST['partner_mobile_no'];

		$partner_telephone = $_POST['partner_telephone'];

		$poperty_title = $_POST['poperty_title'];

		$property_country = $_POST['property_country'];

		$property_state = $_POST['property_state'];

		$property_city = $_POST['property_city'];

		$property_locality = $_POST['property_locality'];

		$fsi_potentials = $_POST['fsi_potentials'];

		$fsi_potentials_measurement = $_POST['fsi_potentials_measurement'];

		$size_of_property_measurement = $_POST['size_of_property_measurement'];

		$nature_of_transaction = $_POST['nature_of_transaction'];

		$size_of_property = $_POST['size_of_property'];

		$proposal = $_POST['proposal'];



		$data = array(

		'name' => $partner_name,

		'identity'=> $identity,

		'email_id' => $partner_email_id,

		'mobile_no'=> $partner_mobile_no,

		'telephone'=> $partner_telephone,

		'property_title'=> $poperty_title,

		'country'=> $property_country,

		'property_state'=> $property_state,

		'property_city'=> $property_city,

		'locality'=> $property_locality,

		'fsi_potential'=> $fsi_potentials,

		'fsi_potential_measurement'=> $fsi_potentials_measurement,

		'size_of_property'=> $size_of_property,

		'size_of_property_measurement'=> $size_of_property_measurement,

		'transaction'=> $nature_of_transaction,

		'proposal'=> $proposal,

		'created_date' => date('Y-m-d H:i:s')

		);



		$result = $this->ui_model->save_partner_us($data, $_FILES);

		if($result!=""){

			$data['success'] = "Your enquiry has been successfully submitted!";

		  //$this->load->view('partner_us', $data);	

			redirect('home/partner_us/', $data);

		}

	}*/



	public function get_location()

	{

		$project_type = $_POST['project_type'];

		$results = $this->ui_model->get_location($project_type);

		if($project_type == 'Residential'){

			$html = '<option value="">Select Location</option><option value="Thane">Thane</option>';

		}else{

			$html = '<option value="">Select Location</option>';

		}

		

		if(!empty($results)){

			foreach($results as $rz) {

				$html .='<option value="'.$rz["location"].'">'.$rz["location"].'</option>';

			}

		}

		echo $html;

		exit;

	}

	

	public function get_projects()

	{

		$project_type = $_POST['project_type'];

		$location = $_POST['location'];

		$results = $this->ui_model->get_projects($project_type, $location);

		$html = '<option value="">Property Finder</option>';

		if(!empty($results)){

			foreach($results as $rz) {

				$html .='<option value="'. base_url().'home/project-details/'.strtolower(str_replace(' ', '-', $rz['name'])) .'/'.$rz['id'].'">'.$rz["name"].'</option>';

			}

		}

		echo $html;

		exit;

	}



	 public function project_enquiry(){

		$name = $this->input->post('name');

		$email = $this->input->post('email');

		$phone = $this->input->post('phone');

		$project_interested = $this->input->post('project_interested');

		$type = $this->input->post('type');



		$message = $this->input->post('message');



		$data = array(

					'name' => $name,

					'email' => $email,

					'phone' => $phone,

					'project_name' => $project_interested,

					'message' => $message

				);



		$status = $this->ui_model->project_enquiry($data);
		/*SFDC Call*/
		$this->send_data_to_sfdc($name,$email,$phone,$project_interested);
		/*------*/
		if($status){
			$html = "<html><title></title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta name='viewport' content='width=device-width' /><body><p>";

			// $setBodyText .= "Hi,<br/><br/>";

			$html .= "A new user has enquired with us.<br/><br/>";

			$html .= "Details are as mentioned below: <br/><br/>";		

			$html .= "<b>Name :</b> ".$name."<br/>";

			$html .= "<b>Email :</b> ".$email."<br/>";

			$html .= "<b>Phone Number :</b> ".$phone."<br/>";

			$html .= "<b>Project Name :</b> ".$project_interested."<br/>";

			$html .= "<b>Message  :</b> ".$message."<br/><br/><br/>";
			

			$html .= "</body></html>";



			$this->send_email($html,$email,array('callcenter@omkar.com'),$name,'Someone is interested in '.ucfirst($project_interested).' project.');
		}

		if($type == 2){

			//echo 'success';
			$res['status'] = "success";
			$res['id'] = $status;
			echo json_encode($res);

		}else{

			$this->session->set_flashdata('project_success_msg', 'Enquiry submitted successfully');

			//redirect($_SERVER['HTTP_REFERER'].'#project-form');
			//redirect('home/thank_you/project-details');
			$res['redirect_path'] = "home/thank_you/project-details";
			$res['id'] = $status;
			echo json_encode($res);
		}

		

	} 


	function send_data_to_sfdc($name,$email,$mobile,$project_name) {

		if($project_name == 'Omkar 1973'){
			$sfdc_code = 'a032800000LgszF';
		}else if($project_name == 'Omkar Alta Monte'){
			$sfdc_code = 'a032800000LgszU';
		}else if($project_name == 'Omkar Meridia'){
			$sfdc_code = 'a032800000LgszK';
		}else if($project_name == 'Omkar Vive'){
			$sfdc_code = 'a032800000MEStk';
		}else if($project_name == 'The Summit - Business Bay'){
			$sfdc_code = 'a032800000MEFx9';
			$project_name = 'Omkar TSBB';
		}else{
			$sfdc_code = '';
		}

		if($sfdc_code != ''){
    	
	    	$name = explode(" ",$name);
	    	$first_name = $name[0];
	    	if(count($name) == 1){
	    		$last_name = '';
	    	}else{
	    		$last_name = $name[1];
	    	}
			$oid = '00D28000001qNMs';
			$first_name = $first_name;
			$last_name = $last_name;
			$mobile = $mobile;
			$email = $email;
			/*if($source == 'DIRECT'){
				$lead_source = 'Corporate Website';
			}else{
				$lead_source = $source;
			}*/
			$lead_source = 'Omkar Website';		
			
			$postFields  = "";
			$postFields .= "&oid=".$oid;
			$postFields .= "&retURL=http://www.omkar.com";
			$postFields .= "&first_name=".$first_name;
			$postFields .= "&last_name=".$last_name;
			$postFields .= "&mobile=".$mobile;
			$postFields .= "&email=".$email;
			$postFields .= "&lead_source=".$lead_source;
			//$postFields .= "&mdd=".ATOM_MDD;
			$postFields .= "&00N2800000IqrOW=Corporate Website";
			$postFields .= "&00N2800000IqrOX=".$project_name;
			$postFields .= "&00N2800000IqrOj=".$sfdc_code;
			$postFields .= "&00N2800000IqrOT=Web-to-Lead";
			$postFields .= "&00N2800000IrnRH=Call Centre";
			$postFields .= "&00N2800000IqrOA=Inbound";
			$postFields .= "&00N2800000IrnR6=Individual Buyer";
			//$postFields .= "&00N2800000IruxE=Individual Buyer";
			//echo $postFields;exit;

			// $url = "https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8";
			$url = "https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8";
			$ch = curl_init();

			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_HEADER, 0);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt($ch, CURLOPT_POST, 1);


			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
			curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
			curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);

			$returnData = curl_exec($ch);
			// echo $postFields;print_r($returnData);exit;
			if($returnData === FALSE)
			{
			echo $errorFromCURL = "cURL error number: " . curl_errno($ch) . " | cURL error: " . curl_error($ch); 
			}
			curl_close($ch);
		}
	
		return true;
	}



	function force_download($name,$folder_name)

    {

        $data = file_get_contents($_SERVER["DOCUMENT_ROOT"].folder_name.'/resources/uploads/'.$folder_name.'/'.$name);

        $name = $name;

        force_download($name, $data);

	}

	function force_download_new($name,$folder_name)

    {
    	//echo base_url().$name;exit;
        
        $data = file_get_contents(base_url().$name);
        $name = $name;
        force_download($name, $data);
        return 1;

	}



	public function get_location_on_property_type(){

		$property_type = $this->input->post('property_type');

		$result = $this->ui_model->get_location_on_property_type($property_type);

		if(!empty($result)){

			$str ="<option value=''>Select Location</option>";

			foreach($result as $property_loc) {



					$str .= "<option value='".$property_loc['location']."'>".$property_loc['location']."</option>";



			}

			echo $str;

			exit;		

		}

			

	}



	public function get_property_on_property_location(){

		$property_loc = $this->input->post('property_loc');

		$result = $this->ui_model->get_property_on_property_location($property_loc);

		if(!empty($result)){

			$str ="<option value=''>Select Property</option>";

			foreach($result as $property_loc) {



					/*$str .= "<option value ='".base_url().'home/project-details/'.strtolower(str_replace(' ', '-', $property_loc['name'])) .'/'.$property_loc['id']."'>".$property_loc['name']."</option>";*/



					$str .= "<option value ='".$property_loc['url']."'>".$property_loc['name']."</option>";



			}

			echo $str;

			exit;		

		}

			

	}



	public function filter_news(){

		//echo 'hi';exit;

		$year = $this->input->post('year');

		$result = $this->ui_model->filter_news($year);

		if(!empty($result)){

			$str ='';

			foreach($result as $rz) {

				$string = $rz['news_date'];

				$timestamp = strtotime($string);

				$str .='<div class="news-item news-press filter_news">

							<div class="top-wrp">

								<div class="date-wrp">

									<p>'.date("d", $timestamp).'</p>

									<p>'.strtoupper(date("M", $timestamp)).'. '.date("Y", $timestamp).'</p>

								</div>

								<img src="'.base_url().'uploads/news/'.$rz['image'].'">

							</div>

							<div class="content-wrp">

								<p class="heading">'.$rz['title'].'</p>

								<span><p class="para">'.$rz['description'].'</p></span>

								<a href="'.base_url().'uploads/news_document/'.$rz['document'].'" target="_blank" class="btn-01">Read More</a>

							</div>

						</div>';

			}

			echo $str;

			exit;		

		}

		exit;

	}



	public function filter_press(){

		$year = $this->input->post('year');

		$result = $this->ui_model->filter_press($year);

		if(!empty($result)){

			$str ='';

			foreach($result as $rz) {

				$string = $rz['press_date'];

				$timestamp = strtotime($string);

				$str .='<div class="news-press filter_news">

						<div class="top-wrp">

							<div class="date-wrp">

								<p>'.date("d", $timestamp).'</p>

								<p>'.strtoupper(date("M", $timestamp)).'. '.date("Y", $timestamp).'</p>

							</div>

						</div>

						<div class="content-wrp">

							<p class="heading">'.$rz['title'].'</p>

							<p class="para">'.strip_tags($rz['description']).'</p>

							<a href="'.base_url().'uploads/press_release/'.$rz['image'].'" class="btn-01" target="_blank">Read More</a>

						</div>

					</div>';

			}

			echo $str;

			exit;		

		}

		exit;

	}



	public function filter_newsletter(){

		$year = $this->input->post('year');

		$result = $this->ui_model->filter_newsletter($year);

		if(!empty($result)){

			$str ='';

			foreach($result as $rz) {

				$str .='<a href="'.$rz['link'].'" target="_blank">

							<img src="'.base_url().'uploads/newsletters/'.$rz['image'].'">

							<p>'.$rz['name'].'</p>

						</a>';

			}

			echo $str;

			exit;		

		}

		exit;

	}



	public function contact_enquiry(){


		$name = $this->input->post('name');

		$email = $this->input->post('email_id');

		$phone = $this->input->post('phone');

		$location = $this->input->post('location');

		$comments = $this->input->post('comments');

		$data = array(

					'name' => $name,

					'email_id' => $email,

					'contact_no' => $phone,

					'location' => $location,

					'comments' => $comments

				);



		$status = $this->ui_model->contact_enquiry($data);

		$this->session->set_flashdata('project_success_msg', 'Enquiry submitted successfully');
	

		//redirect($_SERVER['HTTP_REFERER'].'#offc-info');
		//redirect('home/thank_you/contact-us/');
		echo  $status;

	}


	public function vendor_enquiry(){

		$name = $this->input->post('name');

		$phone = $this->input->post('phone');

		$company_name = $this->input->post('company_name');

		$category = $this->input->post('category');

		$comments = $this->input->post('comments');

		if(!empty($_FILES['company_profile']['tmp_name'])){

			$temp_name = $_FILES['company_profile']['tmp_name'];

			$file_name = time().rand().$_FILES['company_profile']['name'];

			$check_mime = $this->check_mime($temp_name,$file_name);

			if($check_mime){

				$data = array(

					'name' => $name,

					'phone' => $phone,

					'company_name' => $company_name,

					'category' => $category,

					'comments' => $comments,

					'file_name' => $file_name

				);

				$path = $_SERVER['DOCUMENT_ROOT'].FOLDER_NAME."uploads/vendor_registration/";	

				if(move_uploaded_file($temp_name, $path.$file_name)){

					$status = $this->ui_model->vendor_enquiry($data);

					$this->session->set_flashdata('vendor-register_msg', 'Enquiry submitted successfully');

					//redirect($_SERVER['HTTP_REFERER'].'#vendor-register');

					if($status!=""){

							session_start();
							$_SESSION["enquiry_id"] = $status;
							$_SESSION["phone"] = $phone;
						
							redirect(base_url()."contact-us");
							//redirect('home/thank_you/vendor');

					}
					

				}			

			}else{

				$this->session->set_flashdata('vendor-register_msg', 'Some error occured');

				redirect($_SERVER['HTTP_REFERER'].'#vendor-register');

			}

		}else{

			$this->session->set_flashdata('vendor-register_msg', 'Some error occured');

			redirect($_SERVER['HTTP_REFERER'].'#vendor-register');

		}

	}



	public function check_mime($temp_name,$extension){	

			

		$finfo = finfo_open(FILEINFO_MIME_TYPE);

		$type = finfo_file($finfo, $temp_name);

		if ($type == 'application/pdf' || $type == 'application/msword' || $type == 'application/vnd.ms-powerpoint') {

			finfo_close($finfo);

			$extension = explode('.', $extension);

			$allowedExts = array("pdf", "doc", "ppt");

			if (in_array($extension['1'], $allowedExts)){

				return TRUE;

			}else{

				return false;

			}

		}else{

			finfo_close($finfo);

			return false;

		}

	}





	public function save_chanel_partner_data(){

		$name = $this->input->post('name');

		$owner_name = $this->input->post('owner_name');

		$entity = $this->input->post('entity');

		$office_address = $this->input->post('office_address');

		$telephone_no = $this->input->post('telephone_no');

		$phone = $this->input->post('phoneno');

		$website = $this->input->post('website');

		$email_id = $this->input->post('email_id');

		$area = implode(',', $this->input->post('area'));

		$years_in_operation = $this->input->post('years_in_operation');

		$expertise = implode(',', $this->input->post('expertise'));

		$expertise_other =  $this->input->post('other_expertise');

		$pan_card_no = $this->input->post('pan_card_no');

		$gst_no = $this->input->post('gst_no');

		$rera_no = $this->input->post('rera_no');

		$broker_asso = $this->input->post('broker_asso');

		$interested_in =  implode(',', $this->input->post('interested_in'));	

		$interested_in_other = $this->input->post('other_intrested_in');

		$authorised_signatories = $this->input->post('authorised_signatories');

		$authorised_signatories_name1 = $this->input->post('authorised_signatories_name1');

		$authorised_signatories_designation1 = $this->input->post('authorised_signatories_designation1');

		$authorised_signatories_name2 = $this->input->post('authorised_signatories_name2');

		$authorised_signatories_designation2 = $this->input->post('authorised_signatories_designation2');

		$years_in_operation = $this->input->post('years_in_operation');

		$other_cities_of_mumbai = $this->input->post('other_area_city');

		$other_countries = $this->input->post('other_countries');

		$dialcode = $this->input->post('hdn_dialcode');

		//echo $interested_in;

		//exit;



		$data =	array(

			'name'=>$name,

			'owner_name'=>$owner_name,

			'entity'=>$entity,

			'office_address'=>$office_address,

			'telephone_no'=>$telephone_no,

			'mobile_no'=>$phone,

			'dialcode'=>$dialcode,

			'website'=>$website,

			'email'=>$email_id,

			'area'=>$area,

			'years_in_operation'=>$years_in_operation,

			'expertise'=>$expertise,

			'pan_no'=>$pan_card_no,

			'gst_no'=>$gst_no,

			'rera_no'=>$rera_no,

			'broker_association'=>$broker_asso,

			'project_interest'=>$interested_in,

			'other_interested_project'=>$interested_in_other,

			'authorised_signatories'=>$authorised_signatories,

			'authorised_signatories_name1'=>$authorised_signatories_name1,

			'authorised_signatories_designation1'=>$authorised_signatories_designation1,

			'authorised_signatories_name2'=>$authorised_signatories_name2,

			'authorised_signatories_designation2'=>$authorised_signatories_designation2,

			'years_in_operation'=>$years_in_operation,

			'other_cities_of_mumbai_city'=>$other_cities_of_mumbai,

			'other_countries'=>$other_countries,

			'expertise_other'=>$expertise_other,

			'created_date'=>date('Y-m-d h:i:s')

			);

		$status = $this->ui_model->save_channel_partner_data($data,$_FILES);

		if($status!=""){

			$this->session->set_flashdata('message', 'Enquiry submitted successfully');

			session_start();
			$_SESSION["enquiry_id"] = $status;
			$_SESSION["phone"] = $phone;
		
			//redirect($_SERVER['HTTP_REFERER'].'#channel_partner_form');
			//redirect('home/thank_you/channel-partner');
			redirect(base_url()."channel-partner");

		}else{

			$this->session->set_flashdata('message', 'Some error occured');

			redirect($_SERVER['HTTP_REFERER'].'#channel_partner_form');

		}



	}



	public function mbassy_enquiry(){

		$name = $this->input->post('name');

		$residential_address_zone = $this->input->post('residential_address_zone');

		$registered_with_name = $this->input->post('registered_with_name');

		if($registered_with_name == ''){

			$registered_with_name = 'No';

		}

		$residential_address = $this->input->post('residential_address');

		$project_name = $this->input->post('project_name');

		$phone1 = $this->input->post('phone1');

		$flat_no = $this->input->post('flat_no');

		$alternate_no = $this->input->post('alternate_no');

		$wing_no = $this->input->post('wing_no');

		$email = $this->input->post('email');

		$ref_name1 = $this->input->post('ref_name1');

		$ref_phone1 = $this->input->post('ref_phone1');

		$ref_email1 = $this->input->post('ref_email1');

		$ref_name2 = $this->input->post('ref_name2');

		$ref_phone2 = $this->input->post('ref_phone2');

		$ref_email2 = $this->input->post('ref_email2');

		$ref_name3 = $this->input->post('ref_name3');

		$ref_phone3 = $this->input->post('ref_phone3');

		$ref_email3 = $this->input->post('ref_email3');

		$data = array(

					'name' => $name,

					'residential_address_zone' => $residential_address_zone,

					'registered_with_name' => $registered_with_name,

					'residential_address' => $residential_address,

					'project_name' => $project_name,

					'phone' => $phone1,

					'flat_no' => $flat_no,

					'alternate_no' => $alternate_no,

					'wing_no' => $wing_no,

					'email' => $email,

					'ref_name1' => $ref_name1,

					'ref_phone1' => $ref_phone1,

					'ref_email1' => $ref_email1,

					'ref_name2' => $ref_name2,

					'ref_phone2' => $ref_phone2,

					'ref_email2' => $ref_email2,

					'ref_name3' => $ref_name3,

					'ref_phone3' => $ref_phone3,

					'ref_email3' => $ref_email3

				);



		$status = $this->ui_model->mbassy_enquiry($data);

		if($status){
			$html = "<html><title></title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /><meta name='viewport' content='width=device-width' /><body><p>";

			// $setBodyText .= "Hi,<br/><br/>";
			$html .= "You have received a lead from Corporate website Mbassy page.<br/><br/>";
			$html .= "Details are as mentioned below: <br/><br/>";	
			$html .= "<b>Name :</b> ".$name."<br/>";
			$html .= "<b>Email :</b> ".$email."<br/>";
			$html .= "<b>Phone Number :</b> ".$phone1."<br/>";
			$html .= "<b>Project Name :</b> ".$project_name."<br/>";
			$html .= "<b>Alternate Number :</b> ".$alternate_no."<br/>";
			$html .= "<b>Residential address zone :</b> ".$residential_address_zone."<br/>";
			$html .= "<b>Residential address  :</b> ".$residential_address."<br/>";
			$html .= "<b>Flat no  :</b> ".$flat_no."<br/>";
			$html .= "<b>Wing no  :</b> ".$wing_no."<br/><br/><br/>";
			
			$html .= "</body></html>";

			//$this->send_email($html,$email,array('customercare@omkar.com'),$name,'Lead from Corporate website- Mbassy Page.');
		
		}

		$this->session->set_flashdata('project_success_msg', 'Enquiry submitted successfully');

		//redirect($_SERVER['HTTP_REFERER'].'#mbassy_form_id');
		redirect('home/thank_you/mbassy');

	}



	public function send_otp_message(){

		header("Access-Control-Allow-Origin: *");



		$mobile = '91'.$_POST['mob1'];

		$digits = 4;

		$otp = rand(pow(10, $digits-1), pow(10, $digits)-1);

		$msg = "Your 4 digit OTP number is $otp";



		$sms_url = "http://nimbusit.net/api.php?username=t4xanadu&password=579709&sender=OMKRDS&sendto=".$mobile."&message=".urlencode($msg);

		$result = file_get_contents($sms_url);



		if($result){

			echo md5($otp);

			exit;

		}else{

			echo "error";

			var_dump( $result );

			exit;

		}

	}



	public function match_otp(){

		$hidden_otp = $_POST['otp_hidden1'];

		$otp = md5($_POST['otp1']);

		if($hidden_otp==$otp){

			echo 'match';

			exit;

		}else{

			echo "error";

			exit;

		}

	}



	public function thank_you($para=NULL){
		$data['page_info'] = $this->ui_model->page_info('27');

		if($data['page_info']->status =='0'){

			$this->show_404();

			exit;

		}

		$data['page_active'] = 'Thank You';
		$data['project_list'] = $this->ui_model->mbassy_project_list();
		$data['thankyou'] = $para;

		$this->load->view('thank_you',$data);

	}





	public function send_email($message,$from_email,$to_email,$from_name,$subject){





		/*$transport = Swift_SmtpTransport::newInstance('mail.omkar.com', '26')
                                             ->setUsername('sales@omkar.com')
                                            ->setPassword('D_xqgdwfg&UA');*/

        $transport = Swift_SmtpTransport::newInstance('103.24.203.58', '25')
                ->setUsername('sales@omkar.com')
                ->setPassword('D_xqgdwfg&UA');



		/*$transport = Swift_SmtpTransport::newInstance('smtp.office365.com', 587, 'ssl')

		  ->setUsername('web.omkar@omkar.com')

		  ->setPassword('omkar@1169');*/



		// Create the Mailer using your created Transport



		$mailer = Swift_Mailer::newInstance($transport);

		$email= $from_email;



		$setBodyText =$message;



		//Create a message

		$message = Swift_Message::newInstance($subject)

		  ->setFrom(array($email => $from_name))

		  //->setTo(array($to_email))//omkar.foundation@omkar.com
		  ->setTo($to_email)

		  ->setBody($setBodyText);

		



		$message->setContentType("text/html");  

		// Send the message

		$result = $mailer->send($message);//2

		

	}

	public function set_roadblock_cookie(){
		
		$this->load->helper('cookie');
		$cookie = array(
	                    'name'   => 'roadblock_cookie',
	                    'value'  => '1',
	                    'expire' => '3600',
                	);
		set_cookie($cookie);
		
	}

	public function delete_roadblock_cookie(){
		delete_cookie('roadblock_cookie'); exit;
	}


	public function update_contact_otp()
	{
		if($this->input->post('id'))
		{
			$tbl_project = $this->input->post('tbl_project');
			$enquiry_id = $this->input->post('id');
			$this->db->set('otp_verified','Yes');
			$this->db->where('id',$enquiry_id );
			$this->db->update($tbl_project);	

			echo "success";
		}
	}

	/*code added by Aparna to send otp is as follow*/

	public function send()
	{
		$mobile = urldecode($_POST['mob1']);

        $customer_name = 'Customer';
        
        $digits = 4;
        $otp = rand(pow(10, $digits-1), pow(10, $digits)-1);
        $msg = "Your 4 digit OTP number is $otp";

        $msg ="Dear ".$customer_name.", $otp is your OTP. Please enter the OTP to proceed further. This data will be secured and will not be shared with any external parties for commercial purposes. Thank you.";
            
            $sms_url = "http://sms4power.com/api/swsend.asp?username=t1netbizapi&password=72952820&sender=OMKARS&sendto=".$mobile."&message=".urlencode($msg);

            $result = file_get_contents($sms_url);
         
            if($result){
                echo base64_encode($otp);
               	
                exit;
            }else{
                echo "error";
                var_dump( $result );
                exit;
            }
	}


	public function match()
	{
		 $sentotp = base64_decode($_POST['otp_hidden1']);
        if($_POST['otp1'] == $sentotp){
            echo 'match';
            exit;
        }else{
            echo 'not matched';
            exit;
        }	

	}

	public function resend()
	{
		$mobile = urldecode($_POST['mob1']);

        $otp = base64_decode($_POST['resend_otp_hidden1']);
        $msg = "Your 4 digit OTP number is $otp";

         $msg ="Dear Customer, $otp is your OTP. Please enter the OTP to proceed further. This data will be secured and will not be shared with any external parties for commercial purposes. Thank you.";    
            
            $sms_url = "http://nimbusit.co.in/api/swsendSingle.asp?username=t1netbizapi&password=72952820&sender=OMKARS&sendto=".$mobile."&message=".urlencode($msg);

            $result = file_get_contents($sms_url);
           
            if($result){
                echo base64_encode($otp);
              
                exit;
            }else{
                echo "error";
                var_dump( $result );
                exit;
            }
	}

/*code added by shubhangi to infographic is as follow*/

	public function show_infographics() // listing image page 
	{
		$data['page_info'] = $this->ui_model->page_info('1');
		$data['page_active'] = 'home';
		$data['list_image'] = $this->ui_model->get_all_list_image();
		$data['date_list'] = $this->ui_model->get_date();
		// $data['all_date'] = $this->ui_model->get_all_date_info();
		//echo "<pre>";print_r($data['all_date']);exit;
		$this->load->view('infographics', $data);
	}

	public function infographics_filter()
	{
		if ($_POST) 
		{
            $number = $_POST['selectvalue'];
           	$data['list_image']  = $this->ui_model->get_year_data($number);

           	$this->load->view('show_result', $data);
    	}
	}

	public function infographics($info_title)
	{
		$data['page_info'] = $this->ui_model->page_info('1');
		$data['page_active'] = 'home';
		$currentURL = current_url();
		$data['details']  = $this->ui_model->get_infographic_detail_data($currentURL);

		
		if(!empty($data['details']))
		{
			if($data['details']['view_filename'] == '')
			{
				$this->load->view('infographics_main', $data);
			}
			else
			{
				$this->load->view($data['details']['view_filename'], $data);
			}
		}
		else
		{
			echo "No Data Found!";die();
		}
	}

	public function floor_plan_enquiry(){


		$name = $this->input->post('name');

		$email = $this->input->post('email');

		$mobile = $this->input->post('mobile');

		$configuration = $this->input->post('configuration');

		$layout = $this->input->post('layout');

		$data = array(

					'name' => $name,

					'email' => $email,

					'mobile' => $mobile,

					'configuration' => $configuration,

					'layout' => $layout

				);
		
		$status = $this->ui_model->floor_plan_enquiry($data);

		$this->session->set_flashdata('project_success_msg', 'Enquiry submitted successfully');
	
		redirect($_SERVER['HTTP_REFERER'].'#floorplan');
	}


}
// ob_flush();

Youez - 2016 - github.com/yon3zu
LinuXploit