Browse Source

0.9.9

pull/9/head
xiaoz 3 years ago
parent
commit
3ebb3577da
  1. 2
      config.simple.php
  2. 4
      controller/index.php
  3. 1
      data/index.html
  4. 9
      index.php
  5. 2
      templates/admin/footer.php
  6. 14
      templates/default/index.php

2
config.simple.php

@ -4,7 +4,7 @@ require 'class/Medoo.php'; @@ -4,7 +4,7 @@ require 'class/Medoo.php';
use Medoo\Medoo;
$db = new medoo([
'database_type' => 'sqlite',
'database_file' => 'db/onenav.db3'
'database_file' => 'data/onenav.db3'
]);
//用户名

4
controller/index.php

@ -109,8 +109,8 @@ function base64($url){ @@ -109,8 +109,8 @@ function base64($url){
//获取版本号
$version = get_version();
//载入js扩展
if( file_exists('templates/admin/static/extend.js') ) {
$onenav['extend'] = '<script src = "templates/admin/static/extend.js"></script>';
if( file_exists('data/extend.js') ) {
$onenav['extend'] = '<script src = "data/extend.js"></script>';
}
else{
$onenav['extend'] = '';

1
data/index.html

@ -0,0 +1 @@ @@ -0,0 +1 @@

9
index.php

@ -11,16 +11,17 @@ $c = strip_tags($c); @@ -11,16 +11,17 @@ $c = strip_tags($c);
//读取版本号
//$version = @file_get_contents("./functions/version.txt");
//载入配置文件
if( !file_exists('./config.php') ) {
if( !file_exists('./data/config.php') ) {
exit('<h3>配置文件不存在,请将config.simple.php复制一份并命名为config.php</h3>');
}
//检查数据库是否存在,不存在则复制数据库
if( !file_exists('./db/onenav.db3') ) {
copy('db/onenav.simple.db3','db/onenav.db3');
if( !file_exists('./data/onenav.db3') ) {
copy('db/onenav.simple.db3','data/onenav.db3');
// copy('db/.htaccess','data/.htaccess');
}
//载入配置文件
require("./config.php");
require("./data/config.php");
//根据不同的请求载入不同的方法
//如果没有请求控制器

2
templates/admin/footer.php

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<div class="layui-footer">
<!-- 底部固定区域 -->
© Copyright 2020.Powered by <a href="https://github.com/helloxz/onenav" rel = "nofollow" target="_blank">OneNav</a>.
© Copyright 2021.Powered by <a href="https://github.com/helloxz/onenav" rel = "nofollow" target="_blank">OneNav</a>.
</div>
</div>
<script src = 'https://libs.xiaoz.top/jquery/2.2.4/jquery.min.js'></script>

14
templates/default/index.php

@ -34,6 +34,14 @@ @@ -34,6 +34,14 @@
</div>
</div> -->
<!-- 搜索框END -->
<!-- 新版搜索框 -->
<div class="mdui-col-xs-4">
<div class="mdui-textfield mdui-textfield-floating-label">
<!-- <label class="mdui-textfield-label">输入书签关键词进行搜索</label> -->
<input class="mdui-textfield-input search" style = "color:#FFFFFF;" placeholder="输入书签关键词进行搜索" type="text" />
</div>
</div>
<!-- 新版搜索框END -->
<a href="https://github.com/helloxz/onenav" rel = "nofollow" target="_blank" class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-tooltip="{content: '查看 Github'}">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve" class="mdui-icon" style="width: 24px;height:24px;">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#ffffff" d="M18,1.4C9,1.4,1.7,8.7,1.7,17.7c0,7.2,4.7,13.3,11.1,15.5
@ -81,14 +89,14 @@ @@ -81,14 +89,14 @@
<!--正文内容部分-->
<div class="mdui-container">
<!-- 搜索框 -->
<div class="mdui-row">
<!-- <div class="mdui-row">
<div class="mdui-col-xs-12">
<div class="mdui-textfield mdui-textfield-floating-label">
<label class="mdui-textfield-label">输入书签关键词进行搜索</label>
<input class="mdui-textfield-input search" type="text" />
</div>
</div>
</div>
</div> -->
<!-- 搜索框END -->
<div class="mdui-row">
<!-- 遍历分类目录 -->
@ -153,7 +161,7 @@ @@ -153,7 +161,7 @@
<!--正文内容部分END-->
<!-- footer部分 -->
<footer>
© 2020 Powered by <a target = "_blank" href="https://github.com/helloxz/onenav" title = "简约导航/书签管理器" rel = "nofollow">OneNav</a>.The author is <a href="https://www.xiaoz.me/" target="_blank" title = "小z博客">xiaoz.me</a>
© 2021 Powered by <a target = "_blank" href="https://github.com/helloxz/onenav" title = "简约导航/书签管理器" rel = "nofollow">OneNav</a>.The author is <a href="https://www.xiaoz.me/" target="_blank" title = "小z博客">xiaoz.me</a>
</footer>
<!-- footerend -->
</body>

Loading…
Cancel
Save