diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 4e3a482..b0d7b94 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -93,6 +93,31 @@ define('EVENT_PRIORITY_NORMAL', 100); */ define('EVENT_PRIORITY_HIGH', 10); +//Categorys +define('MENULAYERS',[ + 'default' => 'aboutus', + 'TOP'=>['aboutus'=>'AboutUS','hosting'=>'Hosting','service'=>'Service','support'=>'Support'], + 'SECOND'=> + ['aboutus'=>[ + 'greeting'=>'인사말', + 'companyinfo'=>'회사소개', + ], + 'hosting'=>[ + 'beremetal'=>'단독서버', + 'virtual'=>'가상서버', + ], + 'service'=>[ + 'line'=>'단독회선', + 'vpn'=>'VPN', + 'ddos'=>'DDOS', + ], + 'support'=>[ + 'information'=>'공지사항', + 'refrence'=>'자료실', + ], + ], +]); + define('LAYOUTS', [ 'empty' => [ 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', @@ -106,6 +131,7 @@ define('LAYOUTS', [ ] ], 'front' => [ + 'title' => '사용자화면', 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front', 'stylesheets' => [ '', @@ -123,9 +149,11 @@ define('LAYOUTS', [ '', '', '', - ] + ], + 'menus' => ['aboutus', 'hosting', 'service', 'support'], ], 'admin' => [ + 'title' => '관리자화면', 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', 'stylesheets' => [ '', @@ -145,26 +173,6 @@ define('LAYOUTS', [ '', ] ], - 'main' => [ - 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'main', - 'stylesheets' => [ - '', - '', - '', - '', - '', - '', - '', - '', - ], - 'javascripts' => [ - '', - '', - '', - '', - '', - ] - ], ]); //URL diff --git a/app/Controllers/Front/FrontController.php b/app/Controllers/Front/FrontController.php index 1e96ee6..06995d5 100644 --- a/app/Controllers/Front/FrontController.php +++ b/app/Controllers/Front/FrontController.php @@ -18,6 +18,9 @@ abstract class FrontController extends BaseController $this->_viewPath = 'front/'; $this->_viewDatas['control'] = 'front'; $this->_viewDatas['layout'] = LAYOUTS['front']; + $this->_viewDatas['title'] = LAYOUTS['front']['title']; + $this->_viewDatas['MENULAYERS'] = MENULAYERS; + $this->_viewDatas['category'] = MENULAYERS['default']; } final protected function getCategoryModel(): CategoryModel diff --git a/app/Controllers/Front/Home.php b/app/Controllers/Front/Home.php index dbdc4c6..ecda803 100644 --- a/app/Controllers/Front/Home.php +++ b/app/Controllers/Front/Home.php @@ -2,7 +2,6 @@ namespace App\Controllers\Front; -use App\Entities\CategoryEntity; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; diff --git a/app/Database/base.sql b/app/Database/base.sql index c462639..6916003 100644 --- a/app/Database/base.sql +++ b/app/Database/base.sql @@ -17,7 +17,7 @@ CREATE TABLE vhost.tw_user ( PRIMARY KEY (uid), UNIQUE KEY (id), UNIQUE KEY (email) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='사용자 정보'; +) ENGINE=InnoDB COMMENT ='사용자 정보'; -- insert into tw_user (uid,id,passwd,name,email,role,status) select uuid(),id,passwd,name,email,role,status from cfmgr.user; DROP TABLE IF EXISTS vhost.tw_user_profile; @@ -37,39 +37,9 @@ CREATE TABLE vhost.tw_user_sns ( PRIMARY KEY (uid), UNIQUE KEY (site,id), CONSTRAINT FOREIGN KEY (user_uid) REFERENCES tw_user (uid) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='SNS 로그인 후 정보'; +) ENGINE=InnoDB COMMENT ='SNS 로그인 후 정보'; -DROP TABLE IF EXISTS vhost.tw_category; --- 1. 게시물 추가전 grpno에 해당하는 max(grporder)+1씩증가 작업 --- update tw_category set grporder=grporder+1 where grpno=그룹번호 and grporder > 선택한 grpno --- 2. 게시물 추가시 작업 --- insert tw_category grpno=그룹번호,grporder=grporder+1,grpdepth=grpdepth+1 --- 3. 게시물 조회시 작업 --- select * from tw_category order by grpno desc,grporder asc -CREATE TABLE vhost.tw_category ( - uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT, - grpno int(10) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group번호: 상위가없을시 기본 uid와 같음,항상 숫자여야함', - grporder int(5) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group순서: 상위가없을시 1부터시작', - grpdepth int(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group깊이: 상위가없을시 1부터시작 , 상위 grpdepth+1씩 추가필요', - parent_uid int(10) UNSIGNED NULL COMMENT '부모UID', - name varchar(255) NOT NULL COMMENT '분류명', - linkurl varchar(100) NOT NULL DEFAULT '/front/board' COMMENT 'Front Link URL', - isaccess varchar(30) NOT NULL DEFAULT 'guest' COMMENT '접근권한', - isread varchar(30) NOT NULL DEFAULT 'guest' COMMENT '읽기권한', - iswrite varchar(30) NOT NULL DEFAULT 'guest' COMMENT '쓰기권한', - isreply varchar(30) NOT NULL DEFAULT 'guest' COMMENT '답글권한', - isupload varchar(30) NOT NULL DEFAULT 'guest' COMMENT 'Upload권한', - isdownload varchar(30) NOT NULL DEFAULT 'guest' COMMENT 'Download권한', - head text NULL COMMENT '위 내용', - tail text NULL COMMENT '아래 내용', - status varchar(10) NOT NULL DEFAULT 'use' COMMENT 'use: 표시,unuse: 표시않함', - updated_at timestamp NULL DEFAULT NULL, - created_at timestamp NOT NULL DEFAULT current_timestamp(), - deleted_at timestamp NULL DEFAULT NULL, - PRIMARY KEY (uid) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='분류'; - DROP TABLE IF EXISTS vhost.tw_board; -- 1. 게시물 추가전 grpno에 해당하는 max(grporder)+1씩증가 작업 -- update tw_board set grporder=grporder+1 where grpno=그룹번호 and grporder > 선택한 grpno @@ -79,11 +49,11 @@ DROP TABLE IF EXISTS vhost.tw_board; -- select * from tw_board order by grpno desc,grporder asc CREATE TABLE vhost.tw_board ( uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT, + category varchar(50) NOT NULL DEFAULT 'information' COMMENT '공지사항', grpno int(10) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group번호: 상위가없을시 기본 uid와 같음,항상 숫자여야함', grporder int(5) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group순서: 상위가없을시 1부터시작', grpdepth int(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Group깊이: 상위가없을시 1부터시작 , 상위 grpdepth+1씩 추가필요', parent_uid int(10) UNSIGNED NULL COMMENT '부모UID', - category_uid int(10) UNSIGNED NOT NULL COMMENT '분류 UID', user_uid varchar(36) NULL COMMENT '작성자 정보', title varchar(255) NOT NULL COMMENT '제목', content text NOT NULL COMMENT '내용', @@ -95,6 +65,5 @@ CREATE TABLE vhost.tw_board ( created_at timestamp NOT NULL DEFAULT current_timestamp(), deleted_at timestamp NULL DEFAULT NULL, PRIMARY KEY (uid), - CONSTRAINT FOREIGN KEY (category_uid) REFERENCES tw_category (uid), CONSTRAINT FOREIGN KEY (user_uid) REFERENCES tw_user (uid) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT ='게시물 정보'; \ No newline at end of file +) ENGINE=InnoDB COMMENT ='게시물 정보'; \ No newline at end of file diff --git a/app/Views/front/board/cell/information.php b/app/Views/front/board/cell/information.php new file mode 100644 index 0000000..e0d0aa4 --- /dev/null +++ b/app/Views/front/board/cell/information.php @@ -0,0 +1,11 @@ + + + + + + + + + + +
\ No newline at end of file diff --git a/app/Views/front/product/cell/virtual_calculator.php b/app/Views/front/product/cell/virtual_calculator.php new file mode 100644 index 0000000..e11d813 --- /dev/null +++ b/app/Views/front/product/cell/virtual_calculator.php @@ -0,0 +1,87 @@ + + +
+ 'post', + "onsubmit" => 'return calculator(' . $viewDatas['parts']['virtual']['default']['baserate'] . ')' + ]) ?> + + + + + + + + + + + + + + $attrs) : ?> + + + + + + + + + + + + + + +
가상서버 견적 계산기
기본요금 + +
+ + 할인가 * + $category, + 'class' => 'vhost_parts', + 'cost' => $attrs['cost'], + 'sale' => $attrs['sale'], + 'onChange' => "calculator(" . $viewDatas['parts']['virtual']['default']['baserate'] . ")" + ] + ) ?> + +
결제일 + "결제일 선택"]; + for ($i = 1; $i <= 28; $i++) { + $paymentDayOptions[$i] = "매월 {$i}일"; + } + ?> + 'paymentday']); + ?> +
주문금액 + 0원 + "btn btn-outline btn-primary")); ?> +
+ + + getFlashdata('return_message') ? alert_CommonHelper($viewDatas['session']->getFlashdata('return_message')) : "" ?> +
\ No newline at end of file diff --git a/app/Views/layouts/front/top_menu.php b/app/Views/layouts/front/top_menu.php index 11d1cae..550a8cf 100644 --- a/app/Views/layouts/front/top_menu.php +++ b/app/Views/layouts/front/top_menu.php @@ -8,17 +8,18 @@