40 lines
954 B
PHP
Raw Normal View History

2021-01-30 20:59:12 +08:00
<?php
2021-07-26 17:41:59 +08:00
/**
* @copyright Copyright (c) 2021 勾股工作室
2021-11-24 17:17:29 +08:00
* @license https://opensource.org/licenses/Apache-2.0
2021-07-26 17:41:59 +08:00
* @link https://www.gougucms.com
*/
2021-01-30 20:59:12 +08:00
declare (strict_types = 1);
namespace app\home\controller;
use app\home\BaseController;
use think\facade\View;
class Index extends BaseController
{
public function index()
2021-07-26 17:41:59 +08:00
{
2023-01-31 11:45:04 +08:00
return redirect('/admin');
2021-07-26 17:41:59 +08:00
add_user_log('view', '首页');
2021-07-28 10:04:47 +08:00
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
2021-09-09 09:10:05 +08:00
return View('',['count'=>$count]);
2021-01-30 20:59:12 +08:00
}
public function logs()
{
add_user_log('view', '开发日志');
return View('');
}
2021-01-30 20:59:12 +08:00
2021-07-28 10:04:47 +08:00
public function down()
2021-01-30 20:59:12 +08:00
{
2021-09-09 09:10:05 +08:00
$version = CMS_VERSION;
2021-07-28 10:04:47 +08:00
add_user_log('down', $version.'版本代码');
2021-09-09 09:28:41 +08:00
header("Location: https://www.gougucms.com/storage/gougucms_v".$version."_full.zip");
2021-07-28 10:04:47 +08:00
//确保重定向后,后续代码不会被执行
exit;
2021-01-30 20:59:12 +08:00
}
}