Вход Регистрация
Файл: Luxe-Shop v6.0/application/controllers/admin/main.php
Строк: 28
<?php
class main extends Admin_Controler {
    function 
__Construct() {
        
parent::__construct();
                
$this->load->model('goods_model');
        
$this->load->model('model_main');
    }
    public function 
index () {
        
$orders $this->model_main->get_by(array()) ;
        foreach(
$orders as $order) {
            if(empty(
$order->name)) {
                
$name $this->goods_model->get($order->item_id);
                if(!empty(
$name))
                {
                    
$name $name->name;
                    
$order->name $name;
                }
                else
                {
                    
$order->name '<b>Товар был удален</b>';
                }
            }
            
            
preg_match('#(?<=bill[)[a-zA-Z0-9]{15}(?=])#',$order->bill,$bill);
            
        }
        
$this->data['orders'] = $orders;
        
$this->data['subview'] = 'admin/main';
        
$this->load->view('admin/layout_main',$this->data);
    }


        
    }              
    
?>
Онлайн: 0
Реклама