| Line 58... |
Line 58... |
| 58 |
|
58 |
|
| 59 |
function login()
|
59 |
function login()
|
| 60 |
{
|
60 |
{
|
| 61 |
//standard array
|
61 |
//standard array
|
| 62 |
$data = array();
|
62 |
$data = array();
|
| - |
|
63 |
/*
|
| 63 |
if (isset($_SERVER['HTTP_REFERER'])) {
|
64 |
if (isset($_SERVER['HTTP_REFERER'])) {
|
| 64 |
if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
|
65 |
if ((strpos($_SERVER['HTTP_REFERER'],'login') == false) && (strpos($_SERVER['HTTP_REFERER'],'register') == false)) {
|
| 65 |
$redirect = $_SERVER['HTTP_REFERER'];
|
66 |
$redirect = $_SERVER['HTTP_REFERER'];
|
| 66 |
$location = $this->session->userdata('location');
|
67 |
$location = $this->session->userdata('location');
|
| 67 |
if(isset($location) && $location == 'shipping'){
|
68 |
if(isset($location) && $location == 'shipping'){
|
| Line 75... |
Line 76... |
| 75 |
$this->session->set_userdata('location',$redirect);
|
76 |
$this->session->set_userdata('location',$redirect);
|
| 76 |
}
|
77 |
}
|
| 77 |
|
78 |
|
| 78 |
}
|
79 |
}
|
| 79 |
}
|
80 |
}
|
| - |
|
81 |
*/
|
| 80 |
$fosauthorized = $this->session->userdata('fosauthorized');
|
82 |
$fosauthorized = $this->session->userdata('fosauthorized');
|
| 81 |
if(isset($fosauthorized) && !empty($fosauthorized) && $fosauthorized['isLoggedIn'] == 1){
|
83 |
if(isset($fosauthorized) && !empty($fosauthorized) && $fosauthorized['isLoggedIn'] == 1){
|
| 82 |
redirect(base_url().'fos/dashboard');
|
84 |
redirect(base_url().'fos/dashboard');
|
| 83 |
}
|
85 |
}
|
| 84 |
//get cache
|
86 |
//get cache
|
| Line 97... |
Line 99... |
| 97 |
//end of get cache
|
99 |
//end of get cache
|
| 98 |
$configdata =array();
|
100 |
$configdata =array();
|
| 99 |
$configdata = $this->config->item('fos_login');
|
101 |
$configdata = $this->config->item('fos_login');
|
| 100 |
unset($configdata['response'][0]);
|
102 |
unset($configdata['response'][0]);
|
| 101 |
$data['response']=$this->fos_model->getLogin($this->input->get(),$this->input->post(),$configdata);
|
103 |
$data['response']=$this->fos_model->getLogin($this->input->get(),$this->input->post(),$configdata);
|
| 102 |
// print_r($data['response']['response']);die;
|
- |
|
| 103 |
//set cache to output or renew cache
|
104 |
//set cache to output or renew cache
|
| 104 |
if(isset($data['response']['response']['foslogin']['fosauthorized']))
|
105 |
if(isset($data['response']['response']['foslogin']['fosauthorized']))
|
| 105 |
{
|
106 |
{
|
| 106 |
$this->session->set_userdata('fosauthorized',$data['response']['response']['foslogin']['fosauthorized']);
|
107 |
$this->session->set_userdata('fosauthorized',$data['response']['response']['foslogin']['fosauthorized']);
|
| 107 |
//$this->session->set_flashdata(array('msg'=>$data['response']['response']['login']['msg']));
|
108 |
//$this->session->set_flashdata(array('msg'=>$data['response']['response']['login']['msg']));
|
| 108 |
$location = $this->session->userdata('location');
|
109 |
$location = $this->session->userdata('location');
|
| 109 |
if(isset($location) && !empty($location)){
|
110 |
if(isset($location) && !empty($location)){
|
| 110 |
$this->session->unset_userdata('location');
|
111 |
$this->session->unset_userdata('location');
|
| 111 |
redirect($location);
|
112 |
redirect($location);
|
| 112 |
} else{
|
113 |
} else{
|
| - |
|
114 |
|
| 113 |
redirect(base_url().$data['response']['response']['foslogin']['redirect']);
|
115 |
redirect(base_url().$data['response']['response']['foslogin']['redirect']);
|
| 114 |
}
|
116 |
}
|
| 115 |
} else {
|
117 |
} else {
|
| 116 |
$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
|
118 |
$this->lessphp->object()->ccompile('assets/css/auth.less','assets/css/auth.css');
|
| 117 |
$data['title'] = 'Saholic';
|
119 |
$data['title'] = 'Saholic';
|
| Line 343... |
Line 345... |
| 343 |
$data['username'] = $this->session->userdata('username');
|
345 |
$data['username'] = $this->session->userdata('username');
|
| 344 |
$data['countercode'] = $this->session->userdata('countercode');
|
346 |
$data['countercode'] = $this->session->userdata('countercode');
|
| 345 |
$data['response']=$this->fos_model->getDashboard($this->input->get(),$this->input->post(),$this->config->item('fos_dashboard'));
|
347 |
$data['response']=$this->fos_model->getDashboard($this->input->get(),$this->input->post(),$this->config->item('fos_dashboard'));
|
| 346 |
$this->layout->view(strtolower(__CLASS__).'/thanks',$data);
|
348 |
$this->layout->view(strtolower(__CLASS__).'/thanks',$data);
|
| 347 |
}
|
349 |
}
|
| 348 |
}
|
- |
|
| 349 |
|
350 |
}
|
| - |
|
351 |
|