diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 6f8138a..4a0e38e 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -21,6 +21,12 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou $routes->post('create', 'UserController::create'); $routes->get('modify/(:num)', 'UserController::modify_form/$1'); $routes->post('modify/(:num)', 'UserController::modify/$1'); + $routes->get('delete/(:num)', 'UserController::delete/$1'); + $routes->get('toggle/(:num)/(:alpha)', 'UserController::toggle/$1/$2'); + $routes->post('batchjob', 'UserController::batcjob'); + $routes->get('roles/(:num)', 'UserController::roles/$1'); + $routes->get('download/(:alpha)', 'UserController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'UserController::download/$1/$2'); }); $routes->group('mapurl', function ($routes) { $routes->get('/', 'MapurlController::index'); @@ -28,6 +34,11 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou $routes->post('create', 'MapurlController::create'); $routes->get('modify/(:num)', 'MapurlController::modify_form/$1'); $routes->post('modify/(:num)', 'MapurlController::modify/$1'); + $routes->get('delete/(:num)', 'MapurlController::delete/$1'); + $routes->get('toggle/(:num)/(:alpha)', 'MapurlController::toggle/$1/$2'); + $routes->post('batchjob', 'MapurlController::batcjob'); + $routes->get('download/(:alpha)', 'MapurlController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'MapurlController::download/$1/$2'); }); $routes->group('cloudflare', ['namespace' => 'App\Controllers\Admin\Cloudflare'], function ($routes) { $routes->cli('/reload', 'CloudflareController::reload'); @@ -36,22 +47,38 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou $routes->get('create', 'AuthController::create_form'); $routes->post('create', 'AuthController::create'); $routes->get('modify/(:num)', 'AuthController::modify_form/$1'); + $routes->get('delete/(:num)', 'AuthController::delete/$1'); $routes->post('modify/(:num)', 'AuthController::modify/$1'); - $routes->post('create', 'AuthController::create'); + $routes->get('toggle/(:num)/(:alpha)', 'AuthController::toggle/$1/$2'); + $routes->post('batchjob', 'AuthController::batcjob'); + $routes->get('download/(:alpha)', 'AuthController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'AuthController::download/$1/$2'); }); $routes->group('account', function ($routes) { $routes->get('/', 'AccountController::index'); $routes->post('create/(:uuid)', 'AccountController::create'); + $routes->get('download/(:alpha)', 'AccountController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'AccountController::download/$1/$2'); }); $routes->group('zone', function ($routes) { $routes->get('/', 'ZoneController::index'); $routes->get('create', 'ZoneController::create_form'); $routes->post('create/(:uuid)', 'ZoneController::create/$1'); + $routes->get('delete/(:uuid)', 'ZoneController::delete/$1'); + $routes->get('toggle/(:uuid)/(:alpha)', 'ZoneController::toggle/$1/$2'); + $routes->post('batchjob', 'ZoneController::batcjob'); + $routes->get('download/(:alpha)', 'ZoneController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'ZoneController::download/$1/$2'); }); $routes->group('record', function ($routes) { $routes->get('/', 'RecordController::index'); $routes->get('create', 'RecordController::create_form'); $routes->post('create/(:uuid)', 'RecordController::create/$1'); + $routes->get('delete/(:uuid)', 'RecordController::delete/$1'); + $routes->get('toggle/(:uuid)/(:alpha)', 'RecordController::toggle/$1/$2'); + $routes->post('batchjob', 'RecordController::batcjob'); + $routes->get('download/(:alpha)', 'RecordController::download/$1'); + $routes->get('download/(:alpha)/(:any)', 'RecordController::download/$1/$2'); }); }); }); diff --git a/app/Controllers/Admin/Cloudflare/AuthController.php b/app/Controllers/Admin/Cloudflare/AuthController.php index 8001617..5e5fba9 100644 --- a/app/Controllers/Admin/Cloudflare/AuthController.php +++ b/app/Controllers/Admin/Cloudflare/AuthController.php @@ -41,48 +41,36 @@ class AuthController extends CloudflareController $this->init('create'); return $this->create_form_procedure(); } - protected function create_process(): void - { - $this->create_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); - parent::create_process(); - $this->entity = $this->getModel()->create(formDatas: $this->formDatas); - } public function create(): RedirectResponse { $this->init(__FUNCTION__); + $this->create_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->create_procedure(); } //수정 - protected function modify_form_process(string $uid): void - { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("해당 정보를 찾을수 없습니다."); - } - parent::modify_form_process($uid); - } public function modify_form(string $uid): RedirectResponse|string { $this->init('modify'); return $this->modify_form_procedure($uid); } - protected function modify_process(string $uid): void - { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("{$uid} 정보를 찾을수 없습니다."); - } - $this->modify_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); - parent::modify_process($uid); - $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); - } public function modify(string $uid): RedirectResponse { $this->init(__FUNCTION__); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->modify_procedure($uid); } + //일괄처리작업 + public function batcjob(): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ['status']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->batcjob_procedure(); + } // 리스트 public function index(): string { diff --git a/app/Controllers/Admin/Cloudflare/RecordController.php b/app/Controllers/Admin/Cloudflare/RecordController.php index a1c2872..af74efb 100644 --- a/app/Controllers/Admin/Cloudflare/RecordController.php +++ b/app/Controllers/Admin/Cloudflare/RecordController.php @@ -86,13 +86,13 @@ class RecordController extends CloudflareController } protected function create_process(): void { + //DB작업도 Socket에서 다 처리하므로 parent::create_process()하면 않됨 + //부모데이터정의 $this->_zone_entity = $this->getZoneModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); - //Record생성 foreach ($this->formDatas['hosts'] as $host) { - $result = $this->getMySocket()->create($host, $this->formDatas['type'], $this->formDatas['content'], $this->formDatas['proxied']); - $formDatas = $this->getMySocket()->getArrayByResult($result); - $entity = $this->getRecordModel()->create($formDatas); - log_message("debug", "Record:{$entity->getTitle()} 작업을 완료하였습니다."); + //Cloudflare 생성 + $entity = $this->getMySocket()->create($host, $this->formDatas['type'], $this->formDatas['content'], $this->formDatas['proxied']); + log_message("debug", "Record:{$entity->getTitle()} 생성 작업을 완료하였습니다."); } } public function create(): RedirectResponse @@ -100,8 +100,6 @@ class RecordController extends CloudflareController $this->init(__FUNCTION__); $this->create_validate($this->action, $this->fields); $this->formDatas = $this->getFormDatas(); - //부모데이터 정의 - $this->_account_entity = $this->getAccountModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); $cnt = 1; foreach ($this->formDatas['hosts'] as $host) { //호스트명 형식확인 @@ -112,7 +110,43 @@ class RecordController extends CloudflareController } return $this->create_procedure(); } - //수정 + //수정 (modify,toggle,batchjob사용) + protected function modify_process(string $uid): void + { + //DB작업도 Socket에서 다 처리하므로 parent::modify_process($uid)하면 않됨 + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + //부모데이터정의 + $this->_zone_entity = $this->getZoneModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); + //Cloudflare 수정 + $entity = $this->getMySocket()->modify($this->entity, $this->formDatas); + log_message("debug", "Record:{$entity->getTitle()} 수정 작업을 완료하였습니다."); + } + //일괄처리작업 + public function batcjob(): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ['proxied']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->batcjob_procedure(); + } + //삭제 + protected function delete_process(string $uid): void + { + //DB작업도 Socket에서 다 처리하므로 parent::delete_process($uid)하면 않됨 + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + //부모데이터정의 + $this->_zone_entity = $this->getZoneModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); + //Cloudflare 삭제 + $this->getMySocket()->delete($this->entity); + } // 리스트 public function index(): string { diff --git a/app/Controllers/Admin/Cloudflare/ZoneController.php b/app/Controllers/Admin/Cloudflare/ZoneController.php index 86c7749..db70730 100644 --- a/app/Controllers/Admin/Cloudflare/ZoneController.php +++ b/app/Controllers/Admin/Cloudflare/ZoneController.php @@ -99,7 +99,7 @@ class ZoneController extends CloudflareController } protected function create_process(): void { - parent::create_process(); + //DB작업도 Socket에서 다 처리하므로 parent::create_process()하면 않됨 //Zone생성 $cnt = 1; $zone_entitys = []; @@ -153,6 +153,43 @@ class ZoneController extends CloudflareController } return $this->create_procedure(); } + //수정 (modify,toggle,batchjob사용) + protected function modify_process(string $uid): void + { + //DB작업도 Socket에서 다 처리하므로 parent::modify_process($uid)하면 않됨 + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + //부모데이터정의 + $this->_account_entity = $this->getAccountModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); + //Cloudflare 수정 + $entity = $this->getMySocket()->modify($this->entity, $this->formDatas); + log_message("debug", "Record:{$entity->getTitle()} 수정 작업을 완료하였습니다."); + } + //일괄처리작업 + public function batcjob(): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ['development_mode', 'ipv6', 'security_level']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->batcjob_procedure(); + } + //삭제 + protected function delete_process(string $uid): void + { + //DB작업도 Socket에서 다 처리하므로 parent::delete_process($uid)하면 않됨 + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + //부모데이터정의 + $this->_account_entity = $this->getAccountModel()->getEntityByPK($this->formDatas[$this->getModel()::PARENT]); + //Cloudflare 삭제 + $this->getMySocket()->delete($this->entity); + } // 리스트 public function index(): string { diff --git a/app/Controllers/Admin/MapurlController.php b/app/Controllers/Admin/MapurlController.php index 1a6768a..1b4ef00 100644 --- a/app/Controllers/Admin/MapurlController.php +++ b/app/Controllers/Admin/MapurlController.php @@ -89,48 +89,51 @@ class MapurlController extends AdminController } protected function create_process(): void { - $this->create_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); parent::create_process(); - $this->entity = $this->getModel()->create(formDatas: $this->formDatas); $this->remaping_process(); } public function create(): RedirectResponse { $this->init(__FUNCTION__); + $this->create_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->create_procedure(); } //수정 - protected function modify_form_process(string $uid): void - { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("해당 정보를 찾을수 없습니다."); - } - parent::modify_form_process($uid); - } public function modify_form(string $uid): RedirectResponse|string { $this->init('modify'); return $this->modify_form_procedure($uid); } + //(modify,toggle,batchjob사용) protected function modify_process(string $uid): void { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("{$uid} 정보를 찾을수 없습니다."); - } - $this->modify_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); parent::modify_process($uid); - $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); $this->remaping_process(); } public function modify(string $uid): RedirectResponse { $this->init(__FUNCTION__); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->modify_procedure($uid); } + //일괄처리작업 + public function batcjob(): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ['status']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->batcjob_procedure(); + } + //삭제 + protected function delete_process(string $uid): void + { + parent::delete_process($uid); + $this->remaping_process(); + } // 리스트 public function index(): string { diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index adf9831..876d3e8 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -3,8 +3,9 @@ namespace App\Controllers\Admin; use App\Models\UserModel; -use CodeIgniter\HTTP\RedirectResponse; +use CodeIgniter\HTTP\DownloadResponse; +use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; @@ -39,6 +40,20 @@ class UserController extends AdminController protected function getFormData(string $field, array $formDatas): array { switch ($field) { + case 'role': + $roles = $this->request->getVar($field . "[]"); + if (!count($roles)) { + throw new \Exception("권한이 지정되지 않았습니다."); + } + $formDatas[$field] = implode(DEFAULTS["DELIMITER_ROLE"],); + break; + case 'roles[]': + $roles = $this->request->getVar($field); + if (!count($roles)) { + throw new \Exception("권한이 지정되지 않았습니다."); + } + $formDatas['role'] = implode(DEFAULTS["DELIMITER_ROLE"],); + break; default: $formDatas = parent::getFormData($field, $formDatas); break; @@ -59,46 +74,43 @@ class UserController extends AdminController $this->init('create'); return $this->create_form_procedure(); } - protected function create_process(): void - { - $this->create_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); - parent::create_process(); - $this->entity = $this->getModel()->create(formDatas: $this->formDatas); - } public function create(): RedirectResponse { $this->init(__FUNCTION__); + $this->create_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->create_procedure(); } //수정 - protected function modify_form_process(string $uid): void - { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("해당 정보를 찾을수 없습니다."); - } - parent::modify_form_process($uid); - } public function modify_form(string $uid): RedirectResponse|string { $this->init('modify'); return $this->modify_form_procedure($uid); } - protected function modify_process(string $uid): void - { - $this->entity = $this->getModel()->getEntityByPK(intval($uid)); - if ($this->entity === null) { - throw new \Exception("{$uid} 정보를 찾을수 없습니다."); - } - $this->modify_validate($this->action, $this->fields); - $this->formDatas = $this->getFormDatas(); - parent::modify_process($uid); - $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); - } public function modify(string $uid): RedirectResponse { $this->init(__FUNCTION__); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->modify_procedure($uid); + } + //일괄작업 + public function batcjob(): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ['status']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->batcjob_procedure(); + } + //Role변경작업 + public function roles(string $uid): RedirectResponse + { + $this->action = __FUNCTION__; + $this->fields = ["roles[]"]; + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); return $this->modify_procedure($uid); } // 리스트 @@ -109,7 +121,18 @@ class UserController extends AdminController $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->filter_fields = ['role', 'status']; $this->field_options = $this->getFormFieldOptions($this->filter_fields); - $this->batchjob_fields = ['role', 'status']; + $this->batchjob_fields = ['status']; return $this->list_procedure(); } + // Download + public function download(string $output_type, $uid = false): DownloadResponse|string + { + $this->action = __FUNCTION__; + $this->fields = ['id', $this->getModel()::TITLE, 'email', 'mobile', 'role', 'status']; + $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); + $this->filter_fields = ['role', 'status']; + $this->field_options = $this->getFormFieldOptions($this->filter_fields); + $this->batchjob_fields = ['status']; + return $this->download_procedure($output_type, $uid); + } } diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php index 02f34b8..f9dec40 100644 --- a/app/Controllers/MVController.php +++ b/app/Controllers/MVController.php @@ -6,6 +6,9 @@ use CodeIgniter\HTTP\DownloadResponse; use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; +use PhpOffice\PhpSpreadsheet\IOFactory; +use PhpOffice\PhpSpreadsheet\Reader\Html; +use PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf; use Psr\Log\LoggerInterface; abstract class MVController extends CommonController @@ -85,7 +88,10 @@ abstract class MVController extends CommonController return redirect()->to($this->session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with(SESSION_NAMES['RETURN_MSG'], $e->getMessage()); } } - protected function create_process(): void {} + protected function create_process(): void + { + $this->entity = $this->getModel()->create(formDatas: $this->formDatas); + } final protected function create_procedure(): RedirectResponse { //Transaction Start @@ -118,7 +124,13 @@ abstract class MVController extends CommonController )); } } - protected function modify_form_process(string $uid): void {} + protected function modify_form_process(string $uid): void + { + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("해당 정보를 찾을수 없습니다."); + } + } final protected function modify_form_procedure(string $uid): RedirectResponse|string { try { @@ -135,7 +147,14 @@ abstract class MVController extends CommonController return redirect()->to($this->session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with(SESSION_NAMES['RETURN_MSG'], $e->getMessage()); } } - protected function modify_process(string $uid): void {} + protected function modify_process(string $uid): void + { + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); + } final protected function modify_procedure(string $uid): RedirectResponse { //Transaction Start @@ -155,6 +174,76 @@ abstract class MVController extends CommonController return redirect()->back()->withInput(); } } + //단일필드작업 + final public function toggle(string $field, string $uid): RedirectResponse + { + $this->action = __FUNCTION__; + $this->field = [$field]; + $this->modify_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + return $this->modify_procedure($uid); + } + //일괄처리작업 + protected function batcjob_process(): void + { + //변경할 UIDS + $uids = $this->request->getVar('batchjob_uids[]'); + if (!count($uids)) { + throw new \Exception("지정된 정보가 없습니다."); + } + $this->entitys = []; + foreach ($uids as $uid) { + $this->modify_process($uid); + $this->entitys = $this->entity; + } + } + final protected function batcjob_procedure(): RedirectResponse + { + //Transaction Start + $this->getModel()->transStart(); + try { + $this->batcjob_process(); + log_message("notice", __FUNCTION__ . "=> 작업을 완료하였습니다."); + $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], __FUNCTION__ . " => 작업을 완료하였습니다.\n"); + $this->getModel()->transCommit(); + return redirect()->to($this->session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/"); + } catch (\Exception $e) { + //Transaction Rollback + $this->getModel()->transRollback(); + log_message("error", $e->getMessage()); + $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + $this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']); + return redirect()->back()->withInput(); + } + } + //삭제 + protected function delete_process(string $uid): void + { + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + $this->entity = $this->getModel()->delete($this->entity->getPK()); + } + final public function delete(string $uid): RedirectResponse + { + //Transaction Start + $this->getModel()->transStart(); + try { + $this->delete_process($uid); + log_message("notice", __FUNCTION__ . "=> 작업을 완료하였습니다."); + $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], __FUNCTION__ . " => 작업을 완료하였습니다.\n"); + $this->getModel()->transCommit(); + return redirect()->to($this->session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/"); + } catch (\Exception $e) { + //Transaction Rollback + $this->getModel()->transRollback(); + log_message("error", $e->getMessage()); + $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage()); + $this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']); + return redirect()->back()->withInput(); + } + } // 리스트 private function list_condition_process(): void { @@ -262,12 +351,12 @@ abstract class MVController extends CommonController switch ($document_type) { case 'excel': $file_name = sprintf("%s_%s.xlsx", $this->class_name, date('Y-m-d_Hm')); - $writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($loaded_data, 'Xlsx'); + $writer = IOFactory::createWriter($loaded_data, 'Xlsx'); $writer->save($full_path . DIRECTORY_SEPARATOR . $file_name); break; case 'pdf': $file_name = sprintf("%s_%s.pdf", $this->class_name, date('Y-m-d_Hm')); - $writer = new \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf($loaded_data); + $writer = new Mpdf($loaded_data); $writer->save($full_path . DIRECTORY_SEPARATOR . $file_name); break; default: @@ -287,30 +376,43 @@ abstract class MVController extends CommonController return array($full_path, $file_name); } //File Download관련 - final public function download_procedure(string $output_type, mixed $entity = null): DownloadResponse|RedirectResponse + final protected function download_procedure(string $output_type, $uid = false): DownloadResponse|string { try { + helper(['form']); + //URL처리 + $this->uri = $this->request->getUri(); switch ($output_type) { case 'excel': case 'pdf': - //data loading - $reader = new \PhpOffice\PhpSpreadsheet\Reader\Html(); // string buffer에서 읽어오는 경우 $this->entitys = $this->list_entitys_process(); - $loaded_data = $reader->loadFromString(view( - strtolower($this->class_path) . DIRECTORY_SEPARATOR . $output_type, + $html = view( + strtolower($this->class_path) . DIRECTORY_SEPARATOR . $this->action, ['viewDatas' => $this->getViewDatas()] - )); + ); + //data loading + $reader = new Html(); + $loaded_data = $reader->loadFromString($html); list($full_path, $file_name) = $this->output_save_process($output_type, $loaded_data); + $full_path .= DIRECTORY_SEPARATOR . $file_name; break; default: - list($file_name, $uploaded_filename) = $entity->getDownlaodFile(); + if (!$uid) { + throw new \Exception("{$output_type}은 반드시 uid의 값이 필요합니다."); + } + $this->entity = $this->getModel()->getEntityByPK(intval($uid)); + if ($this->entity === null) { + throw new \Exception("{$uid} 정보를 찾을수 없습니다."); + } + list($file_name, $uploaded_filename) = $this->entity->getDownlaodFile(); $full_path = WRITEPATH . DIRECTORY_SEPARATOR . "uploads" . DIRECTORY_SEPARATOR . $uploaded_filename; break; } return $this->response->download($full_path, null)->setFileName($file_name); } catch (\Exception $e) { - return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with('return_message', $e->getMessage()); + log_message("error", $e->getMessage()); + return alert_CommonHelper($e->getMessage(), "back"); } } } diff --git a/app/Helpers/Admin/Cloudflare/Account_helper.php b/app/Helpers/Admin/Cloudflare/Account_helper.php index 7979c95..e3c8f05 100644 --- a/app/Helpers/Admin/Cloudflare/Account_helper.php +++ b/app/Helpers/Admin/Cloudflare/Account_helper.php @@ -34,7 +34,7 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData // return implode(" ", $checkboxs); break; case AccountModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)test@exmaple.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, ["placeholder" => "예)test@exmaple.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); break; case 'type': case 'status': @@ -48,7 +48,7 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; @@ -69,7 +69,7 @@ function getFieldView_AccountHelper(string $field, AccountEntity $entity, array "class" => "btn btn-sm btn-primary btn-circle", "target" => "_self" ] - ) . " " . + ) . " " . preg_replace("/(\w+)@(.+)/", "$1", $viewDatas['field_options'][$field][$value]) . ""; } @@ -106,16 +106,16 @@ function getFieldView_AccountHelper(string $field, AccountEntity $entity, array $value = $value ? date("Y-m-d", strtotime($value)) : ""; break; default: - // if (in_array($field, $viewDatas['filter_fields']) && $value) { - // $extras["onChange"] = sprintf( - // 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', - // current_url(), - // $entity->getPK(), - // $field, - // $field - // ); - // $value = getFieldForm_AccountHelper($field, $entity->$field, $viewDatas, $extras); - // } + if (in_array($field, $viewDatas['filter_fields']) && $value) { + $extras["onChange"] = sprintf( + 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', + current_url(), + $entity->getPK(), + $field, + $field + ); + $value = getFieldForm_AccountHelper($field, $entity->$field, $viewDatas, $extras); + } break; } return $value; diff --git a/app/Helpers/Admin/Cloudflare/Auth_helper.php b/app/Helpers/Admin/Cloudflare/Auth_helper.php index 7949ed0..6808eda 100644 --- a/app/Helpers/Admin/Cloudflare/Auth_helper.php +++ b/app/Helpers/Admin/Cloudflare/Auth_helper.php @@ -20,7 +20,7 @@ function getFieldForm_AuthHelper(string $field, mixed $value, array $viewDatas, $value = $value ?: DEFAULTS['EMPTY']; switch ($field) { case AuthModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); break; case 'status': $form = form_dropdown($field, [ @@ -33,7 +33,7 @@ function getFieldForm_AuthHelper(string $field, mixed $value, array $viewDatas, $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; diff --git a/app/Helpers/Admin/Cloudflare/Record_helper.php b/app/Helpers/Admin/Cloudflare/Record_helper.php index b54e0d9..2828a3c 100644 --- a/app/Helpers/Admin/Cloudflare/Record_helper.php +++ b/app/Helpers/Admin/Cloudflare/Record_helper.php @@ -57,7 +57,7 @@ function getFieldForm_RecordHelper(string $field, mixed $value, array $viewDatas $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; @@ -106,10 +106,11 @@ function getFieldView_RecordHelper(string $field, RecordEntity $entity, array $v default: if (in_array($field, $viewDatas['filter_fields']) && $value) { $extras["onChange"] = sprintf( - 'location.href="%s/toggle/%s?%s="+this.options[this.selectedIndex].value', + 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value', current_url(), $entity->getPK(), $field, + $field ); $value = getFieldForm_RecordHelper($field, $entity->$field, $viewDatas, $extras); } diff --git a/app/Helpers/Admin/Cloudflare/Zone_helper.php b/app/Helpers/Admin/Cloudflare/Zone_helper.php index f0bf90c..c30c9b9 100644 --- a/app/Helpers/Admin/Cloudflare/Zone_helper.php +++ b/app/Helpers/Admin/Cloudflare/Zone_helper.php @@ -34,7 +34,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas, // return implode(" ", $checkboxs); break; case ZoneModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)exmaple.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, ["placeholder" => "예)exmaple.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); break; case 'domains': $form = form_textarea($field, $value, ['class' => 'editor', 'rows' => '5']); @@ -66,7 +66,7 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas, $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; diff --git a/app/Helpers/Admin/Mapurl_helper.php b/app/Helpers/Admin/Mapurl_helper.php index 07416b0..bba1322 100644 --- a/app/Helpers/Admin/Mapurl_helper.php +++ b/app/Helpers/Admin/Mapurl_helper.php @@ -36,7 +36,7 @@ function getFieldForm_MapurlHelper(string $field, mixed $value, array $viewDatas $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; diff --git a/app/Helpers/Admin/User_helper.php b/app/Helpers/Admin/User_helper.php index b73e74f..c37d64c 100644 --- a/app/Helpers/Admin/User_helper.php +++ b/app/Helpers/Admin/User_helper.php @@ -20,21 +20,44 @@ function getFieldForm_UserHelper(string $field, mixed $value, array $viewDatas, $value = $value ?: DEFAULTS['EMPTY']; switch ($field) { case UserModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, ["placeholder" => "예)", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); break; case 'role': + if (in_array($viewDatas['action'], ['create', 'modify'])) { + $forms = []; + foreach ($viewDatas['field_options'][$field] as $key => $label) { + $roles = explode(DEFAULTS["DELIMITER_ROLE"], $value); + $forms[] = form_checkbox("{$field}[]", $value, in_array($key, $roles)) . $label; + } + $form = implode(" ", $forms); + } else { + $form = form_dropdown($field, [ + "" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택', + ...$viewDatas['field_options'][$field] + ], $value, $extras); + } + break; case 'status': $form = form_dropdown($field, [ "" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택', ...$viewDatas['field_options'][$field] ], $value, $extras); break; + case 'passwd': + $form = form_password($field, "", ["style" => "width:100%;"]); + break; + case 'email': + $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + break; + case 'mobile': + $form = form_input($field, $value, ["placeholder" => "예)010-0010-0010", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + break; case 'updated_at': case 'created_at': $form = form_input($field, $value, ['class' => 'calender']); break; default: - $form = form_input($field, $value, ["style" => "width:60%;"]); + $form = form_input($field, $value, ["style" => "width:100%;"]); break; } return $form; @@ -54,9 +77,13 @@ function getFieldView_UserHelper(string $field, UserEntity $entity, array $viewD break; case 'role': foreach ($viewDatas['field_options'][$field] as $key => $label) { - $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label; + $roles = explode(DEFAULTS["DELIMITER_ROLE"], $value); + $checkboxs[] = form_checkbox("roles[]", $key, in_array($key, $roles)) . $label; } - $value = implode(" ", $checkboxs); + $checkbox_form = implode(" ", $checkboxs); + $checkbox_form .= form_submit("", '권한처리', ["formaction" => current_url() . "/roles/{$entity->getPK()}", "class" => "btn btn-outline-primary"]); + $checkbox_form .= form_close(); + $value = $checkbox_form; break; case 'updated_at': case 'created_at': diff --git a/app/Language/en/Admin/User.php b/app/Language/en/Admin/User.php index d604e89..c4b5230 100644 --- a/app/Language/en/Admin/User.php +++ b/app/Language/en/Admin/User.php @@ -16,8 +16,8 @@ return [ ], "ROLE" => [ "guest" => "비회원", - "user" => "회원", - "vip" => "회원", + "user" => "일반회원", + "vip" => "VIP회원", "manager" => "관리자", "cloudflare" => "Cloudflare관리자", "director" => "감독자", diff --git a/app/Libraries/MySocket/Cloudflare/RecordSocket.php b/app/Libraries/MySocket/Cloudflare/RecordSocket.php index a242fc9..f61faf1 100644 --- a/app/Libraries/MySocket/Cloudflare/RecordSocket.php +++ b/app/Libraries/MySocket/Cloudflare/RecordSocket.php @@ -64,6 +64,7 @@ class RecordSocket extends CloudflareSocket if (!$cf->success) { throw new \Exception("Record:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); } + //DB생성 $formDatas = $this->getArrayByResult($cf->result); return $this->getModel()->create($formDatas); } @@ -77,7 +78,6 @@ class RecordSocket extends CloudflareSocket 'proxied' => $entity->proxied == 'on' ? true : false, 'ttl' => intval($entity->ttl), ]; - //변경작업: 2024-08-09 if (isset($formDatas['proxied']) && $formDatas['proxied'] === 'on') { $datas['proxied'] = true; $datas['ttl'] = 1; @@ -90,8 +90,9 @@ class RecordSocket extends CloudflareSocket if (!$cf->success) { throw new \Exception("Record:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); } - log_message("notice", "Record:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); - return $entity; + //DB수정 + $formDatas = $this->getArrayByResult($cf->result); + return $this->getModel()->modify($entity, $formDatas); } public function delete(RecordEntity $entity): void { @@ -100,11 +101,13 @@ class RecordSocket extends CloudflareSocket if (!$cf->success) { throw new \Exception("Record:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); } - log_message("notice", "Record:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); + //DB삭제 + $this->getModel()->where(RecordModel::PK, $entity->getPK()); + $this->getModel()->delete(); } public function sync(RecordEntity $entity): void { - //Sync형태 + //기존 Sync형태 // $cf = $this->getClient()->get("zones/{$this->_zone_entity->getPK()}/dns_records/" . $entity->getPK()); // $cf = json_decode($cf->getBody()); // if (!$cf->success) { @@ -116,6 +119,7 @@ class RecordSocket extends CloudflareSocket $promise->then( onFulfilled: function ($response) use ($entity): RecordEntity { $record = json_decode($response->getBody(), true)['result']; + //DB수정 return $this->getModel()->modify($entity, $this->getArrayByResult($record)); }, onRejected: function ($error) { @@ -131,12 +135,13 @@ class RecordSocket extends CloudflareSocket log_message("notice", "-----{$this->_zone_entity->getTitle()} 처리 시작-----"); $entity_uids = []; $results = $this->reload_procedure("zones/{$this->_zone_entity->getPK()}/dns_records"); + //DB수정 foreach ($results as $result) { $formDatas = $this->getArrayByResult($result); $entity = $this->getModel()->modify($this->getModel()->getEntity(), $formDatas); $entity_uids[] = $entity->getPK(); } - //부모키를 기준으로 CF에 존재하지 않는 데이터 삭제용 + //부모키를 기준으로 CF에 존재하지 않는 데이터 DB삭제 $this->getModel()->where(RecordModel::PARENT, $this->_zone_entity); $this->getModel()->whereNotIn(RecordModel::PK, $entity_uids); $this->getModel()->delete(); diff --git a/app/Libraries/MySocket/Cloudflare/ZoneSocket.php b/app/Libraries/MySocket/Cloudflare/ZoneSocket.php index ed169f7..9aec10c 100644 --- a/app/Libraries/MySocket/Cloudflare/ZoneSocket.php +++ b/app/Libraries/MySocket/Cloudflare/ZoneSocket.php @@ -88,8 +88,7 @@ class ZoneSocket extends CloudflareSocket throw new \Exception("Zone:" . __FUNCTION__ . "에서 {$field}->{$value} 변경실패:\n" . var_export($cf, true)); } //최종 결과값은 body->result->id='필드명',body->result->value='on/off'이런식으로 받음 - $entity->$field = $cf->result->value; - return $entity; + return $cf->result->value; } public function create(string $domain, bool $jump_start = false): ZoneEntity { @@ -104,23 +103,27 @@ class ZoneSocket extends CloudflareSocket if (!$cf->success) { throw new \Exception("Zone:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); } - //Storage용 + //DB생성 $formDatas = $this->getArrayByResult($cf->result); $entity = $this->getModel()->create($formDatas); - //아래는 추가 셋팅 ipv6 TurnOFF , //Development mode TurnOFF - $entity = $this->setCFSetting($entity, 'ipv6', 'off'); - $entity = $this->setCFSetting($entity, 'development_mode', 'off'); - $entity = $this->setCFSetting($entity, 'security_level', 'medium'); - return $entity; + + //초기화값 추가셋팅 ipv6 , development_mode , security_level + $formDatas = []; + $formDatas['ipv6'] = $this->setCFSetting($entity, 'ipv6', 'off'); + $formDatas['development_mode'] = $this->setCFSetting($entity, 'development_mode', 'off'); + $formDatas['security_level'] = $this->setCFSetting($entity, 'security_level', 'medium'); + //DB수정 + return $this->getModel()->modify($entity, $formDatas); } public function modify(ZoneEntity $entity, array $formDatas): ZoneEntity { - //ipv6 , //development_mode , //security_level + //modify,toggle,batchjob 사용 셋팅 ipv6 , //development_mode , //security_level + $formDatas = []; foreach ($formDatas as $field => $value) { - $entity = $this->setCFSetting($entity, $field, $value); + $formDatas[$field] = $this->setCFSetting($entity, $field, $value); } - log_message("notice", "Zone:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); - return $entity; + //DB수정 + return $this->getModel()->modify($entity, $formDatas); } public function delete(ZoneEntity $entity): void { @@ -129,17 +132,34 @@ class ZoneSocket extends CloudflareSocket if (!$cf->success) { throw new \Exception("Zone:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); } - log_message("notice", "Zone:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); + //DB삭제 + $this->getModel()->where(ZoneModel::PK, $entity->getPK()); + $this->getModel()->delete(); } - public function sync(ZoneEntity $entity): ZoneEntity + public function sync(ZoneEntity $entity): void { - $cf = $this->getClient()->get('zones/' . $entity->getPK()); - $cf = json_decode($cf->getBody()); - if (!$cf->success) { - throw new \Exception("Zone:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); - } - log_message("notice", "Zone:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); - return new ZoneEntity($this->getArrayByResult($cf->result)); + //기존 Sync형태 + // $cf = $this->getClient()->get('zones/' . $entity->getPK()); + // $cf = json_decode($cf->getBody()); + // if (!$cf->success) { + // throw new \Exception("Zone:" . __FUNCTION__ . "에서 실패:\n" . var_export($cf, true)); + // } + // log_message("notice", "Zone:" . __FUNCTION__ . "=> 작업을 완료하였습니다."); + // return new ZoneEntity($this->getArrayByResult($cf->result)); + //Async형태 + $promise = $this->getClient()->getAsync("zones/{$entity->getPK()}"); + $promise->then( + onFulfilled: function ($response) use ($entity): ZoneEntity { + $record = json_decode($response->getBody(), true)['result']; + //DB수정 + return $this->getModel()->modify($entity, $this->getArrayByResult($record)); + }, + onRejected: function ($error) { + log_message('error', 'Failed to fetch DNS records: ' . $error->getMessage()); + // throw new \Exception('Failed to fetch DNS records: ' . $error->getMessage()); + } + ); + $promise->wait(); } //Reload public function reload(): void diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php index 0e59c20..395d396 100644 --- a/app/Models/UserModel.php +++ b/app/Models/UserModel.php @@ -49,6 +49,10 @@ class UserModel extends CommonModel //아래 Rule은 checkbox를 사용시에는 required만 우선 써야 수정시 validate문제없음 $rules[$field] = "required|trim|string"; break; + case "role[]": + case "roles[]": + $rules[$field] = "if_exist|trim|string"; + break; case "passwd": default: $rules = parent::getFieldRule($action, $field, $rules); @@ -73,7 +77,6 @@ class UserModel extends CommonModel { return $this->create_process(new UserEntity(), $formDatas); } - //modify용 public function modify(UserEntity $entity, array $formDatas): UserEntity { diff --git a/app/Views/admin/cloudflare/account/index.php b/app/Views/admin/cloudflare/account/index.php index 1b3c3a1..eb90a02 100644 --- a/app/Views/admin/cloudflare/account/index.php +++ b/app/Views/admin/cloudflare/account/index.php @@ -3,7 +3,6 @@ include('templates/' . $viewDatas['layout'] . '/index_top'); ?> - @@ -30,5 +29,4 @@
- endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/cloudflare/auth/index.php b/app/Views/admin/cloudflare/auth/index.php index 38d1c7a..9c53ea9 100644 --- a/app/Views/admin/cloudflare/auth/index.php +++ b/app/Views/admin/cloudflare/auth/index.php @@ -3,7 +3,7 @@ include('templates/' . $viewDatas['layout'] . '/index_top'); ?> - + @@ -35,17 +35,17 @@
-
+
include('templates/' . $viewDatas['layout'] . '/modalform'); ?> endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/cloudflare/record/index.php b/app/Views/admin/cloudflare/record/index.php index e7f43e8..cd0342f 100644 --- a/app/Views/admin/cloudflare/record/index.php +++ b/app/Views/admin/cloudflare/record/index.php @@ -3,7 +3,7 @@ include('templates/' . $viewDatas['layout'] . '/index_top'); ?> - + @@ -37,17 +37,17 @@
-
+
include('templates/' . $viewDatas['layout'] . '/modalform'); ?> endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/cloudflare/zone/index.php b/app/Views/admin/cloudflare/zone/index.php index 9881026..6360e9d 100644 --- a/app/Views/admin/cloudflare/zone/index.php +++ b/app/Views/admin/cloudflare/zone/index.php @@ -3,7 +3,7 @@ include('templates/' . $viewDatas['layout'] . '/index_top'); ?> - + @@ -35,17 +35,17 @@
-
+
include('templates/' . $viewDatas['layout'] . '/modalform'); ?> endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/mapurl/index.php b/app/Views/admin/mapurl/index.php index 0b3c142..8ec44ef 100644 --- a/app/Views/admin/mapurl/index.php +++ b/app/Views/admin/mapurl/index.php @@ -2,7 +2,7 @@ section('content') ?> - + include('templates/' . $viewDatas['layout'] . '/index_top'); ?> @@ -35,17 +35,17 @@
-
+
include('templates/' . $viewDatas['layout'] . '/modalform'); ?> endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/user/download.php b/app/Views/admin/user/download.php new file mode 100644 index 0000000..3c52984 --- /dev/null +++ b/app/Views/admin/user/download.php @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +
$field ?>
\ No newline at end of file diff --git a/app/Views/admin/user/index.php b/app/Views/admin/user/index.php index 4f5f9bf..2df1912 100644 --- a/app/Views/admin/user/index.php +++ b/app/Views/admin/user/index.php @@ -3,7 +3,7 @@ include('templates/' . $viewDatas['layout'] . '/index_top'); ?> - + @@ -35,17 +35,17 @@
-
+
include('templates/' . $viewDatas['layout'] . '/modalform'); ?> endSection() ?> \ No newline at end of file diff --git a/app/Views/templates/admin/index_top.php b/app/Views/templates/admin/index_top.php index b053e9d..07de259 100644 --- a/app/Views/templates/admin/index_top.php +++ b/app/Views/templates/admin/index_top.php @@ -12,8 +12,7 @@ 검색어: 검색일: "calender"]) ?> "calender"]) ?> - getQuery(), ICONS['EXCEL'], ["target" => "_self", "class" => "excel"]) ?> - getQuery(), ICONS['PDF'], ["target" => "_self", "class" => "pdf"]) ?> + "_self", "class" => "excel"]) ?>