} //每页显示的条数 $page_size = 10; $goods_service = new GoodsService(); //总条目数 //每次显示的页数 $sub_pages = 10; $url = "index.php?mod=goods&action=ls&p="; if (isset($_GET["keywords"])) { $keywords = trim($_GET["keywords"]); if (!empty($keywords)) { $array_goods = $goods_service->listAllByKeywords($pageCurrent, $page_size, $keywords); $nums = $goods_service->getListRowsByKeywords($keywords); $url = "index.php?mod=goods&action=ls&keywords={$keywords}&p="; } else { $array_goods = $goods_service->listAll($pageCurrent, $page_size); $nums = $goods_service->getListRows(); } } else { $array_goods = $goods_service->listAll($pageCurrent, $page_size); $nums = $goods_service->getListRows(); } ?> <div class="search-form"> <form class="form-inline" action="./index.php" method="get"> <input type="hidden" class="search-query" name="mod" value="goods"> <input type="hidden" class="search-query" name="action" value="ls"> <input type="text" class="search-query" name="keywords" id="keywords">
</table> <?php $subPages = new SubPages($page_size, $nums, $pageCurrent, $sub_pages, $url); ?> </div> </div> <?php $goods_service = new GoodsService(); $page_size = $goods_service->getListRows("SELECT COUNT(*) FROM t_goods WHERE t_goods.id NOT IN(SELECT goods_id FROM t_supplier_rel_goods WHERE t_supplier_rel_goods.supplier_id=" . $id . ")"); $sql = "select t_goods.* from t_goods where t_goods.id NOT IN(SELECT goods_id FROM t_supplier_rel_goods WHERE t_supplier_rel_goods.supplier_id=" . $id . ")"; $array_goods = $goods_service->listAll(1, $page_size, $sql); ?> <!-- Modal --> <div id="addGoods" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">添加供应商产品</h3> </div> <div class="modal-body"> <form class="form-horizontal" action="./index.php?mod=supplier&action=detail&did=<?php echo $id; ?> " method="post"> <div class="control-group"> <table class="table table-bordered table-striped table-hover" id="tableModal"> <thead>