Server : Apache System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/saimikebio.com/wap/ |
<?php /** * ECSHOP 用户中心 * ============================================================================ * * 版权所有 2005-2012 上海商派网络科技有限公司,并保留所有权利。 * 网站地址: http://www.ecshop.com; * ---------------------------------------------------------------------------- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和 * 使用;不允许对程序代码以任何形式任何目的的再发布。 * ============================================================================ * $Author: liubo $ * $Id: user.php 17217 2011-01-19 06:29:08Z liubo $ */ define('IN_ECS', true); require(dirname(__FILE__) . '/includes/init.php'); $act = !empty($_GET['act']) ? $_GET['act'] : 'login'; $smarty->assign('footer', get_footer()); /* 用户登陆 */ if ($act == 'do_login') { $user_name = !empty($_POST['username']) ? $_POST['username'] : ''; $pwd = !empty($_POST['pwd']) ? $_POST['pwd'] : ''; if (empty($user_name) || empty($pwd)) { $login_faild = 1; } else { if ($user->check_user($user_name, $pwd) > 0) { $user->set_session($user_name); show_user_center(); } else { $login_faild = 1; } } if (!empty($login_faild)) { $smarty->assign('login_faild', 1); $smarty->display('login.wml'); } } elseif ($act == 'order_list') { $record_count = $db->getOne("SELECT COUNT(*) FROM " .$ecs->table('order_info'). " WHERE user_id = {$_SESSION['user_id']}"); if ($record_count > 0) { include_once(ROOT_PATH . 'includes/lib_transaction.php'); $page_num = '10'; $page = !empty($_GET['page']) ? intval($_GET['page']) : 1; $pages = ceil($record_count / $page_num); if ($page <= 0) { $page = 1; } if ($pages == 0) { $pages = 1; } if ($page > $pages) { $page = $pages; } $pagebar = get_wap_pager($record_count, $page_num, $page, 'user.php?act=order_list', 'page'); $smarty->assign('pagebar' , $pagebar); /* 订单状态 */ $_LANG['os'][OS_UNCONFIRMED] = '未确认'; $_LANG['os'][OS_CONFIRMED] = '已确认'; $_LANG['os'][OS_CANCELED] = '已取消'; $_LANG['os'][OS_INVALID] = '无效'; $_LANG['os'][OS_RETURNED] = '退货'; $_LANG['ss'][SS_UNSHIPPED] = '未发货'; $_LANG['ss'][SS_SHIPPED] = '已发货'; $_LANG['ss'][SS_RECEIVED] = '收货确认'; $_LANG['ps'][PS_UNPAYED] = '未付款'; $_LANG['ps'][PS_PAYING] = '付款中'; $_LANG['ps'][PS_PAYED] = '已付款'; $_LANG['confirm_cancel'] = '您确认要取消该订单吗?取消后此订单将视为无效订单'; $_LANG['cancel'] = '取消订单'; $orders = get_user_orders($_SESSION['user_id'], $page_num, ($page_num * ($page - 1))); if (!empty($orders)) { foreach ($orders as $key => $val) { $orders[$key]['total_fee'] = encode_output($val['total_fee']); } } //$merge = get_user_merge($_SESSION['user_id']); $smarty->assign('orders', $orders); } $smarty->display('order_list.wml'); } /* 用户中心 */ else { if ($_SESSION['user_id'] > 0) { show_user_center(); } else { $smarty->display('login.wml'); } } /** * 用户中心显示 */ function show_user_center() { $best_goods = get_recommend_goods('best'); if (count($best_goods) > 0) { foreach ($best_goods as $key => $best_data) { $best_goods[$key]['shop_price'] = encode_output($best_data['shop_price']); $best_goods[$key]['name'] = encode_output($best_data['name']); } } $GLOBALS['smarty']->assign('best_goods' , $best_goods); $GLOBALS['smarty']->display('user.wml'); } ?>