infoController.php
852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
Class Admin_InfoController Extends baseController {
protected $_navig = array('name'=>"info");
public function preDispatch(){
$auth = new Auth();
if($auth->is_login_session() == false)Redirect($this->url.'/admin/auth/');
}
public function index()
{
}
public function view($prefix)
{
$menu = new Menu($this->lang);
$row = ($prefix == "home") ? $menu->view_params('') : $menu->view_params('info',$prefix);
$this->tpl->assign('menu_one',$row);
// $this->navig[] = array('url'=>$this->this_url,'name'=>"site");
$this->meta = array('title'=>$row['name']);
$info = new Info($this->lang);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$info->save($this->postParam,$prefix);
Redirect($this->this_url);
}
$row = $info->view($prefix);
$this->tpl->assign('text',$row);
$this->tpl->assign('prefix',$prefix);
}
}
?>