广告和友情链接合并
This commit is contained in:
parent
2c33d9e92d
commit
f3a471c256
@ -155,7 +155,7 @@ class AuthRule extends AdminController
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
{ var_dump($id);
|
||||
$rule = AuthRuleModel::find($id);
|
||||
$result = $rule->delete();
|
||||
if($result){
|
||||
|
@ -10,9 +10,9 @@ use think\facade\Session;
|
||||
class AuthGroup extends Model
|
||||
{
|
||||
//软删除
|
||||
use SoftDelete;
|
||||
protected $deleteTime = 'delete_time';
|
||||
protected $defaultSoftDelete = 0;
|
||||
//use SoftDelete;
|
||||
// protected $deleteTime = 'delete_time';
|
||||
//protected $defaultSoftDelete = 0;
|
||||
|
||||
//登陆校验
|
||||
public function authRuleTree()
|
||||
|
@ -54,9 +54,9 @@ class Article extends BaseController
|
||||
// 热议文章
|
||||
$artHot = ArticleModel::withCount('comments')->where('status',1)->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
||||
//分类右栏广告
|
||||
$ad_cate = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',4)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_cate = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',5)->whereTime('slid_over','>=',time())->select();
|
||||
//通用右栏
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',3)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',2)->whereTime('slid_over','>=',time())->select();
|
||||
|
||||
View::assign(['type'=>$types,'artList'=>$artList,'artHot'=>$artHot,'ad_cate'=>$ad_cate,'ad_comm'=>$ad_comm]);
|
||||
return View::fetch();
|
||||
@ -89,9 +89,9 @@ class Article extends BaseController
|
||||
// 热议文章
|
||||
$artHot = ArticleModel::withCount('comments')->where('status',1)->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
||||
//文章广告
|
||||
$ad_article = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',3)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_article = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',4)->whereTime('slid_over','>=',time())->select();
|
||||
//通用右栏
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',3)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',2)->whereTime('slid_over','>=',time())->select();
|
||||
View::assign(['article'=>$article,'artHot'=>$artHot,'ad_art'=>$ad_article,'ad_comm'=>$ad_comm]);
|
||||
return View::fetch();
|
||||
}
|
||||
|
@ -33,13 +33,13 @@ class Index extends BaseController
|
||||
$artHot = Article::withCount('comments')->field('title,comments_count')->where(['status'=>1,'delete_time'=>0])->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
||||
|
||||
//首页赞助
|
||||
$ad_index = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',2)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_index = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',3)->whereTime('slid_over','>=',time())->select();
|
||||
|
||||
//首页右栏
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',3)->whereTime('slid_over','>=',time())->select();
|
||||
$ad_comm = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',2)->whereTime('slid_over','>=',time())->select();
|
||||
|
||||
//友情链接
|
||||
$friend_links = Db::name('friend_link')->field('linkname,linksrc')->select();
|
||||
$friend_links = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',6)->whereTime('slid_over','>=',time())->field('slid_name,slid_href')->select();
|
||||
|
||||
$vs = [
|
||||
'slider' => $sliders,
|
||||
|
@ -8,11 +8,11 @@ return [
|
||||
// 服务器地址
|
||||
'hostname' => '127.0.0.1',
|
||||
// 数据库名
|
||||
'database' => '',
|
||||
'database' => 'taotao',
|
||||
// 用户名
|
||||
'username' => 'root',
|
||||
// 密码
|
||||
'password' => '',
|
||||
'password' => 'root',
|
||||
// 端口
|
||||
'hostport' => '3306',
|
||||
// 数据库连接参数
|
||||
|
@ -127,11 +127,8 @@ php;
|
||||
|
||||
//管理员
|
||||
$table_admin = $data['DB_PREFIX'] . "admin";
|
||||
$table_user = $data['DB_PREFIX'] . "user";
|
||||
$sql_admin = "UPDATE $table_admin SET username = '{$username}', password = '{$pass}', status=1,create_time = '{$create_time}' WHERE id = 1";
|
||||
$sql_user = "UPDATE $table_user SET name = '{$username}', password = '{$pass}', status=1, auth=1, create_time = '{$create_time}' WHERE id = 1";
|
||||
$db->execute($sql_admin);
|
||||
$db->execute($sql_user);
|
||||
|
||||
Db::getConnection()->close();
|
||||
}
|
||||
|
@ -297,26 +297,6 @@ INSERT INTO `tao_comment` VALUES ('74', 'face[给力] ', '14', '2', '0', '1', '1
|
||||
INSERT INTO `tao_comment` VALUES ('75', 'face[微笑] ', '8', '2', '0', '0', '1555124079', '1555127399', '0');
|
||||
INSERT INTO `tao_comment` VALUES ('76', 'face[微笑] 好美呀,', '7', '3', '0', '0', '1555131857', '1555131857', '0');
|
||||
|
||||
/* Table structure for tao_friend_link */
|
||||
|
||||
DROP TABLE IF EXISTS `tao_friend_link`;
|
||||
CREATE TABLE `tao_friend_link` (
|
||||
`id` int(2) unsigned NOT NULL AUTO_INCREMENT COMMENT '友情链接id',
|
||||
`linkname` varchar(10) NOT NULL COMMENT '链接名称',
|
||||
`linksrc` varchar(60) NOT NULL COMMENT '链接地址',
|
||||
`linkimg` varchar(60) NOT NULL COMMENT '链接图片',
|
||||
`creat_time` int(10) NOT NULL COMMENT '创建时间',
|
||||
`update_time` int(10) NOT NULL COMMENT '更新时间',
|
||||
`delete_time` int(10) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
||||
|
||||
/* Records of tao_friend_link */
|
||||
|
||||
INSERT INTO `tao_friend_link` VALUES ('1', 'ThinkPHP', 'https://www.thinkphp.cn', '', '0', '0', '0');
|
||||
INSERT INTO `tao_friend_link` VALUES ('2', 'Layui', 'https://www.layui.com', '', '0', '0', '0');
|
||||
INSERT INTO `tao_friend_link` VALUES ('3', 'TaoLer', 'http://www.aieok.com', '', '0', '0', '0');
|
||||
|
||||
/* Table structure for tao_mail_server */
|
||||
|
||||
DROP TABLE IF EXISTS `tao_mail_server`;
|
||||
@ -344,6 +324,7 @@ CREATE TABLE `tao_slider` (
|
||||
`slid_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型',
|
||||
`slid_img` varchar(70) NOT NULL COMMENT '幻灯图片地址',
|
||||
`slid_href` varchar(70) NOT NULL COMMENT '链接',
|
||||
`slid_color` varchar(10) NOT NULL COMMENT '广告块颜色',
|
||||
`slid_start` int(11) NOT NULL COMMENT '开始时间',
|
||||
`slid_over` int(11) NOT NULL COMMENT '结束时间',
|
||||
`slid_status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '1投放0仓库',
|
||||
@ -355,11 +336,15 @@ CREATE TABLE `tao_slider` (
|
||||
|
||||
/* Records of tao_slider */
|
||||
|
||||
INSERT INTO `tao_slider` VALUES ('1', 'CODING', '1', '/uploads/images/F1.jpg', '#', '1574870400', '1575043200', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('2', '无人机', '1', '/uploads/images/F2.jpg', 'www.taobao.com', '-28800', '1606665600', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('3', 'keji', '2', '/storage/slider/20191210/6e6486b81a5b07be4425b676513b0334.jpg', 'http://www.baidu.com', '1571155200', '1577721600', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('4', '科技', '3', '/storage/slider/20191210/d35a49fda5839d4b27f65076fb57b7f2.jpg', '4', '1575907200', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('5', '科学', '4', '/storage/slider/20191210/e87f15527f32e690538671753010fd00.jpg', '大', '-28800', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('1', 'CODING', '1', '/storage/slider/F1.jpg', '#', '', '1574870400', '1575043200', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('2', '无人机', '1', '/storage/slider/F2.jpg', 'www.taobao.com', '', '-28800', '1606665600', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('3', '通用右栏底部广告', '2', '/storage/slider/20191210/6e6486b81a5b07be4425b676513b0334.jpg', 'http://www.aieok.com', '', '1571155200', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('4', '科技', '3', '/storage/slider/20191210/d35a49fda5839d4b27f65076fb57b7f2.jpg', '4', '', '1575907200', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('5', '科学', '4', '/storage/slider/20191210/e87f15527f32e690538671753010fd00.jpg', '大', '', '-28800', '1609344000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('6', '更快更好的PHP快速开发框架', '5', '', 'http://www.thinkphp.cn', '', '1577894400', '1640880000', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('7', 'Layui前端框架', '6', '', 'https://www.layui.com', '', '1577894400', '1612022400', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('8', 'ThinkPHP框架', '6', '', 'http://www.thinkphp.cn/', '', '1577894400', '1612022400', '1', '0', '0', '0');
|
||||
INSERT INTO `tao_slider` VALUES ('9', 'Taoler社区系统', '6', '', 'http://www.aieok.com', '', '1577894400', '2147483647', '1', '0', '0', '0');
|
||||
|
||||
/* Table structure for tao_system */
|
||||
|
||||
@ -391,7 +376,7 @@ CREATE TABLE `tao_system` (
|
||||
|
||||
/* Records of tao_system */
|
||||
|
||||
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区', '淘宝卖家交流平台', 'http://www.tp6.com', '/storage/logo/20191024/a5671b2c16a37ec8587f31989dab1177.png', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', '淘宝,卖家,TaoLer社区', '这是一个社区论坛', '1', '1', '1', '0.0.0.0', '管理员|admin|审核员|超级|垃圾', '1.1.1', '', 'http://www.aieok.com/api/index/cy', 'http://www.aieok.com/api/upload/check', 'http://www.aieok.com/api/upload/api', '0', '1577419197', '0');
|
||||
INSERT INTO `tao_system` VALUES ('1', 'TaoLer社区', '社区交流平台', '', '/storage/logo/20191024/a5671b2c16a37ec8587f31989dab1177.png', '<a href=\"http://www.aieok.com\" target=\"_blank\">aieok.com 版权所有</a>', '淘宝,卖家,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', '0', '1577419197', '0');
|
||||
|
||||
/* Table structure for tao_user */
|
||||
|
||||
|
63
config/database-1.php
Normal file
63
config/database-1.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
use think\facade\Env;
|
||||
|
||||
return [
|
||||
// 默认使用的数据库连接配置
|
||||
'default' => Env::get('database.driver', 'mysql'),
|
||||
|
||||
// 自定义时间查询规则
|
||||
'time_query_rule' => [],
|
||||
|
||||
// 自动写入时间戳字段
|
||||
// true为自动识别类型 false关闭
|
||||
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
|
||||
'auto_timestamp' => true,
|
||||
|
||||
// 时间字段取出后的默认时间格式
|
||||
'datetime_format' => 'Y-m-d H:i:s',
|
||||
|
||||
// 数据库连接配置信息
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
// 数据库类型
|
||||
'type' => Env::get('database.type', 'mysql'),
|
||||
// 服务器地址
|
||||
'hostname' => Env::get('database.hostname', '127.0.0.1'),
|
||||
// 数据库名
|
||||
'database' => Env::get('database.database', ''),
|
||||
// 用户名
|
||||
'username' => Env::get('database.username', 'root'),
|
||||
// 密码
|
||||
'password' => Env::get('database.password', ''),
|
||||
// 端口
|
||||
'hostport' => Env::get('database.hostport', '3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', ''),
|
||||
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
// 监听SQL
|
||||
'trigger_sql' => true,
|
||||
// 开启字段缓存
|
||||
'fields_cache' => false,
|
||||
// 字段缓存路径
|
||||
'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR,
|
||||
],
|
||||
|
||||
// 更多的数据库配置信息
|
||||
],
|
||||
];
|
@ -16,11 +16,11 @@ return [
|
||||
// 服务器地址
|
||||
'hostname' => '127.0.0.1',
|
||||
// 数据库名
|
||||
'database' => '',
|
||||
'database' => 'taotao',
|
||||
// 用户名
|
||||
'username' => 'root',
|
||||
// 密码
|
||||
'password' => '',
|
||||
'password' => 'root',
|
||||
// 端口
|
||||
'hostport' => '3306',
|
||||
// 数据库连接参数
|
||||
|
@ -374,7 +374,7 @@ layui.define(['table', 'form'], function(exports){
|
||||
layer.close(index);
|
||||
layer.confirm('确定删除此权限?', function(index){
|
||||
//obj.del();
|
||||
console.log(data.id);
|
||||
//console.log(data.id);
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:"/admin/authrule/delete",
|
||||
|
@ -14,7 +14,8 @@ Route::group(function () {
|
||||
Route::get('jie/:id', 'article/detail');
|
||||
Route::get('column/<ename?>/<type?>/<page?>','article/cate');
|
||||
Route::rule('add','article/add');
|
||||
Route::rule('del:id','/article/delete');
|
||||
Route::rule('del/:id','article/delete');
|
||||
Route::rule('edit/:id','article/edit');
|
||||
});
|
||||
Route::group(function () {
|
||||
Route::rule('u/:id', 'user/home');
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -954,12 +954,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "444277e2acff186a8066a8a42912ebea01d948c5"
|
||||
"reference": "a343dbb39fc51a09e78a68e7968dc8e8060c4a66"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/444277e2acff186a8066a8a42912ebea01d948c5",
|
||||
"reference": "444277e2acff186a8066a8a42912ebea01d948c5",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/a343dbb39fc51a09e78a68e7968dc8e8060c4a66",
|
||||
"reference": "a343dbb39fc51a09e78a68e7968dc8e8060c4a66",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -975,7 +975,7 @@
|
||||
"psr/simple-cache": "^1.0",
|
||||
"topthink/think-helper": "^3.1"
|
||||
},
|
||||
"time": "2019-12-28T13:25:27+00:00",
|
||||
"time": "2020-01-01T12:36:51+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
25
vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
vendored
Normal file
25
vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Afrikaans PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: kon nie geverifieer word nie.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon nie aan SMTP-verbind nie.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data nie aanvaar nie.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Boodskapliggaam leeg.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Onbekende kodering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kon nie uitvoer nie: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kon nie lêer oopmaak nie: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Lêerfout: Kon nie lêer oopmaak nie: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Die volgende Van adres misluk: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kon nie posfunksie instansieer nie.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ongeldige adres: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer word nie ondersteun nie.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'U moet ten minste een ontvanger e-pos adres verskaf.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: Die volgende ontvangers het misluk: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ondertekening Fout: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP-verbinding () misluk.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-bediener fout: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan nie veranderlike instel of herstel nie: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Uitbreiding ontbreek: ';
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-01-01 13:11:11
|
||||
// This file is automatically generated at:2020-01-02 11:24:44
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
3
vendor/symfony/var-dumper/.gitattributes
vendored
Normal file
3
vendor/symfony/var-dumper/.gitattributes
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/Tests export-ignore
|
||||
/phpunit.xml.dist export-ignore
|
||||
/.gitignore export-ignore
|
37
vendor/symfony/var-dumper/Caster/ImagineCaster.php
vendored
Normal file
37
vendor/symfony/var-dumper/Caster/ImagineCaster.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Imagine\Image\ImageInterface;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
/**
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
final class ImagineCaster
|
||||
{
|
||||
public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array
|
||||
{
|
||||
$imgData = $c->get('png');
|
||||
if (\strlen($imgData) > 1 * 1000 * 1000) {
|
||||
$a += [
|
||||
Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()),
|
||||
];
|
||||
} else {
|
||||
$a += [
|
||||
Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()),
|
||||
];
|
||||
}
|
||||
|
||||
return $a;
|
||||
}
|
||||
}
|
26
vendor/symfony/var-dumper/Caster/ImgStub.php
vendored
Normal file
26
vendor/symfony/var-dumper/Caster/ImgStub.php
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
/**
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
class ImgStub extends ConstStub
|
||||
{
|
||||
public function __construct(string $data, string $contentType, string $size)
|
||||
{
|
||||
$this->value = '';
|
||||
$this->attr['img-data'] = $data;
|
||||
$this->attr['img-size'] = $size;
|
||||
$this->attr['content-type'] = $contentType;
|
||||
}
|
||||
}
|
30
vendor/symfony/var-dumper/Caster/UuidCaster.php
vendored
Normal file
30
vendor/symfony/var-dumper/Caster/UuidCaster.php
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Caster;
|
||||
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
use Symfony\Component\VarDumper\Cloner\Stub;
|
||||
|
||||
/**
|
||||
* @author Grégoire Pineau <lyrixx@lyrixx.info>
|
||||
*/
|
||||
final class UuidCaster
|
||||
{
|
||||
public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array
|
||||
{
|
||||
$a += [
|
||||
Caster::PREFIX_VIRTUAL.'uuid' => (string) $c,
|
||||
];
|
||||
|
||||
return $a;
|
||||
}
|
||||
}
|
43
vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php
vendored
Normal file
43
vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\VarDumper\Dumper;
|
||||
|
||||
use Symfony\Component\VarDumper\Cloner\Data;
|
||||
use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface;
|
||||
|
||||
/**
|
||||
* @author Kévin Thérage <therage.kevin@gmail.com>
|
||||
*/
|
||||
class ContextualizedDumper implements DataDumperInterface
|
||||
{
|
||||
private $wrappedDumper;
|
||||
private $contextProviders;
|
||||
|
||||
/**
|
||||
* @param ContextProviderInterface[] $contextProviders
|
||||
*/
|
||||
public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders)
|
||||
{
|
||||
$this->wrappedDumper = $wrappedDumper;
|
||||
$this->contextProviders = $contextProviders;
|
||||
}
|
||||
|
||||
public function dump(Data $data)
|
||||
{
|
||||
$context = [];
|
||||
foreach ($this->contextProviders as $contextProvider) {
|
||||
$context[\get_class($contextProvider)] = $contextProvider->getContext();
|
||||
}
|
||||
|
||||
$this->wrappedDumper->dump($data->withContext($context));
|
||||
}
|
||||
}
|
39
vendor/topthink/think-captcha/src/config.php
vendored
Normal file
39
vendor/topthink/think-captcha/src/config.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | Captcha配置文件
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
//验证码位数
|
||||
'length' => 5,
|
||||
// 验证码字符集合
|
||||
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
|
||||
// 验证码过期时间
|
||||
'expire' => 1800,
|
||||
// 是否使用中文验证码
|
||||
'useZh' => false,
|
||||
// 是否使用算术验证码
|
||||
'math' => false,
|
||||
// 是否使用背景图
|
||||
'useImgBg' => false,
|
||||
//验证码字符大小
|
||||
'fontSize' => 25,
|
||||
// 是否使用混淆曲线
|
||||
'useCurve' => true,
|
||||
//是否添加杂点
|
||||
'useNoise' => true,
|
||||
// 验证码字体 不设置则随机
|
||||
'fontttf' => '',
|
||||
//背景颜色
|
||||
'bg' => [243, 251, 254],
|
||||
// 验证码图片高度
|
||||
'imageH' => 0,
|
||||
// 验证码图片宽度
|
||||
'imageW' => 0,
|
||||
|
||||
// 添加额外的验证码设置
|
||||
// verify => [
|
||||
// 'length'=>4,
|
||||
// ...
|
||||
//],
|
||||
];
|
180
vendor/topthink/think-multi-app/src/command/Build.php
vendored
Normal file
180
vendor/topthink/think-multi-app/src/command/Build.php
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\app\command;
|
||||
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\input\Argument;
|
||||
use think\console\Output;
|
||||
|
||||
class Build extends Command
|
||||
{
|
||||
/**
|
||||
* 应用基础目录
|
||||
* @var string
|
||||
*/
|
||||
protected $basePath;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('build')
|
||||
->addArgument('app', Argument::OPTIONAL, 'app name .')
|
||||
->setDescription('Build App Dirs');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$this->basePath = $this->app->getBasePath();
|
||||
$app = $input->getArgument('app') ?: '';
|
||||
|
||||
if (is_file($this->basePath . 'build.php')) {
|
||||
$list = include $this->basePath . 'build.php';
|
||||
} else {
|
||||
$list = [
|
||||
'__dir__' => ['controller', 'model', 'view'],
|
||||
];
|
||||
}
|
||||
|
||||
$this->buildApp($app, $list);
|
||||
$output->writeln("<info>Successed</info>");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建应用
|
||||
* @access protected
|
||||
* @param string $app 应用名
|
||||
* @param array $list 目录结构
|
||||
* @return void
|
||||
*/
|
||||
protected function buildApp(string $app, array $list = []): void
|
||||
{
|
||||
if (!is_dir($this->basePath . $app)) {
|
||||
// 创建应用目录
|
||||
mkdir($this->basePath . $app);
|
||||
}
|
||||
|
||||
$appPath = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : '');
|
||||
$namespace = 'app' . ($app ? '\\' . $app : '');
|
||||
|
||||
// 创建配置文件和公共文件
|
||||
$this->buildCommon($app);
|
||||
// 创建模块的默认页面
|
||||
$this->buildHello($app, $namespace);
|
||||
|
||||
foreach ($list as $path => $file) {
|
||||
if ('__dir__' == $path) {
|
||||
// 生成子目录
|
||||
foreach ($file as $dir) {
|
||||
$this->checkDirBuild($appPath . $dir);
|
||||
}
|
||||
} elseif ('__file__' == $path) {
|
||||
// 生成(空白)文件
|
||||
foreach ($file as $name) {
|
||||
if (!is_file($appPath . $name)) {
|
||||
file_put_contents($appPath . $name, 'php' == pathinfo($name, PATHINFO_EXTENSION) ? '<?php' . PHP_EOL : '');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 生成相关MVC文件
|
||||
foreach ($file as $val) {
|
||||
$val = trim($val);
|
||||
$filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . '.php';
|
||||
$space = $namespace . '\\' . $path;
|
||||
$class = $val;
|
||||
switch ($path) {
|
||||
case 'controller': // 控制器
|
||||
if ($this->app->config->get('route.controller_suffix')) {
|
||||
$filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . 'Controller.php';
|
||||
$class = $val . 'Controller';
|
||||
}
|
||||
$content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "class {$class}" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}";
|
||||
break;
|
||||
case 'model': // 模型
|
||||
$content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "use think\Model;" . PHP_EOL . PHP_EOL . "class {$class} extends Model" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}";
|
||||
break;
|
||||
case 'view': // 视图
|
||||
$filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . '.html';
|
||||
$this->checkDirBuild(dirname($filename));
|
||||
$content = '';
|
||||
break;
|
||||
default:
|
||||
// 其他文件
|
||||
$content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "class {$class}" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}";
|
||||
}
|
||||
|
||||
if (!is_file($filename)) {
|
||||
file_put_contents($filename, $content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建应用的欢迎页面
|
||||
* @access protected
|
||||
* @param string $app 目录
|
||||
* @param string $namespace 类库命名空间
|
||||
* @return void
|
||||
*/
|
||||
protected function buildHello(string $app, string $namespace): void
|
||||
{
|
||||
$suffix = $this->app->config->get('route.controller_suffix') ? 'Controller' : '';
|
||||
$filename = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : '') . 'controller' . DIRECTORY_SEPARATOR . 'Index' . $suffix . '.php';
|
||||
|
||||
if (!is_file($filename)) {
|
||||
$content = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'controller.stub');
|
||||
$content = str_replace(['{%name%}', '{%app%}', '{%layer%}', '{%suffix%}'], [$app, $namespace, 'controller', $suffix], $content);
|
||||
$this->checkDirBuild(dirname($filename));
|
||||
|
||||
file_put_contents($filename, $content);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建应用的公共文件
|
||||
* @access protected
|
||||
* @param string $app 目录
|
||||
* @return void
|
||||
*/
|
||||
protected function buildCommon(string $app): void
|
||||
{
|
||||
$appPath = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : '');
|
||||
|
||||
if (!is_file($appPath . 'common.php')) {
|
||||
file_put_contents($appPath . 'common.php', "<?php" . PHP_EOL . "// 这是系统自动生成的公共文件" . PHP_EOL);
|
||||
}
|
||||
|
||||
foreach (['event', 'middleware', 'provider'] as $name) {
|
||||
if (!is_file($appPath . $name . '.php')) {
|
||||
file_put_contents($appPath . $name . '.php', "<?php" . PHP_EOL . "// 这是系统自动生成的{$name}定义文件" . PHP_EOL . "return [" . PHP_EOL . PHP_EOL . "];" . PHP_EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建目录
|
||||
* @access protected
|
||||
* @param string $dirname 目录名称
|
||||
* @return void
|
||||
*/
|
||||
protected function checkDirBuild(string $dirname): void
|
||||
{
|
||||
if (!is_dir($dirname)) {
|
||||
mkdir($dirname, 0755, true);
|
||||
}
|
||||
}
|
||||
}
|
12
vendor/topthink/think-multi-app/src/command/stubs/controller.stub
vendored
Normal file
12
vendor/topthink/think-multi-app/src/command/stubs/controller.stub
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace {%app%}\{%layer%};
|
||||
|
||||
class Index{%suffix%}
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return '您好!这是一个[{%name%}]示例应用';
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ use MongoDB\Driver\Exception\RuntimeException;
|
||||
use MongoDB\Driver\Manager;
|
||||
use MongoDB\Driver\Query as MongoQuery;
|
||||
use MongoDB\Driver\ReadPreference;
|
||||
use MongoDB\Driver\WriteConcern;
|
||||
use think\db\BaseQuery;
|
||||
use think\db\builder\Mongo as Builder;
|
||||
use think\db\Connection;
|
||||
@ -41,6 +42,8 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
protected $typeMap = 'array';
|
||||
protected $mongo; // MongoDb Object
|
||||
protected $cursor; // MongoCursor Object
|
||||
protected $session_uuid; // sessions会话列表当前会话数组key 随机生成
|
||||
protected $sessions = []; // 会话列表
|
||||
|
||||
// 数据库连接参数配置
|
||||
protected $config = [
|
||||
@ -265,7 +268,14 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
$readPreference = $options['readPreference'] ?? null;
|
||||
$this->queryStartTime = microtime(true);
|
||||
|
||||
$this->cursor = $this->mongo->executeQuery($namespace, $mongoQuery, $readPreference);
|
||||
if ($session = $this->getSession()) {
|
||||
$this->cursor = $this->mongo->executeQuery($namespace, $query, [
|
||||
'readPreference' => is_null($readPreference) ? new ReadPreference(ReadPreference::RP_PRIMARY) : $readPreference,
|
||||
'session' => $session
|
||||
]);
|
||||
} else {
|
||||
$this->cursor = $this->mongo->executeQuery($namespace, $mongoQuery, $readPreference);
|
||||
}
|
||||
|
||||
// SQL监控
|
||||
if (!empty($this->config['trigger_sql'])) {
|
||||
@ -351,7 +361,14 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
$writeConcern = $options['writeConcern'] ?? null;
|
||||
$this->queryStartTime = microtime(true);
|
||||
|
||||
$writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, $writeConcern);
|
||||
if ($session = $this->getSession()) {
|
||||
$writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, [
|
||||
'session' => $session,
|
||||
'writeConcern' => is_null($writeConcern) ? new WriteConcern(1) : $writeConcern
|
||||
]);
|
||||
} else {
|
||||
$writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, $writeConcern);
|
||||
}
|
||||
|
||||
// SQL监控
|
||||
if (!empty($this->config['trigger_sql'])) {
|
||||
@ -403,7 +420,14 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
$this->queryStr = 'db.' . $this->queryStr;
|
||||
}
|
||||
|
||||
$this->cursor = $this->mongo->executeCommand($dbName, $command, $readPreference);
|
||||
if ($session = $this->getSession()) {
|
||||
$this->cursor = $this->mongo->executeCommand($dbName, $command, [
|
||||
'readPreference' => is_null($readPreference) ? new ReadPreference(ReadPreference::RP_PRIMARY) : $readPreference,
|
||||
'session' => $session
|
||||
]);
|
||||
} else {
|
||||
$this->cursor = $this->mongo->executeCommand($dbName, $command, $readPreference);
|
||||
}
|
||||
|
||||
// SQL监控
|
||||
if (!empty($this->config['trigger_sql'])) {
|
||||
@ -1033,7 +1057,23 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function transaction(callable $callback)
|
||||
{}
|
||||
{
|
||||
$this->startTrans();
|
||||
try {
|
||||
$result = null;
|
||||
if (is_callable($callback)) {
|
||||
$result = call_user_func_array($callback, [$this]);
|
||||
}
|
||||
$this->commit();
|
||||
return $result;
|
||||
} catch (\Exception $e) {
|
||||
$this->rollback();
|
||||
throw $e;
|
||||
} catch (\Throwable $e) {
|
||||
$this->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动事务
|
||||
@ -1043,7 +1083,13 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function startTrans()
|
||||
{}
|
||||
{
|
||||
$this->initConnect(true);
|
||||
$this->session_uuid = uniqid();
|
||||
$this->sessions[$this->session_uuid] = $this->getMongo()->startSession();
|
||||
|
||||
$this->sessions[$this->session_uuid]->startTransaction([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于非自动提交状态下面的查询提交
|
||||
@ -1052,7 +1098,12 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
* @throws PDOException
|
||||
*/
|
||||
public function commit()
|
||||
{}
|
||||
{
|
||||
if ($session = $this->getSession()) {
|
||||
$session->commitTransaction();
|
||||
$this->setLastSession();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 事务回滚
|
||||
@ -1061,6 +1112,40 @@ class Mongo extends Connection implements ConnectionInterface
|
||||
* @throws PDOException
|
||||
*/
|
||||
public function rollback()
|
||||
{}
|
||||
{
|
||||
if ($session = $this->getSession()) {
|
||||
$session->abortTransaction();
|
||||
$this->setLastSession();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束当前会话,设置上一个会话为当前会话
|
||||
* @author klinson <klinson@163.com>
|
||||
*/
|
||||
protected function setLastSession()
|
||||
{
|
||||
if ($session = $this->getSession()) {
|
||||
$session->endSession();
|
||||
unset($this->sessions[$this->session_uuid]);
|
||||
if (empty($this->sessions)) {
|
||||
$this->session_uuid = null;
|
||||
} else {
|
||||
end($this->sessions);
|
||||
$this->session_uuid = key($this->sessions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前会话
|
||||
* @return \MongoDB\Driver\Session|null
|
||||
* @author klinson <klinson@163.com>
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
return ($this->session_uuid && isset($this->sessions[$this->session_uuid]))
|
||||
? $this->sessions[$this->session_uuid]
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
83
vendor/topthink/think-template/src/facade/Template.php
vendored
Normal file
83
vendor/topthink/think-template/src/facade/Template.php
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\facade;
|
||||
|
||||
if (class_exists('think\Facade')) {
|
||||
class Facade extends \think\Facade
|
||||
{}
|
||||
} else {
|
||||
class Facade
|
||||
{
|
||||
/**
|
||||
* 始终创建新的对象实例
|
||||
* @var bool
|
||||
*/
|
||||
protected static $alwaysNewInstance;
|
||||
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* 获取当前Facade对应类名
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeClass()
|
||||
{}
|
||||
|
||||
/**
|
||||
* 创建Facade实例
|
||||
* @static
|
||||
* @access protected
|
||||
* @return object
|
||||
*/
|
||||
protected static function createFacade()
|
||||
{
|
||||
$class = static::getFacadeClass() ?: 'think\Template';
|
||||
|
||||
if (static::$alwaysNewInstance) {
|
||||
return new $class();
|
||||
}
|
||||
|
||||
if (!self::$instance) {
|
||||
self::$instance = new $class();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
|
||||
}
|
||||
|
||||
// 调用实际类的方法
|
||||
public static function __callStatic($method, $params)
|
||||
{
|
||||
return call_user_func_array([static::createFacade(), $method], $params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \think\Template
|
||||
* @mixin \think\Template
|
||||
*/
|
||||
class Template extends Facade
|
||||
{
|
||||
protected static $alwaysNewInstance = true;
|
||||
|
||||
/**
|
||||
* 获取当前Facade对应类名(或者已经绑定的容器对象标识)
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeClass()
|
||||
{
|
||||
return 'think\Template';
|
||||
}
|
||||
}
|
1
view/README.md
Normal file
1
view/README.md
Normal file
@ -0,0 +1 @@
|
||||
如果不使用模板,可以删除该目录
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{block name="title"}通用后台管理模板系统{/block}</title>
|
||||
<title>{block name="title"}TaoLer后台管理模板系统{/block}</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
|
@ -63,10 +63,10 @@
|
||||
</li>
|
||||
|
||||
<li class="layui-nav-item layui-hide-xs" lay-unselect>
|
||||
<a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
<a href="javascript:;" layadmin-event=""><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
|
||||
<a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
<a href="javascript:;" layadmin-event=""><i class="layui-icon layui-icon-more-vertical"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
@ -10,10 +10,11 @@
|
||||
<select name="slid_type" lay-verify="required">
|
||||
<option value="">请选择广告位置</option>
|
||||
<option value="1">首页幻灯 - 1126x410</option>
|
||||
<option value="2">首页赞助</option>
|
||||
<option value="3">通用右栏</option>
|
||||
<option value="4">文章右栏</option>
|
||||
<option value="5">分类右栏</option>
|
||||
<option value="2">通用右底</option>
|
||||
<option value="3">首页赞助</option>
|
||||
<option value="4">文章赞助</option>
|
||||
<option value="5">分类赞助</option>
|
||||
<option value="6">友情链接</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,6 +23,12 @@
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_name" lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">广告块底色</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_color" lay-verify="" placeholder="请输入名称" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开始</label>
|
||||
@ -44,7 +51,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图片</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_img" lay-verify="required" placeholder="请上传图片" autocomplete="off" class="layui-input" >
|
||||
<input type="text" name="slid_img" lay-verify="" placeholder="请上传图片" autocomplete="off" class="layui-input" >
|
||||
</div>
|
||||
<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-upload-slid-img">上传图片</button>
|
||||
</div>
|
||||
|
@ -9,10 +9,11 @@
|
||||
<div class="layui-input-inline">
|
||||
<select name="slid_type" lay-verify="required">
|
||||
<option {if condition="$slider.slid_type eq 1"} selected {/if} value="1">首页幻灯</option>
|
||||
<option {if condition="$slider.slid_type eq 2"} selected {/if} value="2">首页赞助</option>
|
||||
<option {if condition="$slider.slid_type eq 3"} selected {/if} value="3">通用右栏</option>
|
||||
<option {if condition="$slider.slid_type eq 4"} selected {/if} value="4">文章右栏</option>
|
||||
<option {if condition="$slider.slid_type eq 5"} selected {/if} value="5">分类右栏</option>
|
||||
<option {if condition="$slider.slid_type eq 2"} selected {/if} value="2">通用右底</option>
|
||||
<option {if condition="$slider.slid_type eq 3"} selected {/if} value="3">首页赞助</option>
|
||||
<option {if condition="$slider.slid_type eq 4"} selected {/if} value="4">文章赞助</option>
|
||||
<option {if condition="$slider.slid_type eq 5"} selected {/if} value="5">分类赞助</option>
|
||||
<option {if condition="$slider.slid_type eq 6"} selected {/if} value="6">友情链接</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -22,32 +23,34 @@
|
||||
<input type="text" name="slid_name" lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input" value="{$slider.slid_name}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">广告块底色</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_color" lay-verify="" placeholder="请输入名称" autocomplete="off" class="layui-input" value="{$slider.slid_color}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开始</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_start" id="start-time" lay-verify="required" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" value="{$slider.slid_start|date='Y-m-d'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">结束</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_over" id="over-time" lay-verify="required" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input" value="{$slider.slid_over|date='Y-m-d'}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_href" lay-verify="required" placeholder="输入连接" autocomplete="off" class="layui-input" value="{$slider.slid_href}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">图片</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="slid_img" lay-verify="required" placeholder="请上传图片" autocomplete="off" class="layui-input" value="{$slider.slid_img}">
|
||||
<input type="text" name="slid_img" lay-verify="" placeholder="请上传图片" autocomplete="off" class="layui-input" value="{$slider.slid_img}">
|
||||
</div>
|
||||
<button style="float: left;" type="button" class="layui-btn" dataid="{$slider.id}" id="layuiadmin-upload-slid-img">上传图片</button>
|
||||
</div>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<th>图片</th>
|
||||
<th>位置</th>
|
||||
<th>路径</th>
|
||||
<th>颜色</th>
|
||||
<th>开始</th>
|
||||
<th>结束</th>
|
||||
<th>状态</th>
|
||||
@ -32,9 +33,10 @@
|
||||
<tr>
|
||||
<th>{$vo.id}</th>
|
||||
<th>{$vo.slid_name}</th>
|
||||
<th><img src="{$vo.slid_img}" height="40" width="80" /></th>
|
||||
<th>{if condition="$vo.slid_img != ''"}<img src="{$vo.slid_img}" height="40" width="80" />{/if}</th>
|
||||
<th>{$vo.slid_type}</th>
|
||||
<th><a href="{$vo.slid_href}" target="_blank">{$vo.slid_href}</a></th>
|
||||
<th>{$vo.slid_color}</th>
|
||||
<th>{$vo.slid_start|date='Y-m-d'}</th>
|
||||
<th>{$vo.slid_over|date='Y-m-d'}</th>
|
||||
<th>{$vo.slid_status ?'显示':'禁止'}</th>
|
||||
@ -81,7 +83,7 @@ layui.use(['layer','table','form','upload','laydate'], function(){
|
||||
$('#slid-add').on('click', function(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '添加幻灯',
|
||||
title: '添加广告',
|
||||
content: 'add.html',
|
||||
maxmin: true,
|
||||
area : ['500px' , '450px'],
|
||||
@ -99,8 +101,8 @@ layui.use(['layer','table','form','upload','laydate'], function(){
|
||||
//提交 Ajax 成功后,静态更新表格中的数据
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"{:url('admin/user/add')}",
|
||||
data:{"slid_type":field.slid_type,"slid_name":field.slid_name,"slid_start":field.slid_start,"slid_over":field.slid_over,"slid_href":field.slid_href,"slid_img":field.slid_img},
|
||||
url:"{:url('admin/slider/add')}",
|
||||
data:{"slid_type":field.slid_type,"slid_name":field.slid_name,"slid_color":field.slid_color,"slid_start":field.slid_start,"slid_over":field.slid_over,"slid_href":field.slid_href,"slid_img":field.slid_img},
|
||||
daType:"json",
|
||||
success:function (data){
|
||||
if (data.code == 1) {
|
||||
@ -126,7 +128,7 @@ layui.use(['layer','table','form','upload','laydate'], function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
//编辑幻灯
|
||||
//编辑广告
|
||||
$('a[lay-event=edit]').on('click', function(){
|
||||
var id = $(this).attr('id-data');
|
||||
layer.open({
|
||||
@ -150,7 +152,7 @@ layui.use(['layer','table','form','upload','laydate'], function(){
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"{:url('admin/slider/edit')}",
|
||||
data:{"id":id,"slid_type":field.slid_type,"slid_name":field.slid_name,"slid_start":field.slid_start,"slid_over":field.slid_over,"slid_href":field.slid_href,"slid_img":field.slid_img},
|
||||
data:{"id":id,"slid_type":field.slid_type,"slid_name":field.slid_name,"slid_color":field.slid_color,"slid_start":field.slid_start,"slid_over":field.slid_over,"slid_href":field.slid_href,"slid_img":field.slid_img},
|
||||
daType:"json",
|
||||
success:function (data){
|
||||
if (data.code == 1) {
|
||||
|
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_cate" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: #5FB878;">{$vo.slid_name}</a>
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -196,9 +196,7 @@
|
||||
</div>
|
||||
<div class="fly-panel-main">
|
||||
{volist name="ad_art" id="vo"}
|
||||
<a href="{$vo.slid_href}" target="_blank" time-limit="2020-04-15 0:0:0" style="background: none;">
|
||||
<img src="{$vo.slid_img}" style="max-width: 100%;" alt="CODING">
|
||||
</a>
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: {$vo.slid_color};">{$vo.slid_name}</a>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,8 +50,8 @@
|
||||
</a>
|
||||
<span>{$top.create_time|date='Y-m-d'}</span>
|
||||
|
||||
<span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss></i>{$top.pv}</span>
|
||||
<!--span class="layui-badge fly-badge-accept layui-hide-xs">已结</span-->
|
||||
<!--span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss></i>{$top.pv}</span>
|
||||
<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span-->
|
||||
<span class="fly-list-nums">
|
||||
|
||||
<i class="iconfont icon-pinglun1" title="回答"></i> {$top.comments_count}
|
||||
@ -74,11 +74,9 @@
|
||||
<ul class="fly-list">
|
||||
{volist name="artList" id="art"}
|
||||
<li>
|
||||
|
||||
<a href="{:url('user/home',['id'=>$art.user_id])}" class="fly-avatar">
|
||||
<img src="{$art.user_id|getUserImg}" alt="{$art.user.name}">
|
||||
</a>
|
||||
|
||||
<h2>
|
||||
<a class="layui-badge">{$art.cate.catename}</a>
|
||||
<a href="{:url('article/detail',['id' => $art.id])}">{$art.title}</a>
|
||||
@ -121,16 +119,16 @@
|
||||
<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="#" target="_blank"> 组件平台 </a></div>
|
||||
<div><a href="#" target="_blank"> 程序下载 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> 年度案例 </a></div>
|
||||
<div><a href="http://www.tp6.com/index/jie/25.html" target="_blank"> 应用说明 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> 精贴集锦 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> Git 仓库 </a></div>
|
||||
<div><a href="https://gitee.com/toogee/TaoLer" target="_blank"> Git 仓库 </a></div>
|
||||
</div>
|
||||
<div class="layui-col-xs6">
|
||||
<div><a href="#" target="_blank"> 模板 </a></div>
|
||||
@ -158,7 +156,6 @@
|
||||
已签到状态
|
||||
<button class="layui-btn layui-btn-disabled">今日已签到</button>
|
||||
<span>获得了<cite>20</cite>飞吻</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
@ -168,7 +165,7 @@
|
||||
</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: #272894;">{$vo.slid_name}</a>
|
||||
<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>
|
||||
@ -334,7 +331,7 @@
|
||||
$('#friend-link').on('click', function(){
|
||||
layer.open({
|
||||
title: '申请友链',
|
||||
content: '发送邮件至:xx.com ',
|
||||
content: '发送邮件至:changlin_zhao@qq.com ',
|
||||
yes: function(index, layero){
|
||||
layer.close(index);
|
||||
}
|
||||
|
@ -41,11 +41,11 @@
|
||||
<a href="{:url('login/forget')}">忘记密码?</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-form-item fly-form-app">
|
||||
<!--div class="layui-form-item fly-form-app">
|
||||
<span>或者使用社交账号登入</span>
|
||||
<a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-qq" title="QQ登入"></a>
|
||||
<a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" class="iconfont icon-weibo" title="微博登入"></a>
|
||||
</div>
|
||||
</div-->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,10 +6,10 @@
|
||||
<span class="fly-mid"></span>
|
||||
<a href="{:url('article/cate',['ename' => $Request.param.ename ,'type' => 'top'])} " {if condition="$type eq 'top'" } class="layui-this" {/if} >精华</a>
|
||||
|
||||
<span class="fly-filter-right layui-hide-xs">
|
||||
<!--span class="fly-filter-right layui-hide-xs">
|
||||
<a href="" class="layui-this">按最新</a>
|
||||
<span class="fly-mid"></span>
|
||||
<a href="">按热议</a>
|
||||
</span>
|
||||
</span-->
|
||||
</div>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<h3 class="fly-panel-title">友情链接</h3>
|
||||
<dl class="fly-panel-main">
|
||||
{volist name="flinks" id="vo"}
|
||||
<dd><a href="{$vo.linksrc}" target="_blank">{$vo.linkname}</a><dd>
|
||||
<dd><a href="{$vo.slid_href}" target="_blank">{$vo.slid_name}</a><dd>
|
||||
{/volist}
|
||||
<dd><a href="javascript:void(0)" id="friend-link" class="fly-link">申请友链</a><dd>
|
||||
</dl>
|
||||
|
@ -52,12 +52,12 @@
|
||||
<li class="layui-nav-item">
|
||||
<a href="{:url('login/reg')}">注册</a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs">
|
||||
<!--li class="layui-nav-item layui-hide-xs">
|
||||
<a href="" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a>
|
||||
</li>
|
||||
<li class="layui-nav-item layui-hide-xs">
|
||||
<a href="" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
|
||||
</li>
|
||||
</li-->
|
||||
{/if}
|
||||
|
||||
</ul>
|
||||
|
@ -23,18 +23,12 @@
|
||||
我的消息
|
||||
</a>
|
||||
</li-->
|
||||
<li class="layui-nav-item {if($Request.action=='key')}layui-this{/if}">
|
||||
<a href="{:url('api/key')}">
|
||||
<i class="layui-icon"></i>
|
||||
我的授权
|
||||
</a>
|
||||
</li>
|
||||
<!--li class="layui-nav-item " >
|
||||
<li class="layui-nav-item " >
|
||||
<a href="{:url('user/home',['id'=>session('user_id')])}">
|
||||
<i class="layui-icon"></i>
|
||||
我的主页
|
||||
</a>
|
||||
</li-->
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="site-tree-mobile layui-hide">
|
||||
|
@ -10,7 +10,7 @@
|
||||
<p>4、尽管程序在发布前已经过安全测试,但仍不能完全保证漏洞的存在和丢失数据的风险,作者不承担商业风险。</p>
|
||||
<p>5、本程序版权归开发者所有,在未经过作者同意的情况下,严禁转售、赠送他人。</p>
|
||||
<p>6、您可以在完全遵守本许可协议的基础上,免费下载安装使用,商业应用请联系作者授权。</p>
|
||||
<p>7、无论您是个人或组织、盈利与否、用途如何(包括以学习和研究为目的),均需仔细阅读本协议,包括免除或者限制开发团队责任的免责条款及对您的权利限制。请您审阅并接受或不接受本服务条款。如您不同意本服务条款及/或随时对其的修改,您应不使用或主动取消产品。否则,您的任何对产品中的相关服务的注册、登陆、下载、查看等使用行为将被视为您对本服务条款全部的完全接受,包括接受对服务条款随时所做的任何修改。</p>
|
||||
<p>7、无论您是个人或组织、盈利与否、用途如何(包括以学习和研究为目的),均需仔细阅读本协议,包括免除或者限制开发团队责任的免责条款及对您的权利限制。请您审阅并接受或不接受本服务条款。如您不同意本服务条款及/或LaySNS开发团队随时对其的修改,您应不使用或主动取消产品。否则,您的任何对产品中的相关服务的注册、登陆、下载、查看等使用行为将被视为您对本服务条款全部的完全接受,包括接受对服务条款随时所做的任何修改。</p>
|
||||
<p>8、本协议一旦发生变更, Tao社区开发团队将在网页上公布修改内容。修改后的服务条款一旦在网站管理后台上公布即有效代替原来的服务条款。如果您选择接受本条款,即表示您同意接受协议各项条件的约束。如果您不同意本服务条款,则不能获得使用本服务的权利。您若有违反本条款规定,TaoLer有权随时中止或终止您对本程序的使用资格并保留追究相关法律责任的权利。</p>
|
||||
<p>9、在理解、同意、并遵守本协议的全部条款后,方可开始使用本程序。本许可协议条款的解释,效力及纠纷的解决,适用于中华人民共和国大陆法律。</p>
|
||||
<p>10、您使用本系统,需要遵循许可协议,一旦安装表示您已接受该系统各项条款。</p>
|
||||
|
@ -83,7 +83,6 @@
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class="inout1">
|
||||
<a href="/install/index/index">上一步</a>
|
||||
@ -98,7 +97,7 @@
|
||||
if ($('.yes').length != 5) {
|
||||
alert('您的配置或权限不符合要求');
|
||||
} else {
|
||||
location.href = '/install/index/create';
|
||||
location.href = '{:url('install/index/create')}';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user