示例#1
0
文件: user.php 项目: naliduo/ecshop
    $record_count = $yhctestdb->getOne("SELECT COUNT(*) FROM dede_activitysignup As A INNER JOIN dede_addonactivity AS B ON A.activityid=B.aid WHERE A.userid = '{$user_id}'");
    $page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
    $pager = get_pager('user.php', array('act' => $action), $record_count, $page);
    $actives = get_user_actives($user_id, $pager['size'], $pager['start']);
    $smarty->assign('pager', $pager);
    $smarty->assign('actives', $actives);
    $smarty->assign('yhcwebsite', $yhcwebsite);
    $smarty->display('user_transaction.dwt');
} elseif ($action == 'share_list') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    //include_once(ROOT_PATH . 'includes/cls_mysql.php');
    //$yhctestdb = new cls_mysql("112.124.110.58", "root","dream@sh123data","yhctest");
    $record_count = $yhctestdb->getOne("SELECT COUNT(*) FROM dede_activitysignup As A INNER JOIN dede_addonshare AS B ON A.activityid=B.aid WHERE A.userid = '{$user_id}'");
    $page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
    $pager = get_pager('user.php', array('act' => $action), $record_count, $page);
    $shares = get_user_shares($user_id, $pager['size'], $pager['start']);
    $smarty->assign('pager', $pager);
    $smarty->assign('shares', $shares);
    $smarty->assign('yhcwebsite', $yhcwebsite);
    $smarty->display('user_transaction.dwt');
} elseif ($action == 'order_detail') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    include_once ROOT_PATH . 'includes/lib_payment.php';
    include_once ROOT_PATH . 'includes/lib_order.php';
    include_once ROOT_PATH . 'includes/lib_clips.php';
    include_once ROOT_PATH . 'includes/upacp/common.php';
    include_once ROOT_PATH . 'includes/upacp/SDKConfig.php';
    include_once ROOT_PATH . 'includes/upacp/secureUtil.php';
    include_once ROOT_PATH . 'includes/upacp/log.class.php';
    include_once ROOT_PATH . 'includes/upacp/httpClient.php';
    $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
示例#2
0
文件: sell.php 项目: tanmoy1234/cs75
<?php

require_once '../model/model.php';
require_once '../includes/helper.php';
if (isset($_POST['symbol'])) {
    // sell shares
    $userid = (int) $_SESSION['userid'];
    $result = sell_shares($userid, $_POST['symbol'], $error);
    $holdings = get_user_shares($userid);
    if ($result) {
        $cash = get_user_balance($userid);
        render('portfolio', array('holdings' => $holdings, 'cash' => $cash));
    } else {
        echo $error;
        render('sell', array('holdings' => $holdings));
    }
} else {
    $userid = (int) $_SESSION['userid'];
    $holdings = get_user_shares($userid);
    render('sell', array('holdings' => $holdings));
}
示例#3
0
文件: user.php 项目: naliduo/ecshop
        include_once ROOT_PATH . 'includes/lib_order.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=activity_list', 'page');
        $smarty->assign('pagebar', $pagebar);
        $shares = get_user_shares($user_id, $page_num, $page_num * ($page - 1));
        $smarty->assign('shares', $shares);
        $smarty->assign('yhcwebsite', $yhcwebsite);
    }
    $smarty->display('share_list.dwt');
    exit;
} elseif ($act == 'order_list') {
    if (!$_SESSION['user_id']) {
        $smarty->assign('footer', get_footer());
        $smarty->display('login.dwt');
        exit;
    }
    $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';
        include_once ROOT_PATH . 'includes/lib_order.php';