删除无用的注释和文件
This commit is contained in:
@@ -14,11 +14,8 @@ use Gdoo\Index\Controllers\DefaultController;
|
||||
|
||||
class ModuleController extends DefaultController
|
||||
{
|
||||
public $permission = ['test', 'refresh'];
|
||||
public $permission = ['refresh'];
|
||||
|
||||
/**
|
||||
* 邮件设置
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$header = [
|
||||
@@ -146,59 +143,11 @@ class ModuleController extends DefaultController
|
||||
$header['search_form'] = $search;
|
||||
$header['js'] = Grid::js($header);
|
||||
|
||||
// 配置权限
|
||||
return $this->display([
|
||||
'header' => $header,
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建邮箱帐号
|
||||
public function createAction()
|
||||
{
|
||||
return $this->editAction();
|
||||
}
|
||||
|
||||
// 编辑邮箱帐号
|
||||
public function editAction()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
$row = DB::table('mail')->where('id', $id)->first();
|
||||
return $this->render([
|
||||
'row' => $row,
|
||||
], 'edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
public function storeAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
$gets = Request::all();
|
||||
$rules = [
|
||||
'name' => 'required',
|
||||
'smtp' => 'required',
|
||||
'user' => 'required',
|
||||
'password' => 'required',
|
||||
'port' => 'required',
|
||||
];
|
||||
$v = Validator::make($gets, $rules);
|
||||
if ($v->fails()) {
|
||||
return $this->json(join('<br>', $v->errors()->all()));
|
||||
|
||||
}
|
||||
if ($gets['id']) {
|
||||
DB::table('mail')->where('id', $gets['id'])->update($gets);
|
||||
} else {
|
||||
DB::table('mail')->insert($gets);
|
||||
}
|
||||
return $this->json('恭喜你,操作成功。', true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -20,9 +20,6 @@ class StepController extends DefaultController
|
||||
{
|
||||
public $permission = ['condition', 'steps', 'index2', 'save', 'add', 'show'];
|
||||
|
||||
/**
|
||||
* 步骤列表
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
// 更新排序
|
||||
@@ -61,9 +58,6 @@ class StepController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 步骤列表
|
||||
*/
|
||||
public function index2Action()
|
||||
{
|
||||
// 更新排序
|
||||
@@ -127,7 +121,7 @@ class StepController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 添加步骤和克隆步骤
|
||||
// 克隆步骤
|
||||
public function addAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -145,7 +139,6 @@ class StepController extends DefaultController
|
||||
}
|
||||
}
|
||||
|
||||
// 查看步骤信息
|
||||
public function showAction()
|
||||
{
|
||||
$gets = Request::all();
|
||||
@@ -153,7 +146,6 @@ class StepController extends DefaultController
|
||||
return $this->json($row, true);
|
||||
}
|
||||
|
||||
// 保存步骤
|
||||
public function saveAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -384,10 +376,6 @@ class StepController extends DefaultController
|
||||
return json_encode($rows);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除步骤
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<form method="post" class="form-horizontal" action="{{url('store')}}" id="mail" name="mail">
|
||||
|
||||
<table class="table table-form m-b-none">
|
||||
<tr>
|
||||
<td align="right" width="10%">名称</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="name" value="{{$row['name']}}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">邮箱帐号</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="user" value="{{$row['user']}}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">邮箱密码</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="password" value="{{$row['password']}}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SMTP服务器</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="smtp" value="{{$row['smtp']}}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">服务器端口</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="port" value="{{$row['port']}}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">连接方式</td>
|
||||
<td align="left">
|
||||
<select class="form-control input-sm" name="secure" id="secure">
|
||||
<option value="" @if($row['secure'] == '') selected @endif>默认</option>
|
||||
<option value="ssl" @if($row['secure'] == 'ssl') selected @endif>ssl</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">状态</td>
|
||||
<td align="left">
|
||||
<select class="form-control input-sm" name="status" id="status">
|
||||
<option value="1" @if($row['status'] == '1') selected @endif>启用</option>
|
||||
<option value="0" @if($row['status'] == '0') selected @endif>停用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">排序</td>
|
||||
<td align="left">
|
||||
<input class="form-control input-sm" type="text" name="sort" value="{{$row['sort']}}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="id" value="{{$row['id']}}">
|
||||
</form>
|
||||
Reference in New Issue
Block a user