Exemple #1
0
 /**
  * Show the login form
  *
  * @access	public
  * @return	void
  */
 public function showForm($message = "")
 {
     // Kill all old sessions
     $this->db->delete("manage_sessions")->condition("session_last_action", time() - 60 * 60, "<")->execute();
     $query_string_clean = kxFunc::cleanInputVal(urldecode($_SERVER['QUERY_STRING']));
     // So we can tack that on to the URL afterwards, we get rid of $amp;
     $query_string_clean = str_replace('&amp;', '&', $query_string_clean);
     // Save the old session ID, just in case
     $query_string_clean = str_replace('sid=', 'old_sid=', $query_string_clean);
     // If we were previously in the menu and that for some reason got us here, remove that.
     $query_string_clean = str_replace('module=menu', '', $query_string_clean);
     $twigData['query_string'] = $query_string_clean;
     $twigData['message'] = $message;
     //Let's get the login form.
     kxTemplate::output("manage/login", $twigData);
     // We're done here.
     exit;
 }