diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 29a20da..c5d1ad0 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -130,12 +130,6 @@ define('SESSION_NAMES', [ 'ISLOGIN' => "islogined", 'AUTH' => 'auth', ]); -//인증 관련 -define('AUTH_FIELDS', [ - 'ID' => 'id', - 'TITLE' => 'title', - 'ROLE' => 'role', -]); //메신저 관련 define("MESSENGERS", [ "skype" => [ @@ -214,7 +208,19 @@ define('AUDIOS', [ define('KEYWORD', '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버'); define('LAYOUTS', [ 'empty' => [ + 'title' => KEYWORD, 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'empty', + 'metas' => [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], 'stylesheets' => [ '', '', @@ -227,12 +233,11 @@ define('LAYOUTS', [ 'front' => [ 'title' => KEYWORD, 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'front', - //'topmenus' => ['aboutus', 'hosting', 'serverdevice', 'service', 'support'], 'topmenus' => ['aboutus', 'hosting', 'service', 'support'], 'metas' => [ - '', + '', + '', '', - '', '', '', '', @@ -245,7 +250,7 @@ define('LAYOUTS', [ '', '', '', - '', + '', '', '', '', @@ -254,7 +259,7 @@ define('LAYOUTS', [ 'javascripts' => [ '', '', - '', + '', '', '', ], @@ -262,11 +267,22 @@ define('LAYOUTS', [ 'admin' => [ 'title' => '관리자화면', 'path' => 'layouts' . DIRECTORY_SEPARATOR . 'admin', + 'metas' => [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + ], 'stylesheets' => [ '', '', '', - '', + '', '', '', '', @@ -276,7 +292,7 @@ define('LAYOUTS', [ 'javascripts' => [ '', '', - '', + '', '', '', ], diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9995dbc..d6ab991 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -11,23 +11,20 @@ $routes->addPlaceholder('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4} //authFilter는 추가적인 작업이 필요 //1. app/Filters/AuthFilter.php //2. Config/Filters.php -> $aliases = ['authFilter' => AuthFilter::class] -$routes->group('', ['namespace' => 'App\Controllers'], function ($routes) { - $routes->get('/', 'Home::index'); - $routes->group('user', function ($routes) { - $routes->get('login', 'UserController::create_form'); - $routes->get('signup', 'UserController::create'); - $routes->get('logout', 'UserController::logout', ['filter' => 'authFilter:user']); - }); +$routes->get('/', 'Home::index'); +$routes->group('/user', function ($routes) { + $routes->get('login', 'UserController::create_form'); + $routes->post('login', 'UserController::create'); + $routes->get('logout', 'UserController::logout', ['filter' => 'authFilter:user']); }); $routes->group('cli', ['namespace' => 'App\CLI'], function ($routes) { $routes->group('cloudflare', ['namespace' => 'App\CLI\Cloudflare'], function ($routes) { $routes->cli('reload', 'Cloudflare::reload'); }); }); -// $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) { -$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], function ($routes) { +$routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($routes) { $routes->get('/', 'Home::index'); - $routes->group('user', ['filter' => 'authFilter:master'], function ($routes) { + $routes->group('user', function ($routes) { $routes->get('/', 'UserController::index'); $routes->get('create', 'UserController::create_form'); $routes->post('create', 'UserController::create'); diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 05c2273..19f37f2 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -17,7 +17,7 @@ class UserController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->class_name .= "User"; + $this->class_name = "User"; $this->class_path .= $this->class_name; $this->view_path = strtolower($this->view_root . $this->class_name); $this->title = lang("{$this->class_path}.title"); diff --git a/app/Controllers/FrontController.php b/app/Controllers/FrontController.php new file mode 100644 index 0000000..d73bc7a --- /dev/null +++ b/app/Controllers/FrontController.php @@ -0,0 +1,19 @@ +layout = "front"; + $this->view_root .= "front/"; + $this->action_form = FORMS['MODAL']; + } +} diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php index b4e2c2f..6cf7d3a 100644 --- a/app/Controllers/MVController.php +++ b/app/Controllers/MVController.php @@ -14,10 +14,6 @@ use Psr\Log\LoggerInterface; abstract class MVController extends CommonController { - protected $class_name = ""; - protected $class_path = ""; - protected $view_root = ""; - protected $view_path = ""; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -115,6 +111,7 @@ abstract class MVController extends CommonController $this->create_validate($this->action, $this->fields); $this->formDatas = $this->getFormDatas(); $this->entity = $this->getModel()->create(formDatas: $this->formDatas); + $this->message = "입력작업이 완료되었습니다."; } final protected function create_procedure(string $action_form = "default"): RedirectResponse|string { @@ -123,13 +120,12 @@ abstract class MVController extends CommonController try { $this->create_process(); $this->getModel()->transCommit(); - $this->message = "입력작업이 완료되었습니다."; log_message("notice", __FUNCTION__ . $this->message); switch ($action_form) { case FORMS['MODAL']: $result = view("templates/{$this->layout}/{$action_form}_close", data: ['viewDatas' => $this->getViewDatas()]); break; - case FORMS['IFRAM']: + case FORMS['IFRAME']: $result = view("templates/{$this->layout}/{$action_form}_close", data: ['viewDatas' => $this->getViewDatas()]); break; default: @@ -192,6 +188,7 @@ abstract class MVController extends CommonController throw new \Exception(__FUNCTION__, " => {$uid} 정보를 찾을수 없습니다."); } $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); + $this->message = "수정작업이 완료되었습니다."; } final protected function modify_procedure(string $uid, string $action_form = "default"): RedirectResponse|string { @@ -200,13 +197,12 @@ abstract class MVController extends CommonController try { $this->modify_process($uid); $this->getModel()->transCommit(); - $this->message = "수정작업이 완료되었습니다."; log_message("notice", __FUNCTION__ . $this->message); switch ($action_form) { case FORMS['MODAL']: $result = view("templates/{$this->layout}/{$action_form}_close", data: ['viewDatas' => $this->getViewDatas()]); break; - case FORMS['IFRAME']: + case FORMS['IFRAMEE']: $result = view("templates/{$this->layout}/{$action_form}_close", data: ['viewDatas' => $this->getViewDatas()]); break; default: @@ -268,6 +264,7 @@ abstract class MVController extends CommonController throw new \Exception("{$uid} 정보를 찾을수 없습니다."); } $this->entity = $this->getModel()->delete($this->entity->getPK()); + $this->message = "삭제작업을 완료하였습니다."; } final public function delete(string $uid): RedirectResponse { @@ -276,9 +273,8 @@ abstract class MVController extends CommonController try { $this->delete_process($uid); $this->getModel()->transCommit(); - $message = "삭제작업을 완료하였습니다."; - log_message("notice", $message); - $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], $message); + log_message("notice", $this->message); + $this->session->setFlashdata(SESSION_NAMES['RETURN_MSG'], $this->message); return redirect()->to($this->session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/"); } catch (\Exception $e) { //Transaction Rollback diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php index e5940e2..b340d2b 100644 --- a/app/Controllers/UserController.php +++ b/app/Controllers/UserController.php @@ -9,9 +9,8 @@ use CodeIgniter\Validation\Validation; use Psr\Log\LoggerInterface; use App\Models\UserModel; -use App\Entities\UserEntity; -class UserController extends MVController +class UserController extends FrontController { private $_model = null; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) @@ -81,40 +80,40 @@ class UserController extends MVController return $this->create_form_procedure(); } //로그인처리 + protected function create_process(): void + { + // $this->create_validate($this->action, $this->fields); + $this->formDatas = $this->getFormDatas(); + if (!isset($this->formDatas['id']) || !$this->formDatas['id']) { + throw new \Exception("사용자ID를 입력해주세요!"); + } + if (!isset($this->formDatas['passwd']) || !$this->formDatas['passwd']) { + throw new \Exception("암호를 입력해주세요!"); + } + $entity = $this->getModel()->getEntityByID($this->formDatas['id']); + if (is_null($entity) || !isset($entity->passwd)) { + throw new \Exception("사용자ID: {$this->formDatas['id']}가 존재하지 않습니다."); + } + if (password_verify($this->formDatas['passwd'], $entity->passwd)) { + //Session에 Login 정보전달 + $this->session->set([ + SESSION_NAMES['AUTH'] => [ + 'uid' => $entity->getPK(), + 'name' => $entity->getTitle(), + 'email' => $entity->email, + 'role' => $entity->role + ], + SESSION_NAMES['ISLOGIN'] => true + ]); + $this->message = "로그인 성공"; + } else { + throw new \Exception("로그인 실패"); + } + } public function create(): RedirectResponse|string { $this->init(__FUNCTION__); - $this->formDatas = $this->getFormDatas(); - $id = $this->request->getVar('id'); - $passwd = $this->request->getVar('passwd'); - if (!$id) { - session()->setFlashdata('error', "사용자ID를 입력해주세요!"); - return redirect()->back()->withInput(); - } - if (!$passwd) { - session()->setFlashdata('error', "암호를 입력해주세요!"); - return redirect()->back()->withInput(); - } - $entity = $this->getModel()->getEntityByID($id); - if (is_null($entity) || !isset($entity->passwd)) { - session()->setFlashdata('error', "사용자ID: {$id}가 존재하지 않습니다."); - return redirect()->back()->withInput(); - } - if (password_verify($passwd, $entity->passwd)) { - //Session에 Login 정보전달 - $authData = [ - 'uid' => $entity->getPK(), - 'name' => $entity->getTitle(), - 'email' => $entity->email, - 'role' => $entity->role, - SESSION_NAMES['ISLOGIN'] => true - ]; - session()->set($authData); - return redirect()->to($this->request->getVar(SESSION_NAMES['RETURN_URL']) ? $this->request->getVar(SESSION_NAMES['RETURN_URL']) : "/"); - } else { - session()->setFlashdata('error', '암호가 맞지 않습니다.'); - return redirect()->back()->withInput(); - } + return $this->create_procedure(); } //로그아웃 public function logout(): RedirectResponse diff --git a/app/Filters/AuthFilter.php b/app/Filters/AuthFilter.php index 93639ee..ce683a1 100644 --- a/app/Filters/AuthFilter.php +++ b/app/Filters/AuthFilter.php @@ -29,18 +29,19 @@ class AuthFilter implements FilterInterface if (session()->get(SESSION_NAMES['ISLOGIN'])) { $auth = session()->get(SESSION_NAMES['AUTH']); // 회원 ROLES이 필요ROLE($arguments[0]) 목록에 존재하지 않으면(ACL) - if (!in_array($arguments[0], explode(DEFAULTS['DELIMITER_ROLE'], $auth[AUTH_FIELDS['ROLE']]))) { + if (!in_array($arguments[0], explode(DEFAULTS['DELIMITER_ROLE'], $auth['role']))) { return redirect()->to(URLS['LOGIN'])->with( 'return_message', sprintf( "%s,%s회원님은 접속에 필요한 권한[%s]이 없습니다. ", - $auth[AUTH_FIELDS['ROLE']], - $auth[AUTH_FIELDS['TITLE']], + $auth['role'], + $auth['name'], implode(",", $arguments) ) ); } } else { + dd(session()->get(SESSION_NAMES['AUTH'])); session()->setFlashdata(SESSION_NAMES['RETURN_URL'], $request->getUri()->getPath() . '?' . $request->getUri()->getQuery()); return redirect()->to(URLS['LOGIN'])->with('return_message', '로그인을하셔야합니다.'); } diff --git a/app/Helpers/Cloudflare/Account_helper.php b/app/Helpers/Cloudflare/Account_helper.php index 58667aa..6d34caa 100644 --- a/app/Helpers/Cloudflare/Account_helper.php +++ b/app/Helpers/Cloudflare/Account_helper.php @@ -33,7 +33,13 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData // return implode(" ", $checkboxs); break; case AccountModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)test@exmaple.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)test@exmaple.com", + "style" => + "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'type': case 'status': @@ -44,10 +50,17 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calener form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Helpers/Cloudflare/Auth_helper.php b/app/Helpers/Cloudflare/Auth_helper.php index 2e7c5f1..1b913d3 100644 --- a/app/Helpers/Cloudflare/Auth_helper.php +++ b/app/Helpers/Cloudflare/Auth_helper.php @@ -19,7 +19,12 @@ function getFieldForm_AuthHelper(string $field, mixed $value, array $viewDatas, $value = $value ?: DEFAULTS['EMPTY']; switch ($field) { case AuthModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)test@example.com", + "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'status': $form = form_dropdown($field, [ @@ -29,10 +34,17 @@ function getFieldForm_AuthHelper(string $field, mixed $value, array $viewDatas, break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calender form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Helpers/Cloudflare/Record_helper.php b/app/Helpers/Cloudflare/Record_helper.php index ed6e8cf..e7067bf 100644 --- a/app/Helpers/Cloudflare/Record_helper.php +++ b/app/Helpers/Cloudflare/Record_helper.php @@ -39,13 +39,29 @@ function getFieldForm_RecordHelper(string $field, mixed $value, array $viewDatas // return implode(" ", $checkboxs); break; case RecordModel::TITLE: //host - $form = form_input($field, $value, ["placeholder" => "예)www.example.com", "style" => "width:200px; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)www.example.com", + "style" => + "width:200px; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'hosts': - $form = form_textarea($field, html_entity_decode($value), ['class' => 'editor', 'rows' => '5']); + $form = form_textarea($field, html_entity_decode($value), [ + 'rows' => '5', + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'content': - $form = form_input($field, $value, ["placeholder" => "예)123.123.123.123", "style" => "width:200px; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)123.123.123.123", + "style" => + "width:200px; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case "type": case "fixed": @@ -59,10 +75,17 @@ function getFieldForm_RecordHelper(string $field, mixed $value, array $viewDatas break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calender form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Helpers/Cloudflare/Zone_helper.php b/app/Helpers/Cloudflare/Zone_helper.php index 231dc54..16fc2b2 100644 --- a/app/Helpers/Cloudflare/Zone_helper.php +++ b/app/Helpers/Cloudflare/Zone_helper.php @@ -33,16 +33,36 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas, // return implode(" ", $checkboxs); break; case ZoneModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)exmaple.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)exmaple.com", + "style" => + "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'domains': - $form = form_textarea($field, $value, ['class' => 'editor', 'rows' => '5']); + $form = form_textarea($field, $value, [ + 'rows' => '5', + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'hosts': - $form = form_textarea($field, $value == DEFAULTS['EMPTY'] ? "@\n*\nm\nwww" : $value, ['class' => 'editor', 'rows' => '5']); + $form = form_textarea($field, $value == DEFAULTS['EMPTY'] ? "@\n*\nm\nwww" : $value, [ + 'rows' => '5', + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'content': - $form = form_input($field, $value, ["placeholder" => "예)123.123.123.123", "style" => "width:200px; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)123.123.123.123", + "style" => + "width:200px; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case "development_mode": case "ipv6": @@ -62,10 +82,18 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas, break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calender form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => + "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Helpers/Mapurl_helper.php b/app/Helpers/Mapurl_helper.php index 6510795..3456d8b 100644 --- a/app/Helpers/Mapurl_helper.php +++ b/app/Helpers/Mapurl_helper.php @@ -19,10 +19,21 @@ function getFieldForm_MapurlHelper(string $field, mixed $value, array $viewDatas $value = $value ?: DEFAULTS['EMPTY']; switch ($field) { case MapurlModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)http://old.example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)http://old.example.com", + "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'newurl': - $form = form_input($field, $value, ["placeholder" => "예)https://new.example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)https://new.example.com", + "style" => + "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'status': $form = form_dropdown($field, [ @@ -32,10 +43,18 @@ function getFieldForm_MapurlHelper(string $field, mixed $value, array $viewDatas break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calender form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => + "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Helpers/User_helper.php b/app/Helpers/User_helper.php index 05ff658..657af84 100644 --- a/app/Helpers/User_helper.php +++ b/app/Helpers/User_helper.php @@ -19,7 +19,12 @@ function getFieldForm_UserHelper(string $field, mixed $value, array $viewDatas, $value = $value ?: DEFAULTS['EMPTY']; switch ($field) { case UserModel::TITLE: - $form = form_input($field, $value, ["placeholder" => "예)", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)", + "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'role': if (in_array($viewDatas['action'], ['create', 'modify'])) { @@ -43,20 +48,41 @@ function getFieldForm_UserHelper(string $field, mixed $value, array $viewDatas, ], $value, $extras); break; case 'passwd': - $form = form_password($field, "", ["style" => "width:100%;"]); + $form = form_password($field, "", [ + "style" => "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'email': - $form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)test@example.com", + "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'mobile': - $form = form_input($field, $value, ["placeholder" => "예)010-0010-0010", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]); + $form = form_input($field, $value, [ + "placeholder" => "예)010-0010-0010", + "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; case 'updated_at': case 'created_at': - $form = form_input($field, $value, ['class' => 'calender']); + $form = form_input($field, $value, [ + "class" => "calender form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; default: - $form = form_input($field, $value, ["style" => "width:100%;"]); + $form = form_input($field, $value, [ + "style" => "width:100%;", + "class" => "form-control", + (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? "required" : "" + ]); break; } return $form; diff --git a/app/Libraries/MyAuth/MyAuth.php b/app/Libraries/MyAuth/MyAuth.php index 7e5b302..fdcd30e 100644 --- a/app/Libraries/MyAuth/MyAuth.php +++ b/app/Libraries/MyAuth/MyAuth.php @@ -38,21 +38,11 @@ abstract class MyAuth protected function setSession_process(UserEntity $entity): UserEntity { $this->_session->set(SESSION_NAMES['ISLOGIN'], true); - $auths = []; - foreach (array_values(AUTH_FIELDS) as $field) { - switch ($field) { - case 'id': - $auths[$field] = $entity->getPK(); - break; - case 'title': - $auths[$field] = $entity->getTitle(); - break; - case 'role': - $auths[$field] = $entity->$field; - break; - } - } - $this->_session->set(SESSION_NAMES['AUTH'], $auths); + $this->_session->set(SESSION_NAMES['AUTH'], [ + 'uid' => $entity->getPK(), + 'name' => $entity->getTitle(), + 'role' => $entity->role + ]); return $entity; } } diff --git a/app/Libraries/MySocket/GoogleSocket.php b/app/Libraries/MySocket/GoogleSocket.php index 8013563..4894226 100644 --- a/app/Libraries/MySocket/GoogleSocket.php +++ b/app/Libraries/MySocket/GoogleSocket.php @@ -2,8 +2,6 @@ namespace App\Libraries\MySocket; -use GuzzleHttp\Client; - class GoogleSocket extends Google_Client { private $_session = null; diff --git a/app/Traits/AuthTrait.php b/app/Traits/AuthTrait.php index 03d9a75..fef2ef5 100644 --- a/app/Traits/AuthTrait.php +++ b/app/Traits/AuthTrait.php @@ -9,7 +9,6 @@ trait AuthTrait final protected function session_AuthTrait(): Session { $session = \Config\Services::session(); - $session->set(SESSION_NAMES['ISLOGIN'], false); $session->set('currentRoles', [DEFAULTS["ROLE"]]); if ($session->get(SESSION_NAMES['ISLOGIN'])) { $session->set(SESSION_NAMES['ISLOGIN'], true); @@ -17,7 +16,7 @@ trait AuthTrait 'currentRoles', explode( DEFAULTS['DELIMITER_ROLE'], - $session->get(SESSION_NAMES['AUTH'])[AUTH_FIELDS['ROLE']] + $session->get(SESSION_NAMES['AUTH'])['role'] ) ); } diff --git a/app/Views/front/user/create.php b/app/Views/front/user/create.php new file mode 100644 index 0000000..dc20ead --- /dev/null +++ b/app/Views/front/user/create.php @@ -0,0 +1,25 @@ +extend("layouts/{$viewDatas['layout']}/{$viewDatas['action_form']}") ?> +section('content') ?> + +
+ +

