Ejemplo n.º 1
0
 }
 if (empty($where)) {
     $errorInfo = '变量错误';
     errorinfo($errorInfo, '');
 }
 //echo $where;
 $info = array();
 $info = $products->GetInfo(array('id', 'classid', 'title', 'seotitle', 'seokeyword', 'seointro', 'filename', 'price', 'standard', 'fromlinkurl', 'fromtitle', 'content', 'author', 'addtime', 'clicks', 'linkurl', 'isplay', 'thumb', 'titlecolor'), $where);
 if (empty($info)) {
     $errorInfo = '变量错误';
     errorinfo($errorInfo, '');
 }
 $classid = $info['classid'];
 $classinfo = $products_class->GetInfo(array('id', 'title', 'filename', 'linkurl'), " id = {$classid} ");
 $photoList = array();
 $photoList = $products_photo->GetList(array('id', 'productid', 'thumb'), '', '', " productid = " . $info['id'] . " ", 'orders asc,id desc');
 //点击统计 待添加
 $clicks = $info['clicks'] + 1;
 $products->Update(array('clicks' => $clicks), $where);
 //信息审核
 if ($info['isplay'] == '0') {
     $errorInfo = '该信息未审核';
     errorinfo($errorInfo, '');
 }
 //转连接
 if (!empty($info['linkurl'])) {
     header("Location: " . $info['linkurl'] . "");
     exit;
 }
 $topTitle = $info['title'];
 //seo新增 20120409
Ejemplo n.º 2
0
 case 'list':
 default:
     //list
     //列表
     if (empty($productid)) {
         $where = ' 1 = 1 ';
     } else {
         $where = " productid = '" . $productid . "' ";
     }
     $pageListNum = 12;
     //每页显示
     $totalPage = 0;
     //总页数
     $page = isset($page) ? (int) $page : 1;
     $start = ($page - 1) * $pageListNum;
     $List = $products_photo->GetList(array('id', 'productid', 'title', 'thumb', 'orders'), $start, $pageListNum, $where, 'id desc');
     include WEB_INC . "page.class.php";
     $sqlNum = "select id from {tablepre}products_photo 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_photo_list.tpl.php')) {
         $templatefile = 'products_photo_list.tpl.php';
     } else {
         $tpl_in_module = 1;
         $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_photo_list.tpl.php';
     }
     break;