代码拉取完成,页面将自动刷新
<?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');
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。