39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Login extends Web_Controller {
|
|
|
|
public function index() {
|
|
// echo rand(1000, 9999);
|
|
// print_r($this->input->get());
|
|
$data = array();
|
|
|
|
if ($_POST) {
|
|
|
|
$data['username'] = trim($this->input->post('username'));
|
|
$data['pass'] = htmlspecialchars($this->input->post('pass'));
|
|
//$this->load->view('provider/dash');
|
|
$this->renderProviderSecurePage('dash',$data);
|
|
} else {
|
|
//$this->load->view('welcome_message');
|
|
// $this->load->view('provider/dash');
|
|
$this->renderExternalPage('welcome_message', $data);
|
|
}
|
|
|
|
//$this->load->view('provider/dash');
|
|
//$this->load->view('welcome_message');
|
|
}
|
|
|
|
public function logout() {
|
|
$data = array();
|
|
$this->destroySession();
|
|
$this->renderExternalPage('welcome_message', $data);
|
|
}
|
|
|
|
private function destroySession() {
|
|
|
|
}
|
|
|
|
}
|