~dangarner/xibo/server-170alpha

« back to all changes in this revision

Viewing changes to server/lib/pages/index.class.php

  • Committer: Dan Garner
  • Date: 2014-08-17 12:38:20 UTC
  • Revision ID: dan@xibo.org.uk-20140817123820-bpw31pjac9z4h3w5
[cms] Theme for upgrade process.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
                // Check the token
37
37
        if (!Kit::CheckToken()) {
38
38
                // We would usually issue a HALT error here - but in the case of login we should redirect instead
39
 
            trigger_error('Token does not match');
40
 
 
41
39
            // Split on & and rejoin with &
42
40
            $params = explode('&', $referingpage, 3);
43
 
            unset($params['message']);
44
 
                        $referingpage = implode('&', $params) . '&message=' . __('Sorry the form has expired. Please refresh.');
 
41
            $referingpage = implode('&', $params);
 
42
 
 
43
            $session->set('message', __('Sorry the form has expired. Please refresh.'));
45
44
 
46
45
            header('Location:index.php?' . $referingpage);
47
46
            exit;
50
49
                if ($user->login($username,$password)) 
51
50
                {
52
51
                        $userid         = Kit::GetParam('userid', _SESSION, _INT);
53
 
                        $username       = Kit::GetParam('username', _SESSION, _USERNAME);
54
 
                                
55
 
                        setMessage($username . ' logged in');
 
52
                        
56
53
                        $session->set_user(session_id(), $userid, 'user');
57
54
                }
58
55
                
59
 
                Debug::LogEntry('audit', 'Login with refering page: ' . $referingpage);
 
56
                Debug::LogEntry('audit', 'Login with referring page: ' . $referingpage);
60
57
                
61
58
                if ($referingpage == '') 
62
59
                {
95
92
        
96
93
        function forgotten() 
97
94
        {
98
 
                //Called by a submit to the Forgotten Details form 
99
 
                //      Checks the validity of the data provided, and emails a new password to the user
 
95
                // Called by a submit to the Forgotten Details form 
 
96
                // Checks the validity of the data provided, and emails a new password to the user
100
97
                $db =& $this->db;
101
98
                
102
99
                $username       = Kit::GetParam('f_username', _POST, _USERNAME);
236
233
                $response->Respond();
237
234
        }
238
235
}
239
 
?>
 
 
b'\\ No newline at end of file'
 
236
?>