equal
deleted
inserted
replaced
118 function page_Special_Login() |
118 function page_Special_Login() |
119 { |
119 { |
120 global $db, $session, $paths, $template, $plugins; // Common objects |
120 global $db, $session, $paths, $template, $plugins; // Common objects |
121 global $__login_status; |
121 global $__login_status; |
122 global $lang; |
122 global $lang; |
|
123 |
|
124 require_once(ENANO_ROOT . '/includes/math.php'); |
|
125 require_once(ENANO_ROOT . '/includes/diffiehellman.php'); |
|
126 global $dh_supported; |
123 |
127 |
124 $locked_out = false; |
128 $locked_out = false; |
125 // are we locked out? |
129 // are we locked out? |
126 $threshold = ( $_ = getConfig('lockout_threshold') ) ? intval($_) : 5; |
130 $threshold = ( $_ = getConfig('lockout_threshold') ) ? intval($_) : 5; |
127 $duration = ( $_ = getConfig('lockout_duration') ) ? intval($_) : 15; |
131 $duration = ( $_ = getConfig('lockout_duration') ) ? intval($_) : 15; |
605 } |
609 } |
606 |
610 |
607 $template->load_theme($session->theme, $session->style); |
611 $template->load_theme($session->theme, $session->style); |
608 if(isset($_POST['return_to'])) |
612 if(isset($_POST['return_to'])) |
609 { |
613 { |
610 $name = ( isPage($_POST['return_to']['name']) ) ? $paths->pages[$_POST['return_to']]['name'] : $_POST['return_to']; |
614 $name = get_page_title($_POST['return_to']); |
611 $subst = array( |
615 $subst = array( |
612 'username' => $session->username, |
616 'username' => $session->username, |
613 'redir_target' => $name |
617 'redir_target' => $name |
614 ); |
618 ); |
615 redirect( makeUrl($_POST['return_to'], $get_add), $lang->get('user_login_success_title'), $lang->get('user_login_success_body', $subst) ); |
619 redirect( makeUrl($_POST['return_to'], $get_add), $lang->get('user_login_success_title'), $lang->get('user_login_success_body', $subst) ); |