37 lines
792 B
PHP
37 lines
792 B
PHP
<?php
|
|
namespace app\admin\controller;
|
|
use app\common\controller\Admin;
|
|
use think\Request;
|
|
use think\Loader;
|
|
use think\Db;
|
|
//全自动复制计划
|
|
class Plancopy extends Admin{
|
|
|
|
public function index(){
|
|
$data = input('');
|
|
|
|
|
|
$this->setMeta('自动复制配置');
|
|
return $this->fetch();
|
|
}
|
|
|
|
public function refreshs(){
|
|
|
|
}
|
|
|
|
public function copylogs(){
|
|
$tid = input('tid');
|
|
$where = array();
|
|
if($tid){
|
|
$where['tid'] = $tid;
|
|
}
|
|
$data = db('plan_copy_log')->where($where)->whereTime('addtime', 'week')->order('id desc')->select();
|
|
foreach($data as $k=>$v){
|
|
$data[$k]['addtime'] = substr(date("Y-m-d H:i:s",$v['addtime']),5,14);
|
|
}
|
|
exit(json_encode(array('status'=>1,'logs'=>$data)));
|
|
}
|
|
|
|
|
|
|
|
} |