daemon-idc init
This commit is contained in:
parent
d6e1db1155
commit
ab52c7787f
15
app/Cells/CommonCell.php
Normal file
15
app/Cells/CommonCell.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cells;
|
||||
|
||||
use App\Services\CommonService;
|
||||
|
||||
abstract class CommonCell
|
||||
{
|
||||
protected $service = null;
|
||||
|
||||
protected function __construct(CommonService $service)
|
||||
{
|
||||
$this->service = $service;
|
||||
}
|
||||
}
|
||||
29
app/Cells/SearchCell.php
Normal file
29
app/Cells/SearchCell.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Cells;
|
||||
|
||||
use App\Cells\CommonCell;
|
||||
|
||||
class SearchCell extends CommonCell
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(service('userservice'));
|
||||
}
|
||||
|
||||
public function client(array $params): string
|
||||
{
|
||||
$options = ["" => "사용자명 선택"];
|
||||
foreach ($this->service->getEntities() as $entity) {
|
||||
$options[$entity->getPK()] = $entity->getTitle();
|
||||
}
|
||||
$template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
|
||||
return view('cells/search/' . $template, [
|
||||
'searchCellDatas' => [
|
||||
'options' => $options,
|
||||
'selected' => null,
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -78,6 +78,104 @@ defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
||||
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
||||
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
||||
|
||||
define("KEYWORD", '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버');
|
||||
define('LAYOUTS', [
|
||||
'auth' => [
|
||||
'title' => KEYWORD,
|
||||
'path' => 'auth',
|
||||
'layout' => 'layouts/auth',
|
||||
'template' => 'templates/auth',
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link href="//cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>',
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
'front' => [
|
||||
'title' => KEYWORD,
|
||||
'path' => 'front',
|
||||
'layout' => 'layouts/front',
|
||||
'template' => 'templates/front',
|
||||
'topmenus' => ['aboutus', 'hosting', 'service', 'support'],
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>',
|
||||
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
'admin' => [
|
||||
'title' => '관리자화면',
|
||||
'path' => 'admin',
|
||||
'layout' => 'layouts/admin',
|
||||
'template' => 'templates/admin',
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
||||
'<link rel="stylesheet" href="/assets/tagify/dist/tagify.css">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>',
|
||||
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
||||
'<script src="/assets/tinymce/tinymce.min.js" referrerpolicy="origin"></script>',
|
||||
'<script src="/assets/tagify/dist/tagify.js"></script>'
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
]);
|
||||
|
||||
define('MESSAGES', [
|
||||
'CREATED' => '생성되었습니다.',
|
||||
'UPDATED' => '수정되였습니다.',
|
||||
|
||||
@ -1,107 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Config;
|
||||
|
||||
use CodeIgniter\Config\BaseConfig;
|
||||
|
||||
class Layout extends BaseConfig
|
||||
{
|
||||
public const KEYWORD = '일본IDC 일본서버 일본 서버 일본호스팅 서버호스팅 디도스 공격 해외 호스팅 DDOS 방어 ddos 의뢰 디도스 보안 일본 단독서버 가상서버';
|
||||
|
||||
public array $layouts = [
|
||||
'auth' => [
|
||||
'title' => self::KEYWORD,
|
||||
'path' => 'auth',
|
||||
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'auth',
|
||||
'template' => 'templates' . DIRECTORY_SEPARATOR . 'auth',
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . self::KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . self::KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . self::KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link href="//cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>',
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
'front' => [
|
||||
'title' => self::KEYWORD,
|
||||
'path' => 'front',
|
||||
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'front',
|
||||
'template' => 'templates' . DIRECTORY_SEPARATOR . 'front',
|
||||
'topmenus' => ['aboutus', 'hosting', 'service', 'support'],
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . self::KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . self::KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . self::KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>',
|
||||
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
'admin' => [
|
||||
'title' => '관리자화면',
|
||||
'path' => 'admin',
|
||||
'layout' => 'layouts' . DIRECTORY_SEPARATOR . 'admin',
|
||||
'template' => 'templates' . DIRECTORY_SEPARATOR . 'admin',
|
||||
'metas' => [
|
||||
'<meta charset="UTF-8">',
|
||||
'<meta name="viewport" content="width=device-width, initial-scale=1.0">',
|
||||
'<meta http-equiv="X-UA-Compatible" content="IE=Edge">',
|
||||
'<meta name="subject" content="Daemon IDC">',
|
||||
'<meta name="description" content="' . self::KEYWORD . '">',
|
||||
'<meta name="keywords" content="' . self::KEYWORD . '">',
|
||||
'<meta property="og:type" content="website">',
|
||||
'<meta property="og:title" content="Daemon IDC">',
|
||||
'<meta property="og:description" content="' . self::KEYWORD . '">',
|
||||
],
|
||||
'stylesheets' => [
|
||||
'<link rel="icon" href="/favicon.ico">',
|
||||
'<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">',
|
||||
'<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/select2-bootstrap-5-theme@1.3.0/dist/select2-bootstrap-5-theme.min.css" />',
|
||||
'<link rel="stylesheet" href="/assets/tagify/dist/tagify.css">',
|
||||
'<link rel="stylesheet" href="/css/common/style.css" />',
|
||||
],
|
||||
'javascripts' => [
|
||||
'<script src="//cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js"></script>',
|
||||
'<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>',
|
||||
'<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>',
|
||||
'<script src="/assets/tinymce/tinymce.min.js" referrerpolicy="origin"></script>',
|
||||
'<script src="/assets/tagify/dist/tagify.js"></script>'
|
||||
],
|
||||
'footerScripts' => []
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -8,7 +8,6 @@ use App\Services\Auth\GoogleService;
|
||||
use App\Services\Auth\LocalService;
|
||||
use App\Services\BoardService;
|
||||
use App\Services\UserService;
|
||||
use App\Services\Customer\ClientService;
|
||||
/**
|
||||
* Services Configuration file.
|
||||
*
|
||||
@ -86,15 +85,4 @@ class Services extends BaseService
|
||||
new \App\Models\BoardModel(),
|
||||
);
|
||||
}
|
||||
|
||||
//Customer
|
||||
public static function customer_clientservice($getShared = true): ClientService
|
||||
{
|
||||
if ($getShared) {
|
||||
return static::getSharedInstance(__FUNCTION__);
|
||||
}
|
||||
return new ClientService(
|
||||
new \App\Models\Customer\ClientModel(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,4 +59,21 @@ class View extends BaseView
|
||||
* @var list<class-string<ViewDecoratorInterface>>
|
||||
*/
|
||||
public array $decorators = [];
|
||||
|
||||
/**
|
||||
* Subdirectory within app/Views for namespaced view overrides.
|
||||
*
|
||||
* Namespaced views will be searched in:
|
||||
*
|
||||
* app/Views/{$appOverridesFolder}/{Namespace}/{view_path}.{php|html...}
|
||||
*
|
||||
* This allows application-level overrides for package or module views
|
||||
* without modifying vendor source files.
|
||||
*
|
||||
* Examples:
|
||||
* 'overrides' -> app/Views/overrides/Example/Blog/post/card.php
|
||||
* 'vendor' -> app/Views/vendor/Example/Blog/post/card.php
|
||||
* '' -> app/Views/Example/Blog/post/card.php (direct mapping)
|
||||
*/
|
||||
public string $appOverridesFolder = 'overrides';
|
||||
}
|
||||
|
||||
@ -20,12 +20,11 @@ use Psr\Log\LoggerInterface;
|
||||
abstract class AbstractWebController extends Controller
|
||||
{
|
||||
use LogTrait;
|
||||
|
||||
protected $service = null;
|
||||
private array $_action_paths = [];
|
||||
private array $_viewDatas = [];
|
||||
private ?string $_title = null;
|
||||
|
||||
protected $layouts = [];
|
||||
protected $service = null;
|
||||
// --- 초기화 및 DI ---
|
||||
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
@ -112,26 +111,32 @@ abstract class AbstractWebController extends Controller
|
||||
/**
|
||||
* 뷰 경로와 데이터를 이용하여 최종 HTML을 렌더링합니다.
|
||||
*/
|
||||
protected function action_render_process(string $view_file, array $viewDatas, ?string $template_path = null): string
|
||||
{
|
||||
helper(['form', 'IconHelper', 'utility']);
|
||||
$config = config('Layout');
|
||||
$layoutConfig = $config->layouts[$viewDatas['layout']['path']] ?? [];
|
||||
protected function action_render_process(
|
||||
string $view_file,
|
||||
array $viewDatas,
|
||||
?string $template_path = null
|
||||
): string {
|
||||
helper(['form', 'utility']);
|
||||
/**
|
||||
* 🔥 핵심:
|
||||
* View name은 항상 슬래시 기반
|
||||
*/
|
||||
$baseViewPath = trim($viewDatas['layout']['path'], '/');
|
||||
|
||||
$viewDatas['layout'] = array_merge($layoutConfig, $viewDatas['layout']);
|
||||
$view_path = $viewDatas['layout']['path'];
|
||||
if ($template_path) {
|
||||
$view_path .= '/' . $template_path;
|
||||
$baseViewPath .= '/' . trim($template_path, '/');
|
||||
}
|
||||
// dd($view_path);
|
||||
//최종 ViewPath
|
||||
$viewDatas['view_path'] = $view_path;
|
||||
helper([__FUNCTION__]);
|
||||
return view($view_path . '/' . $view_file, [
|
||||
|
||||
$viewName = $baseViewPath . '/' . ltrim($view_file, '/');
|
||||
|
||||
return view($viewName, [
|
||||
'viewDatas' => [
|
||||
...$viewDatas,
|
||||
'forms' => ['attributes' => ['method' => "post",], 'hiddens' => []],
|
||||
]
|
||||
'forms' => [
|
||||
'attributes' => ['method' => 'post'],
|
||||
'hiddens' => [],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,12 +10,11 @@ use Psr\Log\LoggerInterface;
|
||||
abstract class AdminController extends CommonController
|
||||
{
|
||||
private $_layout = 'admin';
|
||||
protected $layouts = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->addActionPaths($this->_layout);
|
||||
$this->layouts = config('Layout')->layouts[$this->_layout] ?? [];
|
||||
$this->layouts = LAYOUTS[$this->_layout];
|
||||
}
|
||||
protected function action_init_process(string $action, array $formDatas = []): void
|
||||
{
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use RuntimeException;
|
||||
|
||||
class ClientController extends CustomerController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
if ($this->service === null) {
|
||||
$this->service = service('customer_clientservice');
|
||||
}
|
||||
$this->addActionPaths('client');
|
||||
}
|
||||
//기본 함수 작업
|
||||
//Custom 추가 함수
|
||||
//고객 상세정보
|
||||
public function detail(mixed $uid): string|RedirectResponse
|
||||
{
|
||||
try {
|
||||
$action = __FUNCTION__;
|
||||
$this->action_init_process($action);
|
||||
//Return Url정의
|
||||
$this->getAuthContext()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : ""));
|
||||
//일괄작업용 Fields정의
|
||||
$entity = $this->service->getEntity($uid);
|
||||
if (!$entity instanceof ClientEntity) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$uid}에 해당하는 고객정보를 찾을수 없습니다.");
|
||||
}
|
||||
$this->addViewDatas('totalCounts', service('equipment_serverservice')->getTotalServiceCount(['serviceinfo.clientinfo_uid' => $entity->getPK()]));
|
||||
$this->addViewDatas('totalAmounts', service('customer_serviceservice')->getTotalAmounts([
|
||||
'clientinfo_uid' => $entity->getPK(),
|
||||
'status' => STATUS['AVAILABLE']
|
||||
]));
|
||||
//서비스별 미납 Count
|
||||
$this->addViewDatas('unPaids', service('paymentservice')->getUnPaids('clientinfo_uid', [
|
||||
'clientinfo_uid' => $entity->getPK()
|
||||
]));
|
||||
$this->addViewDatas('serviceEntities', service('customer_serviceservice')->getEntities(['clientinfo_uid' => $entity->getPK()]));
|
||||
$this->addViewDatas('entity', $entity);
|
||||
helper(['form']);
|
||||
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? 'client');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 고객 Detail Page 오류:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
//비고사항 변경
|
||||
public function history(int $uid): RedirectResponse|string
|
||||
{
|
||||
try {
|
||||
$history = $this->request->getPost('history');
|
||||
if (!$history) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 비고가 정의되지 않았습니다.");
|
||||
}
|
||||
$entity = $this->service->modify($uid, ['history' => $history]);
|
||||
$this->addViewDatas('entity', $entity);
|
||||
return $this->action_redirect_process('info', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정이 완료되었습니다.");
|
||||
} catch (\Throwable $e) {
|
||||
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 비고설정 오류:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin\Customer;
|
||||
|
||||
use App\Controllers\Admin\AdminController;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
abstract class CustomerController extends AdminController
|
||||
{
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->addActionPaths('customer');
|
||||
}
|
||||
//Index,FieldForm관련
|
||||
}
|
||||
@ -7,18 +7,14 @@ use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Home extends AbstractWebController
|
||||
class Home extends AdminController
|
||||
{
|
||||
private $_layout = 'admin';
|
||||
protected $layouts = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
if ($this->service === null) {
|
||||
$this->service = service('customer_serviceservice');
|
||||
$this->service = service('userservice');
|
||||
}
|
||||
$this->addActionPaths($this->_layout);
|
||||
$this->layouts = config('Layout')->layouts[$this->_layout] ?? [];
|
||||
}
|
||||
protected function action_init_process(string $action, array $formDatas = []): void
|
||||
{
|
||||
@ -40,19 +36,19 @@ class Home extends AbstractWebController
|
||||
$this->addViewDatas('boardRequestTaskCount', service('boardservice')->getRequestTaskCount($this->getAuthContext()->getUID()));
|
||||
//Total 서버 현황
|
||||
//interval을 기준으로 최근 신규 서비스정보 가져오기
|
||||
$interval = intval($this->request->getVar('interval') ?? 7);
|
||||
$this->addViewDatas('interval', $interval);
|
||||
$newServiceEntities = $this->service->getNewServiceEntities($interval);
|
||||
$this->addViewDatas('newServiceEntities', $newServiceEntities);
|
||||
$this->addViewDatas('newServiceCount', count($newServiceEntities));
|
||||
// $interval = intval($this->request->getVar('interval') ?? 7);
|
||||
// $this->addViewDatas('interval', $interval);
|
||||
// $newServiceEntities = service('customer_serviceservice')->getNewServiceEntities($interval);
|
||||
// $this->addViewDatas('newServiceEntities', $newServiceEntities);
|
||||
// $this->addViewDatas('newServiceCount', count($newServiceEntities));
|
||||
//서비스별 미납 Count
|
||||
$unPaidTotalCount = $unPaidTotalAmount = 0;
|
||||
foreach (array_values(service('paymentservice')->getUnPaids('serviceinfo_uid')) as $unPaid) {
|
||||
$unPaidTotalCount += $unPaid['cnt'];
|
||||
$unPaidTotalAmount += $unPaid['amount'];
|
||||
}
|
||||
$this->addViewDatas('unPaidTotalCount', $unPaidTotalCount);
|
||||
$this->addViewDatas('unPaidTotalAmount', $unPaidTotalAmount);
|
||||
// $unPaidTotalCount = $unPaidTotalAmount = 0;
|
||||
// foreach (array_values(service('paymentservice')->getUnPaids('serviceinfo_uid')) as $unPaid) {
|
||||
// $unPaidTotalCount += $unPaid['cnt'];
|
||||
// $unPaidTotalAmount += $unPaid['amount'];
|
||||
// }
|
||||
// $this->addViewDatas('unPaidTotalCount', $unPaidTotalCount);
|
||||
// $this->addViewDatas('unPaidTotalAmount', $unPaidTotalAmount);
|
||||
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate') ?? "welcome");
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,12 +12,11 @@ use Psr\Log\LoggerInterface;
|
||||
abstract class AuthController extends AbstractWebController
|
||||
{
|
||||
private $_layout = 'auth';
|
||||
protected $layouts = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->addActionPaths($this->_layout);
|
||||
$this->layouts = config('Layout')->layouts[$this->_layout] ?? [];
|
||||
$this->layouts = LAYOUTS[$this->_layout];
|
||||
}
|
||||
protected function action_init_process(string $action, array $formDatas = []): void
|
||||
{
|
||||
|
||||
@ -212,7 +212,7 @@ abstract class CommonController extends AbstractCRUDController
|
||||
$this->addViewDatas('formDatas', $this->request->getVar() ?? []);
|
||||
}
|
||||
|
||||
final public function index(): string
|
||||
public function index(): string
|
||||
{
|
||||
$action = __FUNCTION__;
|
||||
$this->action_init_process($action);
|
||||
|
||||
34
app/Controllers/FrontController.php
Normal file
34
app/Controllers/FrontController.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Controllers\CommonController;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
abstract class FrontController extends CommonController
|
||||
{
|
||||
private $_layout = 'front';
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->addActionPaths($this->_layout);
|
||||
$this->layouts = LAYOUTS[$this->_layout];
|
||||
}
|
||||
protected function action_init_process(string $action, array $formDatas = []): void
|
||||
{
|
||||
parent::action_init_process($action, $formDatas);
|
||||
$this->addViewDatas('layout', $this->layouts);
|
||||
$this->addViewDatas('title', $this->getTitle());
|
||||
$this->addViewDatas('helper', $this->service->getHelper());
|
||||
$this->service->getActionForm()->action_init_process($action, $formDatas);
|
||||
$this->addViewDatas('formFields', $this->service->getActionForm()->getFormFields());
|
||||
$this->addViewDatas('formRules', $this->service->getActionForm()->getFormRules());
|
||||
$this->addViewDatas('formFilters', $this->service->getActionForm()->getFormFilters());
|
||||
$this->addViewDatas('formOptions', $this->service->getActionForm()->getFormOptions());
|
||||
$this->addViewDatas('index_actionButtons', $this->service->getActionForm()->getActionButtons());
|
||||
$this->addViewDatas('index_batchjobFields', $this->service->getActionForm()->getBatchjobFilters());
|
||||
$this->addViewDatas('index_batchjobButtons', $this->service->getActionForm()->getBatchjobButtons());
|
||||
}
|
||||
}
|
||||
@ -2,23 +2,18 @@
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Controllers\AbstractWebController;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Home extends AbstractWebController
|
||||
class Home extends FrontController
|
||||
{
|
||||
private $_layout = 'front';
|
||||
protected $layouts = [];
|
||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||
{
|
||||
parent::initController($request, $response, $logger);
|
||||
if ($this->service === null) {
|
||||
$this->service = service('customer_clientservice');
|
||||
$this->service = service('userservice');
|
||||
}
|
||||
$this->addActionPaths($this->_layout);
|
||||
$this->layouts = config('Layout')->layouts[$this->_layout] ?? [];
|
||||
}
|
||||
protected function action_init_process(string $action, array $formDatas = []): void
|
||||
{
|
||||
@ -31,6 +26,7 @@ class Home extends AbstractWebController
|
||||
$this->addViewDatas('formFilters', $this->service->getActionForm()->getFormFilters());
|
||||
$this->addViewDatas('formOptions', $this->service->getActionForm()->getFormOptions());
|
||||
}
|
||||
|
||||
//Index,FieldForm관련
|
||||
public function index(): string
|
||||
{
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\DTOs\Customer;
|
||||
|
||||
use App\DTOs\CommonDTO;
|
||||
|
||||
class ClientDTO extends CommonDTO
|
||||
{
|
||||
public ?int $uid = null;
|
||||
public ?int $user_uid = null;
|
||||
public ?string $id = null;
|
||||
public ?string $passwd = null;
|
||||
public string $site = '';
|
||||
public string $name = '';
|
||||
public string $phone = '';
|
||||
public string $email = '';
|
||||
public array $role = [];
|
||||
public int $account_balance = 0;
|
||||
public int $coupon_balance = 0;
|
||||
public int $point_balance = 0;
|
||||
public string $status = '';
|
||||
public string $history = '';
|
||||
|
||||
public function __construct(array $datas = [])
|
||||
{
|
||||
// 1. role 변환 로직 (기존 유지)
|
||||
if (isset($datas['role']) && is_string($datas['role'])) {
|
||||
$datas['role'] = explode(DEFAULTS["DELIMITER_COMMA"], $datas['role']);
|
||||
}
|
||||
|
||||
if (!isset($datas['role'])) {
|
||||
$datas['role'] = [];
|
||||
}
|
||||
|
||||
// 2. [추가] 잔액 관련 데이터가 null이거나 비어있다면 0으로 보정
|
||||
// CommonDTO의 parent::__construct가 호출되기 전에 데이터를 정제합니다.
|
||||
$balanceFields = ['account_balance', 'coupon_balance', 'point_balance'];
|
||||
foreach ($balanceFields as $field) {
|
||||
if (!isset($datas[$field]) || $datas[$field] === '' || $datas[$field] === null) {
|
||||
$datas[$field] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct($datas);
|
||||
}
|
||||
|
||||
public function getRoleToString(): string
|
||||
{
|
||||
return implode(DEFAULTS["DELIMITER_COMMA"], $this->role);
|
||||
}
|
||||
}
|
||||
@ -1,142 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Customer;
|
||||
|
||||
use App\Models\Customer\ClientModel;
|
||||
|
||||
class ClientEntity extends CustomerEntity
|
||||
{
|
||||
const PK = ClientModel::PK;
|
||||
const TITLE = ClientModel::TITLE;
|
||||
|
||||
protected array $nullableFields = [
|
||||
'id',
|
||||
'passwd',
|
||||
];
|
||||
|
||||
// ✅ role은 반드시 string 기본값
|
||||
protected $attributes = [
|
||||
'id' => null,
|
||||
'passwd' => null,
|
||||
'site' => '',
|
||||
'name' => '',
|
||||
'phone' => '',
|
||||
'email' => '',
|
||||
'role' => '', // ✅ [] 금지
|
||||
'account_balance' => 0,
|
||||
'coupon_balance' => 0,
|
||||
'point_balance' => 0,
|
||||
'status' => '',
|
||||
'history' => '',
|
||||
];
|
||||
|
||||
public function __construct(array|null $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
public function getUserUid(): int|null
|
||||
{
|
||||
return $this->user_uid ?? null;
|
||||
}
|
||||
|
||||
public function getCustomTitle(mixed $title = null): string
|
||||
{
|
||||
return sprintf("%s/%s", $this->getSite(), $title ? $title : $this->getTitle());
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return (string) ($this->attributes['name'] ?? '');
|
||||
}
|
||||
|
||||
public function getSite(): string
|
||||
{
|
||||
return (string) ($this->attributes['site'] ?? '');
|
||||
}
|
||||
|
||||
public function getAccountBalance(): int
|
||||
{
|
||||
return (int) ($this->attributes['account_balance'] ?? 0);
|
||||
}
|
||||
|
||||
public function getCouponBalance(): int
|
||||
{
|
||||
return (int) ($this->attributes['coupon_balance'] ?? 0);
|
||||
}
|
||||
|
||||
public function getPointBalance(): int
|
||||
{
|
||||
return (int) ($this->attributes['point_balance'] ?? 0);
|
||||
}
|
||||
|
||||
public function getHistory(): string|null
|
||||
{
|
||||
return $this->attributes['history'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* role을 배열로 반환
|
||||
*/
|
||||
public function getRole(): array
|
||||
{
|
||||
$role = $this->attributes['role'] ?? null;
|
||||
|
||||
if (is_array($role)) {
|
||||
return array_values(array_filter($role, fn($v) => (string) $v !== ''));
|
||||
}
|
||||
|
||||
if (is_string($role) && $role !== '') {
|
||||
$decoded = json_decode($role, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) {
|
||||
$clean = array_map(
|
||||
fn($item) => trim((string) ($item ?? ''), " \t\n\r\0\x0B\""),
|
||||
$decoded
|
||||
);
|
||||
return array_values(array_filter($clean, fn($v) => $v !== ''));
|
||||
}
|
||||
|
||||
$parts = explode(DEFAULTS["DELIMITER_COMMA"], $role);
|
||||
$clean = array_map(
|
||||
fn($item) => trim((string) ($item ?? ''), " \t\n\r\0\x0B\""),
|
||||
$parts
|
||||
);
|
||||
return array_values(array_filter($clean, fn($v) => $v !== ''));
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* ✅ role은 DB 저장용 CSV 문자열로 반환
|
||||
*/
|
||||
public function setRole($role): string
|
||||
{
|
||||
$roleArray = [];
|
||||
|
||||
if (is_string($role)) {
|
||||
$clean = trim($role, " \t\n\r\0\x0B\"");
|
||||
if ($clean !== '') {
|
||||
$decoded = json_decode($clean, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE && is_array($decoded)) {
|
||||
$roleArray = $decoded;
|
||||
} else {
|
||||
$roleArray = explode(DEFAULTS["DELIMITER_COMMA"], $clean);
|
||||
}
|
||||
}
|
||||
} elseif (is_array($role)) {
|
||||
$roleArray = $role;
|
||||
} else {
|
||||
$roleArray = [];
|
||||
}
|
||||
|
||||
$cleaned = array_map(
|
||||
fn($item) => trim((string) ($item ?? ''), " \t\n\r\0\x0B\""),
|
||||
$roleArray
|
||||
);
|
||||
|
||||
$roleArray = array_values(array_filter($cleaned, fn($v) => $v !== ''));
|
||||
|
||||
return implode(DEFAULTS["DELIMITER_COMMA"], $roleArray);
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Customer;
|
||||
|
||||
use App\Entities\CommonEntity;
|
||||
|
||||
abstract class CustomerEntity extends CommonEntity
|
||||
{
|
||||
public function __construct(array|null $data = null)
|
||||
{
|
||||
parent::__construct($data);
|
||||
}
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Forms\Customer;
|
||||
|
||||
class ClientForm extends CustomerForm
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function action_init_process(string $action, array &$formDatas = []): void
|
||||
{
|
||||
$fields = [
|
||||
'site',
|
||||
'name',
|
||||
'email',
|
||||
'phone',
|
||||
'role',
|
||||
'status',
|
||||
];
|
||||
$filters = [
|
||||
'site',
|
||||
'role',
|
||||
'status',
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['site', 'role', 'status'];
|
||||
switch ($action) {
|
||||
case 'view':
|
||||
$fields = [...$fields, 'status', 'created_at'];
|
||||
break;
|
||||
case 'index':
|
||||
case 'download':
|
||||
$fields = [
|
||||
'site',
|
||||
'name',
|
||||
'email',
|
||||
'phone',
|
||||
'role',
|
||||
'account_balance',
|
||||
'coupon_balance',
|
||||
'point_balance',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
break;
|
||||
}
|
||||
$this->setFormFields($fields);
|
||||
$this->setFormRules($action, $fields);
|
||||
$this->setFormFilters($filters);
|
||||
$this->setFormOptions($action, $filters, $formDatas);
|
||||
$this->setIndexFilters($indexFilter);
|
||||
$this->setBatchjobFilters($batchjobFilters);
|
||||
}
|
||||
public function getFormRule(string $action, string $field, array $formRules): array
|
||||
{
|
||||
switch ($field) {
|
||||
case "name":
|
||||
$formRules[$field] = sprintf("required|trim|string%s", in_array($action, ["create", "create_form"]) ? "|is_unique[{$this->getAttribute('table')}.{$field}]" : "");
|
||||
break;
|
||||
case "site":
|
||||
$formRules[$field] = "required|trim|string";
|
||||
break;
|
||||
case "role":
|
||||
$formRules[$field] = 'required|is_array|at_least_one';
|
||||
$formRules['role.*'] = 'permit_empty|trim|in_list[user,vip,reseller]';
|
||||
break;
|
||||
case "email":
|
||||
$formRules[$field] = "permit_empty|trim|valid_email";
|
||||
break;
|
||||
case "phone":
|
||||
case "history":
|
||||
$formRules[$field] = "permit_empty|trim|string";
|
||||
break;
|
||||
case "account_balance":
|
||||
case "coupon_balance":
|
||||
case "point_balance":
|
||||
$formRules[$field] = "permit_empty|numeric";
|
||||
break;
|
||||
default:
|
||||
$formRules = parent::getFormRule($action, $field, $formRules);
|
||||
break;
|
||||
}
|
||||
return $formRules;
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Forms\Customer;
|
||||
|
||||
use App\Forms\CommonForm;
|
||||
|
||||
abstract class CustomerForm extends CommonForm
|
||||
{
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,202 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class ClientHelper extends CustomerHelper
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($field) {
|
||||
case 'site':
|
||||
$forms = [];
|
||||
array_shift($viewDatas['formOptions'][$field]['options']);
|
||||
foreach ($viewDatas['formOptions'][$field]['options'] as $key => $label)
|
||||
$forms[] = form_radio($field, $key, $key == $value, $extras) . $label;
|
||||
$form = implode(" ", $forms);
|
||||
break;
|
||||
case 'role':
|
||||
// 1) value가 배열이면 그대로, 문자열이면 CSV를 배열로 변환
|
||||
if (is_string($value)) {
|
||||
$value = trim($value, " \t\n\r\0\x0B\"");
|
||||
$value = ($value === '') ? [] : explode(DEFAULTS["DELIMITER_COMMA"], $value);
|
||||
} elseif (!is_array($value)) {
|
||||
$value = [];
|
||||
}
|
||||
|
||||
// 2) 정리
|
||||
$currentRoles = array_values(array_filter(
|
||||
array_map(
|
||||
fn($item) => strtolower(trim((string) ($item ?? ''), " \t\n\r\0\x0B\"")),
|
||||
$value
|
||||
)
|
||||
));
|
||||
|
||||
$form = '';
|
||||
array_shift($viewDatas['formOptions'][$field]['options']);
|
||||
foreach ($viewDatas['formOptions'][$field]['options'] as $key => $label) {
|
||||
$checked = in_array(strtolower(trim((string) $key)), $currentRoles, true);
|
||||
$form .= '<label class="me-3">';
|
||||
$form .= form_checkbox('role[]', $key, $checked, ['id' => "role_{$key}", ...$extras]);
|
||||
$form .= " {$label}";
|
||||
$form .= '</label>';
|
||||
}
|
||||
// dd($form);
|
||||
break;
|
||||
default:
|
||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
}
|
||||
return $form;
|
||||
} //
|
||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||
{
|
||||
switch ($field) {
|
||||
case 'name':
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$viewDatas['entity']->getPK()}\">" . $value . "</a>";
|
||||
break;
|
||||
case "email":
|
||||
case "phone":
|
||||
//역활이 보안관리자가 아니면 정보숨김
|
||||
$value = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getFieldView($field, $value, $viewDatas, $extras) : "***********";
|
||||
break;
|
||||
case 'account_balance':
|
||||
$value = form_label(
|
||||
number_format($value) . "원",
|
||||
$field,
|
||||
[
|
||||
"data-src" => "/admin/customer/wallet/account?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary",
|
||||
...$extras,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'coupon_balance':
|
||||
$value = form_label(
|
||||
number_format($value) . "개",
|
||||
$field,
|
||||
[
|
||||
"data-src" => "/admin/customer/wallet/coupon?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary",
|
||||
...$extras,
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'point_balance':
|
||||
$value = form_label(
|
||||
number_format($value) . "점",
|
||||
$field,
|
||||
[
|
||||
"data-src" => "/admin/customer/wallet/point?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary",
|
||||
...$extras,
|
||||
]
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
|
||||
break;
|
||||
}
|
||||
if (is_array($value)) {
|
||||
throw new RuntimeException(static::class . "->" . __FUNCTION__ . "에서 오류발생:{$field}에 해당하는 Return 값이 배열형식입니다.\n" . var_export($value, true));
|
||||
}
|
||||
return $value;
|
||||
} //
|
||||
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
case 'batchjob':
|
||||
case 'batchjob_delete':
|
||||
//역활이 보안관리자가 아니면 사용불가
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : "";
|
||||
break;
|
||||
case 'modify':
|
||||
//역활이 보안관리자가 아니면 수정불가
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : $label;
|
||||
break;
|
||||
case 'history':
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['HISTORY'],
|
||||
$action,
|
||||
[
|
||||
"data-src" => "/admin/customer/client/history?clientinfo_uid={$viewDatas['entity']->getPK()}",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "btn btn-sm btn-primary form-label-sm",
|
||||
...$extras
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'coupon':
|
||||
case 'account':
|
||||
case 'point':
|
||||
$action = form_label(
|
||||
$label,
|
||||
$action,
|
||||
[
|
||||
"data-src" => "/admin/customer/wallet/{$action}?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary",
|
||||
...$extras
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'invoice':
|
||||
$action = form_label(
|
||||
$label,
|
||||
'payment_invoice',
|
||||
[
|
||||
"data-src" => "/admin/payment?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary form-label-sm",
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'addService':
|
||||
$action = form_label(
|
||||
'서비스추가',
|
||||
'create_service',
|
||||
[
|
||||
"data-src" => "/admin/customer/service/create?clientinfo_uid={$viewDatas['entity']->getPK()}",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "btn btn-sm btn-primary form-label-sm",
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'unpaid':
|
||||
$action = "{$label} 0원";
|
||||
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
||||
$action = form_label(
|
||||
sprintf("%s건/%s원", $viewDatas['unPaids'][$viewDatas['entity']->getPK()]['cnt'], number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount'])),
|
||||
'payment_unpaid',
|
||||
[
|
||||
"data-src" => "/admin/payment?clientinfo_uid={$viewDatas['entity']->getPK()}&status=unpaid&ActionTemplate=popup",
|
||||
"data-bs-toggle" => "modal",
|
||||
"data-bs-target" => "#modal_action_form",
|
||||
"class" => "text-primary form-label-sm",
|
||||
]
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
break;
|
||||
}
|
||||
return $action;
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers\Customer;
|
||||
|
||||
use App\Helpers\CommonHelper;
|
||||
|
||||
abstract class CustomerHelper extends CommonHelper
|
||||
{
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
return [
|
||||
'title' => "고객정보",
|
||||
'label' => [
|
||||
'user_uid' => "관리자UID",
|
||||
'code' => "고객코드",
|
||||
'site' => "사이트",
|
||||
'email' => "메일",
|
||||
'phone' => "연락처",
|
||||
'role' => "권한",
|
||||
'name' => "이름",
|
||||
'account_balance' => "예치금",
|
||||
'coupon_balance' => "쿠폰",
|
||||
'point_balance' => "포인트",
|
||||
'status' => "상태",
|
||||
'updated_at' => "갱신일",
|
||||
'created_at' => "등록일",
|
||||
'deleted_at' => "삭제일",
|
||||
],
|
||||
"SITE" => SITES,
|
||||
"ROLE" => [
|
||||
ROLE['CLIENT']['USER'] => "일반회원",
|
||||
ROLE['CLIENT']['VIP'] => "VIP회원",
|
||||
ROLE['CLIENT']['RESELLER'] => "리셀러",
|
||||
],
|
||||
"STATUS" => [
|
||||
STATUS['AVAILABLE'] => "사용중",
|
||||
STATUS['PAUSE'] => "일시정지",
|
||||
STATUS['TERMINATED'] => "해지",
|
||||
],
|
||||
];
|
||||
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Customer;
|
||||
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
|
||||
class ClientModel extends CustomerModel
|
||||
{
|
||||
const TABLE = "clientinfo";
|
||||
const PK = "uid";
|
||||
const TITLE = "name";
|
||||
protected $table = self::TABLE;
|
||||
// protected $useAutoIncrement = false;
|
||||
protected $primaryKey = self::PK;
|
||||
protected $returnType = ClientEntity::class;
|
||||
protected array $nullableFields = [
|
||||
'id',
|
||||
'passwd',
|
||||
];
|
||||
protected $allowedFields = [
|
||||
"uid",
|
||||
"user_uid",
|
||||
"site",
|
||||
"role",
|
||||
"name",
|
||||
"phone",
|
||||
"email",
|
||||
"history",
|
||||
"account_balance",
|
||||
"coupon_balance",
|
||||
"point_balance",
|
||||
"status",
|
||||
];
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Customer;
|
||||
|
||||
use App\Models\CommonModel;
|
||||
|
||||
abstract class CustomerModel extends CommonModel
|
||||
{
|
||||
//true이면 모든 delete * 메소드 호출은 실제로 행을 삭제하는 것이 아니라 플래그를 데이터베이스로 설정
|
||||
protected $useSoftDeletes = true;
|
||||
|
||||
protected function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Customer;
|
||||
|
||||
use App\DTOs\Customer\ClientDTO;
|
||||
use App\Entities\Customer\ClientEntity;
|
||||
use App\Entities\PaymentEntity;
|
||||
use App\Forms\Customer\ClientForm;
|
||||
use App\Helpers\Customer\ClientHelper;
|
||||
use App\Models\Customer\ClientModel;
|
||||
use RuntimeException;
|
||||
|
||||
class ClientService extends CustomerService
|
||||
{
|
||||
protected string $formClass = ClientForm::class;
|
||||
protected string $helperClass = ClientHelper::class;
|
||||
|
||||
public function __construct(ClientModel $model)
|
||||
{
|
||||
parent::__construct($model);
|
||||
$this->addClassPaths('Client');
|
||||
}
|
||||
public function getDTOClass(): string
|
||||
{
|
||||
return ClientDTO::class;
|
||||
}
|
||||
public function createDTO(array $formDatas): ClientDTO
|
||||
{
|
||||
return new ClientDTO($formDatas);
|
||||
}
|
||||
public function getEntityClass(): string
|
||||
{
|
||||
return ClientEntity::class;
|
||||
}
|
||||
//기본 기능부분
|
||||
protected function getEntity_process(mixed $entity): ClientEntity
|
||||
{
|
||||
return $entity;
|
||||
}
|
||||
//List 검색용
|
||||
//FormFilter 조건절 처리
|
||||
//검색어조건절처리
|
||||
//OrderBy 처리
|
||||
public function setOrderBy(mixed $field = null, mixed $value = null): void
|
||||
{
|
||||
$this->model->orderBy("site ASC,name ASC");
|
||||
parent::setOrderBy($field, $value);
|
||||
}
|
||||
|
||||
protected function action_process_fieldhook(string $field, $value, array $formDatas): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'role':
|
||||
if (is_string($value)) {
|
||||
$value = ($value === '') ? [] : explode(DEFAULTS["DELIMITER_COMMA"], $value);
|
||||
} elseif (!is_array($value)) {
|
||||
$value = [];
|
||||
}
|
||||
$value = array_values(array_filter(array_map(
|
||||
fn($v) => trim((string) ($v ?? ''), " \t\n\r\0\x0B\""),
|
||||
$value
|
||||
)));
|
||||
$formDatas[$field] = $value;
|
||||
break;
|
||||
default:
|
||||
$formDatas = parent::action_process_fieldhook($field, $value, $formDatas);
|
||||
break;
|
||||
}
|
||||
return $formDatas;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Customer;
|
||||
|
||||
use App\Models\CommonModel;
|
||||
use App\Services\CommonService;
|
||||
|
||||
abstract class CustomerService extends CommonService
|
||||
{
|
||||
protected function __construct(CommonModel $model)
|
||||
{
|
||||
parent::__construct($model);
|
||||
$this->addClassPaths('Customer');
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
<?= $this->extend($viewDatas['layout']['layout']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
|
||||
<div id="container" class="content">
|
||||
<div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="bg-light" colspan="2"><?= $viewDatas['title'] ?></th>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['formFields'] as $field => $label): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end bg-light" width="20%"><?= $viewDatas['helper']->getFieldLabel($field, $label, $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['formDatas'][$field] ?? null), $viewDatas) ?>
|
||||
<div><?= validation_show_error($field); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
<div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,25 +0,0 @@
|
||||
<?= $this->extend($viewDatas['layout']['layout']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
|
||||
<div id="container" class="content">
|
||||
<div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="bg-light" colspan="2"><?= $viewDatas['title'] ?></th>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['formFields'] as $field => $label): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end bg-light" width="20%"><?= $viewDatas['helper']->getFieldLabel($field, $label, $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['formDatas'][$field] ?? null), $viewDatas) ?>
|
||||
<div><?= validation_show_error($field); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
<div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,25 +0,0 @@
|
||||
<?= $this->extend($viewDatas['layout']['layout']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
|
||||
<div id="container" class="content">
|
||||
<div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="bg-light" colspan="2"><?= $viewDatas['title'] ?></th>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['formFields'] as $field => $label): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end bg-light" width="20%"><?= $viewDatas['helper']->getFieldLabel($field, $label, $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['formDatas'][$field] ?? null), $viewDatas) ?>
|
||||
<div><?= validation_show_error($field); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
<div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,25 +0,0 @@
|
||||
<?= $this->extend($viewDatas['layout']['layout']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?= session('message') ? $viewDatas['helper']->alertTrait(session('message')) : ""; ?>
|
||||
<div id="container" class="content">
|
||||
<div class="form_top"><?= $this->include("{$viewDatas['layout']['template']}/form_content_top"); ?></div>
|
||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="bg-light" colspan="2"><?= $viewDatas['title'] ?></th>
|
||||
</tr>
|
||||
<?php foreach ($viewDatas['formFields'] as $field => $label): ?>
|
||||
<tr>
|
||||
<th nowrap class="text-end bg-light" width="20%"><?= $viewDatas['helper']->getFieldLabel($field, $label, $viewDatas) ?></th>
|
||||
<td nowrap class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['formDatas'][$field] ?? null), $viewDatas) ?>
|
||||
<div><?= validation_show_error($field); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||
<?= form_close(); ?>
|
||||
<div class="form_bottom"><?= $this->include("{$viewDatas['layout']['template']}/form_content_bottom"); ?></div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -12,15 +12,6 @@
|
||||
</td>
|
||||
<td class="layout_right">
|
||||
<!-- Layout Right Start -->
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/banner"); ?>
|
||||
<div class="row align-items-start mt-3">
|
||||
<div class="col-8">
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/total_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/new_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/stock"); ?>
|
||||
</div>
|
||||
<div class="col-4"><?= $this->include("{$viewDatas['layout']['path']}/welcome/mylog"); ?></div>
|
||||
</div>
|
||||
<!-- Layout Right End -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('SETUP') ?>작업내역 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<?= view_cell("\App\Cells\MylogCell::dashboard") ?>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,39 +0,0 @@
|
||||
<div class="layout_header mt-3">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('CHART') ?> 최신 신규 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr class="text-center">
|
||||
<th>사이트</th>
|
||||
<th>업체명</th>
|
||||
<th>
|
||||
<span class="float-start rounded border border-primary" style="cursor:pointer;"
|
||||
onclick="copyServerPartsToClipboard()">ALL 📋</span> 장비번호 / 스위치정보 / IP정보 / CS정보
|
||||
</th>
|
||||
<th>등록자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($viewDatas['newServiceEntities'] as $entity): ?>
|
||||
<?php $viewDatas['entity'] = $entity ?>
|
||||
<tr class="text-center">
|
||||
<td><?= SITES[$entity->getSite()] ?></td>
|
||||
<td nowrap><?= $viewDatas['helper']->getFieldView('clientinfo_uid', $entity->getClientInfoUid(), $viewDatas) ?>
|
||||
</td>
|
||||
<td class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldView('serverinfo_uid', $entity->getServerInfoUid(), $viewDatas) ?></td>
|
||||
<td nowrap><?= $viewDatas['helper']->getFieldView('user_uid', $entity->getUserUid(), $viewDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
<script src="/js/admin/clipboard.js"></script>
|
||||
@ -1,24 +0,0 @@
|
||||
<div class="layout_header" style="margin-top:20px;">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('SETUP') ?>재고현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th class="text-center" width="33%">사용 서버</th>
|
||||
<th class="text-center" width="33%">메모리 재고</th>
|
||||
<th class="text-center">저장장치 재고</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= view_cell("\App\Cells\Equipment\CHASSISCell::stock") ?></td>
|
||||
<td><?= view_cell("\App\Cells\Part\RAMCell::stock") ?></td>
|
||||
<td><?= view_cell("\App\Cells\Part\DISKCell::stock") ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,45 +0,0 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('CHART') ?> 전체 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover table-align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2" class="bg-light">사이트</th>
|
||||
<th colspan="2" class="bg-light">일반</th>
|
||||
<th colspan="2" class="bg-light">방어</th>
|
||||
<th colspan="2" class="bg-light">전용</th>
|
||||
<th colspan="2" class="bg-light">대체</th>
|
||||
<th colspan="2" class="bg-light">VPN</th>
|
||||
<th colspan="2" class="bg-light">이벤트</th>
|
||||
<th colspan="2" class="bg-light">테스트</th>
|
||||
<th colspan="3" class="bg-light">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">합계</th>
|
||||
</tr>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard") ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
4
app/Views/cells/search/client.php
Normal file
4
app/Views/cells/search/client.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?= form_dropdown('client', $searchCellDatas['options'], $searchCellDatas['selected'], [
|
||||
'class' => 'form-select w-auto d-inline-block select-field',
|
||||
'onchange' => "if(this.value) window.location.href='/admin/customer/client/detail/' + this.value;"
|
||||
]) ?>
|
||||
@ -4,7 +4,7 @@
|
||||
<div id="left_menu" onMouseOver="sideMenuToggle(this);" onMouseOut="sideMenuToggle(this);">
|
||||
<div id="accordion" class="accordion accordion-flush">
|
||||
<div class="main">
|
||||
<a href="/admin"><?= icon("HOME") ?> Main</a>
|
||||
<a href="/admin"><?= ICONS['HOME'] ?> Main</a>
|
||||
</div>
|
||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/base'); ?>
|
||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu/board'); ?>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/user"><?= icon('MEMBER') ?> 계정 관리</a>
|
||||
<a href="/admin/user"><?= ICONS['MEMBER'] ?> 계정 관리</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/payment?status=<?= STATUS['UNPAID'] ?>"><?= icon('PAYMENT') ?> 결제내역</a>
|
||||
<a href="/admin/payment?status=<?= STATUS['UNPAID'] ?>"><?= ICONS['PAYMENT'] ?> 결제내역</a>
|
||||
</div>
|
||||
@ -1,13 +1,13 @@
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-board"
|
||||
aria-expanded="true" aria-controls="flush-board"><b><?= icon('FOLDER') ?>게시판관리 </b>
|
||||
aria-expanded="true" aria-controls="flush-board"><b><?= ICONS['FOLDER'] ?>게시판관리 </b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="flush-board" class="accordion-collapse collapse" aria-labelledby="flush-board">
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/board?category=<?= BOARD['CATEGORY']['NOTICE'] ?>"><?= icon('SERVICE_ITEM_LINE') ?>공지사항</a>
|
||||
<a href="/admin/board?category=<?= BOARD['CATEGORY']['NOTICE'] ?>"><?= ICONS['SERVICE_ITEM_LINE'] ?>공지사항</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/board?category=<?= BOARD['CATEGORY']['REQUESTTASK'] ?>"><?= icon('SERVICE_ITEM_SERVER') ?>요청업무</a>
|
||||
<a href="/admin/board?category=<?= BOARD['CATEGORY']['REQUESTTASK'] ?>"><?= ICONS['SERVICE_ITEM_SERVER'] ?>요청업무</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,13 +1,13 @@
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-client"
|
||||
aria-expanded="false" aria-controls="flush-client"><b><?= icon('FOLDER') ?> 고객관리 </b>
|
||||
aria-expanded="false" aria-controls="flush-client"><b><?= ICONS['FOLDER'] ?> 고객관리 </b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="flush-client" class="accordion-collapse collapse" aria-labelledby="flush-client">
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/customer/client"><?= icon('CLIENT') ?>고객정보</a>
|
||||
<a href="/admin/customer/client"><?= ICONS['CLIENT'] ?>고객정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/customer/service"><?= icon('SERVICE') ?> 서비스내역</a>
|
||||
<a href="/admin/customer/service"><?= ICONS['SERVICE'] ?> 서비스내역</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,17 +1,17 @@
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-equipment"
|
||||
aria-expanded="true" aria-controls="flush-equipment"><b><?= icon('FOLDER') ?> 장비관리 </b>
|
||||
aria-expanded="true" aria-controls="flush-equipment"><b><?= ICONS['FOLDER'] ?> 장비관리 </b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="flush-equipment" class="accordion-collapse collapse" aria-labelledby="flush-equipment">
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/line"><?= icon('SERVICE_ITEM_LINE') ?>회선정보</a>
|
||||
<a href="/admin/equipment/line"><?= ICONS['SERVICE_ITEM_LINE'] ?>회선정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/server"><?= icon('SERVICE_ITEM_SERVER') ?>Server정보</a>
|
||||
<a href="/admin/equipment/server"><?= ICONS['SERVICE_ITEM_SERVER'] ?>Server정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/equipment/chassis"><?= icon('SETUP') ?>서버샷시정보</a>
|
||||
<a href="/admin/equipment/chassis"><?= ICONS['SETUP'] ?>서버샷시정보</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -1,28 +1,28 @@
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-part"
|
||||
aria-expanded="true" aria-controls="flush-part"><b><?= icon('FOLDER') ?> 파트관리 </b>
|
||||
aria-expanded="true" aria-controls="flush-part"><b><?= ICONS['FOLDER'] ?> 파트관리 </b>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="flush-part" class="accordion-collapse collapse" aria-labelledby="flush-part">
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/switch"><?= icon('SERVER_ITEM_SWITCH') ?>SWITCH정보</a>
|
||||
<a href="/admin/part/switch"><?= ICONS['SERVER_ITEM_SWITCH'] ?>SWITCH정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/ip"><?= icon('SERVER_ITEM_IP') ?>IP정보</a>
|
||||
<a href="/admin/part/ip"><?= ICONS['SERVER_ITEM_IP'] ?>IP정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/cs"><?= icon('SERVER_ITEM_DEFENCE') ?>CS정보</a>
|
||||
<a href="/admin/part/cs"><?= ICONS['SERVER_ITEM_DEFENCE'] ?>CS정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/cpu"><?= icon('SERVER_ITEM_CPU') ?>CPU정보</a>
|
||||
<a href="/admin/part/cpu"><?= ICONS['SERVER_ITEM_CPU'] ?>CPU정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/ram"><?= icon('SERVER_ITEM_RAM') ?>RAM정보</a>
|
||||
<a href="/admin/part/ram"><?= ICONS['SERVER_ITEM_RAM'] ?>RAM정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/disk"><?= icon('SERVER_ITEM_DISK') ?>DISK정보</a>
|
||||
<a href="/admin/part/disk"><?= ICONS['SERVER_ITEM_DISK'] ?>DISK정보</a>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="/admin/part/software"><?= icon('SERVER_ITEM_SOFTWARE') ?>Software정보</a>
|
||||
<a href="/admin/part/software"><?= ICONS['SERVER_ITEM_SOFTWARE'] ?>Software정보</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -15,7 +15,7 @@
|
||||
<li class="nav-item">
|
||||
<?= form_open("/admin/search", ['method' => 'GET', 'class' => 'd-flex gap-2']) ?>
|
||||
<input type="text" name="keyword" placeholder="고객명/IP/서버명/기타 검색" id="search_keyword" class="form-control" />
|
||||
<button type="submit" class="btn btn-default border border-dark"><?= icon('SEARCH') ?></button>
|
||||
<button type="submit" class="btn btn-default border border-dark"><?= ICONS['SEARCH'] ?></button>
|
||||
<?= form_close(); ?>
|
||||
</li>
|
||||
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||
@ -49,11 +49,12 @@
|
||||
<!-- 🔔 업무요청 영역 -->
|
||||
</li>
|
||||
<li class="nav-item" style="background-color:white; margin-left:20px; font-size:12px;">
|
||||
📋:클립보드COPY , 📌:실서비스서버 , ✔️:대체서버->실서비스서버 교체 , 🔄:대체서버등록 , <?= icon('MONTH') ?>:월비용 ,
|
||||
<?= icon('ONETIME') ?>:일회성<BR>
|
||||
<?= icon('SERVER_ITEM_SWITCH') ?>:스위치 , <?= icon('SERVER_ITEM_IP') ?>:IP , <?= icon('SERVER_ITEM_OS') ?>:OS ,
|
||||
<?= icon('SERVER_ITEM_SOFTWARE') ?>:소프트웨어 , <?= icon('SERVER_ITEM_DEFENCE') ?>:CS ,
|
||||
<?= icon('SERVER_ITEM_CPU') ?>:CPU , <?= icon('SERVER_ITEM_RAM') ?>:RAM , <?= icon('SERVER_ITEM_DISK') ?>:DISK
|
||||
📋:클립보드COPY , 📌:실서비스서버 , ✔️:대체서버->실서비스서버 교체 , 🔄:대체서버등록 , <?= ICONS['MONTH'] ?>:월비용 ,
|
||||
<?= ICONS['ONETIME'] ?>:일회성<BR>
|
||||
<?= ICONS['SERVER_ITEM_SWITCH'] ?>:스위치 , <?= ICONS['SERVER_ITEM_IP'] ?>:IP , <?= ICONS['SERVER_ITEM_OS'] ?>:OS ,
|
||||
<?= ICONS['SERVER_ITEM_SOFTWARE'] ?>:소프트웨어 , <?= ICONS['SERVER_ITEM_DEFENCE'] ?>:CS ,
|
||||
<?= ICONS['SERVER_ITEM_CPU'] ?>:CPU , <?= ICONS['SERVER_ITEM_RAM'] ?>:RAM ,
|
||||
<?= ICONS['SERVER_ITEM_DISK'] ?>:DISK
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav justify-content-end">
|
||||
@ -62,11 +63,11 @@
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<b><?= icon('LOGIN') . $viewDatas['authContext']->getName() ?></b>
|
||||
<b><?= ICONS['LOGIN'] . $viewDatas['authContext']->getName() ?></b>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><?= form_label(
|
||||
icon('SETUP') . "정보수정",
|
||||
ICONS['SETUP'] . "정보수정",
|
||||
"modify",
|
||||
[
|
||||
"class" => "dropdown-item form-label-sm",
|
||||
@ -78,11 +79,11 @@
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="<?= URLS['LOGOUT'] ?>"><?= icon('LOGOUT') ?>Logout</a></li>
|
||||
<li><a class="dropdown-item" href="<?= URLS['LOGOUT'] ?>"><?= ICONS['LOGOUT'] ?>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<a class="nav-link dropdown-toggle" href="<?= URLS['LOGIN'] ?>" role="button"><?= icon('LOGIN') ?>Login</a>
|
||||
<a class="nav-link dropdown-toggle" href="<?= URLS['LOGIN'] ?>" role="button"><?= ICONS['LOGIN'] ?>Login</a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -1,115 +0,0 @@
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.card-clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dashboard-card {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bg-blue {
|
||||
background-color: #337ab7;
|
||||
}
|
||||
|
||||
.bg-yellow {
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.bg-green {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.bg-red {
|
||||
background-color: #d9534f;
|
||||
}
|
||||
|
||||
.card-footer a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.card-footer .fa {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.fa-5x {
|
||||
font-size: 4em;
|
||||
}
|
||||
|
||||
.huge {
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.bg-detail {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.bg-detail .bg_blue_font {
|
||||
color: #337ab7;
|
||||
}
|
||||
|
||||
.bg-detail .bg_yellow_font {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.bg-detail .bg_green_font {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.bg-detail .bg_red_font {
|
||||
color: #d9534f;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-blue card-clickable" onclick="document.location.href='/admin/board?category=<?= BOARD['CATEGORY']['REQUESTTASK'] ?>&worker_uid=<?= $viewDatas['authContext']->getUID() ?>';">
|
||||
<div class=" card-body">
|
||||
<div class="row">
|
||||
<div class="col-4"><i class="fa fa-comments fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge"><?= $viewDatas['boardRequestTaskCount'] ?></div>
|
||||
<div class="bg-blue">요청업무 알림</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_blue_font">자세히보기</span><i class="fa fa-arrow-circle-right bg_blue_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-yellow card-clickable" onclick="document.location.href='/admin/customer/service';">
|
||||
<div class=" card-body">
|
||||
<div class="row">
|
||||
<div class="col-4"><i class="fa fa-plus-square-o fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge"><?= $viewDatas['newServiceCount'] ?></div>
|
||||
<div>최근 <?= $viewDatas['interval'] ?>일간 신규서버수</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<span class="bg_yellow_font">자세히보기</span><i class="fa fa-arrow-circle-right bg_yellow_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg">
|
||||
<div class="card dashboard-card bg-red card-clickable" onclick="document.location.href='/admin/payment'">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4"><i class="fa fa-support fa-5x"></i></div>
|
||||
<div class="col-8 text-end">
|
||||
<div class="huge"><?= number_format($viewDatas['unPaidTotalCount']) ?>건/<?= number_format($viewDatas['unPaidTotalAmount']) ?>원</div>
|
||||
<div><?= date("Y-m-d") ?> 금일 기준 미납 서비스</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between align-items-center bg-detail">
|
||||
<a href="/admin/payment"><span class=" bg_red_font">자세히보기</span></a><i class="fa fa-arrow-circle-right bg_red_font"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,31 +0,0 @@
|
||||
<?= $this->extend($viewDatas['layout']['layout']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<!-- Layout Middle Start -->
|
||||
<div class="layout_top"><?= $this->include($viewDatas['layout']['layout'] . '/top'); ?></div>
|
||||
<!-- Layout Middle Start -->
|
||||
<table class="layout_middle">
|
||||
<tr>
|
||||
<td class="layout_left">
|
||||
<!-- Layout Left Start -->
|
||||
<?= $this->include($viewDatas['layout']['layout'] . '/left_menu'); ?>
|
||||
<!-- Layout Left End -->
|
||||
</td>
|
||||
<td class="layout_right">
|
||||
<!-- Layout Right Start -->
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/banner"); ?>
|
||||
<div class="row align-items-start mt-3">
|
||||
<div class="col-8">
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/total_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/new_service"); ?>
|
||||
<?= $this->include("{$viewDatas['layout']['path']}/welcome/stock"); ?>
|
||||
</div>
|
||||
<div class="col-4"><?= $this->include("{$viewDatas['layout']['path']}/welcome/mylog"); ?></div>
|
||||
</div>
|
||||
<!-- Layout Right End -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Layout Middle End -->
|
||||
<div class=" layout_footer"><?= $this->include("{$viewDatas['layout']['template']}/index_footer"); ?></div>
|
||||
<div class="layout_bottom"><?= $this->include($viewDatas['layout']['layout'] . '/bottom'); ?></div>
|
||||
<?= $this->endSection() ?>
|
||||
@ -1,13 +0,0 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('SETUP') ?>작업내역 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<?= view_cell("\App\Cells\MylogCell::dashboard") ?>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,39 +0,0 @@
|
||||
<div class="layout_header mt-3">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('CHART') ?> 최신 신규 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr class="text-center">
|
||||
<th>사이트</th>
|
||||
<th>업체명</th>
|
||||
<th>
|
||||
<span class="float-start rounded border border-primary" style="cursor:pointer;"
|
||||
onclick="copyServerPartsToClipboard()">ALL 📋</span> 장비번호 / 스위치정보 / IP정보 / CS정보
|
||||
</th>
|
||||
<th>등록자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($viewDatas['newServiceEntities'] as $entity): ?>
|
||||
<?php $viewDatas['entity'] = $entity ?>
|
||||
<tr class="text-center">
|
||||
<td><?= SITES[$entity->getSite()] ?></td>
|
||||
<td nowrap><?= $viewDatas['helper']->getFieldView('clientinfo_uid', $entity->getClientInfoUid(), $viewDatas) ?>
|
||||
</td>
|
||||
<td class="text-start">
|
||||
<?= $viewDatas['helper']->getFieldView('serverinfo_uid', $entity->getServerInfoUid(), $viewDatas) ?></td>
|
||||
<td nowrap><?= $viewDatas['helper']->getFieldView('user_uid', $entity->getUserUid(), $viewDatas) ?></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
<script src="/js/admin/clipboard.js"></script>
|
||||
@ -1,24 +0,0 @@
|
||||
<div class="layout_header" style="margin-top:20px;">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('SETUP') ?>재고현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tr>
|
||||
<th class="text-center" width="33%">사용 서버</th>
|
||||
<th class="text-center" width="33%">메모리 재고</th>
|
||||
<th class="text-center">저장장치 재고</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= view_cell("\App\Cells\Equipment\CHASSISCell::stock") ?></td>
|
||||
<td><?= view_cell("\App\Cells\Part\RAMCell::stock") ?></td>
|
||||
<td><?= view_cell("\App\Cells\Part\DISKCell::stock") ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -1,45 +0,0 @@
|
||||
<div class="layout_header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('CHART') ?> 전체 서비스 현황 </h4>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="border-left: 1px solid black; border-right: 1px solid black; padding:20px;">
|
||||
<table class="table table-bordered table-hover table-align-middle">
|
||||
<tr class="text-center">
|
||||
<th rowspan="2" class="bg-light">사이트</th>
|
||||
<th colspan="2" class="bg-light">일반</th>
|
||||
<th colspan="2" class="bg-light">방어</th>
|
||||
<th colspan="2" class="bg-light">전용</th>
|
||||
<th colspan="2" class="bg-light">대체</th>
|
||||
<th colspan="2" class="bg-light">VPN</th>
|
||||
<th colspan="2" class="bg-light">이벤트</th>
|
||||
<th colspan="2" class="bg-light">테스트</th>
|
||||
<th colspan="3" class="bg-light">합계</th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">도쿄</th>
|
||||
<th class="bg-light">치바</th>
|
||||
<th class="bg-light">합계</th>
|
||||
</tr>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerCell::totalCountDashboard") ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layout_footer"></div>
|
||||
@ -4,7 +4,7 @@
|
||||
<nav class="nav"><a class="navbar-brand" href="#">사용자페이지</a></nav>
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item">
|
||||
<?= icon('LOCK') ?>
|
||||
<?= ICONS['LOCK'] ?>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@ -14,11 +14,11 @@
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<b><?= icon('LOGIN') . $viewDatas['authContext']->getName() ?></b>
|
||||
<b><?= ICONS['LOGIN'] . $viewDatas['authContext']->getName() ?></b>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><?= form_label(
|
||||
icon('SETUP') . "정보수정",
|
||||
ICONS['SETUP'] . "정보수정",
|
||||
"modify",
|
||||
[
|
||||
"class" => "dropdown-item form-label-sm",
|
||||
@ -30,11 +30,11 @@
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="<?= URLS['LOGOUT'] ?>"><?= icon('LOGOUT') ?>Logout</a></li>
|
||||
<li><a class="dropdown-item" href="<?= URLS['LOGOUT'] ?>"><?= ICONS['LOGOUT'] ?>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<a class="nav-link dropdown-toggle" href="<?= URLS['LOGIN'] ?>" role="button"><?= icon('LOGIN') ?>Login</a>
|
||||
<a class="nav-link dropdown-toggle" href="<?= URLS['LOGIN'] ?>" role="button"><?= ICONS['LOGIN'] ?>Login</a>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
검색일:<?= form_input('index_start', $viewDatas['index_start'] ?? "", ["class" => "calender"]) ?>~<?= form_input('index_end', $viewDatas['index_end'] ?? "", ["class" => "calender"]) ?>
|
||||
<button class="btn btn-outline-primary" type="submit">검색</button>
|
||||
<?php $queryString = $_SERVER['QUERY_STRING'] ?? ''; ?>
|
||||
<?= anchor(current_url() . '/download/excel' . ($queryString ? '?' . $queryString : ''), icon('EXCEL'), ["target" => "_self", "class" => "excel"]) ?>
|
||||
<?= anchor(current_url() . '/download/excel' . ($queryString ? '?' . $queryString : ''), ICONS['EXCEL'], ["target" => "_self", "class" => "excel"]) ?>
|
||||
</nav>
|
||||
<nav class="pageinfo nav justify-content-end">
|
||||
Page:<?= $viewDatas['page'] ?? 1 ?>/<?= $viewDatas['index_totalpage'] ?>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= \App\Helpers\IconHelper::icon('DESKTOP') ?> <?= $viewDatas['title'] ?? "" ?> </h4>
|
||||
<h4> <?= \App\Helpers\IconHelper::ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?? "" ?> </h4>
|
||||
</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal_label">
|
||||
<?= icon('DESKTOP') ?> <?= $viewDatas['content_title'] ?>
|
||||
<?= ICONS['DESKTOP'] ?> <?= $viewDatas['content_title'] ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal_label">
|
||||
<?= icon('DESKTOP') ?> <?= $viewDatas['content_title'] ?>
|
||||
<?= ICONS['DESKTOP'] ?> <?= $viewDatas['content_title'] ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="iframe_modal_label">
|
||||
<?= icon('DESKTOP') ?> <?= $viewDatas['title'] ?? "" ?>
|
||||
<?= ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?? "" ?>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
|
||||
onClick="window.location.reload()"></button>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<span class="nav-item navbar-brand" aria-current="page">
|
||||
<h4> <?= icon('DESKTOP') ?> <?= $viewDatas['content_title'] ?> </h4>
|
||||
<h4> <?= ICONS['DESKTOP'] ?> <?= $viewDatas['content_title'] ?> </h4>
|
||||
</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user