diff --git a/.gitignore b/.gitignore
index eb8750e..3b201cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,4 +42,5 @@ composer.lock
.env
test.php
writeable/logs/*
-writeable/sessions/*
\ No newline at end of file
+writeable/sessions/*
+writeable/cache/*
\ No newline at end of file
diff --git a/extdbms/cli.php b/extdbms/cli.php
new file mode 100644
index 0000000..adfc8ff
--- /dev/null
+++ b/extdbms/cli.php
@@ -0,0 +1,21 @@
+=8.2",
+ "vlucas/phpdotenv": "^5.6",
+ "eftec/bladeone": "^4.18"
+ },
+ "autoload": {
+ "psr-4": {
+ "lib\\": "lib/"
+ }
+ }
+}
diff --git a/extdbms/index.html b/extdbms/index.html
new file mode 100644
index 0000000..699efb7
--- /dev/null
+++ b/extdbms/index.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extdbms/lib/Configs/App.php b/extdbms/lib/Configs/App.php
new file mode 100644
index 0000000..38ca514
--- /dev/null
+++ b/extdbms/lib/Configs/App.php
@@ -0,0 +1,13 @@
+ 0,
+ 'alert' => 1,
+ 'critical' => 2,
+ 'error' => 3,
+ 'warning' => 4,
+ 'notice' => 5,
+ 'info' => 6,
+ 'debug' => 7,
+]);
+
+//Session 관련
+define('APP_SESSION_DRIVER', $_ENV['APP_SESSION_DRIVER'] ?? 'file');
+define('APP_SESSION_NAME', $_ENV['APP_SESSION_NAME'] ?? 'PHPSESSID');
+define('APP_SESSION_LIFETIME', $_ENV['APP_SESSION_LIFETIME'] ?? 120);
+define('APP_SESSION_PATH', $_ENV['APP_SESSION_PATH'] ?? APP_WRITEABLE_PATH . 'sessions');
+define('APP_SESSION_PERMISSION', $_ENV['APP_SESSION_PERMISSION'] ?? 0775);
+
+//Cookie 관련
+define('APP_SESSION_COOKIE_PATH', $_ENV['APP_SESSION_COOKIE_PATH'] ?? '/');
+define('APP_SESSION_COOKIE_EXPIRE', $_ENV['APP_SESSION_COOKIE_EXPIRE'] ?? 3600);
+define('APP_SESSION_COOKIE_DOMAIN', $_ENV['APP_SESSION_COOKIE_DOMAIN'] ?? null);
+define('APP_SESSION_COOKIE_SECURE', $_ENV['APP_SESSION_COOKIE_SECURE'] ?? false);
+define('APP_SESSION_COOKIE_HTTPONLY', $_ENV['APP_SESSION_COOKIE_HTTPONLY'] ?? true);
+define('APP_SESSION_USE_ONLY_COOKIES', $_ENV['APP_SESSION_USE_ONLY_COOKIES'] ?? true);
+define('APP_SESSION_USE_STRICT_MODE', $_ENV['APP_SESSION_USE_STRICT_MODE'] ?? true);
+define('APP_SESSION_USE_UNIQUE_ID', $_ENV['APP_SESSION_USE_UNIQUE_ID'] ?? false);
+define('APP_SESSION_USE_FLASH', $_ENV['APP_SESSION_USE_FLASH'] ?? true);
+define('APP_SESSION_USE_INPUT', $_ENV['APP_SESSION_USE_INPUT'] ?? true);
+
+//CSRF 관련
+define('APP_SESSION_USE_CSRF', $_ENV['APP_SESSION_USE_CSRF'] ?? true);
+define('APP_SESSION_USE_CSRF_TOKEN', $_ENV['APP_SESSION_USE_CSRF_TOKEN'] ?? true);
+define('APP_SESSION_USE_CSRF_NAME', $_ENV['APP_SESSION_USE_CSRF_NAME'] ?? 'csrf_token');
+define('APP_SESSION_USE_CSRF_EXPIRE', $_ENV['APP_SESSION_USE_CSRF_EXPIRE'] ?? 3600);
+define('APP_SESSION_USE_CSRF_EXCLUDE', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE'] ?? []);
+define('APP_SESSION_USE_CSRF_EXCLUDE_METHOD', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE_METHOD'] ?? ['GET', 'HEAD', 'OPTIONS']);
+define('APP_SESSION_USE_CSRF_EXCLUDE_URI', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE_URI'] ?? []);
+
+//Database 관련
+define('DATABASE_DRIVER', $_ENV['DATABASE_DRIVER'] ?? $_SERVER['DATABASE_DRIVER'] ?? 'mysql');
+define('DATABASE_HOST', $_ENV['DATABASE_HOST'] ?? $_SERVER['DATABASE_HOST'] ?? 'localhost');
+define('DATABASE_DB', $_ENV['DATABASE_DB'] ?? $_SERVER['DATABASE_DB'] ?? 'test');
+define('DATABASE_CHARSET', $_ENV['DATABASE_CHARSET'] ?? $_SERVER['DATABASE_CHARSET'] ?? 'utf8');
+define('DATABASE_ID', $_ENV['DATABASE_ID'] ?? $_SERVER['DATABASE_ID'] ?? 'test');
+define('DATABASE_PASSWORD', $_ENV['DATABASE_PASSWORD'] ?? $_SERVER['DATABASE_PASSWORD'] ?? 'test');
+define('DATABASE_QUERY_DEBUG', $_ENV['DATABASE_QUERY_DEBUG'] ?? $_SERVER['DATABASE_QUERY_DEBUG'] ?? false);
+
+//DBMS 관련정보보
+define('DBMS_SITE_DASHBOARD_DAY', $_ENV['DBMS_SITE_DASHBOARD_DAY'] ?? $_SERVER['DBMS_SITE_DASHBOARD_DAY'] ?? 7);
+define('DBMS_SITE_HOST', $_ENV['DBMS_SITE_HOST'] ?? $_SERVER['DBMS_SITE_HOST'] ?? "http://dbms.prime-idc.jp");
+define('DBMS_SITE_JAVA_PORT', $_ENV['DBMS_SITE_JAVA_PORT'] ?? $_SERVER['DBMS_SITE_JAVA_PORT'] ?? 6752);
+define('DBMS_SITE_URL', DBMS_SITE_HOST . ":" . DBMS_SITE_JAVA_PORT);
+
+define('DBMS_SITEINFOS', [
+ 'dbms.prime-idc.jp' => [
+ "id" => "PRIMEIDC",
+ "domain" => "dbms.prime-idc.jp",
+ "name" => "PrimeIDC",
+ "email" => "primeidc.jp@gmail.com",
+ "totalcount_types" => ["normal", "defence", "solo", "substitution", "test"],
+ "totalcount_customers" => [
+ "idcjp" => "Client_Code NOT IN ('C116','C012','C636')",
+ "winidc" => "Client_Code='C116'",
+ "gamewing" => "Client_Code='C012'",
+ "GDIDC" => "Client_Code='C636'",
+ ],
+ "banks" => [
+ ["id" => "331301-04-217387", "name" => '국민은행', "owner" => "주)듀나미스"]
+ ]
+ ],
+ 'dbms.itsolution-idc.jp' => [
+ "id" => "ITSOLUTION",
+ "domain" => "dbms.itsolution-idc.jp",
+ "name" => "Itsolution",
+ "email" => "support@itsoution-idc.jp",
+ "totalcount_types" => ["normal", "defence", "solo", "substitution", "test"],
+ "totalcount_customers" => [
+ "winidc" => "Client_Code NOT IN ('C237')",
+ "bosch" => "Client_Code='C237'",
+ ],
+ "banks" => [
+ ["id" => "9002-1932-1654-1", "name" => '새마을금고', "owner" => "주식회사 르호봇"],
+ ["id" => "351-0995-6751-73", "name" => '농협', "owner" => "주식회사 르호봇"],
+ ],
+ ],
+ 'dbms.gdidc.jp' => [
+ "id" => "GDIDC",
+ "domain" => "dbms.gdidc.jp",
+ "name" => "GDIDC",
+ "email" => "support@gdidc.jp",
+ "totalcount_types" => ["normal", "defence", "solo", "substitution", "test"],
+ "totalcount_customers" => [
+ "gdidc" => "",
+ ],
+ "banks" => [
+ ["id" => "1005-204-100758", "name" => '우리은행', "owner" => " (주)브엘라해로이"],
+ ],
+ ]
+]);
+define('DBMS_SERVICE_SWITCHCODE', [
+ 'Chiba' => ['begin' => 'C00%', 'end' => 'C64%'],
+ 'Tokyo' => ['begin' => 'C80%', 'end' => 'C99%']
+]);
+define('DBMS_SERVICE_LINE_ALL', [
+ 'normal' => '일반',
+ 'defence' => '방어',
+ 'solo' => '전용',
+ 'substitution' => '대체',
+ 'test' => '테스트',
+ 'vpn' => 'VPN',
+ 'event' => '이벤트',
+]);
+define('DBMS_GEARLIST_PROCESS_TYPES', [
+ '',
+ 'COLOCATION',
+ 'XEON Single',
+ 'CUSTOM',
+ 'INS-일회성',
+ 'NEHALEM',
+ 'Cisco Router',
+]);
+define('DBMS_GEARLIST_CPU_TYPES', [
+ '',
+ 'X6-Q',
+ 'C2800',
+ 'C2600',
+ 'COL',
+ 'CUS',
+ 'NX227',
+ 'NX20',
+ 'NX21',
+ 'DQ28',
+ 'DQ26',
+ 'DQ31',
+ 'DQ18',
+ 'DQ23',
+ 'DQ20',
+ 'DX34',
+ 'DX38',
+ 'DX28',
+ 'DX32',
+ 'DX36',
+ 'DX30',
+ 'MD32',
+ 'MD30',
+ 'Q16R',
+ 'Q316',
+ 'Q310',
+ 'Q283',
+ 'Q266',
+ 'Q25R',
+ 'Q213',
+ 'Q20R',
+ 'Q186',
+ 'Q24',
+ 'Q20',
+ 'Q240',
+ 'DX3',
+ 'DQ233'
+]);
+define('DBMS_CLIENT_POINT_TYPE', [
+ 'deposit' => '입금',
+ 'withdrawal' => '출금',
+]);
diff --git a/extdbms/lib/Configs/Route.php b/extdbms/lib/Configs/Route.php
new file mode 100644
index 0000000..794aaea
--- /dev/null
+++ b/extdbms/lib/Configs/Route.php
@@ -0,0 +1,162 @@
+group('dbms/client', function (Router $router) {
+ //Dashboard관련
+ $router->group('dashboard', function (Router $router) {
+ $router->add('GET', 'totalcount', function ($params) {
+ $controller = new ClientDashboardController($params);
+ return $controller->totalcount();
+ // Response::view($result);
+ });
+ });
+ //메모관련
+ $router->group('memo', function (Router $router) {
+ $router->add('GET', 'update_form', function ($params) {
+ $controller = new MemoCOntroller($params);
+ return $controller->update_form();
+ // Response::view($result);
+ });
+ $router->add('POST', 'update', function ($params) {
+ $controller = new MemoCOntroller($params);
+ return $controller->update();
+ // Response::view($result);
+ });
+ });
+ //쿠폰관련
+ $router->group('coupon', function (Router $router) {
+ $router->add('GET', 'index', function ($params) {
+ $controller = new CouponCOntroller($params);
+ return $controller->index();
+ // Response::view($result);
+ });
+ $router->add('GET', 'insert_form', function ($params) {
+ $controller = new CouponCOntroller($params);
+ return $controller->insert_form();
+ // Response::view($result);
+ });
+ $router->add('POST', 'insert', function ($params) {
+ $controller = new CouponCOntroller($params);
+ return $controller->insert();
+ // Response::view($result);
+ });
+ });
+ //Point관련
+ $router->group('point', function (Router $router) {
+ $router->add('GET', 'index', function ($params) {
+ $controller = new PointController($params);
+ return $controller->index();
+ // Response::view($result);
+ });
+ $router->add('GET', 'insert_form', function ($params) {
+ $controller = new PointController($params);
+ return $controller->insert_form();
+ // Response::view($result);
+ });
+ $router->add('POST', 'insert', function ($params) {
+ $controller = new PointController($params);
+ return $controller->insert();
+ // Response::view($result);
+ });
+ });
+ //결제관련
+ $router->group('payment', function (Router $router) {
+ $router->add('GET', 'index', function ($params) {
+ $controller = new PaymentCOntroller($params);
+ return $controller->index();
+ // Response::view($result);
+ });
+ $router->add('GET', 'billpaper', function ($params) {
+ $controller = new PaymentCOntroller($params);
+ return $controller->billpaper();
+ // Response::view($result);
+ });
+ });
+});
+
+// 예제 라우트 그룹: dbms/dashboard/index 이후에 key/value 파라미터 허용
+$router->group('dbms/dashboard', function (Router $router) {
+ // // 동적 파라미터 없이 기본 path에 추가 파라미터를 받아 key/value 형식으로 처리
+ // $router->add('GET', 'index', function ($params) {
+ // Response::json([
+ // 'message' => 'DashboardController::index 실행됨',
+ // 'params' => $params
+ // ]);
+ // });
+ // 동적 파라미터 없이 기본 path에 추가 파라미터를 받아 key/value 형식으로 처리
+ $router->add('GET', 'topboard', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->topboard();
+ // Response::view($result);
+ });
+ $router->add('GET', 'totalcount', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->totalcount();
+ // Response::view($result);
+ });
+ $router->add('GET', 'latest_service', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->latest_service();
+ // Response::view($result);
+ });
+ $router->add('GET', 'latest_history', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->latest_history();
+ // Response::view($result);
+ });
+ $router->add('GET', 'cscount', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->cscount();
+ // Response::view($result);
+ });
+ $router->add('GET', 'coupon', function ($params) {
+ $controller = new DashboardCOntroller($params);
+ return $controller->coupon();
+ // Response::view($result);
+ });
+});
+
+$router->group('dbms/defence', function (Router $router) {
+ // 동적 파라미터 없이 기본 path에 추가 파라미터를 받아 key/value 형식으로 처리
+ $router->add('GET', 'index', function ($params) {
+ $controller = new DefenceCOntroller($params);
+ return $controller->index();
+ // Response::view($result);
+ });
+});
+
+$router->group('dbms/service', function (Router $router) {
+ // 동적 파라미터 없이 기본 path에 추가 파라미터를 받아 key/value 형식으로 처리
+ $router->add('GET', 'extra', function ($params) {
+ $controller = new ServiceCOntroller($params);
+ return $controller->extra();
+ // Response::view($result);
+ });
+ $router->add('GET', 'ipsearch', function ($params) {
+ $controller = new ServiceCOntroller($params);
+ return $controller->ipsearch();
+ // Response::view($result);
+ });
+});
+
+$router->group('dbms/gearlist', function (Router $router) {
+ $router->add('GET', 'index', function ($params) {
+ $controller = new GearlistCOntroller($params);
+ return $controller->index();
+ // Response::view($result);
+ });
+});
diff --git a/extdbms/lib/Controllers/Client/ClientController.php b/extdbms/lib/Controllers/Client/ClientController.php
new file mode 100644
index 0000000..fe55031
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/ClientController.php
@@ -0,0 +1,73 @@
+setPath('client');
+ } //
+ final public function getClientService(): ClientService
+ {
+ if ($this->_clientService === null) {
+ $this->_clientService = new ClientService();
+ }
+ return $this->_clientService;
+ }
+ final public function getMemberService(): MemberService
+ {
+ if ($this->_memberService === null) {
+ $this->_memberService = new MemberService();
+ }
+ return $this->_memberService;
+ }
+ protected function setDefaultRequestData(): array
+ {
+ $this->client = null;
+ $this->member = null;
+ $this->service = null;
+ //사용자정보
+ $client_code = $this->request->get('client_code');
+ // echo "Client_Code:" . $client_code;
+ // exit;
+ if ($client_code) {
+ $this->getClientService()->getModel()->where('Client_Code', $client_code);
+ $client = $this->getClientService()->getEntity();
+ if (!$client) {
+ throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
+ }
+ $this->client = $client;
+ }
+ //관리자정보(등록자)
+ $member_code = $this->request->get('mkid');
+ // echo "member_code:" . $member_code;
+ if ($member_code) {
+ $this->getMemberService()->getModel()->where($this->getMemberService()->getModel()::PKField, $member_code);
+ $member = $this->getMemberService()->getEntity();
+ if (!$member) {
+ throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
+ }
+ $this->member = $member;
+ }
+ //서비스정보
+ $service_code = $this->request->get('service_code');
+ // echo "service_code:" . $service_code;
+ if ($service_code) {
+ $this->getServiceService()->getModel()->where($this->getServiceService()->getModel()::PKField, $service_code);
+ $service = $this->getServiceService()->getEntity();
+ if (!$service) {
+ throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
+ }
+ $this->service = $service;
+ }
+ return [$client_code, $member_code, $service_code];
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/Client/CouponController.php b/extdbms/lib/Controllers/Client/CouponController.php
new file mode 100644
index 0000000..2e2db86
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/CouponController.php
@@ -0,0 +1,103 @@
+setPath('coupon');
+ } //
+ public function getOnetimeService(): OnetimeService
+ {
+ if ($this->_onetimeService === null) {
+ $this->_onetimeService = new OnetimeService();
+ }
+ return $this->_onetimeService;
+ }
+ public function getHistoryService(): HistoryService
+ {
+ if ($this->_historyService === null) {
+ $this->_historyService = new HistoryService();
+ }
+ return $this->_historyService;
+ }
+
+ //IdcCouponListMK.jsp -> domain_coupon.php
+ //CLI 접속방법 : php index.php site/client/counpon/index
+ //WEB 접속방법 : http://localhost/site/client/coupon/index
+ public function index()
+ {
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ //사용자별 쿠폰내역
+ if ($client_code) {
+ $this->getServiceService()->getModel()->where('client_code', $client_code);
+ }
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ [$this->total, $this->entities] = $this->getServiceService()->getList($this->curPage, $this->perPage);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ $total_coupon = 0;
+ foreach ($this->entities as $entity) {
+ $total_coupon += $entity->getCoupon();
+ }
+ $this->total_coupon = $total_coupon;
+ return $this->render(__FUNCTION__);
+ }
+
+ //IdcCouponBuyMK.jsp -> domain_coupon_buy.php
+ //CLI 접속방법 : php index.php site/client/counpon/insert_form
+ //WEB 접속방법 : http://localhost/site/client/coupon/insert_form
+ public function insert_form()
+ {
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ $this->today = date("Y-m-d");
+ return $this->render(__FUNCTION__);
+ }
+
+ //IdcCouponBuyMK.jsp -> domain_coupon_buy.php
+ //CLI 접속방법 : php index.php site/client/counpon/insert_form
+ //WEB 접속방법 : http://localhost/site/client/coupon/insert_form
+ public function insert()
+ {
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ //onetime_sub 도메인 구매 수량
+ $coupon = $this->request->get('coupon');
+ if (! $coupon || $coupon < 1) {
+ throw new \Exception("도메인 구매 수량 값이 정의되지 않았거나, 도메인 구매 수량은 1개 이상이어야 합니다.");
+ }
+ //onetime_note 도메인 구매 수량
+ $note = $this->request->get('note');
+ if (!$note) {
+ throw new \Exception("도메인 리스트 값이 정의되지 않았습니다.");
+ }
+ //onetime_case 사용용도
+ $onetime_case = $this->request->get('onetime_case', 'domain');
+ //onetime_request_date 사용일
+ $onetime_request_date = $this->request->get('onetime_request_date') ?? date("Y-m-d");
+ try {
+ $this->getServiceService()->beginTransaction();
+ //서비스쿠폰 갯수 수정
+ $this->getServiceService()->useCouponByService($this->service, $coupon);
+ //쿠폰 사용내역 onetime에 등록
+ $this->getOnetimeService()->useCouponByService($this->service, $this->client, $this->member, $onetime_case, $coupon, $note, $onetime_request_date);
+ //쿠폰 사용내역 history에 등록
+ $this->getHistoryService()->useCouponByService($this->service, $this->client, $onetime_case, $coupon, $note, $onetime_request_date);;
+ $this->getServiceService()->commit();
+ return $this->redirect->to(DBMS_SITE_URL . "/IdcCouponUseMK.cup?client_code=" . $this->service->getClientCode());
+ } catch (\Exception $e) {
+ $this->getServiceService()->rollback();
+ return $this->redirect->back()->withInput()->with('error', ['message' => '쿠폰 사용에 실패하였습니다.:' . $e->getMessage()]);
+ }
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/Client/DashboardController.php b/extdbms/lib/Controllers/Client/DashboardController.php
new file mode 100644
index 0000000..8519bb5
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/DashboardController.php
@@ -0,0 +1,99 @@
+setPath('dashboard');
+ } //
+
+ protected function setDefaultRequestData(): array
+ {
+ $this->client = null;
+ $this->member = null;
+ $this->service = null;
+ //사용자정보
+ $client_code = $this->request->get('client_code');
+ // echo "Client_Code:" . $client_code;
+ // exit;
+ if ($client_code) {
+ $this->getClientService()->getModel()->where('Client_Code', $client_code);
+ $client = $this->getClientService()->getEntity();
+ if (!$client) {
+ throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
+ }
+ $this->client = $client;
+ }
+ //관리자정보(등록자)
+ $member_code = $this->request->get('mkid');
+ // echo "member_code:" . $member_code;
+ if ($member_code) {
+ $this->getMemberService()->getModel()->where($this->getMemberService()->getModel()::PKField, $member_code);
+ $member = $this->getMemberService()->getEntity();
+ if (!$member) {
+ throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
+ }
+ $this->member = $member;
+ }
+ //서비스정보
+ $service_code = $this->request->get('service_code');
+ // echo "service_code:" . $service_code;
+ if ($service_code) {
+ $this->getServiceService()->getModel()->where($this->getServiceService()->getModel()::PKField, $service_code);
+ $service = $this->getServiceService()->getEntity();
+ if (!$service) {
+ throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
+ }
+ $this->service = $service;
+ }
+ return [$client_code, $member_code, $service_code];
+ }
+
+ //서비스카운팅 , total_counting_customer.php
+ //CLI 접속방법 : php index.php site/client/totalcount/client_code/코드번호
+ //WEB 접속방법 : http://localhost/site/client/totalcount/client_code/코드번호
+ public function totalcount()
+ {
+ //사용자정보
+ $client_code = $this->request->get('client_code');
+ // echo "Client_Code:" . $client_code;
+ if ($client_code) {
+ $this->getClientService()->getModel()->where('Client_Code', $client_code);
+ $client = $this->getClientService()->getEntity();
+ if (!$client) {
+ throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
+ }
+ $this->client = $client;
+ }
+ //서비스위치별(치바,도쿄등)
+ $dashboard = [];
+ foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) {
+ $switchcode_begin = $switchcodes['begin'];
+ $switchcode_end = $switchcodes['end'];
+ $this->getServiceService()->getModel()->where("client_code", "{$client_code}");
+ $this->getServiceService()->getModel()->where("service_sw BETWEEN '{$switchcode_begin}' AND '{$switchcode_end}'");
+ $this->getServiceService()->getModel()->where("service_status", "o");
+ $this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
+ $dashboard[$district] = $this->getServiceService()->getCount();
+ } //foreach
+ //서비스라인별(일반,방어,전용,테스트,대체,vpn,event등)
+ foreach (DBMS_SERVICE_LINE_ALL as $service_line => $label) {
+ $this->getServiceService()->getModel()->where('client_code', $client_code);
+ $this->getServiceService()->getModel()->where('service_line', $service_line);
+ $dashboard[$service_line] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
+ } //foreach
+ //서비스상태별(일반,방어만)
+ $this->getServiceService()->getModel()->where("client_code", $client_code);
+ $this->getServiceService()->getModel()->whereNotIn("service_line", ['solo', 'test', 'event', 'substitution']);
+ $dashboard['coupon'] = $this->getServiceService()->getCount("SUM(coupon) as cnt");
+ $this->dashboard = $dashboard;
+ $this->client_code = $client_code;
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/Client/MemoController.php b/extdbms/lib/Controllers/Client/MemoController.php
new file mode 100644
index 0000000..60c8f78
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/MemoController.php
@@ -0,0 +1,31 @@
+setPath('memo');
+ $this->helper = new ServiceHelper();
+ } //
+ //사용자용메모장 , customer_memo.php
+ //CLI 접속방법 : php index.php site/client/memo/update_form/client_code/코드번호
+ //WEB 접속방법 : http://localhost/site/client/memo/update_form/client_code/코드번호
+ public function update_form()
+ {
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ return $this->render(__FUNCTION__);
+ }
+
+ public function update()
+ {
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/Client/PaymentController.php b/extdbms/lib/Controllers/Client/PaymentController.php
new file mode 100644
index 0000000..77e1cdc
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/PaymentController.php
@@ -0,0 +1,71 @@
+setPath('payment');
+ } //
+
+ //청구서, depositbillpaper.php
+ //CLI 접속방법 : php index.php site/client/payment/billpaper
+ //WEB 접속방법 : http://localhostsite/client/payment/billpaper
+ public function billpaper()
+ {
+ $sitekey = $this->request->get('sitekey');
+ if (!$sitekey) {
+ throw new \Exception("sitekey 값이 정의되지 않았습니다.");
+ }
+ $this->siteInfo = DBMS_SITEINFOS[$sitekey];
+ //기본적으로 필요한 client_code, mkid, service_code를 설정합니다.
+ list($client_code, $member_code, $service_code) = $this->setDefaultRequestData();
+ return $this->render(__FUNCTION__);
+ }
+ //미납리스트트, NonPaymentList.php
+ //CLI 접속방법 : php index.php site/client/payment/index
+ //WEB 접속방법 : http://localhostsite/client/payment/index
+ public function index()
+ {
+ //Client_Code = ["C219"=>WinIDC,"C116"=>IDC-JP"] -> 미지급금계산 제외 Client_Code
+ $exclude_clients = ['C116', 'C219'];
+ //mode 당일,1일전,2일전,3일전,custom
+ $today = date("Y-m-d");;
+ $mode = $this->request->get('mode', 'all');
+ switch ($mode) {
+ case 'today':
+ $this->message = "[{$today}] 기준 당일 ";
+ $this->getServiceService()->getModel()->where("service_payment_date = CURDATE()");
+ break;
+ case '1day':
+ $nonpaymentDay = 1;
+ $this->message = "[{$today}] 기준 {$nonpaymentDay}일전";
+ $this->getServiceService()->getModel()->where("service_payment_date = Date_Add(CURDATE(),INTERVAL {$nonpaymentDay} DAY)");
+ break;
+ case '2day':
+ $nonpaymentDay = 2;
+ $this->message = "[{$today}] 기준 {$nonpaymentDay}일전";
+ $this->getServiceService()->getModel()->where("service_payment_date = Date_Add(CURDATE(),INTERVAL {$nonpaymentDay} DAY)");
+ break;
+ case '3day':
+ $nonpaymentDay = 3;
+ $this->message = "[{$today}] 기준 {$nonpaymentDay}일전";
+ $this->getServiceService()->getModel()->where("service_payment_date = Date_Add(CURDATE(),INTERVAL {$nonpaymentDay} DAY)");
+ break;
+ case 'all':
+ default:
+ $this->message = "[{$today}] 기준 전체";
+ break;
+ }
+ $this->mode = $mode;
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ [$this->total, $this->entities] = $this->getServiceService()->getEntitiesForNonPayment($this->curPage, $this->perPage, $exclude_clients);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/Client/PointController.php b/extdbms/lib/Controllers/Client/PointController.php
new file mode 100644
index 0000000..9ab850a
--- /dev/null
+++ b/extdbms/lib/Controllers/Client/PointController.php
@@ -0,0 +1,144 @@
+setPath('point');
+ $this->helper = new PointHelper();
+ } //
+ public function getPointService(): PointService
+ {
+ if ($this->_pointService === null) {
+ $this->_pointService = new PointService();
+ }
+ return $this->_pointService;
+ }
+ public function getOnetimeService(): OnetimeService
+ {
+ if ($this->_onetimeService === null) {
+ $this->_onetimeService = new OnetimeService();
+ }
+ return $this->_onetimeService;
+ }
+ public function getHistoryService(): HistoryService
+ {
+ if ($this->_historyService === null) {
+ $this->_historyService = new HistoryService();
+ }
+ return $this->_historyService;
+ }
+
+ //IdcClientPointList.jsp
+ //CLI 접속방법 : php index.php site/client/point/index
+ //WEB 접속방법 : http://localhost/site/client/point/index
+ public function index()
+ {
+ //전체 고객객정보
+ $this->clients = $this->getClientService()->getEntities();
+ //사용자코드가 있으면,
+ $client_code = $this->request->get('client_code');
+ if ($client_code) {
+ $this->getPointService()->getModel()->where('client_code', $client_code);
+ }
+ $this->client_code = $client_code;
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ [$this->total, $this->entities] = $this->getPointService()->getList($this->curPage, $this->perPage);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ return $this->render(__FUNCTION__);
+ }
+
+ //IdcClientPointInsert.jsp
+ //CLI 접속방법 : php index.php site/client/point/insert_form
+ //WEB 접속방법 : http://localhost/site/client/point/insert_form
+ public function insert_form()
+ {
+ //전체 고객객정보
+ $this->clients = $this->getClientService()->getEntities();
+ //사용자코드가 있으면,
+ $client_code = $this->request->get('client_code');
+ if ($client_code) {
+ $this->getPointService()->getModel()->where('client_code', $client_code);
+ }
+ $this->client_code = $client_code;
+ return $this->render(__FUNCTION__);
+ }
+
+ //IdcPointBuyMK.jsp -> domain_point_buy.php
+ //CLI 접속방법 : php index.php site/client/point/insert_form
+ //WEB 접속방법 : http://localhost/site/client/point/insert_form
+ public function insert()
+ {
+ try {
+ //Client Code 형식
+ $client_code = $this->request->get('client_code');
+ if (!$client_code) {
+ throw new \Exception("고객을 선택하지 않으셨습니다.");
+ }
+ $this->getClientService()->getModel()->where('Client_Code', $client_code);
+ $client = $this->getClientService()->getEntity();
+ if (!$client) {
+ throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다.");
+ }
+ //포인트 형식
+ $type = $this->request->get('type');
+ if (!$type) {
+ throw new \Exception("포인트 형식이 정의되지 않았습니다.");
+ }
+ //포인트 값
+ $amount = intval($this->request->get('amount'));
+ if (! $amount || $amount < 1) {
+ throw new \Exception("포인트 값이 정의되지 않았거나, 포인트값은 1 이상이어야 합니다.");
+ }
+ //포인트 작업 내용
+ $note = $this->request->get('note');
+ // //onetime_case 사용용도
+ // $onetime_case = $this->request->get('onetime_case', 'point');
+ // //onetime_request_date 사용일
+ // $onetime_request_date = $this->request->get('onetime_request_date') ?? date("Y-m-d");
+ $formDatas = [
+ 'client_code' => $client_code,
+ 'type' => $type,
+ 'title' => date("Y-m-d") . ", [$amount] 포인트, " . DBMS_CLIENT_POINT_TYPE[$type],
+ 'amount' => $amount,
+ 'note' => $note
+ ];
+ $this->getServiceService()->beginTransaction();
+ // //포인트 사용내역 onetime에 등록
+ // $this->getOnetimeService()->usePointByService($service, $client, $member, $onetime_case, $point, $note, $onetime_request_date);
+ // //포인트 사용내역 history에 등록
+ // $this->getHistoryService()->usePointByService($service, $client, $onetime_case, $point, $note, $onetime_request_date);;
+ //포인트 사용내역 point에 등록
+ $this->getPointService()->getModel()->insert($formDatas);
+ if ($type == 'withdrawal') { //사용자 포인트 출금
+ $this->getClientService()->withdrawalPoint($this->client, $amount);
+ } else { //사용자 포인트 입금
+ $this->getClientService()->depositPoint($this->client, $amount);
+ }
+ $this->getServiceService()->commit();
+ $message_key = 'success';
+ $message = "포인트 : [$amount]" . DBMS_CLIENT_POINT_TYPE[$type] . "이 완료되었습니다";
+ } catch (\PDOException $e) {
+ $this->getServiceService()->rollback();
+ $message_key = 'error';
+ $message = "실패:" . $e->getMessage();
+ } catch (\Exception $e) {
+ $message_key = 'error';
+ $message = "실패" . $e->getMessage();
+ }
+ return $this->redirect->to(DBMS_SITE_URL . "/IdcPointList.cup?client_code=$client_code")->with($message_key, ['message' => $message]);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/CommonController.php b/extdbms/lib/Controllers/CommonController.php
new file mode 100644
index 0000000..3a07645
--- /dev/null
+++ b/extdbms/lib/Controllers/CommonController.php
@@ -0,0 +1,13 @@
+setPath('dbms');
+ $this->setLayout('dbms_layout.php');
+ } //
+
+ final public function getServiceService(): ServiceService
+ {
+ if ($this->_service === null) {
+ $this->_service = new ServiceService();
+ }
+ return $this->_service;
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/DashboardController.php b/extdbms/lib/Controllers/DashboardController.php
new file mode 100644
index 0000000..bd3d111
--- /dev/null
+++ b/extdbms/lib/Controllers/DashboardController.php
@@ -0,0 +1,217 @@
+setPath('dashboard');
+ $this->helper = new ServiceHelper();
+ } //
+ public function getMemberService(): MemberService
+ {
+ if ($this->_memberService === null) {
+ $this->_memberService = new MemberService();
+ }
+ return $this->_memberService;
+ }
+
+ public function getClientService(): ClientService
+ {
+ if ($this->_clientService === null) {
+ $this->_clientService = new ClientService();
+ }
+ return $this->_clientService;
+ }
+
+ public function getVPCService(): VPCService
+ {
+ if ($this->_vpcService === null) {
+ $this->_vpcService = new VPCService();
+ }
+ return $this->_vpcService;
+ }
+ public function getKCSService(): KCSService
+ {
+ if ($this->_kcsService === null) {
+ $this->_kcsService = new KCSService();
+ }
+ return $this->_kcsService;
+ }
+ public function getHistoryService(): HistoryService
+ {
+ if ($this->_historyService === null) {
+ $this->_historyService = new HistoryService();
+ }
+ return $this->_historyService;
+ }
+ //Dashboard , default_alert.php
+ //CLI 접속방법 : php index.php site/dashboard/topboard
+ //WEB 접속방법 : http://localhost/site/dashboard/topboard
+ public function topboard()
+ {
+ // 최근7일 신규서버수
+ //예외,service_line = "test","substitution"
+ $excepts = ["test", "substitution"];
+ $this->day = intval(DBMS_SITE_DASHBOARD_DAY);
+ $this->getServiceService()->getModel()->where("service_open_date > DATE_ADD(now(), INTERVAL -{$this->day} DAY)");
+ $this->getServiceService()->getModel()->where("service_status", 'o');
+ $this->getServiceService()->getModel()->whereNotIn("service_line", $excepts);
+ $this->newServices = $this->getServiceService()->getCount();
+ // 금일기준 미납서버수
+ //예외,service_line = "test","substitution",C012:게임윙,C116:WinIDC,C219:IDC-JP
+ $excepts = ["test", "substitution", 'C116', 'C012', 'C219'];
+ $this->getServiceService()->getModel()->where("service_payment_date > now()");
+ $this->getServiceService()->getModel()->where("service_status", 'o');
+ $this->getServiceService()->getModel()->whereNotIn("service_line", $excepts);
+ $this->unPayments = $this->getServiceService()->getCount();
+ return $this->render(__FUNCTION__);
+ }
+
+ //서비스카운팅 , total_counting.php
+ //CLI 접속방법 : php index.php site/dashboard/totalcount/sitekey/도메인
+ //WEB 접속방법 : http://localhost/site/dashboard/totalcount/sitekey/도메인
+ public function totalcount()
+ {
+ $sitekey = $this->request->get('sitekey');
+ if (!$sitekey) {
+ throw new \Exception("sitekey 값이 정의되지 않았습니다.");
+ }
+ $this->siteInfo = DBMS_SITEINFOS[$sitekey];
+ $this->totalcount = $this->getServiceService()->getTotalCountForDashboard($this->siteInfo);
+ $summary = array();
+ foreach ($this->siteInfo['totalcount_types'] as $type) {
+ $summary[$type] = array("Tokyo" => 0, "Chiba" => 0);
+ }
+ foreach ($this->totalcount as $company => $service) {
+ $summary[$company] = array("Tokyo" => 0, "Chiba" => 0);
+ foreach ($service as $name => $location) {
+ $summary[$company]['Tokyo'] += $location['Tokyo'];
+ $summary[$name]['Tokyo'] += $location['Tokyo'];
+ $summary[$company]['Chiba'] += $location['Chiba'];
+ $summary[$name]['Chiba'] += $location['Chiba'];
+ }
+ }
+ $total = array("Tokyo" => 0, "Chiba" => 0);
+ foreach ($this->siteInfo['totalcount_types'] as $type) {
+ $total['Tokyo'] += $summary[$type]['Tokyo'];
+ $total['Chiba'] += $summary[$type]['Chiba'];
+ }
+ $this->summary = $summary;
+ $this->total = $total;
+ return $this->render(__FUNCTION__);
+ }
+ //신규서버현황 new_server_list.php
+ //CLI 접속방법 : php index.php site/dashboard/latest_service/limit/5
+ //WEB 접속방법 : http://localhost/site/dashboard/latest_service/limit/5
+ public function latest_service()
+ {
+ //신규서버정보
+ $this->limit = intval($this->request->get('limit', 5));
+ $this->getServiceService()->getModel()->orderBy($this->getServiceService()->getModel()->getPKField(), 'DESC');
+ $this->getServiceService()->getModel()->limit($this->limit);
+ $this->entities = $this->getServiceService()->getEntities();
+
+ //전체 관리자정보(등록자)
+ $this->members = $this->getMemberService()->getEntities();
+ $clients = [];
+ $vpcs = [];
+ $kcss = [];
+ $cnt = 1;
+ foreach ($this->entities as $entity) {
+ $serviceCode = $entity->getServiceCode();
+ //해당 고객정보
+ $this->getClientService()->getModel()->where('client_code', $entity->getClientCode());
+ $client = $this->getClientService()->getEntity();
+ if (!$client) {
+ throw new \Exception("{$entity->getClientCode()}에 해당하는 고객정보가 존재하지 않습니다.");
+ }
+ $clients[$serviceCode] = $client;
+ //VPC정보갯수
+ $this->getVPCService()->getModel()->where('service_code', $serviceCode);
+ $vpcs[$serviceCode] = $this->getVPCService()->getCount();
+ //KCS정보갯수
+ $this->getKCSService()->getModel()->where('service_code', $serviceCode);
+ $kcss[$serviceCode] = $this->getKCSService()->getCount();
+ $cnt++;
+ }
+ // dd($this->entitys);
+ $this->clients = $clients;
+ $this->vpcs = $vpcs;
+ $this->kcss = $kcss;
+ return $this->render(__FUNCTION__);
+ }
+ //CLI 접속방법 : php index.php site/dashboard/latest_history/limit/5
+ //WEB 접속방법 : http://localhost/site/dashboard/latest_history/limit/5
+ public function latest_history()
+ {
+ //신규History정보
+ $this->limit = intval($this->request->get('limit', 5));
+ $this->getHistoryService()->getModel()->orderBy($this->getHistoryService()->getModel()->getPKField(), 'DESC');
+ $this->getHistoryService()->getModel()->limit($this->limit);
+ $this->entities = $this->getHistoryService()->getEntities();
+ //전체 서비스정보
+ $this->services = $this->getServiceService()->getEntities();
+ //services 고객정보
+ $this->clients = $this->getClientService()->getEntities();
+ return $this->render(__FUNCTION__);
+ }
+ //service_list_cs_count.php
+ //CLI 접속방법 : php index.php site/dashboard/cscount/service_code/서비스코드
+ //WEB 접속방법 : http://localhost/site/dashboard/cscount/service_code/서비스코드
+ public function cscount()
+ {
+ //서비스정보
+ $service_code = $this->request->get('service_code');
+ // echo "service_code:" . $service_code;
+ if (!$service_code) {
+ throw new \Exception("service_code 값이 정의되지 않았습니다.");
+ }
+ $this->getServiceService()->getModel()->where($this->getServiceService()->getModel()::PKField, $service_code);
+ $service = $this->getServiceService()->getEntity();
+ if (!$service) {
+ throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
+ }
+ $this->service = $service;
+ //VPC정보갯수
+ $this->getVPCService()->getModel()->where('service_code', $service->getServiceCode());
+ $this->vpc = $this->getVPCService()->getCount();
+ //KCS정보갯수
+ $this->getKCSService()->getModel()->where('service_code', $service->getServiceCode());
+ $this->kcs = $this->getKCSService()->getCount();
+ return $this->render(__FUNCTION__);
+ }
+ //service_list_cs_count.php
+ //CLI 접속방법 : php index.php site/dashboard/cscount/service_code/서비스코드
+ //WEB 접속방법 : http://localhost/site/dashboard/cscount/service_code/서비스코드
+ public function coupon()
+ {
+ //서비스정보
+ $service_code = $this->request->get('service_code');
+ // echo "service_code:" . $service_code;
+ if (!$service_code) {
+ throw new \Exception("service_code 값이 정의되지 않았습니다.");
+ }
+ $this->getServiceService()->getModel()->where($this->getServiceService()->getModel()::PKField, $service_code);
+ $service = $this->getServiceService()->getEntity();
+ if (!$service) {
+ throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
+ }
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/DefenceController.php b/extdbms/lib/Controllers/DefenceController.php
new file mode 100644
index 0000000..5cb3916
--- /dev/null
+++ b/extdbms/lib/Controllers/DefenceController.php
@@ -0,0 +1,42 @@
+setPath('defence');
+ } //
+ public function getDefenceService(): DefenceService
+ {
+ if ($this->_clientService === null) {
+ $this->_clientService = new DefenceService();
+ }
+ return $this->_clientService;
+ }
+
+ //방어 defense_index.php
+ //CLI 접속방법 : php index.php site/defence/index/zone/존/parent/부모키/child/자식키
+ //WEB 접속방법 : http://localhost/site/defence/index/zone/존/parent/부모키/child/자식키
+ public function index()
+ {
+ $zone = $this->request->get('zone');
+ if (!$zone) {
+ throw new \Exception("zone 값이 정의되지 않았습니다.");
+ }
+ $this->zone = urldecode($zone);
+ $this->getDefenceService()->getModel()->where(['zone' => $this->zone]);
+ $this->getDefenceService()->getModel()->orderBy(['zone' => 'asc', 'parents' => 'asc', 'child' => 'asc']);
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ [$this->total, $this->entities] = $this->getDefenceService()->getList($this->curPage, $this->perPage);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/GearlistController.php b/extdbms/lib/Controllers/GearlistController.php
new file mode 100644
index 0000000..e21e774
--- /dev/null
+++ b/extdbms/lib/Controllers/GearlistController.php
@@ -0,0 +1,60 @@
+setPath('gearlist');
+ } //
+ public function getGearlistService(): GearlistService
+ {
+ if ($this->_gearlistServicerService === null) {
+ $this->_gearlistServicerService = new GearlistService();
+ }
+ return $this->_gearlistServicerService;
+ }
+ public function getServerService(): ServerService
+ {
+ if ($this->_serverService === null) {
+ $this->_serverService = new ServerService();
+ }
+ return $this->_serverService;
+ }
+ //가용장비 현황 server_use.php
+ //CLI 접속방법 : php index.php site/server/use
+ //WEB 접속방법 : http://localhost site/server/use
+ private function setMode(GearlistEntity $entity): GearlistEntity
+ {
+ $lineup_explode = explode('.', $entity->getSpec());
+ $spec = $lineup_explode[0];
+ $cpu = $entity->getCPUName();
+ $entity->all = $this->getServerService()->getCountByMode("all", $cpu, $spec);
+ $entity->use = $this->getServerService()->getCountByMode("use", $cpu, $spec);
+ $entity->empty = $this->getServerService()->getCountByMode("empty", $cpu, $spec);
+ $entity->format = $this->getServerService()->getCountByMode("format", $cpu, $spec);
+ return $entity;
+ }
+ public function index()
+ {
+ $gearlistEntities = $this->getGearlistService()->getEntitiesForLineUp();
+ //DB에 넣지않는 이유가 뭘까? DB에 넣으면 관리가 힘들어서?
+ $gearlistEntities[] = new GearlistEntity(['process' => "INTEL i5(구세대)", 'spec' => "i5-2.xx", "cpuname" => "i5-2", 'price' => "23"]);
+ $gearlistEntities[] = new GearlistEntity(['process' => "INTEL i7(구세대)", 'spec' => "i7-2.xx", "cpuname" => "i7-2", 'price' => "45"]);
+ $gearlistEntities[] = new GearlistEntity(['process' => "INTEL i7(4세대)", 'spec' => "i7-4.xx", "cpuname" => "i7-4", 'price' => "45"]);
+ $entities = [];
+ foreach ($gearlistEntities as $idx => $gearlistEntity) {
+ $entities[] = $this->setMode($gearlistEntity);
+ }
+ $this->entities = $entities;
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/HomeController.php b/extdbms/lib/Controllers/HomeController.php
new file mode 100644
index 0000000..a84f7e6
--- /dev/null
+++ b/extdbms/lib/Controllers/HomeController.php
@@ -0,0 +1,14 @@
+setPath('server');
+ } //
+ public function getServerService(): ServerService
+ {
+ if ($this->_serverService === null) {
+ $this->_serverService = new ServerService();
+ }
+ return $this->_serverService;
+ }
+ public function getClientService(): ClientService
+ {
+ if ($this->_clientService === null) {
+ $this->_clientService = new ClientService();
+ }
+ return $this->_clientService;
+ }
+} //Class
diff --git a/extdbms/lib/Controllers/ServiceController.php b/extdbms/lib/Controllers/ServiceController.php
new file mode 100644
index 0000000..bdcc14c
--- /dev/null
+++ b/extdbms/lib/Controllers/ServiceController.php
@@ -0,0 +1,86 @@
+setPath('service');
+ } //
+ public function getClientService(): ClientService
+ {
+ if ($this->_clientService === null) {
+ $this->_clientService = new ClientService();
+ }
+ return $this->_clientService;
+ }
+ public function getAddDbService(): AddDbService
+ {
+ if ($this->_addDbService === null) {
+ $this->_addDbService = new AddDbService();
+ }
+ return $this->_addDbService;
+ }
+ //IP검색 :
+ //CLI 접속방법 : php index.php site/service/ipsearch
+ //WEB 접속방법 : http://localhost/site/service/ipsearch
+ public function ipsearch()
+ {
+ $ip = $this->request->get('ip');
+ //전체 고객정보
+ $this->clients = $this->getClientService()->getEntities();
+ //IP형식이 ipv4이면 해당 IP만 , 아니면 like , 없으면 all 값가져오기
+ if ($ip && $this->helper->isIPAddress($ip)) {
+ $this->getServiceService()->getModel()->where('service_ip', $ip);
+ } elseif ($ip) {
+ $this->getServiceService()->getModel()->like('service_ip', $ip);
+ }
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ [$this->total, $this->entities] = $this->getServiceService()->getList($this->curPage, $this->perPage);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ return $this->render(__FUNCTION__);
+ }
+
+ //부가서비스 : 닷 디펜더,딥 파인더 ,M307-1,M394-2등, deepfinder_list.php,dotdefender_list.php
+ //CLI 접속방법 : php index.php site/service//extra/adddb_code/코드번호
+ //WEB 접속방법 : http://localhost/site/service/extra/adddb_code/코드번호
+ public function extra()
+ {
+ $adddb_code = $this->request->get('adddb_code');
+ if (!$adddb_code) {
+ throw new \Exception("adddb_code 값이 정의되지 않았습니다.");
+ }
+ $this->adddb_code = urldecode($adddb_code);
+ //해당 부가서비스의 services_code 목록 가져오기
+ //segment의 값이 한글인경우 urldecode가 필요
+ $this->getAddDbService()->getModel()->where('addDB_code', $this->adddb_code);
+ $addDbEntities = $this->getAddDbService()->getEntities();
+ $service_codes = [];
+ foreach ($addDbEntities as $entity) {
+ $service_codes[] = $entity->getServiceCode();
+ }
+ if (!count($service_codes)) {
+ throw new \Exception("[{$this->adddb_code}] 값에 해당하는 부가서비스정보가 존재하지 않습니다.");
+ }
+ //전체 사용자정보
+ $this->clients = $this->getClientService()->getEntities();
+ //부가서비스용 서비스목록 가져오기
+ $this->curPage = intval($this->request->get('curPage', 1));
+ $this->perPage = intval($this->request->get('perPage', APP_VIEW_LIST_PERPAGE));
+ $this->getServiceService()->getModel()->whereIn('service_code', $service_codes);
+ [$this->total, $this->entities] = $this->getServiceService()->getList($this->curPage, $this->perPage);
+ $this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
+ return $this->render(__FUNCTION__);
+ }
+} //Class
diff --git a/extdbms/lib/Core/App.php b/extdbms/lib/Core/App.php
new file mode 100644
index 0000000..a1a5fe8
--- /dev/null
+++ b/extdbms/lib/Core/App.php
@@ -0,0 +1,38 @@
+parseCliUri() : $_SERVER['REQUEST_URI'];
+ $method = php_sapi_name() === 'cli' ? 'GET' : $_SERVER['REQUEST_METHOD'];
+ $response = $router->dispatch($uri, $method);
+ if ($response instanceof Response) {
+ $response->send();
+ } else {
+ echo $response; // 단순 string 반환일 경우 (fallback)
+ }
+ }
+
+ /**
+ * CLI 요청에서 URI를 파싱하는 메서드
+ * @return string
+ */
+ private function parseCliUri(): string
+ {
+ global $argv;
+ return $argv[1] ?? '';
+ }
+}
diff --git a/extdbms/lib/Core/Controller.php b/extdbms/lib/Core/Controller.php
new file mode 100644
index 0000000..4e388c9
--- /dev/null
+++ b/extdbms/lib/Core/Controller.php
@@ -0,0 +1,75 @@
+url = new Url();
+ $this->request = new Request($params);
+ $this->session = new Session();
+ $this->redirect = new Redirect($this->session);
+ $this->logger = new Logger();
+ $this->_view = new View();
+ } //
+ final public function __get($name): mixed
+ {
+ return $this->_view->$name;
+ }
+ final public function __set($name, $value): void
+ {
+ $this->_view->$name = $value;
+ }
+ final public function __call($name, $arguments)
+ {
+ if (method_exists($this, $name)) {
+ return call_user_func_array([$this, $name], $arguments);
+ }
+ throw new \BadMethodCallException("Method {$name} does not exist.");
+ } //
+ final public function setLayout(string $file): void
+ {
+ $this->_view->setLayout($file);
+ }
+ final public function setPath(string $path): void
+ {
+ $this->_view->setPath($path);
+ }
+ public function render(string $file): Response
+ {
+ // if (empty($file)) {
+ // throw new \InvalidArgumentException("File name cannot be empty.");
+ // }
+ // $this->_view->setFile($file);
+ // $this->_view->setLayout($this->layout);
+ // $this->_view->setPath($this->path);
+ // $this->_view->setParams($this->params);
+ // $this->_view->setUrl($this->url);
+ // $this->_view->setRequest($this->request);
+ // $this->_view->setSession($this->session);
+ // $this->_view->setRedirect($this->redirect);
+ // $this->_view->setLogger($this->logger);
+ return new Response($this->_view->render($file), 200, ['Content-Type' => 'text/html']);
+ }
+} //Class
diff --git a/extdbms/lib/Core/Database/DB.php b/extdbms/lib/Core/Database/DB.php
new file mode 100644
index 0000000..0a2e89d
--- /dev/null
+++ b/extdbms/lib/Core/Database/DB.php
@@ -0,0 +1,23 @@
+setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+ }
+ return self::$pdo;
+ }
+}
diff --git a/extdbms/lib/Core/Database/QueryBuilder.php b/extdbms/lib/Core/Database/QueryBuilder.php
new file mode 100644
index 0000000..dc21fcb
--- /dev/null
+++ b/extdbms/lib/Core/Database/QueryBuilder.php
@@ -0,0 +1,393 @@
+pdo = $pdo;
+ }
+ final public function setDebug(bool $debug): void
+ {
+ $this->_debug = $debug;
+ }
+ final public function setContinue(bool $continue): void
+ {
+ $this->_continue = $continue;
+ }
+ final public function getLastQuery(): string
+ {
+ return $this->latestQuery;
+ }
+ final public function table(string $table): static
+ {
+ $this->table = $table;
+ return $this;
+ }
+
+ protected function buildSelectSql(?string $select = null): string
+ {
+ $select = $select ?? implode(', ', $this->select);
+ $sql = "SELECT {$select} FROM {$this->table}";
+ // ⬇️ Join 처리 추가
+ if (!empty($this->joins)) {
+ $sql .= ' ' . implode(' ', $this->joins);
+ }
+ if (!empty($this->where)) {
+ $sql .= " WHERE " . $this->buildWhereSql();
+ }
+ if (!empty($this->order)) {
+ $sql .= " ORDER BY " . implode(', ', $this->order);
+ }
+ if ($this->limit) {
+ $sql .= " LIMIT {$this->limit}";
+ }
+ if ($this->offset) {
+ $sql .= " OFFSET {$this->offset}";
+ }
+ return $sql;
+ }
+ protected function buildWhereSql(): string
+ {
+ $sql = '';
+ foreach ($this->where as $index => $clause) {
+ if (is_array($clause)) {
+ $boolean = $index === 0 ? '' : $clause['boolean'] . ' ';
+ $sql .= $boolean . $clause['condition'] . ' ';
+ } else {
+ // 문자열 형태일 경우 (like에서 사용됨)
+ $boolean = $index === 0 ? '' : 'AND ';
+ $sql .= $boolean . $clause . ' ';
+ }
+ }
+ return trim($sql);
+ }
+
+ //Select부분분
+ final public function select(array|string $columns): static
+ {
+ $this->select = is_array($columns) ? $columns : explode(',', $columns);
+ return $this;
+ }
+
+ //Where절부분
+ final public function where(array|string $column, mixed $value = null, ?string $operator = null, string $boolean = "AND"): static
+ {
+ if (is_array($column)) {
+ foreach ($column as $col => $val) {
+ $this->where($col, $val); // 재귀 호출
+ }
+ return $this;
+ }
+ // where("col = NOW()") 형태의 raw 처리
+ if ($value === null && $operator === null) {
+ $this->where[] = ['condition' => $column, 'boolean' => $boolean];
+ return $this;
+ }
+ // where("col", "val") → operator 생략 시 = 처리
+ if ($operator === null) {
+ $operator = "=";
+ }
+ $placeholder = ':w_' . count($this->bindings);
+ $this->where[] = ['condition' => "$column $operator $placeholder", 'boolean' => $boolean];
+ $this->bindings[$placeholder] = $value;
+ return $this;
+ }
+ final public function orWhere(array|string $column, mixed $value = null, ?string $operator = null, string $boolean = "OR"): static
+ {
+ return $this->where($column, $value, $operator, $boolean);
+ }
+ final public function whereIn(string $column, array $values, string $boolean = 'AND', $conditon = "IN"): static
+ {
+ if (empty($values)) {
+ throw new \InvalidArgumentException(__FUNCTION__ . ": values 배열이 비어있을 수 없습니다.");
+ }
+ $placeholders = [];
+ foreach ($values as $index => $value) {
+ $placeholder = ":in_" . count($this->bindings);
+ $placeholders[] = $placeholder;
+ $this->bindings[$placeholder] = $value;
+ }
+ $condition = "$column $conditon (" . implode(', ', $placeholders) . ")";
+ $this->where[] = ['condition' => $condition, 'boolean' => $boolean];
+ return $this;
+ }
+ final public function whereNotIn(string $column, array $values, $boolean = "AND", $conditon = "NOT IN"): static
+ {
+ if (empty($values)) {
+ throw new \InvalidArgumentException(__FUNCTION__ . ": values 배열이 비어있을 수 없습니다.");
+ }
+ return $this->whereIn($column, $values, $boolean, $conditon);
+ }
+ final public function orWhereIn(string $column, array $values, $boolean = "OR", $conditon = "IN"): static
+ {
+ if (empty($values)) {
+ throw new \InvalidArgumentException(__FUNCTION__ . ": values 배열이 비어있을 수 없습니다.");
+ }
+ return $this->whereIn($column, $values, $boolean, $conditon);
+ }
+
+ //Join
+ final public function join(string $table, string $on, string $type = 'INNER'): static
+ {
+ $this->joins[] = strtoupper($type) . " JOIN $table ON $on";
+ return $this;
+ }
+
+ //Like
+ //사용예:
+ // $model->like(['name' => '%홍%', 'email' => '%@naver.com%']);
+ // $model->likeIn(['title', 'description'], '%공지%');
+ // $model->orLikeIn(['name', 'nickname'], '%철수%');
+ public function like(array|string $column, ?string $value = null, string $operator = 'LIKE', string $boolean = "AND"): static
+ {
+ if (is_array($column)) {
+ $conditions = [];
+ foreach ($column as $col => $val) {
+ $placeholder = ':l_' . count($this->bindings);
+ $conditions[] = "$col $operator $placeholder";
+ $this->bindings[$placeholder] = $val;
+ }
+ $this->where[] = '(' . implode(" $boolean ", $conditions) . ')';
+ } else {
+ $placeholder = ':l_' . count($this->bindings);
+ $condition = "$column $operator $placeholder";
+ if (empty($this->where)) {
+ $this->where[] = $condition;
+ } else {
+ $last = array_pop($this->where);
+ $this->where[] = "($last $boolean $condition)";
+ }
+ $this->bindings[$placeholder] = $value;
+ }
+ return $this;
+ }
+ public function orLike(array|string $column, ?string $value = null, string $operator = 'LIKE', string $boolean = "OR"): static
+ {
+ return $this->like($column, $value, $operator, $boolean);
+ }
+
+ public function likeIn(array $columns, string $value, string $operator = "LIKE", string $boolean = "AND"): static
+ {
+ $orConditions = [];
+ foreach ($columns as $col) {
+ $placeholder = ':li_' . count($this->bindings);
+ $orConditions[] = "$col $operator $placeholder";
+ $this->bindings[$placeholder] = $value;
+ }
+ $this->where[] = '(' . implode(" $boolean ", $orConditions) . ')';
+ return $this;
+ }
+ public function orLikeIn(array $columns, string $value, string $operator = "LIKE", string $boolean = "OR"): static
+ {
+ return $this->likeIn($columns, $value, $operator, $boolean);
+ }
+ public function notLikeIn(array $columns, string $value, string $operator = "NOT LIKE", string $boolean = "AND"): static
+ {
+ return $this->likeIn($columns, $value, $operator, $boolean);
+ }
+
+ //Order
+ final public function orderBy(mixed $column, string $direction = 'ASC'): static
+ {
+ if (is_array($column)) {
+ // 배열 형식의 여러 컬럼 정렬을 처리
+ foreach ($column as $col => $dir) {
+ // 배열 키가 컬럼 이름이고 값이 방향임
+ $this->order[] = "$col $dir";
+ }
+ } else {
+ // 단일 컬럼에 대한 정렬
+ $this->order[] = "$column $direction";
+ }
+ return $this;
+ }
+ //Limit부분
+ final public function limit(int $limit): static
+ {
+ $this->limit = $limit;
+ return $this;
+ }
+ final public function offset(int $offset): static
+ {
+ $this->offset = $offset;
+ return $this;
+ }
+
+ //Customer SQL 실행부분
+ final public function raw(string $sql, array $bindings = []): array
+ {
+ $stmt = $this->pdo->prepare($sql);
+ foreach ($bindings as $key => $value) {
+ $stmt->bindValue(is_int($key) ? $key + 1 : $key, $value);
+ }
+ $stmt->execute();
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ //Result부분
+ //binding까지 완료한 SQL문을 return함
+ final public function toRawSql(?string $select = null): string
+ {
+ $raw = $this->buildSelectSql($select);
+ foreach ($this->bindings as $key => $value) {
+ $escaped = is_numeric($value) ? $value : $this->pdo->quote($value);
+ // 명명된 바인딩
+ if (str_starts_with($key, ':')) {
+ $raw = str_replace($key, $escaped, $raw);
+ } else {
+ // 물음표 바인딩인 경우 (whereIn 등)
+ $raw = preg_replace('/\?/', $escaped, $raw, 1);
+ }
+ }
+ return $raw;
+ }
+ private function execute(?string $select = null): PDOStatement
+ {
+ if ($this->_debug) {
+ echo php_sapi_name() === 'cli'
+ ? "\nSQL DEBUG: " . $this->toRawSql($select) . "\n"
+ : "
SQL DEBUG: " . $this->toRawSql($select) . " ";
+ }
+ $this->latestQuery = $this->toRawSql();
+ $stmt = $this->pdo->prepare($this->buildSelectSql($select));
+ foreach ($this->bindings as $key => $value) {
+ $stmt->bindValue($key, $value);
+ }
+ $stmt->execute();
+ return $stmt;
+ }
+ final public function get(?string $select = null): array
+ {
+ $stmt = $this->execute($select);
+ if (!$this->_continue) {
+ $this->where = [];
+ $this->bindings = [];
+ }
+ $this->setContinue(false);
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
+ }
+ final public function first(): ?array
+ {
+ $this->limit = 1;
+ $results = $this->get();
+ return $results[0] ?? null;
+ }
+ final public function count(string $select = "COUNT(*) as cnt"): int
+ {
+ $results = $this->get($select);
+ return (int)($results[0]['cnt'] ?? 0);
+ }
+
+ //CUD부분
+ final public function insert(array $data): bool|int
+ {
+ $columns = [];
+ $placeholders = [];
+ $this->bindings = [];
+
+ foreach ($data as $col => $val) {
+ $safePlaceholder = ':i_' . count($this->bindings);
+ if ($val === null) {
+ // null 값인 경우 SQL 조각으로 처리
+ $placeholders[] = $col;
+ } else {
+ $columns[] = $col;
+ $placeholders[] = $safePlaceholder;
+ $this->bindings[$safePlaceholder] = $val;
+ }
+ }
+
+ $columnsSql = $columns ? '(' . implode(', ', $columns) . ')' : '';
+ $placeholdersSql = '(' . implode(', ', $placeholders) . ')';
+
+ $sql = "INSERT INTO {$this->table} {$columnsSql} VALUES {$placeholdersSql}";
+
+ $stmt = $this->pdo->prepare($sql);
+ foreach ($this->bindings as $key => $value) {
+ $stmt->bindValue($key, $value);
+ }
+
+ $result = $stmt->execute();
+ return $result && $stmt->rowCount() > 0 ? (int)$this->pdo->lastInsertId() : false;
+ }
+
+ final public function update(array $data): bool
+ {
+ if (empty($this->where)) {
+ throw new \Exception(__FUNCTION__ . " 구문은 WHERE절 없이 사용할수 없습니다.");
+ }
+
+ $setParts = [];
+ foreach ($data as $col => $val) {
+ if ($val === null) {
+ // 값이 null이면 $col을 SQL로 직접 사용
+ $setParts[] = $col;
+ } else {
+ $placeholder = ':u_' . preg_replace('/\W+/', '_', $col); // 안전한 placeholder 이름
+ $setParts[] = "$col = $placeholder";
+ $this->bindings[$placeholder] = $val;
+ }
+ }
+
+ $sql = "UPDATE {$this->table} SET " . implode(', ', $setParts)
+ . " WHERE " . $this->buildWhereSql(); // <<< 수정된 부분
+
+ $stmt = $this->pdo->prepare($sql);
+ foreach ($this->bindings as $k => $v) {
+ $stmt->bindValue($k, $v);
+ }
+ return $stmt->execute();
+ }
+
+ final public function delete(): bool
+ {
+ if (empty($this->where)) {
+ throw new \Exception("DELETE 문에는 WHERE 절이 반드시 필요합니다.");
+ }
+
+ $sql = "DELETE FROM {$this->table} WHERE " . $this->buildWhereSql();
+
+ $stmt = $this->pdo->prepare($sql);
+ foreach ($this->bindings as $key => $value) {
+ $stmt->bindValue($key, $value);
+ }
+
+ return $stmt->execute();
+ }
+
+ //transaction관련련
+ final public function beginTransaction(): void
+ {
+ $this->pdo->beginTransaction();
+ }
+
+ final public function commit(): void
+ {
+ $this->pdo->commit();
+ }
+
+ final public function rollBack(): void
+ {
+ if ($this->pdo->inTransaction()) {
+ $this->pdo->rollBack();
+ }
+ }
+}
diff --git a/extdbms/lib/Core/Entity.php b/extdbms/lib/Core/Entity.php
new file mode 100644
index 0000000..53e2b7c
--- /dev/null
+++ b/extdbms/lib/Core/Entity.php
@@ -0,0 +1,24 @@
+_values = $datas;
+ } //
+ final public function __get($name)
+ {
+ return $this->_values[$name];
+ }
+ final public function __set($name, $value)
+ {
+ $this->_values[$name] = $value;
+ }
+ final public function toArray(): array
+ {
+ return $this->_values;
+ }
+} //Class
diff --git a/extdbms/lib/Core/Helper.php b/extdbms/lib/Core/Helper.php
new file mode 100644
index 0000000..83c4a4e
--- /dev/null
+++ b/extdbms/lib/Core/Helper.php
@@ -0,0 +1,8 @@
+getHeader('Authorization');
+ if ($header && str_starts_with($header, 'Bearer ')) {
+ return substr($header, 7);
+ }
+ return null;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Cookie.php b/extdbms/lib/Core/Http/Cookie.php
new file mode 100644
index 0000000..3153259
--- /dev/null
+++ b/extdbms/lib/Core/Http/Cookie.php
@@ -0,0 +1,25 @@
+headers;
+ }
+
+ public function getHeader(string $key): ?string
+ {
+ return $this->headers[$key] ?? null;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Redirect.php b/extdbms/lib/Core/Http/Redirect.php
new file mode 100644
index 0000000..b41007a
--- /dev/null
+++ b/extdbms/lib/Core/Http/Redirect.php
@@ -0,0 +1,52 @@
+session = $session;
+ }
+
+ // 리다이렉트할 때 캐시를 방지하는 헤더 추가
+ private function noCacheHeaders(): void
+ {
+ header("Cache-Control: no-cache, no-store, must-revalidate");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ }
+
+ // 이전 페이지로 리다이렉트 (캐시 방지)
+ public function back(): self
+ {
+ $this->noCacheHeaders(); // 캐시 방지
+ $backUrl = $_SERVER['HTTP_REFERER'] ?? '/';
+ header("Location: {$backUrl}");
+ return $this;
+ }
+
+ // 특정 URL로 리다이렉트 (캐시 방지)
+ public function to(string $url): self
+ {
+ $this->noCacheHeaders(); // 캐시 방지
+ header("Location: {$url}");
+ return $this;;
+ }
+
+ // 세션에 값 추가 후 리다이렉트
+ public function withInput(): self
+ {
+ $this->session->flashInput($_POST);
+ return $this;
+ }
+
+ // 세션에 에러 메시지 저장 후 리다이렉트
+ public function with(string $key, mixed $value): self
+ {
+ $this->session->flash($key, $value);
+ return $this;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Request.php b/extdbms/lib/Core/Http/Request.php
new file mode 100644
index 0000000..4f7ff96
--- /dev/null
+++ b/extdbms/lib/Core/Http/Request.php
@@ -0,0 +1,67 @@
+_datas = array_merge($_GET, $_POST, $params);
+ }
+
+ public function all(): array
+ {
+ return $this->_datas;
+ }
+
+ public function get(?string $key = null, $default = null): mixed
+ {
+ if ($key === null) {
+ return $this->all();
+ }
+ return $this->_datas[$key] ?? $default;
+ }
+
+ public function only(array $keys): array
+ {
+ return array_intersect_key($this->_datas, array_flip($keys));
+ }
+
+ public function has(string $key): bool
+ {
+ return array_key_exists($key, $this->_datas);
+ }
+
+ /**
+ * Validator 연동
+ */
+ //사용예:
+ // $request = new Request();
+
+ // $validation = $request->validate([
+ // 'username' => 'required|alpha_numeric|min[4]',
+ // 'email' => 'required|email',
+ // 'password' => 'required|min[6]'
+ // ]);
+
+ // if ($validation !== true) {
+ // // 에러 처리
+ // print_r($validation);
+ // } else {
+ // // 통과
+ // echo "유효성 검사 통과!";
+ // }
+ public function validate(array $rules, array $messages = []): bool|array
+ {
+ $validator = new Validator();
+ $validator->setData($this->all())->setRules($rules)->setMessages($messages);
+
+ if (!$validator->run()) {
+ return $validator->errors();
+ }
+
+ return true;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Response.php b/extdbms/lib/Core/Http/Response.php
new file mode 100644
index 0000000..f133b2f
--- /dev/null
+++ b/extdbms/lib/Core/Http/Response.php
@@ -0,0 +1,85 @@
+Hello World');
+//2. JSON API 응답
+//return (new Response())->json(['status' => 'success','message' => 'OK']);
+//3. redirect
+//return (new Response())->redirect('/login');
+//4. 파일 다운로드
+//return (new Response())->download('/path/to/manual.pdf', '사용자_매뉴얼.pdf');
+class Response
+{
+ private string $content = '';
+ private int $statusCode = 200;
+ private array $headers = [];
+
+ public function __construct(string $content = '', int $statusCode = 200, array $headers = [])
+ {
+ $this->content = $content;
+ $this->statusCode = $statusCode;
+ $this->headers = $headers;
+ }
+
+ public function setContent(string $content): self
+ {
+ $this->content = $content;
+ return $this;
+ }
+
+ public function setStatusCode(int $code): self
+ {
+ $this->statusCode = $code;
+ return $this;
+ }
+
+ public function header(string $key, string $value): self
+ {
+ $this->headers[$key] = $value;
+ return $this;
+ }
+
+ public function json(array $data): self
+ {
+ $this->header('Content-Type', 'application/json');
+ $this->content = json_encode($data, JSON_UNESCAPED_UNICODE);
+ return $this;
+ }
+
+ public function redirect(string $url): self
+ {
+ $this->statusCode = 302;
+ $this->header('Location', $url);
+ return $this;
+ }
+
+ public function download(string $filePath, ?string $downloadName = null): self
+ {
+ if (!file_exists($filePath)) {
+ return $this->setStatusCode(404)->setContent("File not found.");
+ }
+
+ $downloadName = $downloadName ?? basename($filePath);
+ $this->header('Content-Description', 'File Transfer')
+ ->header('Content-Type', mime_content_type($filePath))
+ ->header('Content-Disposition', 'attachment; filename="' . $downloadName . '"')
+ ->header('Content-Length', (string)filesize($filePath))
+ ->header('Pragma', 'public')
+ ->header('Cache-Control', 'must-revalidate');
+
+ $this->content = file_get_contents($filePath);
+ return $this;
+ }
+
+ public function send(): void
+ {
+ http_response_code($this->statusCode);
+ foreach ($this->headers as $key => $value) {
+ header("$key: $value");
+ }
+ echo $this->content;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Session.php b/extdbms/lib/Core/Http/Session.php
new file mode 100644
index 0000000..0a1893d
--- /dev/null
+++ b/extdbms/lib/Core/Http/Session.php
@@ -0,0 +1,72 @@
+init();
+ }
+
+ // 세션 시작
+ public function init(): void
+ {
+ if (session_status() === PHP_SESSION_NONE) {
+ if (!is_dir(APP_SESSION_PATH)) {
+ mkdir(APP_SESSION_PATH, APP_SESSION_PERMISSION, true);
+ }
+ session_save_path(APP_SESSION_PATH);
+ session_start();
+ }
+ }
+
+ // 세션에 값 저장
+ public function set(string $key, $value): void
+ {
+ $_SESSION[$key] = $value;
+ }
+
+ // 세션에서 값 가져오기
+ public function get(string $key): mixed
+ {
+ return $_SESSION[$key] ?? null;
+ }
+
+ // 세션에서 값 삭제
+ public function remove(string $key): void
+ {
+ unset($_SESSION[$key]);
+ }
+
+ // 세션에 에러 메시지 설정
+ public function flash(string $key, $message): void
+ {
+ $_SESSION['flash'][$key] = $message;
+ }
+
+ // 세션에 입력값 설정 (입력값 유지)
+ public function flashInput(array $input): void
+ {
+ $_SESSION['flash']['input'] = $input;
+ }
+
+ // 세션에 flash 메시지가 있는지 확인
+ public function hasFlash(string $key): bool
+ {
+ return isset($_SESSION['flash'][$key]);
+ }
+
+ // flash 메시지 가져오기
+ public function getFlash(string $key): mixed
+ {
+ return $_SESSION['flash'][$key] ?? null;
+ }
+
+ // flash 메시지 삭제
+ public function clearFlash(): void
+ {
+ unset($_SESSION['flash']);
+ }
+}
diff --git a/extdbms/lib/Core/Http/Url.php b/extdbms/lib/Core/Http/Url.php
new file mode 100644
index 0000000..77ff698
--- /dev/null
+++ b/extdbms/lib/Core/Http/Url.php
@@ -0,0 +1,103 @@
+baseUrl = $this->detectBaseUrl();
+ $this->uri = $this->detectUri();
+ }
+
+ // 현재 전체 URL 반환
+ public function current(): string
+ {
+ return $this->baseUrl . '/' . ltrim($this->uri, '/');
+ }
+
+ // base URL만 반환
+ public function base(): string
+ {
+ return $this->baseUrl;
+ }
+
+ // 세그먼트 배열 반환
+ public function segments(): array
+ {
+ return explode('/', trim($this->uri, '/'));
+ }
+
+ // N번째 세그먼트 반환 (1부터 시작)
+ public function segment(int $n): ?string
+ {
+ $segments = $this->segments();
+ return $segments[$n - 1] ?? null;
+ }
+
+ // 특정 경로에 대한 URL 생성
+ public function to(string $path): string
+ {
+ return rtrim($this->baseUrl, '/') . '/' . ltrim($path, '/');
+ }
+
+ // URI 추출 (도메인 제외)
+ protected function detectUri(): string
+ {
+ $uri = $_SERVER['REQUEST_URI'] ?? '/';
+ $scriptName = dirname($_SERVER['SCRIPT_NAME'] ?? '');
+ $uri = str_replace($scriptName, '', $uri);
+ $uri = strtok($uri, '?'); // 쿼리 스트링 제거
+ return $uri;
+ }
+
+ // base URL 추출
+ protected function detectBaseUrl(): string
+ {
+ $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
+ $host = $_SERVER['HTTP_HOST'] ?? 'localhost';
+ $scriptDir = rtrim(dirname($_SERVER['SCRIPT_NAME'] ?? ''), '/');
+ return $scheme . '://' . $host . $scriptDir;
+ }
+
+ public static function baseUrl(): string
+ {
+ $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
+ $host = $_SERVER['HTTP_HOST'] ?? 'localhost';
+ $script = str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
+
+ return rtrim($protocol . $host . $script, '/');
+ }
+
+ public static function currentUrl(): string
+ {
+ $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
+ $host = $_SERVER['HTTP_HOST'] ?? 'localhost';
+ $uri = $_SERVER['REQUEST_URI'] ?? '';
+
+ return $protocol . $host . $uri;
+ }
+
+ public static function previousUrl(): ?string
+ {
+ return $_SERVER['HTTP_REFERER'] ?? null;
+ }
+
+ public static function urlIs(string $pattern): bool
+ {
+ $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
+ $pattern = str_replace('*', '.*', preg_quote($pattern, '/'));
+ return preg_match("/^{$pattern}$/", $uri) === 1;
+ }
+
+ public static function getSegment(int $index): ?string
+ {
+ $uri = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
+ $segments = explode('/', $uri);
+ return $segments[$index - 1] ?? null;
+ }
+}
diff --git a/extdbms/lib/Core/Http/Validator.php b/extdbms/lib/Core/Http/Validator.php
new file mode 100644
index 0000000..b092527
--- /dev/null
+++ b/extdbms/lib/Core/Http/Validator.php
@@ -0,0 +1,153 @@
+setData([
+// 'username' => 'admin123',
+// 'email' => 'admin@example.com',
+// 'password' => '1234'
+// ])->setRules([
+// 'username' => 'required|alpha_numeric|min[4]|max[20]',
+// 'email' => 'required|email',
+// 'password' => 'required|min[6]'
+// ]);
+
+// if (!$validator->run()) {
+// print_r($validator->errors());
+// }
+
+class Validator extends Http
+{
+ protected array $data = [];
+ protected array $rules = [];
+ protected array $errors = [];
+ protected array $customMessages = [];
+
+ protected array $availableRules = [
+ 'required',
+ 'min',
+ 'max',
+ 'email',
+ 'numeric',
+ 'alpha',
+ 'alpha_numeric'
+ ];
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ public function setData(array $data): self
+ {
+ $this->data = $data;
+ return $this;
+ }
+
+ public function setRules(array $rules): self
+ {
+ $this->rules = $rules;
+ return $this;
+ }
+
+ public function setMessages(array $messages): self
+ {
+ $this->customMessages = $messages;
+ return $this;
+ }
+
+ public function run(): bool
+ {
+ $this->errors = [];
+
+ foreach ($this->rules as $field => $ruleStr) {
+ $rules = explode('|', $ruleStr);
+ $value = $this->data[$field] ?? null;
+
+ foreach ($rules as $rule) {
+ $param = null;
+ if (strpos($rule, '[') !== false) {
+ preg_match('/(\w+)\[(.*?)\]/', $rule, $matches);
+ $rule = $matches[1];
+ $param = $matches[2];
+ }
+
+ $method = "validate_$rule";
+ if (method_exists($this, $method)) {
+ $result = $this->$method($value, $param);
+ if (!$result) {
+ $this->addError($field, $rule, $param);
+ }
+ }
+ }
+ }
+
+ return empty($this->errors);
+ }
+
+ public function errors(): array
+ {
+ return $this->errors;
+ }
+
+ protected function addError(string $field, string $rule, $param = null): void
+ {
+ $message = $this->customMessages["$field.$rule"] ?? $this->defaultMessage($field, $rule, $param);
+ $this->errors[$field][] = $message;
+ }
+
+ protected function defaultMessage(string $field, string $rule, $param): string
+ {
+ return match ($rule) {
+ 'required' => "$field is required.",
+ 'min' => "$field must be at least $param characters.",
+ 'max' => "$field must be at most $param characters.",
+ 'email' => "$field must be a valid email address.",
+ 'numeric' => "$field must be a number.",
+ 'alpha' => "$field must contain only letters.",
+ 'alpha_numeric' => "$field must contain only letters and numbers.",
+ default => "$field is invalid.",
+ };
+ }
+
+ // --- 기본 유효성 검사 메서드 ---
+ protected function validate_required($value): bool
+ {
+ return !empty($value) || $value === '0';
+ }
+
+ protected function validate_min($value, $param): bool
+ {
+ return strlen($value) >= (int)$param;
+ }
+
+ protected function validate_max($value, $param): bool
+ {
+ return strlen($value) <= (int)$param;
+ }
+
+ protected function validate_email($value): bool
+ {
+ return filter_var($value, FILTER_VALIDATE_EMAIL) !== false;
+ }
+
+ protected function validate_numeric($value): bool
+ {
+ return is_numeric($value);
+ }
+
+ protected function validate_alpha($value): bool
+ {
+ return ctype_alpha($value);
+ }
+
+ protected function validate_alpha_numeric($value): bool
+ {
+ return ctype_alnum($value);
+ }
+
+ // 사용자 정의 규칙도 등록할 수 있도록 향후 확장 가능
+}
diff --git a/extdbms/lib/Core/Logger.php b/extdbms/lib/Core/Logger.php
new file mode 100644
index 0000000..4746f14
--- /dev/null
+++ b/extdbms/lib/Core/Logger.php
@@ -0,0 +1,47 @@
+logPath = rtrim($logDir, DIRECTORY_SEPARATOR);
+ if (!is_dir($this->logPath)) {
+ mkdir($this->logPath, APP_LOG_PERMISSION, true);
+ }
+ }
+
+ public function log(string $message, string $level = APP_LOG_LEVELS['info']): void
+ {
+ $filename = date('Y-m-d') . '.log';
+ $filepath = "{$this->logPath}/{$filename}";
+ $time = date('Y-m-d H:i:s');
+ $formatted = "[{$time}] [{$level}] {$message}\n";
+ file_put_contents($filepath, $formatted, FILE_APPEND);
+ }
+
+ public function info(string $message): void
+ {
+ $this->log($message, APP_LOG_LEVELS['info']);
+ }
+
+ public function error(string $message): void
+ {
+ $this->log($message, APP_LOG_LEVELS['info']);
+ }
+
+ public function warning(string $message): void
+ {
+ $this->log($message, APP_LOG_LEVELS['warning']);
+ }
+
+ public function debug(string $message): void
+ {
+ if (APP_LOG_LEVELS['debug']) {
+ $this->log($message, APP_LOG_LEVELS['debug']);
+ }
+ }
+}
diff --git a/extdbms/lib/Core/Middlewares/AuthMiddleware.php b/extdbms/lib/Core/Middlewares/AuthMiddleware.php
new file mode 100644
index 0000000..be80bfb
--- /dev/null
+++ b/extdbms/lib/Core/Middlewares/AuthMiddleware.php
@@ -0,0 +1,19 @@
+ 'Unauthorized'], 401);
+ return;
+ }
+ return $next($params);
+ }
+}
diff --git a/extdbms/lib/Core/Middlewares/MiddlewareInterface.php b/extdbms/lib/Core/Middlewares/MiddlewareInterface.php
new file mode 100644
index 0000000..7d03387
--- /dev/null
+++ b/extdbms/lib/Core/Middlewares/MiddlewareInterface.php
@@ -0,0 +1,8 @@
+getTable());
+ parent::setDebug($_ENV['DATABASE_QUERY_DEBUG'] ?? $_SERVER['DATABASE_QUERY_DEBUG'] ?? false);
+ }
+
+ abstract public function getTable(): string;
+ abstract public function getPKField(): string;
+ abstract public function getTitleField(): string;
+}
diff --git a/extdbms/lib/Core/Router.php b/extdbms/lib/Core/Router.php
new file mode 100644
index 0000000..64cb9c4
--- /dev/null
+++ b/extdbms/lib/Core/Router.php
@@ -0,0 +1,132 @@
+currentGroupPrefix . '/' . trim($path, '/'), '/');
+
+ $route = [
+ 'method' => strtoupper($method),
+ 'path' => $fullPath,
+ 'callback' => $callback,
+ 'middlewares' => array_merge($this->currentGroupMiddlewares, $middlewares)
+ ];
+
+ // 동적 파라미터({param})가 있으면 정규식 패턴 생성
+ if (strpos($fullPath, '{') !== false) {
+ $pattern = preg_replace_callback('/\{(\w+)\}/', function ($matches) {
+ return '(?P<' . $matches[1] . '>[^/]+)';
+ }, $fullPath);
+ $route['pattern'] = '/^' . str_replace('/', '\/', $pattern) . '(\/.*)?$/';
+ } else {
+ // SEO key/value 형태를 위해 접두사 이후의 추가 파라미터를 허용
+ $route['pattern'] = '/^' . str_replace('/', '\/', $fullPath) . '(\/(?P.*))?$/';
+ }
+
+ $this->routes[] = $route;
+ }
+
+ /**
+ * 라우트 그룹: 공통 접두사와 공통 미들웨어를 적용
+ */
+ public function group(string $prefix, callable $callback, array $middlewares = []): void
+ {
+ $previousGroupPrefix = $this->currentGroupPrefix;
+ $previousGroupMiddlewares = $this->currentGroupMiddlewares;
+
+ $this->currentGroupPrefix = trim($previousGroupPrefix . '/' . trim($prefix, '/'), '/');
+ $this->currentGroupMiddlewares = array_merge($previousGroupMiddlewares, $middlewares);
+
+ $callback($this);
+
+ $this->currentGroupPrefix = $previousGroupPrefix;
+ $this->currentGroupMiddlewares = $previousGroupMiddlewares;
+ }
+
+ /**
+ * 라우트 매칭 및 실행
+ */
+ public function dispatch(string $uri, string $method = 'GET'): mixed
+ {
+ $uri = trim(parse_url($uri, PHP_URL_PATH), '/');
+
+ // 정적 파일 처리: public 폴더 내에 파일이 있으면 직접 서빙
+ $staticFile = DOCUMENTROOT_PATH . $uri;
+ if (file_exists($staticFile) && is_file($staticFile)) {
+ return $this->serveStaticFile($staticFile);
+ }
+ foreach ($this->routes as $route) {
+ if ($route['method'] !== strtoupper($method)) { //GET, POST 등 HTTP 메소드 체크
+ continue;
+ }
+ if (preg_match($route['pattern'], $uri, $matches)) {
+ $params = [];
+ // 패턴에 named 그룹이 있다면 추출
+ foreach ($matches as $key => $value) {
+ if (is_string($key)) {
+ $params[$key] = $value;
+ }
+ }
+ //추가 SEO key/value 파라미터로 파싱
+ if (isset($params['extra']) && $params['extra'] !== '') {
+ $extra = trim($params['extra'], '/');
+ $extraSegments = explode('/', $extra);
+ // 짝수개여야 key/value 쌍으로 변환 가능
+ if (count($extraSegments) % 2 === 0) {
+ for ($i = 0; $i < count($extraSegments); $i += 2) {
+ $key = $extraSegments[$i];
+ $value = $extraSegments[$i + 1];
+ $params[$key] = $value;
+ }
+ }
+ unset($params['extra']);
+ } else {
+ // 패턴에 extra 그룹이 없으면, 기본 GET 파라미터와 병합
+ $params = array_merge($_GET, $params);
+ }
+ return $this->handle($route, $params);
+ }
+ }
+ // 404 응답 객체 반환
+ return (new Response('해당 Route 경로를 찾을수 없습니다.' . $uri, 404));
+ }
+
+ /**
+ * 미들웨어 체인을 거쳐 최종 콜백 실행
+ */
+ private function handle(array $route, array $params): mixed
+ {
+ $handler = $route['callback'];
+ $middlewares = $route['middlewares'];
+
+ $pipeline = array_reduce(
+ array_reverse($middlewares),
+ fn($next, $middleware) => fn($params) => (new $middleware)->handle($params, $next),
+ $handler
+ );
+ return $pipeline($params);
+ }
+
+ /**
+ * 정적 파일 서빙 (이미지, CSS, JS 등)
+ */
+ private function serveStaticFile(string $file): Response
+ {
+ return (new Response())
+ ->header('Content-Type', mime_content_type($file))
+ ->setContent(file_get_contents($file));
+ }
+}
diff --git a/extdbms/lib/Core/Service.php b/extdbms/lib/Core/Service.php
new file mode 100644
index 0000000..834fa20
--- /dev/null
+++ b/extdbms/lib/Core/Service.php
@@ -0,0 +1,8 @@
+totalItems = $totalItems;
+ $this->perPage = $perPage;
+ $this->currentPage = max(1, $currentPage);
+ $this->totalPages = (int)ceil($totalItems / $perPage);
+ $this->start = ($this->currentPage - 1) * $perPage;
+ $this->end = min($this->start + $perPage, $totalItems);
+ $this->groupSize = intval(APP_VIEW_LIST_PAGINATION_GROUPSIZE);
+ }
+
+ public function hasPrevious(): bool
+ {
+ return $this->currentPage > 1;
+ }
+
+ public function hasNext(): bool
+ {
+ return $this->currentPage < $this->totalPages;
+ }
+
+ public function previousPage(): int
+ {
+ return max(1, $this->currentPage - 1);
+ }
+
+ public function nextPage(): int
+ {
+ return min($this->totalPages, $this->currentPage + 1);
+ }
+
+ public function getOffset(): int
+ {
+ return $this->start;
+ }
+
+ public function getLimit(): int
+ {
+ return $this->perPage;
+ }
+
+ public function toArray(): array
+ {
+ return [
+ 'current_page' => $this->currentPage,
+ 'per_page' => $this->perPage,
+ 'total_items' => $this->totalItems,
+ 'total_pages' => $this->totalPages,
+ 'has_previous' => $this->hasPrevious(),
+ 'has_next' => $this->hasNext(),
+ 'previous_page' => $this->previousPage(),
+ 'next_page' => $this->nextPage(),
+ 'offset' => $this->getOffset(),
+ 'limit' => $this->getLimit(),
+ ];
+ }
+
+ public function render(string $baseUrl = '', array $query = []): string
+ {
+ if ($this->totalPages <= 1) {
+ return '';
+ }
+
+ $html = ' ';
+ return $html;
+ }
+ private function pageLink(int $page, string $label, string $baseUrl, array $query): string
+ {
+ $query['curPage'] = $page;
+ $url = $baseUrl . '?' . http_build_query($query);
+ return '' . $label . ' ';
+ }
+}
diff --git a/extdbms/lib/Core/View.php b/extdbms/lib/Core/View.php
new file mode 100644
index 0000000..78700bf
--- /dev/null
+++ b/extdbms/lib/Core/View.php
@@ -0,0 +1,54 @@
+_blade = new BladeOne(APP_VIEW_PATH, APP_VIEW_CACHE_PATH, BladeOne::MODE_DEBUG);
+ $this->_blade->setFileExtension('.php');
+ }
+
+ public function __set(string $name, mixed $value): void
+ {
+ $this->_values[$name] = $value;
+ }
+
+ public function __get(string $name): mixed
+ {
+ return $this->_values[$name] ?? null;
+ }
+
+ public function setLayout(string $layout): void
+ {
+ $this->_layout = $layout;
+ }
+
+ public function setPath(string $path): void
+ {
+ $this->_paths[] = $path;
+ }
+ public function render($file): string
+ {
+ // Blade 템플릿 렌더링
+ $file = implode('.', $this->_paths) . '.' . $file;
+ if (APP_VIEW_DEBUG) {
+ echo "VIwe DEBUG:" . __METHOD__ . "에서 [" . $file . "]를 렌더링합니다. ";
+ }
+ return $this->_blade->run($file, $this->_values);
+ }
+}
diff --git a/extdbms/lib/Entities/AddDbEntity.php b/extdbms/lib/Entities/AddDbEntity.php
new file mode 100644
index 0000000..b305c49
--- /dev/null
+++ b/extdbms/lib/Entities/AddDbEntity.php
@@ -0,0 +1,20 @@
+service_code;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/ClientEntity.php b/extdbms/lib/Entities/ClientEntity.php
new file mode 100644
index 0000000..7604882
--- /dev/null
+++ b/extdbms/lib/Entities/ClientEntity.php
@@ -0,0 +1,37 @@
+Client_Code;
+ }
+ public function getPhone(string $field = "", string $delimeter = ","): string
+ {
+ return $field ? $this->$field : "{$this->Client_Phone1} {$delimeter} {$this->Client_Phone2}";
+ }
+ public function getEmail(string $field = "", string $delimeter = ","): string
+ {
+ return $field ? $this->$field : "{$this->Client_EMail1} {$delimeter} {$this->Client_EMail2}";
+ }
+ public function getNote(): string
+ {
+ return $this->Client_Note;
+ }
+ public function getPoint(): string
+ {
+ return $this->Client_Point;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/CommonEntity.php b/extdbms/lib/Entities/CommonEntity.php
new file mode 100644
index 0000000..3062949
--- /dev/null
+++ b/extdbms/lib/Entities/CommonEntity.php
@@ -0,0 +1,33 @@
+$field;
+ }
+ public function getTitle(): string
+ {
+ $field = constant("static::TitleField");
+ return $this->$field;
+ }
+ public function getPairKey(): string
+ {
+ $field = constant("static::PairField");
+ return $this->$field;
+ }
+ public function getCreatedAt(): string
+ {
+ return $this->created_at;
+ } //
+ //공통부분
+} //Class
diff --git a/extdbms/lib/Entities/DefenceEntity.php b/extdbms/lib/Entities/DefenceEntity.php
new file mode 100644
index 0000000..44cef5d
--- /dev/null
+++ b/extdbms/lib/Entities/DefenceEntity.php
@@ -0,0 +1,34 @@
+getTitle();
+ } //
+ public function getParent(): string
+ {
+ return $this->parents;
+ } //
+ public function getChild(): string
+ {
+ return $this->child;
+ } //
+ public function getRealAddress(): string
+ {
+ return $this->real_address;
+ } //
+} //Class
diff --git a/extdbms/lib/Entities/GearlistEntity.php b/extdbms/lib/Entities/GearlistEntity.php
new file mode 100644
index 0000000..eb890fe
--- /dev/null
+++ b/extdbms/lib/Entities/GearlistEntity.php
@@ -0,0 +1,33 @@
+process;
+ } //
+ public function getSpec(): string
+ {
+ return $this->spec;
+ } //
+ public function getCPUName(): string
+ {
+ return $this->cpuname;
+ } //
+ public function getPrice(): string
+ {
+ return $this->price;
+ } //
+} //Class
diff --git a/extdbms/lib/Entities/HistoryEntity.php b/extdbms/lib/Entities/HistoryEntity.php
new file mode 100644
index 0000000..863f4d4
--- /dev/null
+++ b/extdbms/lib/Entities/HistoryEntity.php
@@ -0,0 +1,25 @@
+service_code;
+ }
+ public function getClientName(): string
+ {
+ return $this->client_name;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/KCSEntity.php b/extdbms/lib/Entities/KCSEntity.php
new file mode 100644
index 0000000..86c1a57
--- /dev/null
+++ b/extdbms/lib/Entities/KCSEntity.php
@@ -0,0 +1,17 @@
+id;
+ }
+ public function getPassword(): string
+ {
+ return $this->pass;
+ }
+ public function getName(): string
+ {
+ return $this->name;
+ }
+ public function getRole(): string
+ {
+ return $this->role;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/OnetimeEntity.php b/extdbms/lib/Entities/OnetimeEntity.php
new file mode 100644
index 0000000..992e328
--- /dev/null
+++ b/extdbms/lib/Entities/OnetimeEntity.php
@@ -0,0 +1,50 @@
+service_code;
+ }
+ public function getMemberCode(): string
+ {
+ return $this->onetime_manager;
+ }
+ public function getClientCode(): string
+ {
+ return $this->client_code;
+ }
+ public function getAmount(): string
+ {
+ return $this->onetime_amount;
+ }
+ public function getNonPayment(): string
+ {
+ return $this->onetime_nonpayment;
+ }
+ public function getRequestDate(): string
+ {
+ return $this->onetime_request_date;
+ }
+ public function getPaymentDate(): string
+ {
+ return $this->onetime_payment_date;
+ }
+ public function getNote(): string
+ {
+ return $this->onetime_note;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/PointEntity.php b/extdbms/lib/Entities/PointEntity.php
new file mode 100644
index 0000000..de54f4d
--- /dev/null
+++ b/extdbms/lib/Entities/PointEntity.php
@@ -0,0 +1,34 @@
+client_code;
+ } //
+
+ public function getType(): string
+ {
+ return $this->type;
+ } //
+ public function getAmount(): string
+ {
+ return $this->amount;
+ } //
+ public function getNote(): string
+ {
+ return $this->note;
+ } //
+} //Class
diff --git a/extdbms/lib/Entities/ServerEntity.php b/extdbms/lib/Entities/ServerEntity.php
new file mode 100644
index 0000000..9b75ee4
--- /dev/null
+++ b/extdbms/lib/Entities/ServerEntity.php
@@ -0,0 +1,25 @@
+server_code;
+ }
+ public function getServiceCode(): string
+ {
+ return $this->service_code;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/ServiceEntity.php b/extdbms/lib/Entities/ServiceEntity.php
new file mode 100644
index 0000000..2a46d9e
--- /dev/null
+++ b/extdbms/lib/Entities/ServiceEntity.php
@@ -0,0 +1,42 @@
+service_code;
+ }
+ public function getServerCode(): string
+ {
+ return $this->server_code;
+ }
+ public function getMemberCode(): string
+ {
+ return $this->service_manager;
+ }
+ public function getClientCode(): string
+ {
+ return $this->client_code;
+ }
+ public function getCoupon(): string
+ {
+ return $this->coupon;
+ }
+ public function getUsedCoupon(): string
+ {
+ return $this->coupon_use;
+ }
+} //Class
diff --git a/extdbms/lib/Entities/VPCEntity.php b/extdbms/lib/Entities/VPCEntity.php
new file mode 100644
index 0000000..b4e5466
--- /dev/null
+++ b/extdbms/lib/Entities/VPCEntity.php
@@ -0,0 +1,17 @@
+getRandomString($length, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?");
+ }
+
+ final function truncateString(string $text, int $maxLength = 10): string
+ {
+ if (mb_strlen($text, 'UTF-8') > $maxLength) {
+ return mb_substr($text, 0, $maxLength, 'UTF-8') . "...";
+ }
+ return $text;
+ }
+
+ // byte값을 알아보기 쉽게 변환
+ final public function getSizeForHuman($bytes)
+ {
+ $ext = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
+ $unitCount = 0;
+ for (; $bytes > 1024; $unitCount++) {
+ $bytes /= 1024;
+ }
+ return floor($bytes) . $ext[$unitCount];
+ }
+
+ // Proxy등을 통하여 Client_IP가 알수없는경우 실제사용자의 IP를 가져오기 위한것
+ final public function getClientIP($clientIP = false)
+ {
+ if (isset($_SERVER['HTTP_CLIENT_IP'])) {
+ $clientIP = $_SERVER['HTTP_CLIENT_IP'];
+ } else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $clientIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
+ } else if (isset($_SERVER['HTTP_X_FORWARDED'])) {
+ $clientIP = $_SERVER['HTTP_X_FORWARDED'];
+ } else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {
+ $clientIP = $_SERVER['HTTP_FORWARDED_FOR'];
+ } else if (isset($_SERVER['HTTP_FORWARDED'])) {
+ $clientIP = $_SERVER['HTTP_FORWARDED'];
+ } else if (isset($_SERVER['REMOTE_ADDR'])) {
+ $clientIP = $_SERVER['REMOTE_ADDR'];
+ }
+ return $clientIP;
+ }
+
+ final public function isDomain(string $domain): bool
+ {
+ $pattern_validation = '/((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z0-9\&\.\/\?\:@\-_=#])*/';
+ return preg_match($pattern_validation, $domain);
+ }
+
+ final public function isIPAddress(?string $ip = null, $type = 'ipv4'): bool
+ {
+ switch ($type) {
+ case 'ipv4':
+ $result = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
+ break;
+ case 'ipv6':
+ $result = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
+ break;
+ case 'all':
+ $result = filter_var($ip, FILTER_VALIDATE_IP);
+ break;
+ default:
+ $result = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
+ break;
+ }
+ return $result;
+ }
+
+ final public function isHost(string $host): bool
+ {
+ $pattern_validation = '/[a-zA-Z0-9\.\/\?\:@\*\-_=#]/';
+ return preg_match($pattern_validation, $host);
+ }
+
+ // (EX:192.168.1.0 -> 192.168.001.000)
+ final public function convertIPV4toCIDR($cidr)
+ {
+ $temps = explode(".", $cidr);
+ return sprintf("%03d.%03d.%03d.%03d", $temps[0], $temps[1], $temps[2], $temps[3]);
+ }
+
+ // (EX:192.168.001.0000 -> 192.168.1.0)
+ final public function convertCIDRtoIPV4($ipv4)
+ {
+ $temps = explode(".", $ipv4);
+ return sprintf("%d.%d.%d.%d", $temps[0], $temps[1], $temps[2], $temps[3]);
+ }
+
+ final public function isMobile()
+ {
+ // Check the server headers to see if they're mobile friendly
+ if (isset($_SERVER["HTTP_X_WAP_PROFILE"])) {
+ return true;
+ }
+ // If the http_accept header supports wap then it's a mobile too
+ if (preg_match("/wap\.|\.wap/i", $_SERVER["HTTP_ACCEPT"])) {
+ return true;
+ }
+ // Still no luck? Let's have a look at the user agent on the browser. If it contains
+ // any of the following, it's probably a mobile device. Kappow!
+ if (isset($_SERVER["HTTP_USER_AGENT"])) {
+ $user_agents = array("midp", "j2me", "avantg", "docomo", "novarra", "palmos", "palmsource", "240x320", "opwv", "chtml", "pda", "windows\ ce", "mmp\/", "blackberry", "mib\/", "symbian", "wireless", "nokia", "hand", "mobi", "phone", "cdm", "up\.b", "audio", "SIE\-", "SEC\-", "samsung", "HTC", "mot\-", "mitsu", "sagem", "sony", "alcatel", "lg", "erics", "vx", "NEC", "philips", "mmm", "xx", "panasonic", "sharp", "wap", "sch", "rover", "pocket", "benq", "java", "pt", "pg", "vox", "amoi", "bird", "compal", "kg", "voda", "sany", "kdd", "dbt", "sendo", "sgh", "gradi", "jb", "\d\d\di", "moto");
+ foreach ($user_agents as $user_string) {
+ if (preg_match("/" . $user_string . "/i", $_SERVER["HTTP_USER_AGENT"])) {
+ return true;
+ }
+ }
+ }
+ // Let's NOT return "mobile" if it's an iPhone, because the iPhone can render normal pages quite well.
+ if (preg_match("/iphone/i", $_SERVER["HTTP_USER_AGENT"])) {
+ return false;
+ }
+ // None of the above? Then it's probably not a mobile device.
+ return false;
+ }
+} //Class
diff --git a/extdbms/lib/Helpers/ServiceHelper.php b/extdbms/lib/Helpers/ServiceHelper.php
new file mode 100644
index 0000000..1b98297
--- /dev/null
+++ b/extdbms/lib/Helpers/ServiceHelper.php
@@ -0,0 +1,14 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+}
diff --git a/extdbms/lib/Services/ClientService.php b/extdbms/lib/Services/ClientService.php
new file mode 100644
index 0000000..3f7395b
--- /dev/null
+++ b/extdbms/lib/Services/ClientService.php
@@ -0,0 +1,54 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+
+ //사용자 포인트 입금
+ public function depositPoint(Entity $client, int $point): bool
+ {
+ if ($point < 0) {
+ throw new \Exception("포인트금액이 잘못되었습니다. 포인트 : $point");
+ }
+ $this->getModel()->where("Client_Code", $client->getClientCode());
+ $this->getModel()->update(["Client_Point=(Client_Point+{$point})" => null]);
+ return true;
+ }
+ //사용자 포인트 출금
+ public function withdrawalPoint(Entity $client, int $point): bool
+ {
+ if ($point < 0) {
+ throw new \Exception("포인트금액이 잘못되었습니다. 포인트 : $point");
+ }
+ if ($client->getPoint() < $point) {
+ throw new \Exception("포인트금액이 잘못되었습니다. 남은 포인트: " . $client->getPoint() . ", 포인트 : $point");
+ }
+ $this->getModel()->where("Client_Code", $client->getClientCode());
+ $this->getModel()->update(["Client_Point=(Client_Point-{$point})" => null]);
+ return true;
+ }
+}
diff --git a/extdbms/lib/Services/CommonService.php b/extdbms/lib/Services/CommonService.php
new file mode 100644
index 0000000..9f0557a
--- /dev/null
+++ b/extdbms/lib/Services/CommonService.php
@@ -0,0 +1,89 @@
+_model === null) {
+ $modelClass = $this->getModelClass();
+ $this->_model = new $modelClass();
+ // $this->_model->setDebug(true);
+ }
+ return $this->_model;
+ }
+ final public function getEntity(): mixed
+ {
+ $result = $this->getModel()->first();
+ if (!$result) { //결과값이 없으면 null
+ return $result;
+ }
+ $entityClass = $this->getEntityClass();
+ return new $entityClass($result);
+ }
+ final public function getEntities(): array
+ {
+ $entitys = [];
+ foreach ($this->getModel()->get() as $result) {
+ $entityClass = $this->getEntityClass();
+ $entity = new $entityClass($result);
+ $pairField = $this->getModel()->getPairField();
+ $entitys[$entity->$pairField] = $entity;
+ }
+ return $entitys;
+ } //
+ final public function getCount(string $select = "COUNT(*) as cnt"): int
+ {
+ $count = $this->getModel()->count($select);
+ // echo " " . $this->getModel()->getLastQuery();
+ return $count;
+ }
+ final public function getList(int $curPage = 1, int $perPage = APP_VIEW_LIST_PERPAGE): array
+ {
+ //Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue()
+ $this->getModel()->setContinue(true);
+ $total = $this->getCount();
+ //limit, offset 설정
+ $this->getModel()->limit($perPage);
+ $this->getModel()->offset(($curPage - 1) * $perPage);
+ $entities = $this->getEntities();
+ return [$total, $entities];
+ }
+
+ protected function insert(array $formData): mixed
+ {
+ $insertId = $this->getModel()->insert($formData);
+ if (!$insertId) {
+ throw new \Exception("Insert Error : " . $this->getModel()->getLastError());
+ }
+ $entityClass = $this->getEntityClass();
+ $entity = new $entityClass($formData);
+ $pkField = $this->getModel()::PKFIELD;
+ $entity->$pkField = $insertId;
+ return $entity;
+ } //
+
+ //transaction관련련
+ final public function beginTransaction(): void
+ {
+ $this->getModel()->beginTransaction();
+ }
+ final public function commit(): void
+ {
+ $this->getModel()->commit();
+ }
+ final public function rollBack(): void
+ {
+ $this->getModel()->rollBack();
+ }
+} //Class
diff --git a/extdbms/lib/Services/DefenceService.php b/extdbms/lib/Services/DefenceService.php
new file mode 100644
index 0000000..ad54391
--- /dev/null
+++ b/extdbms/lib/Services/DefenceService.php
@@ -0,0 +1,30 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+}
diff --git a/extdbms/lib/Services/GearlistService.php b/extdbms/lib/Services/GearlistService.php
new file mode 100644
index 0000000..84f5681
--- /dev/null
+++ b/extdbms/lib/Services/GearlistService.php
@@ -0,0 +1,38 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+
+ public function getEntitiesForLineUp(): array
+ {
+ $this->getModel()->whereNotIn("process", DBMS_GEARLIST_PROCESS_TYPES);
+ $this->getModel()->whereNotIn("cpuname", DBMS_GEARLIST_CPU_TYPES);
+ $this->getModel()->orderBy(["process" => "ASC", "price" => "ASC", "cpuname" => "asc"]);
+ return $this->getEntities();
+ }
+}
diff --git a/extdbms/lib/Services/HistoryService.php b/extdbms/lib/Services/HistoryService.php
new file mode 100644
index 0000000..0897cd3
--- /dev/null
+++ b/extdbms/lib/Services/HistoryService.php
@@ -0,0 +1,47 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+ //도메인쿠폰 사용
+ public function useCouponByService(ServiceEntity $service, ClientEntity $client, string $onetime_case, int $coupon, string $note, string $onetime_request_date): bool
+ {
+ $formDatas = [
+ "service_code" => $service->getServiceCode(),
+ "server_code" => $service->getServerCode(),
+ "behavior_case" => $onetime_case,
+ "behavior" => "도메인 쿠폰 구매 / {$coupon} 개",
+ "behavior_date" => $onetime_request_date,
+ "note" => trim($note),
+ "client_name" => $client->getTitle()
+ ];
+ return $this->getModel()->insert($formDatas);
+ }
+}
diff --git a/extdbms/lib/Services/KCSService.php b/extdbms/lib/Services/KCSService.php
new file mode 100644
index 0000000..0698760
--- /dev/null
+++ b/extdbms/lib/Services/KCSService.php
@@ -0,0 +1,30 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+}
diff --git a/extdbms/lib/Services/MemberService.php b/extdbms/lib/Services/MemberService.php
new file mode 100644
index 0000000..ae201fa
--- /dev/null
+++ b/extdbms/lib/Services/MemberService.php
@@ -0,0 +1,30 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+}
diff --git a/extdbms/lib/Services/OnetimeService.php b/extdbms/lib/Services/OnetimeService.php
new file mode 100644
index 0000000..cfbab15
--- /dev/null
+++ b/extdbms/lib/Services/OnetimeService.php
@@ -0,0 +1,57 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+
+ //도메인쿠폰 사용용
+ public function useCouponByService(ServiceEntity $service, ClientEntity $client, MemberEntity $member, string $onetime_case, int $coupon, string $note, string $onetime_request_date): bool
+ {
+ $formDatas = [
+ "client_code" => $service->getClientCode(),
+ "service_code" => $service->getServiceCode(),
+ "onetime_case" => $onetime_case,
+ "onetime_sub" => "도메인 쿠폰 구매 / {$coupon} 개",
+ "onetime_amount" => 0,
+ "onetime_payment" => 0,
+ "onetime_nonpayment" => 0,
+ "onetime_accountStatus" => 'complete',
+ "onetime_request_date" => $onetime_request_date,
+ "onetime_payment_date" => $onetime_request_date,
+ "onetime_note" => trim($note),
+ "onetime_handle_date" => $onetime_request_date,
+ "onetime_manager" => $member->getPK(),
+ "client_name" => $client->getTitle(),
+ "server_code" => $service->getServerCode(),
+ ];
+ return $this->getModel()->insert($formDatas);
+ }
+}
diff --git a/extdbms/lib/Services/PointService.php b/extdbms/lib/Services/PointService.php
new file mode 100644
index 0000000..15650b7
--- /dev/null
+++ b/extdbms/lib/Services/PointService.php
@@ -0,0 +1,30 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+} //Class
diff --git a/extdbms/lib/Services/ServerService.php b/extdbms/lib/Services/ServerService.php
new file mode 100644
index 0000000..e488b34
--- /dev/null
+++ b/extdbms/lib/Services/ServerService.php
@@ -0,0 +1,54 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+ public function getCountByMode(string $mode, string $cpu, ?string $spec = null): int
+ {
+ switch ($mode) {
+ case 'all':
+ $this->getModel()->like(["server_cpuname" => "%$cpu%", "server_spec" => "%$spec%"]);
+ break;
+ case 'use':
+ $this->getModel()->where("server_use_status", "n");
+ $this->getModel()->like(["server_cpuname" => "%$cpu%", "server_spec" => "%$spec%"]);
+ break;
+ case 'empty':
+ $this->getModel()->where("server_use_status", "y");
+ $this->getModel()->like(["server_cpuname" => "%$cpu%", "server_spec" => "%$spec%"]);
+ break;
+ case 'format':
+ $this->getModel()->where("server_use_status", "y");
+ $this->getModel()->where("server_fomat_date !='NULL'");
+ $this->getModel()->like(["server_cpuname" => "%$cpu%"]);
+ break;
+ default:
+ throw new \InvalidArgumentException("Invalid mode: $mode");
+ }
+ return $this->getCount();
+ }
+}
diff --git a/extdbms/lib/Services/ServiceService.php b/extdbms/lib/Services/ServiceService.php
new file mode 100644
index 0000000..3201144
--- /dev/null
+++ b/extdbms/lib/Services/ServiceService.php
@@ -0,0 +1,104 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+
+ //미지급금 리스트
+ public function getEntitiesForNonPayment(int $curPage, int $perPage, array $exclude_clients): array
+ {
+ $table = $this->getModel()->getTable();
+ $clientTable = ClientModel::TABLE;
+ $addDbTable = AddDbModel::TABLE;
+ $this->getModel()->select("{$clientTable}.Client_Name,{$table}.service_code,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,addDB_case,addDB_nonpayment,addDB_payment,addDB_accountStatus,addDB_ip,addDB_payment_date");
+ $this->getModel()->join($clientTable, "{$table}.client_code = {$clientTable}.Client_Code");
+ $this->getModel()->join($addDbTable, "{$table}.service_code = {$addDbTable}.service_code");
+ $this->getModel()->whereNotIn("{$addDbTable}.client_code", $exclude_clients);
+ $this->getModel()->whereNotIn("{$addDbTable}.addDB_accountStatus", ["complete"]);
+ $this->getModel()->orderBy("service_payment_date", "DESC");
+ //Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue()
+ $this->getModel()->setContinue(true);
+ $total = $this->getCount();
+ //limit, offset 설정
+ $this->getModel()->limit($perPage);
+ $this->getModel()->offset(($curPage - 1) * $perPage);
+ return [$total, $this->getEntities()];
+ }
+
+ //지역(치바,도쿄등)에 따른 DASHBOARD용 서비스 카운트
+ private function getDistrictCountForDashboard(string $where, string $type, array $switchcodes): int
+ {
+ $switchcode_begin = $switchcodes['begin'];
+ $switchcode_end = $switchcodes['end'];
+ $this->getModel()->where($where);
+ $this->getModel()->where(["service_line" => $type, "service_status" => 'o']);
+ $this->getModel()->where("service_sw BETWEEN '{$switchcode_begin}' AND '$switchcode_end'");
+ $count = $this->getModel()->count();
+ // echo " " . $this->getModel()->getLastQuery();
+ return $count;
+ }
+ final public function getTotalCountForDashboard(array $siteinfo): array
+ {
+ $temps = array();
+ foreach ($siteinfo['totalcount_customers'] as $customer => $where) {
+ $temps[$customer] = [];
+ foreach ($siteinfo['totalcount_types'] as $type) {
+ foreach (DBMS_SERVICE_SWITCHCODE as $district => $switchcodes) {
+ $temps[$customer][$type][$district] = $this->getDistrictCountForDashboard($where, $type, $switchcodes);
+ }
+ } //foreach
+ // echo var_dump($temps);
+ } //foreach
+ return $temps;
+ }
+
+ //도메인쿠폰 사용용
+ public function useCouponByService(ServiceEntity $service, int $coupon): bool
+ {
+ if ($coupon < 0) {
+ throw new \Exception("쿠폰수량이 잘못되었습니다. 쿠폰수량 : $coupon");
+ }
+ $this->getModel()->where("service_code", $service->getServiceCode());
+ $this->getModel()->update(["coupon=(coupon-{$coupon})" => null, "coupon_use=(coupon_use+{$coupon})" => null]);
+ return true;
+ }
+ //도메인쿠폰 Reset
+ public function resetCouponByClient(ClientEntity $client, int $coupon): bool
+ {
+ if ($coupon < 0) {
+ throw new \Exception("쿠폰수량이 잘못되었습니다. 쿠폰수량 : $coupon");
+ }
+ $this->getModel()->where("client_code", $client->getClientCode());
+ $this->getModel()->where("server_code", $client->getTitle() . "_일회성");
+ $this->getModel()->update(["coupon" => $coupon, "coupon_use" => 0]);
+ return true;
+ } //setCoupon
+}
diff --git a/extdbms/lib/Services/VPCService.php b/extdbms/lib/Services/VPCService.php
new file mode 100644
index 0000000..88f2a68
--- /dev/null
+++ b/extdbms/lib/Services/VPCService.php
@@ -0,0 +1,30 @@
+getClassName();
+ }
+ public function getModelClass(): string
+ {
+ return Model::class;
+ }
+ public function getEntityClass(): string
+ {
+ return Entity::class;
+ }
+}
diff --git a/extdbms/lib/Utils/Pagination.php b/extdbms/lib/Utils/Pagination.php
new file mode 100644
index 0000000..cd504de
--- /dev/null
+++ b/extdbms/lib/Utils/Pagination.php
@@ -0,0 +1,13 @@
+client) { ?>
+ 고객명 : = $this->client->getTitle() ?> / 쿠폰발급대상 : = count($this->entities) ?> 대 / 전체 남은 수량 : = $this->total_coupon; ?> 개
+
+
+
+
+
+
+ No
+ 서비스코드
+ 장비명
+ 서버IP
+ 서비스개시일
+ 회선종류
+ 쿠폰 누적수
+ 쿠폰 잔량수
+ 쿠폰 사용수
+ 사용
+
+
+
+
+ entities as $entity) { ?>
+ entities) - $i; ?>
+
+ = $num ?>
+ = $entity->getServiceCode() ?>
+ = $entity->getServerCode() ?>
+ = $entity->service_ip ?>
+ = $entity->service_open_date ?>
+ = $entity->service_line ?>
+ = $entity->getCoupon() + $entity->getUsedCoupon() ?>
+ = $entity->getCoupon() ?>
+ = $entity->getUsedCoupon() ?>
+ ">= !$entity->getCoupon() ? "사용완료" : "사용하기" ?>
+
+
+
+
+
+
+= $this->pagination->render(DBMS_SITE_URL . "/IdcCouponUseMK.cup", ['client_code' => $this->client ? $this->client->getClientCode() : "", 'mkid' => $this->member ? $this->member->getPK() : "", 'curPage' => $this->curPage, 'perPage' => $this->perPage]) ?>
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/coupon/insert_form.php b/extdbms/lib/Views/dbms/client/coupon/insert_form.php
new file mode 100644
index 0000000..f935d23
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/coupon/insert_form.php
@@ -0,0 +1,57 @@
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/dashboard/totalcount.php b/extdbms/lib/Views/dbms/client/dashboard/totalcount.php
new file mode 100644
index 0000000..972e9d7
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/dashboard/totalcount.php
@@ -0,0 +1,56 @@
+
+
+
+
+ 도쿄
+ 치바
+ VPN
+
+
+
+
+ {{$dashboard['Tokyo']}}
+ {{$dashboard['Chiba']}}
+ {{$dashboard['vpn']}}
+
+
+
+
+
+
+
+
+ 일반
+ 방어
+ 전용
+ 이벤트
+
+
+
+
+ {{$dashboard['normal']}}
+ {{$dashboard['defence']}}
+ {{$dashboard['solo']}}
+ {{$dashboard['event']}}
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/memo/update_form.php b/extdbms/lib/Views/dbms/client/memo/update_form.php
new file mode 100644
index 0000000..8c7a123
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/memo/update_form.php
@@ -0,0 +1,12 @@
+@if ($client)
+
+
+
+
+@endif
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/payment/billpaper.php b/extdbms/lib/Views/dbms/client/payment/billpaper.php
new file mode 100644
index 0000000..231238d
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/payment/billpaper.php
@@ -0,0 +1,79 @@
+
+
※ 청구서를 받으셨던 서버인 경우에도 발행하는 시점까지 미납인 경우 재 발행됩니다. 입금을 하신 경우에는 연락 부탁드립니다.
+
입금 하실 계좌 번호 입니다.
+ @foreach($siteInfo['banks'] as $bank)
+
+ 은행명 : {{$bank['name']}}
+ 계좌번호 : {{$bank['id']}}
+ 예금주: {{$bank['owner']}}
+
+ @endforeach
+
고객명과 입금자명이 상이한 경우 반드시 확인 연락이 필요합니다.
+ 입금 시 당 청구서에 기재되어 있는 고객명으로 입금해주시면 별도의 입금 확인 전화가 필요없습니다.
+
+
※ 할인안내
+ - 서버비 입금시 3개월 이상 선납하는 고객분들께 드리는 할인혜택 (중도 해약하시더라도 환불은 되지 않습니다.)
+ 3개월 - 10%, 6개월 - 15%, 12개월 -20% 의 비율로 결제금액을 할인 해 드리고 있습니다.
+ - 장기사용하시는 고객분들께 드리는 할인혜택
+ 1년 이상 10%, 2년 이상 15% 3년 이상 20%, 4년 이상 25%, 최대 5년 이상 30%의 비율로 결제금액을 할인해 드리고 있습니다.
+ 단, 중도 해지 후 신규 가입시 할인혜택은 없습니다.
+
+
+ ※ 기타 서비스 요금 안내
+ - 도메인 구매 대행 서비스 : 도메인 1개당 3만원 (1회성 비용으로 구매를
요청하신 달에만 요금이 청구 됩니다)
+ - IP 추가 : 일반회선 10만원 / 보안회선 10만원(추가 하신 날로 부터 사용을 중지 하시는 달까지
매월 요금이 청구 됩니다.)
+ - IP 변경
+ - 단순 IP 변경의 경우(오래 사용하여 변경, 정기적인 변경, 관리자 변경 등)에는 무료로 변경 해 드리고 있습니다.
+ - IP에 문제(
KCSC로 연결, 접근(원격접속) 차단, 공격을 받아 다른 IP로 변경 등 )가 있어 변경 하실 경우에는
요금이 청구 됩니다.
+ * 청구비용 10만원 (1회성 비용으로 구매를
요청하신 달에만 요금이 청구 됩니다)
+ - 위 서비스는 선입금으로 제공 해 드리고 있습니다.
+ - VPN 결제일의 자정까지 결제처리가 안될시 자동차단처리가 되게됩니다.
+ 이점 양해 부탁드리겠습니다.
+
※ 이용 해지시에는 사용하셨던 IP에 연결 되어 있는 도메인들은 꼭 연결 해제를 해 주시기 바랍니다.
+
+ 보장 트래픽 : 기본 트래픽 사용량은 IN 10Mbps / OUT 10Mbps 입니다
+ 보장 트래픽 이상을 사용할 경우 트래픽 과금이 발생할 수 있습니다
+
※ 알림(필히 숙지 하여 주시기 바랍니다.)
+
+ 1. {{$siteInfo['name']}}에 등록 하신 고객명 / 전화번호 / 메일 주소는 차후 고객님 확인을 위해 사용 되니 고객님께서도 필히 알고 계셔야 합니다.
+ 또한 전화번호와 메일주소 또는 메신져는 {{$siteInfo['name']}}에서 고객님에게 연락을 취해야 할 경우 사용됩니다.변동사항이 있을 경우에는
+ 반드시 {{$siteInfo['name']}}에 연락을 하여 변경해 주시기 바랍니다.
+
+
변동사항을 {{$siteInfo['name']}}에게 알려 주시지 않거나, {{$siteInfo['name']}}에 등록된 연락처로 연락을 해도 연결이 안되어 발생하는 피해에 대해서는
+ 저희 {{$siteInfo['name']}}에서 책임을 지지 않습니다.
+
2. 결제는 납부기한내에 해 주셔야 합니다.
+ 혹시라도 납부기한내에 결제를 하지 못하실 경우는 미리 연락을 주시면 납부기한 후 최대 3일간은 서버 접속이 유지됩니다.
+ 하지만 납부기한까지 연락을 안주시거나 연락을 하셨더라도 납부기한을 3일 초과하시면 서버 접속이 차단되고 차단후에도
+ 3일동안 연락이 없을 경우 자동 해지 처리 되고 데이터는 삭제처리 되오니 주의 하시기 바랍니다.
+
3. 환불정책
+ 월단위 계약(계산)이므로 중도 환불(일할계산)은 안됩니다.
+ 단, 셋팅에 문제가 있거나 기타 문제가 있을 경우 서버를 인계 받으시고 3일 안으로는 환불 요청을 하실 수 있습니다.
+
+
4. 서버 운영중 해킹으로 발생한 피해는 저희 {{$siteInfo['name']}}에서 책임을 지지 않습니다.
+ 서버운영에 있어서 보안에 각별히 주의 부탁드리겠습니다.
+ <해킹 대비 및 보안조치사항>
+ - 주기적인 window 보안 업데이트
+ - linux ,mysql , php, jsp 보안권고
+ - 서버 원격 접속 패스워드 및 mssql 패스워드 변경
+ * 영문,숫자,특수문자 8자리 이상 조합하여 사용 권고
+ * 매월 주기적으로 패스워드 변경
+ * 패스워드 노출 시 즉각 변경
+ - 서버내 방화벽에서 특정IP만 서버에 접속할 수 있도록 방화벽 설정
+ - 원격접속 포트 기본포트에서 변경 설정 (기본 포트 window : 3389 / linux : 22 )
+
+
+ * 무료 설치 : Microsoft Security Essential 설치
+
+ - 웹서비스 보안을 위한 웹방화벽 설치 대행서비스(유료)
+
+
# 원격포트 변경 및 원격접속 제한 설정은 {{$siteInfo['name']}}홈페이지에 등록되어 있습니다.
+ 자세한 사항은 센터로 문의주시기 바랍니다.
+
5. 서버 운영중 장비부품 문제(예:하드디스크의 고장 등)로 발생한 피해는 저희 {{$siteInfo['name']}}에서 책임을 지지 않습니다.
+ (요청하시면 백업을 위해 무료로 추가 하드를 제공해 드리고 있지만, 추가가 불가능한 경우도 있습니다.
+ 번거로우시더라도 주기적인 데이터백업을 부탁드리겠습니다.)
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/payment/index.php b/extdbms/lib/Views/dbms/client/payment/index.php
new file mode 100644
index 0000000..05a0396
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/payment/index.php
@@ -0,0 +1,45 @@
+
+ 전체
+ 당일
+ 1일전
+ 2일전
+ 3일전
+
+
+{{$message}} 미납리스트 엑셀
+
+
+
+
+ 고객명
+ 종류
+ 장비명
+ IP
+ 결제일
+ 서비스 가격
+ 과금상태
+ 미납과금
+ 비고
+
+
+
+ @foreach ($entities as $entity)
+
+ {{$entity->Client_Name}}
+ {{$entity->addDB_case}}
+ {{$entity->server_code}}
+ {{$entity->service_ip}}
+
+ {{$entity->service_payment_date}}
+ {{$entity->service_amount}}
+
+ {{$entity->addDB_accountStatus}}
+ {{$entity->addDB_nonpayment}}
+
+ {{$entity->service_note}}
+
+
+ @endforeach
+
+
+
{{$pagination->render(DBMS_SITE_URL . "/IdcDepositNonPaymentListMK.dep", ['mode' => $mode, 'curPage' => $curPage, 'perPage' => $perPage])}}
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/point/index.php b/extdbms/lib/Views/dbms/client/point/index.php
new file mode 100644
index 0000000..99bda2d
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/point/index.php
@@ -0,0 +1,40 @@
+@extends('layout')
+@section('title', 'Point 관리리')
+@section('content')
+
+
+
+
+
+ No
+ 제목
+ 고객명
+ 현재금액
+ 입금액
+ 출금액
+ 작업일
+ 비고
+
+
+
+ @php $i = 0 @endphp
+ @foreach ($entities as $entity)
+
+ {{count($entities)-$i}}
+ {{$entity->getTitle()}}
+ {{$clients[$entity->getClientCode()]->getTitle()}}
+ {{number_format($clients[$entity->getClientCode()]->getPoint())}}
+ {{number_format($entity->getType() == 'deposit' ? $entity->getAmount() : 0)}}
+ {{number_format($entity->getType() == 'withdrawal' ? $entity->getAmount() : 0)}}
+ {{date('Y-m-d',strtotime($entity->getCreatedAt()))}}
+ {{$entity->getNote()}}
+
+ @php $i++ @endphp
+ @endforeach
+
+
+
{{$pagination->render(DBMS_SITE_URL . "/IdcClientPointList.cli", ['client_code' => $client_code, 'curPage' => $curPage, 'perPage' => $perPage])}}
+ @php $insert_url = DBMS_SITE_URL . "/IdcClientPointInsert.cli?client_code=" . $client_code @endphp
+
포인트 추가
+
+@endsection
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/client/point/insert_form.php b/extdbms/lib/Views/dbms/client/point/insert_form.php
new file mode 100644
index 0000000..14f9c7a
--- /dev/null
+++ b/extdbms/lib/Views/dbms/client/point/insert_form.php
@@ -0,0 +1,45 @@
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/coupon.php b/extdbms/lib/Views/dbms/dashboard/coupon.php
new file mode 100644
index 0000000..bc5bcc7
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/coupon.php
@@ -0,0 +1 @@
+
{{$service->getCoupon()}}개
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/cscount.php b/extdbms/lib/Views/dbms/dashboard/cscount.php
new file mode 100644
index 0000000..be78965
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/cscount.php
@@ -0,0 +1,2 @@
+
{{$vpc}}
+
{{$kcs}}
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/latest_history.php b/extdbms/lib/Views/dbms/dashboard/latest_history.php
new file mode 100644
index 0000000..542dcc1
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/latest_history.php
@@ -0,0 +1,23 @@
+
+
패스워드용 난수 :
+@foreach ($entities as $entity)
+@php $service = $services[$entity->getServiceCode()] @endphp
+
+@endforeach
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/latest_service.php b/extdbms/lib/Views/dbms/dashboard/latest_service.php
new file mode 100644
index 0000000..25d7665
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/latest_service.php
@@ -0,0 +1,36 @@
+
+
+
+ 서비스코드
+ 업체명
+ 구분
+ 장비번호
+ 스위치정보
+ IP정보
+ CS
+ 등록자
+ 비고
+
+
+
+ @foreach($entities as $entity)
+
+
+ {{$entity->getServiceCode()}}
+
+ {{$clients[$entity->getServiceCode()]->getTitle()}}
+ {{$entity->service_line}}
+ {{$entity->getServiceCode()}}
+ {{$entity->service_sw}}
+ {{$entity->service_ip}}
+
+ {{$vpcs[$entity->getServiceCode()]}}
+ /
+ {{$kcss[$entity->getServiceCode()]}}
+
+ {{!$members[$entity->getMemberCode()] ? "" : $members[$entity->getMemberCode()]->getTitle()}}
+ {{$helper->truncateString($entity->service_note, 20)}}
+
+ @endforeach
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/topboard.php b/extdbms/lib/Views/dbms/dashboard/topboard.php
new file mode 100644
index 0000000..f6e3c79
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/topboard.php
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{$newServices}}
+
최근 {{$day}}일간 신규서비스스 대수
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{$unPayments}}
+
금일 기준 미납 서버
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/dashboard/totalcount.php b/extdbms/lib/Views/dbms/dashboard/totalcount.php
new file mode 100644
index 0000000..1799391
--- /dev/null
+++ b/extdbms/lib/Views/dbms/dashboard/totalcount.php
@@ -0,0 +1,69 @@
+
+
+
+
+ 고객명
+ 일반
+ 방어
+ 전용
+ 대체
+ 테스트
+ 합계
+
+
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 합계
+ 도쿄
+ 치바
+ 합계
+
+
+
+ @foreach ($totalcount as $company => $service)
+
+ {{$company}}
+ @foreach ($service as $name => $location)
+ {{$location['Tokyo']}}
+ {{$location['Chiba']}}
+ @endforeach
+ {{$service['test']['Tokyo'] + $service['test']['Chiba']}}
+ {{$summary[$company]['Tokyo'] - $service['test']['Tokyo']}}
+ {{$summary[$company]['Chiba'] - $service['test']['Chiba']}}
+ {{$summary[$company]['Tokyo'] - $service['test']['Tokyo'] + $summary[$company]['Chiba'] - $service['test']['Chiba']}}
+
+ @endforeach
+
+
+
+ 총합계
+ @foreach ($siteInfo['totalcount_types'] as $type)
+ {{$summary[$type]['Tokyo']}}
+ {{$summary[$type]['Chiba']}}
+ @endforeach
+ {{$summary['test']['Tokyo'] + $summary['test']['Chiba']}}
+ {{$total['Tokyo'] - $summary['test']['Tokyo']}}
+ {{$total['Chiba'] - $summary['test']['Chiba']}}
+ {{$total['Tokyo'] - $summary['test']['Tokyo'] + $total['Chiba'] - $summary['test']['Chiba']}}
+
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/defence/index.php b/extdbms/lib/Views/dbms/defence/index.php
new file mode 100644
index 0000000..bf7b610
--- /dev/null
+++ b/extdbms/lib/Views/dbms/defence/index.php
@@ -0,0 +1,129 @@
+
+
+ @foreach ($entities as $entity)
+ @php $zone = $entity->getZone() @endphp
+
+ = $zone ?>
+
+ @endforeach
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/gearlist/index.php b/extdbms/lib/Views/dbms/gearlist/index.php
new file mode 100644
index 0000000..3929068
--- /dev/null
+++ b/extdbms/lib/Views/dbms/gearlist/index.php
@@ -0,0 +1,31 @@
+* CPU 명칭 : 싱글 코어 = 1개 코어 / 듀얼 코어 = 2개 코어 / 트리플 코어 = 3개 코어 / 쿼드 코어(Q) = 4개 코어 / 헥사 코어(H) = 6개 코어 / 옥타 코어(O) = 8개 코어 / 도데카(D) = 12개 코어 / 헥사데시멀 코어 = 16개코어
+* 도쿄 회선 + 1U상면비 : 60만원 (50+10) / 치바 회선 + 1U상면비 : 40만원 (30+10)
+* HDD : 1단위당 일회성 10만원 / 메모리 : 2G당 1회성 5만원 / 방어서비스 : CS방어 40만원 , BL상시 60만원 , CS-Pre상시 300만원 , CF방어 도메인당 40만원 , 인증방어 사이트당 80만원(+유동CS4개 기본)
+
+
+
+ 구분
+ 장비사양
+ CPU모델명
+ 임대가격
+ 전체서버
+ 임대중
+ 사용가능
+ 포맷보류
+
+
+
+ @foreach ($entities as $entity)
+
+ {{$entity->getProcess()}}
+ {{$entity->getSpec()}}
+ {{$entity->getCPUName()}}
+ {{$entity->getPrice()}} 만원
+ {{$entity->all}} 대
+ {{$entity->use}} 대
+ {{$entity->empty}} 대
+ {{$entity->format}} 대
+
+ @endforeach
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/service/extra.php b/extdbms/lib/Views/dbms/service/extra.php
new file mode 100644
index 0000000..735e1db
--- /dev/null
+++ b/extdbms/lib/Views/dbms/service/extra.php
@@ -0,0 +1,35 @@
+
+
+
+
+ 고객명
+ 장비명
+ IP
+ 사용OS
+ 위치
+
+
+
+ @foreach ($entities as $key => $entity)
+
+ {{$clients[$entity->getClientCode()]->getTitle()}}
+ {{$entity->getServerCode()}}
+ {{$entity->service_ip}}
+ {{$entity->service_os}}
+ {{$entity->service_sw}}
+
+ @endforeach
+
+
+
{{$pagination->render("/dbms/service/extra/adddb_code/", ['adddb_code' => $adddb_code, 'curPage' => $curPage, 'perPage' => $perPage])}}
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms/service/ipsearch.php b/extdbms/lib/Views/dbms/service/ipsearch.php
new file mode 100644
index 0000000..5367493
--- /dev/null
+++ b/extdbms/lib/Views/dbms/service/ipsearch.php
@@ -0,0 +1,120 @@
+
+
+
+
+
+ CODE
+ NAME
+ SERVER
+ IP
+ SW
+ NOTE
+ TEL
+ MAIL
+
+
+
+ @foreach ($entities as $entity)
+
+ {{ $entity->getClientCode()}}
+ {{$clients[$entity->getClientCode()]->getTitle()}}
+ {{$entity->getServerCode()}}
+ {{$entity->service_ip}}
+ {{$entity->service_os}}
+ {{$entity->service_sw}}
+ {{$clients[$entity->getClientCode()]->getPhone()}}
+ {{$clients[$entity->getClientCode()]->getEmail()}}
+
+ @endforeach
+
+
+
+
{{$pagination->render(DBMS_SITE_URL . "/usableServerList.ser", ['ip' => $ip, 'curPage' => $curPage, 'perPage' => $perPage])}}
\ No newline at end of file
diff --git a/extdbms/lib/Views/dbms_layout.php b/extdbms/lib/Views/dbms_layout.php
new file mode 100644
index 0000000..0c5aed7
--- /dev/null
+++ b/extdbms/lib/Views/dbms_layout.php
@@ -0,0 +1,3 @@
+
+ @yield('content')
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/default_layout.php b/extdbms/lib/Views/default_layout.php
new file mode 100644
index 0000000..6a09676
--- /dev/null
+++ b/extdbms/lib/Views/default_layout.php
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
@yield('title')
+
+
+
+
+
+
+
+ @yield('content')
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/lib/Views/layout.php b/extdbms/lib/Views/layout.php
new file mode 100644
index 0000000..0c5aed7
--- /dev/null
+++ b/extdbms/lib/Views/layout.php
@@ -0,0 +1,3 @@
+
+ @yield('content')
+
\ No newline at end of file
diff --git a/extdbms/public/.htaccess b/extdbms/public/.htaccess
new file mode 100644
index 0000000..f47adc9
--- /dev/null
+++ b/extdbms/public/.htaccess
@@ -0,0 +1,49 @@
+# Disable directory browsing
+Options -Indexes
+
+# ----------------------------------------------------------------------
+# Rewrite engine
+# ----------------------------------------------------------------------
+
+# Turning on the rewrite engine is necessary for the following rules and features.
+# FollowSymLinks must be enabled for this to work.
+
+ Options +FollowSymlinks
+ RewriteEngine On
+
+ # If you installed CodeIgniter in a subfolder, you will need to
+ # change the following line to match the subfolder you need.
+ # http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
+ # RewriteBase /
+
+ # Redirect Trailing Slashes...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} (.+)/$
+ RewriteRule ^ %1 [L,R=301]
+
+ # Rewrite "www.example.com -> example.com"
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
+
+ # Checks to see if the user is attempting to access a valid file,
+ # such as an image or css document, if this isn't true it sends the
+ # request to the front controller, index.php
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
+
+ # Ensure Authorization header is passed along
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+
+
+ # If we don't have mod_rewrite installed, all 404's
+ # can be sent to index.php, and everything works as normal.
+ ErrorDocument 404 index.php
+
+
+# Disable server signature start
+ServerSignature Off
+# Disable server signature end
\ No newline at end of file
diff --git a/extdbms/public/index.php b/extdbms/public/index.php
new file mode 100644
index 0000000..80bb959
--- /dev/null
+++ b/extdbms/public/index.php
@@ -0,0 +1,32 @@
+load();
+
+// var_dump($_ENV); // .env 값들이 출력됩니다.
+// exit;
+
+// Constant 관련
+define("APP_PATH", ROOT_PATH . "lib" . DIRECTORY_SEPARATOR);
+require_once APP_PATH . "Configs" . DIRECTORY_SEPARATOR . "App.php";
+require_once APP_PATH . 'Configs' . DIRECTORY_SEPARATOR . 'Constant.php';
+
+// var_dump($_ENV); // .env 값들이 출력됩니다.
+// exit;
+
+try {
+ $app = new App();
+ $app->run();
+} catch (\Exception $e) {
+ echo $e->getMessage();
+}
diff --git a/extdbms/writeable/cache/dbms.client.dashboard.totalcount_df99a41286e5f24a3806ac32d28ff4a78c890656.bladec b/extdbms/writeable/cache/dbms.client.dashboard.totalcount_df99a41286e5f24a3806ac32d28ff4a78c890656.bladec
new file mode 100644
index 0000000..bf32f33
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.dashboard.totalcount_df99a41286e5f24a3806ac32d28ff4a78c890656.bladec
@@ -0,0 +1,56 @@
+
+
+
+
+ 도쿄
+ 치바
+ VPN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 일반
+ 방어
+ 전용
+ 이벤트
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 테스트
+ 대체
+ 쿠폰
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.client.memo.update_form_b41657b6810df35ba48caf4006450f54a9936b1a.bladec b/extdbms/writeable/cache/dbms.client.memo.update_form_b41657b6810df35ba48caf4006450f54a9936b1a.bladec
new file mode 100644
index 0000000..a6eb268
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.memo.update_form_b41657b6810df35ba48caf4006450f54a9936b1a.bladec
@@ -0,0 +1,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.client.payment.billpaper_d6a42f9d4d44f766b8c633b9fb7492eb16f3a9f3.bladec b/extdbms/writeable/cache/dbms.client.payment.billpaper_d6a42f9d4d44f766b8c633b9fb7492eb16f3a9f3.bladec
new file mode 100644
index 0000000..4d55737
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.payment.billpaper_d6a42f9d4d44f766b8c633b9fb7492eb16f3a9f3.bladec
@@ -0,0 +1,81 @@
+
+
※ 청구서를 받으셨던 서버인 경우에도 발행하는 시점까지 미납인 경우 재 발행됩니다. 입금을 하신 경우에는 연락 부탁드립니다.
+
입금 하실 계좌 번호 입니다.
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $bank): $loop = $this->incrementLoopIndices(); ?>
+
+ 은행명 :
+ 계좌번호 :
+ 예금주:
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
고객명과 입금자명이 상이한 경우 반드시 확인 연락이 필요합니다.
+ 입금 시 당 청구서에 기재되어 있는 고객명으로 입금해주시면 별도의 입금 확인 전화가 필요없습니다.
+
+
※ 할인안내
+ - 서버비 입금시 3개월 이상 선납하는 고객분들께 드리는 할인혜택 (중도 해약하시더라도 환불은 되지 않습니다.)
+ 3개월 - 10%, 6개월 - 15%, 12개월 -20% 의 비율로 결제금액을 할인 해 드리고 있습니다.
+ - 장기사용하시는 고객분들께 드리는 할인혜택
+ 1년 이상 10%, 2년 이상 15% 3년 이상 20%, 4년 이상 25%, 최대 5년 이상 30%의 비율로 결제금액을 할인해 드리고 있습니다.
+ 단, 중도 해지 후 신규 가입시 할인혜택은 없습니다.
+
+
+ ※ 기타 서비스 요금 안내
+ - 도메인 구매 대행 서비스 : 도메인 1개당 3만원 (1회성 비용으로 구매를
요청하신 달에만 요금이 청구 됩니다)
+ - IP 추가 : 일반회선 10만원 / 보안회선 10만원(추가 하신 날로 부터 사용을 중지 하시는 달까지
매월 요금이 청구 됩니다.)
+ - IP 변경
+ - 단순 IP 변경의 경우(오래 사용하여 변경, 정기적인 변경, 관리자 변경 등)에는 무료로 변경 해 드리고 있습니다.
+ - IP에 문제(
KCSC로 연결, 접근(원격접속) 차단, 공격을 받아 다른 IP로 변경 등 )가 있어 변경 하실 경우에는
요금이 청구 됩니다.
+ * 청구비용 10만원 (1회성 비용으로 구매를
요청하신 달에만 요금이 청구 됩니다)
+ - 위 서비스는 선입금으로 제공 해 드리고 있습니다.
+ - VPN 결제일의 자정까지 결제처리가 안될시 자동차단처리가 되게됩니다.
+ 이점 양해 부탁드리겠습니다.
+
※ 이용 해지시에는 사용하셨던 IP에 연결 되어 있는 도메인들은 꼭 연결 해제를 해 주시기 바랍니다.
+
+ 보장 트래픽 : 기본 트래픽 사용량은 IN 10Mbps / OUT 10Mbps 입니다
+ 보장 트래픽 이상을 사용할 경우 트래픽 과금이 발생할 수 있습니다
+
※ 알림(필히 숙지 하여 주시기 바랍니다.)
+
+ 1. 에 등록 하신 고객명 / 전화번호 / 메일 주소는 차후 고객님 확인을 위해 사용 되니 고객님께서도 필히 알고 계셔야 합니다.
+ 또한 전화번호와 메일주소 또는 메신져는 에서 고객님에게 연락을 취해야 할 경우 사용됩니다.변동사항이 있을 경우에는
+ 반드시 에 연락을 하여 변경해 주시기 바랍니다.
+
+
변동사항을 에게 알려 주시지 않거나, 에 등록된 연락처로 연락을 해도 연결이 안되어 발생하는 피해에 대해서는
+ 저희 에서 책임을 지지 않습니다.
+
2. 결제는 납부기한내에 해 주셔야 합니다.
+ 혹시라도 납부기한내에 결제를 하지 못하실 경우는 미리 연락을 주시면 납부기한 후 최대 3일간은 서버 접속이 유지됩니다.
+ 하지만 납부기한까지 연락을 안주시거나 연락을 하셨더라도 납부기한을 3일 초과하시면 서버 접속이 차단되고 차단후에도
+ 3일동안 연락이 없을 경우 자동 해지 처리 되고 데이터는 삭제처리 되오니 주의 하시기 바랍니다.
+
3. 환불정책
+ 월단위 계약(계산)이므로 중도 환불(일할계산)은 안됩니다.
+ 단, 셋팅에 문제가 있거나 기타 문제가 있을 경우 서버를 인계 받으시고 3일 안으로는 환불 요청을 하실 수 있습니다.
+
+
4. 서버 운영중 해킹으로 발생한 피해는 저희 에서 책임을 지지 않습니다.
+ 서버운영에 있어서 보안에 각별히 주의 부탁드리겠습니다.
+ <해킹 대비 및 보안조치사항>
+ - 주기적인 window 보안 업데이트
+ - linux ,mysql , php, jsp 보안권고
+ - 서버 원격 접속 패스워드 및 mssql 패스워드 변경
+ * 영문,숫자,특수문자 8자리 이상 조합하여 사용 권고
+ * 매월 주기적으로 패스워드 변경
+ * 패스워드 노출 시 즉각 변경
+ - 서버내 방화벽에서 특정IP만 서버에 접속할 수 있도록 방화벽 설정
+ - 원격접속 포트 기본포트에서 변경 설정 (기본 포트 window : 3389 / linux : 22 )
+
+
+ * 무료 설치 : Microsoft Security Essential 설치
+
+ - 웹서비스 보안을 위한 웹방화벽 설치 대행서비스(유료)
+
+
# 원격포트 변경 및 원격접속 제한 설정은 홈페이지에 등록되어 있습니다.
+ 자세한 사항은 센터로 문의주시기 바랍니다.
+
5. 서버 운영중 장비부품 문제(예:하드디스크의 고장 등)로 발생한 피해는 저희 에서 책임을 지지 않습니다.
+ (요청하시면 백업을 위해 무료로 추가 하드를 제공해 드리고 있지만, 추가가 불가능한 경우도 있습니다.
+ 번거로우시더라도 주기적인 데이터백업을 부탁드리겠습니다.)
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.client.payment.index_cb951dc01872c50fe86e6dfd2b47b58ef6a8724a.bladec b/extdbms/writeable/cache/dbms.client.payment.index_cb951dc01872c50fe86e6dfd2b47b58ef6a8724a.bladec
new file mode 100644
index 0000000..12523a7
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.payment.index_cb951dc01872c50fe86e6dfd2b47b58ef6a8724a.bladec
@@ -0,0 +1,46 @@
+
+ >전체
+ >당일
+ >1일전
+ >2일전
+ >3일전
+
+
+ 미납리스트
엑셀
+
+
+
+
+ 고객명
+ 종류
+ 장비명
+ IP
+ 결제일
+ 서비스 가격
+ 과금상태
+ 미납과금
+ 비고
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+ Client_Name??'', ENT_QUOTES, 'UTF-8', false); ?>
+ addDB_case??'', ENT_QUOTES, 'UTF-8', false); ?>
+ server_code??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ service_payment_date??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_amount??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ addDB_accountStatus??'', ENT_QUOTES, 'UTF-8', false); ?>
+ addDB_nonpayment??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ service_note??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
render(DBMS_SITE_URL . "/IdcDepositNonPaymentListMK.dep", ['mode' => $mode, 'curPage' => $curPage, 'perPage' => $perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.client.point.index_f85f411dc6d56670566d372bcb2f7bc835cf6017.bladec b/extdbms/writeable/cache/dbms.client.point.index_f85f411dc6d56670566d372bcb2f7bc835cf6017.bladec
new file mode 100644
index 0000000..492411a
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.point.index_f85f411dc6d56670566d372bcb2f7bc835cf6017.bladec
@@ -0,0 +1,42 @@
+
+startSection('title', 'Point 관리리'); ?>
+startSection('content'); ?>
+
+
+
+
+
+ No
+ 제목
+ 고객명
+ 현재금액
+ 입금액
+ 출금액
+ 작업일
+ 비고
+
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+
+ getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getPoint())??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getType() == 'deposit' ? $entity->getAmount() : 0)??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getType() == 'withdrawal' ? $entity->getAmount() : 0)??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getCreatedAt()))??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getNote()??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
render(DBMS_SITE_URL . "/IdcClientPointList.cli", ['client_code' => $client_code, 'curPage' => $curPage, 'perPage' => $perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+
포인트 추가
+
+stopSection(); ?>
+runChild('layout'); } ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.client.point.insert_form_a14001199cfe02d7aa1cdddad64c00874c1a34f6.bladec b/extdbms/writeable/cache/dbms.client.point.insert_form_a14001199cfe02d7aa1cdddad64c00874c1a34f6.bladec
new file mode 100644
index 0000000..209d0dd
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.client.point.insert_form_a14001199cfe02d7aa1cdddad64c00874c1a34f6.bladec
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.dashboard.coupon_b44e7167ff934d5218bd2c3200bac49eedf8137b.bladec b/extdbms/writeable/cache/dbms.dashboard.coupon_b44e7167ff934d5218bd2c3200bac49eedf8137b.bladec
new file mode 100644
index 0000000..2491ebc
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.dashboard.coupon_b44e7167ff934d5218bd2c3200bac49eedf8137b.bladec
@@ -0,0 +1 @@
+
coupon??'', ENT_QUOTES, 'UTF-8', false); ?>개
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.dashboard.latest_history_9511669aac90f311ef3334a1331266c67cd903fd.bladec b/extdbms/writeable/cache/dbms.dashboard.latest_history_9511669aac90f311ef3334a1331266c67cd903fd.bladec
new file mode 100644
index 0000000..862a520
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.dashboard.latest_history_9511669aac90f311ef3334a1331266c67cd903fd.bladec
@@ -0,0 +1,25 @@
+
+
패스워드용 난수 :
+addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+getServiceCode()] ?>
+
+
+
+ [getClientCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>]getServiceCode()??'', ENT_QUOTES, 'UTF-8', false); ?>/behavior??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+
+
note??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+popLoop(); $loop = $this->getFirstLoop(); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.dashboard.latest_service_93ca50c2aced15fdc02b7f48ecf8064d25edaa6c.bladec b/extdbms/writeable/cache/dbms.dashboard.latest_service_93ca50c2aced15fdc02b7f48ecf8064d25edaa6c.bladec
new file mode 100644
index 0000000..7700baa
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.dashboard.latest_service_93ca50c2aced15fdc02b7f48ecf8064d25edaa6c.bladec
@@ -0,0 +1,37 @@
+
+
+
+ 서비스코드
+ 업체명
+ 구분
+ 장비번호
+ 스위치정보
+ IP정보
+ CS
+ 등록자
+ 비고
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+
+ getServiceCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ getServiceCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_line??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getServiceCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_sw??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ getServiceCode()]??'', ENT_QUOTES, 'UTF-8', false); ?>
+ /
+ getServiceCode()]??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ getMemberCode()] ? "" : $members[$entity->getMemberCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ truncateString($entity->service_note, 20)??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.dashboard.topboard_e1dceb87db14d296b4301dec302a97dd069da2f2.bladec b/extdbms/writeable/cache/dbms.dashboard.topboard_e1dceb87db14d296b4301dec302a97dd069da2f2.bladec
new file mode 100644
index 0000000..6d7d42a
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.dashboard.topboard_e1dceb87db14d296b4301dec302a97dd069da2f2.bladec
@@ -0,0 +1,92 @@
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.dashboard.totalcount_120231a013c2a9794c6a9910111897ee15f454b4.bladec b/extdbms/writeable/cache/dbms.dashboard.totalcount_120231a013c2a9794c6a9910111897ee15f454b4.bladec
new file mode 100644
index 0000000..c0b630b
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.dashboard.totalcount_120231a013c2a9794c6a9910111897ee15f454b4.bladec
@@ -0,0 +1,72 @@
+
+
+
+
+ 고객명
+ 일반
+ 방어
+ 전용
+ 대체
+ 테스트
+ 합계
+
+
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 도쿄
+ 치바
+ 합계
+ 도쿄
+ 치바
+ 합계
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $company => $service): $loop = $this->incrementLoopIndices(); ?>
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $name => $location): $loop = $this->incrementLoopIndices(); ?>
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+ 총합계
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $type): $loop = $this->incrementLoopIndices(); ?>
+
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.defence.index_8915016ff4b8c99c666806fb12b2addb8df728c8.bladec b/extdbms/writeable/cache/dbms.defence.index_8915016ff4b8c99c666806fb12b2addb8df728c8.bladec
new file mode 100644
index 0000000..a0ef5e9
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.defence.index_8915016ff4b8c99c666806fb12b2addb8df728c8.bladec
@@ -0,0 +1,130 @@
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+ getZone() ?>
+ ">
+ = $zone ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.gearlist.index_b8bb0f02cb93baffca7c68fea202ae9dadb59465.bladec b/extdbms/writeable/cache/dbms.gearlist.index_b8bb0f02cb93baffca7c68fea202ae9dadb59465.bladec
new file mode 100644
index 0000000..38fc463
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.gearlist.index_b8bb0f02cb93baffca7c68fea202ae9dadb59465.bladec
@@ -0,0 +1,32 @@
+* CPU 명칭 : 싱글 코어 = 1개 코어 / 듀얼 코어 = 2개 코어 / 트리플 코어 = 3개 코어 / 쿼드 코어(Q) = 4개 코어 / 헥사 코어(H) = 6개 코어 / 옥타 코어(O) = 8개 코어 / 도데카(D) = 12개 코어 / 헥사데시멀 코어 = 16개코어
+* 도쿄 회선 + 1U상면비 : 60만원 (50+10) / 치바 회선 + 1U상면비 : 40만원 (30+10)
+* HDD : 1단위당 일회성 10만원 / 메모리 : 2G당 1회성 5만원 / 방어서비스 : CS방어 40만원 , BL상시 60만원 , CS-Pre상시 300만원 , CF방어 도메인당 40만원 , 인증방어 사이트당 80만원(+유동CS4개 기본)
+
+
+
+ 구분
+ 장비사양
+ CPU모델명
+ 임대가격
+ 전체서버
+ 임대중
+ 사용가능
+ 포맷보류
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $key => $entity): $loop = $this->incrementLoopIndices(); ?>
+
+ getProcess()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getSpec()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getCPUName()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getPrice()??'', ENT_QUOTES, 'UTF-8', false); ?> 만원
+ all??'', ENT_QUOTES, 'UTF-8', false); ?> 대
+ use??'', ENT_QUOTES, 'UTF-8', false); ?> 대
+ empty??'', ENT_QUOTES, 'UTF-8', false); ?> 대
+ format??'', ENT_QUOTES, 'UTF-8', false); ?> 대
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.navigator.index_b9f8b2b782646d3d0110c29b723812fc4ef8c85f.bladec b/extdbms/writeable/cache/dbms.navigator.index_b9f8b2b782646d3d0110c29b723812fc4ef8c85f.bladec
new file mode 100644
index 0000000..c15ffbb
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.navigator.index_b9f8b2b782646d3d0110c29b723812fc4ef8c85f.bladec
@@ -0,0 +1,121 @@
+
+
+
+
+
+ CODE
+ NAME
+ SERVER
+ IP
+ SW
+ NOTE
+ TEL
+ MAIL
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+ getClientCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getServerCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_os??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_sw??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getPhone()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getEmail()??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+
render(DBMS_SITE_URL . "/usableServerList.ser", ['ip' => $ip, 'curPage' => $curPage, 'perPage' => $perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.server.index_b0b16dad2f4567d59758a539d04fbb0a981cd3d1.bladec b/extdbms/writeable/cache/dbms.server.index_b0b16dad2f4567d59758a539d04fbb0a981cd3d1.bladec
new file mode 100644
index 0000000..93aaf02
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.server.index_b0b16dad2f4567d59758a539d04fbb0a981cd3d1.bladec
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ No
+ 서비스코드
+ 장비명
+ 서버IP
+ 서비스개시일
+ 회선종류
+ 쿠폰 누적수
+ 쿠폰 잔량수
+ 쿠폰 사용수
+ 사용
+
+
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+
+ getServiceCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getServerCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ server_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+ server_open_date??'', ENT_QUOTES, 'UTF-8', false); ?>
+ server_line??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getCoupon() + $entity->getUsedCoupon()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getCoupon()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getUsedCoupon()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getCoupon() ? "사용완료" : "사용하기"??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+
render(DBMS_SITE_URL . "/IdcCouponUseMK.cup", ['client_code' => $this->client ? $this->client->getClientCode() : "", 'mkid' => $this->member ? $this->member->getPK() : "", 'curPage' => $this->curPage, 'perPage' => $this->perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.service.extra_ecdf5220be695b4a8306093867dba883dfc53853.bladec b/extdbms/writeable/cache/dbms.service.extra_ecdf5220be695b4a8306093867dba883dfc53853.bladec
new file mode 100644
index 0000000..4bfcccd
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.service.extra_ecdf5220be695b4a8306093867dba883dfc53853.bladec
@@ -0,0 +1,36 @@
+
+
+
+
+ 고객명
+ 장비명
+ IP
+ 사용OS
+ 위치
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $key => $entity): $loop = $this->incrementLoopIndices(); ?>
+
+ getClientCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getServerCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_os??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_sw??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
render("/dbms/service/extra/adddb_code/", ['adddb_code' => $adddb_code, 'curPage' => $curPage, 'perPage' => $perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/dbms.service.ipsearch_a3a215e05fb22307221fdbb2328a0686b5aac48b.bladec b/extdbms/writeable/cache/dbms.service.ipsearch_a3a215e05fb22307221fdbb2328a0686b5aac48b.bladec
new file mode 100644
index 0000000..c15ffbb
--- /dev/null
+++ b/extdbms/writeable/cache/dbms.service.ipsearch_a3a215e05fb22307221fdbb2328a0686b5aac48b.bladec
@@ -0,0 +1,121 @@
+
+
+
+
+
+ CODE
+ NAME
+ SERVER
+ IP
+ SW
+ NOTE
+ TEL
+ MAIL
+
+
+
+ addLoop($__currentLoopData);$this->getFirstLoop();
+ foreach($__currentLoopData as $entity): $loop = $this->incrementLoopIndices(); ?>
+
+ getClientCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getTitle()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getServerCode()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_ip??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_os??'', ENT_QUOTES, 'UTF-8', false); ?>
+ service_sw??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getPhone()??'', ENT_QUOTES, 'UTF-8', false); ?>
+ getClientCode()]->getEmail()??'', ENT_QUOTES, 'UTF-8', false); ?>
+
+ popLoop(); $loop = $this->getFirstLoop(); ?>
+
+
+
+
render(DBMS_SITE_URL . "/usableServerList.ser", ['ip' => $ip, 'curPage' => $curPage, 'perPage' => $perPage])??'', ENT_QUOTES, 'UTF-8', false); ?>
\ No newline at end of file
diff --git a/extdbms/writeable/cache/layout_f5ecbab7a59173e8f787473621581ce3460dadbf.bladec b/extdbms/writeable/cache/layout_f5ecbab7a59173e8f787473621581ce3460dadbf.bladec
new file mode 100644
index 0000000..a23fdad
--- /dev/null
+++ b/extdbms/writeable/cache/layout_f5ecbab7a59173e8f787473621581ce3460dadbf.bladec
@@ -0,0 +1,3 @@
+
+ yieldContent('content'); ?>
+
\ No newline at end of file
diff --git a/extdbms/writeable/sessions/sess_0248d9rh89hggsof65julsovfb b/extdbms/writeable/sessions/sess_0248d9rh89hggsof65julsovfb
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_077b4fnq51hmfo17ts7er8cl6f b/extdbms/writeable/sessions/sess_077b4fnq51hmfo17ts7er8cl6f
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_0a8gclhru9fen2e21shgcon41i b/extdbms/writeable/sessions/sess_0a8gclhru9fen2e21shgcon41i
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_0fgjmucq3ec7k914eeiqrr9nrk b/extdbms/writeable/sessions/sess_0fgjmucq3ec7k914eeiqrr9nrk
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_0k4ffv2pjkm4gleiu9pa0u23ai b/extdbms/writeable/sessions/sess_0k4ffv2pjkm4gleiu9pa0u23ai
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_1kae06jradbe0acn7h5c8sr19s b/extdbms/writeable/sessions/sess_1kae06jradbe0acn7h5c8sr19s
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_1stiat845td4d060e0qejcbtuf b/extdbms/writeable/sessions/sess_1stiat845td4d060e0qejcbtuf
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_22fph5v1b2l9s73jgaafele5h9 b/extdbms/writeable/sessions/sess_22fph5v1b2l9s73jgaafele5h9
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_2sdlh5avi736ouvbr0dbsvrsgl b/extdbms/writeable/sessions/sess_2sdlh5avi736ouvbr0dbsvrsgl
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_3mi9usffkn7d7r7lah74i6uktk b/extdbms/writeable/sessions/sess_3mi9usffkn7d7r7lah74i6uktk
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_6o22bsf58ukqb4nolgsiaof38v b/extdbms/writeable/sessions/sess_6o22bsf58ukqb4nolgsiaof38v
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_7hougrcki3ner9j1ovg64s0rf2 b/extdbms/writeable/sessions/sess_7hougrcki3ner9j1ovg64s0rf2
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_81dio9in4sus6s7fpjv8qr6lfr b/extdbms/writeable/sessions/sess_81dio9in4sus6s7fpjv8qr6lfr
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_8dplngu294ck5qslrahhl19duv b/extdbms/writeable/sessions/sess_8dplngu294ck5qslrahhl19duv
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_93qa48njc2mu5vpukqgsgea5gc b/extdbms/writeable/sessions/sess_93qa48njc2mu5vpukqgsgea5gc
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_95mvagura1t9jocuscut76qgre b/extdbms/writeable/sessions/sess_95mvagura1t9jocuscut76qgre
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_97kbu17hnksjrbogjemami4qvr b/extdbms/writeable/sessions/sess_97kbu17hnksjrbogjemami4qvr
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_9fnt2ape87u9spts9v3b8u33js b/extdbms/writeable/sessions/sess_9fnt2ape87u9spts9v3b8u33js
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_9g888aa3eincp8fda9r3l4udku b/extdbms/writeable/sessions/sess_9g888aa3eincp8fda9r3l4udku
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_9j50dsrov23eikol8c3o0lktno b/extdbms/writeable/sessions/sess_9j50dsrov23eikol8c3o0lktno
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_9ovlhom9av3b8qks8tpqv0i4k4 b/extdbms/writeable/sessions/sess_9ovlhom9av3b8qks8tpqv0i4k4
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_9t3nbv838f59v70mq0tn3pka6i b/extdbms/writeable/sessions/sess_9t3nbv838f59v70mq0tn3pka6i
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_a3mgq2f64u076pkae53adikm0v b/extdbms/writeable/sessions/sess_a3mgq2f64u076pkae53adikm0v
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_afqdl8pb60ju1o003gu6n5rha7 b/extdbms/writeable/sessions/sess_afqdl8pb60ju1o003gu6n5rha7
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_c4arn76ad15rhu8dnug8cgesg5 b/extdbms/writeable/sessions/sess_c4arn76ad15rhu8dnug8cgesg5
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_e4feigf4ne0k4ehgushog49oif b/extdbms/writeable/sessions/sess_e4feigf4ne0k4ehgushog49oif
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_fc2qsbrkg0nsvogt1nevmn3v0u b/extdbms/writeable/sessions/sess_fc2qsbrkg0nsvogt1nevmn3v0u
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_gmsoctcukm3u3kklelasl07d5m b/extdbms/writeable/sessions/sess_gmsoctcukm3u3kklelasl07d5m
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_gtu2hisovug4ef3gsb99nm7d2p b/extdbms/writeable/sessions/sess_gtu2hisovug4ef3gsb99nm7d2p
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_gvksuh2vj653bt95lhjscsoqc6 b/extdbms/writeable/sessions/sess_gvksuh2vj653bt95lhjscsoqc6
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_ir2kj98o7ria41jrk9e2r6tchg b/extdbms/writeable/sessions/sess_ir2kj98o7ria41jrk9e2r6tchg
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_j00ganffbfpc8u32f04vqo4s2m b/extdbms/writeable/sessions/sess_j00ganffbfpc8u32f04vqo4s2m
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_jdt6i03rtjtbrjfa1m672jcvpc b/extdbms/writeable/sessions/sess_jdt6i03rtjtbrjfa1m672jcvpc
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_jnoppp2p30pp1u8p705q708p9j b/extdbms/writeable/sessions/sess_jnoppp2p30pp1u8p705q708p9j
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_kggm6jhtodvgpptmfn23s2uchr b/extdbms/writeable/sessions/sess_kggm6jhtodvgpptmfn23s2uchr
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_l5tl5fbfpt3fmjkala4m6jbt48 b/extdbms/writeable/sessions/sess_l5tl5fbfpt3fmjkala4m6jbt48
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_llrah0c8r4lpirs6l1773tgjqi b/extdbms/writeable/sessions/sess_llrah0c8r4lpirs6l1773tgjqi
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_n17ubnhet4na9p7752shum6lt7 b/extdbms/writeable/sessions/sess_n17ubnhet4na9p7752shum6lt7
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_nknjpcs0f8a47da2r1e7buebam b/extdbms/writeable/sessions/sess_nknjpcs0f8a47da2r1e7buebam
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_ntf4uhl491j0udu986msn78gq3 b/extdbms/writeable/sessions/sess_ntf4uhl491j0udu986msn78gq3
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_of5gdk0h902ffl2o788i1kop7t b/extdbms/writeable/sessions/sess_of5gdk0h902ffl2o788i1kop7t
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_onp6jm496glqvenkkvpdkarl7b b/extdbms/writeable/sessions/sess_onp6jm496glqvenkkvpdkarl7b
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_q28mkk9o60uieivtg4csia0rfi b/extdbms/writeable/sessions/sess_q28mkk9o60uieivtg4csia0rfi
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_r39tulpatbu6p1c7efv1hnrb9a b/extdbms/writeable/sessions/sess_r39tulpatbu6p1c7efv1hnrb9a
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_s5nuq8es9b5jf78da99891oaph b/extdbms/writeable/sessions/sess_s5nuq8es9b5jf78da99891oaph
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_ubf37c9sf9utcmrhr2pqr2kf7u b/extdbms/writeable/sessions/sess_ubf37c9sf9utcmrhr2pqr2kf7u
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_us0lb1ru2l6cvb8o7kvj6lcag1 b/extdbms/writeable/sessions/sess_us0lb1ru2l6cvb8o7kvj6lcag1
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_v83d9mjno89ansom6b535ksagl b/extdbms/writeable/sessions/sess_v83d9mjno89ansom6b535ksagl
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_vd87cpoge0627hgpj64k007rna b/extdbms/writeable/sessions/sess_vd87cpoge0627hgpj64k007rna
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_ve9p6mqct0casn830oq0uohsmt b/extdbms/writeable/sessions/sess_ve9p6mqct0casn830oq0uohsmt
new file mode 100644
index 0000000..e69de29
diff --git a/extdbms/writeable/sessions/sess_vo2hv6seg9hg48vdj4pm0r4lou b/extdbms/writeable/sessions/sess_vo2hv6seg9hg48vdj4pm0r4lou
new file mode 100644
index 0000000..e69de29
diff --git a/idcproject/WebContent/IDC/Navigation.jsp b/idcproject/WebContent/IDC/Navigation.jsp
index 65eabd5..8874ed1 100644
--- a/idcproject/WebContent/IDC/Navigation.jsp
+++ b/idcproject/WebContent/IDC/Navigation.jsp
@@ -360,7 +360,7 @@ $(document).ready(function(){
CS정보 -
가용장비 -
도메인포워딩 -
-
DB검색(IP) -
+
DB검색(IP) -
업무일지 -
AWS -
BL(AMP)
@@ -371,7 +371,7 @@ $(document).ready(function(){
CS정보
가용장비
도메인포워딩
-
DB검색(IP)
+
DB검색(IP)
업무일지
AWS
BL(AMP)
diff --git a/idcproject/WebContent/jsp/main/IdcTotalSearchForm.jsp b/idcproject/WebContent/jsp/main/IdcTotalSearchForm.jsp
index 8534f23..17f5b12 100644
--- a/idcproject/WebContent/jsp/main/IdcTotalSearchForm.jsp
+++ b/idcproject/WebContent/jsp/main/IdcTotalSearchForm.jsp
@@ -1,20 +1,16 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>
-
-
-
고객 리스트
-
+
고객 리스트
-
-
+
-
+
diff --git a/idcproject/WebContent/jsp/service/serviceDetail.jsp b/idcproject/WebContent/jsp/service/serviceDetail.jsp
index 8bfe038..f0696ee 100644
--- a/idcproject/WebContent/jsp/service/serviceDetail.jsp
+++ b/idcproject/WebContent/jsp/service/serviceDetail.jsp
@@ -968,8 +968,8 @@ $(function()
-
${iusc.client_name}
- [청구서발행 ]
+ ${iusc.client_name}
+ [청구서발행 ]
@@ -2059,7 +2059,7 @@ $(function()
-
+
@@ -2071,9 +2071,9 @@ $(function()
-
+
-
+