更新插件文件

This commit is contained in:
2020-03-25 21:22:20 +08:00
parent 69c074bb9f
commit 1346905e82
14 changed files with 463 additions and 0 deletions

45
addons/devteam/Plugin.php Normal file
View File

@@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace addons\devteam;
/**
* 开发团队信息插件
* @author thinkphp
*/
class Plugin extends \sent\Addons{
public $info = array(
'name'=>'Devteam',
'title'=>'开发团队信息',
'description'=>'开发团队成员信息',
'status'=>1,
'author'=>'molong',
'version'=>'0.1'
);
public function install(){
return true;
}
public function uninstall(){
return true;
}
//实现的AdminIndex钩子方法
public function AdminIndex($param){
$config = $this->getConfig();
$this->assign('addons_config', $config);
if($config['display']){
return $this->fetch('widget');
}
}
}

36
addons/devteam/config.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
return array(
'title'=>array(//配置在表单中的键名 ,这个会是config[title]
'title'=>'显示标题:',//表单的文字
'type'=>'text', //表单的类型text、textarea、checkbox、radio、select等
'value'=>'SentCMS开发团队', //表单的默认值
),
'width'=>array(
'title'=>'显示宽度:',
'type'=>'select',
'options'=>array(
'1'=>'1格',
'2'=>'2格',
'4'=>'4格',
'6'=>'6格'
),
'value'=>'6'
),
'display'=>array(
'title'=>'是否显示:',
'type'=>'radio',
'options'=>array(
'1'=>'显示',
'0'=>'不显示'
),
'value'=>'1'
)
);

View File

@@ -0,0 +1,35 @@
<div class="col-lg-{$addons_config.width}">
<div class="main-box clearfix">
<header class="main-box-header clearfix">
<h2>{$addons_config.title}</h2>
</header>
<div class="main-box-body clearfix">
<table class="table">
<tr>
<th>总策划</th>
<td>郭平平</td>
</tr>
<tr>
<th>产品设计及研发团队</th>
<td>郭平平</td>
</tr>
<tr>
<th>界面及用户体验团队</th>
<td>BootStrap 团队</td>
</tr>
<tr>
<th>官方网址</th>
<td><a href="http://www.tensent.cn" target="_blank">www.tensent.cn</a></td>
</tr>
<tr>
<th>官方QQ群</th>
<td><a target="_blank" href="http://jq.qq.com/?_wv=1027&k=WVW2se"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="SentCMS技术交流" title="SentCMS技术交流"></a></td>
</tr>
<tr>
<th>BUG反馈</th>
<td><a href="http://bbs.sentcms.com/" target="_blank">SentCMS讨论区</a></td>
</tr>
</table>
</div>
</div>
</div>

View File

