Exemplo n.º 1
0
function action_auction_list()
{
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $user_id = $_SESSION['user_id'];
    include_once ROOT_PATH . 'includes/lib_clips.php';
    $smarty->assign('prompt', get_user_prompt($user_id));
    $smarty->display('user_clips.dwt');
}
Exemplo n.º 2
0
    // 数据目录
    $smarty->assign('action', $action);
    $smarty->assign('lang', $_LANG);
}
//用户中心欢迎页
if ($action == 'default') {
    include_once ROOT_PATH . 'includes/lib_clips.php';
    if ($rank = get_rank_info()) {
        $smarty->assign('rank_name', sprintf($_LANG['your_level'], $rank['rank_name']));
        if (!empty($rank['next_rank_name'])) {
            $smarty->assign('next_rank_name', sprintf($_LANG['next_level'], $rank['next_rank'], $rank['next_rank_name']));
        }
    }
    $smarty->assign('info', get_user_default($user_id));
    $smarty->assign('user_notice', $_CFG['user_notice']);
    $smarty->assign('prompt', get_user_prompt($user_id));
    $smarty->display('user_clips.dwt');
}
/* 显示会员注册界面 */
if ($action == 'register') {
    if (!isset($back_act) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) {
        $back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER'];
    }
    /* 验证码相关设置 */
    if (intval($_CFG['captcha']) & CAPTCHA_REGISTER && gd_version() > 0) {
        $smarty->assign('enabled_captcha', 1);
        $smarty->assign('rand', mt_rand());
    }
    /* 增加是否关闭注册 */
    $smarty->assign('shop_reg_closed', $_CFG['shop_reg_closed']);
    $smarty->assign('back_act', $back_act);
Exemplo n.º 3
0
function action_default()
{
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $user_id = $GLOBALS['user_id'];
    $order_count = $GLOBALS['db']->getOne("select count(*) from " . $GLOBALS['ecs']->table('order_info') . " where user_id = " . $user_id);
    $smarty->assign('order_count', $order_count);
    $collect_count = $GLOBALS['db']->getOne("select count(*) from " . $GLOBALS['ecs']->table('collect_goods') . " where user_id = " . $user_id);
    $smarty->assign('collect_count', $collect_count);
    $comment_count = $GLOBALS['db']->getOne("select count(*) from " . $GLOBALS['ecs']->table('comment') . " where user_id = " . $user_id);
    $smarty->assign('comment_count', $comment_count);
    include_once ROOT_PATH . 'includes/lib_clips.php';
    if ($rank = get_rank_info()) {
        $smarty->assign('rank_name', sprintf($rank['rank_name']));
        if (!empty($rank['next_rank_name'])) {
            $smarty->assign('next_rank_name', sprintf($_LANG['next_level'], $rank['next_rank'], $rank['next_rank_name']));
        }
    }
    $sql = "select headimgurl from " . $GLOBALS['ecs']->table('weixin_user') . " where ecuid = '{$user_id}'";
    $headimgurl = $GLOBALS['db']->getOne($sql);
    $smarty->assign('headimgurl', $headimgurl);
    $recomm = $db->getOne("SELECT is_recomm FROM " . $GLOBALS['ecs']->table('user_rank') . " r" . " LEFT JOIN" . $GLOBALS['ecs']->table('users') . " u ON r.rank_id = u.user_rank" . " WHERE u.user_id = '{$user_id}'");
    $smarty->assign('recomm', $recomm);
    $smarty->assign('info', get_user_default($user_id));
    $smarty->assign('user_notice', $_CFG['user_notice']);
    $smarty->assign('prompt', get_user_prompt($user_id));
    $smarty->display('user_clips.dwt');
}