/** * 增加商品跳转动作 */ public function addAction() { //得到所有分类 $model_category = new CategoryModel(); $cat_list = $model_category->getList(); require CURR_VIEW_DIR . 'goodsAdd.html'; }
/** * 修改商品信息 * @param [type] $cat_id 商品ID * @return [type] [description] */ public function editAction() { $cat_id = $_GET['id']; $modle_name = new CategoryModel(); $curr_cat = $modle_name->getById($cat_id); $cat_list = $modle_name->getList(0); require CURR_VIEW_DIR . 'categoryEdit.html'; }
<?php define('ACC', true); require '../system/init.php'; //echo __ROOT__;exit; $cat = new CategoryModel(); $catlist = $cat->getList(); $cattree = $cat->getCatTree($catlist, 0); include __ROOT__ . 'view/admin/templates/goodsadd.html';
<?php /* 后台文件 Background entry file */ if (!defined('ACC')) { define('ACC', true); require '../system/init.php'; } // $cat = new CategoryModel(); $catelist = $cat->getList(); //print_r($catelist); $catetree = $cat->getCatTree($catelist, 0); //print_r($catetree); include __ROOT__ . 'view/admin/templates/catelist.html';