servermgrv2 init...
This commit is contained in:
parent
c8c525d9b3
commit
3cfa4236af
@ -46,7 +46,7 @@ $routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function
|
||||
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
|
||||
});
|
||||
// authGuard는 App\Config\Filters.php의 $aliases에 선언한 이름이어야 함
|
||||
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:manager'], static function ($routes) {
|
||||
$routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'authFilter:master,director,cloudflare,manager'], static function ($routes) {
|
||||
$routes->get('/', 'Home::index');
|
||||
$routes->group('user', static function ($routes) {
|
||||
$routes->get('', 'UserController::index');
|
||||
@ -93,7 +93,22 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:num)/(:hash)', 'BoardController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'BoardController::batchjob');
|
||||
$routes->get('download/(:any)/(:uuid)', 'ProductController::download/$1/$2');
|
||||
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||
});
|
||||
$routes->group('hpilo', static function ($routes) {
|
||||
$routes->get('', 'HPILOController::index');
|
||||
$routes->get('excel', 'HPILOController::excel');
|
||||
$routes->get('insert', 'HPILOController::insert_form');
|
||||
$routes->post('insert', 'HPILOController::insert');
|
||||
$routes->get('update/(:num)', 'HPILOController::update_form/$1');
|
||||
$routes->post('update/(:num)', 'HPILOController::update/$1');
|
||||
$routes->get('view/(:num)', 'HPILOController::view/$1');
|
||||
$routes->get('delete/(:num)', 'HPILOController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('toggle/(:num)/(:hash)', 'HPILOController::toggle/$1/$2');
|
||||
$routes->post('batchjob', 'HPILOController::batchjob');
|
||||
$routes->get('console/(:num)', 'HPILOController::console/$1');
|
||||
$routes->get('reset/(:num)/(:alpha)', 'HPILOController::reset/$1/$2');
|
||||
$routes->get('reload/(:num)', 'HPILOController::reload/$1');
|
||||
});
|
||||
});
|
||||
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
||||
|
||||
@ -39,9 +39,9 @@ $routes->get('/login', 'AuthController::login');
|
||||
$routes->post('/signup', 'AuthController::signup/local');
|
||||
$routes->get('/signup/(:alpha)', 'AuthController::signup/$1');
|
||||
$routes->get('/logout', 'AuthController::logout');
|
||||
$routes->group('cart', ['namespace' => 'App\Controllers'], static function ($routes) {
|
||||
$routes->post('addCart', 'CartController::addCart');
|
||||
$routes->get('cancelCart/(:uuid)', 'CartController::cancelCart/$1');
|
||||
$routes->group('ecommerce', ['namespace' => 'App\Controllers'], static function ($routes) {
|
||||
$routes->post('addCart', 'EcommerceController::addCart');
|
||||
$routes->get('cancelCart/(:uuid)', 'EcommerceController::cancelCart/$1');
|
||||
});;
|
||||
$routes->group('cli', ['namespace' => 'App\Controllers\CLI'], function ($routes) {
|
||||
});
|
||||
@ -111,7 +111,26 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
||||
$routes->get('reload/(:num)', 'HPILOController::reload/$1');
|
||||
});
|
||||
});
|
||||
|
||||
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
||||
$routes->group('user', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:master,director,cloudflare,manager,gold,silver,brone,vip,user'], static function ($routes) {
|
||||
$routes->get('update/(:uuid)', 'UserController::update_form/$1');
|
||||
$routes->post('update/(:uuid)', 'UserController::update/R1');
|
||||
$routes->get('view/(:uuid)', 'UserController::view/$1');
|
||||
});
|
||||
$routes->group('board', static function ($routes) {
|
||||
$routes->get('', 'BoardController::index');
|
||||
$routes->get('excel', 'BoardController::excel/$1');
|
||||
$routes->get('insert', 'BoardController::insert_form');
|
||||
$routes->post('insert', 'BoardController::insert');
|
||||
$routes->get('update/(:num)', 'BoardController::update_form/$1');
|
||||
$routes->post('update/(:num)', 'BoardController::update/$1');
|
||||
$routes->get('view/(:num)', 'BoardController::view/$1');
|
||||
$routes->get('reply/(:num)', 'BoardController::reply_form/$1');
|
||||
$routes->post('reply/(:num)', 'BoardController::reply/$1');
|
||||
$routes->get('delete/(:num)', 'BoardController::delete/$1', ['filter' => 'authFilter:master']);
|
||||
$routes->get('download/(:any)/(:num)', 'BoardController::download/$1/$2');
|
||||
});
|
||||
});
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* Additional Routing
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Config;
|
||||
|
||||
use CodeIgniter\Config\BaseService;
|
||||
|
||||
/**
|
||||
* Services Configuration file.
|
||||
*
|
||||
* Services are simply other classes/libraries that the system uses
|
||||
* to do its job. This is used by CodeIgniter to allow the core of the
|
||||
* framework to be swapped out easily without affecting the usage within
|
||||
* the rest of your application.
|
||||
*
|
||||
* This file holds any application-specific services, or service overrides
|
||||
* that you might need. An example has been included with the general
|
||||
* method format you should use for your service methods. For more examples,
|
||||
* see the core Services file at system/Config/Services.php.
|
||||
*/
|
||||
class Services extends BaseService
|
||||
{
|
||||
/*
|
||||
* public static function example($getShared = true)
|
||||
* {
|
||||
* if ($getShared) {
|
||||
* return static::getSharedInstance('example');
|
||||
* }
|
||||
*
|
||||
* return new \CodeIgniter\Example();
|
||||
* }
|
||||
*/
|
||||
public static function user($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('user');
|
||||
}
|
||||
return new \App\Backend\UserBackend();
|
||||
}
|
||||
public static function usersns($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('usersns');
|
||||
}
|
||||
return new \App\Backend\UserSNSBackend();
|
||||
}
|
||||
public static function board($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('board');
|
||||
}
|
||||
return new \App\Backend\BoardBackend();
|
||||
}
|
||||
public static function boardconfig($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('boardconfig');
|
||||
}
|
||||
return new \App\Backend\BoardConfigBackend();
|
||||
}
|
||||
public static function hpilo($getShared = true)
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance('hpilo');
|
||||
}
|
||||
return new \App\Backend\HPILOBackend();
|
||||
}
|
||||
}
|
||||
@ -184,6 +184,7 @@ abstract class BaseController extends Controller
|
||||
} catch (\Exception $e) {
|
||||
$msg = "{$this->_viewDatas['title']}에서 " . __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage();
|
||||
log_message("error", $e->getMessage());
|
||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||
return redirect()->back()->withInput();
|
||||
} finally {
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
@ -243,6 +244,7 @@ abstract class BaseController extends Controller
|
||||
} catch (\Exception $e) {
|
||||
$msg = "{$this->_viewDatas['title']}에서 " . __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage();
|
||||
log_message("error", $e->getMessage());
|
||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||
return redirect()->back()->withInput();
|
||||
} finally {
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
@ -290,6 +292,7 @@ abstract class BaseController extends Controller
|
||||
} catch (\Exception $e) {
|
||||
$msg = "{$this->_viewDatas['title']}에서 " . __FUNCTION__ . " 실패하였습니다.\n" . $e->getMessage();
|
||||
log_message("error", $e->getMessage());
|
||||
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||
return redirect()->back()->withInput();
|
||||
} finally {
|
||||
$this->_session->setFlashdata("return_message", $msg);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$roles = [
|
||||
'user' => '일반회원', 'vip' => 'VIP회원',
|
||||
'guest' => '비회원', 'user' => '일반회원', 'vip' => 'VIP회원',
|
||||
'bronze' => '일반판매자', 'silver' => '고급판매자', 'gold' => '파워리셀러',
|
||||
'manager' => '관리자', 'cloudflare' => "Cloudflare관리자", 'director' => '감독자', 'master' => "마스터",
|
||||
];
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
<?php
|
||||
$roles = [
|
||||
'user' => '일반회원', 'vip' => 'VIP회원',
|
||||
'bronze' => '일반판매자', 'silver' => '고급판매자', 'gold' => '파워리셀러',
|
||||
'manager' => '관리자', 'cloudflare' => "Cloudflare관리자", 'director' => '감독자', 'master' => "마스터",
|
||||
];
|
||||
return [
|
||||
'title' => '회원 정보',
|
||||
'label' => [
|
||||
@ -13,10 +18,6 @@ return [
|
||||
'updated_at' => '수정일',
|
||||
'created_at' => '작성일'
|
||||
],
|
||||
'ROLE' => [
|
||||
'user' => '일반회원', 'vip' => 'VIP회원',
|
||||
'bronze' => '일반판매자', 'silver' => '고급판매자', 'gold' => '파워리셀러',
|
||||
'manager' => '관리자', 'cloudflare' => "Cloudflare관리자", 'director' => '감독자', 'master' => "마스터",
|
||||
],
|
||||
'ROLE' => $roles,
|
||||
'STATUS' => ['use' => '사용', 'unuse' => '사용않함'],
|
||||
];
|
||||
|
||||
@ -5,6 +5,5 @@
|
||||
<div class="accordion accordion-flush">
|
||||
<?= $this->include($layout['path'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/board'); ?>
|
||||
<?= $this->include($layout['path'] . '/left_menu/shoppingmall'); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,3 +1,6 @@
|
||||
<div class="accordion-item">
|
||||
<h2><a href="/front/board"><?= CLASS_ICONS['BOARD'] ?>게시글 관리</a></h2>
|
||||
<h2><a href="/front/board?category=notice"><?= CLASS_ICONS['BOARD'] ?>공지사항</a></h2>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<h2><a href="/front/board?category=faq"><?= CLASS_ICONS['BOARD'] ?>FAQ</a></h2>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user