cfmgrv4 init...4

This commit is contained in:
최준흠 2024-10-08 19:49:50 +09:00
parent 14ab73fdc0
commit f685c863c2
6 changed files with 32 additions and 31 deletions

View File

@ -12,7 +12,7 @@ abstract class AdminController extends MVController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{ {
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
$this->layout = "admin"; $this->layout = "admin";
$this->uri_path = "admin/"; $this->uri_path = "admin/";
$this->view_path = "admin/"; $this->view_path = "admin/";
} }

View File

@ -19,8 +19,8 @@ class MapurlController extends AdminController
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
$this->class_name .= "Mapurl"; $this->class_name .= "Mapurl";
$this->class_path .= $this->class_name; $this->class_path .= $this->class_name;
$this->title = lang("{$this->class_path}.title"); $this->title = lang("{$this->class_path}.title");
$this->helper = new MapurlHelper(); $this->helper = new MapurlHelper();
} }
protected function getModel(): MapurlModel protected function getModel(): MapurlModel
{ {
@ -49,11 +49,11 @@ class MapurlController extends AdminController
} }
private function init(string $action): void private function init(string $action): void
{ {
$this->action = $action; $this->action = $action;
$this->fields = [$this->getModel()::TITLE, 'newurl', 'status']; $this->fields = [$this->getModel()::TITLE, 'newurl', 'status'];
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
$this->filter_fields = ['status']; $this->filter_fields = ['status'];
$this->field_options = $this->getFormFieldOptions($this->filter_fields); $this->field_options = $this->getFormFieldOptions($this->filter_fields);
} }
private function remaping_process(): void private function remaping_process(): void
{ {
@ -61,7 +61,7 @@ class MapurlController extends AdminController
$this->getModel()->where('status', DEFAULTS['STATUS']); $this->getModel()->where('status', DEFAULTS['STATUS']);
$this->getModel()->orderBy('oldurl', 'ASC'); $this->getModel()->orderBy('oldurl', 'ASC');
$this->entitys = $this->getModel()->getEntitys(); $this->entitys = $this->getModel()->getEntitys();
$remap_page = view($this->class_path . DIRECTORY_SEPARATOR . 'remap_template', ["viewDatas" => $this->getViewDatas()]); $remap_page = view($this->view_path . DIRECTORY_SEPARATOR . strtolower($this->class_path) . DIRECTORY_SEPARATOR . 'remap_template', ["viewDatas" => $this->getViewDatas()]);
$remap_path = FCPATH . DIRECTORY_SEPARATOR . "mapurl"; $remap_path = FCPATH . DIRECTORY_SEPARATOR . "mapurl";
//디렉토리 생성 여부 확인 //디렉토리 생성 여부 확인
if (!is_dir($remap_path)) { if (!is_dir($remap_path)) {
@ -108,9 +108,9 @@ class MapurlController extends AdminController
//일괄처리작업 //일괄처리작업
public function batcjob(): RedirectResponse public function batcjob(): RedirectResponse
{ {
$this->action = __FUNCTION__; $this->action = __FUNCTION__;
$this->fields = ['status']; $this->fields = ['status'];
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
return $this->batcjob_procedure(); return $this->batcjob_procedure();
} }
//삭제 //삭제
@ -122,11 +122,11 @@ class MapurlController extends AdminController
// 리스트 // 리스트
public function index(): string public function index(): string
{ {
$this->action = __FUNCTION__; $this->action = __FUNCTION__;
$this->fields = [$this->getModel()::TITLE, 'newurl', 'status']; $this->fields = [$this->getModel()::TITLE, 'newurl', 'status'];
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
$this->filter_fields = ['status']; $this->filter_fields = ['status'];
$this->field_options = $this->getFormFieldOptions($this->filter_fields); $this->field_options = $this->getFormFieldOptions($this->filter_fields);
$this->batchjob_fields = ['status']; $this->batchjob_fields = ['status'];
return $this->list_procedure(); return $this->list_procedure();
} }
@ -134,11 +134,11 @@ class MapurlController extends AdminController
// Download // Download
public function download(string $output_type, $uid = false): DownloadResponse|string public function download(string $output_type, $uid = false): DownloadResponse|string
{ {
$this->action = __FUNCTION__; $this->action = __FUNCTION__;
$this->fields = [$this->getModel()::TITLE, 'newurl', 'status']; $this->fields = [$this->getModel()::TITLE, 'newurl', 'status'];
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
$this->filter_fields = ['status']; $this->filter_fields = ['status'];
$this->field_options = $this->getFormFieldOptions($this->filter_fields); $this->field_options = $this->getFormFieldOptions($this->filter_fields);
$this->batchjob_fields = ['status']; $this->batchjob_fields = ['status'];
return $this->download_procedure($output_type, $uid); return $this->download_procedure($output_type, $uid);
} }

View File

@ -12,7 +12,7 @@ abstract class FrontController extends MVController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{ {
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
$this->layout = "front"; $this->layout = "front";
$this->uri_path = "front/"; $this->uri_path = "front/";
$this->view_path = "front/"; $this->view_path = "front/";
} }

View File

@ -18,6 +18,7 @@ abstract class MVController extends CommonController
{ {
parent::initController($request, $response, $logger); parent::initController($request, $response, $logger);
$this->session = service('session'); $this->session = service('session');
$this->class_path = "";
} }
abstract protected function getModel(): mixed; abstract protected function getModel(): mixed;
//Field별 Form Rule용 //Field별 Form Rule용

View File

@ -8,7 +8,7 @@
<body> <body>
<script type="text/javascript" charset="UTF-8"> <script type="text/javascript" charset="UTF-8">
window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? (':' + window.location.port) : ''); window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? (':' + window.location.port) : '');
<?= getRemapPage_MapurlHelper($viewDatas) ?> <?= $viewDatas['helper']->getRemapPage($viewDatas) ?>
</script> </script>
</body> </body>

View File

@ -263,7 +263,6 @@ case 'http://19hey.com': window.location.href='http://1004eve.com'; break;
case 'http://19hun.com': window.location.href='http://1004eve.com'; break; case 'http://19hun.com': window.location.href='http://1004eve.com'; break;
case 'http://19hunt.com': window.location.href='https://twitter.com/_19hunter'; break; case 'http://19hunt.com': window.location.href='https://twitter.com/_19hunter'; break;
case 'http://19hunter.com': window.location.href='https://twitter.com/_19hunter'; break; case 'http://19hunter.com': window.location.href='https://twitter.com/_19hunter'; break;
case 'http://19hunters.com': window.location.href='https://twitter.com/_19hunter333'; break;
case 'http://19hunts.com': window.location.href='https://twitter.com/_19hunter'; break; case 'http://19hunts.com': window.location.href='https://twitter.com/_19hunter'; break;
case 'http://19kor.com': window.location.href='https://twitter.com/_19hunter'; break; case 'http://19kor.com': window.location.href='https://twitter.com/_19hunter'; break;
case 'http://19mini.com': window.location.href='https://twitter.com/_19hunter'; break; case 'http://19mini.com': window.location.href='https://twitter.com/_19hunter'; break;
@ -1417,7 +1416,6 @@ case 'http://tc-79.com': window.location.href='http://mgmg55.com'; break;
case 'http://te300ny.com': window.location.href='https://sam100kr.com'; break; case 'http://te300ny.com': window.location.href='https://sam100kr.com'; break;
case 'http://telm247.com': window.location.href='http://shot88-k77.com'; break; case 'http://telm247.com': window.location.href='http://shot88-k77.com'; break;
case 'http://tesdm.com': window.location.href='http://naver.com'; break; case 'http://tesdm.com': window.location.href='http://naver.com'; break;
case 'http://test.co.kr': window.location.href='https://test1.co.kr'; break;
case 'http://test1.co.kr': window.location.href='https://ttt.com'; break; case 'http://test1.co.kr': window.location.href='https://ttt.com'; break;
case 'http://test2.co.kr': window.location.href='https://ttt.com'; break; case 'http://test2.co.kr': window.location.href='https://ttt.com'; break;
case 'http://tf-24.com': window.location.href='http://nt-2424.com'; break; case 'http://tf-24.com': window.location.href='http://nt-2424.com'; break;
@ -2529,6 +2527,7 @@ case 'https://te300ny.com': window.location.href='https://sam100kr.com'; break;
case 'https://to01mix.com': window.location.href='https://to02mix.com'; break; case 'https://to01mix.com': window.location.href='https://to02mix.com'; break;
case 'https://todal1.com': window.location.href='http://torrentdal1.net'; break; case 'https://todal1.com': window.location.href='http://torrentdal1.net'; break;
case 'https://top88ml.com': window.location.href='https://man247y.net'; break; case 'https://top88ml.com': window.location.href='https://man247y.net'; break;
case 'https://torrentdal.com': window.location.href='http://torrentdal1.net'; break;
case 'https://torrentdal1.com': window.location.href='http://torrentdal1.net'; break; case 'https://torrentdal1.com': window.location.href='http://torrentdal1.net'; break;
case 'https://tp2za.com': window.location.href='http://skyt-666.com'; break; case 'https://tp2za.com': window.location.href='http://skyt-666.com'; break;
case 'https://tvu7.com': window.location.href='https://pay-111.com'; break; case 'https://tvu7.com': window.location.href='https://pay-111.com'; break;
@ -2619,6 +2618,7 @@ case 'https://www.sm-8282.com': window.location.href='https://www.sm-5252.com';
case 'https://www.ss-sss10.com': window.location.href='https://www.sss-sss100.com'; break; case 'https://www.ss-sss10.com': window.location.href='https://www.sss-sss100.com'; break;
case 'https://www.to01mix.com': window.location.href='https://www.to02mix.com'; break; case 'https://www.to01mix.com': window.location.href='https://www.to02mix.com'; break;
case 'https://www.todal1.com': window.location.href='http://torrentdal1.net'; break; case 'https://www.todal1.com': window.location.href='http://torrentdal1.net'; break;
case 'https://www.torrentdal.com': window.location.href='http://torrentdal1.net'; break;
case 'https://www.torrentdal1.com': window.location.href='http://torrentdal1.net'; break; case 'https://www.torrentdal1.com': window.location.href='http://torrentdal1.net'; break;
case 'https://www.tp2za.com': window.location.href='http://skyt-666.com'; break; case 'https://www.tp2za.com': window.location.href='http://skyt-666.com'; break;
case 'https://www.tvu7.com': window.location.href='https://www.pay-111.com'; break; case 'https://www.tvu7.com': window.location.href='https://www.pay-111.com'; break;