renamed Config class to Option
This commit is contained in:
parent
8f9dfa9f0a
commit
65771a11f3
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-02-04 13:53:55
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 18:47:48
|
||||
* @Last Modified time: 2016-03-26 22:28:22
|
||||
*/
|
||||
require "../libraries/session.inc.php";
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ if (isset($_GET['action'])) {
|
|||
} else if ($action == "color") {
|
||||
if (isset($_POST['color_scheme'])) {
|
||||
$color_scheme = str_replace('_', '-', $_POST['color_scheme']);
|
||||
Config::set('color_scheme', $color_scheme);
|
||||
Option::set('color_scheme', $color_scheme);
|
||||
$json['errno'] = 0;
|
||||
$json['msg'] = "修改配色成功。";
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-03-19 14:34:21
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 21:44:27
|
||||
* @Last Modified time: 2016-03-26 22:28:23
|
||||
*/
|
||||
require "../libraries/session.inc.php";
|
||||
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
|
||||
|
|
@ -108,7 +108,7 @@ $db = new Database\Database();
|
|||
<div class="box-body">
|
||||
<?php
|
||||
if (isset($_POST['home_pic_url'])) {
|
||||
Config::set('home_pic_url', $_POST['home_pic_url']);
|
||||
Option::set('home_pic_url', $_POST['home_pic_url']);
|
||||
echo '<div class="callout callout-success">设置已保存。</div>';
|
||||
} ?>
|
||||
<table class="table">
|
||||
|
|
@ -116,7 +116,7 @@ $db = new Database\Database();
|
|||
<tr>
|
||||
<td class="key">首页图片地址</td>
|
||||
<td class="value">
|
||||
<input type="text" data-toggle="tooltip" data-placement="bottom" title="相对与首页的路径或绝对路径。" class="form-control" name="home_pic_url" value="<?php echo Config::get('home_pic_url'); ?>">
|
||||
<input type="text" data-toggle="tooltip" data-placement="bottom" title="相对与首页的路径或绝对路径。" class="form-control" name="home_pic_url" value="<?php echo Option::get('home_pic_url'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ $db = new Database\Database();
|
|||
</section><!-- /.content -->
|
||||
</div><!-- /.content-wrapper -->
|
||||
<?php
|
||||
$color_scheme = Config::get('color_scheme');
|
||||
$color_scheme = Option::get('color_scheme');
|
||||
$data['script'] = <<< EOT
|
||||
<script type="text/javascript">
|
||||
// Skin switcher
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-03-18 22:50:25
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 18:47:49
|
||||
* @Last Modified time: 2016-03-26 22:28:23
|
||||
*/
|
||||
require "../libraries/session.inc.php";
|
||||
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
|
||||
|
|
@ -37,7 +37,7 @@ $db = new Database\Database();
|
|||
if (!isset($_POST['user_can_register'])) $_POST['user_can_register'] = '0';
|
||||
foreach ($_POST as $key => $value) {
|
||||
if ($key != "option" && $key != "submit") {
|
||||
Config::set($key, $value);
|
||||
Option::set($key, $value);
|
||||
// echo $key."=".$value."<br />";
|
||||
}
|
||||
}
|
||||
|
|
@ -48,48 +48,48 @@ $db = new Database\Database();
|
|||
<tr>
|
||||
<td class="key">站点标题</td>
|
||||
<td class="value">
|
||||
<input type="text" class="form-control" name="site_name" value="<?php echo Config::get('site_name'); ?>">
|
||||
<input type="text" class="form-control" name="site_name" value="<?php echo Option::get('site_name'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">站点描述</td>
|
||||
<td class="value">
|
||||
<input type="text" class="form-control" name="site_description" value="<?php echo Config::get('site_description'); ?>">
|
||||
<input type="text" class="form-control" name="site_description" value="<?php echo Option::get('site_description'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">站点地址(URL)</td>
|
||||
<td class="value">
|
||||
<input type="text" class="form-control" name="site_url" value="<?php echo Config::get('site_url'); ?>">
|
||||
<input type="text" class="form-control" name="site_url" value="<?php echo Option::get('site_url'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">开放注册</td>
|
||||
<td class="value">
|
||||
<label for="user_can_register">
|
||||
<input <?php echo (Config::get('user_can_register') == '1') ? 'checked="true"' : ''; ?> type="checkbox" id="user_can_register" name="user_can_register" value="1">任何人都可以注册
|
||||
<input <?php echo (Option::get('user_can_register') == '1') ? 'checked="true"' : ''; ?> type="checkbox" id="user_can_register" name="user_can_register" value="1">任何人都可以注册
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">每个 IP 限制注册数</td>
|
||||
<td class="value">
|
||||
<input type="text" class="form-control" name="regs_per_ip" value="<?php echo Config::get('regs_per_ip'); ?>">
|
||||
<input type="text" class="form-control" name="regs_per_ip" value="<?php echo Option::get('regs_per_ip'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">首选 JSON API</td>
|
||||
<td class="value">
|
||||
<select class="form-control" name="api_type">selected="selected"
|
||||
<option <?php echo (Config::get('api_type') == '0') ? 'selected="selected"' : ''; ?> value="0">CustomSkinLoader API</option>
|
||||
<option <?php echo (Config::get('api_type') == '1') ? 'selected="selected"' : ''; ?> value="1">UniversalSkinAPI</option>
|
||||
<option <?php echo (Option::get('api_type') == '0') ? 'selected="selected"' : ''; ?> value="0">CustomSkinLoader API</option>
|
||||
<option <?php echo (Option::get('api_type') == '1') ? 'selected="selected"' : ''; ?> value="1">UniversalSkinAPI</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">站点公告</td>
|
||||
<td class="value">
|
||||
<textarea name="announcement" class="form-control" rows="3"><?php echo Config::get('announcement'); ?></textarea>
|
||||
<textarea name="announcement" class="form-control" rows="3"><?php echo Option::get('announcement'); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
@ -114,7 +114,7 @@ $db = new Database\Database();
|
|||
if (isset($_POST['option']) && ($_POST['option'] == "adapter")) {
|
||||
foreach ($_POST as $key => $value) {
|
||||
if ($key != "option" && $key != "submit") {
|
||||
Config::set($key, $value);
|
||||
Option::set($key, $value);
|
||||
//echo $key."=".$value."<br />";
|
||||
}
|
||||
}
|
||||
|
|
@ -128,35 +128,35 @@ $db = new Database\Database();
|
|||
<td class="key">数据对接适配器</td>
|
||||
<td class="value">
|
||||
<select class="form-control" name="data_adapter">
|
||||
<option <?php echo (Config::get('data_adapter') == '') ? 'selected="selected"' : ''; ?> value="">不进行数据对接</option>
|
||||
<option <?php echo (Config::get('data_adapter') == 'Authme') ? 'selected="selected"' : ''; ?> value="Authme">Authme</option>
|
||||
<option <?php echo (Config::get('data_adapter') == 'Crazy') ? 'selected="selected"' : ''; ?> value="Crazy">CrazyLogin</option>
|
||||
<option <?php echo (Config::get('data_adapter') == 'Discuz') ? 'selected="selected"' : ''; ?> value="Discuz">Discuz</option>
|
||||
<option <?php echo (Option::get('data_adapter') == '') ? 'selected="selected"' : ''; ?> value="">不进行数据对接</option>
|
||||
<option <?php echo (Option::get('data_adapter') == 'Authme') ? 'selected="selected"' : ''; ?> value="Authme">Authme</option>
|
||||
<option <?php echo (Option::get('data_adapter') == 'Crazy') ? 'selected="selected"' : ''; ?> value="Crazy">CrazyLogin</option>
|
||||
<option <?php echo (Option::get('data_adapter') == 'Discuz') ? 'selected="selected"' : ''; ?> value="Discuz">Discuz</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">对接数据表名</td>
|
||||
<td class="value">
|
||||
<input type="text" class="form-control" name="data_table_name" value="<?php echo Config::get('data_table_name'); ?>">
|
||||
<input type="text" class="form-control" name="data_table_name" value="<?php echo Option::get('data_table_name'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">对接数据表用户名字段</td>
|
||||
<td class="value">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="如果你没有修改插件配置的话,请保持默认。CrazyLogin 的话请将此字段改为 `name`。" type="text" class="form-control" name="data_column_uname" value="<?php echo Config::get('data_column_uname'); ?>">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="如果你没有修改插件配置的话,请保持默认。CrazyLogin 的话请将此字段改为 `name`。" type="text" class="form-control" name="data_column_uname" value="<?php echo Option::get('data_column_uname'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">对接数据表密码字段</td>
|
||||
<td class="value">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="同上,不要瞎球改。" type="text" class="form-control" name="data_column_passwd" value="<?php echo Config::get('data_column_passwd'); ?>">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="同上,不要瞎球改。" type="text" class="form-control" name="data_column_passwd" value="<?php echo Option::get('data_column_passwd'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="key">对接数据表 IP 字段</td>
|
||||
<td class="value">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="CrazyLogin 的话请将此字段改为 `ips`,Discuz 请改为 `regip`。" type="text" class="form-control" name="data_column_ip" value="<?php echo Config::get('data_column_ip'); ?>">
|
||||
<input data-toggle="tooltip" data-placement="bottom" title="CrazyLogin 的话请将此字段改为 `ips`,Discuz 请改为 `regip`。" type="text" class="form-control" name="data_column_ip" value="<?php echo Option::get('data_column_ip'); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
8
ajax.php
8
ajax.php
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-01-16 23:01:33
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 22:01:59
|
||||
* @Last Modified time: 2016-03-26 22:28:22
|
||||
*
|
||||
* - login, register, logout
|
||||
* - upload, change, delete
|
||||
|
|
@ -55,7 +55,7 @@ if ($action == "login") {
|
|||
} else if ($action == "register") {
|
||||
if (checkPost('register')) {
|
||||
if (!$user->is_registered) {
|
||||
if (Config::get('user_can_register') == 1) {
|
||||
if (Option::get('user_can_register') == 1) {
|
||||
if (User::checkValidPwd($_POST['passwd'])) {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
|
|
@ -66,7 +66,7 @@ if ($action == "login") {
|
|||
}
|
||||
// If amount of registered accounts of IP is more than allowed mounts,
|
||||
// then reject the registration.
|
||||
if ($user->db->getNumRows('ip', $ip) < Config::get('regs_per_ip')) {
|
||||
if ($user->db->getNumRows('ip', $ip) < Option::get('regs_per_ip')) {
|
||||
// use once md5 to encrypt password
|
||||
if ($user->register($_POST['passwd'], $ip)) {
|
||||
$json['errno'] = 0;
|
||||
|
|
@ -77,7 +77,7 @@ if ($action == "login") {
|
|||
}
|
||||
} else {
|
||||
$json['errno'] = 1;
|
||||
$json['msg'] = "你最多只能注册 ".Config::get('regs_per_ip')." 个账户哦";
|
||||
$json['msg'] = "你最多只能注册 ".Option::get('regs_per_ip')." 个账户哦";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
4
get.php
4
get.php
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-02-02 20:56:42
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 20:33:02
|
||||
* @Last Modified time: 2016-03-26 22:28:22
|
||||
*
|
||||
* All textures requests of legacy link will be handle here.
|
||||
*/
|
||||
|
|
@ -39,7 +39,7 @@ if (isset($_GET['type']) && isset($_GET['uname'])) {
|
|||
if (isset($_GET['api'])) {
|
||||
echo $user->getJsonProfile(($_GET['api'] == 'csl') ? 0 : 1);
|
||||
} else {
|
||||
echo $user->getJsonProfile(Config::get('api_type'));
|
||||
echo $user->getJsonProfile(Option::get('api_type'));
|
||||
}
|
||||
} else if ($_GET['type'] == "avatar") {
|
||||
$size = (isset($_GET['size']) && $_GET['size'] != "") ? (int)$_GET['size'] : 128;
|
||||
|
|
|
|||
20
index.php
20
index.php
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-01-17 13:55:20
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 18:47:48
|
||||
* @Last Modified time: 2016-03-26 22:28:22
|
||||
*/
|
||||
session_start();
|
||||
$dir = dirname(__FILE__);
|
||||
|
|
@ -24,7 +24,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?php echo Config::get('site_name'); ?></title>
|
||||
<title><?php echo Option::get('site_name'); ?></title>
|
||||
<link rel="shortcut icon" href="./assets/images/favicon.ico">
|
||||
<link rel="stylesheet" href="./assets/libs/pure/pure-min.css">
|
||||
<link rel="stylesheet" href="./assets/libs/pure/grids-responsive-min.css">
|
||||
|
|
@ -35,7 +35,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
<link rel="stylesheet" href="./assets/libs/remodal/remodal-default-theme.css">
|
||||
<style>
|
||||
.home-menu-bg, .container {
|
||||
background-image: url("<?php echo Config::get('home_pic_url'); ?>");
|
||||
background-image: url("<?php echo Option::get('home_pic_url'); ?>");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
@ -43,8 +43,8 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
|
||||
<div class="header">
|
||||
<div class="home-menu pure-menu pure-menu-horizontal pure-menu-fixed">
|
||||
<a class="pure-menu-heading" href="<?php echo Config::get('site_url'); ?>">
|
||||
<?php echo Config::get('site_name'); ?>
|
||||
<a class="pure-menu-heading" href="<?php echo Option::get('site_url'); ?>">
|
||||
<?php echo Option::get('site_name'); ?>
|
||||
</a>
|
||||
<ul class="pure-menu-list">
|
||||
<li class="pure-menu-item">
|
||||
|
|
@ -52,7 +52,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
<a href="./user/index.php" class="pure-menu-link">
|
||||
欢迎,<?php echo $_SESSION['uname']; ?>!
|
||||
</a>|<span class="pure-menu-link" id="logout">登出?</span>
|
||||
<?php elseif (Config::get('user_can_register') == 1): ?>
|
||||
<?php elseif (Option::get('user_can_register') == 1): ?>
|
||||
<button id="login" class="pure-button pure-button-primary">登录</button>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
|
@ -67,13 +67,13 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
|
||||
<div class="container">
|
||||
<div class="splash">
|
||||
<h1 class="splash-head"><?php echo Config::get('site_name'); ?></h1>
|
||||
<h1 class="splash-head"><?php echo Option::get('site_name'); ?></h1>
|
||||
<p class="splash-subhead">
|
||||
<?php echo Config::get('site_description'); ?>
|
||||
<?php echo Option::get('site_description'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php if (!isset($_SESSION['uname'])):
|
||||
if (Config::get('user_can_register') == 1): ?>
|
||||
if (Option::get('user_can_register') == 1): ?>
|
||||
<button id="register" class="pure-button pure-button-primary">现在注册</button><?php
|
||||
else: ?>
|
||||
<button id="login" class="pure-button pure-button-primary">登录</button><?php
|
||||
|
|
@ -104,7 +104,7 @@ if (isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
|||
</div>
|
||||
<div id="msg" class="alert"></div>
|
||||
</div>
|
||||
<?php if (Config::get('user_can_register') == 1): ?>
|
||||
<?php if (Option::get('user_can_register') == 1): ?>
|
||||
<div class="remodal" data-remodal-id="register-modal">
|
||||
<button data-remodal-action="close" class="remodal-close"></button>
|
||||
<h1 id="register-title">注册</h1>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-03-18 16:53:55
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-18 17:33:58
|
||||
* @Last Modified time: 2016-03-26 22:28:23
|
||||
*/
|
||||
|
||||
namespace Database;
|
||||
|
|
@ -22,10 +22,10 @@ class AdaptedDatabase extends Database implements EncryptInterface, SyncInterfac
|
|||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->table_name = Config::get('data_table_name');
|
||||
$this->column_uname = Config::get('data_column_uname');
|
||||
$this->column_passwd = Config::get('data_column_passwd');
|
||||
$this->column_ip = Config::get('data_column_ip');
|
||||
$this->table_name = Option::get('data_table_name');
|
||||
$this->column_uname = Option::get('data_column_uname');
|
||||
$this->column_passwd = Option::get('data_column_passwd');
|
||||
$this->column_ip = Option::get('data_column_ip');
|
||||
}
|
||||
|
||||
public function createRecord($username, $password, $ip) {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-03-18 14:02:12
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-19 11:25:06
|
||||
* @Last Modified time: 2016-03-26 22:27:36
|
||||
*/
|
||||
|
||||
use Database\Database;
|
||||
|
||||
class Config
|
||||
class Option
|
||||
{
|
||||
public static function get($key) {
|
||||
$conn = Database::checkConfig();
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-01-16 23:01:33
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 21:41:40
|
||||
* @Last Modified time: 2016-03-26 22:28:23
|
||||
*/
|
||||
|
||||
use Database\Database;
|
||||
|
|
@ -20,7 +20,7 @@ class User
|
|||
|
||||
function __construct($uname) {
|
||||
$this->uname = Utils::convertString($uname);
|
||||
$class_name = "Database\\".Config::get('data_adapter')."Database";
|
||||
$class_name = "Database\\".Option::get('data_adapter')."Database";
|
||||
$this->db = new $class_name();
|
||||
|
||||
if ($this->db->sync($this->uname)) {
|
||||
|
|
|
|||
|
|
@ -3,30 +3,30 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title><?php echo $data['page_title']." - ".Config::get('site_name'); ?></title>
|
||||
<title><?php echo $data['page_title']." - ".Option::get('site_name'); ?></title>
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.ico">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<link rel="stylesheet" href="../assets/libs/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/AdminLTE.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/skins/<?php echo Config::get('color_scheme'); ?>.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/skins/<?php echo Option::get('color_scheme'); ?>.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/ply/ply.css">
|
||||
<link rel="stylesheet" href="../assets/css/admin.style.css">
|
||||
<?php if (isset($data['style'])) echo $data['style']; ?>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition <?php echo Config::get('color_scheme'); ?> sidebar-mini">
|
||||
<body class="hold-transition <?php echo Option::get('color_scheme'); ?> sidebar-mini">
|
||||
<div class="wrapper">
|
||||
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="<?php echo Config::get('site_url'); ?>" class="logo">
|
||||
<a href="<?php echo Option::get('site_url'); ?>" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>B</b>S</span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><?php echo Config::get('site_name'); ?></span>
|
||||
<span class="logo-lg"><?php echo Option::get('site_name'); ?></span>
|
||||
</a>
|
||||
|
||||
<!-- Header Navbar -->
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
Powered with ❤ by <a href="https://github.com/printempw/blessing-skin-server">Blessing Skin Server</a>.
|
||||
</div>
|
||||
<!-- Default to the left -->
|
||||
<strong>Copyright © 2016 <a href="<?php echo Config::get('site_url'); ?>"><?php echo Config::get('site_name'); ?></a>.</strong> All rights reserved.
|
||||
<strong>Copyright © 2016 <a href="<?php echo Option::get('site_url'); ?>"><?php echo Option::get('site_name'); ?></a>.</strong> All rights reserved.
|
||||
</footer>
|
||||
|
||||
</div><!-- ./wrapper -->
|
||||
|
|
|
|||
|
|
@ -3,29 +3,29 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title><?php echo $data['page_title']." - ".Config::get('site_name'); ?></title>
|
||||
<title><?php echo $data['page_title']." - ".Option::get('site_name'); ?></title>
|
||||
<link rel="shortcut icon" href="../assets/images/favicon.ico">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<link rel="stylesheet" href="../assets/libs/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/AdminLTE.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/skins/<?php echo Config::get('color_scheme'); ?>.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/AdminLTE/dist/css/skins/<?php echo Option::get('color_scheme'); ?>.min.css">
|
||||
<link rel="stylesheet" href="../assets/libs/ply/ply.css">
|
||||
<?php if (isset($data['style'])) echo $data['style']; ?>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition <?php echo Config::get('color_scheme'); ?> sidebar-mini">
|
||||
<body class="hold-transition <?php echo Option::get('color_scheme'); ?> sidebar-mini">
|
||||
<div class="wrapper">
|
||||
|
||||
<!-- Main Header -->
|
||||
<header class="main-header">
|
||||
|
||||
<!-- Logo -->
|
||||
<a href="<?php echo Config::get('site_url'); ?>" class="logo">
|
||||
<a href="<?php echo Option::get('site_url'); ?>" class="logo">
|
||||
<!-- mini logo for sidebar mini 50x50 pixels -->
|
||||
<span class="logo-mini"><b>B</b>S</span>
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg"><?php echo Config::get('site_name'); ?></span>
|
||||
<span class="logo-lg"><?php echo Option::get('site_name'); ?></span>
|
||||
</a>
|
||||
|
||||
<!-- Header Navbar -->
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-01-21 13:56:40
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 18:47:50
|
||||
* @Last Modified time: 2016-03-26 22:28:24
|
||||
*/
|
||||
require "../libraries/session.inc.php";
|
||||
$data['style'] = <<< 'EOT'
|
||||
|
|
@ -32,7 +32,7 @@ View::show('header', $data);
|
|||
<h3 class="box-title">公告</h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php echo nl2br(Config::get('announcement')); ?>
|
||||
<?php echo nl2br(Option::get('announcement')); ?>
|
||||
</div><!-- /.box-body -->
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @Author: printempw
|
||||
* @Date: 2016-02-03 16:12:45
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-03-26 21:59:57
|
||||
* @Last Modified time: 2016-03-26 22:28:24
|
||||
*/
|
||||
require "../libraries/session.inc.php";
|
||||
$data['style'] = <<< 'EOT'
|
||||
|
|
@ -69,7 +69,7 @@ View::show('header', $data);
|
|||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<?php if (!$user->is_admin): ?>
|
||||
<p>确定要删除你在 <?php echo Config::get('site_name'); ?> 上的账号吗?</p>
|
||||
<p>确定要删除你在 <?php echo Option::get('site_name'); ?> 上的账号吗?</p>
|
||||
<p>此操作不可恢复!我们不提供任何备份,或者神奇的撤销按钮。</p>
|
||||
<p>我们警告过你了,确定要这样做吗?</p>
|
||||
<button id="delete" class="btn btn-danger">删除我的账户</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user