123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace Admin\Controller;
- use Admin\Model\OrderStatusModel;
- class OrderStatusController extends CommonController{
-
- protected function _initialize(){
- parent::_initialize();
- $this->breadcrumb1='订单';
- $this->breadcrumb2='订单状态';
- }
-
- public function index(){
-
- $model=new OrderStatusModel();
-
- $data=$model->show_order_status_page();
-
- $this->assign('empty',$data['empty']);
- $this->assign('list',$data['list']);
- $this->assign('page',$data['page']);
-
- $this->display();
- }
- function add(){
-
- if(IS_POST){
-
- $model=new OrderStatusModel();
- $data=I('post.');
- $return=$model->add_order_status($data);
- $this->osc_alert($return);
- }
-
- $this->crumbs='新增';
- $this->action=U('OrderStatus/add');
- $this->display('edit');
- }
- function edit(){
- if(IS_POST){
- $model=new OrderStatusModel();
- $data=I('post.');
- $return=$model->edit_order_status($data);
- $this->osc_alert($return);
- }
- $this->crumbs='编辑';
- $this->action=U('OrderStatus/edit');
- $this->d=M('OrderStatus')->find(I('id'));
- $this->display('edit');
- }
- public function del(){
- $model=new OrderStatusModel();
- $return=$model->del_order_status();
- $this->osc_alert($return);
- }
-
- }
- ?>
|