diff --git a/control/index.php b/control/index.php index d32bdcd..c529cc9 100644 --- a/control/index.php +++ b/control/index.php @@ -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}"; diff --git a/view/templates/index/home.html b/view/templates/index/formula_list.html similarity index 100% rename from view/templates/index/home.html rename to view/templates/index/formula_list.html diff --git a/view/templates/index/login.html b/view/templates/index/login.html index 137e29a..07be775 100644 --- a/view/templates/index/login.html +++ b/view/templates/index/login.html @@ -22,7 +22,7 @@