7 Star 19 Fork 7

王东祥/HongYuDSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
comment_discuss.php 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
鸿宇科技 提交于 2018-03-02 02:43 . Initial commit
<?php
//zend by QQ:1527200768 鸿宇科技 禁止倒卖 一经发现停止任何服务
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require ROOT_PATH . 'includes/cls_json.php';
if (!isset($_REQUEST['cmt']) && !isset($_REQUEST['act'])) {
ecs_header("Location: ./\n");
exit();
}
$_REQUEST['cmt'] = isset($_REQUEST['cmt']) ? json_str_iconv($_REQUEST['cmt']) : '';
$json = new JSON();
$result = array('error' => 0, 'message' => '', 'content' => '');
$cmt = new stdClass();
$cmt->id = !empty($_GET['id']) ? json_str_iconv($_GET['id']) : 0;
$cmt->type = !empty($_GET['type']) ? intval($_GET['type']) : 0;
$cmt->page = isset($_GET['page']) && (0 < intval($_GET['page'])) ? intval($_GET['page']) : 1;
if ($result['error'] == 0) {
$id = explode('|', $cmt->id);
$goods_id = $id[0];
$dis_type = $id[1];
$revType = $id[2];
$sort = $id[3];
if ($revType) {
$size = 10;
}
else {
$size = 40;
}
if (!$sort) {
$sort = 'add_time';
}
$discuss_list = get_discuss_all_list($goods_id, $dis_type, $cmt->page, $size, $revType, $sort);
$smarty->assign('discuss_list', $discuss_list);
if ($revType) {
if ($dis_type == 4) {
$all_count = get_commentImg_count($goods_id);
}
else {
$all_count = get_discuss_type_count($goods_id, $revType);
}
$smarty->assign('all_count', $all_count);
$smarty->assign('goods_id', $goods_id);
$result['content'] = $smarty->fetch('library/comments_discuss_list1.lbi');
}
else {
$result['content'] = $smarty->fetch('library/comments_discuss_list2.lbi');
}
}
echo $json->encode($result);
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/doney/HongYuDSC.git
git@gitee.com:doney/HongYuDSC.git
doney
HongYuDSC
HongYuDSC
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385