diff --git a/app/Config/Constants.php b/app/Config/Constants.php index e61d568..f1a411b 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -35,11 +35,11 @@ defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload. */ defined('SECOND') || define('SECOND', 1); defined('MINUTE') || define('MINUTE', 60); -defined('HOUR') || define('HOUR', 3600); -defined('DAY') || define('DAY', 86400); -defined('WEEK') || define('WEEK', 604800); -defined('MONTH') || define('MONTH', 2_592_000); -defined('YEAR') || define('YEAR', 31_536_000); +defined('HOUR') || define('HOUR', 3600); +defined('DAY') || define('DAY', 86400); +defined('WEEK') || define('WEEK', 604800); +defined('MONTH') || define('MONTH', 2_592_000); +defined('YEAR') || define('YEAR', 31_536_000); defined('DECADE') || define('DECADE', 315_360_000); /* @@ -67,25 +67,25 @@ defined('DECADE') || define('DECADE', 315_360_000); | http://tldp.org/LDP/abs/html/exitcodes.html | */ -defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors -defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error -defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error -defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found -defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class +defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors +defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error +defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error +defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found +defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member -defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input -defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error -defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code -defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code +defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input +defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error +defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code +defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code define('MESSAGES', [ 'CREATED' => '생성되었습니다.', 'UPDATED' => '수정되였습니다.', 'DELETED' => '삭제되였습니다.', - 'SUCCESS' => '작업이 성공적으로 완료되었습니다.', - 'FAILED' => '작업이 실패하였습니다.', + 'SUCCESS' => '작업이 성공적으로 완료되었습니다.', + 'FAILED' => '작업이 실패하였습니다.', 'NOT_FOUND' => '데이터가 존재하지 않습니다.', - 'NOT_AUTH' => '권한이 없습니다.', + 'NOT_AUTH' => '권한이 없습니다.', 'NOT_LOGIN' => '로그인이 필요합니다.', 'NOT_MATCH' => '데이터가 일치하지 않습니다.', 'NOT_EMPTY' => '데이터가 비어있습니다.', @@ -121,258 +121,161 @@ define('SESSION_NAMES', [ define("MESSENGERS", [ "skype" => [ "url" => "//join.skype.com/invite/uKUgXfZThSQC", - "icon" => '스카이프', + "icon" => 'SKYPE', "id" => '', ], "discord" => [ "url" => "//discord.gg/k6nQg84N", - "icon" => '디스코드', + "icon" => 'DISCORD', "id" => '', ], "telegram" => [ "url" => "//t.me/daemonidc", - "icon" => '텔레그램', + "icon" => 'TELEGRAM', "id" => '@daemonidc', ], "kakaotalk" => [ "url" => "//t.me/daemonidc", - "icon" => '카카오톡', + "icon" => 'KAKAO', "id" => '', ], ]); //아이콘 및 Sound관련 define('ICONS', [ - 'ADD' => '', - 'LOGO' => '', - 'EXCEL' => '', - 'PDF' => '', - 'GOOGLE' => 'Google', - 'MEMBER' => '', - 'LOGIN' => '', - 'LOGOUT' => '', - 'HOME' => '', - 'MENU' => '', - 'NEW' => '', - 'REPLY' => '', - 'DATABASE' => '', - 'DISLIKE' => '', - 'LIKE' => '', - 'DOWNLOAD' => '', - 'UPLOAD' => '', - 'COPY' => '', - 'PASTE' => '', - 'EDIT' => '', - 'VIEW' => '', - 'VIEW_OFF' => '', - 'PRINT' => '', - 'SAVE' => '', - 'CANCEL' => '', - 'CLOSE' => '', - 'CLIENT' => '', - 'CHART' => '', - 'CHECK' => '', - 'CHECK_OFF' => '', - 'CHECK_ON' => '', - 'CHECK_ALL' => '', - 'CHECK_NONE' => '', - 'CHECK_SOME' => '', - 'COUPON' => '', - 'HISTORY' => '', - 'MODIFY' => '', - 'MODIFY_ALL' => '', - 'BATCHJOB' => '', - 'DELETE' => '', - 'REBOOT' => '🔄', - 'RELOAD' => '', - 'SETUP' => '', - 'FLAG' => '', - 'SEARCH' => '', - 'PLAY' => '', - 'CART' => '', - 'CARD' => '', - 'DEPOSIT' => '', - 'DESKTOP' => '', - 'DEVICE' => '', - 'UP' => '', - 'DOWN' => '', - 'LEFT' => '', - 'RIGHT' => '', - 'IMAGE_FILE' => '', - 'CLOUD' => '', - 'SIGNPOST' => '', - 'LOCK' => '', - 'UNLOCK' => '', - 'BOX' => '', - 'BOXS' => '', - 'ONETIME' => '', - 'MONTH' => '', - 'EMAIL' => '', - 'MAIL' => '', - 'PHONE' => '', - 'POINT' => '', - 'ALRAM' => '', - 'PAYMENT' => '', - 'LINK' => '', - 'SALE_UP' => '', - 'SALE_DOWN' => '', - 'SERVICE' => '', - 'SERVICE_ITEM' => '', - 'SERVICE_ITEM_LINE' => '', - 'SERVICE_ITEM_IP' => '', - 'SERVICE_ITEM_SERVER' => '', - 'SERVICE_ITEM_CPU' => '', - 'SERVICE_ITEM_RAM' => '', - 'SERVICE_ITEM_STORAGE' => '', - 'SERVICE_ITEM_SOFTWARE' => '', - 'SERVICE_ITEM_DEFENCE' => '', - 'SERVICE_ITEM_DOMAIN' => '', - 'SERVICE_ITEM_OTHER' => '', - 'SERVER_ITEM_CPU' => '', - 'SERVER_ITEM_RAM' => '', - 'SERVER_ITEM_DISK' => '', - 'SERVER_ITEM_SWITCH' => '', - 'SERVER_ITEM_OS' => '', - 'SERVER_ITEM_DB' => '', - 'SERVER_ITEM_SOFTWARE' => '', - 'SERVER_ITEM_IP' => '', - 'SERVER_ITEM_CS' => '', - 'SERVER_ITEM_ETC' => '', + 'ADD' => 'ADD', + 'LOGO' => 'LOGO', + 'EXCEL' => 'EXCEL', + 'PDF' => 'PDF', + 'GOOGLE' => 'GOOGLE', + 'MEMBER' => 'MEMBER', + 'LOGIN' => 'LOGIN', + 'LOGOUT' => 'LOGOUT', + 'HOME' => 'HOME', + 'MENU' => 'MENU', + 'NEW' => 'NEW', + 'REPLY' => 'REPLY', + 'DATABASE' => 'DATABASE', + 'DISLIKE' => 'DISLIKE', + 'LIKE' => 'LIKE', + 'DOWNLOAD' => 'DOWNLOAD', + 'UPLOAD' => 'UPLOAD', + 'COPY' => 'COPY', + 'PASTE' => 'PASTE', + 'EDIT' => 'EDIT', + 'VIEW' => 'VIEW', + 'VIEW_OFF' => 'VIEW_OFF', + 'PRINT' => 'PRINT', + 'SAVE' => 'SAVE', + 'CANCEL' => 'CANCEL', + 'CLOSE' => 'CLOSE', + 'CLIENT' => 'CLIENT', + 'CHART' => 'CHART', + 'CHECK' => 'CHECK', + 'CHECK_OFF' => 'CHECK_OFF', + 'CHECK_ON' => 'CHECK_ON', + 'CHECK_ALL' => 'CHECK_ALL', + 'CHECK_NONE' => 'CHECK_NONE', + 'CHECK_SOME' => 'CHECK_SOME', + 'COUPON' => 'COUPON', + 'HISTORY' => 'HISTORY', + 'MODIFY' => 'MODIFY', + 'MODIFY_ALL' => 'MODIFY_ALL', + 'BATCHJOB' => 'BATCHJOB', + 'DELETE' => 'DELETE', + 'REBOOT' => 'REBOOT', + 'RELOAD' => 'RELOAD', + 'SETUP' => 'SETUP', + 'FLAG' => 'FLAG', + 'SEARCH' => 'SEARCH', + 'PLAY' => 'PLAY', + 'CART' => 'CART', + 'CARD' => 'CARD', + 'DEPOSIT' => 'DEPOSIT', + 'DESKTOP' => 'DESKTOP', + 'DEVICE' => 'DEVICE', + 'UP' => 'UP', + 'DOWN' => 'DOWN', + 'LEFT' => 'LEFT', + 'RIGHT' => 'RIGHT', + 'IMAGE_FILE' => 'IMAGE_FILE', + 'CLOUD' => 'CLOUD', + 'SIGNPOST' => 'SIGNPOST', + 'LOCK' => 'LOCK', + 'UNLOCK' => 'UNLOCK', + 'BOX' => 'BOX', + 'BOXS' => 'BOXS', + 'ONETIME' => 'ONETIME', + 'MONTH' => 'MONTH', + 'EMAIL' => 'EMAIL', + 'MAIL' => 'MAIL', + 'PHONE' => 'PHONE', + 'POINT' => 'POINT', + 'ALRAM' => 'ALRAM', + 'PAYMENT' => 'PAYMENT', + 'LINK' => 'LINK', + 'SALE_UP' => 'SALE_UP', + 'SALE_DOWN' => 'SALE_DOWN', + 'SERVICE' => 'SERVICE', + 'SERVICE_ITEM' => 'SERVICE_ITEM', + 'SERVICE_ITEM_LINE' => 'SERVICE_ITEM_LINE', + 'SERVICE_ITEM_IP' => 'SERVICE_ITEM_IP', + 'SERVICE_ITEM_SERVER' => 'SERVICE_ITEM_SERVER', + 'SERVICE_ITEM_CPU' => 'SERVICE_ITEM_CPU', + 'SERVICE_ITEM_RAM' => 'SERVICE_ITEM_RAM', + 'SERVICE_ITEM_STORAGE' => 'SERVICE_ITEM_STORAGE', + 'SERVICE_ITEM_SOFTWARE' => 'SERVICE_ITEM_SOFTWARE', + 'SERVICE_ITEM_DEFENCE' => 'SERVICE_ITEM_DEFENCE', + 'SERVICE_ITEM_DOMAIN' => 'SERVICE_ITEM_DOMAIN', + 'SERVICE_ITEM_OTHER' => 'SERVICE_ITEM_OTHER', + 'SERVER_ITEM_CPU' => 'SERVER_ITEM_CPU', + 'SERVER_ITEM_RAM' => 'SERVER_ITEM_RAM', + 'SERVER_ITEM_DISK' => 'SERVER_ITEM_DISK', + 'SERVER_ITEM_SWITCH' => 'SERVER_ITEM_SWITCH', + 'SERVER_ITEM_OS' => 'SERVER_ITEM_OS', + 'SERVER_ITEM_DB' => 'SERVER_ITEM_DB', + 'SERVER_ITEM_SOFTWARE' => 'SERVER_ITEM_SOFTWARE', + 'SERVER_ITEM_IP' => 'SERVER_ITEM_IP', + 'SERVER_ITEM_CS' => 'SERVER_ITEM_CS', + 'SERVER_ITEM_ETC' => 'SERVER_ITEM_ETC', ]); //메신저 아이콘 define('MESSENGER_ICONS', [ - 'WHATSAPP' => '', - 'VIBER' => '', - 'LINE' => '', - 'KAKAO' => '', - 'DISCORD' => '', - 'TELEGRAM' => '', - 'SKYPE' => '', - 'YOUTUBE' => '', - 'FACEBOOK' => '', - 'TWITTER' => '', - 'INSTAGRAM' => '', - 'LINKEDIN' => '', - 'GITHUB' => '', - 'GITLAB' => '', - 'BITBUCKET' => '', - 'REDDIT' => '', - 'TIKTOK' => '', - 'PINTEREST' => '', - 'TUMBLR' => '', - 'SNAPCHAT' => '', + 'WHATSAPP' => 'WHATSAPP', + 'VIBER' => 'VIBER', + 'LINE' => 'LINE', + 'KAKAO' => 'KAKAO', + 'DISCORD' => 'DISCORD', + 'TELEGRAM' => 'TELEGRAM', + 'SKYPE' => 'SKYPE', + 'YOUTUBE' => 'YOUTUBE', + 'FACEBOOK' => 'FACEBOOK', + 'TWITTER' => 'TWITTER', + 'INSTAGRAM' => 'INSTAGRAM', + 'LINKEDIN' => 'LINKEDIN', + 'GITHUB' => 'GITHUB', + 'GITLAB' => 'GITLAB', + 'BITBUCKET' => 'BITBUCKET', + 'REDDIT' => 'REDDIT', + 'TIKTOK' => 'TIKTOK', + 'PINTEREST' => 'PINTEREST', + 'TUMBLR' => 'TUMBLR', + 'SNAPCHAT' => 'SNAPCHAT', ]); -//배너관련 +//배너관련 (경로만 유지) define('TOP_BANNER', [ - 'default' => '', - 'aboutus' => '', - 'member' => '', - 'hosting' => '', - 'serverdevice' => '', - 'service' => '', - 'support' => '', + 'default' => '/images/banner/sub_visual1.jpg', + 'aboutus' => '/images/banner/sub_visual1.jpg', + 'member' => '/images/banner/sub_visual1.jpg', + 'hosting' => '/images/banner/sub_visual2.jpg', + 'serverdevice' => '/images/banner/sub_visual3.jpg', + 'service' => '/images/banner/sub_visual3.jpg', + 'support' => '/images/banner/sub_visual4.jpg', ]); //소리관련 define('AUDIOS', [ 'Alram_GetEmail' => '', ]); -//Layout관련 -define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버'); -define('LAYOUTS', [ - 'auth' => [ - 'title' => KEYWORD, - 'path' => 'auth', - 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'auth', - 'template' => 'templates' . DIRECTORY_SEPARATOR . 'auth', - 'metas' => [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - ], - 'stylesheets' => [ - '', - '', - '', - ], - 'javascripts' => [ - '', - ], - 'footerScripts' => [] - ], - 'front' => [ - 'title' => KEYWORD, - 'path' => 'front', - 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'front', - 'template' => 'templates' . DIRECTORY_SEPARATOR . 'front', - 'topmenus' => ['aboutus', 'hosting', 'service', 'support'], - 'metas' => [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - ], - 'stylesheets' => [ - '', - '', - '', - '', - '', - ], - 'javascripts' => [ - '', - '', - '', - '', - ], - 'footerScripts' => [] - ], - 'admin' => [ - 'title' => '관리자화면', - 'path' => 'admin', - 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', - 'template' => 'templates' . DIRECTORY_SEPARATOR . 'admin', - 'metas' => [ - '', - '', - '', - '', - '', - '', - '', - '', - '', - ], - 'stylesheets' => [ - '', - '', - '', - '', - '', - '', - '', - '', - ], - 'javascripts' => [ - '', - '', - '', - '', - '', - '' - ], - 'footerScripts' => [] - ], -]); +// Layout은 Config\Layout 클래스에서 관리됩니다. //STATUS define("STATUS", [ diff --git a/app/Config/Layout.php b/app/Config/Layout.php new file mode 100644 index 0000000..a14af91 --- /dev/null +++ b/app/Config/Layout.php @@ -0,0 +1,107 @@ + [ + 'title' => self::KEYWORD, + 'path' => 'auth', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'auth', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'auth', + 'metas' => [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'stylesheets' => [ + '', + '', + '', + ], + 'javascripts' => [ + '', + ], + 'footerScripts' => [] + ], + 'front' => [ + 'title' => self::KEYWORD, + 'path' => 'front', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'front', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'front', + 'topmenus' => ['aboutus', 'hosting', 'service', 'support'], + 'metas' => [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'stylesheets' => [ + '', + '', + '', + '', + '', + ], + 'javascripts' => [ + '', + '', + '', + '', + ], + 'footerScripts' => [] + ], + 'admin' => [ + 'title' => '관리자화면', + 'path' => 'admin', + 'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', + 'template' => 'templates' . DIRECTORY_SEPARATOR . 'admin', + 'metas' => [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'stylesheets' => [ + '', + '', + '', + '', + '', + '', + '', + '', + ], + 'javascripts' => [ + '', + '', + '', + '', + '', + '' + ], + 'footerScripts' => [] + ], + ]; +} diff --git a/app/Controllers/AbstractWebController.php b/app/Controllers/AbstractWebController.php index 44e6e65..c3274cf 100644 --- a/app/Controllers/AbstractWebController.php +++ b/app/Controllers/AbstractWebController.php @@ -71,7 +71,7 @@ abstract class AbstractWebController extends Controller return $this->_viewDatas[$key] ?? null; } - // --- 공통 처리 로직 (Override 가능) --- + // --- 공통 처리 로직 (Override 가능) --- /** * 모든 액션 실행 전 공통 초기화 작업 @@ -114,18 +114,20 @@ abstract class AbstractWebController extends Controller */ protected function action_render_process(string $view_file, array $viewDatas, ?string $template_path = null): string { - // dd($viewDatas); - $view_path = $viewDatas['layout']['path']; + helper(['form', 'IconHelper', 'utility']); + $config = config('Layout'); + $layoutConfig = $config->layouts[$viewDatas['layout']['path']] ?? []; + + $viewDatas['layout'] = array_merge($layoutConfig, $viewDatas['layout']); + $view_path = $viewDatas['layout']['path']; + if ($template_path) { - $view_path .= '/' . $template_path; + $view_path .= '/' . $template_path; } //최종 ViewPath $viewDatas['view_path'] = $view_path; - $full_path = $view_path . '/' . $view_file; - // echo $full_path; - // exit; - helper(['form', __FUNCTION__]); - return view($full_path, [ + helper([__FUNCTION__]); + return view($view_path . '/' . $view_file, [ 'viewDatas' => [ ...$viewDatas, 'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []], diff --git a/app/Controllers/Admin/AdminController.php b/app/Controllers/Admin/AdminController.php index 1b7a6f8..d5d586a 100644 --- a/app/Controllers/Admin/AdminController.php +++ b/app/Controllers/Admin/AdminController.php @@ -15,7 +15,7 @@ abstract class AdminController extends CommonController { parent::initController($request, $response, $logger); $this->addActionPaths($this->_layout); - $this->layouts = LAYOUTS[$this->_layout]; + $this->layouts = config('Layout')->layouts[$this->_layout] ?? []; } protected function action_init_process(string $action, array $formDatas = []): void { @@ -24,7 +24,7 @@ abstract class AdminController extends CommonController $this->addViewDatas('title', $this->getTitle()); $this->addViewDatas('helper', $this->service->getHelper()); $this->service->getFormService()->action_init_process($action, $formDatas); - $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); + $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); $this->addViewDatas('formRules', $this->service->getFormService()->getFormRules()); $this->addViewDatas('formFilters', $this->service->getFormService()->getFormFilters()); $this->addViewDatas('formOptions', $this->service->getFormService()->getFormOptions()); diff --git a/app/Controllers/Admin/Home.php b/app/Controllers/Admin/Home.php index 4899a32..37d8952 100644 --- a/app/Controllers/Admin/Home.php +++ b/app/Controllers/Admin/Home.php @@ -18,7 +18,7 @@ class Home extends AbstractWebController $this->service = service('customer_serviceservice'); } $this->addActionPaths($this->_layout); - $this->layouts = LAYOUTS[$this->_layout]; + $this->layouts = config('Layout')->layouts[$this->_layout] ?? []; } protected function action_init_process(string $action, array $formDatas = []): void { @@ -26,7 +26,7 @@ class Home extends AbstractWebController $this->addViewDatas('layout', $this->layouts); $this->addViewDatas('helper', $this->service->getHelper()); $this->service->getFormService()->action_init_process($action, $formDatas); - $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); + $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); $this->addViewDatas('formRules', $this->service->getFormService()->getFormRules()); $this->addViewDatas('formFilters', $this->service->getFormService()->getFormFilters()); $this->addViewDatas('formOptions', $this->service->getFormService()->getFormOptions()); diff --git a/app/Controllers/Auth/AuthController.php b/app/Controllers/Auth/AuthController.php index 8986d0f..928dacc 100644 --- a/app/Controllers/Auth/AuthController.php +++ b/app/Controllers/Auth/AuthController.php @@ -17,7 +17,7 @@ abstract class AuthController extends AbstractWebController { parent::initController($request, $response, $logger); $this->addActionPaths($this->_layout); - $this->layouts = LAYOUTS[$this->_layout]; + $this->layouts = config('Layout')->layouts[$this->_layout] ?? []; } protected function action_init_process(string $action, array $formDatas = []): void { @@ -26,7 +26,7 @@ abstract class AuthController extends AbstractWebController $this->addViewDatas('helper', $this->service->getHelper()); //Fields,Rules,Filters,Options등 초기화 $this->service->getFormService()->action_init_process($action, $formDatas); - $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); + $this->addViewDatas('formFields', $this->service->getFormService()->getFormFields()); $this->addViewDatas('formRules', $this->service->getFormService()->getFormRules()); $this->addViewDatas('formFilters', $this->service->getFormService()->getFormFilters()); $this->addViewDatas('formOptions', $this->service->getFormService()->getFormOptions()); diff --git a/app/Helpers/IconHelper.php b/app/Helpers/IconHelper.php new file mode 100644 index 0000000..b595d0a --- /dev/null +++ b/app/Helpers/IconHelper.php @@ -0,0 +1,178 @@ + '', + 'LOGO' => '', + 'EXCEL' => '', + 'PDF' => '', + 'GOOGLE' => 'Google', + 'MEMBER' => '', + 'LOGIN' => '', + 'LOGOUT' => '', + 'HOME' => '', + 'MENU' => '', + 'NEW' => '', + 'REPLY' => '', + 'DATABASE' => '', + 'DISLIKE' => '', + 'LIKE' => '', + 'DOWNLOAD' => '', + 'UPLOAD' => '', + 'COPY' => '', + 'PASTE' => '', + 'EDIT' => '', + 'VIEW' => '', + 'VIEW_OFF' => '', + 'PRINT' => '', + 'SAVE' => '', + 'CANCEL' => '', + 'CLOSE' => '', + 'CLIENT' => '', + 'CHART' => '', + 'CHECK' => '', + 'CHECK_OFF' => '', + 'CHECK_ON' => '', + 'CHECK_ALL' => '', + 'CHECK_NONE' => '', + 'CHECK_SOME' => '', + 'COUPON' => '', + 'HISTORY' => '', + 'MODIFY' => '', + 'MODIFY_ALL' => '', + 'BATCHJOB' => '', + 'DELETE' => '', + 'REBOOT' => '🔄', + 'RELOAD' => '', + 'SETUP' => '', + 'FLAG' => '', + 'SEARCH' => '', + 'PLAY' => '', + 'CART' => '', + 'CARD' => '', + 'DEPOSIT' => '', + 'DESKTOP' => '', + 'DEVICE' => '', + 'UP' => '', + 'DOWN' => '', + 'LEFT' => '', + 'RIGHT' => '', + 'IMAGE_FILE' => '', + 'CLOUD' => '', + 'SIGNPOST' => '', + 'LOCK' => '', + 'UNLOCK' => '', + 'BOX' => '', + 'BOXS' => '', + 'ONETIME' => '', + 'MONTH' => '', + 'EMAIL' => '', + 'MAIL' => '', + 'PHONE' => '', + 'POINT' => '', + 'ALRAM' => '', + 'PAYMENT' => '', + 'LINK' => '', + 'SALE_UP' => '', + 'SALE_DOWN' => '', + 'SERVICE' => '', + 'SERVICE_ITEM' => '', + 'SERVICE_ITEM_LINE' => '', + 'SERVICE_ITEM_IP' => '', + 'SERVICE_ITEM_SERVER' => '', + 'SERVICE_ITEM_CPU' => '', + 'SERVICE_ITEM_RAM' => '', + 'SERVICE_ITEM_STORAGE' => '', + 'SERVICE_ITEM_SOFTWARE' => '', + 'SERVICE_ITEM_DEFENCE' => '', + 'SERVICE_ITEM_DOMAIN' => '', + 'SERVICE_ITEM_OTHER' => '', + 'SERVER_ITEM_CPU' => '', + 'SERVER_ITEM_RAM' => '', + 'SERVER_ITEM_DISK' => '', + 'SERVER_ITEM_SWITCH' => '', + 'SERVER_ITEM_OS' => '', + 'SERVER_ITEM_DB' => '', + 'SERVER_ITEM_SOFTWARE' => '', + 'SERVER_ITEM_IP' => '', + 'SERVER_ITEM_CS' => '', + 'SERVER_ITEM_ETC' => '', + ]; + } + + private static function getMessengerIcons(): array + { + return [ + 'WHATSAPP' => '', + 'VIBER' => '', + 'LINE' => '', + 'KAKAO' => '', + 'DISCORD' => '', + 'TELEGRAM' => '', + 'SKYPE' => '', + 'YOUTUBE' => '', + 'FACEBOOK' => '', + 'TWITTER' => '', + 'INSTAGRAM' => '', + 'LINKEDIN' => '', + 'GITHUB' => '', + 'GITLAB' => '', + 'BITBUCKET' => '', + 'REDDIT' => '', + 'TIKTOK' => '', + 'PINTEREST' => '', + 'TUMBLR' => '', + 'SNAPCHAT' => '', + ]; + } +} diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php new file mode 100644 index 0000000..eeb5ae4 --- /dev/null +++ b/app/Helpers/utility_helper.php @@ -0,0 +1,17 @@ +_form === null) { $this->_form = new BoardForm(); $this->_form->setAttributes([ - 'pk_field' => $this->getPKField(), - 'title_field' => $this->getTitleField(), - 'table' => $this->model->getTable(), + 'pk_field' => $this->getPKField(), + 'title_field' => $this->getTitleField(), + 'table' => $this->model->getTable(), 'useAutoIncrement' => $this->model->useAutoIncrement(), 'class_path' => $this->getClassPaths(false) ]); @@ -48,9 +48,9 @@ class BoardService extends CommonService if ($this->_helper === null) { $this->_helper = new BoardHelper(); $this->_helper->setAttributes([ - 'pk_field' => $this->getPKField(), - 'title_field' => $this->getTitleField(), - 'table' => $this->model->getTable(), + 'pk_field' => $this->getPKField(), + 'title_field' => $this->getTitleField(), + 'table' => $this->model->getTable(), 'useAutoIncrement' => $this->model->useAutoIncrement(), 'class_path' => $this->getClassPaths(false) ]); @@ -80,11 +80,13 @@ class BoardService extends CommonService { //관리자정보 $userEntities = service('userservice')->getEntities(); - $datas = []; + $datas = []; foreach ($this->getEntities(['category' => $category, 'status' => STATUS['AVAILABLE']]) as $entity) { $datas[] = [ - 'title' => "", - 'created_at' => date('Y-m-d H:m', strtotime($entity->getCreatedAT())), + 'uid' => $entity->getPK(), + 'title' => $entity->getTitle(), + 'url' => "/admin/board/view/{$entity->getPK()}", + 'created_at' => date('Y-m-d H:i', strtotime($entity->getCreatedAT())), 'user' => $userEntities[$entity->getUserUid()]->getTitle(), ]; } diff --git a/app/Views/admin/welcome/mylog.php b/app/Views/admin/welcome/mylog.php index 404c1c5..f792387 100644 --- a/app/Views/admin/welcome/mylog.php +++ b/app/Views/admin/welcome/mylog.php @@ -1,13 +1,13 @@ -
- -
-
- -
- \ No newline at end of file +
+ +
+
+ +
+ \ No newline at end of file diff --git a/app/Views/admin/welcome/new_service.php b/app/Views/admin/welcome/new_service.php index 2a3e07c..488c587 100644 --- a/app/Views/admin/welcome/new_service.php +++ b/app/Views/admin/welcome/new_service.php @@ -1,36 +1,39 @@ -
- -
-
- - +
+ +
+
+
+ + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - -
사이트업체명 + ALL 📋 장비번호 / 스위치정보 / IP정보 / CS정보 + 등록자
사이트업체명 - ALL 📋 장비번호 / 스위치정보 / IP정보 / CS정보 - 등록자getSite()] ?>getFieldView('clientinfo_uid', $entity->getClientInfoUid(), $viewDatas) ?> + + getFieldView('serverinfo_uid', $entity->getServerInfoUid(), $viewDatas) ?>getFieldView('user_uid', $entity->getUserUid(), $viewDatas) ?>
getSite()] ?>getFieldView('clientinfo_uid', $entity->getClientInfoUid(), $viewDatas) ?>getFieldView('serverinfo_uid', $entity->getServerInfoUid(), $viewDatas) ?>getFieldView('user_uid', $entity->getUserUid(), $viewDatas) ?>
-
- - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/app/Views/admin/welcome/stock.php b/app/Views/admin/welcome/stock.php index 5e37b12..409449b 100644 --- a/app/Views/admin/welcome/stock.php +++ b/app/Views/admin/welcome/stock.php @@ -1,24 +1,24 @@ -
- -
-
- - - - - - - - - - - -
사용 서버메모리 재고저장장치 재고
-
- \ No newline at end of file +
+ +
+
+ + + + + + + + + + + +
사용 서버메모리 재고저장장치 재고
+
+ \ No newline at end of file diff --git a/app/Views/admin/welcome/total_service.php b/app/Views/admin/welcome/total_service.php index 5b80e71..7ade694 100644 --- a/app/Views/admin/welcome/total_service.php +++ b/app/Views/admin/welcome/total_service.php @@ -1,45 +1,45 @@ -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
사이트일반방어전용대체VPN이벤트테스트합계
도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바합계
-
- \ No newline at end of file +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
사이트일반방어전용대체VPN이벤트테스트합계
도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바도쿄치바합계
+
+ \ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu.php b/app/Views/layouts/admin/left_menu.php index 967a404..c50687b 100644 --- a/app/Views/layouts/admin/left_menu.php +++ b/app/Views/layouts/admin/left_menu.php @@ -4,7 +4,7 @@
include($viewDatas['layout']['layout'] . '/left_menu/base'); ?> include($viewDatas['layout']['layout'] . '/left_menu/board'); ?> diff --git a/app/Views/layouts/admin/left_menu/base.php b/app/Views/layouts/admin/left_menu/base.php index 9a09de4..fb1a8df 100644 --- a/app/Views/layouts/admin/left_menu/base.php +++ b/app/Views/layouts/admin/left_menu/base.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/board.php b/app/Views/layouts/admin/left_menu/board.php index 03d9453..60f6552 100644 --- a/app/Views/layouts/admin/left_menu/board.php +++ b/app/Views/layouts/admin/left_menu/board.php @@ -1,14 +1,13 @@

-

\ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/customer.php b/app/Views/layouts/admin/left_menu/customer.php index 5275650..0d82c76 100644 --- a/app/Views/layouts/admin/left_menu/customer.php +++ b/app/Views/layouts/admin/left_menu/customer.php @@ -1,14 +1,13 @@

-

\ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/equipment.php b/app/Views/layouts/admin/left_menu/equipment.php index f70d48a..162c691 100644 --- a/app/Views/layouts/admin/left_menu/equipment.php +++ b/app/Views/layouts/admin/left_menu/equipment.php @@ -1,18 +1,17 @@

-

\ No newline at end of file diff --git a/app/Views/layouts/admin/left_menu/part.php b/app/Views/layouts/admin/left_menu/part.php index 34cd735..ca4a1bb 100644 --- a/app/Views/layouts/admin/left_menu/part.php +++ b/app/Views/layouts/admin/left_menu/part.php @@ -1,29 +1,28 @@

-

\ No newline at end of file diff --git a/app/Views/layouts/admin/top.php b/app/Views/layouts/admin/top.php index 6fc3a36..c2be0ae 100644 --- a/app/Views/layouts/admin/top.php +++ b/app/Views/layouts/admin/top.php @@ -6,7 +6,8 @@ overflow-y: auto; } -