$integralCondition[] = array($user_id, ' 1 ', ' is_frozen=0 '); $integralCondition[] = array($user_id, 'type = 0', ' is_frozen=0 '); $integralCondition[] = array($user_id, 'type = 1', ' is_frozen=0 '); $integralCondition[] = array($user_id, 'type = 5', ' is_frozen=0 '); $integralCondition[] = array($user_id, ' 1 ', ' is_frozen=1 '); $integral_records_list = array(); $all_pages = array(); for ($i = 0; $i < 5; $i++) { $page = isset($_REQUEST["page{$i}"]) ? intval($_REQUEST["page{$i}"]) : 0; $record_count = get_integral_records_count($integralCondition[$i][0], $integralCondition[$i][1], $integralCondition[$i][2]); $all_pages[$i] = get_pager('user.php', array('act' => $action), $record_count, $page, 10, "page{$i}=", "&ctl={$i}", '#tab'); $integral_records_list[$i] = get_integral_records($integralCondition[$i][0], $integralCondition[$i][1], $integralCondition[$i][2], $all_pages[$i]['size'], $all_pages[$i]['start']); } $smarty->assign('integral_records_list', $integral_records_list); $smarty->assign('all_pages', $all_pages); $smarty->assign('frozen_integral', get_frozen_integral($user_id)); $smarty->display('user_clips.dwt'); } elseif ($action == 'user_complain') { $order_id = $_REQUEST['order_id']; $type = $_REQUEST['type']; $content = $_REQUEST['content']; $captcha = $_REQUEST['captcha']; $now = gmtime(); include_once 'includes/cls_captcha.php'; $validator = new captcha($_SESSION['captcha_word']); if (!$validator->check_word($_POST['captcha'])) { show_message($_LANG['invalid_captcha']); } $sql = "insert into " . $GLOBALS['ecs']->table('complain') . "(user_id,content,time,order_id,type) values({$user_id},'{$content}',{$now},{$order_id},{$type})"; $flag = $GLOBALS['db']->query($sql); if ($flag) {
if ($_REQUEST['act'] == 'get') { assign_template(); $user_id = ''; if ($_SESSION['user_name']) { $sql = "select user_id from ecs_users where user_name='" . $_SESSION['user_name'] . "'"; $user_id = $db->getOne($sql); } user_infomation($smarty, $user_id); //chen-1013 require_once ROOT_PATH . 'includes/lib_integral.php'; $integral_type = $user_id == '' ? 0 : get_integral_type(); $uncmpltOrdIntgr = $user_id == '' ? 0 : get_frozen_integral($user_id, $integral_type[0]); //未完成订单,被冻结的积分 $uncmpltOrdCnt = $user_id == '' ? 0 : get_frozen_integral_orderCount($user_id, $integral_type[0]); //未完成订单数 $unCmmtOrdIntgr = $user_id == '' ? 0 : get_frozen_integral($user_id, $integral_type[1]); //未评论订单,被冻结的积分 $unCmmtOrdCnt = $user_id == '' ? 0 : get_frozen_integral_orderCount($user_id, $integral_type[1]); //未评论订单数 $smarty->assign('uncmpltOrdIntgr', $uncmpltOrdIntgr); // 网店帮助 $smarty->assign('uncmpltOrdCnt', $uncmpltOrdCnt); // 网店帮助 $smarty->assign('unCmmtOrdIntgr', $unCmmtOrdIntgr); // 网店帮助 $smarty->assign('unCmmtOrdCnt', $unCmmtOrdCnt); // 网店帮助 $smarty->assign('CFG_CmmtIntgr', $_CFG['comment_integral']); $smarty->assign('CFG_top5CmmtIntgr', $_CFG['top5_integral']); $is_got_RgstPnt = is_got_RgstPnt(); $smarty->assign('is_got_RgstPnt', $is_got_RgstPnt);