assign_template(); $position = assign_ur_here(); $smarty->assign('page_title', $position['title']); // 页面标题 $smarty->assign('ur_here', $position['ur_here']); // 当前位置 $is_separate = intval($_REQUEST['is_separate']); /* 初始化分页信息 */ $page = isset($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1; $size = isset($_REQUEST['page_size']) && intval($_REQUEST['page_size']) > 0 ? intval($_REQUEST['page_size']) : 10; $count = get_count_distrib_order_by_user_id($_SESSION['user_id'], $is_separate); $max_page = $count > 0 ? ceil($count / $size) : 1; if ($page > $max_page) { $page = $max_page; } $smarty->assign('order_list', get_all_distrib_order_by_user_id($_SESSION['user_id'], $is_separate, $page, $size)); assign_pager('v_user_shouyimore', '', $count, $size, '', '', $page); // 分页 /* meta information */ $smarty->assign('keywords', htmlspecialchars($_CFG['shop_keywords'])); $smarty->assign('description', htmlspecialchars($_CFG['shop_desc'])); $smarty->assign('user_id', $_SESSION['user_id']); if ($is_separate == 1) { $v_title = '已分成'; } elseif ($is_separate == 2) { $v_title = '取消分成'; } else { $v_title = '未分成'; } $smarty->assign('v_title', $v_title); /* 页面中的动态内容 */
} if (!$smarty->is_cached('v_user_shouyi.dwt', $cache_id)) { assign_template(); $position = assign_ur_here(); $smarty->assign('page_title', $position['title']); // 页面标题 $smarty->assign('ur_here', $position['ur_here']); // 当前位置 /* meta information */ $smarty->assign('keywords', htmlspecialchars($_CFG['shop_keywords'])); $smarty->assign('description', htmlspecialchars($_CFG['shop_desc'])); $smarty->assign('yes_distrib_list', get_all_distrib_order_by_user_id($_SESSION['user_id'], 1)); //已分成订单信息 $smarty->assign('no_distrib_list', get_all_distrib_order_by_user_id($_SESSION['user_id'], 0)); //未分成订单信息 $smarty->assign('cancel_distrib_list', get_all_distrib_order_by_user_id($_SESSION['user_id'], 2)); //撤销分成订单信息 $yes_total_money = get_total_money_by_user_id($_SESSION['user_id'], 1); $no_total_money = get_total_money_by_user_id($_SESSION['user_id'], 0); $total_money = $yes_total_money + $no_total_money; $smarty->assign('yes_total_money', $yes_total_money); //已分成总额 $smarty->assign('no_total_money', $no_total_money); //已分成总额 $smarty->assign('cancel_total_money', get_total_money_by_user_id($_SESSION['user_id'], 2)); //取消分成总额 $smarty->assign('total_money', $total_money); /* 页面中的动态内容 */ assign_dynamic('v_user_shouyi'); } $smarty->display('v_user_shouyi.dwt', $cache_id);