@@ -0,0 +1,53 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: yangweijie <yangweijiester@gmail.com> <code-tech.diandian.com>
// +----------------------------------------------------------------------
namespace addons\sitestat;
use \think\facade\Db;
/**
* 系统环境信息插件
* @author thinkphp
*/
class Plugin extends \sent\Addons{
public $info = array(
'name'=>'Sitestat',
'title'=>'站点统计信息',
'description'=>'统计站点的基础信息',
'status'=>1,
'author'=>'thinkphp',
'version'=>'0.2'
);
public function install(){
return true;
}
public function uninstall(){
return true;
}
//实现的AdminIndex钩子方法
public function AdminIndex($param){
$config = $this->getConfig();
$this->assign('addons_config', $config);
$map['status'] = array('egt',0);
$maps['is_read'] = array('eq',0);
if($config['display']){
$info['users'] = Db::name('Member')->where($map)->count();
$info['userall'] = Db::name('Member')->count();
$info['action'] = Db::name('ActionLog')->where(array('create_time'=>array('gt',strtotime(date('Y-m-d')))))->count();
$info['category'] = Db::name('Category')->count();
$info['model'] = Db::name('Model')->count();
$this->assign('info',$info);
return $this->fetch('index/info');
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: yangweijie <yangweijiester@gmail.com> <code-tech.diandian.com>
// +----------------------------------------------------------------------
return array(
'title'=>array(//配置在表单中的键名 ,这个会是config[title]
'title'=>'显示标题:',//表单的文字
'type'=>'text', //表单的类型text、textarea、checkbox、radio、select等
'value'=>'系统信息', //表单的默认值
),
'width'=>array(
'title'=>'显示宽度:',
'type'=>'select',
'options'=>array(
'4'=>'4格',
'6'=>'6格',
'12'=>'12格',
),
'value'=>'2'
),
'display'=>array(
'title'=>'是否显示:',
'type'=>'radio',
'options'=>array(
'1'=>'显示',
'0'=>'不显示'
),
'value'=>'1'
)
);

View File

@@ -0,0 +1,29 @@
<div class="col-lg-12">
<div class="row">
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="main-box infographic-box colored emerald-bg"> <i class="fa fa-envelope"></i>
<span class="headline">今日行为</span>
<span class="value">{$info['action']}</span>
</div>
</div>
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="main-box infographic-box colored green-bg"> <i class="fa fa-money"></i>
<span class="headline">栏目总数</span>
<span class="value">{$info['category']}</span>
</div>
</div>
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="main-box infographic-box colored red-bg"> <i class="fa fa-user"></i>
<span class="headline">用户总数</span>
<span class="value">{$info['users']}</span>
</div>
</div>
<div class="col-lg-3 col-sm-6 col-xs-12">
<div class="main-box infographic-box colored purple-bg">
<i class="fa fa-globe"></i>
<span class="headline">模型总数</span>
<span class="value">{$info['model']}</span>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,40 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: yangweijie <yangweijiester@gmail.com> <code-tech.diandian.com>
// +----------------------------------------------------------------------
namespace addons\Syslogin;
/**
* 系统环境信息插件
* @author thinkphp
*/
class Syslogin extends Addons{
public $info = array(
'name'=>'Syslogin',
'title'=>'第三方登录',
'description'=>'第三方登录',
'status'=>0,
'author'=>'molong',
'version'=>'0.1'
);
public function loginBottomAddon(){
}
public function install(){
return true;
}
public function uninstall(){
return true;
}
}

View File

@@ -0,0 +1,19 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace addons\syslogin\controller;
use app\common\controller\Addons;
class Admin extends Addons{
public function setting(){
$this->setMeta('第三方登录设置');
$this->template('admin/login');
}
}

View File

@@ -0,0 +1,18 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace addons\syslogin\controller;
use app\common\controller\Addons;
class Index extends Addons{
public function login(){
$this->template('index/login');
}
}

View File

@@ -0,0 +1,3 @@
{extend name="admin@public:base"/}
{block name="body"}
{/block}

View File

@@ -0,0 +1 @@
登录

View File

@@ -0,0 +1,76 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: yangweijie <yangweijiester@gmail.com> <code-tech.diandian.com>
// +----------------------------------------------------------------------
namespace addons\systeminfo;
/**
* 系统环境信息插件
* @author thinkphp
*/
class Plugin extends \sent\Addons{
public $info = array(
'name' => 'Systeminfo',
'title' => '系统环境信息',
'description' => '用于显示一些服务器的信息',
'status' => 1,
'author' => 'molong',
'version' => '0.1',
);
public function install() {
return true;
}
public function uninstall() {
return true;
}
//实现的AdminIndex钩子方法
public function AdminIndex($param) {
$config = $this->getConfig();
if (false) {
//extension_loaded('curl')
$url = 'http://www.tensent.cn/index.php?m=home&c=version&a=check_version';
$params = array(
'version' => ONETHINK_VERSION,
'domain' => $_SERVER['HTTP_HOST'],
'auth' => sha1(config('DATA_AUTH_KEY')),
);
$vars = http_build_query($params);
$opts = array(
CURLOPT_TIMEOUT => 5,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $vars,
CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
);
/* 初始化并执行curl请求 */
$ch = curl_init();
curl_setopt_array($ch, $opts);
$data = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
}
if (!empty($data) && strlen($data) < 400) {
$config['new_version'] = $data;
}
$this->assign('addons_config', $config);
if ($config['display']) {
echo $this->fetch('widget');
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: yangweijie <yangweijiester@gmail.com> <code-tech.diandian.com>
// +----------------------------------------------------------------------
return array(
'title'=>array(//配置在表单中的键名 ,这个会是config[title]
'title'=>'显示标题:',//表单的文字
'type'=>'text', //表单的类型text、textarea、checkbox、radio、select等
'value'=>'系统信息', //表单的默认值
),
'width'=>array(
'title'=>'显示宽度:',
'type'=>'select',
'options'=>array(
'3'=>'3格',
'4'=>'4格',
'6'=>'6格'
),
'value'=>'6'
),
'display'=>array(
'title'=>'是否显示:',
'type'=>'radio',
'options'=>array(
'1'=>'显示',
'0'=>'不显示'
),
'value'=>'1'
)
);

View File

@@ -0,0 +1,38 @@
<div class="col-lg-{$addons_config.width}">
<div class="main-box clearfix">
<header class="main-box-header clearfix">
<h2>{$addons_config.title}</h2>
</header>
<div class="main-box-body clearfix">
<table class="table">
<tr>
<th>核心版本</th>
<td>SentCMS v{$Think.SENTCMS_VERSION}</td>
</tr>
<tr>
<th>服务器操作系统</th>
<td>{$Think.const.PHP_OS}</td>
</tr>
<tr>
<th>运行环境</th>
<td>{$_SERVER['SERVER_SOFTWARE']}</td>
</tr>
<tr>
<th>MYSQL版本</th>
{php}$system_info_mysql = \think\facade\Db::query("select version() as v;");{/php}
<td>{$system_info_mysql.0.v}</td>
</tr>
<tr>
<th>上传限制</th>
<td>{:ini_get('upload_max_filesize')}</td>
</tr>
<tr>
<th>系统版权所有</th>
<td>
<a href="http://www.tensent.cn/" target="_blank">南昌腾速科技有限公司</a>
</td>
</tr>
</table>
</div>
</div>
</div>