Exemple #1
0
                            <div align="right">
                                <span></span>联系电话:</div>
                        </td>
                        <td width="482">
                             <input type="text" name="mobile" id="mobile" size="30" />
                        </td>
                    </tr>
                    <tr>
                		<td width="136">
                			<div align="right">
                                <span></span>产品:</div>
                		</td>
                		<td width="482">
                			<?php 
$product = new Products();
$product_data = $product->GetList(array('id', 'title', 'price'), '', '', '', 'addtime desc');
?>

							<select name="product_id" style="margin-left:2px ; padding:2px ; height:25px ; width:300px ;">

							<?php 
if ($product_data) {
    foreach ($product_data as $product_key => $product_value) {
        ?>
						  		<option value="<?php 
        echo $product_value['id'];
        ?>
">
						  			<?php 
        echo $product_value['title'] . " " . $product_value['price'] . "元";
        ?>
Exemple #2
0
         $info = array();
         $time = time();
         if (isset($id)) {
             $id = intval($id);
             if ($id <= 0) {
                 errorinfo('变量错误', '');
             }
             $info = $products_photo->GetInfo('', ' id = ' . $id);
             if (empty($info)) {
                 errorinfo('变量错误', '');
             }
             $productinfo = $products->GetInfo('', ' id = ' . $info['productid']);
             //20120719
             checkClassPower('products', $productinfo['classid']);
         }
         $classList = $products->GetList();
         //$classList = $CL->arraySet($classList,0);
         if (is_file(WEB_TPL . 'products_photo_edit.tpl.php')) {
             $templatefile = 'products_photo_edit.tpl.php';
         } else {
             $tpl_in_module = 1;
             $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_photo_edit.tpl.php';
         }
     }
     break;
 case 'search':
     //
     break;
 case 'show':
     //
     break;
Exemple #3
0
 }
 if (isset($filename) && !empty($filename)) {
     $where = $where . " and `classid` = '" . $info['id'] . "' ";
 }
 $pageListNum = 9;
 //每页显示
 //20120715
 if (intval($info['listnum']) > 0) {
     $pageListNum = $info['listnum'];
 }
 $totalPage = 0;
 //总页数
 $page = isset($page) ? (int) $page : 1;
 $start = ($page - 1) * $pageListNum;
 //执行sql
 $List = $products->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'thumb', 'intro', 'titlecolor', 'author', 'clicks', 'istop'), $start, $pageListNum, $where, 'istop desc,addtime desc,id desc');
 //*******************************************查询产品信息 END ******************************************************
 include WEB_INC . "page.class.php";
 //******************************************* 查询产品信息长度,设置分页 ******************************************************
 $sqlNum = "select id from {tablepre}products where " . $where;
 $db->Execute($sqlNum);
 $pageNum = $db->GetRsNum();
 $totalPage = ceil($pageNum / $pageListNum);
 //总页数
 $pages = new PageClass($page, $totalPage);
 $showpage = $pages->showPage();
 //******************************************* 查询产品信息长度,设置分页 END ******************************************************
 if (is_file(WEB_TPL . 'products_list.tpl.php')) {
     $templatefile = 'products_list.tpl.php';
 } else {
     $tpl_in_module = 1;
Exemple #4
0
 case 'list':
 default:
     //list
     //列表
     if (empty($classid)) {
         $where = ' 1 = 1 ';
     } else {
         $where = " classid = '" . $classid . "' ";
     }
     $pageListNum = 12;
     //每页显示
     $totalPage = 0;
     //总页数
     $page = isset($page) ? (int) $page : 1;
     $start = ($page - 1) * $pageListNum;
     $List = $products->GetList(array('id', 'classid', 'title', 'addtime'), $start, $pageListNum, $where, 'id desc');
     include WEB_INC . "page.class.php";
     $sqlNum = "select id from {tablepre}products where " . $where;
     $db->Execute($sqlNum);
     $pageNum = $db->GetRsNum();
     $totalPage = ceil($pageNum / $pageListNum);
     //总页数
     $pages = new PageClass($page, $totalPage);
     $showpage = $pages->showPage();
     if (is_file(WEB_TPL . 'products_list.tpl.php')) {
         $templatefile = 'products_list.tpl.php';
     } else {
         $tpl_in_module = 1;
         $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_list.tpl.php';
     }
     break;