로그인

+
+ + +
+
+ + +
+
+ + + +
+ +
+endSection() ?> \ No newline at end of file diff --git a/app/Views/layouts/admin.php b/app/Views/layouts/admin.php index c3102ce..54f24ad 100644 --- a/app/Views/layouts/admin.php +++ b/app/Views/layouts/admin.php @@ -2,10 +2,10 @@ - - - - <?= $viewDatas['title'] ?> + <?= LAYOUTS[$viewDatas['layout']]['title'] ?> + + + @@ -28,7 +28,7 @@
include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
-
+
include("templates/{$viewDatas['layout']}/header"); ?>
renderSection('content') ?>
diff --git a/app/Views/layouts/admin/top.php b/app/Views/layouts/admin/top.php index 9f09667..e641fab 100644 --- a/app/Views/layouts/admin/top.php +++ b/app/Views/layouts/admin/top.php @@ -23,19 +23,18 @@
diff --git a/app/Views/layouts/empty.php b/app/Views/layouts/empty.php index 2631393..cbb0873 100644 --- a/app/Views/layouts/empty.php +++ b/app/Views/layouts/empty.php @@ -2,10 +2,10 @@ - - - - <?= $viewDatas['title'] ?> + <?= LAYOUTS[$viewDatas['layout']]['title'] ?> + + + diff --git a/app/Views/layouts/front.php b/app/Views/layouts/front.php index c3102ce..5be45a2 100644 --- a/app/Views/layouts/front.php +++ b/app/Views/layouts/front.php @@ -2,10 +2,10 @@ - - - - <?= $viewDatas['title'] ?> + <?= LAYOUTS[$viewDatas['layout']]['title'] ?> + + + @@ -27,12 +27,9 @@ include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
-
include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
-
-
include("templates/{$viewDatas['layout']}/header"); ?>
-
renderSection('content') ?>
- -
+
include("templates/{$viewDatas['layout']}/header"); ?>
+
renderSection('content') ?>
+
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?> diff --git a/app/Views/layouts/front/bottom.php b/app/Views/layouts/front/bottom.php new file mode 100644 index 0000000..a11ab5d --- /dev/null +++ b/app/Views/layouts/front/bottom.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/app/Views/layouts/front/direct_form.php b/app/Views/layouts/front/direct_form.php new file mode 100644 index 0000000..c3102ce --- /dev/null +++ b/app/Views/layouts/front/direct_form.php @@ -0,0 +1,42 @@ + + + + + + + + <?= $viewDatas['title'] ?> + + + + + + + + + + + + + + +
+ include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?> +
+
+
include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
+
+
include("templates/{$viewDatas['layout']}/header"); ?>
+
renderSection('content') ?>
+ +
+
+
+ include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?> +
+ + + \ No newline at end of file diff --git a/app/Views/layouts/front/iframe_form.php b/app/Views/layouts/front/iframe_form.php new file mode 100644 index 0000000..01324f1 --- /dev/null +++ b/app/Views/layouts/front/iframe_form.php @@ -0,0 +1,30 @@ + + + + + + + + <?= $viewDatas['title'] ?> + + + + + + + + + + + + + + +
renderSection('content') ?>
+ + + + \ No newline at end of file diff --git a/app/Views/layouts/front/modal_form.php b/app/Views/layouts/front/modal_form.php new file mode 100644 index 0000000..01324f1 --- /dev/null +++ b/app/Views/layouts/front/modal_form.php @@ -0,0 +1,30 @@ + + + + + + + + <?= $viewDatas['title'] ?> + + + + + + + + + + + + + + +
renderSection('content') ?>
+ + + + \ No newline at end of file diff --git a/app/Views/layouts/front/top.php b/app/Views/layouts/front/top.php new file mode 100644 index 0000000..a5e2fde --- /dev/null +++ b/app/Views/layouts/front/top.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/app/Views/layouts/main.php b/app/Views/layouts/main.php index c3102ce..84c838b 100644 --- a/app/Views/layouts/main.php +++ b/app/Views/layouts/main.php @@ -5,7 +5,7 @@ - <?= $viewDatas['title'] ?> + <?= LAYOUTS[$viewDatas['layout']]['title'] ?> diff --git a/app/Views/templates/front/footer.php b/app/Views/templates/front/footer.php new file mode 100644 index 0000000..7090fb7 --- /dev/null +++ b/app/Views/templates/front/footer.php @@ -0,0 +1,64 @@ +getFlashdata(SESSION_NAMES['RETURN_MSG']) ? alert_CommonHelper($viewDatas['session']->getFlashdata(SESSION_NAMES['RETURN_MSG'])) : "" ?> + \ No newline at end of file diff --git a/app/Views/templates/front/header.php b/app/Views/templates/front/header.php new file mode 100644 index 0000000..e35fef7 --- /dev/null +++ b/app/Views/templates/front/header.php @@ -0,0 +1,87 @@ + + \ No newline at end of file diff --git a/app/Views/templates/front/iframe_form.php b/app/Views/templates/front/iframe_form.php new file mode 100644 index 0000000..dd9bf7e --- /dev/null +++ b/app/Views/templates/front/iframe_form.php @@ -0,0 +1,29 @@ + + +
+ +
+ \ No newline at end of file diff --git a/app/Views/templates/front/iframe_form_close.php b/app/Views/templates/front/iframe_form_close.php new file mode 100644 index 0000000..48dc854 --- /dev/null +++ b/app/Views/templates/front/iframe_form_close.php @@ -0,0 +1,8 @@ +extend("layouts/empty") ?> +section('content') ?> +
+
+

