当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 1

fotomxq / shenyuan-web
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 929 Bytes
一键复制 编辑 原始数据 按行查看 历史
fotomxq 提交于 2014-04-02 16:47 . 完成自定义样式设计对接
<?php
/**
* 首页
* @author fotomxq <fotomxq.me>
* @version 1
* @package page
*/
require('page.php');
//产品目录数据
$productListwhere = '`post_status` = \'public\' and `post_type` = \'' . $sysPost->type[7] . '\'';
$productList = $sysPost->getList($productListwhere, null, 1, 9999, 0, false, true);
if ($productList) {
foreach ($productList as $k => $v) {
$where = '`post_status` = \'public\' and `post_type` = \'file\' and (`post_meta` = \'image/jpeg\' or `post_meta` = \'image/png\') and `post_parent` = :id';
$attrs = array(':id' => array($v['id'], PDO::PARAM_INT));
$image = $sysPost->getList($where, $attrs);
if ($image) {
$productList[$k]['image'] = $image[0]['id'];
} else {
$productList[$k]['image'] = 0;
}
}
}
//注册变量
$smarty->assign('indexProductList', $productList);
//输出页面
$smarty->display('index.tpl');
?>
PHP
1
https://gitee.com/fotomxq/shenyuan-web.git
git@gitee.com:fotomxq/shenyuan-web.git
fotomxq
shenyuan-web
shenyuan-web
master

搜索帮助