function list_all() { $dis['base_url'] = base_url(); $store = new store(); $store->order_by('position', 'asc'); $store->get_iterated(); $dis['view'] = 'stores/list'; $dis['menu_active'] = 'Cửa hàng'; $dis['title'] = "Danh sách cửa hàng"; $dis['store'] = $store; $dis['nav_menu'] = array(array("type" => "add", "text" => "Thêm", "link" => "{$this->admin_url}stores/edit/", "onclick" => "")); $this->viewadmin($dis); }
<div style="clear: both;margin-top:10px;border-top: 1px #000 dashed;padding-top:20px;"> <div style="width: 200px;float:left;"> <a title="Di động việt" href="<?php echo $base_url; ?> "><img src="<?php echo $base_url; ?> images/logo.png" alt="Di động việt" /></a> </div> <div style="width: 700px;float:left"> DIDONGVIET.VN – Hệ THỐNG WEBSITE BÁN LẺ THIẾT BỊ DI ĐỘNG CHÍNH HÃNG TẠI VIỆT NAM.<br /> <?php $store = new store(); $store->order_by('position', 'asc'); $store->get_iterated(); ?> <?php foreach ($store as $row) { ?> <?php echo $row->name; ?> : <?php echo $row->address; ?> <br /> Điện thoại: <?php echo $row->phone; ?>
function edit($id) { $cart = new Cartitem($id); if (!$cart->exists()) { show_404(); } $cartDetail = $cart->cartdetail; if ($_SERVER['REQUEST_METHOD'] == "POST") { $cart->status = $this->input->post('cartStatus'); $cart->description = $this->input->post('description'); $cart->dateDeliver = $this->input->post('dateDeliver'); $cart->prePaid = $this->input->post('prePaid'); $cart->taxInfo = $this->input->post('taxInfo'); $cart->linkOnline = $this->input->post('linkOnline'); $cart->total = $this->input->post('hiTotal'); $cart->shipType = $this->input->post('deliverMethod'); $cart->paymentType = $this->input->post('payment'); $cart->deliverStore_id = $this->input->post('branchReceive'); $cart->paymentStore_id = $this->input->post('branchPayment'); $cart->shipName = $this->input->post('info_name'); $cart->shipEmail = $this->input->post('info_email'); $cart->shipPhone = $this->input->post('info_phone'); $cart->shipDescription = $this->input->post('info_description'); $cart->shipAddress = $this->input->post('info_address'); $cart->save(); foreach ($cartDetail as $row) { $row->status = $this->input->post('cartDetailStatus_' . $row->id); $row->quantity = $this->input->post('cartDetailQuantity_' . $row->id); $row->inBox = $this->input->post('cartDetailInbox_' . $row->id); $row->price = $this->input->post('cartDetailPrice_' . $row->id); $row->save(); $row->clear(); } redirect('admin/carts/edit/' . $id); } $store = new store(); $store->order_by('id', 'asc'); $store->get_iterated(); $dis['store'] = $store; $dis['menu_active'] = 'Giỏ hàng'; $dis['cartdetail'] = $cartDetail; $dis['object'] = $cart; $dis['cart'] = $cart; $dis['title'] = "Chi tiết đơn hàng"; $dis['base_url'] = base_url(); $dis['view'] = 'cart/edit'; $dis['nav_menu'] = array(array("type" => "back", "text" => "Back", "link" => "{$this->admin_url}carts/list_all/", "onclick" => "")); $this->viewadmin($dis); }