示例#1
0
         $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_photo_list.tpl.php';
     }
     break;
 case 'edit':
     //
     if (isset($submit)) {
         $info = array();
         $time = time();
         if (isset($id)) {
             $id = intval($id);
             if ($id <= 0) {
                 errorinfo('变量错误', '');
             }
             $infoold = $products_photo->GetInfo('', ' id = ' . $id);
         }
         $productinfo = $products->GetInfo('', ' id = ' . $productid);
         //20120719
         checkClassPower('products', $productinfo['classid']);
         if (!empty($addtime)) {
             $addtime = strtotime($addtime);
         } else {
             $addtime = $addtime;
         }
         if (!empty($authortime)) {
             $authortime = $authortime;
         } else {
             $authortime = $authortime;
         }
         if (!empty($filename) && (isset($id) && $filename != $infoold['filename'])) {
             $namea = $products->GetInfo('', " `filename` = '" . $filename . "' ");
             if (!empty($namea)) {
示例#2
0
 case 'show':
     //
     $where = '';
     if (isset($id) && !empty($id)) {
         $where = ' id = ' . $id . ' ';
     }
     if (isset($filename) && !empty($filename)) {
         $where = " `filename` = '" . $filename . "' ";
     }
     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, '');
示例#3
0
     } else {
         $tpl_in_module = 1;
         $templatefile = $moduleRoot . WEB_APP . 'templates/' . 'products_list.tpl.php';
     }
     break;
 case 'edit':
     //
     if (isset($submit)) {
         $info = array();
         $time = time();
         if (isset($id)) {
             $id = intval($id);
             if ($id <= 0) {
                 errorinfo('变量错误', '');
             }
             $infoold = $products->GetInfo('', ' id = ' . $id);
         }
         //20120719
         checkClassPower('products', $classid);
         if (!empty($addtime)) {
             $addtime = strtotime($addtime);
         } else {
             $addtime = $addtime;
         }
         if (!empty($authortime)) {
             $authortime = $authortime;
         } else {
             $authortime = $authortime;
         }
         if (!empty($filename) && (isset($id) && $filename != $infoold['filename'])) {
             $namea = $products->GetInfo('', " `filename` = '" . $filename . "' ");