diff --git a/extdbms/lib/Configs/App.php b/extdbms/lib/Configs/App.php index b4a32f2..6e72e46 100644 --- a/extdbms/lib/Configs/App.php +++ b/extdbms/lib/Configs/App.php @@ -4,7 +4,6 @@ namespace lib\Configs; use \lib\Core\App as Core; use Dotenv\Dotenv; -use lib\Database\DB; class App extends Core { @@ -13,6 +12,110 @@ class App extends Core // .env 파일 로드 $dotenv = Dotenv::createImmutable(ROOT_PATH); $dotenv->load(); + + // 환경 변수 설정 + //Application 관련 + define('APP_ENV', $_ENV['APP_ENV'] ?? 'production'); + define('APP_URL', $_ENV['APP_URL'] ?? 'http://localhost'); + define('APP_NAME', $_ENV['APP_NAME'] ?? 'MyApp'); + define('APP_VERSION', $_ENV['APP_VERSION'] ?? '1.0.0'); + define('APP_TIMEZONE', $_ENV['APP_TIMEZONE'] ?? 'Asia/Seoul'); + define('APP_LOCALE', $_ENV['APP_LOCALE'] ?? 'en'); + define('APP_CHARSET', $_ENV['APP_CHARSET'] ?? 'UTF-8'); + + //디버그관련련 + //APP_DEBUG는 true로 설정하면 디버그 모드로 작동합니다. + define('APP_DEBUG', $_ENV['APP_DEBUG'] ?? false); + define('APP_DEBUG_LEVEL', $_ENV['APP_DEBUG_LEVEL'] ?? 'error'); + + //Session 관련 + define('APP_SESSION_DRIVER', $_ENV['APP_SESSION_DRIVER'] ?? 'file'); + define('APP_SESSION_NAME', $_ENV['APP_SESSION_NAME'] ?? 'PHPSESSID'); + define('APP_SESSION_LIFETIME', $_ENV['APP_SESSION_LIFETIME'] ?? 120); + define('APP_SESSION_PATH', $_ENV['APP_SESSION_PATH'] ?? ROOT_PATH . '/writeable/sessions'); + define('APP_SESSION_PERMISSION', $_ENV['APP_SESSION_PERMISSION'] ?? 0775); + + //Cookie 관련 + define('APP_SESSION_COOKIE_PATH', $_ENV['APP_SESSION_COOKIE_PATH'] ?? '/'); + define('APP_SESSION_COOKIE_EXPIRE', $_ENV['APP_SESSION_COOKIE_EXPIRE'] ?? 3600); + define('APP_SESSION_COOKIE_DOMAIN', $_ENV['APP_SESSION_COOKIE_DOMAIN'] ?? null); + define('APP_SESSION_COOKIE_SECURE', $_ENV['APP_SESSION_COOKIE_SECURE'] ?? false); + define('APP_SESSION_COOKIE_HTTPONLY', $_ENV['APP_SESSION_COOKIE_HTTPONLY'] ?? true); + define('APP_SESSION_USE_ONLY_COOKIES', $_ENV['APP_SESSION_USE_ONLY_COOKIES'] ?? true); + define('APP_SESSION_USE_STRICT_MODE', $_ENV['APP_SESSION_USE_STRICT_MODE'] ?? true); + define('APP_SESSION_USE_UNIQUE_ID', $_ENV['APP_SESSION_USE_UNIQUE_ID'] ?? false); + define('APP_SESSION_USE_FLASH', $_ENV['APP_SESSION_USE_FLASH'] ?? true); + define('APP_SESSION_USE_INPUT', $_ENV['APP_SESSION_USE_INPUT'] ?? true); + + //CSRF 관련 + define('APP_SESSION_USE_CSRF', $_ENV['APP_SESSION_USE_CSRF'] ?? true); + define('APP_SESSION_USE_CSRF_TOKEN', $_ENV['APP_SESSION_USE_CSRF_TOKEN'] ?? true); + define('APP_SESSION_USE_CSRF_NAME', $_ENV['APP_SESSION_USE_CSRF_NAME'] ?? 'csrf_token'); + define('APP_SESSION_USE_CSRF_EXPIRE', $_ENV['APP_SESSION_USE_CSRF_EXPIRE'] ?? 3600); + define('APP_SESSION_USE_CSRF_EXCLUDE', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE'] ?? []); + define('APP_SESSION_USE_CSRF_EXCLUDE_METHOD', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE_METHOD'] ?? ['GET', 'HEAD', 'OPTIONS']); + define('APP_SESSION_USE_CSRF_EXCLUDE_URI', $_ENV['APP_SESSION_USE_CSRF_EXCLUDE_URI'] ?? []); + + //Log관련 + define('APP_LOG_PATH', $_ENV['APP_LOG_PATH'] ?? ROOT_PATH . '/logs'); + define('APP_LOG_PERMISSION', $_ENV['APP_LOG_PERMISSION'] ?? 0775); + define('APP_LOG_LEVEL', $_ENV['APP_LOG_LEVEL'] ?? 'error'); + define('APP_LOG_FORMAT', $_ENV['APP_LOG_FORMAT'] ?? 'text'); + define('APP_LOG_MAX_SIZE', $_ENV['APP_LOG_MAX_SIZE'] ?? 1048576); // 1MB + define('APP_LOG_MAX_FILES', $_ENV['APP_LOG_MAX_FILES'] ?? 5); + define('APP_LOG_DATE_FORMAT', $_ENV['APP_LOG_DATE_FORMAT'] ?? 'Y-m-d H:i:s'); + define('APP_LOG_CHANNEL', $_ENV['APP_LOG_CHANNEL'] ?? 'default'); + define('APP_LOG_LEVELS', $_ENV['APP_LOG_LEVELS'] ?? [ + 'emergency' => 0, + 'alert' => 1, + 'critical' => 2, + 'error' => 3, + 'warning' => 4, + 'notice' => 5, + 'info' => 6, + 'debug' => 7, + ]); + define('APP_LOG_FORMATS', $_ENV['APP_LOG_FORMATS'] ?? [ + 'text' => "{date} [{level}] {message}", + 'json' => '{"date": "{date}", "level": "{level}", "message": "{message}"}', + ]); + define('APP_LOG_CHANNELS', $_ENV['APP_LOG_CHANNELS'] ?? [ + 'default' => [ + 'driver' => 'single', + 'path' => APP_LOG_PATH . '/app.log', + 'level' => APP_LOG_LEVEL, + 'formatter' => APP_LOG_FORMAT, + 'max_size' => APP_LOG_MAX_SIZE, + 'max_files' => APP_LOG_MAX_FILES, + ], + ]); + + //Database 정보 + define('DATABASE_DRIVER', $_ENV['DATABASE_DRIVER'] ?? $_SERVER['DATABASE_DRIVER'] ?? 'mysql'); + define('DATABASE_HOST', $_ENV['DATABASE_HOST'] ?? $_SERVER['DATABASE_HOST'] ?? 'localhost'); + define('DATABASE_DB', $_ENV['DATABASE_DB'] ?? $_SERVER['DATABASE_DB'] ?? 'test'); + define('DATABASE_CHARSET', $_ENV['DATABASE_CHARSET'] ?? $_SERVER['DATABASE_CHARSET'] ?? 'utf8'); + define('DATABASE_ID', $_ENV['DATABASE_ID'] ?? $_SERVER['DATABASE_ID'] ?? 'test'); + define('DATABASE_PASSWORD', $_ENV['DATABASE_PASSWORD'] ?? $_SERVER['DATABASE_PASSWORD'] ?? 'test'); + define('DATABASE_QUERY_DEBUG', $_ENV['DATABASE_QUERY_DEBUG'] ?? $_SERVER['DATABASE_QUERY_DEBUG'] ?? false); + + //View 관련 + define('VIEW_PATH', $_ENV['VIEW_PATH'] ?? ROOT_PATH . '/views'); + define('VIEW_CACHE_PATH', $_ENV['VIEW_CACHE_PATH'] ?? ROOT_PATH . '/cache/views'); + define('VIEW_CACHE_ENABLED', $_ENV['VIEW_CACHE_ENABLED'] ?? true); + define('VIEW_CACHE_LIFETIME', $_ENV['VIEW_CACHE_LIFETIME'] ?? 3600); + define('VIEW_CACHE_DRIVER', $_ENV['VIEW_CACHE_DRIVER'] ?? 'file'); + define('VIEW_CACHE_PREFIX', $_ENV['VIEW_CACHE_PREFIX'] ?? 'view_cache_'); + define('VIEW_CACHE_SUFFIX', $_ENV['VIEW_CACHE_SUFFIX'] ?? '.php'); + define('VIEW_CACHE_EXTENSION', $_ENV['VIEW_CACHE_EXTENSION'] ?? '.html'); + + if (APP_DEBUG) { + error_reporting(E_ALL); + ini_set('display_errors', '1'); + } else { + error_reporting(0); + ini_set('display_errors', '0'); + } parent::__construct(); } } diff --git a/extdbms/lib/Configs/Constant.php b/extdbms/lib/Configs/Constant.php index f6ccce2..f01a269 100644 --- a/extdbms/lib/Configs/Constant.php +++ b/extdbms/lib/Configs/Constant.php @@ -1,13 +1,4 @@ getClientService()->getModel()->where('Client_Code', $client_code); + $client = $this->getClientService()->getEntity(); + if (!$client) { + throw new \Exception("[$client_code]에 해당하는 고객정보가 존재하지 않습니다."); + } //포인트 형식 $type = $this->request->get('type'); if (!$type) { @@ -112,20 +117,28 @@ class PointController extends ClientController 'note' => $note ]; $this->getServiceService()->beginTransaction(); - // //서비스포인트 갯수 수정 - // $this->getServiceService()->usePointByService($service, $point); // //포인트 사용내역 onetime에 등록 // $this->getOnetimeService()->usePointByService($service, $client, $member, $onetime_case, $point, $note, $onetime_request_date); // //포인트 사용내역 history에 등록 // $this->getHistoryService()->usePointByService($service, $client, $onetime_case, $point, $note, $onetime_request_date);; + //포인트 사용내역 point에 등록 $this->getPointService()->getModel()->insert($formDatas); + if ($type == 'withdrawal') { //사용자 포인트 출금 + $this->getClientService()->withdrawalPoint($this->client, $amount); + } else { //사용자 포인트 입금 + $this->getClientService()->depositPoint($this->client, $amount); + } $this->getServiceService()->commit(); - return $this->redirect->to(DBMS_SITE_URL . "/IdcPointList.cup")->with('success', ['message' => '포인트 작업이 완료되었습니다.']); + $message_key = 'success'; + $message = "포인트 : [$amount]" . DBMS_CLIENT_POINT_TYPE[$type] . "이 완료되었습니다"; } catch (\PDOException $e) { $this->getServiceService()->rollback(); - return $this->redirect->back()->withInput()->with('error', ['message' => '포인트 사용에 실패하였습니다.:' . $e->getMessage()]); + $message_key = 'error'; + $message = "실패:" . $e->getMessage(); } catch (\Exception $e) { - return $this->redirect->back()->withInput()->with('error', ['message' => '포인트 사용에 실패하였습니다.:' . $e->getMessage()]); + $message_key = 'error'; + $message = "실패" . $e->getMessage(); } + return $this->redirect->to(DBMS_SITE_URL . "/IdcPointList.cup?client_code=$client_code")->with($message_key, ['message' => $message]); } } //Class diff --git a/extdbms/lib/Controllers/DBMS/DBMSController.php b/extdbms/lib/Controllers/DBMSController.php similarity index 94% rename from extdbms/lib/Controllers/DBMS/DBMSController.php rename to extdbms/lib/Controllers/DBMSController.php index 8a3337b..bf38f2e 100644 --- a/extdbms/lib/Controllers/DBMS/DBMSController.php +++ b/extdbms/lib/Controllers/DBMSController.php @@ -1,6 +1,6 @@ start(); + $this->init(); } // 세션 시작 - public function start(): void + public function init(): void { if (session_status() === PHP_SESSION_NONE) { + if (!is_dir(APP_SESSION_PATH)) { + mkdir(APP_SESSION_PATH, APP_SESSION_PERMISSION, true); + } + session_save_path(APP_SESSION_PATH); session_start(); } } diff --git a/extdbms/lib/Http/Url.php b/extdbms/lib/Core/Http/Url.php similarity index 55% rename from extdbms/lib/Http/Url.php rename to extdbms/lib/Core/Http/Url.php index 589c5fd..77ff698 100644 --- a/extdbms/lib/Http/Url.php +++ b/extdbms/lib/Core/Http/Url.php @@ -1,6 +1,6 @@ baseUrl; } @@ -63,4 +63,41 @@ class Url extends Http $scriptDir = rtrim(dirname($_SERVER['SCRIPT_NAME'] ?? ''), '/'); return $scheme . '://' . $host . $scriptDir; } + + public static function baseUrl(): string + { + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://"; + $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; + $script = str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); + + return rtrim($protocol . $host . $script, '/'); + } + + public static function currentUrl(): string + { + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://"; + $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; + $uri = $_SERVER['REQUEST_URI'] ?? ''; + + return $protocol . $host . $uri; + } + + public static function previousUrl(): ?string + { + return $_SERVER['HTTP_REFERER'] ?? null; + } + + public static function urlIs(string $pattern): bool + { + $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + $pattern = str_replace('*', '.*', preg_quote($pattern, '/')); + return preg_match("/^{$pattern}$/", $uri) === 1; + } + + public static function getSegment(int $index): ?string + { + $uri = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'); + $segments = explode('/', $uri); + return $segments[$index - 1] ?? null; + } } diff --git a/extdbms/lib/Http/Validator.php b/extdbms/lib/Core/Http/Validator.php similarity index 99% rename from extdbms/lib/Http/Validator.php rename to extdbms/lib/Core/Http/Validator.php index 88fc331..b092527 100644 --- a/extdbms/lib/Http/Validator.php +++ b/extdbms/lib/Core/Http/Validator.php @@ -1,6 +1,6 @@ logPath = rtrim($logDir, DIRECTORY_SEPARATOR); + if (!is_dir($this->logPath)) { + mkdir($this->logPath, APP_LOG_PERMISSION, true); + } + } + + public function log(string $message, string $level = 'INFO'): void + { + $filename = date('Y-m-d') . '.log'; + $filepath = "{$this->logPath}/{$filename}"; + $time = date('Y-m-d H:i:s'); + + $formatted = "[{$time}] [{$level}] {$message}\n"; + + file_put_contents($filepath, $formatted, FILE_APPEND); + } + + public function info(string $message): void + { + $this->log($message, 'INFO'); + } + + public function error(string $message): void + { + $this->log($message, 'ERROR'); + } + + public function warning(string $message): void + { + $this->log($message, 'WARNING'); + } + + public function debug(string $message): void + { + if (defined('APP_DEBUG') && APP_DEBUG) { + $this->log($message, 'DEBUG'); + } + } +} diff --git a/extdbms/lib/Middlewares/AuthMiddleware.php b/extdbms/lib/Core/Middlewares/AuthMiddleware.php similarity index 78% rename from extdbms/lib/Middlewares/AuthMiddleware.php rename to extdbms/lib/Core/Middlewares/AuthMiddleware.php index 2ba354f..be80bfb 100644 --- a/extdbms/lib/Middlewares/AuthMiddleware.php +++ b/extdbms/lib/Core/Middlewares/AuthMiddleware.php @@ -1,9 +1,9 @@ _debug = $debug; - } - final public function getDebug() - { - return $this->_debug; - } } //Class diff --git a/extdbms/lib/Core/Utils/Pagination.php b/extdbms/lib/Core/Utils/Pagination.php new file mode 100644 index 0000000..cebf140 --- /dev/null +++ b/extdbms/lib/Core/Utils/Pagination.php @@ -0,0 +1,117 @@ +totalItems = $totalItems; + $this->perPage = $perPage; + $this->currentPage = max(1, $currentPage); + $this->totalPages = (int)ceil($totalItems / $perPage); + $this->start = ($this->currentPage - 1) * $perPage; + $this->end = min($this->start + $perPage, $totalItems); + $this->groupSize = intval(VIEW_LIST_PAGINATION_GROUPSIZE); + } + + public function hasPrevious(): bool + { + return $this->currentPage > 1; + } + + public function hasNext(): bool + { + return $this->currentPage < $this->totalPages; + } + + public function previousPage(): int + { + return max(1, $this->currentPage - 1); + } + + public function nextPage(): int + { + return min($this->totalPages, $this->currentPage + 1); + } + + public function getOffset(): int + { + return $this->start; + } + + public function getLimit(): int + { + return $this->perPage; + } + + public function toArray(): array + { + return [ + 'current_page' => $this->currentPage, + 'per_page' => $this->perPage, + 'total_items' => $this->totalItems, + 'total_pages' => $this->totalPages, + 'has_previous' => $this->hasPrevious(), + 'has_next' => $this->hasNext(), + 'previous_page' => $this->previousPage(), + 'next_page' => $this->nextPage(), + 'offset' => $this->getOffset(), + 'limit' => $this->getLimit(), + ]; + } + + public function render(string $baseUrl = '', array $query = []): string + { + if ($this->totalPages <= 1) { + return ''; + } + + $html = ''; + return $html; + } + private function pageLink(int $page, string $label, string $baseUrl, array $query): string + { + $query['curPage'] = $page; + $url = $baseUrl . '?' . http_build_query($query); + return '
  • ' . $label . '
  • '; + } +} diff --git a/extdbms/lib/Helpers/DBMS/Client/ClientHelper.php b/extdbms/lib/Helpers/Client/ClientHelper.php similarity index 85% rename from extdbms/lib/Helpers/DBMS/Client/ClientHelper.php rename to extdbms/lib/Helpers/Client/ClientHelper.php index ab7591a..348ac82 100644 --- a/extdbms/lib/Helpers/DBMS/Client/ClientHelper.php +++ b/extdbms/lib/Helpers/Client/ClientHelper.php @@ -1,6 +1,6 @@ getModel()->where("Client_Code", $client->getClientCode()); + $this->getModel()->update(["Client_Point=(Client_Point+{$point})" => null]); + return true; + } + //사용자 포인트 출금 + public function withdrawalPoint(Entity $client, int $point): bool + { + if ($point < 0) { + throw new \Exception("포인트금액이 잘못되었습니다. 포인트 : $point"); + } + if ($client->getPoint() < $point) { + throw new \Exception("포인트금액이 잘못되었습니다. 남은 포인트: " . $client->getPoint() . ", 포인트 : $point"); + } + $this->getModel()->where("Client_Code", $client->getClientCode()); + $this->getModel()->update(["Client_Point=(Client_Point-{$point})" => null]); + return true; + } } diff --git a/extdbms/lib/Services/PointService.php b/extdbms/lib/Services/PointService.php index 1651ec3..15650b7 100644 --- a/extdbms/lib/Services/PointService.php +++ b/extdbms/lib/Services/PointService.php @@ -27,9 +27,4 @@ class PointService extends CommonService { return Entity::class; } - - public function insert(array $formDatas): Entity - { - return parent::insert($formDatas); - } //insert } //Class diff --git a/extdbms/lib/Utils/Pagination.php b/extdbms/lib/Utils/Pagination.php index 2b89046..cd504de 100644 --- a/extdbms/lib/Utils/Pagination.php +++ b/extdbms/lib/Utils/Pagination.php @@ -2,116 +2,12 @@ namespace lib\Utils; -class Pagination -{ - public int $currentPage; - public int $perPage; - public int $totalItems; - public int $totalPages; - public int $groupSize = 10; - public int $start; - public int $end; +use lib\Core\Utils\Pagination as Core; +class Pagination extends Core +{ public function __construct(int $totalItems, int $currentPage = 1, int $perPage = 10) { - $this->totalItems = $totalItems; - $this->perPage = $perPage; - $this->currentPage = max(1, $currentPage); - $this->totalPages = (int)ceil($totalItems / $perPage); - $this->start = ($this->currentPage - 1) * $perPage; - $this->end = min($this->start + $perPage, $totalItems); - $this->groupSize = intval(VIEW_LIST_PAGINATION_GROUPSIZE); - } - - public function hasPrevious(): bool - { - return $this->currentPage > 1; - } - - public function hasNext(): bool - { - return $this->currentPage < $this->totalPages; - } - - public function previousPage(): int - { - return max(1, $this->currentPage - 1); - } - - public function nextPage(): int - { - return min($this->totalPages, $this->currentPage + 1); - } - - public function getOffset(): int - { - return $this->start; - } - - public function getLimit(): int - { - return $this->perPage; - } - - public function toArray(): array - { - return [ - 'current_page' => $this->currentPage, - 'per_page' => $this->perPage, - 'total_items' => $this->totalItems, - 'total_pages' => $this->totalPages, - 'has_previous' => $this->hasPrevious(), - 'has_next' => $this->hasNext(), - 'previous_page' => $this->previousPage(), - 'next_page' => $this->nextPage(), - 'offset' => $this->getOffset(), - 'limit' => $this->getLimit(), - ]; - } - - public function render(string $baseUrl = '', array $query = []): string - { - if ($this->totalPages <= 1) { - return ''; - } - - $html = ''; - return $html; - } - private function pageLink(int $page, string $label, string $baseUrl, array $query): string - { - $query['curPage'] = $page; - $url = $baseUrl . '?' . http_build_query($query); - return '
  • ' . $label . '
  • '; + parent::__construct($totalItems, $currentPage, $perPage); } } diff --git a/extdbms/lib/Views/dbms/client/point/index.php b/extdbms/lib/Views/dbms/client/point/index.php index 72861bf..92da629 100644 --- a/extdbms/lib/Views/dbms/client/point/index.php +++ b/extdbms/lib/Views/dbms/client/point/index.php @@ -1,3 +1,11 @@ +
    diff --git a/extdbms/lib/Views/dbms/dashboard/topboard.php b/extdbms/lib/Views/dbms/dashboard/topboard.php index 9715d0e..bb1378b 100644 --- a/extdbms/lib/Views/dbms/dashboard/topboard.php +++ b/extdbms/lib/Views/dbms/dashboard/topboard.php @@ -33,8 +33,8 @@
    -
    newServers ?>
    -
    최근 day ?>일간 신규서버 대수
    +
    newServices ?>
    +
    최근 day ?>일간 신규서비스스 대수
    diff --git a/extdbms/old/NonPaymentList.php b/extdbms/old/NonPaymentList.php deleted file mode 100644 index c036e12..0000000 --- a/extdbms/old/NonPaymentList.php +++ /dev/null @@ -1,209 +0,0 @@ - - - - >전체 - >당일 - >1일전 - >2일전 - >3일전 - - - - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[curPage]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -switch ($_GET[mode]) { - case "today": - //당일 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = CURDATE() ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "1day": - //1일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 1 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "2day": - //2일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 2 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "3day": - //3일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 3 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - - case "custom": - //커스텀 - //$query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = CURDATE() Group By server_code ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit ".$next_page.",".$next_no; - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 1 DAY) Group By server_code ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - - default: - //전체 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; -} - -$result = @mysql_query($query, $db_connect) or die($db_q_error); -?> - -엑셀 -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    고객명종류장비명IP결제일서비스 가격과금상태미납과금비고
    -
    - 0) { - - $p_start = (($n_page - 1) * $page_scale)+'1'; - $link = ""; - $link .= "<<"; - $link .= ""; - echo $link . " "; -} -$is = ($n_page * $page_scale)+'1'; -for ($i = $is; $i < $is + $page_scale; $i++) { - - if ($i < $total_page+'1') { - if ($i == $page) {$ib = "$i";} else { $ib = $i;} - $link = ""; - $link .= $ib; - $link .= ""; - echo $link . " "; - } -} -if ($n_page < $page3) { - $link = ""; - $link .= ">>"; - $link .= ""; - echo $link; -} -?> -
    - - - - - diff --git a/extdbms/old/README.md b/extdbms/old/README.md deleted file mode 100644 index bd3dc44..0000000 --- a/extdbms/old/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# EXTDBMS - -DBMS용 PHP 소스 \ No newline at end of file diff --git a/extdbms/old/config.php b/extdbms/old/config.php deleted file mode 100644 index 5792480..0000000 --- a/extdbms/old/config.php +++ /dev/null @@ -1,3 +0,0 @@ - - - - - - - -
    - / - -
    - - -
  • - - >수정 -
  • - - - - - - - - diff --git a/extdbms/old/coupon.php b/extdbms/old/coupon.php deleted file mode 100644 index 49e119b..0000000 --- a/extdbms/old/coupon.php +++ /dev/null @@ -1,20 +0,0 @@ -execute($lines, $client_field); -echo "Coupon 설정이 완료되었습니다.\n"; diff --git a/extdbms/old/customer_memo.php b/extdbms/old/customer_memo.php deleted file mode 100644 index 3e233e6..0000000 --- a/extdbms/old/customer_memo.php +++ /dev/null @@ -1,32 +0,0 @@ - - -
    - - - - - - - -
    비    고
    -
    - diff --git a/extdbms/old/customer_memo_up.php b/extdbms/old/customer_memo_up.php deleted file mode 100644 index e895443..0000000 --- a/extdbms/old/customer_memo_up.php +++ /dev/null @@ -1,22 +0,0 @@ - - -:6752/serviceDetail.sev?client_code='" /> - diff --git a/extdbms/old/deepfinder_list.php b/extdbms/old/deepfinder_list.php deleted file mode 100644 index 2780bb5..0000000 --- a/extdbms/old/deepfinder_list.php +++ /dev/null @@ -1,7 +0,0 @@ -execute("딥파인더"); diff --git a/extdbms/old/default_alert.php b/extdbms/old/default_alert.php deleted file mode 100644 index 3b9eab9..0000000 --- a/extdbms/old/default_alert.php +++ /dev/null @@ -1,20 +0,0 @@ -load(); - -require_once "lib/Core/Config.php"; -try { - $control = isset($argv[1]) ? $argv[1] : "lib\\Controllers\\SiteController"; - $control = new $control(); - $function = isset($argv[2]) ? $argv[2] : "dashboard"; - $key_name = "sitekey"; - $sitekey = array_key_exists($key_name, $_GET) ? $_GET[$key_name] : false; - $sitekey = isset($arvg[3]) ? $argv[1] : "dbms.prime-idc.jp"; - return $control->$function($sitekey); -} catch (\Exception $e) { - echo $e->getMessage(); -} diff --git a/extdbms/old/defense_index.php b/extdbms/old/defense_index.php deleted file mode 100644 index 3e93547..0000000 --- a/extdbms/old/defense_index.php +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - -
    - / - -
    - - -
  • - - >수정 -
  • - - - - - - - - - \ No newline at end of file diff --git a/extdbms/old/defense_modify.php b/extdbms/old/defense_modify.php deleted file mode 100644 index 1c4e52c..0000000 --- a/extdbms/old/defense_modify.php +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - * - - &parents=>등록
    - - - - - >수정
    - - - - - - - - - - - - -MODIFY - - - - \ No newline at end of file diff --git a/extdbms/old/defense_new.php b/extdbms/old/defense_new.php deleted file mode 100644 index 98463be..0000000 --- a/extdbms/old/defense_new.php +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - * - - &parents=>등록
    - - - - - >수정
    - - - - - - - - - - - - -NEW - - - - \ No newline at end of file diff --git a/extdbms/old/depositbillpaper.php b/extdbms/old/depositbillpaper.php deleted file mode 100644 index 98489fa..0000000 --- a/extdbms/old/depositbillpaper.php +++ /dev/null @@ -1,11 +0,0 @@ -getBillingPaper($_GET); -} catch (\Exception $e) { - die($e->getMessage()); -} diff --git a/extdbms/old/domain_buy_list.php b/extdbms/old/domain_buy_list.php deleted file mode 100644 index b273ad7..0000000 --- a/extdbms/old/domain_buy_list.php +++ /dev/null @@ -1,133 +0,0 @@ - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[page]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -$result = @mysql_query($query, $db_connect) or die($db_q_error); -?> -
    -2015년 전체구매건수 : -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    고객명서비스코드수량결제금액미납금액신청일비 고담당자
    -
    - - diff --git a/extdbms/old/domain_coupon.php b/extdbms/old/domain_coupon.php deleted file mode 100644 index 9a25f8e..0000000 --- a/extdbms/old/domain_coupon.php +++ /dev/null @@ -1,120 +0,0 @@ - - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[curPage]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -$query = "select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,servicedb.coupon_use,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012','C497','C464','C526') and service_ip not like '27.125.204%' order by clientdb.client_name,service_open_date asc limit " . $next_page . "," . $next_no; - -//$query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012') order by service_code asc"; - -$coupon_data = @mysql_query($query, $db_connect) or die($db_q_error); -$total_coupon = mysql_query("select sum(coupon),sum(coupon_use) from servicedb", $db_connect) or die($db_q_error); -$total_coupon = mysql_fetch_assoc($total_coupon); -?> -
    전체 남은 수량 : / 전체 사용 수량 :

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No발급쿠폰남은수량사용완료고객명서비스코드장비명서버IP서비스개시일회선종류
    5"; } else { echo "3";}?>
    -
    - -
    - 0) { - - $p_start = (($n_page - 1) * $page_scale)+'1'; - $link = ""; - $link .= "<<"; - $link .= ""; - echo $link . " "; -} -$is = ($n_page * $page_scale)+'1'; -for ($i = $is; $i < $is + $page_scale; $i++) { - - if ($i < $total_page+'1') { - if ($i == $page) {$ib = "$i";} else { $ib = $i;} - $link = ""; - $link .= $ib; - $link .= ""; - echo $link . " "; - } -} -if ($n_page < $page3) { - $link = ""; - $link .= ">>"; - $link .= ""; - echo $link; -} - -?> -
    - diff --git a/extdbms/old/domain_coupon.php.bak b/extdbms/old/domain_coupon.php.bak deleted file mode 100644 index 85a2de0..0000000 --- a/extdbms/old/domain_coupon.php.bak +++ /dev/null @@ -1,125 +0,0 @@ - - -$total){$list_no=$total;} -$total_page = ($total != '0' ) ? ceil($total/$list_no) : '0'; - -$page = $_GET[curPage]; - -if(!$page) {$page = 1;} -elseif($page >= $total_page){$page=$total_page;} -else {$page=$page;} - -$next_page=($page-'1')*$list_no; -$next_no=$next_page+$list_no; - -$query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,servicedb.coupon_use,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012','C497','C464','C526') and service_ip not like '27.125.204%' order by clientdb.client_name,service_open_date asc limit ".$next_page.",".$next_no; - -//$query="select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,servicedb.coupon,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and Client_Code not in ('C219','C116','C012') order by service_code asc"; - - -$coupon_data = @mysql_query($query , $db_connect) or die($db_q_error); -$total_coupon=mysql_query("select sum(coupon),sum(coupon_use) from servicedb" , $db_connect) or die($db_q_error); -$total_coupon=mysql_fetch_assoc($total_coupon); -?> -
    전체 남은 수량 : / 전체 사용 수량 :

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No발급쿠폰남은수량사용완료고객명서비스코드장비명서버IP서비스개시일회선종류
    5"; } else { echo "3";}?>
    -
    - -
    - 0){ - - $p_start = (($n_page-1)*$page_scale)+'1'; - $link = ""; - $link .= "<<"; - $link .= ""; - echo $link." "; -} -$is = ($n_page*$page_scale)+'1'; -for($i=$is; $i < $is+$page_scale; $i++){ - - - if($i < $total_page+'1'){ - if($i==$page){$ib="$i";}else{$ib=$i;} - $link = ""; - $link .= $ib; - $link .= ""; - echo $link." "; - } -} -if($n_page < $page3){ - $link = ""; - $link .= ">>"; - $link .= ""; - echo $link; -} - -?> -
    - diff --git a/extdbms/old/domain_coupon_buy.php b/extdbms/old/domain_coupon_buy.php deleted file mode 100644 index 3094457..0000000 --- a/extdbms/old/domain_coupon_buy.php +++ /dev/null @@ -1,126 +0,0 @@ -"; - //echo $onetime_query; - //echo "
    "; - //echo $history_query; - -//echo $_GET[client_code].$_GET[service_code].$_GET[client_name].$_GET[server_code].$_GET[coupon].$_GET[mkworker].$_GET[mkid]; - echo " - -"; -} else { - //$sql = sprintf("select * from servicedb where service_code='%s'", $_GET['service_code']); - //$stmt = @mysql_query($sql, $db_connect) or die($db_q_error); - //$service = mysql_fetch_assoc($stmt); -?> -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    고객코드
    서비스코드
    고객명
    장비번호
    - - 도메인 구매 수량 - - (개별 서버에 할당된 남은 쿠폰 수량 : ) - -
    서비스 금액 - 도메인 쿠폰 사용 - - -
    도메인 신청일 - - 쿠폰 사용일 - -
    도메인 리스트 -
    (공백을 허용하지 않습니다. 예제처럼 붙여쓰기 하세요 / 예제 : test.com/123.com/idcjp.jp) -
    - - -
    -
    -
    - - diff --git a/extdbms/old/domain_coupon_use.php b/extdbms/old/domain_coupon_use.php deleted file mode 100644 index b89de3d..0000000 --- a/extdbms/old/domain_coupon_use.php +++ /dev/null @@ -1,122 +0,0 @@ - - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[curPage]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -$query = "select servicedb.service_code, servicedb.client_code,servicedb.service_line,servicedb.server_code,servicedb.service_ip,servicedb.service_open_date,coupon,coupon_use,clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where servicedb.service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and servicedb.client_code = '$client_code' and service_ip not like '27.125.204%' order by service_open_date asc limit " . $next_page . "," . $next_no; -$coupon_data = @mysql_query($query, $db_connect) or die($db_q_error); -?> -

    고객명 : / 쿠폰발급대상 : 대 / 전체 남은 수량 :

    -
    - - - - - - - - - - - - - - - - - - -";} else { $coupon_color = "";} - ?> - - - - - - - - - - - - - - - - - -
    No발급쿠폰남은수량사용완료서비스코드장비명서버IP서비스개시일회선종류사용
    &client_name=&client_code=&server_code=&coupon=&mode=&mkworker=&mkid=>사용하기
    -
    - -
    - 0) { - - $p_start = (($n_page - 1) * $page_scale)+'1'; - $link = ""; - $link .= "<<"; - $link .= ""; - echo $link . " "; -} -$is = ($n_page * $page_scale)+'1'; -for ($i = $is; $i < $is + $page_scale; $i++) { - - if ($i < $total_page+'1') { - if ($i == $page) {$ib = "$i";} else { $ib = $i;} - $link = ""; - $link .= $ib; - $link .= ""; - echo $link . " "; - } -} -if ($n_page < $page3) { - $link = ""; - $link .= ">>"; - $link .= ""; - echo $link; -} - -?> -
    - diff --git a/extdbms/old/dotdefender_list.php b/extdbms/old/dotdefender_list.php deleted file mode 100644 index 0068fad..0000000 --- a/extdbms/old/dotdefender_list.php +++ /dev/null @@ -1,7 +0,0 @@ -execute("닷 디펜더"); diff --git a/extdbms/old/footer.php b/extdbms/old/footer.php deleted file mode 100644 index 5edb20d..0000000 --- a/extdbms/old/footer.php +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - diff --git a/extdbms/old/function.php b/extdbms/old/function.php deleted file mode 100644 index 34a4a17..0000000 --- a/extdbms/old/function.php +++ /dev/null @@ -1,225 +0,0 @@ -= $s_len) {$cnt = ($s_len - $i) % 4; - break;} else { - $i += 3; - } - - } else if (($oc & 0xF0) == 0xE0) // 3byte - { - if ($i + 3 >= $s_len) {$cnt = ($s_len - $i) % 3; - break;} else { - $i += 2; - } - - } else if (($oc & 0xE0) == 0xC0) // 2byte - { - if ($i + 2 >= $s_len) {$cnt = ($s_len - $i) % 2; - break;} else { - $i++; - } - - } else // 1byte - { - $cnt = 0; - } - - } - if ($cnt) { - $s = substr($s, 0, $s_len - $cnt); - } - - if (strlen($s) >= strlen($str)) { - $suffix = ""; - } - - return $s . $suffix; -} - -//문자열 처리 trim,htmlspecialchars,addslashes -function mk_trim() -{ - $nums = func_num_args(); - $row = func_get_args(); - for ($i = 0; $i < $nums; $i++) { - $row[$i] = addslashes($row[$i]); - $row[$i] = htmlspecialchars($row[$i]); - $row[$i] = trim($row[$i]); - return $row[$i]; - } -} - -//DB 테이블 생성 확인 -function exist_table($table_name) -{ - $result = mysql_query("show tables like '" . $table_name . "'"); - $row = mysql_fetch_array($result, MYSQL_NUM); - if ($row == false) { - return false; - } - - return true; -} - -// 실행시간 체크 -function getmicrotime() -{ - list($usec, $sec) = explode(' ', microtime()); - return ((float) $usec + (float) $sec); -} - -//패스워드 암호화 -function sha_256($user_passwd) -{ - $return = hash('sha256', $user_passwd); - return $return; -} - -//get response -function get_response($host, $request) -{ - $fp = fsockopen($host, 80); - if (!$fp) {flush(); - } else { - fputs($fp, $request); - flush(); - $response = ""; - while (!feof($fp)) {$response .= fgets($fp, 1024);} - } - fclose($fp); - return $response; -} - -//용량계산 -function size($size) -{ - $unit = array(" Byte", " KB", " MB", " GB"); - if (!$size) { - return "0" . $unit[0]; - } - - if ($size < 1024) // 바이트 - { - return $size . $unit[0]; - } - - if ($size > 1024 && $size < 1024 * 1024) // 킬로바이트 - { - return sprintf("%0.1f " . $unit[1], $size / 1024); - } - - if ($size > 1024 * 1024 && $size < 1024 * 1024 * 1024) // 메가바이트 - { - return sprintf("%0.1f " . $unit[2], $size / (1024 * 1024)); - } - - if ($size > 1024 * 1024 * 1000 && $size < 1024 * 1024 * 1024 * 1024) // 기가바이트 - { - return sprintf("%0.1f " . $unit[3], $size / (1024 * 1024 * 1000)); - } - -} - -//프록시 서버 체크-실제 아이피 가져오기 -function use_ip() -{ - $reverse = 0; - $e = 0; - $hostip = getenv("HTTP_X_FORWARDED_FOR"); - $hostip = $hostip ? $hostip : getenv("REMOTE_ADDR"); - $check = $reverse ? @gethostbyaddr($hostip) : ""; - $hostip = $check ? $check : $hostip; - $gateway_ip = getenv("REMOTE_ADDR"); - return $hostip; -} - -//GMT 시간 표시 -function GMT($time_zone) -{ - switch ($time_zone) { - case 'Kwajalein':$gmt = "-12"; - break; - case 'Pacific/Midway':$gmt = "-11"; - break; - case 'Pacific/Honolulu':$gmt = "-10"; - break; - case 'America/Anchorage':$gmt = "-9"; - break; - case 'America/Los_Angeles':$gmt = "-8"; - break; - case 'America/Denver':$gmt = "-7"; - break; - case 'America/Tegucigalpa':$gmt = "-6"; - break; - case 'America/New_York':$gmt = "-5"; - break; - case 'America/Caracas':$gmt = "-4.30"; - break; - case 'America/Halifax':$gmt = "-4"; - break; - case 'America/St_Johns':$gmt = "-3.30"; - break; - case 'America/Argentina/Buenos_Aires':$gmt = "-3"; - break; - case 'America/Sao_Paulo':$gmt = "-3"; - break; - case 'Atlantic/South_Georgia':$gmt = "-2"; - break; - case 'Atlantic/Azores':$gmt = "-1"; - break; - case 'Europe/Dublin':$gmt = "0"; - break; - case 'Europe/Belgrade':$gmt = "+1"; - break; - case 'Europe/Minsk':$gmt = "+2"; - break; - case 'Asia/Kuwait':$gmt = "+3"; - break; - case 'Asia/Tehran':$gmt = "+3.30"; - break; - case 'Asia/Muscat':$gmt = "+4"; - break; - case 'Asia/Yekaterinburg':$gmt = "+5"; - break; - case 'Asia/Kolkata':$gmt = "+5.30"; - break; - case 'Asia/Katmandu':$gmt = "+5.45"; - break; - case 'Asia/Dhaka':$gmt = "+6"; - break; - case 'Asia/Rangoon':$gmt = "+6.30"; - break; - case 'Asia/Krasnoyarsk':$gmt = "+7"; - break; - case 'Asia/Brunei':$gmt = "+8"; - break; - case 'Asia/Seoul':$gmt = "+9"; - break; - case 'Australia/Darwin':$gmt = "+9.30"; - break; - case 'Australia/Canberra':$gmt = "+10"; - break; - case 'Asia/Magadan':$gmt = "+11"; - break; - case 'Pacific/Fiji':$gmt = "+12"; - break; - case 'Pacific/Tongatapu':$gmt = "+13"; - break; - } - return $gmt; -} diff --git a/extdbms/old/gear_ready.php b/extdbms/old/gear_ready.php deleted file mode 100644 index 994a29c..0000000 --- a/extdbms/old/gear_ready.php +++ /dev/null @@ -1,118 +0,0 @@ - - - -[ 돌아가기 ] - - - - - - - - - - - - - - - -
    CPUHDDOS수량
    -
    -장비번호 : - -OS : -작업자 : - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    가용장비번호CPURAMHDDBRAND포맷보류recieverelease비고DISUSE현재이전READYREADYREADY
    - - - - - -
    - - - diff --git a/extdbms/old/gear_ready_up.php b/extdbms/old/gear_ready_up.php deleted file mode 100644 index 8c0efe0..0000000 --- a/extdbms/old/gear_ready_up.php +++ /dev/null @@ -1,24 +0,0 @@ - - - - diff --git a/extdbms/old/header.php b/extdbms/old/header.php deleted file mode 100644 index 3f6658a..0000000 --- a/extdbms/old/header.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -<?=$site_title?> - - - - - - - - -/style.css' type='text/css' /> - - - - - diff --git a/extdbms/old/ipsearch.php b/extdbms/old/ipsearch.php deleted file mode 100644 index b774d99..0000000 --- a/extdbms/old/ipsearch.php +++ /dev/null @@ -1,146 +0,0 @@ - - - -
    -[ 돌아가기 ] - -
    -IP 입력 : - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    CODENAMESERVERIPSWNOTETELMAIL
    - - - diff --git a/extdbms/old/jarvis_email.mp3 b/extdbms/old/jarvis_email.mp3 deleted file mode 100644 index 2b2fa63..0000000 Binary files a/extdbms/old/jarvis_email.mp3 and /dev/null differ diff --git a/extdbms/old/lib.php b/extdbms/old/lib.php deleted file mode 100644 index fae4a87..0000000 --- a/extdbms/old/lib.php +++ /dev/null @@ -1,81 +0,0 @@ - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[page]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -$result = @mysql_query($query, $db_connect) or die($db_q_error); -?> - - -
    - - - - - - - - - - - - - - - - -긴급'; - break; - case '2':$data[comment_case] = '지시'; - break; - case '3':$data[comment_case] = '전달'; - break; - case '4':$data[comment_case] = '기타'; - break; - default:$data[comment_case] = '일반'; - break; - } - $content = nl2br($data[content]); - if ($_GET[page] == 'default') {$content = cut_str($content, 180, " ... more");} else {} - ?> - - - - - - - - - - - -
    구분보낸사람내용보낸날짜보낸시간받는사람확인
    $data[receiver]";}?> -확인완료"; - } else { - - if ($data[receiver] == '전체' or $data[receiver] == '팀장' or $data[receiver] == '영업' or $data[receiver] == '1팀' or $data[receiver] == '2팀' or $data[receiver] == '시스템' or $data[receiver] == '네트워크' or $data[receiver] == '알바') { - $msg = "
    - - - - - - -
    "; - } else { - $msg = "
    "; - } - } - ?> - -
    - - - - diff --git a/extdbms/old/member_memo_sent.php b/extdbms/old/member_memo_sent.php deleted file mode 100644 index 5c151bf..0000000 --- a/extdbms/old/member_memo_sent.php +++ /dev/null @@ -1,190 +0,0 @@ - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[page]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -$result = @mysql_query($query, $db_connect) or die($db_q_error); -?> - - -
    - - - - - - - - - - - - - - - -긴급'; - break; - case '2':$data[comment_case] = '지시'; - break; - case '3':$data[comment_case] = '전달'; - break; - case '4':$data[comment_case] = '기타'; - break; - default:$data[comment_case] = '일반'; - break; - } - ?> - - - - - - - - - - -
    구분내용보낸날짜보낸시간받는사람확인
    $data[receiver]";}?> - - -
    - - - - - - diff --git a/extdbms/old/member_memo_up.php b/extdbms/old/member_memo_up.php deleted file mode 100644 index f5c6d09..0000000 --- a/extdbms/old/member_memo_up.php +++ /dev/null @@ -1,29 +0,0 @@ -"; -} else { - echo ""; -} diff --git a/extdbms/old/mk3.php b/extdbms/old/mk3.php deleted file mode 100644 index 7faf6d1..0000000 --- a/extdbms/old/mk3.php +++ /dev/null @@ -1,245 +0,0 @@ - - -
    - - - - -
    - - - -
    - >전체
    - >당일
    - >1일전
    - >2일전
    - >3일전
    - >커스텀(수정중)
    - - -
    - - $total) {$list_no = $total;} -$total_page = ($total != '0') ? ceil($total / $list_no) : '0'; - -$page = $_GET[curPage]; - -if (!$page) {$page = 1;} elseif ($page >= $total_page) {$page = $total_page;} else { $page = $page;} - -$next_page = ($page-'1') * $list_no; -$next_no = $next_page + $list_no; - -switch ($_GET[mode]) { - case "today": - //당일 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = CURDATE() ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "1day": - //1일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 1 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "2day": - //2일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 2 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - case "3day": - //3일전 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 3 DAY) ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - - case "custom": - //커스텀 - //$query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = CURDATE() Group By server_code ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit ".$next_page.",".$next_no; - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') AND service_payment_date = Date_Add(curdate(),INTERVAL 1 DAY) Group By server_code ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; - - default: - //전체 - $query = "SELECT clientdb.Client_Code,Client_Name,service_line,server_code,service_ip,service_payment_date,service_amount,service_nonpayment,service_note,adddb_case,adddb.client_code,adddb.service_code,adddb_nonpayment,adddb_payment,adddb_accountStatus,addDB_ip,addDB_payment_date FROM clientdb INNER JOIN servicedb ON clientdb.client_code = servicedb.client_code INNER JOIN adddb ON servicedb.service_code = adddb.service_code WHERE servicedb.service_code = adddb.service_code AND adddb.client_code not in ('C116','C219') AND adddb.adddb_accountStatus not in ('complete') ORDER BY service_payment_date,Client_Name,adddb_accountStatus ASC limit " . $next_page . "," . $next_no; - break; -} - -$result = @mysql_query($query, $db_connect) or die($db_q_error); -?> -
    -미납 서버 대수 : -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    고객명종류장비명결제일서비스 가격과금상태미납과금청구서 발행 대상비고
    ()
    -
    - 0) { - - $p_start = (($n_page - 1) * $page_scale)+'1'; - $link = ""; - $link .= "<<"; - $link .= ""; - echo $link . " "; -} -$is = ($n_page * $page_scale)+'1'; -for ($i = $is; $i < $is + $page_scale; $i++) { - - if ($i < $total_page+'1') { - if ($i == $page) {$ib = "$i";} else { $ib = $i;} - $link = ""; - $link .= $ib; - $link .= ""; - echo $link . " "; - } -} -if ($n_page < $page3) { - $link = ""; - $link .= ">>"; - $link .= ""; - echo $link; -} -?> -
    - - - -
    - - - - -
    - - - diff --git a/extdbms/old/mkwork.php b/extdbms/old/mkwork.php deleted file mode 100644 index afac756..0000000 --- a/extdbms/old/mkwork.php +++ /dev/null @@ -1,109 +0,0 @@ - - / / - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    업체명회선장비번호장비사양스위치OS기본IP정상가할인금액서비스가
    - - -
      - -
    • - -
    • - -
    - - - -echo .$mk_q1_data[service_line].$mk_q1_data[server_code].$mk_q1_data[service_sw].$mk_q1_data[service_os].$mk_q1_data[service_ip]; -echo "/"; -echo $mk_default; -echo "/"; -echo $mk_discount; -echo "/"; -echo $mk_service; -echo "
    "; -*/ -?> diff --git a/extdbms/old/navigation_alert.php b/extdbms/old/navigation_alert.php deleted file mode 100644 index 2f38332..0000000 --- a/extdbms/old/navigation_alert.php +++ /dev/null @@ -1,130 +0,0 @@ - - - - -"; -$result = @mysql_query($query, $db_connect) or die($db_q_error); - -?> -