7 Star 19 Fork 7

王东祥/HongYuDSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
comment_single.php 1.45 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']) ? intval($_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) {
$comments = assign_comments_single($cmt->id, $cmt->type, $cmt->page);
$smarty->assign('comment_type', $cmt->type);
$smarty->assign('id', $cmt->id);
$smarty->assign('username', $_SESSION['user_name']);
$smarty->assign('email', $_SESSION['email']);
$smarty->assign('comments_single', $comments['comments']);
$smarty->assign('single_pager', $comments['pager']);
if ((intval($_CFG['captcha']) & CAPTCHA_COMMENT) && (0 < gd_version())) {
$smarty->assign('enabled_captcha', 1);
$smarty->assign('rand', mt_rand());
}
$result['message'] = $_CFG['comment_check'] ? $_LANG['cmt_submit_wait'] : $_LANG['cmt_submit_done'];
$result['content'] = $smarty->fetch('library/comments_single_list.lbi');
}
echo $json->encode($result);
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/doney/HongYuDSC.git
git@gitee.com:doney/HongYuDSC.git
doney
HongYuDSC
HongYuDSC
master

搜索帮助