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");
         //			$is_paid = isset($_REQUEST['is_paid']) ? intval($_REQUEST['is_paid']) : 0;
         $condition .= " and pn.is_paid = 1";
         $result = get_user_incharge_log($limit, $GLOBALS['user_info']['id'], $condition);
         $root['item'] = $result['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 incharge_log()
 {
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_MONEY_INCHARGE_LOG']);
     //输出充值订单
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $condition = "";
     $is_paid = isset($_REQUEST['is_paid']) ? intval($_REQUEST['is_paid']) : 0;
     if ($is_paid == 0) {
         $condition .= " and pn.is_paid = 0";
     } else {
         $condition .= " and pn.is_paid = 1";
     }
     $GLOBALS['tmpl']->assign('is_paid', $is_paid);
     $result = get_user_incharge_log($limit, $GLOBALS['user_info']['id'], $condition);
     $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("inc_file", "inc/uc/uc_money_incharge_log.html");
     $GLOBALS['tmpl']->display("page/uc.html");
 }