added option of user default skin

This commit is contained in:
printempw 2016-04-03 14:41:25 +08:00
parent 4db7176b6e
commit 3fbc76fd5b
2 changed files with 11 additions and 3 deletions

View File

@ -3,7 +3,7 @@
* @Author: printempw
* @Date: 2016-03-18 22:50:25
* @Last Modified by: printempw
* @Last Modified time: 2016-04-03 13:26:36
* @Last Modified time: 2016-04-03 14:37:11
*/
require "../libraries/session.inc.php";
if (!$user->is_admin) Utils::redirect('../index.php?msg=看起来你并不是管理员');
@ -56,7 +56,7 @@ $db = new Database\Database('users');
<input type="text" class="form-control" name="site_description" value="<?php echo Option::get('site_description'); ?>">
</td>
</tr>
<tr>
<tr data-toggle="tooltip" data-placement="bottom" title="以 http:// 开头,带上子目录(如果有),不要以 / 结尾">
<td class="key">站点地址URL</td>
<td class="value">
<input type="text" class="form-control" name="site_url" value="<?php echo Option::get('site_url'); ?>">
@ -70,6 +70,12 @@ $db = new Database\Database('users');
</label>
</td>
</tr>
<tr data-toggle="tooltip" data-placement="bottom" title="默认皮肤文件请放置于 textures 目录下,并在此键入文件名。默认留空。">
<td class="key">新用户默认皮肤</td>
<td class="value">
<input type="text" class="form-control" name="user_default_skin" value="<?php echo Option::get('user_default_skin'); ?>">
</td>
</tr>
<tr>
<td class="key">每个 IP 限制注册数</td>
<td class="value">

View File

@ -3,7 +3,7 @@
* @Author: printempw
* @Date: 2016-01-16 23:01:33
* @Last Modified by: printempw
* @Last Modified time: 2016-04-02 22:50:16
* @Last Modified time: 2016-04-03 14:39:40
*/
use Database\Database;
@ -70,6 +70,8 @@ class User
"ip" => $ip,
"preference" => 'default'
);
if (Option::get('user_default_skin') != "")
$data['hash_steve'] = Option::get('user_default_skin');
return $this->db->insert($data);
}