renamed includes to libraries

This commit is contained in:
printempw 2016-03-26 18:50:47 +08:00
parent 0cfd957621
commit 9da56ee94f
26 changed files with 30 additions and 30 deletions

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-03-19 21:00:58 * @Date: 2016-03-19 21:00:58
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-20 11:32:43 * @Last Modified time: 2016-03-26 18:47:48
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
View::show('admin/header', array('page_title' => "添加用户")); View::show('admin/header', array('page_title' => "添加用户"));
$db = new Database\Database(); $db = new Database\Database();

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-04 13:53:55 * @Date: 2016-02-04 13:53:55
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 15:13:55 * @Last Modified time: 2016-03-26 18:47:48
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
// Check token, won't allow non-admin user to access // Check token, won't allow non-admin user to access
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-03-19 14:34:21 * @Date: 2016-03-19 14:34:21
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-20 11:32:49 * @Last Modified time: 2016-03-26 18:47:48
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
$data['style'] = <<< 'EOT' $data['style'] = <<< 'EOT'
<link rel="stylesheet" href="../libs/AdminLTE/dist/css/skins/_all-skins.min.css"> <link rel="stylesheet" href="../libs/AdminLTE/dist/css/skins/_all-skins.min.css">

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-03 14:39:50 * @Date: 2016-02-03 14:39:50
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 12:53:18 * @Last Modified time: 2016-03-26 18:47:49
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
View::show('admin/header', array('page_title' => "仪表盘")); View::show('admin/header', array('page_title' => "仪表盘"));
$db = new Database\Database(); $db = new Database\Database();

View File

@ -3,7 +3,7 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-01-16 23:01:33 * @Date: 2016-01-16 23:01:33
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 20:52:00 * @Last Modified time: 2016-03-26 18:47:49
* *
* Blessing Skin Server Installer * Blessing Skin Server Installer
*/ */
@ -29,7 +29,7 @@ if (false): ?>
<?php endif; <?php endif;
$dir = dirname(dirname(__FILE__)); $dir = dirname(dirname(__FILE__));
require "$dir/includes/autoloader.php"; require "$dir/libraries/autoloader.php";
$step = isset($_GET['step']) ? $_GET['step'] : 1; $step = isset($_GET['step']) ? $_GET['step'] : 1;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-03-06 14:19:20 * @Date: 2016-03-06 14:19:20
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 11:54:58 * @Last Modified time: 2016-03-26 18:47:49
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
View::show('admin/header', array('page_title' => "用户管理")); View::show('admin/header', array('page_title' => "用户管理"));
$db = new Database\Database(); $db = new Database\Database();

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-03-18 22:50:25 * @Date: 2016-03-18 22:50:25
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 10:17:09 * @Last Modified time: 2016-03-26 18:47:49
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
View::show('admin/header', array('page_title' => "站点配置")); View::show('admin/header', array('page_title' => "站点配置"));
$db = new Database\Database(); $db = new Database\Database();

View File

@ -3,7 +3,7 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-01-16 23:01:33 * @Date: 2016-01-16 23:01:33
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-18 17:47:22 * @Last Modified time: 2016-03-26 18:47:47
* *
* - login, register, logout * - login, register, logout
* - upload, change, delete * - upload, change, delete
@ -16,7 +16,7 @@ header('Access-Control-Allow-Origin: *');
header('Content-type: application/json'); header('Content-type: application/json');
$dir = dirname(__FILE__); $dir = dirname(__FILE__);
require "$dir/includes/autoloader.php"; require "$dir/libraries/autoloader.php";
Database\Database::checkConfig(); Database\Database::checkConfig();
if (isset($_POST['uname'])) { if (isset($_POST['uname'])) {

View File

@ -3,13 +3,13 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-02 20:56:42 * @Date: 2016-02-02 20:56:42
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 19:53:57 * @Last Modified time: 2016-03-26 18:47:48
* *
* All textures requests of legacy link will be handle here. * All textures requests of legacy link will be handle here.
*/ */
$dir = dirname(__FILE__); $dir = dirname(__FILE__);
require "$dir/includes/autoloader.php"; require "$dir/libraries/autoloader.php";
if (isset($_GET['type']) && isset($_GET['uname'])) { if (isset($_GET['type']) && isset($_GET['uname'])) {
$user = new User($_GET['uname']); $user = new User($_GET['uname']);

View File

@ -3,11 +3,11 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-01-17 13:55:20 * @Date: 2016-01-17 13:55:20
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-26 18:27:03 * @Last Modified time: 2016-03-26 18:47:48
*/ */
session_start(); session_start();
$dir = dirname(__FILE__); $dir = dirname(__FILE__);
require "$dir/includes/autoloader.php"; require "$dir/libraries/autoloader.php";
Database\Database::checkConfig(); Database\Database::checkConfig();
// Auto load cookie value to session // Auto load cookie value to session

View File

@ -3,13 +3,13 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-02 21:17:59 * @Date: 2016-02-02 21:17:59
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 10:05:09 * @Last Modified time: 2016-03-26 18:49:15
*/ */
function __autoload($classname) { function __autoload($classname) {
global $dir; global $dir;
// echo $classname.'<br />'; // echo $classname.'<br />';
$include_dir = $dir.DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR; $include_dir = $dir.DIRECTORY_SEPARATOR."libraries".DIRECTORY_SEPARATOR;
$filename = $include_dir.str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.class.php'; $filename = $include_dir.str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.class.php';
require_once($filename); require_once($filename);
} }

View File

@ -3,11 +3,11 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-06 23:18:49 * @Date: 2016-02-06 23:18:49
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 10:05:18 * @Last Modified time: 2016-03-26 18:47:49
*/ */
session_start(); session_start();
$dir = dirname(dirname(__FILE__)); $dir = dirname(dirname(__FILE__));
require "$dir/includes/autoloader.php"; require "$dir/libraries/autoloader.php";
Database\Database::checkConfig(); Database\Database::checkConfig();
if(isset($_COOKIE['uname']) && isset($_COOKIE['token'])) { if(isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-01-21 13:56:40 * @Date: 2016-01-21 13:56:40
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 10:18:44 * @Last Modified time: 2016-03-26 18:47:50
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
$data['style'] = <<< 'EOT' $data['style'] = <<< 'EOT'
<link rel="stylesheet" href="../assets/css/user.style.css"> <link rel="stylesheet" href="../assets/css/user.style.css">
EOT; EOT;

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-02-03 16:12:45 * @Date: 2016-02-03 16:12:45
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-19 10:06:12 * @Last Modified time: 2016-03-26 18:47:50
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
$data['style'] = <<< 'EOT' $data['style'] = <<< 'EOT'
<link rel="stylesheet" href="../assets/css/user.style.css"> <link rel="stylesheet" href="../assets/css/user.style.css">
EOT; EOT;

View File

@ -3,9 +3,9 @@
* @Author: printempw * @Author: printempw
* @Date: 2016-03-18 21:41:21 * @Date: 2016-03-18 21:41:21
* @Last Modified by: printempw * @Last Modified by: printempw
* @Last Modified time: 2016-03-20 12:52:04 * @Last Modified time: 2016-03-26 18:47:50
*/ */
require "../includes/session.inc.php"; require "../libraries/session.inc.php";
$data['style'] = <<< 'EOT' $data['style'] = <<< 'EOT'
<link rel="stylesheet" href="../assets/css/user.style.css"> <link rel="stylesheet" href="../assets/css/user.style.css">
<link rel="stylesheet" href="../libs/iCheck/square/blue.css"> <link rel="stylesheet" href="../libs/iCheck/square/blue.css">