template add
This commit is contained in:
parent
32a1f8b13e
commit
8d5d727c38
@ -9,6 +9,7 @@ use app\admin\model\System;
|
||||
use app\admin\model\MailServer;
|
||||
use think\facade\Config;
|
||||
use think\exception\ValidateException;
|
||||
use taoler\com\Files;
|
||||
|
||||
class Set extends AdminController
|
||||
{
|
||||
@ -23,8 +24,8 @@ class Set extends AdminController
|
||||
$mailserver = MailServer::find(1);
|
||||
$sysInfo = Db::name('system')->find(1);
|
||||
$syscy = $this->check($sysInfo['base_url']);
|
||||
|
||||
View::assign(['sysInfo'=>$sysInfo,'syscy'=>$syscy,'mailserver'=>$mailserver]);
|
||||
$template = Files::getDirName('../view');
|
||||
View::assign(['sysInfo'=>$sysInfo,'syscy'=>$syscy,'mailserver'=>$mailserver,'template'=>$template]);
|
||||
return View::fetch('set/system/website');
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ CREATE TABLE `tao_slider` (
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `tao_slider` VALUES ('1', 'CODING', '1', '/storage/slider/F1.jpg', '#', '', '1574870400', '1575043200', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('3', '通用右栏底部广告', '2', '/storage/slider/20200101/851c0b88a72590293bcb45454bdce056.jpg', 'http://www.aieok.com', '', '1571155200', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('3', '通用右栏底部广告', '2', '/storage/slider/20200101/851c0b88a72590293bcb45454bdce056.jpg', 'https://www.aieok.com', '', '1571155200', '1609344000', '1', '0', '0', '0');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `tao_system`;
|
||||
@ -307,6 +307,7 @@ CREATE TABLE `tao_system` (
|
||||
`webname` varchar(20) NOT NULL COMMENT '网站名称',
|
||||
`webtitle` varchar(30) NOT NULL,
|
||||
`domain` varchar(50) NOT NULL,
|
||||
`template` varchar(30) NOT NULL DEFAULT '' COMMENT '模板',
|
||||
`logo` varchar(70) NOT NULL DEFAULT '' COMMENT '网站logo',
|
||||
`cache` tinyint(5) NOT NULL DEFAULT '0' COMMENT '缓存时间分钟',
|
||||
`upsize` int(5) NOT NULL DEFAULT '0' COMMENT '上传文件大小KB',
|
||||
@ -329,7 +330,7 @@ CREATE TABLE `tao_system` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统配置表';
|
||||
|
||||
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.0.0', '', 'http://www.aieok.com/api/index/cy', 'http://www.aieok.com/api/upload/check', 'http://www.aieok.com/api/upload/api', '1581221008', '1577419197');
|
||||
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区演示站', '轻论坛系统', 'http://www.xxx.com', 'taoler', '/storage/logo/logo.png', '10', '2048', 'png|gif|jpg|jpeg|zip|rarr', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', 'TaoLer,轻社区系统,bbs,论坛,Thinkphp6,layui,fly模板,', '这是一个Taoler轻社区论坛系统', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.0.0', '', 'http://www.aieok.com/api/index/cy', 'http://www.aieok.com/api/upload/check', 'http://www.aieok.com/api/upload/api', '1581221008', '1577419197');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `tao_user`;
|
||||
@ -435,3 +436,20 @@ CREATE TABLE `tao_user_zan` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
|
||||
|
||||
DROP TABLE IF EXISTS `tao_webconfig`;
|
||||
CREATE TABLE `tao_webconfig` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ename` varchar(30) NOT NULL COMMENT '英文名',
|
||||
`cname` varchar(50) NOT NULL COMMENT '中文名',
|
||||
`form_type` varchar(10) DEFAULT '' COMMENT '表单类型',
|
||||
`conf_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '配置类型1论坛2网店3企业站',
|
||||
`values` varchar(255) NOT NULL,
|
||||
`value` varchar(60) NOT NULL COMMENT '默认值',
|
||||
`sort` tinyint(2) NOT NULL DEFAULT '20',
|
||||
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `tao_webconfig` VALUES ('1', 'template', '', '', '0', '', 'taoler', '20', '0', '0', '0');
|
||||
|
@ -2,6 +2,9 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | 模板设置
|
||||
// +----------------------------------------------------------------------
|
||||
use think\facade\Db;
|
||||
|
||||
$template = Db::name('system')->where('id',1)->value('template');
|
||||
|
||||
return [
|
||||
// 模板引擎类型使用Think
|
||||
@ -9,7 +12,7 @@ return [
|
||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板目录名
|
||||
'view_dir_name' => 'view',
|
||||
'view_dir_name' => 'view/'.$template,
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
|
@ -5,6 +5,21 @@ use RecursiveIteratorIterator;
|
||||
use RecursiveDirectoryIterator;
|
||||
class Files
|
||||
{
|
||||
//获取目录下子目录名
|
||||
public static function getDirName($path)
|
||||
{
|
||||
if (is_dir($path)) {
|
||||
$arr = array();
|
||||
$data = scandir($path);
|
||||
foreach ($data as $value){
|
||||
if($value !='.' && $value != '..' && !stripos($value,".")){
|
||||
$arr[] = strtolower($value);
|
||||
}
|
||||
}
|
||||
return array_merge(array_diff($arr, array('install')));
|
||||
}
|
||||
}
|
||||
|
||||
//创建文件夹及子文件夹
|
||||
public static function create_dirs($path)
|
||||
{
|
||||
|
@ -1 +0,0 @@
|
||||
如果不使用模板,可以删除该目录
|
@ -10,8 +10,8 @@
|
||||
<link rel="stylesheet" href="/static/res/css/global.css" charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<include file="./index/public/header.html" />
|
||||
<include file="./index/public/column" />
|
||||
<include file="./taoler/index/public/header.html" />
|
||||
<include file="./taoler/index/public/column" />
|
||||
<div class="layui-container fly-marginTop">
|
||||
<div class="fly-panel">
|
||||
<div class="fly-none">
|
@ -5,7 +5,7 @@
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">版本发布</div>
|
||||
<div class="layui-card-header">授权管理</div>
|
||||
<div class="layui-card-body">
|
||||
|
||||
<div class="layui-form" wid100 lay-filter="">
|
||||
@ -32,7 +32,7 @@
|
||||
<tr>
|
||||
<th>{$vo.id}</th>
|
||||
<th>{$vo.user}</th>
|
||||
<th>{$vo.domain}</th>
|
||||
<th><a href="{$vo.domain}" target="_blank">{$vo.domain}</a></th>
|
||||
<th>{$vo.key}</th>
|
||||
<th>{$vo.auth_level}</th>
|
||||
<th>{$vo.status?'正常':'禁用'}</th>
|
@ -27,6 +27,17 @@
|
||||
<input type="text" name="domain" lay-verify="url" value="{$sysInfo.domain}" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">模板切换</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="template" lay-verify="required">
|
||||
<option value=""></option>
|
||||
{volist name="template" id="vo"}
|
||||
<option {if condition="$sysInfo.template eq $vo"} selected {/if} value="{$vo}">{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">LOGO</label>
|
||||
<div class="layui-input-block">
|
157
view/taoler/index/doc/timeline.html
Normal file
157
view/taoler/index/doc/timeline.html
Normal file
@ -0,0 +1,157 @@
|
||||
{extend name="public:base" /}
|
||||
|
||||
{block name="title"}{$sysInfo.webname}-{$sysInfo.webtitle}{/block}
|
||||
{block name="keywords"}{$sysInfo.keywords}{/block}
|
||||
{block name="description"}{$sysInfo.descript}{/block}
|
||||
{block name="column"}{include file="public/column" /}{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="layui-container">
|
||||
<div class="layui-row layui-col-space15">
|
||||
|
||||
<div class="layui-col-md8">
|
||||
<!--首页幻灯-->
|
||||
<div class="fly-panel layui-hide-xs">
|
||||
<div class="layui-row fly-panel-main" style="padding: 15px;">
|
||||
<div class="layui-carousel fly-topline" id="FLY_topline" >
|
||||
<div carousel-item="">
|
||||
{volist name="slider" id="vo"}
|
||||
<div time-limit="2019-04-18 0:0:0" >
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow"> <img src="{$vo.slid_img}" alt="{$vo.slid_name}" /> </a>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--更新日志-->
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><h1 class="site-h1">更新日志</h1></div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="layui-timeline">
|
||||
{volist name="timeline" id="vo"}
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">{$vo.timeline_title}<span class="layui-badge-rim">{$vo.create_time|date='Y-m-d'}</span></h3>
|
||||
{$vo.timeline_content|raw}
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--右栏-->
|
||||
<div class="layui-col-md4">
|
||||
<div class="fly-panel">
|
||||
<h3 class="fly-panel-title">温馨通道</h3>
|
||||
<div class="layui-row fly-panel-main" style="padding: 15px;">
|
||||
<div class="layui-clear fly-list-quick">
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="https://gitee.com/toogee/TaoLer/repository/archive/master.zip" target="_blank"> 程序下载 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="{:url('article/detail',['id'=>25])}" target="_blank"> 应用说明 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> 申请Key </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="https://gitee.com/toogee/TaoLer" target="_blank"> Git 仓库 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="{:url('doc/timeline')}" target="_blank">版本更新日志</a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> 关于积分 </a></div>
|
||||
</div>
|
||||
<a name="signin"> </a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title"> 钻级赞助商 <span class="fly-mid"></span>
|
||||
<a href="/" class="fly-link fly-joinad">我要加入</a>
|
||||
</div>
|
||||
<div class="fly-panel-main" style="padding: 13px 15px;">
|
||||
{volist name="ad_index" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
<!--a href="/" target="_blank" rel="nofollow" class="fly-zanzhu fly-zanzhu-img" ><img src="//11886.png" alt="topjui"></a-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dl class="fly-panel fly-list-one">
|
||||
<dt class="fly-panel-title">本周热议</dt>
|
||||
{volist name="artHot" id="vo"}
|
||||
<dd>
|
||||
<a href="{:url('article/detail',['id' => $vo.id])}">{$vo.title}</a>
|
||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||
</dd>
|
||||
{/volist}
|
||||
|
||||
<!-- 无数据时 -->
|
||||
<!--
|
||||
<div class="fly-none">没有相关数据</div>
|
||||
-->
|
||||
</dl>
|
||||
|
||||
<div class="fly-panel">
|
||||
<div class="fly-panel-title">
|
||||
官方产品
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
<a href="http://www.aieok.com" target="_blank" class="fly-zanzhu" style="background-color: #5FB878;">TaoLer 1.0 - 旗舰之作</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fly-panel" style="padding: 20px 0; text-align: center;">
|
||||
{volist name="ad_comm" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$vo.slid_img}" style="max-width: 100%;"></a>
|
||||
{/volist}
|
||||
</div>
|
||||
|
||||
{include file="public/flink" /}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function() {
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
var jifenname = "金币";
|
||||
|
||||
$('#friend-link').on('click', function(){
|
||||
layer.open({
|
||||
title: '申请友链',
|
||||
content: '发送邮件至:changlin_zhao@qq.com ',
|
||||
yes: function(index, layero){
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
layui.cache.page = 'index';
|
||||
layui.cache.user = {
|
||||
username: '{$user.name??'游客'}'
|
||||
,uid: {$user.id ? $user.id : -1}
|
||||
,avatar: '{$user.name? $user['user_img']:'/static/res/images/avatar/00.jpg'}'
|
||||
,experience: 83
|
||||
,sex: '{if condition="$user['sex'] eq 0"}男{else/}女{/if}'
|
||||
};
|
||||
layui.config({
|
||||
version: "3.0.0"
|
||||
,base: '/static/res/mods/'
|
||||
}).extend({
|
||||
fly: 'index'
|
||||
}).use('fly');
|
||||
</script>
|
||||
|
||||
{/block}
|
@ -13,7 +13,7 @@
|
||||
{if session('?user_id')}
|
||||
<li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="{:url('user/post')}">我发表的贴</a></li>
|
||||
<li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="{:url('user/post#collection')}">我收藏的贴</a></li>
|
||||
{/if}
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
<div class="fly-column-right layui-hide-xs">
|
@ -17,12 +17,12 @@
|
||||
我的帖子
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item {if($Request.action=='message')}layui-this{/if}">
|
||||
<!--li class="layui-nav-item {if($Request.action=='message')}layui-this{/if}">
|
||||
<a href="{:url('index/user/message')}">
|
||||
<i class="layui-icon"></i>
|
||||
我的消息
|
||||
</a>
|
||||
</li>
|
||||
</li-->
|
||||
|
||||
<li class="layui-nav-item " >
|
||||
<a href="{:url('user/home',['id'=>session('user_id')])}">
|
Loading…
Reference in New Issue
Block a user