cfmgrv4 init...1
This commit is contained in:
parent
cf0d205f75
commit
2b5c8de10a
@ -62,7 +62,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou
|
|||||||
$routes->group('zone', function ($routes) {
|
$routes->group('zone', function ($routes) {
|
||||||
$routes->get('/', 'ZoneController::index');
|
$routes->get('/', 'ZoneController::index');
|
||||||
$routes->get('create', 'ZoneController::create_form');
|
$routes->get('create', 'ZoneController::create_form');
|
||||||
$routes->post('create/(:uuid)', 'ZoneController::create/$1');
|
$routes->post('create', 'ZoneController::create');
|
||||||
$routes->get('delete/(:uuid)', 'ZoneController::delete/$1');
|
$routes->get('delete/(:uuid)', 'ZoneController::delete/$1');
|
||||||
$routes->get('toggle/(:uuid)/(:alpha)', 'ZoneController::toggle/$1/$2');
|
$routes->get('toggle/(:uuid)/(:alpha)', 'ZoneController::toggle/$1/$2');
|
||||||
$routes->post('batchjob', 'ZoneController::batcjob');
|
$routes->post('batchjob', 'ZoneController::batcjob');
|
||||||
@ -72,7 +72,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin'], function ($rou
|
|||||||
$routes->group('record', function ($routes) {
|
$routes->group('record', function ($routes) {
|
||||||
$routes->get('/', 'RecordController::index');
|
$routes->get('/', 'RecordController::index');
|
||||||
$routes->get('create', 'RecordController::create_form');
|
$routes->get('create', 'RecordController::create_form');
|
||||||
$routes->post('create/(:uuid)', 'RecordController::create/$1');
|
$routes->post('create)', 'RecordController::create');
|
||||||
$routes->get('delete/(:uuid)', 'RecordController::delete/$1');
|
$routes->get('delete/(:uuid)', 'RecordController::delete/$1');
|
||||||
$routes->get('toggle/(:uuid)/(:alpha)', 'RecordController::toggle/$1/$2');
|
$routes->get('toggle/(:uuid)/(:alpha)', 'RecordController::toggle/$1/$2');
|
||||||
$routes->post('batchjob', 'RecordController::batcjob');
|
$routes->post('batchjob', 'RecordController::batcjob');
|
||||||
|
|||||||
@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
namespace App\Controllers\Admin\Cloudflare;
|
namespace App\Controllers\Admin\Cloudflare;
|
||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
|
||||||
use App\Models\Cloudflare\AccountModel;
|
|
||||||
use App\Libraries\MySocket\Cloudflare\ZoneSocket;
|
|
||||||
use App\Libraries\MySocket\Cloudflare\AccountSocket;
|
use App\Libraries\MySocket\Cloudflare\AccountSocket;
|
||||||
|
use App\Libraries\MySocket\Cloudflare\ZoneSocket;
|
||||||
|
use App\Models\Cloudflare\AccountModel;
|
||||||
|
use CodeIgniter\HTTP\DownloadResponse;
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class AccountController extends CloudflareController
|
class AccountController extends CloudflareController
|
||||||
{
|
{
|
||||||
@ -63,6 +64,17 @@ class AccountController extends CloudflareController
|
|||||||
$this->batchjob_fields = ['typep', 'status'];
|
$this->batchjob_fields = ['typep', 'status'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
|
// Download
|
||||||
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
|
{
|
||||||
|
$this->action = __FUNCTION__;
|
||||||
|
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'type', 'status', 'updated_at', 'created_at'];
|
||||||
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
|
$this->filter_fields = [$this->getModel()::PARENT, 'type', 'status'];
|
||||||
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
|
$this->batchjob_fields = ['typep', 'status'];
|
||||||
|
return $this->download_procedure($output_type, $uid);
|
||||||
|
}
|
||||||
//Zone Reload By Account
|
//Zone Reload By Account
|
||||||
protected function reload_process(): void
|
protected function reload_process(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Controllers\Admin\Cloudflare;
|
namespace App\Controllers\Admin\Cloudflare;
|
||||||
|
|
||||||
use Psr\Log\LoggerInterface;
|
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
|
||||||
use App\Models\Cloudflare\AuthModel;
|
|
||||||
use App\Libraries\MySocket\Cloudflare\AccountSocket;
|
use App\Libraries\MySocket\Cloudflare\AccountSocket;
|
||||||
|
use App\Models\Cloudflare\AuthModel;
|
||||||
|
use CodeIgniter\HTTP\DownloadResponse;
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
class AuthController extends CloudflareController
|
class AuthController extends CloudflareController
|
||||||
{
|
{
|
||||||
@ -30,7 +31,7 @@ class AuthController extends CloudflareController
|
|||||||
private function init(string $action): void
|
private function init(string $action): void
|
||||||
{
|
{
|
||||||
$this->action = $action;
|
$this->action = $action;
|
||||||
$this->fields = [$this->getModel()::TITLE, 'authkey'];
|
$this->fields = [$this->getModel()::TITLE, 'authkey', '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);
|
||||||
@ -76,6 +77,17 @@ class AuthController extends CloudflareController
|
|||||||
$this->batchjob_fields = ['status'];
|
$this->batchjob_fields = ['status'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
|
// Download
|
||||||
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
|
{
|
||||||
|
$this->action = __FUNCTION__;
|
||||||
|
$this->fields = [$this->getModel()::TITLE, 'oldkey', 'status', 'updated_at', 'created_at'];
|
||||||
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
|
$this->filter_fields = ['status'];
|
||||||
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
|
$this->batchjob_fields = ['status'];
|
||||||
|
return $this->download_procedure($output_type, $uid);
|
||||||
|
}
|
||||||
//Account Reload by Auth
|
//Account Reload by Auth
|
||||||
protected function reload_process(): void
|
protected function reload_process(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace App\Controllers\Admin\Cloudflare;
|
|||||||
|
|
||||||
use App\Libraries\MySocket\Cloudflare\RecordSocket;
|
use App\Libraries\MySocket\Cloudflare\RecordSocket;
|
||||||
use App\Models\Cloudflare\RecordModel;
|
use App\Models\Cloudflare\RecordModel;
|
||||||
|
use CodeIgniter\HTTP\DownloadResponse;
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
@ -158,4 +159,15 @@ class RecordController extends CloudflareController
|
|||||||
$this->batchjob_fields = ['proxied'];
|
$this->batchjob_fields = ['proxied'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
|
// Download
|
||||||
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
|
{
|
||||||
|
$this->action = __FUNCTION__;
|
||||||
|
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'type', 'content', 'ttl', 'proxied', 'locked', 'updated_at', 'created_at'];
|
||||||
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
|
$this->filter_fields = [$this->getModel()::PARENT, 'type', 'proxied'];
|
||||||
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
|
$this->batchjob_fields = ['proxied'];
|
||||||
|
return $this->download_procedure($output_type, $uid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ namespace App\Controllers\Admin\Cloudflare;
|
|||||||
use App\Libraries\MySocket\Cloudflare\RecordSocket;
|
use App\Libraries\MySocket\Cloudflare\RecordSocket;
|
||||||
use App\Libraries\MySocket\Cloudflare\ZoneSocket;
|
use App\Libraries\MySocket\Cloudflare\ZoneSocket;
|
||||||
use App\Models\Cloudflare\ZoneModel;
|
use App\Models\Cloudflare\ZoneModel;
|
||||||
|
use CodeIgniter\HTTP\DownloadResponse;
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
@ -201,6 +202,17 @@ class ZoneController extends CloudflareController
|
|||||||
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
|
// Download
|
||||||
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
|
{
|
||||||
|
$this->action = __FUNCTION__;
|
||||||
|
$this->fields = [$this->getModel()::PARENT, $this->getModel()::TITLE, 'name_servers', 'original_name_servers', 'plan', 'development_mode', 'ipv6', 'security_level', 'status', 'updated_at', 'created_at'];
|
||||||
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
|
$this->filter_fields = [$this->getModel()::PARENT, 'development_mode', 'ipv6', 'security_level'];
|
||||||
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
|
$this->batchjob_fields = ['development_mode', 'ipv6', 'security_level'];
|
||||||
|
return $this->download_procedure($output_type, $uid);
|
||||||
|
}
|
||||||
//reload Record By Zone
|
//reload Record By Zone
|
||||||
protected function reload_process(): void
|
protected function reload_process(): void
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,8 +3,9 @@
|
|||||||
namespace App\Controllers\Admin;
|
namespace App\Controllers\Admin;
|
||||||
|
|
||||||
use App\Models\MapurlModel;
|
use App\Models\MapurlModel;
|
||||||
use CodeIgniter\HTTP\RedirectResponse;
|
use CodeIgniter\HTTP\DownloadResponse;
|
||||||
|
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@ -128,4 +129,16 @@ class MapurlController extends AdminController
|
|||||||
$this->batchjob_fields = ['status'];
|
$this->batchjob_fields = ['status'];
|
||||||
return $this->list_procedure();
|
return $this->list_procedure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Download
|
||||||
|
public function download(string $output_type, $uid = false): DownloadResponse|string
|
||||||
|
{
|
||||||
|
$this->action = __FUNCTION__;
|
||||||
|
$this->fields = [$this->getModel()::TITLE, 'newurl', 'status'];
|
||||||
|
$this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields);
|
||||||
|
$this->filter_fields = ['status'];
|
||||||
|
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||||
|
$this->batchjob_fields = ['status'];
|
||||||
|
return $this->download_procedure($output_type, $uid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -429,7 +429,7 @@ abstract class MVController extends CommonController
|
|||||||
// string buffer에서 읽어오는 경우
|
// string buffer에서 읽어오는 경우
|
||||||
$this->entitys = $this->list_entitys_process();
|
$this->entitys = $this->list_entitys_process();
|
||||||
$html = view(
|
$html = view(
|
||||||
strtolower($this->class_path) . DIRECTORY_SEPARATOR . $this->action,
|
'templates' . DIRECTORY_SEPARATOR . $this->action,
|
||||||
['viewDatas' => $this->getViewDatas()]
|
['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
//data loading
|
//data loading
|
||||||
|
|||||||
@ -106,16 +106,16 @@ function getFieldView_AccountHelper(string $field, AccountEntity $entity, array
|
|||||||
$value = $value ? date("Y-m-d", strtotime($value)) : "";
|
$value = $value ? date("Y-m-d", strtotime($value)) : "";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (in_array($field, $viewDatas['filter_fields']) && $value) {
|
// if (in_array($field, $viewDatas['filter_fields']) && $value) {
|
||||||
$extras["onChange"] = sprintf(
|
// $extras["onChange"] = sprintf(
|
||||||
'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
// 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
||||||
current_url(),
|
// current_url(),
|
||||||
$entity->getPK(),
|
// $entity->getPK(),
|
||||||
$field,
|
// $field,
|
||||||
$field
|
// $field
|
||||||
);
|
// );
|
||||||
$value = getFieldForm_AccountHelper($field, $entity->$field, $viewDatas, $extras);
|
// $value = getFieldForm_AccountHelper($field, $entity->$field, $viewDatas, $extras);
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
|
|||||||
@ -88,6 +88,53 @@ function getFieldView_AuthHelper(string $field, AuthEntity $entity, array $viewD
|
|||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
} //
|
} //
|
||||||
|
function getListAction_AuthHelper(string $action, $entity, array $viewDatas, array $extras = []): string
|
||||||
|
{
|
||||||
|
switch ($action) {
|
||||||
|
case 'modify':
|
||||||
|
$cnt = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $extras['cnt']);
|
||||||
|
$checkbox = form_checkbox([
|
||||||
|
"id" => "checkbox_uid_{$entity->getPK()}",
|
||||||
|
"name" => "batchjob_uids[]",
|
||||||
|
"value" => $entity->getPK(),
|
||||||
|
"class" => "batchjobuids_checkboxs"
|
||||||
|
]);
|
||||||
|
$url = current_url() . '/' . $action . '/' . $entity->getPK();
|
||||||
|
switch ($viewDatas['action_form']) {
|
||||||
|
case FORMS['MODAL']:
|
||||||
|
$value = form_label(
|
||||||
|
$cnt,
|
||||||
|
"",
|
||||||
|
[
|
||||||
|
"data-src" => $url,
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#index_action_form",
|
||||||
|
...$extras
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case FORMS['IFRAME']:
|
||||||
|
$value = form_label($cnt, "", [
|
||||||
|
"onClick" => "changeIframe_src('{$url}')",
|
||||||
|
...$extras
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$value = anchor($url, $cnt, $extras);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$result = $checkbox . $value;
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$result = anchor(
|
||||||
|
current_url() . '/delete/' . $entity->getPK(),
|
||||||
|
ICONS['DELETE'],
|
||||||
|
["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
function getListColumns_AuthHelper(string $field, array $viewDatas, array $extras = []): string
|
function getListColumns_AuthHelper(string $field, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
$label = getFieldLabel_AuthHelper($field, $viewDatas, $extras);
|
$label = getFieldLabel_AuthHelper($field, $viewDatas, $extras);
|
||||||
|
|||||||
@ -118,6 +118,34 @@ function getFieldView_RecordHelper(string $field, RecordEntity $entity, array $v
|
|||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
} //
|
} //
|
||||||
|
function getListAction_RecordHelper(string $action, $entity, array $viewDatas, array $extras = []): string
|
||||||
|
{
|
||||||
|
switch ($action) {
|
||||||
|
case 'sync':
|
||||||
|
$cnt = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $extras['cnt']);
|
||||||
|
$checkbox = "";
|
||||||
|
if ($entity->fixed == 'off' && $entity->type == 'A') {
|
||||||
|
$checkbox = form_checkbox([
|
||||||
|
"id" => "checkbox_uid_{$entity->getPK()}",
|
||||||
|
"name" => "batchjob_uids[]",
|
||||||
|
"value" => $entity->getPK(),
|
||||||
|
"class" => "batchjobuids_checkboxs",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$url = current_url() . '/' . $action . '/' . $entity->getPK();
|
||||||
|
$value = anchor($url, $cnt, $extras);
|
||||||
|
$result = $checkbox . $value;
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$result = anchor(
|
||||||
|
current_url() . '/delete/' . $entity->getPK(),
|
||||||
|
ICONS['DELETE'],
|
||||||
|
["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
function getListColumns_RecordHelper(string $field, array $viewDatas, array $extras = []): string
|
function getListColumns_RecordHelper(string $field, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
$label = getFieldLabel_RecordHelper($field, $viewDatas, $extras);
|
$label = getFieldLabel_RecordHelper($field, $viewDatas, $extras);
|
||||||
|
|||||||
@ -146,6 +146,31 @@ function getFieldView_ZoneHelper(string $field, ZoneEntity $entity, array $viewD
|
|||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
} //
|
} //
|
||||||
|
function getListAction_ZoneHelper(string $action, $entity, array $viewDatas, array $extras = []): string
|
||||||
|
{
|
||||||
|
switch ($action) {
|
||||||
|
case 'sync':
|
||||||
|
$cnt = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $extras['cnt']);
|
||||||
|
$checkbox = form_checkbox([
|
||||||
|
"id" => "checkbox_uid_{$entity->getPK()}",
|
||||||
|
"name" => "batchjob_uids[]",
|
||||||
|
"value" => $entity->getPK(),
|
||||||
|
"class" => "batchjobuids_checkboxs",
|
||||||
|
]);
|
||||||
|
$url = current_url() . '/' . $action . '/' . $entity->getPK();
|
||||||
|
$value = anchor($url, $cnt, $extras);
|
||||||
|
$result = $checkbox . $value;
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$result = anchor(
|
||||||
|
current_url() . '/delete/' . $entity->getPK(),
|
||||||
|
ICONS['DELETE'],
|
||||||
|
["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
function getListColumns_ZoneHelper(string $field, array $viewDatas, array $extras = []): string
|
function getListColumns_ZoneHelper(string $field, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
$label = getFieldLabel_ZoneHelper($field, $viewDatas, $extras);
|
$label = getFieldLabel_ZoneHelper($field, $viewDatas, $extras);
|
||||||
|
|||||||
@ -82,6 +82,53 @@ function getFieldView_MapurlHelper(string $field, MapurlEntity $entity, array $v
|
|||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
} //
|
} //
|
||||||
|
function getListAction_MapurlHelper(string $action, $entity, array $viewDatas, array $extras = []): string
|
||||||
|
{
|
||||||
|
switch ($action) {
|
||||||
|
case 'modify':
|
||||||
|
$cnt = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $extras['cnt']);
|
||||||
|
$checkbox = form_checkbox([
|
||||||
|
"id" => "checkbox_uid_{$entity->getPK()}",
|
||||||
|
"name" => "batchjob_uids[]",
|
||||||
|
"value" => $entity->getPK(),
|
||||||
|
"class" => "batchjobuids_checkboxs"
|
||||||
|
]);
|
||||||
|
$url = current_url() . '/' . $action . '/' . $entity->getPK();
|
||||||
|
switch ($viewDatas['action_form']) {
|
||||||
|
case FORMS['MODAL']:
|
||||||
|
$value = form_label(
|
||||||
|
$cnt,
|
||||||
|
"",
|
||||||
|
[
|
||||||
|
"data-src" => $url,
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#index_action_form",
|
||||||
|
...$extras
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case FORMS['IFRAME']:
|
||||||
|
$value = form_label($cnt, "", [
|
||||||
|
"onClick" => "changeIframe_src('{$url}')",
|
||||||
|
...$extras
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$value = anchor($url, $cnt, $extras);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$result = $checkbox . $value;
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
$result = anchor(
|
||||||
|
current_url() . '/delete/' . $entity->getPK(),
|
||||||
|
ICONS['DELETE'],
|
||||||
|
["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras]
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
function getListColumns_MapurlHelper(string $field, array $viewDatas, array $extras = []): string
|
function getListColumns_MapurlHelper(string $field, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
$label = getFieldLabel_MapurlHelper($field, $viewDatas, $extras);
|
$label = getFieldLabel_MapurlHelper($field, $viewDatas, $extras);
|
||||||
|
|||||||
@ -19,16 +19,13 @@
|
|||||||
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
||||||
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
||||||
<td class="text-center text-wrap">
|
<td class="text-center text-wrap">
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPK()}", "name" => "batchjob_uids[]", "value" => $entity->getPK(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= getListAction_AuthHelper('modify', $entity, $viewDatas, ["cnt" => $cnt, "style" => "cursor:pointer"]) ?>
|
||||||
<span data-bs-toggle="modal" data-bs-target="#index_action_form" data-src="<?= current_url() . '/modify/' . $entity->getPK() ?>" style="cursor:pointer;">
|
|
||||||
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
|
|
||||||
</span>
|
|
||||||
</td>
|
</td>
|
||||||
<?php foreach ($viewDatas['fields'] as $field): ?>
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
||||||
<td><?= getFieldView_AuthHelper($field, $entity, $viewDatas) ?></td>
|
<td><?= getFieldView_AuthHelper($field, $entity, $viewDatas) ?></td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<td>
|
<td>
|
||||||
<?= anchor(current_url() . '/delete/' . $entity->getPK(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
|
<?= getListAction_AuthHelper('delete', $entity, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $cnt++ ?>
|
<?php $cnt++ ?>
|
||||||
|
|||||||
@ -20,16 +20,13 @@
|
|||||||
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
||||||
<tr id="<?= $entity->getPK() ?>" <?= $entity->locked != 'on' ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
<tr id="<?= $entity->getPK() ?>" <?= $entity->locked != 'on' ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
||||||
<td class="text-center text-wrap">
|
<td class="text-center text-wrap">
|
||||||
<?php if ($entity->fixed == 'off' && $entity->type == 'A') : ?>
|
<?= getListAction_RecordHelper('sync', $entity, $viewDatas, ["cnt" => $cnt, "style" => "cursor:pointer"]) ?>
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPK()}", "name" => "batchjob_uids[]", "value" => $entity->getPK(), "class" => "batchjobuids_checkboxs"]); ?>
|
|
||||||
<?php endif ?>
|
|
||||||
<?= anchor(current_url() . '/sync/' . $entity->getPK(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?>
|
|
||||||
</td>
|
</td>
|
||||||
<?php foreach ($viewDatas['fields'] as $field): ?>
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
||||||
<td><?= getFieldView_RecordHelper($field, $entity, $viewDatas, ['old_zone' => $old_zone]) ?></td>
|
<td><?= getFieldView_RecordHelper($field, $entity, $viewDatas, ['old_zone' => $old_zone]) ?></td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<td>
|
<td>
|
||||||
<?= anchor(current_url() . '/delete/' . $entity->getPK(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
|
<?= getListAction_RecordHelper('delete', $entity, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $cnt++ ?>
|
<?php $cnt++ ?>
|
||||||
|
|||||||
@ -20,14 +20,13 @@
|
|||||||
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
||||||
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != 'active' ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != 'active' ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
||||||
<td class="text-center text-wrap">
|
<td class="text-center text-wrap">
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPK()}", "name" => "batchjob_uids[]", "value" => $entity->getPK(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= getListAction_ZoneHelper('sync', $entity, $viewDatas, ["cnt" => $cnt, "style" => "cursor:pointer"]) ?>
|
||||||
<?= anchor(current_url() . '/sync/' . $entity->getPK(), $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt), ["target" => "_self"]) ?>
|
|
||||||
</td>
|
</td>
|
||||||
<?php foreach ($viewDatas['fields'] as $field): ?>
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
||||||
<td><?= getFieldView_ZoneHelper($field, $entity, $viewDatas, ['old_account' => $old_account]) ?></td>
|
<td><?= getFieldView_ZoneHelper($field, $entity, $viewDatas, ['old_account' => $old_account]) ?></td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<td>
|
<td>
|
||||||
<?= anchor(current_url() . '/delete/' . $entity->getPK(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
|
<?= getListAction_ZoneHelper('delete', $entity, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $cnt++ ?>
|
<?php $cnt++ ?>
|
||||||
|
|||||||
@ -19,16 +19,13 @@
|
|||||||
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
<?php foreach ($viewDatas['entitys'] as $entity): ?>
|
||||||
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
<tr id="<?= $entity->getPK() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?>>
|
||||||
<td class="text-center text-wrap">
|
<td class="text-center text-wrap">
|
||||||
<?= form_checkbox(["id" => "checkbox_uid_{$entity->getPK()}", "name" => "batchjob_uids[]", "value" => $entity->getPK(), "class" => "batchjobuids_checkboxs"]); ?>
|
<?= getListAction_MapurlHelper('modify', $entity, $viewDatas, ["cnt" => $cnt, "style" => "cursor:pointer"]) ?>
|
||||||
<span data-bs-toggle="modal" data-bs-target="#index_action_form" data-src="<?= current_url() . '/modify/' . $entity->getPK() ?>" style="cursor:pointer;">
|
|
||||||
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
|
|
||||||
</span>
|
|
||||||
</td>
|
</td>
|
||||||
<?php foreach ($viewDatas['fields'] as $field): ?>
|
<?php foreach ($viewDatas['fields'] as $field): ?>
|
||||||
<td><?= getFieldView_MapurlHelper($field, $entity, $viewDatas) ?></td>
|
<td><?= getFieldView_MapurlHelper($field, $entity, $viewDatas) ?></td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<td>
|
<td>
|
||||||
<?= anchor(current_url() . '/delete/' . $entity->getPK(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
|
<?= getListAction_MapurlHelper('delete', $entity, $viewDatas) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $cnt++ ?>
|
<?php $cnt++ ?>
|
||||||
|
|||||||
@ -263,7 +263,7 @@ 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/_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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user