</tbody>
  </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">
Ejemplo n.º 2
0
//每页显示的条数
$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">
  <button type="submit" class="btn">搜索</button>
<?php

/*
 * @auther udzhou
 * @date 2013 2-4
 */
require_once 'class/goods_service.class.php';
require_once 'class/goods.class.php';
$pageCurrent = 1;
$goods_service = new GoodsService();
$page_size = $goods_service->getListRows();
$array_goods = $goods_service->listAll($pageCurrent, $page_size);
?>
<ul class="nav nav-tabs" id="myTab">
  <li><a href="./index.php?mod=home&action=latest_problem">最新问题</a></li>
  <li class="active"><a href="./index.php?mod=home&action=price_change">价格变化</a></li>
</ul> 
<div class="tab-content">
  <div class="tab-pane active" id="latest_problem">

  	<div class="control-group">
  	<label class="control-label" for="goods_id">请选择产品</label>
    <div class="controls">
      <select id="goods_id" name="goods_id">
      <?php 
foreach ($array_goods as $goods) {
    echo "\r\n        <option value='{$goods->id}'>{$goods->goods_name}</option> ";
}
?>
          
      </select>