|
|
@ -25,6 +25,10 @@ class index extends publicBase { |
|
|
|
return $uinfo; |
|
|
|
} |
|
|
|
|
|
|
|
public function home() { |
|
|
|
exit; |
|
|
|
} |
|
|
|
|
|
|
|
public function login() { |
|
|
|
$name = trim($this->get('name')); |
|
|
|
$password = trim($this->get('password')); |
|
|
@ -36,11 +40,11 @@ class index extends publicBase { |
|
|
|
$res = $m_user->checkAdminLogin($name, $password); |
|
|
|
if (!$res) $this->show_message($m_user->getError(), '/index/login'); |
|
|
|
|
|
|
|
header('Location: /index/home'); |
|
|
|
header('Location: /index/formula_list'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function home() { |
|
|
|
public function formula_list() { |
|
|
|
if ($_COOKIE['uid'] !== 0 && empty($_COOKIE['token'])) header('Location: /index/login'); |
|
|
|
|
|
|
|
$this->view['uid'] = $_COOKIE['uid']; |
|
|
@ -50,7 +54,7 @@ class index extends publicBase { |
|
|
|
$name = trim($this->get('name')); |
|
|
|
|
|
|
|
$condition = array(); |
|
|
|
$url = "/index/home/is_all/{$is_all}"; |
|
|
|
$url = "/index/formula_list/is_all/{$is_all}"; |
|
|
|
if ($name) { |
|
|
|
$condition['name'] = $name; |
|
|
|
$url .= "/name/{$name}"; |
|
|
|