/**
* 提交用户评论
* ============================================================================
* *
*
* ----------------------------------------------------------------------------
*
*
* ============================================================================
* $Author: kingone $
* $Id: comment.php 2016-11-25 08:01:11 kingone $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require(ROOT_PATH . 'includes/cls_json.php');
if (!isset($_REQUEST['cmt']) && !isset($_REQUEST['act']))
{
/* 只有在没有提交评论内容以及没有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']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
if ($result['error'] == 0)
{
$bonus = get_user_bouns_new_list($_SESSION['user_id'], $cmt->page, 1, 'bouns_expire_gotoPage');
$smarty->assign('bonus1', $bonus);
$result['content'] = $smarty->fetch("library/bouns_expire_list.lbi");
}
echo $json->encode($result);
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史