<?php
/** 
 * UQ云商：	www.uqcms.com  
 * 联系QQ：	2200631718 
 * 可免费商用，需要留UQ云商链接作为交换，只首页底部留取即可，不影响使用。
 */

header("Content-type: text/html; charset=utf-8"); date_default_timezone_set('Asia/Shanghai'); $uq0 = microtime(true); define('DS', DIRECTORY_SEPARATOR); define('IN_UQ', true); define('FRAME_PATH', UQCMS_PATH.'UQframework'. DS); include FRAME_PATH . DS .'common.php'; include FRAME_PATH . DS .'common2.php'; include FRAME_PATH . DS .'router.php'; define('UQCMS_APP_PATH', UQCMS_PATH . UQCMS_APP. DS); spl_autoload_register('autoload'); session::start(); if(isset($_GET['trackuid'])){ $_SESSION['trackuid'] = $_GET['trackuid']; } if(isset($_GET['trackpst'])){ $_SESSION['trackpst'] = $_GET['trackpst']; } class core { public $uq1 = 0; function __construct() { $this->m = isset($_GET['m'])?trim($_GET['m']):'index'; $this->a = isset($_GET['a'])?trim($_GET['a']):'index'; $this->page = $_GET['page']??'1'; $this->page_size = $_GET['page_size']??'1'; } function page($uq2 = []) { if(isset($uq2['page'])){ $uq3 = $uq2['page']??'1'; $uq4 = $uq2['page_size']??'15'; $uq5 = $uq2['page_every']??'5'; $uq6 = $uq2['page_type']??'total'; }else{ $uq3 = $_GET['page']??'1'; $uq4 = $_GET['page_size']??'15'; $uq5 = $_GET['page_every']??'5'; $uq6 = $_GET['page_type']??'total'; } $uq7 = $uq2['total']??'0'; if($uq4 < $uq7){ return $this->page_url($uq4, $uq7, $uq3, $uq5, $uq6); }else{ return false; } } function page_url($uq4, $uq7, $uq3 = 1, $uq5 = 5, $uq6 = '') { $uq2 = explode('?', cfg('current_page_url')); $uq8 = $uq2[0].'?'; foreach($_GET as $uq9=>$uq10){ if($uq9 != 'page' && $uq9 != 'm' && $uq9 != 'a' && $uq9 != 'p'){ $uq8 .= $uq9.'='.$uq10.'&'; } } $uq8 = $uq8.'page='; $uq11 = new page($uq4, $uq7, $uq3, $uq5, $uq8); $uq12 = $uq11->subPage(); if($uq6 == 'scroll'){ return $uq12['scroll_url']; }elseif($uq6 == 'total'){ return $uq12['page']; }else{ return $uq12['page']; } } function limit($uq3 = null, $uq4 = null) { if(empty($uq3)){ $uq3 = $_GET['page']??'1'; $uq4 = $_GET['page_size']??'15'; } return ' limit '.($uq3 -1)*$uq4.", ".$uq4; } function module($uq13) { return mod($uq13); } function mod($uq13) { return mod($uq13); } function api($uq14) { return api($uq14); } function __get($uq15) { if($uq15 == 'db'){ return $this->db = db(); }elseif($uq15 == 'cache'){ return $this->cache = redis(); }else{ return $this->$uq15; } } function __destruct(){ if(!empty($this->db)){ }elseif(!empty($this->cache)){ } } } class control extends core { function __construct() { parent::__construct(); } function assign($uq14, $uq16) { $uq17 = $this->load_smarty(); if(isset($uq17)){ $uq17->assign($uq14, $uq16); }else{ error_404('模板模块加载错误'); } } function display($uq18 = null, $uq19 = false) { $uq17 = $this->load_smarty(); if(isset($uq17)){ if(empty($uq18)){ return $uq17->displays(); }else{ return $uq17->displays($uq18, $uq19); } }else{ error_404('模板模块加载错误'); } } function load_smarty() { static $uq20 = array(); if(isset($uq20['smt'])){ return $uq20['smt']; }else{ include_once FRAME_PATH.'smarty/Smarty.class.php'; include_once FRAME_PATH.'mytpl.class.php'; $uq20['smt'] = new mytpl(); return $uq20['smt']; } } } class module extends core { function __construct() { parent::__construct(); } } $uq21 = UQCMS_APP. DS .UQCMS_APP.'.class.php'; if(file_exists($uq21)){ include $uq21; $uq22 = UQCMS_APP; $uq23 = new $uq22(); $uq23->index(); } $uq24 = G('m', '', 'index'); $uq25 = G('a', '', 'index'); $uq26 = UQCMS_APP_PATH.'controls'. DS .$uq24.'.class.php'; if(is_file($uq26)){ include $uq26; $uq27 = lcfirst($uq24).'_uqcms'; if(class_exists($uq27)){ $uq28 = new $uq27(); if(method_exists($uq28, $uq25)){ $uq28->$uq25(); }else{ $uq28->display(); } }else{ error_404('该页面不存在404'); } }else{ $uq29 = new control(); $uq29->display(); } $uq30=microtime(true); $uq7=$uq30-$uq0; 