<?php /**** 燕十八 公益PHP讲堂 论 坛: http://www.zixue.it 微 博: http://weibo.com/Yshiba YY频道: 88354001 ****/ define('ACC', true); require "../include/init.php"; /* 接收goods_id 调用trash方法 */ if (isset($_GET['act']) && $_GET['act'] == 'show') { // 这个部分是打印所有的回收商品 $goods = new GoodsModel(); $goodslist = $goods->getTrash(); include ROOT . 'view/admin/templates/goodslist.html'; } else { $goods_id = $_GET['goods_id'] + 0; $goods = new GoodsModel(); if ($goods->trash($goods_id)) { echo '已加入回收站'; } else { echo '加入回收站失败'; } }