작업 완료 후 아래 버튼을 클릭하면 모달이 닫힙니다.

+ +
+endSection() ?> \ No newline at end of file diff --git a/app/Views/templates/front/index_top.php b/app/Views/templates/front/index_top.php new file mode 100644 index 0000000..07de259 --- /dev/null +++ b/app/Views/templates/front/index_top.php @@ -0,0 +1,24 @@ + "get")) ?> + + \ No newline at end of file diff --git a/app/Views/templates/front/modal_form.php b/app/Views/templates/front/modal_form.php new file mode 100644 index 0000000..b7753f0 --- /dev/null +++ b/app/Views/templates/front/modal_form.php @@ -0,0 +1,61 @@ + + + + + \ No newline at end of file diff --git a/app/Views/templates/front/modal_form_close.php b/app/Views/templates/front/modal_form_close.php new file mode 100644 index 0000000..a48a201 --- /dev/null +++ b/app/Views/templates/front/modal_form_close.php @@ -0,0 +1,8 @@ +extend("layouts/empty") ?> +section('content') ?> +
+
+

작업 완료 후 아래 버튼을 클릭하면 모달이 닫힙니다.

+ +
+endSection() ?> \ No newline at end of file diff --git a/public/css/admin.css b/public/css/admin.css index 7ba0163..b1cbc75 100644 --- a/public/css/admin.css +++ b/public/css/admin.css @@ -11,8 +11,9 @@ /* font-size: 15px; */ } +html, body { - background-color: #efefef; + height: 100%; } div.top { @@ -24,23 +25,20 @@ div.top { } div.middle { - /* height: 100%; */ - /* display: flex; */ + /* border: 1px solid blue; */ } -div.middle div.left { - width: 217px; - /* overflow: auto; */ - /* border: 1px solid red; */ -} +/* div.middle div.left { + border: 1px solid red; +} */ -div.middle div.center { +div.middle div.right { width: 100%; /* overflow: auto; */ /* border: 1px solid blue; */ } -div.middle div.center div.header { +div.middle div.right div.header { /*content 헤더라인*/ height: 55px; padding-top: 15px; @@ -51,11 +49,11 @@ div.middle div.center div.header { border-radius: 15px 15px 0px 0px; } -div.middle div.center div.header li.nav-item { +div.middle div.right div.header li.nav-item { height: 40px; } -div.middle div.center div.content { +div.middle div.right div.content { /*content 부분*/ padding-top: 15px; padding-left: 23px; @@ -66,7 +64,7 @@ div.middle div.center div.content { background-color: white; } -div.middle div.center div.footer { +div.middle div.right div.footer { /*content 하단라인*/ height: 20px; border-left: 1px solid gray; diff --git a/public/css/common/left_menu.css b/public/css/common/left_menu.css deleted file mode 100644 index ea5203f..0000000 --- a/public/css/common/left_menu.css +++ /dev/null @@ -1,60 +0,0 @@ -div#left_menu{ - /* position:fixed; - z-index:100; */ - width:200px; - background-color:white; -} - -div#left_menu div.parent { - font-size:1.5rem; - font-weight:bold; - height:170px; - padding-top:30px; - background-color: #eeeeee; - border:1px solid silver; - text-align:center; -} -div#left_menu div.parent div.title{ - color:#26417D; -} -div#left_menu div.parent div{ - font-size: 1.5rem; -} - -/* leftmenu bar */ -div#left_menu div.sibling { - padding-top:15px; - text-align:left; - padding-left:20px; - height:60px; - border-bottom:1px solid silver; -} -div#left_menu div.active { - background-color:#26417D; -} -div#left_menu div.sibling a{ - text-decoration: none; - color:black; - font-size: 1.3rem; -} -div#left_menu div.sibling span.play{ - float:right; - color:white; - padding-top:5px; - padding-right:15px; -} -div#left_menu div.active { - background-color:#26417D; -} -div#left_menu div.active a{ - color:white; -} -div#left_menu div.sibling:hover { - background-color:#26417D; -} -div#left_menu div.sibling:hover a,div.active{ - color:white; -} -div#left_menu div.sibling:hover span.play{ - color:white; -} \ No newline at end of file diff --git a/public/css/common/login.css b/public/css/common/login.css deleted file mode 100644 index c35ee0d..0000000 --- a/public/css/common/login.css +++ /dev/null @@ -1,46 +0,0 @@ -/* ------------------------------------------------------------ -* Name : admin.css -* Desc : Admin StyleSheet -* Created : 2016/9/11 Tri-aBility by Junheum,Choi -* Updated : ------------------------------------------------------------- */ -div.login{ - width: 799px; - height: 283px; - margin-top:30px; - margin-left:120px; - padding-top:155px; - background-image: url('/images/common/adminbg.png'); -} -div.login form{ - margin-left:300px; - /* border: 1px solid red; */ -} - -div.login form table { - width:300px; - /* border: 1px solid red; */ -} - -div.login form table td { - text-align: center; - color:white; - padding-right:5px; - /* border: 1px solid blue; */ -} -div.login form table td.column { - height: 27px; -} - -div.login form table td.login_bottom{ - padding-top:20px; -} -div.login form table td.login_bottom a{ - color:white; -} - -/* div.login form table input[type=submit]{ - width: 57px; - height: 60px; - background: url('/images/common/btn_login.png'); -} */ \ No newline at end of file diff --git a/public/css/common/login_v1.css b/public/css/common/login_v1.css deleted file mode 100644 index 2f10a7e..0000000 --- a/public/css/common/login_v1.css +++ /dev/null @@ -1,50 +0,0 @@ -/* ------------------------------------------------------------ -* Name : admin.css -* Desc : Admin StyleSheet -* Created : 2016/9/11 Tri-aBility by Junheum,Choi -* Updated : ------------------------------------------------------------- */ - -div#content a { - color:black; -} - -div#content div.login{ - width: 509px; - margin-top:30px; -} - -div#content div.login form { - padding-top:20px; - border:1px solid silver; -} - -div#content div.login form div.label_column{ - text-align:right; - /* border:1px solid red; */ -} - -div#content div.login form label.col-form-label{ - font-size: 1.5rem; - font-weight:bold; - /* border:1px solid red; */ -} - -div#content div.login form input[type=text],input[type=password]{ - text-align:left; - height:35px; - width:250px; - border:1px solid silver; -} - -div#content div.login_bottom{ - padding-top:20px; - padding-bottom:20px; - text-align:center; -} - -/* div#content div.login form table input[type=submit]{ - width: 57px; - height: 60px; - background: url('/images/common/btn_login.png'); -} */ \ No newline at end of file diff --git a/public/css/common/top_menu.css b/public/css/common/top_menu.css deleted file mode 100644 index dcd1e9d..0000000 --- a/public/css/common/top_menu.css +++ /dev/null @@ -1,74 +0,0 @@ - -#top_menu{ - width:1280px; - /* border:1px solid red; */ -} -#top_menu a:hover{ - text-decoration:none; -} -/* #top_menu nav.nav,ul.nav{ - border:1px solid red; -} */ -#top_menu a.navbar-brand{ - font-size: 1.5rem; - font-weight:bold; -} - -/* 메뉴바그룹 상단글자*/ -#top_menu div.dropdown-center ul.navbar-nav a#navbarDarkDropdownMenuLink{ - font-size: 1.3rem; - font-weight:bold; - /* border:1px solid silver; */ -} - -/* 메뉴바그룹 */ -#top_menu div.dropdown-center ul.navbar-nav li.dropdown { - width:150px; - text-align:center; - /* border:1px solid red; */ -} -/* 메뉴바그룹 hover했을시 */ -#top_menu div.dropdown-center ul.navbar-nav li.dropdown:hover a#navbarDarkDropdownMenuLink{ - color:#26417D; -} -#top_menu div.dropdown-center ul.navbar-nav li.dropdown:hover ul.dropdown-menu{ - /* margin-top:15px; */ - display: block; - /* 라운드없애기 */ - border-radius:0px !important; - padding-bottom:0px; - border:0px; - /* border:1px solid silver; */ -} - -/* 메뉴바 */ -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li{ - height:60px; - padding-top:15px; - border-bottom:1px solid silver; -} -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li a{ - width:150px; - font-size: 1.2rem; - font-weight:bold; - text-align:center; - text-decoration:none; -} -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li.active{ - background-color:#26417D; - /* border:1px solid red; */ -} -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li.active a{ - color:white; - background-color:#26417D; - /* border:1px solid red; */ -} -/* 메뉴바 over했을시*/ -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li:hover{ - background-color:#26417D; - /* border:1px solid red; */ -} -#top_menu div.dropdown-center ul.navbar-nav li.dropdown ul.dropdown-menu li:hover a{ - color:white; - background-color:#26417D; -} \ No newline at end of file diff --git a/public/css/common/top_navigator.css b/public/css/common/top_navigator.css deleted file mode 100644 index e8c9337..0000000 --- a/public/css/common/top_navigator.css +++ /dev/null @@ -1,24 +0,0 @@ -#top_navigator{ - padding-top:20px; - padding-bottom:20px; - background-color:#eeeeee -} - -#top_navigator ul.justify-content-center div.navigator_center span{ - padding-left:5px; - padding-right:5px; -} -#top_navigator ul.justify-content-center div.navigator_center span strong{ - color:#26417D; - font-weight: bold; -} - -#top_navigator ul.justify-content-center div.navigator_center span strong{ - color:#26417D; - font-weight: bold; -} - -#top_navigator ul.justify-content-end li.cart a{ - font-size: 1.5rem; - font-weight: 500; -} diff --git a/public/css/front.css b/public/css/front.css index 19770e9..403d3ad 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -7,45 +7,68 @@ * { margin: 0px; padding: 0px; - font-size: 14px; -} -/* #head{ - border:1px solid blue; -} */ -#tail{ - text-align:center; - /* border:1px solid green; */ -} -#layout { - width:1280px; - /* border:1px solid blue; */ + border: 0px; + /* font-size: 15px; */ } -#layout #body{ - padding-left:10px; - /* border:1px solid red; */ +html, +body { + height: 100%; } -#layout #body nav.header{ - /*content 상단라인*/ - padding-top:40px; - margin-left:30px; - border-bottom:1px solid silver; +div.top { + height: 51px; + margin-bottom: 10px; + border-top: 1px solid gray; + border-bottom: 1px solid gray; + background-color: #e8e9ea; } -#layout #body nav.header nav h4.title{ - font-size:2rem; - font-weight:bold; + +div.middle { + /* border: 1px solid red; */ } -#layout #body nav.header nav span.flow{ - color: gray; + +div.middle div.header { + /*content 헤더라인*/ + height: 55px; + padding-top: 15px; + background-color: #e7e7e7; + border-top: 1px solid gray; + border-left: 1px solid gray; + border-right: 1px solid gray; + border-radius: 15px 15px 0px 0px; } -#layout #body div.footer - /*content 하단라인*/{ - height:20px; - /* border-top:0px; - border-left:1px solid silver; - border-bottom:1px solid silver; - border-right:1px solid silver; - border-radius: 0px 0px 10px 10px; - background-color:white; */ + +div.middle div.header li.nav-item { + height: 40px; +} + +div.middle div.content { + /*content 부분*/ + padding-top: 15px; + padding-left: 23px; + padding-right: 15px; + padding-bottom: 15px; + border-left: 1px solid gray; + border-right: 1px solid gray; + background-color: white; + border: 1px solid red; +} + +div.middle div.footer { + /*content 하단라인*/ + height: 20px; + border-left: 1px solid gray; + border-right: 1px solid gray; + border-bottom: 1px solid gray; + border-radius: 0px 0px 15px 15px; +} + +div.bottom { + height: 51px; + margin-top: 10px; + border-top: 1px solid gray; + border-bottom: 1px solid gray; + background-color: #efefef; + background-color: #e8e9ea; } \ No newline at end of file diff --git a/public/css/front/billing.css b/public/css/front/billing.css deleted file mode 100644 index b796a9d..0000000 --- a/public/css/front/billing.css +++ /dev/null @@ -1,18 +0,0 @@ -/* ------------------------------------------------------------ -* Name : admin.css -* Desc : Admin StyleSheet -* Created : 2016/9/11 Tri-aBility by Junheum,Choi -* Updated : ------------------------------------------------------------- */ -table#billing td { - text-align: center; - color:white; - padding-right:5px; - /* border: 1px solid blue; */ -} -table#billing td { - height: 27px; -} -table#billing td.label { - width: 15%; -} \ No newline at end of file diff --git a/public/css/front/content.css b/public/css/front/content.css index a130916..c62f248 100644 --- a/public/css/front/content.css +++ b/public/css/front/content.css @@ -1,96 +1,156 @@ -div#content{ - color:black; - padding-top:20px; - padding-left:30px; - margin-bottom:40px; - /* border-left:1px solid silver; - border-right:1px solid silver; */ +/*조건검색*/ +nav.index_top nav.condition { + border-color: 1px solid red; +} + +/*검색*/ +nav.index_top nav.search { + position: relative; + height: 30px; + border-color: 1px solid red; +} + +nav.index_top nav.search input[type="text"] { + width: 200px; + height: 30px; +} + +/*검색submit*/ +nav.index_top nav.search input[type="submit"] { + font-weight: bold; + width: 80px; + height: 30px; + color: white; + background-color: #555555; +} + +/*검색submit*/ +nav.index_top nav.search a.excel { + position: absolute; + top: -9px; + right: -45px; + /* border-color: 1px solid red; */ } -/* div#content div.top{ - border:1px solid red; -} */ /*페이지정보*/ -div#content div.top nav span.pageinfo{ - font-weight:bold; -} -/*검색*/ -div#content div.top nav input[type=text]{ - width:200px; - height:40px; - border-radius:0px !important; - /* border:1px solid red; */ -} -/*검색submit*/ -div#content div.top nav input[type=submit]{ - font-size: 1.5rem; - font-weight:bold; - width:80px; - height:40px; - color:white; - border-radius:0px !important; - background-color:#555555; - /* border:1px solid red; */ -} -/*Excel Icon*/ -div#content div.top nav a{ - border-radius:0px !important; - /* border:1px solid red; */ +nav.index_top nav.pageinfo { + font-weight: bold; + /* border-color: 1px solid red; */ } /* Table 부분 */ -div#content table { - width:100%; - /* overflow-x: auto; - padding-top:5px; - padding-bottom:5px; */ +table.index_table { + width: 100%; + /* table-layout: fixed; 고정 레이아웃 */ + border-collapse: collapse; + /* 테두리 결합 */ } -/* insert,update,reply,view Form Page 관련 전용*/ -div#content table.form tbody tr td.label{ - width:10%; - text-align:right; - padding-right:20px; - background-color:#e8ebe9; -} -div#content table.form tbody tr td.column{ - height:27px; - text-align:left; - padding-left:20px; -} -/* insert,update,reply,view Form Page 관련 전용*/ - -/* 상품 리스트 전용 */ -div#content table.product tr:first-child { - border-top:2px solid black; - border-bottom:1px solid silver; -} -/* 상품 리스트 전용 */ - -div#content table thead th{ - white-space: nowrap; - padding-top:15px; - padding-bottom:15px; - font-size: 1.5rem; - font-weight:bold; - border-top:2px solid black; - border-bottom:1px solid silver; - background-color:#F5F5F5; - /* border:1px solid silver; */ +table.index_table thead th { + white-space: nowrap; + padding-top: 15px; + padding-bottom: 15px; + font-weight: bold; + border-top: 2px solid black; + border-bottom: 1px solid silver; + background-color: #f5f5f5; + text-align: center; + /* border:1px solid silver; */ } -div#content div.bottom { - padding-top:15px; - text-align:center; +div.index_bottom { + padding-top: 15px; + text-align: center; + word-wrap: break-word; + /* 긴 단어 강제 줄바꿈 */ + white-space: normal; + /* 자동 줄바꿈 */ + /* border: 1px solid red; */ } -div#content div.bottom ul.pagination { - margin-top:20px; + +div.index_pagination nav { + margin-top: 20px; + /* border: 1px solid red; */ } -div#content div.bottom ul.pagination li.page-item a{ - border:0px; - border-radius:0px !important; - background-color:#e8ebe9; + +div.index_pagination nav ul.pagination { + /* border: 1px solid green; */ + width: fit-content; + /* UL의 너비를 내용에 맞춤 */ + margin: 0 auto; + /* 좌우 마진을 자동으로 설정하여 중앙 배치 */ + padding: 0; + list-style: none; + /* 기본 점 스타일 제거 (옵션) */ } -div#content div.bottom ul.pagination li.active a{ - background-color:gray; + +div.index_pagination nav ul.pagination li { + margin-left: 5px; +} + +div.index_pagination nav ul.pagination li a { + padding: 5px 10px 5px 10px; + font-size: 1.5rem; + color: white; + background-color: #808080; +} + +div.index_pagination nav ul.pagination li.active a { + color: black; + border: 1px solid #808080; +} + +div.index_pagination nav ul.pagination li a:hover { + border: 1px solid black; +} + +div.index_action_form { + margin-top: 20px; + /* border: 1px solid red; */ +} + +div.index_action_form iframe { + width: 100%; + border: none; + /* border: 1px solid blue; */ +} + +/* create,modify,view 페이지용 */ +table.action_form { + /* 블록 요소로 변경 */ + margin-left: auto; + /* 자동 여백을 이용한 가로 가운데 정렬 */ + margin-right: auto; + /* 자동 여백을 이용한 가로 가운데 정렬 */ + /* border: 1px solid blue; */ + /* table-layout: fixed; 고정 레이아웃 */ + border-collapse: collapse; + /* 테두리 결합 */ +} + +table.action_form th { + text-align: center; + background-color: #f5f5f5; +} + +table.action_form td { + text-align: center; + word-wrap: break-word; + /* 긴 단어 강제 줄바꿈 */ + white-space: normal; + /* 자동 줄바꿈 */ +} + +/* create,modify,view 페이지용 */ +div.login-container { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 400px; + height: 380px; + margin: auto; + display: flex; + flex-direction: column; + justify-content: center; } \ No newline at end of file diff --git a/public/css/common/copyright.css b/public/css/front/copyright.css similarity index 100% rename from public/css/common/copyright.css rename to public/css/front/copyright.css diff --git a/public/css/front/left_menu.css b/public/css/front/left_menu.css new file mode 100644 index 0000000..cc89e40 --- /dev/null +++ b/public/css/front/left_menu.css @@ -0,0 +1,56 @@ +div#left_menu { + position: fixed; + margin-top: 60px; + z-index: 100; + border: 1px solid silver; +} + +div#left_menu div#menu_button { + position: absolute; + top: -1px; + right: -21px; + width: 20px; + height: 160px; + cursor: pointer; + writing-mode: vertical-rl; + /* 세로로 글자를 출력 */ + text-orientation: upright; + /* 글자가 직립되도록 설정 */ + border-top: 1px solid silver; + border-right: 1px solid silver; + border-bottom: 1px solid silver; + border-radius: 0px 5px 5px 0px; + background-color: #e8e9ea; +} + +div#left_menu div.accordion { + display: none; + width: 20px; +} + +div#left_menu div.accordion div.main { + height: 50px; + padding-top: 15px; + padding-left: 10px; + background-color: white; + border-bottom: 1px solid silver; +} + +div#left_menu div.accordion div.accordion-item { + height: 50px; + padding-top: 15px; + background-color: #eeeeee; + border-bottom: 1px solid silver; +} + +div#left_menu div.accordion div.accordion-item:hover { + background-color: silver; +} + +div#left_menu div.accordion div.accordion-item a { + padding-left: 20px; +} + +div#left_menu div.accordion div.accordion-collapse a { + padding-left: 30px; +} \ No newline at end of file diff --git a/public/css/front/member_link.css b/public/css/front/member_link.css new file mode 100644 index 0000000..38ed839 --- /dev/null +++ b/public/css/front/member_link.css @@ -0,0 +1,17 @@ +nav.top_menu ul.member-link{ + /* border:1px solid red; */ + color:#3a37f3; + padding-right:20px; +} + +nav.top_menu ul.member-link a{ + color:#3a37f3; +} + +nav.top_menu ul.member-link ul.dropdown-menu li:hover{ + background-color: #eaeaea; +} + +nav.top_menu ul.member-link ul.dropdown-menu li a{ + padding-left:10px; +} \ No newline at end of file diff --git a/public/css/front/order.css b/public/css/front/order.css deleted file mode 100644 index b69810d..0000000 --- a/public/css/front/order.css +++ /dev/null @@ -1,50 +0,0 @@ -/* ------------------------------------------------------------ -* Name : admin.css -* Desc : Admin StyleSheet -* Created : 2016/9/11 Tri-aBility by Junheum,Choi -* Updated : ------------------------------------------------------------- */ -div#order { - position:relative; - margin:0px; - padding:0px; - /* border:1px solid red; */ -} -div#order div.orderbox { - /* position:fixed; */ - width:200px; - padding:5px; - border:1px solid gray; -} -div#order div.orderbox div.title{ - font-size: 1.5rem; - font-weight: 600; - border-bottom:2px solid gray; -} - -div#order div.orderbox div.item{ - padding-bottom:5px; - /* border:1px solid red; */ -} -div#order div.orderbox div.item span.label{ - color: gray; -} -div#order div.orderbox div.item span.value{ - float:right; -} -div#order div.orderbox div.total{ - padding-top:10px; - border-top:2px solid gray; -} -div#order div.orderbox div.total span.label{ - color: gray; -} -div#order div.orderbox div.total span.value{ - float:right; - font-size: 1.5rem; - font-weight: 800; -} -div#order div.orderbox div.submit{ - padding-top:10px; - text-align:center; -} \ No newline at end of file diff --git a/public/css/front/sitepage.css b/public/css/front/sitepage.css deleted file mode 100644 index 73df0c5..0000000 --- a/public/css/front/sitepage.css +++ /dev/null @@ -1,69 +0,0 @@ -@charset "utf-8"; -/* doc.css는 디자인페이지 스타일을 정의합니다. */ - -.greeting {margin:0 -25px;} -.greeting:after {content:"";display:block;clear:both;} -.greeting .col {float:left; width:50%; padding:0 25px; box-sizing:border-box; text-align:justify; letter-spacing:-.40px;} - - -.company {position:relative; text-align:center; font-size:22px; line-height:1.4em; color:#2c2c2c; font-weight:300; padding-bottom:75px; margin-bottom:10px;} -.company strong {color:#30539f; font-weight:500} -.company:after {content:"";position:absolute; bottom:10px; left:50%; width:1px; height:46px; background:#ddd;} - -.com-cnt {border:1px solid #ededed;} -.com-cnt:after {content:" "; display:block; clear:both;} -.com-cnt .col {float:left; width:33.333%; height:278px; position:relative;} -.com-cnt .col.bg1 {background:url('/images/sub/com_icon1.png') 50% 41px no-repeat;} -.com-cnt .col.bg2 {background:#f8f9fb url('/images/sub/com_icon2.png') 50% 31px no-repeat;} -.com-cnt .col.bg3 {background:url('/images/sub/com_icon3.png') 50% 33px no-repeat;} -.com-cnt .col:first-child:after {display:none;} -.com-cnt .col:after {content:"";position:absolute; top:0; left:0; width:1px; height:100%; background:#ededed;} -.com-cnt .col dl {padding-top:145px; text-align:center;} -.com-cnt .col dl dt {color:#284685; font-size:18px; line-height:1.4em; font-weight:500; margin-bottom:10px;} -.com-cnt .col dl dd {font-size:15px; line-height:1.4em; text-align:left; padding-left:76px;} - - -.app-cnt:after {content:" "; display:block; clear:both;} -.app-cnt .col {float:left; width:275px; height:130px; position:relative; box-sizing:border-box;} -.app-cnt .col.inquiry {width:345px} -.app-cnt .col:first-child:after {display:none;} -.app-cnt .col:after {content:"";position:absolute; top:0; left:0; width:1px; height:100%; background:#ededed;} -.app-cnt .col .box {width:100%; height:130px;position:relative; display:table;} -.app-cnt .col .icon {position:absolute; top:0; left:0; width:107px; height:107px; background:url('../images/sub/sub2_1_icon.gif') 0 50% no-repeat;} -.app-cnt .col .info {padding-left:130px; font-size:15px; line-height:1.6em; height:130px;position:relative; vertical-align:middle; display:table-cell; letter-spacing:-.30px;} -.app-cnt .col.type2 .info {padding-left:48px; font-size:16px;} -.app-cnt .col.type2 dl dt {color:#284685; font-size:18px; line-height:1.4em; font-weight:500; margin-bottom:5px;} -.app-cnt .col.type2 dl dt img {vertical-align:middle; padding-left:5px;} - -.product-cnt {margin-bottom:70px; text-align:center;} -.product-cnt:last-child {margin-bottom:0} -.product-cnt p {line-height:0} -.product-cnt .col {position:relative; vertical-align:top; display:inline-block; width:420px; margin:-61px 10px 0 10px;} -.pro-title.type1 {background-color:#41adde} -.pro-title.type2 {background-color:#0280c9} -.pro-title.type3 {background-color:#284685} -.pro-title {font-size:20px; line-height:61px;color:#fff; font-weight:500; text-align:center;background-image:url('../images/sub/sub2_2_tit.png'); background-repeat:no-repeat; background-position:100% 0;} -.table01 table {width:100%; border-collapse:collapse; border-spacing:0px;} -.table01 table tbody th {padding:12px 10px; height:35px; font-size:16px; font-weight:500; line-height:22px; color:#4d4d4d; border-bottom:1px dotted #d6d6d6; background:#f6fafc;} -.table01 table tbody td {padding:12px 20px; color:#2c2c2c; font-size:16px; line-height:22px; border-bottom:1px dotted #d6d6d6;} -.table01 strong {font-weight:500} - -.box-cnt {border:1px solid #e0e0e0; border-radius:10px; padding:38px 27px; margin-bottom:50px;} -.box-cnt:last-child {margin-bottom:0} -.box-cnt .title {background:#f6f6f6; font-size:20px; line-height:1.4em; color:#2c2c2c; padding:5px 0 5px 18px; font-weight:500; margin-bottom:15px;} -.box-cnt .cnt {padding-left:18px; font-size:17px; line-height:1.6em; font-weight:200} -.box-cnt .cnt dl dt {position:relative; color:#2e3192; font-size:18px; line-height:1.4em; font-weight:500; padding-left:18px;} -.box-cnt .cnt dl dt:after {content:"";position:absolute;top:50%; margin-top:-2px; left:0; width:10px; height:5px; background:#2e3192; border-radius:2px;} -.box-cnt .cnt dl dd {text-indent:-10px; padding-left:10px; letter-spacing:-.30px;} - -/* -.sitemap:after {content:" "; display:block; clear:both;} -.sitemap dl {float:left; display:inline; width:225px; margin:0 0 30px 80px;} -.sitemap dl.first {margin-left:0} -.sitemap dl dt {padding:10px 0; text-align:center; font-size:16px; font-weight:500; color:#fff; margin:0 0 5px 0; background:#737373;border-top-left-radius:20px; border-bottom-right-radius:20px;} -.sitemap dl dd {line-height:40px; border-bottom:1px solid #eee; font-weight:300; text-indent:-12px; padding-left:13px;} -.sitemap dl dd a {display:block; padding:8px 0 8px 15px; font-size:15px; line-height:20px;} -.sitemap dl dd a:hover {color:#f1592a} -.sitemap dl dd ul {padding:2px 0 20px;} -.sitemap dl dd ul li a {background:none; color:#f1592a; font-size:12px; line-height:20px; padding:0 0 0 20px;} -*/ diff --git a/public/css/style.css b/public/css/style.css index d40ac92..54b28ae 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -7,23 +7,49 @@ @charset "utf-8"; /* user class */ -h1,h2,h3,h4,h5,h6,strong,th,.bold{font-weight:500;} +h1, +h2, +h3, +h4, +h5, +h6, +strong, +th, +.bold { + font-weight: 500; +} -input[type=text],input[type=password]{ +input[type=text], +input[type=password] { display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; white-space: nowrap; } -select,textarea,button { + +select, +textarea, +button { display: inline-block; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; white-space: nowrap; } -a:link { text-decoration: none; } -a:visited { text-decoration: none; } -a:hover { text-decoration: underline; } -a:active { text-decoration: underline; } \ No newline at end of file + +a:link { + text-decoration: none; +} + +a:visited { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:active { + text-decoration: underline; +} \ No newline at end of file diff --git a/writable/session/index.html b/writable/session/index.html deleted file mode 100644 index b702fbc..0000000 --- a/writable/session/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - -