public function index() { $root = array(); $email = strim($GLOBALS['request']['email']); //用户名或邮箱 $pwd = strim($GLOBALS['request']['pwd']); //密码 $page = intval($GLOBALS['request']['page']); //检查用户,用户密码 $user = user_check($email, $pwd); $user_id = intval($user['id']); if ($user_id > 0) { require APP_ROOT_PATH . 'app/Lib/uc_func.php'; $root['user_login_status'] = 1; $root['response_code'] = 1; if ($page == 0) { $page = 1; } $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE"); $status = intval($GLOBALS['request']['status']); $root['status'] = $status; // $status 1 冻结资金日志,2 信用积分日志,3 积分日志,其他 资金日志 if ($status == "2") { $title_arrays = array("100" => "全部", "0" => "结存", "4" => "偿还本息", "5" => "回收本息", "6" => "提前还款", "7" => "提前回收", "8" => "申请认证", "11" => "逾期还款", "13" => "人工操作", "14" => "借款服务费", "18" => "开户奖励", "23" => "邀请返利", "24" => "投标返利", "25" => "签到成功"); } elseif ($status == "1") { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "8" => "申请提现", "9" => "提现手续费", "13" => "人工操作", "18" => "开户奖励", "19" => "流标还返"); } elseif ($status == "3") { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "3" => "招标成功", "8" => "申请提现", "9" => "提现手续费", "13" => "人工操作", "18" => "开户奖励", "22" => "兑换", "25" => "签到成功", "28" => "投资奖励 ", "29" => "红包奖励 "); } else { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "3" => "招标成功", "4" => "偿还本息", "5" => "回收本息", "6" => "提前还款", "7" => "提前回收", "8" => "申请提现", "9" => "提现手续费", "10" => "借款管理费", "11" => "逾期罚息", "12" => "逾期管理费", "13" => "人工充值", "14" => "借款服务费", "15" => "出售债权", "16" => "购买债权", "17" => "债权转让管理费", "18" => "开户奖励", "19" => "流标还返", "20" => "投标管理费", "21" => "投标逾期收入", "22" => "兑换", "23" => "邀请返利", "24" => "投标返利", "25" => "签到成功", "26" => "逾期罚金(垫付后)", "27" => "其他费用", "28" => "投资奖励 ", "29" => "红包奖励 "); } if (isset($status) && $status == "2") { $result = get_user_point_log($limit, $GLOBALS['user_info']['id'], -1); //会员信用积分 } elseif (isset($status) && $status == "1") { $result = get_user_lock_money_log($limit, $GLOBALS['user_info']['id'], -1); //会员冻结资金日志 } elseif (isset($status) && $status == "3") { $result = get_user_score_log($limit, $GLOBALS['user_info']['id'], -1); //会员积分日志 } else { $result = get_user_money_log($limit, $GLOBALS['user_info']['id'], -1); //会员资金日志 } foreach ($result['list'] as $k => $v) { $result['list'][$k]['title'] = $title_arrays[$v['type']]; } $list = $result['list']; $root['item'] = $list; $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE")), "page_size" => app_conf("PAGE_SIZE")); } else { $root['response_code'] = 0; $root['show_err'] = "未登录"; $root['user_login_status'] = 0; } $root['program_title'] = "帐户日志"; output($root); }
public function index() { $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($GLOBALS['user_info']['id'])); $level_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_group where id = " . intval($user_info['group_id'])); $point_level = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user_level where id = " . intval($user_info['level_id'])); $user_info['user_level'] = $level_info['name']; $user_info['point_level'] = $point_level['name']; $user_info['discount'] = $level_info['discount'] * 10; $GLOBALS['tmpl']->assign("user_data", $user_info); $type_title = isset($_REQUEST['type_title']) ? intval($_REQUEST['type_title']) : 100; $times = intval($_REQUEST['times']); $time_status = intval($_REQUEST['time_status']); $t = strim($_REQUEST['t']); //point 积分 为空为资金 $GLOBALS['tmpl']->assign("t", $t); $page = intval($_REQUEST['p']); if ($page == 0) { $page = 1; } $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE"); if ($t == "point") { $title_arrays = array("100" => "全部", "0" => "结存", "4" => "偿还本息", "5" => "回收本息", "6" => "提前还款", "7" => "提前回收", "8" => "申请认证", "11" => "逾期还款", "13" => "人工操作", "14" => "借款服务费", "18" => "开户奖励", "23" => "邀请返利", "24" => "投标返利", "25" => "签到成功"); } elseif ($t == "lock_money") { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "8" => "申请提现", "9" => "提现手续费", "13" => "人工操作", "18" => "开户奖励", "19" => "流标还返"); } elseif ($t == "score") { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "3" => "招标成功", "8" => "申请提现", "9" => "提现手续费", "13" => "人工操作", "18" => "开户奖励", "22" => "兑换", "25" => "签到成功", "28" => "投资奖励 ", "29" => "红包奖励 "); } elseif ($t == "nmc_amount") { $title_arrays = array("100" => "全部", "22" => "兑换", "28" => "投资奖励 ", "29" => "红包奖励 "); } else { $title_arrays = array("100" => "全部", "0" => "结存", "1" => "充值", "2" => "投标成功", "3" => "招标成功", "4" => "偿还本息", "5" => "回收本息", "6" => "提前还款", "7" => "提前回收", "8" => "申请提现", "9" => "提现手续费", "10" => "借款管理费", "11" => "逾期罚息", "12" => "逾期管理费", "13" => "人工充值", "14" => "借款服务费", "15" => "出售债权", "16" => "购买债权", "17" => "债权转让管理费", "18" => "开户奖励", "19" => "流标还返", "20" => "投标管理费", "21" => "投标逾期收入", "22" => "兑换", "23" => "邀请返利", "24" => "投标返利", "25" => "签到成功", "26" => "逾期罚金(垫付后)", "27" => "其他费用", "28" => "投资奖励 ", "29" => "红包奖励 "); } $GLOBALS['tmpl']->assign('title_array', $title_arrays); $times_array = array("0" => "全部", "1" => "三天以内", "2" => "一周以内", "3" => "一月以内", "4" => "三月以内", "5" => "一年以内"); $GLOBALS['tmpl']->assign('times_array', $times_array); $user_id = intval($GLOBALS['user_info']['id']); $condition = ""; if ($times == 1) { $condition .= " and create_time_ymd >= '" . to_date(TIME_UTC - 3600 * 24 * 3, "Y-m-d") . "' "; //三天以内 } elseif ($times == 2) { $condition .= "and create_time_ymd >= '" . to_date(TIME_UTC - to_date(TIME_UTC, "w") * 24 * 3600, "Y-m-d") . "'"; //一周以内 } elseif ($times == 3) { $condition .= " and create_time_ym = '" . to_date(TIME_UTC, "Ym") . "'"; //一月以内 } elseif ($times == 4) { $condition .= " and create_time_ym >= '" . to_date(next_replay_month(TIME_UTC, -2), "Ym") . "'"; //三月以内 } elseif ($times == 5) { $condition .= " and create_time_y = '" . to_date(TIME_UTC, "Y") . "'"; //一年以内 } if ($type_title == 100) { $type = -1; } else { $type = $type_title; } if ($time_status == 1) { $time = isset($_REQUEST['time']) ? strim($_REQUEST['time']) : ""; $time_f = to_date(to_timespan($time, "Ymd"), "Y-m-d"); $condition .= " and create_time_ymd = '" . $time_f . "'"; $GLOBALS['tmpl']->assign('time_normal', $time_f); $GLOBALS['tmpl']->assign('time', $time); } if (isset($t) && $t == "point") { $result = get_user_point_log($limit, $user_id, $type, $condition); //会员信用积分 } elseif (isset($t) && $t == "lock_money") { $result = get_user_lock_money_log($limit, $user_id, $type, $condition); //会员信用积分 } elseif (isset($t) && $t == "score") { $result = get_user_score_log($limit, $user_id, $type, $condition); //会员积分 } elseif (isset($t) && $t == "nmc_amount") { $result = get_user_nmc_amount_log($limit, $user_id, $type, $condition); //不可提现资金日志 } else { $result = get_user_money_log($limit, $user_id, $type, $condition); //会员资金日志 } foreach ($result['list'] as $k => $v) { $result['list'][$k]['title'] = $title_arrays[$v['type']]; } $GLOBALS['tmpl']->assign("type_title", $type_title); $GLOBALS['tmpl']->assign("times", $times); $GLOBALS['tmpl']->assign("carry_money", $GLOBALS['db']->getOne("SELECT sum(money) FROM " . DB_PREFIX . "user_carry WHERE user_id=" . $user_id . " AND `status`=1")); $GLOBALS['tmpl']->assign("incharge_money", $GLOBALS['db']->getOne("SELECT sum(money) FROM " . DB_PREFIX . "payment_notice WHERE user_id=" . $user_id . " AND `is_paid`=1")); $GLOBALS['tmpl']->assign('time_status', $time_status); $GLOBALS['tmpl']->assign("list", $result['list']); $page = new Page($result['count'], app_conf("PAGE_SIZE")); //初始化分页对象 $p = $page->show(); $GLOBALS['tmpl']->assign('pages', $p); $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_MONEY']); $GLOBALS['tmpl']->assign("inc_file", "inc/uc/uc_money_index.html"); $GLOBALS['tmpl']->display("page/uc.html"); }