public function error($_info) { $this->_controll->assign('message', $_info); $this->_controll->assign('prev', Tool::getPrevPage()); $this->_controll->display(SMARTY_ADMIN . 'public/error.html'); exit; }
public function clear() { if ($this->_model->clear()) { $this->_redirect->succ(Tool::getPrevPage(), '清理成功'); } else { $this->_redirect->error('没有找到可清理的订单'); } }
public function first() { if (isset($_GET['id'])) { if ($this->_model->first()) { $this->_redirect->succ(Tool::getPrevPage()); } else { $this->_redirect->error('售后服务设置默认失败'); } } }
public function sort() { if (isset($_POST['send'])) { if ($this->_model->sort()) { $this->_redirect->succ(Tool::getPrevPage()); } else { $this->_redirect->error('导航排序失败'); } } }
public function delete() { if (isset($_GET['id'])) { if ($this->_model->delete()) { $this->_redirect->succ(Tool::getPrevPage(), '品牌删除成功'); } else { $this->_redirect->error('品牌删除失败'); } } }
public function error($_url = '') { if (empty($_url)) { $this->_tpl->assign('message', $this->_message); $this->_tpl->assign('prev', Tool::getPrevPage()); $this->_tpl->display(SMARTY_ADMIN . 'public/error.tpl'); exit; } else { Redirect::getInstance()->succ($_url); } }
public function update() { if (isset($_POST['send'])) { if ($this->_model->update()) { $this->_redirect->succ(Tool::getPrevPage(), '管理员修改成功'); } else { $this->_redirect->error('管理员修改失败'); } } if (isset($_GET['id'])) { $this->_tpl->assign('AllLevel', Tool::setFormItem($this->_level->findAll(), 'id', 'level_name')); $this->_tpl->assign('OneManage', $this->_model->findOne()); $this->_tpl->display(SMARTY_ADMIN . 'manage/update.tpl'); } }
public function refund() { if ($this->_order->refund()) { $this->_redirect->succ(Tool::getPrevPage()); } else { $this->_redirect->error('申请退款失败,请重试'); } }
public function isUp() { if ($this->_model->isUp()) { $this->_redirect->succ(Tool::getPrevPage()); } }