<?php /*** file index.php ***/ define('AICN', true); session_start(); if (isset($_SESSION['username']) && $_SESSION['username'] == 'jingling0101') { require '../include/init.php'; $gds_id = $_GET['goods_id'] + 0; //print_r($gds_id); $good = new goodsmodel(); $g = array(); $g = $good->findsingle($gds_id); $xq = $good->findsinglexq($gds_id); //print_r($g); //print_r($xq); $cat = new Catmodel(); $catlist = $cat->select(); $catlist = $cat->getcattree($catlist); //print_r($catlist); include ROOT . 'hment/goodsdit.html'; }
<?php /*** file .php ***/ define('AICN', true); session_start(); require './include/init.php'; $goods_id = $_GET['goods_id'] + 0; $good = new goodsmodel(); $gods = $good->findsingle($goods_id); print_r($gods); $godsxq = $good->findsinglexq($goods_id); //print_r($godsxq); if (empty($gods)) { // header('location: index.php'); exit; } //$cat = new Catmodel(); //$nav = $cat->getTree($gods['cat_id']); include ROOT . 'view/front/single.html';