1 Star 0 Fork 5

doo/lmshop_kj

forked from YHGJ/lmshop_kj 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
comment_repay.php 4.49 KB
一键复制 编辑 原始数据 按行查看 历史
Administrator 提交于 2017-07-31 14:57 . test
<?php
/**
* ECSHOP 晒单页
* ============================================================================
*
* 网站地址: http://www.ecmoban.com;
* ----------------------------------------------------------------------------
* 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
* 使用;不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
* $Author: $
* $Id: single_sun.php 17067 2013-11-1 03:59:37Z $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require ROOT_PATH . '/includes/must_login.php';
require(ROOT_PATH . '/includes/lib_area.php'); //ecmoban模板堂 --zhuo
require_once(ROOT_PATH . ADMIN_PATH . '/includes/lib_goods.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/user.php');
if ((DEBUG_MODE & 2) != 2)
{
$smarty->caching = true;
}
/* 初始化分页信息 */
$act = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'repay';
assign_template();
$comment_id = empty($_REQUEST['comment_id']) ? 0 :$_REQUEST['comment_id'];
$smarty->assign('helps', get_shop_help()); // 网店帮助
$smarty->assign('data_dir', DATA_DIR); // 数据目录
$smarty->assign('action', $action);
$smarty->assign('lang', $_LANG);
//ecmoban模板堂 --zhuo start
$area_info = get_area_info($province_id);
$area_id = $area_info['region_id'];
$where = "regionId = '$province_id'";
$date = array('parent_id');
$region_id = get_table_date('region_warehouse', $where, $date, 2);
//ecmoban模板堂 --zhuo end
$sql = "select comment_id, id_value, user_id, order_id, content, user_name, add_time from " .$ecs->table('comment'). " where comment_id = '$comment_id'";
$comment = $db->getRow($sql);
$goods_id = $comment['id_value'];
$goodsInfo = get_goods_info($goods_id, $region_id, $area_id);
$goodsInfo['goods_price'] = price_format($goodsInfo['goods_price']);
$smarty->assign('goodsInfo', $goodsInfo);
//评分 start
$mc_all = ments_count_all($goods_id); //总条数
$mc_one = ments_count_rank_num($goods_id,1); //一颗星
$mc_two = ments_count_rank_num($goods_id,2); //两颗星
$mc_three = ments_count_rank_num($goods_id,3); //三颗星
$mc_four = ments_count_rank_num($goods_id,4); //四颗星
$mc_five = ments_count_rank_num($goods_id,5); //五颗星
$comment_all = get_conments_stars($mc_all,$mc_one,$mc_two,$mc_three,$mc_four,$mc_five);
$smarty->assign('comment_all', $comment_all);
/*------------------------------------------------------ */
//-- 商品回复类表
/*------------------------------------------------------ */
if($_REQUEST['act'] == 'repay')
{
$cache_id = $comment_id . '-' . $_SESSION['user_rank'].'-'.$_CFG['lang'];;
$cache_id = sprintf('%X', crc32($cache_id));
if (!$smarty->is_cached('goods_discuss_show.dwt', $cache_id))
{
if(empty($comment_id))
{
ecs_header("Location: ./\n");
exit;
}
if(empty($comment))
{
ecs_header("location: ./\n");
exit;
}
$sql = "SELECT user_picture from " .$ecs->table('users') ." WHERE user_id = '" .$comment['user_id']. "'";
$user_picture = $db->getOne($sql);
$smarty->assign('user_picture', $user_picture);
$comment['add_time'] = local_date($GLOBALS['_CFG']['time_format'], $comment['add_time']);
$smarty->assign('comment', $comment);
$buy_goods = get_user_buy_goods_order($comment['id_value'], $comment['user_id'], $comment['order_id']);
$smarty->assign('buy_goods', $buy_goods);
$img_list = get_img_list($comment['id_value'], $comment['comment_id']);
$smarty->assign('img_list', $img_list);
$position = assign_ur_here($goodsInfo['cat_id'], $goodsInfo['goods_name'], array($comment['content']), $goodsInfo['goods_url']);
$smarty->assign('ip', real_ip());
$smarty->assign('goods', $goods);
$smarty->assign('page_title', $position['title']); // 页面标题
$smarty->assign('ur_here', $position['ur_here']);
$type = 0;
$reply_page = 1;
$libType = 1;
$size = 10;
$reply = get_reply_list($comment['id_value'], $comment['comment_id'], $type, $reply_page, $libType, $size);
$smarty->assign('reply', $reply);
$smarty->assign('now_time', gmtime()); // 当前系统时间
}
$smarty->display('comment_repay.dwt');
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/dzh19951015/lmshop_kj.git
git@gitee.com:dzh19951015/lmshop_kj.git
dzh19951015
lmshop_kj
lmshop_kj
master

搜索帮助