373 lines
11 KiB
PHP
373 lines
11 KiB
PHP
<?php
|
|
|
|
/*
|
|
| --------------------------------------------------------------------
|
|
| App Namespace
|
|
| --------------------------------------------------------------------
|
|
|
|
|
| This defines the default Namespace that is used throughout
|
|
| CodeIgniter to refer to the Application directory. Change
|
|
| this constant to change the namespace that all application
|
|
| classes should use.
|
|
|
|
|
| NOTE: changing this will require manually modifying the
|
|
| existing namespaces of App\* namespaced-classes.
|
|
*/
|
|
defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
|
|
|
|
/*
|
|
| --------------------------------------------------------------------------
|
|
| Composer Path
|
|
| --------------------------------------------------------------------------
|
|
|
|
|
| The path that Composer's autoload file is expected to live. By default,
|
|
| the vendor folder is in the Root directory, but you can customize that here.
|
|
*/
|
|
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Timing Constants
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Provide simple ways to work with the myriad of PHP functions that
|
|
| require information to be in seconds.
|
|
*/
|
|
defined('SECOND') || define('SECOND', 1);
|
|
defined('MINUTE') || define('MINUTE', 60);
|
|
defined('HOUR') || define('HOUR', 3600);
|
|
defined('DAY') || define('DAY', 86400);
|
|
defined('WEEK') || define('WEEK', 604800);
|
|
defined('MONTH') || define('MONTH', 2_592_000);
|
|
defined('YEAR') || define('YEAR', 31_536_000);
|
|
defined('DECADE') || define('DECADE', 315_360_000);
|
|
|
|
/*
|
|
| --------------------------------------------------------------------------
|
|
| Exit Status Codes
|
|
| --------------------------------------------------------------------------
|
|
|
|
|
| Used to indicate the conditions under which the script is exit()ing.
|
|
| While there is no universal standard for error codes, there are some
|
|
| broad conventions. Three such conventions are mentioned below, for
|
|
| those who wish to make use of them. The CodeIgniter defaults were
|
|
| chosen for the least overlap with these conventions, while still
|
|
| leaving room for others to be defined in future versions and user
|
|
| applications.
|
|
|
|
|
| The three main conventions used for determining exit status codes
|
|
| are as follows:
|
|
|
|
|
| Standard C/C++ Library (stdlibc):
|
|
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
|
|
| (This link also contains other GNU-specific conventions)
|
|
| BSD sysexits.h:
|
|
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
|
|
| Bash scripting:
|
|
| http://tldp.org/LDP/abs/html/exitcodes.html
|
|
|
|
|
*/
|
|
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
|
|
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
|
|
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
|
|
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
|
|
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
|
|
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
|
|
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
|
|
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
|
|
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
|
|
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
|
|
|
|
define('MESSAGES', [
|
|
'CREATED' => '생성되었습니다.',
|
|
'UPDATED' => '수정되였습니다.',
|
|
'DELETED' => '삭제되였습니다.',
|
|
'SUCCESS' => '작업이 성공적으로 완료되었습니다.',
|
|
'FAILED' => '작업이 실패하였습니다.',
|
|
'NOT_FOUND' => '데이터가 존재하지 않습니다.',
|
|
'NOT_AUTH' => '권한이 없습니다.',
|
|
'NOT_LOGIN' => '로그인이 필요합니다.',
|
|
'NOT_MATCH' => '데이터가 일치하지 않습니다.',
|
|
'NOT_EMPTY' => '데이터가 비어있습니다.',
|
|
'NOT_UNIQUE' => '중복된 데이터가 존재합니다.',
|
|
'NOT_DELETE' => '삭제할 수 없는 데이터가 존재합니다.',
|
|
'NOT_UPDATE' => '수정할 수 없는 데이터가 존재합니다.',
|
|
'NOT_CREATE' => '생성할 수 없는 데이터가 존재합니다.',
|
|
'NOT_SYNC' => '동기화할 수 없는 데이터가 존재합니다.',
|
|
'NOT_SYNC_RESULT' => '동기화 결과가 실패하였습니다.',
|
|
'NOT_SYNC_SUCCESS' => '동기화 결과가 성공하였습니다.',
|
|
'NOT_SYNC_ERROR' => '동기화 결과가 실패하였습니다.',
|
|
'NOT_SYNC_NOTHING' => '동기화할 데이터가 없습니다.',
|
|
'NOT_SYNC_NOTHING_RESULT' => '동기화 결과가 없습니다.',
|
|
'NOT_SYNC_NOTHING_ERROR' => '동기화 결과가 없습니다.',
|
|
'LOGIN' => '로그인 하셨습니다.',
|
|
'LOGOUT' => '로그아웃 하셨습니다.'
|
|
]);
|
|
//URL
|
|
define('URLS', [
|
|
'LOGIN' => '/auth/login',
|
|
'GOOGLE_LOGIN' => '/auth/google_login',
|
|
'SIGNUP' => '/auth/signup',
|
|
'LOGOUT' => '/auth/logout',
|
|
]);
|
|
//SESSION 관련
|
|
define('SESSION_NAMES', [
|
|
'RETURN_URL' => "return_url",
|
|
'RETURN_MSG' => "return_message",
|
|
'ISLOGIN' => "islogined",
|
|
'AUTH' => 'auth',
|
|
]);
|
|
//메신저 관련
|
|
define("MESSENGERS", [
|
|
"skype" => [
|
|
"url" => "//join.skype.com/invite/uKUgXfZThSQC",
|
|
"icon" => 'SKYPE',
|
|
"id" => '',
|
|
],
|
|
"discord" => [
|
|
"url" => "//discord.gg/k6nQg84N",
|
|
"icon" => 'DISCORD',
|
|
"id" => '',
|
|
],
|
|
"telegram" => [
|
|
"url" => "//t.me/daemonidc",
|
|
"icon" => 'TELEGRAM',
|
|
"id" => '@daemonidc',
|
|
],
|
|
"kakaotalk" => [
|
|
"url" => "//t.me/daemonidc",
|
|
"icon" => 'KAKAO',
|
|
"id" => '',
|
|
],
|
|
]);
|
|
//아이콘 및 Sound관련
|
|
define('ICONS', [
|
|
'ADD' => 'ADD',
|
|
'LOGO' => 'LOGO',
|
|
'EXCEL' => 'EXCEL',
|
|
'PDF' => 'PDF',
|
|
'GOOGLE' => 'GOOGLE',
|
|
'MEMBER' => 'MEMBER',
|
|
'LOGIN' => 'LOGIN',
|
|
'LOGOUT' => 'LOGOUT',
|
|
'HOME' => 'HOME',
|
|
'MENU' => 'MENU',
|
|
'NEW' => 'NEW',
|
|
'REPLY' => 'REPLY',
|
|
'DATABASE' => 'DATABASE',
|
|
'DISLIKE' => 'DISLIKE',
|
|
'LIKE' => 'LIKE',
|
|
'DOWNLOAD' => 'DOWNLOAD',
|
|
'UPLOAD' => 'UPLOAD',
|
|
'COPY' => 'COPY',
|
|
'PASTE' => 'PASTE',
|
|
'EDIT' => 'EDIT',
|
|
'VIEW' => 'VIEW',
|
|
'VIEW_OFF' => 'VIEW_OFF',
|
|
'PRINT' => 'PRINT',
|
|
'SAVE' => 'SAVE',
|
|
'CANCEL' => 'CANCEL',
|
|
'CLOSE' => 'CLOSE',
|
|
'CLIENT' => 'CLIENT',
|
|
'CHART' => 'CHART',
|
|
'CHECK' => 'CHECK',
|
|
'CHECK_OFF' => 'CHECK_OFF',
|
|
'CHECK_ON' => 'CHECK_ON',
|
|
'CHECK_ALL' => 'CHECK_ALL',
|
|
'CHECK_NONE' => 'CHECK_NONE',
|
|
'CHECK_SOME' => 'CHECK_SOME',
|
|
'COUPON' => 'COUPON',
|
|
'HISTORY' => 'HISTORY',
|
|
'MODIFY' => 'MODIFY',
|
|
'MODIFY_ALL' => 'MODIFY_ALL',
|
|
'BATCHJOB' => 'BATCHJOB',
|
|
'DELETE' => 'DELETE',
|
|
'REBOOT' => 'REBOOT',
|
|
'RELOAD' => 'RELOAD',
|
|
'SETUP' => 'SETUP',
|
|
'FLAG' => 'FLAG',
|
|
'SEARCH' => 'SEARCH',
|
|
'PLAY' => 'PLAY',
|
|
'CART' => 'CART',
|
|
'CARD' => 'CARD',
|
|
'DEPOSIT' => 'DEPOSIT',
|
|
'DESKTOP' => 'DESKTOP',
|
|
'DEVICE' => 'DEVICE',
|
|
'UP' => 'UP',
|
|
'DOWN' => 'DOWN',
|
|
'LEFT' => 'LEFT',
|
|
'RIGHT' => 'RIGHT',
|
|
'IMAGE_FILE' => 'IMAGE_FILE',
|
|
'CLOUD' => 'CLOUD',
|
|
'SIGNPOST' => 'SIGNPOST',
|
|
'LOCK' => 'LOCK',
|
|
'UNLOCK' => 'UNLOCK',
|
|
'BOX' => 'BOX',
|
|
'BOXS' => 'BOXS',
|
|
'ONETIME' => 'ONETIME',
|
|
'MONTH' => 'MONTH',
|
|
'EMAIL' => 'EMAIL',
|
|
'MAIL' => 'MAIL',
|
|
'PHONE' => 'PHONE',
|
|
'POINT' => 'POINT',
|
|
'ALRAM' => 'ALRAM',
|
|
'PAYMENT' => 'PAYMENT',
|
|
'LINK' => 'LINK',
|
|
'SALE_UP' => 'SALE_UP',
|
|
'SALE_DOWN' => 'SALE_DOWN',
|
|
'SERVICE' => 'SERVICE',
|
|
'SERVICE_ITEM' => 'SERVICE_ITEM',
|
|
'SERVICE_ITEM_LINE' => 'SERVICE_ITEM_LINE',
|
|
'SERVICE_ITEM_IP' => 'SERVICE_ITEM_IP',
|
|
'SERVICE_ITEM_SERVER' => 'SERVICE_ITEM_SERVER',
|
|
'SERVICE_ITEM_CPU' => 'SERVICE_ITEM_CPU',
|
|
'SERVICE_ITEM_RAM' => 'SERVICE_ITEM_RAM',
|
|
'SERVICE_ITEM_STORAGE' => 'SERVICE_ITEM_STORAGE',
|
|
'SERVICE_ITEM_SOFTWARE' => 'SERVICE_ITEM_SOFTWARE',
|
|
'SERVICE_ITEM_DEFENCE' => 'SERVICE_ITEM_DEFENCE',
|
|
'SERVICE_ITEM_DOMAIN' => 'SERVICE_ITEM_DOMAIN',
|
|
'SERVICE_ITEM_OTHER' => 'SERVICE_ITEM_OTHER',
|
|
'SERVER_ITEM_CPU' => 'SERVER_ITEM_CPU',
|
|
'SERVER_ITEM_RAM' => 'SERVER_ITEM_RAM',
|
|
'SERVER_ITEM_DISK' => 'SERVER_ITEM_DISK',
|
|
'SERVER_ITEM_SWITCH' => 'SERVER_ITEM_SWITCH',
|
|
'SERVER_ITEM_OS' => 'SERVER_ITEM_OS',
|
|
'SERVER_ITEM_DB' => 'SERVER_ITEM_DB',
|
|
'SERVER_ITEM_SOFTWARE' => 'SERVER_ITEM_SOFTWARE',
|
|
'SERVER_ITEM_IP' => 'SERVER_ITEM_IP',
|
|
'SERVER_ITEM_CS' => 'SERVER_ITEM_CS',
|
|
'SERVER_ITEM_ETC' => 'SERVER_ITEM_ETC',
|
|
]);
|
|
//메신저 아이콘
|
|
define('MESSENGER_ICONS', [
|
|
'WHATSAPP' => 'WHATSAPP',
|
|
'VIBER' => 'VIBER',
|
|
'LINE' => 'LINE',
|
|
'KAKAO' => 'KAKAO',
|
|
'DISCORD' => 'DISCORD',
|
|
'TELEGRAM' => 'TELEGRAM',
|
|
'SKYPE' => 'SKYPE',
|
|
'YOUTUBE' => 'YOUTUBE',
|
|
'FACEBOOK' => 'FACEBOOK',
|
|
'TWITTER' => 'TWITTER',
|
|
'INSTAGRAM' => 'INSTAGRAM',
|
|
'LINKEDIN' => 'LINKEDIN',
|
|
'GITHUB' => 'GITHUB',
|
|
'GITLAB' => 'GITLAB',
|
|
'BITBUCKET' => 'BITBUCKET',
|
|
'REDDIT' => 'REDDIT',
|
|
'TIKTOK' => 'TIKTOK',
|
|
'PINTEREST' => 'PINTEREST',
|
|
'TUMBLR' => 'TUMBLR',
|
|
'SNAPCHAT' => 'SNAPCHAT',
|
|
]);
|
|
//배너관련 (경로만 유지)
|
|
define('TOP_BANNER', [
|
|
'default' => '/images/banner/sub_visual1.jpg',
|
|
'aboutus' => '/images/banner/sub_visual1.jpg',
|
|
'member' => '/images/banner/sub_visual1.jpg',
|
|
'hosting' => '/images/banner/sub_visual2.jpg',
|
|
'serverdevice' => '/images/banner/sub_visual3.jpg',
|
|
'service' => '/images/banner/sub_visual3.jpg',
|
|
'support' => '/images/banner/sub_visual4.jpg',
|
|
]);
|
|
//소리관련
|
|
define('AUDIOS', [
|
|
'Alram_GetEmail' => '<object width=0 height=0 data="/sound/jarvis_email.mp3" type="audio/mpeg"></object>',
|
|
]);
|
|
// Layout은 Config\Layout 클래스에서 관리됩니다.
|
|
|
|
//STATUS
|
|
define("STATUS", [
|
|
'AVAILABLE' => "available",
|
|
'FORBIDDEN' => "forbidden",
|
|
'OCCUPIED' => "occupied",
|
|
'SUCCESS' => "success",
|
|
'FAILED' => "fail",
|
|
'PAUSE' => "pause",
|
|
'TERMINATED' => "terminated",
|
|
'WITHDRAWAL' => "withdrawal",
|
|
'DEPOSIT' => "deposit",
|
|
'PAID' => 'paid',
|
|
'UNPAID' => 'unpaid',
|
|
]);
|
|
|
|
//ROLE
|
|
define("ROLE", [
|
|
'USER' => [
|
|
'MANAGER' => "manager",
|
|
'CLOUDFLARE' => "cloudflare",
|
|
'FIREWALL' => "firewall",
|
|
'SECURITY' => "security",
|
|
'DIRECTOR' => "director",
|
|
'MASTER' => "master",
|
|
],
|
|
'CLIENT' => [
|
|
'USER' => 'user',
|
|
'VIP' => 'vip',
|
|
'RESELLER' => 'reseller',
|
|
],
|
|
]);
|
|
|
|
//Default값 정의
|
|
define('DEFAULTS', [
|
|
'DELIMITER_FILE' => "||",
|
|
'DELIMITER_ROLE' => ",",
|
|
'INDEX_PERPAGE' => 20,
|
|
'STATUS' => STATUS['AVAILABLE']
|
|
]);
|
|
#########################
|
|
//사이트 선택관련
|
|
define("SITES", [
|
|
"primeidc" => "PRIME",
|
|
"itsolution" => "ITSOLUTION",
|
|
"gdidc" => "GDIDC",
|
|
]);
|
|
//사이트별 은행관련
|
|
define(
|
|
"BANKS",
|
|
[
|
|
'국민은행' => "국민은행",
|
|
"하나은행" => "하나은행",
|
|
"신한은행" => "신한은행",
|
|
"농협" => "농협",
|
|
"결제차감" => "결제차감",
|
|
],
|
|
);
|
|
//서비스 관련
|
|
define("SERVICE", [
|
|
"NEW_INTERVAL" => $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7,
|
|
]);
|
|
define("SERVER", []);
|
|
define("IP", [
|
|
"DEFAULT_PRICE" => 50000
|
|
]);
|
|
//서버파트 관련
|
|
define("SERVERPART", [
|
|
"CNT_RANGE" => array_combine(range(1, 10), range(1, 10)),
|
|
"SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK'],
|
|
"SERVICE_PARTTYPES" => ['SOFTWARE', 'CS', 'IP'],
|
|
"ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'SOFTWARE', 'IP', 'CS'],
|
|
]);
|
|
//결제 관련
|
|
define("PAYMENT", [
|
|
'BILLING' => [
|
|
'BASE' => 'base',
|
|
'MONTH' => 'month',
|
|
'ONETIME' => 'onetime',
|
|
'PREPAYMENT' => 'prepayment'
|
|
],
|
|
'PAY' => [
|
|
'ACCOUNT' => 'account',
|
|
'COUPON' => 'coupon',
|
|
'POINT' => 'point'
|
|
]
|
|
]);
|
|
//게시판 관련
|
|
define("BOARD", [
|
|
'CATEGORY' => [
|
|
'NOTICE' => 'notice',
|
|
'REQUESTTASK' => 'requesttask'
|
|
],
|
|
]);
|