<?php namespace controllers; use Engine\X; use Engine\Gvar; use Engine\Route; /** * 添加脏词 */ Route::get('add', function () { X::render('audit/dirtyword_add'); }); Route::post('add', function () { $post = X::request()->post(['dirtyword' => '']); //添加脏词 X::module('dirtyword')->add(['words' => $post->dirtyword, 'company_id' => Gvar::audit('company_id')]); X::redirect("/audit/dirtyword/add"); }); Route::get('delete', function () { $get = X::request()->get(['id' => '']); //添加脏词 X::module('dirtyword')->del($get->id); echo "success"; });
<?php namespace controllers; use Engine\X; use Engine\Gvar; use Engine\Route; /** * 首页 */ Route::get('index', function () { $get = X::request()->get(['p' => 1]); list($count, $log) = X::module('post')->allByBanLog(Gvar::audit('company_id'), $get->p); X::render('audit/post', ['log' => $log, '__page_html' => defaultPageHtml($count, $get->p, '?')]); });
<?php namespace controllers; use Engine\X; use Engine\Gvar; use Engine\Route; /** * 首页 */ Route::get('index', function () { $dirtyword = X::module('dirtyword')->byCompany(Gvar::audit('company_id')); X::render('audit/index', ['dirtyword' => $dirtyword]); }); /** * 查找 */ Route::get('search', function () { $get = X::request()->get(['search' => '']); $dw = X::module('dirtyword')->search($get->search); X::render('audit/index', ['dirtyword' => $dw]); }); /** * 登录 */ Route::get('signin', function () { X::render('audit/login'); }); Route::post('signin', function () { $post = X::request()->post(['account' => '', 'password' => '']); if (!$post->account || !$post->password) {