<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST , ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace user\controller;
use \temmoku\user;
use \temmoku\db;
use \temmoku\lib\cookie;
use	\temmoku\lib\pages;
class jifen extends user{
	
	public function index(){
		
		$rows='20';
		!isset($_GET['page']) && $_GET['page']=1;
		$WHERE.="uid=".C('MYDB.uid');
		$data=db::select('*')->from(jab."integral_log")->where($WHERE)->orderByDESC(['id'])->setPaging($rows)->page($_GET['page'])->query();
		$Get_Page=(new pages)->Pages(jab."integral_log",$WHERE,"",$rows,$_GET['page']);
		$Get_Page = preg_replace_callback('/page_([0-9]+)/',function ($matches) {return "/user/jifen/index/{$url}page/".$matches[1];}, $Get_Page );
		$this->assign('data',$data);
		$this->assign('Get_Page',$Get_Page);
		if(DEVICE != 'pc'){
			$this->assign('webname','积分日志');
		}
		$this->display(tpl('jifen/index'));
	}
}
?>