<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
providers login
*/
class Login extends Start_Controller {


	public function index()
	{
		/* THIS IS HE BACK office Login 
		*/
		//$this->load->view('admin/view_dash');
		$data = array();
		$out = array();

		// $data["username"] = 'oameye';
		// $data["password"] =  'may12002';

	//	var_dump($this->input->post());

		$data['username'] = trim($this->input->post('username'));
		$data['password'] = htmlspecialchars($this->input->post('password'));

		$data2 = array(
		'username' => $this->input->post('username'),
		'password'=> $this->input->post('password'),
		'is_logged_in' => false
		);


	//	$data["username"] = 'oameye';
	//	$data["password"] =  'may12002';

		$this->loginAdminUser($data, $out);

		//print_r($_SESSION);

		if (isset($_SESSION['session_id']) && $_SESSION['session_id'] !=''){
		redirect('/dash');
		}

		$this->load->view('welcome_message');
		}
}
