dbms_primeidc_init...1
This commit is contained in:
parent
37e3c1ac23
commit
c255909cfc
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,4 @@
|
||||
<?php
|
||||
//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);
|
||||
|
||||
//List관련
|
||||
define('VIEW_LIST_PERPAGE', $_ENV['VIEW_LIST_PERPAGE'] ?? $_SERVER['VIEW_LIST_PERPAGE'] ?? 20);
|
||||
define('VIEW_LIST_PAGINATION_GROUPSIZE', $_ENV['VIEW_LIST_PAGINATION_GROUPSIZE'] ?? $_SERVER['VIEW_LIST_PAGINATION_GROUPSIZE'] ?? 10);
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
|
||||
namespace lib\Configs;
|
||||
|
||||
use lib\Controllers\DBMS\Client\DashboardController as ClientDashboardController;
|
||||
use lib\Controllers\DBMS\Client\CouponController;
|
||||
use lib\Controllers\DBMS\Client\MemoController;
|
||||
use lib\Controllers\DBMS\Client\PaymentController;
|
||||
use lib\Controllers\DBMS\Client\PointController;
|
||||
use lib\Controllers\DBMS\DashboardController;
|
||||
use lib\Controllers\DBMS\DefenceController;
|
||||
use lib\Controllers\DBMS\GearlistController;
|
||||
use lib\Controllers\DBMS\NavigatorController;
|
||||
use lib\Controllers\DBMS\ServiceController;
|
||||
use lib\Controllers\Client\DashboardController as ClientDashboardController;
|
||||
use lib\Controllers\Client\CouponController;
|
||||
use lib\Controllers\Client\MemoController;
|
||||
use lib\Controllers\Client\PaymentController;
|
||||
use lib\Controllers\Client\PointController;
|
||||
use lib\Controllers\DashboardController;
|
||||
use lib\Controllers\DefenceController;
|
||||
use lib\Controllers\GearlistController;
|
||||
use lib\Controllers\NavigatorController;
|
||||
use lib\Controllers\ServiceController;
|
||||
use lib\Core\Router;
|
||||
|
||||
//Client관련련
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Controllers\DBMS\DBMSController;
|
||||
use lib\Controllers\DBMSController;
|
||||
use lib\Services\ClientService;
|
||||
use lib\Services\MemberService;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Services\HistoryService;
|
||||
use lib\Services\OnetimeService;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Services\ClientService;
|
||||
use lib\Services\MemberService;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Helpers\ServiceHelper;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Utils\Pagination;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS\Client;
|
||||
namespace lib\Controllers\Client;
|
||||
|
||||
use lib\Services\HistoryService;
|
||||
use lib\Services\OnetimeService;
|
||||
use lib\Services\PointService;
|
||||
use lib\Utils\Pagination;
|
||||
use lib\Helpers\DBMS\Client\PointHelper;
|
||||
use lib\Helpers\Client\PointHelper;
|
||||
|
||||
class PointController extends ClientController
|
||||
{
|
||||
@ -88,6 +88,11 @@ class PointController extends ClientController
|
||||
if (!$client_code) {
|
||||
throw new \Exception("고객을 선택하지 않으셨습니다.");
|
||||
}
|
||||
$this->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
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Controllers\CommonController;
|
||||
use lib\Services\ServiceService;
|
||||
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Services\MemberService;
|
||||
use lib\Services\ClientService;
|
||||
use lib\Services\VPCService;
|
||||
use lib\Services\KCSService;
|
||||
use lib\Services\HistoryService;
|
||||
use lib\Helpers\DBMS\ServiceHelper;
|
||||
use lib\Helpers\ServiceHelper;
|
||||
|
||||
class DashboardController extends DBMSController
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Services\DefenceService;
|
||||
use lib\Utils\Pagination;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Entities\GearlistEntity;
|
||||
use lib\Services\GearlistService;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Helpers\ServiceHelper;
|
||||
use lib\Services\ClientService;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Services\ClientService;
|
||||
use lib\Services\ServerService;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers\DBMS;
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Services\AddDbService;
|
||||
use lib\Services\ClientService;
|
||||
@ -3,7 +3,6 @@
|
||||
namespace lib\Core;
|
||||
|
||||
use lib\Core\Router;
|
||||
use lib\Http\Response;
|
||||
|
||||
abstract class App
|
||||
{
|
||||
|
||||
@ -5,10 +5,10 @@ namespace lib\Core;
|
||||
require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Configs' . DIRECTORY_SEPARATOR . 'Constant.php';
|
||||
|
||||
use lib\Configs\View;
|
||||
use lib\Http\Redirect;
|
||||
use lib\Http\Request;
|
||||
use lib\Http\Session;
|
||||
use lib\Http\Url;
|
||||
use lib\Core\Http\Redirect;
|
||||
use lib\Core\Http\Request;
|
||||
use lib\Core\Http\Session;
|
||||
use lib\Core\Http\Url;
|
||||
|
||||
abstract class Controller
|
||||
{
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Database;
|
||||
namespace lib\Core\Database;
|
||||
|
||||
use lib\Database\QueryBuilder;
|
||||
use lib\Database\Core\QueryBuilder;
|
||||
use PDO;
|
||||
|
||||
class DB
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Database;
|
||||
namespace lib\Core\Database;
|
||||
|
||||
use PDO;
|
||||
use PDOStatement;
|
||||
@ -5,41 +5,4 @@ namespace lib\Core;
|
||||
abstract class Helper
|
||||
{
|
||||
protected function __construct() {} //
|
||||
|
||||
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;
|
||||
}
|
||||
} //Class
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class BearerToken extends Http
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Cookie extends Http
|
||||
{
|
||||
@ -13,13 +13,13 @@ class Cookie extends Http
|
||||
return $_COOKIE[$key] ?? $default;
|
||||
}
|
||||
|
||||
public function set(string $key, $value, int $expire = 3600, string $path = '/'): void
|
||||
public function set(string $key, $value, int $expire = APP_SESSION_COOKIE_EXPIRE, string $path = APP_SESSION_COOKIE_PATH): void
|
||||
{
|
||||
setcookie($key, $value, time() + $expire, $path);
|
||||
}
|
||||
|
||||
public function remove(string $key): void
|
||||
{
|
||||
setcookie($key, '', time() - 3600, '/');
|
||||
setcookie($key, '', time() - APP_SESSION_COOKIE_EXPIRE, APP_SESSION_COOKIE_PATH);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Http
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Redirect
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Request extends Http
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Response extends HTTP
|
||||
{
|
||||
@ -1,19 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Session extends Http
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->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();
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
class Url extends Http
|
||||
{
|
||||
@ -21,7 +21,7 @@ class Url extends Http
|
||||
}
|
||||
|
||||
// base URL만 반환
|
||||
public function baseURL(): string
|
||||
public function base(): string
|
||||
{
|
||||
return $this->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;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
namespace lib\Core\Http;
|
||||
|
||||
//사용법
|
||||
// $validator = new \lib\Http\Validator();
|
||||
49
extdbms/lib/Core/Logger.php
Normal file
49
extdbms/lib/Core/Logger.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace App\Core;
|
||||
|
||||
class Logger
|
||||
{
|
||||
protected string $logPath;
|
||||
|
||||
public function __construct(string $logDir = APP_LOG_PATH)
|
||||
{
|
||||
$this->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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Middlewares;
|
||||
namespace lib\Core\Middlewares;
|
||||
|
||||
use lib\Core\MiddlewareInterface;
|
||||
use lib\Core\Response;
|
||||
use lib\Core\Middlewares\MiddlewareInterface;
|
||||
use lib\Core\Http\Response;
|
||||
|
||||
class AuthMiddleware implements MiddlewareInterface
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Core;
|
||||
namespace lib\Core\Middlewares;
|
||||
|
||||
interface MiddlewareInterface
|
||||
{
|
||||
@ -2,8 +2,8 @@
|
||||
|
||||
namespace lib\Core;
|
||||
|
||||
use lib\Database\DB;
|
||||
use lib\Database\QueryBuilder;
|
||||
use lib\Core\Database\DB;
|
||||
use lib\Core\Database\QueryBuilder;
|
||||
|
||||
abstract class Model extends QueryBuilder
|
||||
{
|
||||
|
||||
@ -4,14 +4,5 @@ namespace lib\Core;
|
||||
|
||||
abstract class Service
|
||||
{
|
||||
private $_debug = false;
|
||||
protected function __construct() {} //
|
||||
final public function setDebug($debug)
|
||||
{
|
||||
$this->_debug = $debug;
|
||||
}
|
||||
final public function getDebug()
|
||||
{
|
||||
return $this->_debug;
|
||||
}
|
||||
} //Class
|
||||
|
||||
117
extdbms/lib/Core/Utils/Pagination.php
Normal file
117
extdbms/lib/Core/Utils/Pagination.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Core\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;
|
||||
|
||||
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 = '<nav><ul class="pagination">';
|
||||
$currentGroup = (int)floor(($this->currentPage - 1) / $this->groupSize);
|
||||
$startPage = $currentGroup * $this->groupSize + 1;
|
||||
$endPage = min($startPage + $this->groupSize - 1, $this->totalPages);
|
||||
|
||||
// << 그룹 이전
|
||||
if ($startPage > 1) {
|
||||
$prevGroupPage = max(1, $startPage - 1);
|
||||
$html .= $this->pageLink($prevGroupPage, '«', $baseUrl, $query);
|
||||
} else {
|
||||
$html .= '<li class="page-item disabled"><span class="page-link">«</span></li>';
|
||||
}
|
||||
|
||||
// 페이지 번호들
|
||||
for ($i = $startPage; $i <= $endPage; $i++) {
|
||||
if ($i === $this->currentPage) {
|
||||
$html .= '<li class="page-item active"><span class="page-link">' . $i . '</span></li>';
|
||||
} else {
|
||||
$html .= $this->pageLink($i, (string)$i, $baseUrl, $query);
|
||||
}
|
||||
}
|
||||
|
||||
// >> 그룹 다음
|
||||
if ($endPage < $this->totalPages) {
|
||||
$nextGroupPage = $endPage + 1;
|
||||
$html .= $this->pageLink($nextGroupPage, '»', $baseUrl, $query);
|
||||
} else {
|
||||
$html .= '<li class="page-item disabled"><span class="page-link">»</span></li>';
|
||||
}
|
||||
|
||||
$html .= '</ul></nav>';
|
||||
return $html;
|
||||
}
|
||||
private function pageLink(int $page, string $label, string $baseUrl, array $query): string
|
||||
{
|
||||
$query['curPage'] = $page;
|
||||
$url = $baseUrl . '?' . http_build_query($query);
|
||||
return '<li class="page-item"><a class="page-link" href="' . htmlspecialchars($url) . '">' . $label . '</a></li>';
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Helpers\DBMS\Client;
|
||||
namespace lib\Helpers\Client;
|
||||
|
||||
use lib\Helpers\CommonHelper;
|
||||
use lib\Models\ClientModel;
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Helpers\DBMS\Client;
|
||||
namespace lib\Helpers\Client;
|
||||
|
||||
class PointHelper extends ClientHelper
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Helpers\DBMS;
|
||||
namespace lib\Helpers;
|
||||
|
||||
use lib\Helpers\CommonHelper;
|
||||
use lib\Models\ServiceModel;
|
||||
@ -27,4 +27,28 @@ class ClientService extends CommonService
|
||||
{
|
||||
return Entity::class;
|
||||
}
|
||||
|
||||
//사용자 포인트 입금
|
||||
public function depositPoint(Entity $client, int $point): bool
|
||||
{
|
||||
if ($point < 0) {
|
||||
throw new \Exception("포인트금액이 잘못되었습니다. 포인트 : $point");
|
||||
}
|
||||
$this->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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,9 +27,4 @@ class PointService extends CommonService
|
||||
{
|
||||
return Entity::class;
|
||||
}
|
||||
|
||||
public function insert(array $formDatas): Entity
|
||||
{
|
||||
return parent::insert($formDatas);
|
||||
} //insert
|
||||
} //Class
|
||||
|
||||
@ -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 = '<nav><ul class="pagination">';
|
||||
$currentGroup = (int)floor(($this->currentPage - 1) / $this->groupSize);
|
||||
$startPage = $currentGroup * $this->groupSize + 1;
|
||||
$endPage = min($startPage + $this->groupSize - 1, $this->totalPages);
|
||||
|
||||
// << 그룹 이전
|
||||
if ($startPage > 1) {
|
||||
$prevGroupPage = max(1, $startPage - 1);
|
||||
$html .= $this->pageLink($prevGroupPage, '«', $baseUrl, $query);
|
||||
} else {
|
||||
$html .= '<li class="page-item disabled"><span class="page-link">«</span></li>';
|
||||
}
|
||||
|
||||
// 페이지 번호들
|
||||
for ($i = $startPage; $i <= $endPage; $i++) {
|
||||
if ($i === $this->currentPage) {
|
||||
$html .= '<li class="page-item active"><span class="page-link">' . $i . '</span></li>';
|
||||
} else {
|
||||
$html .= $this->pageLink($i, (string)$i, $baseUrl, $query);
|
||||
}
|
||||
}
|
||||
|
||||
// >> 그룹 다음
|
||||
if ($endPage < $this->totalPages) {
|
||||
$nextGroupPage = $endPage + 1;
|
||||
$html .= $this->pageLink($nextGroupPage, '»', $baseUrl, $query);
|
||||
} else {
|
||||
$html .= '<li class="page-item disabled"><span class="page-link">»</span></li>';
|
||||
}
|
||||
|
||||
$html .= '</ul></nav>';
|
||||
return $html;
|
||||
}
|
||||
private function pageLink(int $page, string $label, string $baseUrl, array $query): string
|
||||
{
|
||||
$query['curPage'] = $page;
|
||||
$url = $baseUrl . '?' . http_build_query($query);
|
||||
return '<li class="page-item"><a class="page-link" href="' . htmlspecialchars($url) . '">' . $label . '</a></li>';
|
||||
parent::__construct($totalItems, $currentPage, $perPage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
<script>
|
||||
<?php if ($this->session->hasFlash('error')) { ?>
|
||||
alert("<?= $this->session->getFlash('error') ?>");
|
||||
<?php } ?>
|
||||
<?php if ($this->session->hasFlash('success')) { ?>
|
||||
alert("<?= $this->session->getFlash('success') ?>");
|
||||
<?php } ?>
|
||||
</script>
|
||||
<div class="table-responsive" id="table">
|
||||
<input type="hidden" id="token">
|
||||
<table class="table table-bordered table-hover table-striped" style="text-align:center;">
|
||||
|
||||
@ -33,8 +33,8 @@
|
||||
<i class="fa fa-plus-square-o fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-9 text-right">
|
||||
<div class="huge"><?= $this->newServers ?></div>
|
||||
<div>최근 <?= $this->day ?>일간 신규서버 대수</div>
|
||||
<div class="huge"><?= $this->newServices ?></div>
|
||||
<div>최근 <?= $this->day ?>일간 신규서비스스 대수</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,209 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
switch ($_GET[mode]) {
|
||||
case "today":
|
||||
//당일
|
||||
$count = "SELECT count(clientdb.Client_Code) 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";
|
||||
$msg = "당일 미납리스트";
|
||||
$checkall2 = "checked";
|
||||
break;
|
||||
case "1day":
|
||||
//1일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+1 days"));
|
||||
$msg = "1일전 미납리스트($date)";
|
||||
$checkall3 = "checked";
|
||||
break;
|
||||
case "2day":
|
||||
//2일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+2 days"));
|
||||
$msg = "2일전 미납리스트($date)";
|
||||
$checkall4 = "checked";
|
||||
break;
|
||||
case "3day":
|
||||
//3일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+3 days"));
|
||||
$msg = "3일전 미납리스트($date)";
|
||||
$checkall5 = "checked";
|
||||
break;
|
||||
|
||||
case "custom":
|
||||
//커스텀
|
||||
//$count = "SELECT count(servicedb.server_code) 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";
|
||||
$count = "SELECT count(clientdb.Client_Code) 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";
|
||||
$msg = "커스텀 미납리스트($date)+1일";
|
||||
$checkall6 = "checked";
|
||||
break;
|
||||
|
||||
default:
|
||||
//전체
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$msg = "전체 미납리스트";
|
||||
$checkall1 = "checked";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="get" action="#">
|
||||
<input type="radio" name="mode" value="all" <?=$checkall1?>>전체
|
||||
<input type="radio" name="mode" value="today" <?=$checkall2?>>당일
|
||||
<input type="radio" name="mode" value="1day" <?=$checkall3?>>1일전
|
||||
<input type="radio" name="mode" value="2day" <?=$checkall4?>>2일전
|
||||
<input type="radio" name="mode" value="3day" <?=$checkall5?>>3일전
|
||||
<!-- <input type="radio" name="mode" value="custom" <?=$checkall6?>>커스텀(수정중)<br>-->
|
||||
<input type="hidden" name="ea" value="<?=$_GET[ea]?>">
|
||||
<input type="submit" value="확인">
|
||||
</form>
|
||||
<?
|
||||
$list_no = (!$_GET[ea]) ? '50' : $_GET[ea];
|
||||
|
||||
$total_num = mysql_fetch_array(mysql_query($count, $db_connect));
|
||||
|
||||
$total = $total_num[0];
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<!--미납 서버 대수 : <?=$total?>-->
|
||||
<?=$msg?> <a class="btn btn-outline btn-default" href="IdcDepositNonPaymentListExcel.dep">엑셀</a>
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;width:100px;">고객명</th>
|
||||
<th style="text-align:center;width:60px;">종류</th>
|
||||
<th style="text-align:center;width:130px;">장비명</th>
|
||||
<th style="text-align:center;width:120px;">IP</th>
|
||||
<th style="text-align:center;width:100px;">결제일</th>
|
||||
<th style="text-align:center;width:100px;">서비스 가격</th>
|
||||
<th style="text-align:center;width:100px;">과금상태</th>
|
||||
<th style="text-align:center;width:100px;">미납과금</th>
|
||||
<!--<th>청구서 발행 대상</th>-->
|
||||
<th style="text-align:center;">비고</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
$num = ($total) - $i;
|
||||
$reg_date = date("Y/m/d H:i", $data['reg_date']);
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<!-- <td><input type="radio"></td>
|
||||
<td><?=$data[Client_Code]?></td>
|
||||
-->
|
||||
<td style="text-align:center;"><a href="/IdcDepositNonPaymentList.dep?searchContent=<?=$data[Client_Name]?>"><?=$data[Client_Name]?></a></td>
|
||||
<td style="text-align:center;"><?=$data[adddb_case]?></td>
|
||||
<td style="text-align:center;"><?=$data[server_code]?></td>
|
||||
<td style="text-align:center;"><?=$data[service_ip]?></td>
|
||||
<!--<td><?=$data[service_code]?></td>-->
|
||||
|
||||
<td style="text-align:center;"><?=$data[service_payment_date]?></td>
|
||||
<td style="text-align:center;"><?=$data[service_amount]?></td>
|
||||
<!--<td><?=$data[adddb_payment]?></td>-->
|
||||
<td style="text-align:center;"><?=$data[adddb_accountStatus]?></td>
|
||||
<td style="text-align:center;"><?=$data[adddb_nonpayment]?></td>
|
||||
<!--<td><?=$data[adddb_accountStatus]?></td>-->
|
||||
<!--<td></td>-->
|
||||
<td><?=$data[service_note]?></td>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!--<div id='exec_time'><?=sprintf('%0.3f', getmicrotime() - $MK_start)?> sec</div>-->
|
||||
@ -1,3 +0,0 @@
|
||||
# EXTDBMS
|
||||
|
||||
DBMS용 PHP 소스
|
||||
@ -1,3 +0,0 @@
|
||||
<?
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];}
|
||||
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];}
|
||||
@ -1,113 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
?>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'FontAwesome';
|
||||
src: url('/font/fontawesome-webfont.eot?v=4.0.3');
|
||||
src: url('/font/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),
|
||||
url('/font/fontawesome-webfont.woff?v=4.0.3') format('woff'),
|
||||
url('/font/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),
|
||||
url('/font/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
div#mk_df_title {width:100%;background-color:#24a2e0;color:white;font-size:15px;}
|
||||
|
||||
.table-ul {background-color: skyblue;display: table;table-layout: fixed;text-align: center;width: 100%;}
|
||||
.table-ul li {border-right: 1px solid #fff;display: table-cell;vertical-align: middle;height: 40px;}
|
||||
.table-ul li:last-child {border-right: 0;}
|
||||
.table-ul li a {color: #fff;display: block;font-size: 10px;text-decoration: none;}
|
||||
|
||||
#active {background-color: #24a2e0;color: #fff;}
|
||||
.icon-CS방어:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-CS방어:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
.icon-CS-PRE:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-CS-PRE:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
.icon-CF방어:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-CF방어:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
.icon-BL상시:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-BL상시:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
.icon-인증방어:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-인증방어:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
.icon-MGTK:before {color: #fff;content:"\f021";font-family: "FontAwesome";}
|
||||
.icon-MGTK:hover {background-color:#24a2e0;color: #fff;}
|
||||
|
||||
</style>
|
||||
|
||||
<?
|
||||
$zonequery = "select * from corp_info_mk where depth = '1' order by idx asc";
|
||||
$zoneresult = @mysql_query($zonequery, $db_connect) or die($db_q_error);
|
||||
$zone_num = mysql_num_rows($zoneresult);
|
||||
?>
|
||||
<ul class="table-ul">
|
||||
<?
|
||||
for ($i = 0; $i < $zone_num; $i++) {
|
||||
$zonedata = mysql_fetch_assoc($zoneresult);
|
||||
?>
|
||||
<li class="icon-<?=$zonedata[zone]?>" id='<?if ($zonedata[zone] == $_GET[zone]) {echo "active";}?>' onclick="location.href='/corp_domain.php?zone=<?=$zonedata[zone]?>';"><br><?=$zonedata[zone]?></li>
|
||||
|
||||
<?}?>
|
||||
</ul>
|
||||
|
||||
<?
|
||||
$parentsquery = "select * from corp_info_mk where depth = '2' and zone = '" . $_GET['zone'] . "' order by parents asc";
|
||||
$parentsresult = @mysql_query($parentsquery, $db_connect) or die($db_q_error);
|
||||
$parents_num = mysql_num_rows($parentsresult);
|
||||
for ($j = 0; $j < $parents_num; $j++) {
|
||||
$parentsdata = mysql_fetch_assoc($parentsresult);
|
||||
?>
|
||||
<div id=mk_df_title>
|
||||
<?=$parentsdata[parents]?> / <?=$parentsdata[real_address]?>
|
||||
<button style="color:black;cursor: pointer;" onclick="location.href='/DefenseNewMK.sev?zone=<?=$_GET['zone']?>&parents=<?=$parentsdata[parents]?>';">등록</button>
|
||||
</div>
|
||||
<?
|
||||
$childquery = "select * from corp_info_mk where depth = '3' and zone = '" . $_GET['zone'] . "' and parents = '" . $parentsdata[parents] . "' order by parents asc";
|
||||
$childresult = @mysql_query($childquery, $db_connect) or die($db_q_error);
|
||||
$child_num = mysql_num_rows($childresult);
|
||||
?>
|
||||
<?
|
||||
for ($k = 0; $k < $child_num; $k++) {
|
||||
$childdata = mysql_fetch_assoc($childresult);
|
||||
$childidx = $childdata[idx];
|
||||
?>
|
||||
<li>
|
||||
<?=$childdata[child] . " / " . $childdata[cs_code] . " / " . $childdata[cs_ip] . " / " . $childdata[server_code] . " / " . $childdata[server_ip] . " / " . $childdata[setup_domain] . " / " . $childdata[setup_firewall] . " / " . $childdata[register_date] . " / " . $childdata[worker]?> - <a href=/DefenseModifyMK.sev?child=<?=$childidx?>>수정</a>
|
||||
</li>
|
||||
<?}?>
|
||||
<!--
|
||||
<td><?=$parentsdata[parents]?></td>
|
||||
<td><?=$parentsdata[acl_address]?></td>
|
||||
<td><?=$parentsdata[real_address]?></td>
|
||||
-->
|
||||
|
||||
<?}?>
|
||||
|
||||
<style>
|
||||
.123img {
|
||||
width:800px;
|
||||
height:300px;
|
||||
}
|
||||
.123mk1 {
|
||||
border: 10px solid red;
|
||||
}
|
||||
|
||||
.mk1123 {
|
||||
opacity: 0.4;
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
</style>
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers;
|
||||
|
||||
require_once "lib/autoload.php";
|
||||
|
||||
if ($argc < 2) {
|
||||
die("사용법 : php main.php 데이타파일명 [Type]\n");
|
||||
}
|
||||
if (!is_file($argv[1])) {
|
||||
die($argv[1] . "는 파일형식이 아닙니다. \n");
|
||||
}
|
||||
$client_field = isset($argv[2]) ? $argv[2] : 'Client_Code';
|
||||
$lines = file($argv[1]);
|
||||
if (!is_array($lines)) {
|
||||
die($argv[1] . "는 파일데이터에 오류가 있습니다. \n");
|
||||
}
|
||||
$control = new ServiceController();
|
||||
$control->execute($lines, $client_field);
|
||||
echo "Coupon 설정이 완료되었습니다.\n";
|
||||
@ -1,32 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<?
|
||||
if (!$_GET[client_code]) {
|
||||
echo "클라이언트 코드가 없습니다";
|
||||
} else {
|
||||
$query = "SELECT Client_Code, Client_Note FROM clientdb WHERE Client_Code LIKE '$_GET[client_code]'";
|
||||
$result = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
$data = mysql_fetch_assoc($result);
|
||||
}
|
||||
?>
|
||||
<form method="post" action="http://<?=$_SERVER['HTTP_HOST']?>/customer_memo_up.php">
|
||||
<input type="hidden" name="client_code" value="<?=$data[Client_Code]?>">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-bottom:0px">
|
||||
<tr>
|
||||
<td width="18%"><div align="center"><strong>비 고</strong></div></td>
|
||||
<td width="72%"><textarea rows="7" cols="120" name="msg"><?=$data[Client_Note]?></textarea></td>
|
||||
<td width="10%"><div align="center"><input type="submit" value="저장"/></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,22 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<?
|
||||
if (!$_POST[client_code]){
|
||||
echo "클라이언트 코드가 없습니다";
|
||||
} else {
|
||||
$query="UPDATE clientdb SET Client_Note='$_POST[msg]' WHERE Client_Code='$_POST[client_code]'";
|
||||
@mysql_query($query , $db_connect) or die($db_q_error);
|
||||
}
|
||||
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<meta http-equiv="refresh" content="0;URL='http://<?php echo $_SERVER["HTTP_HOST"]?>:6752/serviceDetail.sev?client_code=<?=$_POST[client_code]?>'" />
|
||||
<?//=$query?>
|
||||
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers;
|
||||
|
||||
require_once "lib/autoload.php";
|
||||
$control = new ServiceController();
|
||||
return $extra->execute("딥파인더");
|
||||
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
$dotenv = Dotenv::createImmutable(__DIR__);
|
||||
$dotenv->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();
|
||||
}
|
||||
@ -1,193 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
?>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'FontAwesome';
|
||||
src: url('/font/fontawesome-webfont.eot?v=4.0.3');
|
||||
src: url('/font/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),
|
||||
url('/font/fontawesome-webfont.woff?v=4.0.3') format('woff'),
|
||||
url('/font/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),
|
||||
url('/font/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
div#mk_df_title {
|
||||
width: 100%;
|
||||
background-color: #24a2e0;
|
||||
color: white;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.table-ul {
|
||||
background-color: skyblue;
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-ul li {
|
||||
border-right: 1px solid #fff;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.table-ul li:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.table-ul li a {
|
||||
color: #fff;
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#active {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-CS방어:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-CS방어:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-CS-PRE:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-CS-PRE:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-CF방어:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-CF방어:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-BL상시:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-BL상시:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-인증방어:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-인증방어:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-MGTK:before {
|
||||
color: #fff;
|
||||
content: "\f021";
|
||||
font-family: "FontAwesome";
|
||||
}
|
||||
|
||||
.icon-MGTK:hover {
|
||||
background-color: #24a2e0;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
<?
|
||||
$zonequery = "select * from defensemk where depth = '1' order by idx asc";
|
||||
$zoneresult = @mysql_query($zonequery, $db_connect) or die($db_q_error);
|
||||
$zone_num = mysql_num_rows($zoneresult);
|
||||
?>
|
||||
<ul class="table-ul">
|
||||
<?
|
||||
for ($i = 0; $i < $zone_num; $i++) {
|
||||
$zonedata = mysql_fetch_assoc($zoneresult);
|
||||
?>
|
||||
<li class="icon-<?= $zonedata[zone] ?>" id='<? if ($zonedata[zone] == $_GET[zone]) {
|
||||
echo "active";
|
||||
} ?>' onclick="location.href='/DefenseInfoMK.sev?zone=<?= $zonedata[zone] ?>';"><br><?= $zonedata[zone] ?></li>
|
||||
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<?
|
||||
$parentsquery = "select * from defensemk where depth = '2' and zone = '" . $_GET['zone'] . "' order by parents asc";
|
||||
$parentsresult = @mysql_query($parentsquery, $db_connect) or die($db_q_error);
|
||||
$parents_num = mysql_num_rows($parentsresult);
|
||||
for ($j = 0; $j < $parents_num; $j++) {
|
||||
$parentsdata = mysql_fetch_assoc($parentsresult);
|
||||
?>
|
||||
<div id=mk_df_title>
|
||||
<?= $parentsdata[parents] ?> / <?= $parentsdata[real_address] ?>
|
||||
<button style="color:black;cursor: pointer;" onclick="location.href='/DefenseNewMK.sev?zone=<?= $_GET['zone'] ?>&parents=<?= $parentsdata[parents] ?>';">등록</button>
|
||||
</div>
|
||||
<?
|
||||
$childquery = "select * from defensemk where depth = '3' and zone = '" . $_GET['zone'] . "' and parents = '" . $parentsdata[parents] . "' order by parents asc";
|
||||
$childresult = @mysql_query($childquery, $db_connect) or die($db_q_error);
|
||||
$child_num = mysql_num_rows($childresult);
|
||||
?>
|
||||
<?
|
||||
for ($k = 0; $k < $child_num; $k++) {
|
||||
$childdata = mysql_fetch_assoc($childresult);
|
||||
$childidx = $childdata[idx];
|
||||
?>
|
||||
<li>
|
||||
<?= $childdata[child] . " / " . $childdata[cs_code] . " / " . $childdata[cs_ip] . " / " . $childdata[server_code] . " / " . $childdata[server_ip] . " / " . $childdata[setup_domain] . " / " . $childdata[setup_firewall] . " / " . $childdata[register_date] . " / " . $childdata[worker] ?> - <a href=/DefenseModifyMK.sev?child=<?= $childidx ?>>수정</a>
|
||||
</li>
|
||||
<? } ?>
|
||||
<!--
|
||||
<td><?= $parentsdata[parents] ?></td>
|
||||
<td><?= $parentsdata[acl_address] ?></td>
|
||||
<td><?= $parentsdata[real_address] ?></td>
|
||||
-->
|
||||
|
||||
<? } ?>
|
||||
|
||||
<style>
|
||||
.123img {
|
||||
width: 800px;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.123mk1 {
|
||||
border: 10px solid red;
|
||||
}
|
||||
|
||||
.mk1123 {
|
||||
opacity: 0.4;
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--<img id="mk1" class="mk1" src="http://www.iknowjay.xyz/2.jpg" >-->
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,120 +0,0 @@
|
||||
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
?>
|
||||
<!--
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("ul#tabs li").click(function(e){
|
||||
if (!$(this).hasClass("active")) {
|
||||
var tabNum = $(this).index();
|
||||
// var nthChild = tabNum+1;
|
||||
$("ul#tabs li.active").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("ul#tab li.active").removeClass("active");
|
||||
// $("ul#tab li:nth-child("+nthChild+")").addClass("active");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
-->
|
||||
<style>
|
||||
ul#tabs {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
/* text-align: center;*/
|
||||
}
|
||||
ul#tabs li {
|
||||
display: inline-block;
|
||||
background-color: #32c896;
|
||||
border-bottom: solid 5px #238b68;
|
||||
padding: 5px 20px;
|
||||
margin-bottom: 4px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul#tabs li:hover {
|
||||
background-color: #238b68;
|
||||
}
|
||||
ul#tabs li.active {
|
||||
background-color: #238b68;
|
||||
}
|
||||
ul#tab {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
ul#tab li {
|
||||
display: none;
|
||||
}
|
||||
ul#tab li.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<?
|
||||
$zonequery="select * from defensemk where depth = '1' order by idx asc";
|
||||
$zoneresult = @mysql_query($zonequery , $db_connect) or die($db_q_error);
|
||||
$zone_num = mysql_num_rows($zoneresult);
|
||||
?>
|
||||
<ul id="tabs">
|
||||
<?
|
||||
for ($i=0;$i<$zone_num;$i++){
|
||||
$zonedata=mysql_fetch_assoc($zoneresult);
|
||||
?>
|
||||
<li onclick="location.href='/DefenseInfoMK.sev?zone=<?=$zonedata[zone]?>';"><?=$zonedata[zone]?></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<?
|
||||
$parentsquery="select * from defensemk where depth = '2' and zone = '".$_GET['zone']."' order by parents asc";
|
||||
$parentsresult = @mysql_query($parentsquery , $db_connect) or die($db_q_error);
|
||||
$parents_num = mysql_num_rows($parentsresult);
|
||||
for ($j=0;$j<$parents_num;$j++){
|
||||
$parentsdata=mysql_fetch_assoc($parentsresult);
|
||||
?>
|
||||
<strong>* <?=$parentsdata[parents]?> - <?=$parentsdata[real_address]?> - <a href=/DefenseNewMK.sev?zone=<?=$_GET['zone']?>&parents=<?=$parentsdata[parents]?>>등록</a></strong><br>
|
||||
<?
|
||||
$childquery="select * from defensemk where depth = '3' and zone = '".$_GET['zone']."' and parents = '".$parentsdata[parents]."' order by parents asc";
|
||||
$childresult = @mysql_query($childquery , $db_connect) or die($db_q_error);
|
||||
$child_num = mysql_num_rows($childresult);
|
||||
?>
|
||||
|
||||
<?
|
||||
for ($k=0;$k<$child_num;$k++){
|
||||
$childdata=mysql_fetch_assoc($childresult);
|
||||
$childidx=$childdata[idx];
|
||||
?>
|
||||
<?=$childdata[child]?>- <a href=/DefenseModifyMK.sev?child=<?=$childidx?>>수정</a><br>
|
||||
<? } ?>
|
||||
|
||||
<!--
|
||||
<td><?=$parentsdata[parents]?></td>
|
||||
<td><?=$parentsdata[acl_address]?></td>
|
||||
<td><?=$parentsdata[real_address]?></td>
|
||||
-->
|
||||
|
||||
<? } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MODIFY
|
||||
<!--
|
||||
<ul id="tab">
|
||||
<li class="active">
|
||||
<h2>This is the first tab</h2>
|
||||
</li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,120 +0,0 @@
|
||||
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
?>
|
||||
<!--
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("ul#tabs li").click(function(e){
|
||||
if (!$(this).hasClass("active")) {
|
||||
var tabNum = $(this).index();
|
||||
// var nthChild = tabNum+1;
|
||||
$("ul#tabs li.active").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
$("ul#tab li.active").removeClass("active");
|
||||
// $("ul#tab li:nth-child("+nthChild+")").addClass("active");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
-->
|
||||
<style>
|
||||
ul#tabs {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
/* text-align: center;*/
|
||||
}
|
||||
ul#tabs li {
|
||||
display: inline-block;
|
||||
background-color: #32c896;
|
||||
border-bottom: solid 5px #238b68;
|
||||
padding: 5px 20px;
|
||||
margin-bottom: 4px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul#tabs li:hover {
|
||||
background-color: #238b68;
|
||||
}
|
||||
ul#tabs li.active {
|
||||
background-color: #238b68;
|
||||
}
|
||||
ul#tab {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
ul#tab li {
|
||||
display: none;
|
||||
}
|
||||
ul#tab li.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<?
|
||||
$zonequery="select * from defensemk where depth = '1' order by idx asc";
|
||||
$zoneresult = @mysql_query($zonequery , $db_connect) or die($db_q_error);
|
||||
$zone_num = mysql_num_rows($zoneresult);
|
||||
?>
|
||||
<ul id="tabs">
|
||||
<?
|
||||
for ($i=0;$i<$zone_num;$i++){
|
||||
$zonedata=mysql_fetch_assoc($zoneresult);
|
||||
?>
|
||||
<li onclick="location.href='/DefenseInfoMK.sev?zone=<?=$zonedata[zone]?>';"><?=$zonedata[zone]?></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
<?
|
||||
$parentsquery="select * from defensemk where depth = '2' and zone = '".$_GET['zone']."' order by parents asc";
|
||||
$parentsresult = @mysql_query($parentsquery , $db_connect) or die($db_q_error);
|
||||
$parents_num = mysql_num_rows($parentsresult);
|
||||
for ($j=0;$j<$parents_num;$j++){
|
||||
$parentsdata=mysql_fetch_assoc($parentsresult);
|
||||
?>
|
||||
<strong>* <?=$parentsdata[parents]?> - <?=$parentsdata[real_address]?> - <a href=/DefenseNewMK.sev?zone=<?=$_GET['zone']?>&parents=<?=$parentsdata[parents]?>>등록</a></strong><br>
|
||||
<?
|
||||
$childquery="select * from defensemk where depth = '3' and zone = '".$_GET['zone']."' and parents = '".$parentsdata[parents]."' order by parents asc";
|
||||
$childresult = @mysql_query($childquery , $db_connect) or die($db_q_error);
|
||||
$child_num = mysql_num_rows($childresult);
|
||||
?>
|
||||
|
||||
<?
|
||||
for ($k=0;$k<$child_num;$k++){
|
||||
$childdata=mysql_fetch_assoc($childresult);
|
||||
$childidx=$childdata[idx];
|
||||
?>
|
||||
<?=$childdata[child]?>- <a href=/DefenseModifyMK.sev?child=<?=$childidx?>>수정</a><br>
|
||||
<? } ?>
|
||||
|
||||
<!--
|
||||
<td><?=$parentsdata[parents]?></td>
|
||||
<td><?=$parentsdata[acl_address]?></td>
|
||||
<td><?=$parentsdata[real_address]?></td>
|
||||
-->
|
||||
|
||||
<? } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NEW
|
||||
<!--
|
||||
<ul id="tab">
|
||||
<li class="active">
|
||||
<h2>This is the first tab</h2>
|
||||
</li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers;
|
||||
|
||||
require_once "lib/autoload.php";
|
||||
try {
|
||||
$control = new ClientController();
|
||||
return $control->getBillingPaper($_GET);
|
||||
} catch (\Exception $e) {
|
||||
die($e->getMessage());
|
||||
}
|
||||
@ -1,133 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
$query = "select * from onetimedb where onetime_case like 'domain' order by onetime_request_date desc";
|
||||
#$query="select * from onetimedb inner join memberdb where onetime_case like 'domain' order by onetime_request_date desc";
|
||||
|
||||
$list_no = (!$_GET[ea]) ? '500' : $_GET[ea];
|
||||
|
||||
$total_num = mysql_num_rows(mysql_query($query, $db_connect));
|
||||
|
||||
$total = $total_num;
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<br>
|
||||
2015년 전체구매건수 : <?=$total?>
|
||||
<br>
|
||||
<?=$msg?>
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:120px;text-align:center;">고객명</th>
|
||||
<th style="width:130px;text-align:center;">서비스코드</th>
|
||||
<th style="width:40px;text-align:center;">수량</th>
|
||||
<th style="width:100px;text-align:center;">결제금액</th>
|
||||
<th style="width:100px;text-align:center;">미납금액</th>
|
||||
<th style="width:100px;text-align:center;">신청일</th>
|
||||
<!--<td style="width:100px;text-align:center;">결제일</td>-->
|
||||
<th style="text-align:center;">비 고</th>
|
||||
<th style="width:80px;text-align:center;">담당자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
$num = ($total) - $i;
|
||||
# $reg_date=date("Y/m/d H:i", $data['reg_date']);
|
||||
# ($data[onetime_manager])
|
||||
/*
|
||||
switch($_GET[mode]){
|
||||
case "today":
|
||||
//당일
|
||||
$name="";
|
||||
break;
|
||||
case "1day":
|
||||
*/
|
||||
$mk1 = "select Client_Code,Client_Name from clientdb where Client_Code='" . $data[client_code] . "'";
|
||||
$mk1_result = @mysql_query($mk1, $db_connect) or die($db_q_error);
|
||||
$mk1_data = mysql_fetch_assoc($mk1_result);
|
||||
|
||||
$mk2 = "select id,name from memberdb where id='" . $data[onetime_manager] . "'";
|
||||
$mk2_result = @mysql_query($mk2, $db_connect) or die($db_q_error);
|
||||
$mk2_data = mysql_fetch_assoc($mk2_result);
|
||||
|
||||
$mk_num = preg_replace("/[^0-9]*/s", "", $data[onetime_sub]);
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td style="text-align:center;">
|
||||
<?=$mk1_data[Client_Name]?></td>
|
||||
<td style="text-align:center;"><a href="/IdcDepositNonPaymentList.dep?searchContent=<?=$data[service_code]?>"><?=$data[service_code]?></a></td>
|
||||
<td style="text-align:center;"><?=$mk_num?></td>
|
||||
<td style="text-align:center;"><?=$data[onetime_amount]?></td>
|
||||
<td style="text-align:center;"><?=$data[onetime_nonpayment]?></td>
|
||||
<td style="text-align:center;"><?=$data[onetime_request_date]?></td>
|
||||
<!--<td style="text-align:center;"><?=$data[onetime_payment_date]?></td>-->
|
||||
<td><?=$data[onetime_note]?></td>
|
||||
<!--<td><?=$data[name]?></td>-->
|
||||
<td style="text-align:center;"><?=$mk2_data[name]?></td>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
<!--
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDomainBuyListMK.cup?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDomainBuyListMK.cup?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDomainBuyListMK.cup?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
-->
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,120 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
?>
|
||||
|
||||
<?
|
||||
$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 asc";
|
||||
$coupon_data = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
$total = mysql_num_rows($coupon_data);
|
||||
|
||||
$list_no = (!$_GET[ea]) ? '50' : $_GET[ea];
|
||||
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<div class="table-responsive" id="table">전체 남은 수량 : <?=$total_coupon['sum(coupon)'];?> / 전체 사용 수량 : <?=$total_coupon['sum(coupon_use)']?><br><br>
|
||||
<input type="hidden" id="token">
|
||||
<table class="table table-bordered table-hover table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">No</th>
|
||||
<th style="text-align:center;">발급쿠폰</th>
|
||||
<th style="text-align:center;">남은수량</th>
|
||||
<th style="text-align:center;">사용완료</th>
|
||||
<th style="text-align:center;">고객명</th>
|
||||
<th style="text-align:center;">서비스코드</th>
|
||||
<th style="text-align:center;">장비명</th>
|
||||
<th style="text-align:center;">서버IP</th>
|
||||
<th style="text-align:center;">서비스개시일</th>
|
||||
<th style="text-align:center;">회선종류</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$coupon = mysql_fetch_assoc($coupon_data);
|
||||
$num = ($total) - $i;
|
||||
|
||||
$server_date = explode('-', $coupon['service_open_date']);
|
||||
$server_timestamp = mktime('0', '0', '0', $server_date[1], $server_date[2], $server_date[0]);
|
||||
|
||||
$timestamp = mktime('0', '0', '0', '18', '9', '2015');
|
||||
//echo $timestamp.$server_timestamp; // 기준일
|
||||
$default = $timestamp - 32676480; // 1432721520 <- 기준점에서 1년전 타임스탬프
|
||||
?>
|
||||
<tr onclick="location.href='/IdcCouponUseMK.cup?client_code=<?=$coupon[client_code]?>'" style="cursor: pointer;">
|
||||
<td><?=$num?></td>
|
||||
<td><?=$coupon[coupon] + $coupon[coupon_use]?></td>
|
||||
<td><strong><font color=blue><?=$coupon[coupon]?></font></strong><?// if ( $server_timestamp < $default ) { echo "<font color=blue>5</font>"; } else { echo "<font color=red>3</font>";}?></td>
|
||||
<td><?=$coupon[coupon_use]?></td>
|
||||
<td><?=$coupon[client_name]?></td>
|
||||
<td><?=$coupon[service_code]?></td>
|
||||
<td><?=$coupon[server_code]?></td>
|
||||
<td><?=$coupon[service_ip]?></td>
|
||||
<td><?=$coupon[service_open_date]?></td>
|
||||
<td><?=$coupon[service_line]?></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,125 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
?>
|
||||
|
||||
<?
|
||||
$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 asc";
|
||||
$coupon_data = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
$total = mysql_num_rows($coupon_data);
|
||||
|
||||
$list_no = (!$_GET[ea]) ? '50': $_GET[ea];
|
||||
|
||||
if($list_no>$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);
|
||||
?>
|
||||
<div class="table-responsive" id="table">전체 남은 수량 : <?=$total_coupon['sum(coupon)'];?> / 전체 사용 수량 : <?=$total_coupon['sum(coupon_use)']?><br><br>
|
||||
<input type="hidden" id="token">
|
||||
<table class="table table-bordered table-hover table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">No</th>
|
||||
<th style="text-align:center;">발급쿠폰</th>
|
||||
<th style="text-align:center;">남은수량</th>
|
||||
<th style="text-align:center;">사용완료</th>
|
||||
<th style="text-align:center;">고객명</th>
|
||||
<th style="text-align:center;">서비스코드</th>
|
||||
<th style="text-align:center;">장비명</th>
|
||||
<th style="text-align:center;">서버IP</th>
|
||||
<th style="text-align:center;">서비스개시일</th>
|
||||
<th style="text-align:center;">회선종류</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=$next_page;$i<$next_no;$i++){
|
||||
$coupon=mysql_fetch_assoc($coupon_data);
|
||||
$num=($total)-$i;
|
||||
|
||||
$server_date= explode('-', $coupon['service_open_date']);
|
||||
$server_timestamp = mktime('0','0','0',$server_date[1],$server_date[2],$server_date[0]);
|
||||
|
||||
$timestamp = mktime('0','0','0','18','9','2015');
|
||||
//echo $timestamp.$server_timestamp; // 기준일
|
||||
$default = $timestamp - 32676480; // 1432721520 <- 기준점에서 1년전 타임스탬프
|
||||
?>
|
||||
<tr onclick="location.href='/IdcCouponUseMK.cup?client_code=<?=$coupon[client_code]?>'" style="cursor: pointer;">
|
||||
<td><?=$num?></td>
|
||||
<td><?=$coupon[coupon]+$coupon[coupon_use]?></td>
|
||||
<td><strong><font color=blue><?=$coupon[coupon]?></font></strong><?// if ( $server_timestamp < $default ) { echo "<font color=blue>5</font>"; } else { echo "<font color=red>3</font>";}?></td>
|
||||
<td><?=$coupon[coupon_use]?></td>
|
||||
<td><?=$coupon[client_name]?></td>
|
||||
<td><?=$coupon[service_code]?></td>
|
||||
<td><?=$coupon[server_code]?></td>
|
||||
<td><?=$coupon[service_ip]?></td>
|
||||
<td><?=$coupon[service_open_date]?></td>
|
||||
<td><?=$coupon[service_line]?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div align='center'>
|
||||
<?
|
||||
|
||||
$setup_dir="http://localhost";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1')/$page_scale);
|
||||
$n_page = floor(($page-'1')/$page_scale);
|
||||
|
||||
if($n_page > 0){
|
||||
|
||||
$p_start = (($n_page-1)*$page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='".$setup_dir."/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=".$p_start."'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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="<b>$i</b>";}else{$ib=$i;}
|
||||
$link = "<a onfocus=blur() href='".$setup_dir."/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=".$i."'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link." ";
|
||||
}
|
||||
}
|
||||
if($n_page < $page3){
|
||||
$link = "<a onfocus=blur() href='".$setup_dir."/IdcCouponListMK.cup?ea=$_GET[ea]&curPage=".$i."'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,126 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//한글문제로 변경
|
||||
$sql = sprintf("SELECT s.*,c.Client_Name FROM servicedb AS s JOIN clientdb AS c ON s.client_code = c.Client_Code WHERE s.service_code='%s'", $_GET['service_code']);
|
||||
$stmt = @mysql_query($sql, $db_connect) or die($db_q_error);
|
||||
$service = mysql_fetch_assoc($stmt);
|
||||
|
||||
$sql = sprintf("SELECT * FROM memberdb WHERE id='%s'", $_GET['mkid']);
|
||||
$stmt = @mysql_query($sql, $db_connect) or die($db_q_error);
|
||||
$member = mysql_fetch_assoc($stmt);
|
||||
//한글문제로 변경
|
||||
|
||||
if ($_GET[mode] == "coupon_reg") {
|
||||
$coupon_query = "update servicedb set coupon=(coupon-$_GET[onetime_sub]), coupon_use=(coupon_use+$_GET[onetime_sub]) where service_code='$_GET[service_code]'";
|
||||
@mysql_query($coupon_query, $db_connect) or die($db_i_error);
|
||||
|
||||
$onetime_query = "INSERT INTO `onetimedb` (`client_code`, `service_code`, `onetime_case`, `onetime_sub`, `onetime_amount`, `onetime_payment`, `onetime_nonpayment`, `onetime_accountStatus`, `onetime_request_date`, `onetime_payment_date`, `onetime_note`, `onetime_handle_date`, `onetime_manager`, `client_name`, `server_code`) VALUES ('$_GET[client_code]', '$_GET[service_code]', 'domain', '$_GET[onetime_sub]', '0', '0', '0', 'complete', '$_GET[onetime_request_date]', '$_GET[onetime_request_date]', '도메인 쿠폰사용 / $_GET[onetime_note]', '$_GET[onetime_request_date]', '$_GET[mkid]', '$member[name]', '$service[server_code]')";
|
||||
@mysql_query($onetime_query, $db_connect) or die($db_i_error);
|
||||
|
||||
$history_query = "INSERT INTO `historydb` (`service_code`, `server_code`, `behavior_case`, `behavior`, `behavior_date`, `note`, `client_name`) VALUES ('$_GET[service_code]', '$service[server_code]', '도메인 쿠폰 구매 / $_GET[onetime_sub] 개', '도메인 쿠폰 구매', '$_GET[onetime_request_date]', '$member[name]', '$service[Client_Name]')";
|
||||
@mysql_query($history_query, $db_connect) or die($db_i_error);
|
||||
//echo $coupon_query;
|
||||
//echo "<br>";
|
||||
//echo $onetime_query;
|
||||
//echo "<br>";
|
||||
//echo $history_query;
|
||||
|
||||
//echo $_GET[client_code].$_GET[service_code].$_GET[client_name].$_GET[server_code].$_GET[coupon].$_GET[mkworker].$_GET[mkid];
|
||||
echo "
|
||||
<script type='text/javascript'>
|
||||
location.href='/serviceDetail.sev?client_code=" . $_GET[client_code] . "';
|
||||
</script>
|
||||
";
|
||||
} 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);
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<form method="get">
|
||||
<input type="hidden" name="mode" value="coupon_reg">
|
||||
<input type="hidden" name="mkworker" value="<?=$member['name']?>">
|
||||
<input type="hidden" name="mkid" value="<?=$_GET[mkid]?>">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>고객코드</td>
|
||||
<td colspan="5"><input type="hidden" name=client_code readonly="readonly" value="<?=$_GET[client_code]?>"><?=$_GET[client_code]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>서비스코드</td>
|
||||
<td colspan="5"><input type="hidden" name=service_code readonly="readonly" value="<?=$_GET[service_code]?>"><?=$_GET[service_code]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>고객명</td>
|
||||
<td colspan="5"><input type="hidden" name="client_name" readonly="readonly" value="<?=$service['Client_Name']?>"><?=$service['Client_Name']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>장비번호</td>
|
||||
<td colspan="5"><input type="hidden" name="server_code" readonly="readonly" value="<?=$service['server_code']?>"><?=$service['server_code']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="onetime_case" id="onetime_case" value="domain">
|
||||
도메인 구매 수량
|
||||
</td>
|
||||
<td colspan="5">
|
||||
<select name="onetime_sub" id="onetime_sub">
|
||||
<?
|
||||
for ($i = 0; $i < $service['coupon']; $i++) {
|
||||
$mkvalue = $i + 1;
|
||||
echo "<option value=\"$mkvalue\">$mkvalue 개</option>";
|
||||
}
|
||||
?>
|
||||
</select> (개별 서버에 할당된 남은 쿠폰 수량 : <?=$service['coupon']?>)
|
||||
<!--<input type="text" name="onetime_sub" id="onetime_sub"/> (개별 서버에 할당된 남은 쿠폰 수량 : <?=$service['coupon']?>)
|
||||
<br>* 도메인 쿠폰 사용시 반드시 숫자로만 갯수를 입력하세요 (* 3개 구매시 작성 예제 : <font color=red><b>3</b></font>)-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>서비스 금액</td>
|
||||
<td colspan="3">
|
||||
<input type="hidden" name="onetime_amount" id="onetime_amount" onkeyup="calc()" value="0"/> 도메인 쿠폰 사용
|
||||
<input type="hidden" name="onetime_payment" id="onetime_payment" value="0"/>
|
||||
<input type="hidden" name="onetime_nonpayment" id="onetime_nonpayment"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><?$today = date("Y-m-d", mktime(0, 0, 0, date(m), date(d), date(Y)));?>
|
||||
<td>도메인 신청일</td>
|
||||
<td>
|
||||
<input type="hidden" name="onetime_request_date" value="<?=$today?>"/><?=$today?>
|
||||
</td>
|
||||
<td>쿠폰 사용일</td>
|
||||
<td colspan="3">
|
||||
<input type="hidden" name="onetime_payment_date" value="<?=$today?>"/><?=$today?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>도메인 리스트</td>
|
||||
<td colspan="5"><textarea cols="100" rows="4" type="text" name="onetime_note" id="onetime_note" ></textarea>
|
||||
<br>(공백을 허용하지 않습니다. 예제처럼 붙여쓰기 하세요 / 예제 : test.com/123.com/idcjp.jp)
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<input class="btn btn-outline btn-primary" type="submit" value="저장하기">
|
||||
<input class="btn btn-outline btn-default" type="button" value="취소" onclick="location.href='/IdcCouponUseMK.cup?client_code=<?=$_GET[client_code]?>'">
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?}?>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,122 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
?>
|
||||
|
||||
<?
|
||||
|
||||
$client_code = $_GET[client_code];
|
||||
$mkworker = $_GET[mkworker];
|
||||
$mkid = $_GET[mkid];
|
||||
|
||||
$coupon_query = "select service_line, client_code , sum(coupon),clientdb.client_code,clientdb.client_name From servicedb Natural Join clientdb where service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and client_code = '$client_code' and service_ip not like '27.125.204%'";
|
||||
$data_coupon = @mysql_query($coupon_query, $db_connect) or die($db_q_error);
|
||||
$coupon = mysql_fetch_assoc($data_coupon);
|
||||
if ($coupon['sum(coupon)'] == null) {$coupon['sum(coupon)'] = 0;}
|
||||
|
||||
$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%'";
|
||||
$coupon_data = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
$total = mysql_num_rows($coupon_data);
|
||||
|
||||
$list_no = (!$_GET[ea]) ? '30' : $_GET[ea];
|
||||
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<h3>고객명 : <a href="/serviceDetail.sev?client_code=<?=$coupon[client_code]?>"><?=$coupon[client_name]?></a> / 쿠폰발급대상 : <?=$total?> 대 / 전체 남은 수량 : <?=$coupon['sum(coupon)']?> 개</h3>
|
||||
<div class="table-responsive" id="table">
|
||||
<input type="hidden" id="token">
|
||||
<table class="table table-bordered table-hover table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;">No</th>
|
||||
<th style="text-align:center;">발급쿠폰</th>
|
||||
<th style="text-align:center;">남은수량</th>
|
||||
<th style="text-align:center;">사용완료</th>
|
||||
<!-- <th>고객명</th>-->
|
||||
<th style="text-align:center;">서비스코드</th>
|
||||
<th style="text-align:center;">장비명</th>
|
||||
<th style="text-align:center;">서버IP</th>
|
||||
<th style="text-align:center;">서비스개시일</th>
|
||||
<th style="text-align:center;">회선종류</th>
|
||||
<th style="text-align:center;">사용</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$coupon = mysql_fetch_assoc($coupon_data);
|
||||
$num = ($total) - $i;
|
||||
if ($coupon[coupon] != '0') {$coupon_color = "<font color=red><strong>";} else { $coupon_color = "<font color=blue>";}
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$num?></td>
|
||||
<td><?=$coupon[coupon] + $coupon[coupon_use]?></td>
|
||||
<td onclick="location.href='/IdcCouponBuyMK.cup?service_code=<?=$coupon[service_code]?>&client_name=<?=$coupon[client_name]?>&client_code=<?=$coupon[client_code]?>&server_code=<?=$coupon[server_code]?>&coupon=<?=$coupon[coupon]?>&mode=<?=$_GET[mode]?>&mkworker=<?=$mkworker?>&mkid=<?=$mkid?>'" style="cursor: pointer;"><?=$coupon_color?><?=$coupon[coupon]?></font></td>
|
||||
<!-- <td><?=$coupon[client_name]?></td>-->
|
||||
<td><?=$coupon[coupon_use]?></td>
|
||||
<td><a href="/serviceDetailSolo.sev?client_code=<?=$coupon[client_code]?>&service_code=<?=$coupon[service_code]?>"><?=$coupon[service_code]?></td>
|
||||
<td><?=$coupon[server_code]?></td>
|
||||
<td><?=$coupon[service_ip]?></td>
|
||||
<td><?=$coupon[service_open_date]?></td>
|
||||
<td><?=$coupon[service_line]?></td>
|
||||
<td><a href=/IdcCouponBuyMK.cup?service_code=<?=$coupon[service_code]?>&client_name=<?=$coupon[client_name]?>&client_code=<?=$coupon[client_code]?>&server_code=<?=$coupon[server_code]?>&coupon=<?=$coupon[coupon]?>&mode=<?=$_GET[mode]?>&mkworker=<?=$mkworker?>&mkid=<?=$mkid?>>사용하기</a></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponUseMK.cup?client_code=$client_code&ea=$_GET[ea]&curPage=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponUseMK.cup?client_code=$client_code&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcCouponUseMK.cup?client_code=$client_code&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Controllers;
|
||||
|
||||
require_once "lib/autoload.php";
|
||||
$control = new ServiceController();
|
||||
return $extra->execute("닷 디펜더");
|
||||
@ -1,55 +0,0 @@
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!-- Start Expand CSS & JavaScript -->
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>css/nyroModal.css' type='text/css' />
|
||||
<script type='text/javascript' src='<?=$https?>://www.google.com/jsapi'></script>
|
||||
<script type='text/javascript' src='<?=$setup_dir?>script/nyroModal.js'></script>
|
||||
<!--[if IE 6]><script type='text/javascript' src='script/nyroModal-ie6.js'></script><![endif]-->
|
||||
<!--[if lt IE 9]>
|
||||
<script type='text/javascript' src='<?=$https?>://html5shiv.googlecode.com/svn/trunk/html5.js'></script>
|
||||
<![endif]-->
|
||||
<script type='text/javascript'>
|
||||
google.load( 'webfont', '1' );
|
||||
google.setOnLoadCallback(function() {
|
||||
WebFont.load({ custom: {
|
||||
families: [ 'NanumGothic' ],
|
||||
urls: [ '<?=$https?>://<?=$site_domain . $setup_dir?>css/webfont.css' ]
|
||||
}});
|
||||
});
|
||||
|
||||
var CurrentFontSize = <?=$fontsize?>
|
||||
|
||||
function SetFontSize(SizeFlag) {
|
||||
obj = document.getElementById("container")
|
||||
|
||||
if (SizeFlag == 'B') {
|
||||
CurrentFontSize = CurrentFontSize + 1
|
||||
obj.style.fontSize = CurrentFontSize + "pt"
|
||||
} else {
|
||||
if (CurrentFontSize>0) {
|
||||
CurrentFontSize = CurrentFontSize - 1}
|
||||
obj.style.fontSize = CurrentFontSize + "pt"}
|
||||
}
|
||||
|
||||
$(function() {$('.nyroModal').nyroModal();});
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-23382401-1']);
|
||||
_gaq.push(['_setDomainName', 'minkun.net']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<!-- End Expand CSS & JavaScript -->
|
||||
<!-- Total Execution Time -->
|
||||
<!--<div id='exec_time'><?=sprintf('%0.3f', getmicrotime() - $MK_start)?> sec</div>-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,225 +0,0 @@
|
||||
<?
|
||||
// 긴글 자르기
|
||||
function cut_str($str, $len, $suffix = "…")
|
||||
{
|
||||
$s = substr($str, 0, $len);
|
||||
$cnt = 0; // 마지막 글자에서 잘린 후 남겨진 바이트 수
|
||||
|
||||
$s_len = strlen($s);
|
||||
|
||||
// UTF-8 마지막 글자 깨짐 처리
|
||||
|
||||
for ($i = 0; $i < $s_len; $i++) {
|
||||
|
||||
$oc = ord($s[$i]);
|
||||
|
||||
if (($oc & 0xF8) == 0xF0) // 4byte
|
||||
{
|
||||
if ($i + 4 >= $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;
|
||||
}
|
||||
@ -1,118 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
|
||||
<?
|
||||
$ipsearch = $_GET[data];
|
||||
$query = "select * from serverdb where server_use_status like 'y' and gear_ready like'y' order by gear_ready_os asc";
|
||||
$result = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
|
||||
//$query1 = "select server_process, server_hdd, server_use_status,gear_ready,gear_ready_os, count(*) from serverdb where server_use_status like 'y' and gear_ready like 'y' group by server_process,gear_ready_os order by gear_ready_os,server_process asc";
|
||||
//$query1 = "select server_process, server_hdd, server_use_status,gear_ready,gear_ready_os, count(*) from serverdb where server_use_status like 'y' and gear_ready like 'y' group by server_process,gear_ready_os order by gear_ready_os,server_process asc";
|
||||
$query1 = "select server_process, server_hdd, server_use_status,gear_ready,gear_ready_os, count(*) from serverdb where server_use_status like 'y' and gear_ready like 'y' group by server_process,gear_ready_os, server_hdd order by gear_ready_os,server_process asc";
|
||||
$result1 = @mysql_query($query1, $db_connect) or die($db_q_error);
|
||||
$total = @mysql_num_rows(mysql_query($query, $db_connect)) or die($db_q_error);
|
||||
$totalcounter = @mysql_num_rows(mysql_query($query1, $db_connect)) or die($db_q_error);
|
||||
?>
|
||||
[ <a href="http://<?$_SERVER['HTTP_HOST']?>:6752/DefaultPage.cli">돌아가기</a> ]
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>CPU</td>
|
||||
<td>HDD</td>
|
||||
<td>OS</td>
|
||||
<td>수량</td>
|
||||
</tr>
|
||||
<?
|
||||
for ($i = 0; $i < $totalcounter; $i++) {
|
||||
$counter = mysql_fetch_assoc($result1);
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$counter["server_process"];?></td>
|
||||
<td><?=$counter["server_hdd"];?></td>
|
||||
<td><?=$counter["gear_ready_os"];?></td>
|
||||
<td><?=$counter["count(*)"];?> 대</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</table>
|
||||
<form method=post action="http://<?=$_SERVER['HTTP_HOST']?>/gear_ready_up.php">
|
||||
장비번호 : <input type=text name=server_code>
|
||||
<input type=hidden name=gear_ready value=y>
|
||||
OS : <select name=gear_ready_os>
|
||||
<option value="Windows 2008 32bit">Windows 2008 32bit</option>
|
||||
<option value="Windows 2008 64bit">Windows 2008 64bit</option>
|
||||
<option value="Windows 2008 32bit+SQL2008">Windows 2008 32bit+SQL2008</option>
|
||||
<option value="Windows 2008 64bit+SQL2008">Windows 2008 64bit+SQL2008</option>
|
||||
<option value="Windows 2008 R2">Windows 2008 R2</option>
|
||||
<option value="Windows 2008 R2+SQL2008R2">Windows 2008 R2+SQL2008R2</option>
|
||||
<option value="Windows 2008 R2-게임윙전용">2008 R2-게임윙전용</option>
|
||||
<option value="Windows 7 32bit">Windows 7 32bit</option>
|
||||
<option value="Windows 7 64bit">Windows 7 64bit</option>
|
||||
<option value="Windows 2003+SQL2005">Windows 2003+SQL2005</option>
|
||||
<option value="기타">기타</option>
|
||||
</select>
|
||||
작업자 : <input type=text name=gear_ready_admin>
|
||||
<input type=submit value="등록">
|
||||
</form>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>가용</td>
|
||||
<td>장비번호</td>
|
||||
<td>CPU</td>
|
||||
<td>RAM</td>
|
||||
<td>HDD</td>
|
||||
<td>BRAND</td>
|
||||
<td>포맷보류</td>
|
||||
<td>recieve</td>
|
||||
<td>release</td>
|
||||
<td>비고</td>
|
||||
<td>DISUSE</td>
|
||||
<td>현재</td>
|
||||
<td>이전</td>
|
||||
<td>READY</td>
|
||||
<td>READY</td>
|
||||
<td>READY</td>
|
||||
</tr>
|
||||
<?
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$data[server_use_status]?></td>
|
||||
<td><?=$data[server_code]?></td>
|
||||
<td><?=$data[server_cpuname]?></td>
|
||||
<td><?=$data[server_ram]?></td>
|
||||
<td><?=$data[server_hdd]?></td>
|
||||
<td><?=$data[server_brand]?></td>
|
||||
<td><?=$data[server_format_date]?></td>
|
||||
<td><?=$data[server_recieve_date]?></td>
|
||||
<td><?=$data[server_release_date]?></td>
|
||||
<td><?=$data[server_note]?></td>
|
||||
<td><?=$data[server_disuse_date]?></td>
|
||||
<td><?=$data[server_now_user]?></td>
|
||||
<td><?=$data[server_before_user]?></td>
|
||||
<td><?=$data[gear_ready]?></td>
|
||||
<td><?=$data[gear_ready_os]?></td>
|
||||
<td><?=$data[gear_ready_admin]?></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</table>
|
||||
|
||||
<!-- End Container -->
|
||||
<!-- Start Footer -->
|
||||
<div id='footer'></div>
|
||||
<!-- End Footer -->
|
||||
</div>
|
||||
<!-- End Base -->
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!--<div id='exec_time'><?=sprintf('%0.3f', getmicrotime() - $MK_start)?> sec</div>-->
|
||||
@ -1,24 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<?
|
||||
if (!$_POST[server_code]) {
|
||||
echo "서버 코드가 없습니다";
|
||||
} else {
|
||||
$query = "update idc.serverdb set gear_ready='y', gear_ready_os='$_POST[gear_ready_os]', gear_ready_admin='$_POST[gear_ready_admin]' where server_code='$_POST[server_code]'";
|
||||
|
||||
@mysql_query($query, $db_connect) or die($db_q_error);
|
||||
|
||||
}
|
||||
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<meta http-equiv="refresh" content="0;URL='/gear_ready.php" />
|
||||
<?//=$query?>
|
||||
@ -1,51 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!--
|
||||
Author : <?=$code_author?>
|
||||
Version : <?=$code_name?> <?=$code_version?>
|
||||
Release Date: <?=$code_r_date?>
|
||||
Patch Date : <?=$code_p_date?>
|
||||
E-Mail : <?=$code_e_mail?>
|
||||
Server Name : <?=$_SERVER['HTTP_HOST']?>
|
||||
Page URL : <?=$_SERVER['REQUEST_URI']?>
|
||||
<?//Script File : $_SERVER['SCRIPT_NAME']?>
|
||||
User Agent : <?=$_SERVER['HTTP_USER_AGENT']?>
|
||||
Remote IP : <?=$_SERVER['REMOTE_ADDR']?> : <?=$_SERVER['REMOTE_PORT']?>
|
||||
-->
|
||||
<html lang='<?=$lang?>'>
|
||||
<head>
|
||||
<meta charset='UTF-8' />
|
||||
<title><?=$site_title?></title>
|
||||
<meta name='keywords' content='<?=$meta_keywords?>' />
|
||||
<meta name='description' content='<?=$meta_description?>' />
|
||||
<script type='text/javascript' src='<?=$https?>://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='<?=$setup_dir?>script/alerts.js'></script>
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>css/alerts.css' type='text/css' />
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>css/layout.css' type='text/css' />
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>css/default.css' type='text/css' />
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>css/button.css' type='text/css' />
|
||||
<link rel='stylesheet' href='<?=$setup_dir?>style/<?=$module['style']?>/style.css' type='text/css' />
|
||||
<style type='text/css'>body {font-size: <?=$fontsize?>pt;} div#base {width:<?=$basewidth?>;}</style>
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 8]>
|
||||
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 80px; position: relative;'>
|
||||
<div style='position: absolute; right: 3px; top: 5px; font-family: courier new; font-weight: bold;'>
|
||||
<a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'>
|
||||
<img src='<?=$default_img_url?>ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
|
||||
<div style='width: 740px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
|
||||
<div style='width: 75px; float: left;'><img src='<?=$default_img_url?>ie6nomore-warning.jpg' alt='Warning!'/></div>
|
||||
<div style='width: 350px; float: left; font-family: Arial, sans-serif;'>
|
||||
<div style='font-size: 13px; font-weight: bold; margin-top: 5px;'><?=$lang_nomore_ie6_01?></div>
|
||||
<div style='font-size: 12px; margin-top: 5px; line-height: 12px;'><?=$lang_nomore_ie6_02?></div></div>
|
||||
<div style='width: 75px; float: left;'><a href='http://www.mozilla.or.kr/ko/' target='_blank'>
|
||||
<img src='<?=$default_img_url?>ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
|
||||
<div style='width: 75px; float: left;'><a href='http://windows.microsoft.com/ko-KR/internet-explorer/downloads/ie' target='_blank'>
|
||||
<img src='<?=$default_img_url?>ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>
|
||||
<div style='width: 73px; float: left;'><a href='http://www.apple.com/kr/safari/' target='_blank'>
|
||||
<img src='<?=$default_img_url?>ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
|
||||
<div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'>
|
||||
<img src='<?=$default_img_url?>ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
@ -1,146 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<style>
|
||||
table {
|
||||
background: #f5f5f5;
|
||||
border-collapse: separate;
|
||||
box-shadow: inset 0 1px 0 #fff;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
margin: 30px auto;
|
||||
text-align: left;
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: linear-gradient(#777, #444);
|
||||
border-left: 1px solid #555;
|
||||
border-right: 1px solid #777;
|
||||
border-top: 1px solid #555;
|
||||
border-bottom: 1px solid #333;
|
||||
box-shadow: inset 0 1px 0 #999;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
text-shadow: 0 1px 0 #000;
|
||||
}
|
||||
|
||||
th:after {
|
||||
background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.08));
|
||||
content: '';
|
||||
display: block;
|
||||
height: 25%;
|
||||
left: 0;
|
||||
margin: 1px 0 0 0;
|
||||
position: absolute;
|
||||
top: 25%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th:first-child {
|
||||
border-left: 1px solid #777;
|
||||
box-shadow: inset 1px 1px 0 #999;
|
||||
}
|
||||
|
||||
th:last-child {
|
||||
box-shadow: inset -1px 1px 0 #999;
|
||||
}
|
||||
|
||||
td {
|
||||
border-right: 1px solid #fff;
|
||||
border-left: 1px solid #e8e8e8;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding: 10px 15px;
|
||||
position: relative;
|
||||
transition: all 300ms;
|
||||
}
|
||||
td:first-child {
|
||||
box-shadow: inset 1px 0 0 #fff;
|
||||
}
|
||||
|
||||
td:last-child {
|
||||
border-right: 1px solid #e8e8e8;
|
||||
box-shadow: inset -1px 0 0 #fff;
|
||||
}
|
||||
|
||||
|
||||
tr:nth-child(odd) td {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
tr:last-of-type td {
|
||||
box-shadow: inset 0 -1px 0 #fff;
|
||||
}
|
||||
|
||||
tr:last-of-type td:first-child {
|
||||
box-shadow: inset 1px -1px 0 #fff;
|
||||
}
|
||||
|
||||
tr:last-of-type td:last-child {
|
||||
box-shadow: inset -1px -1px 0 #fff;
|
||||
}
|
||||
</style>
|
||||
<?
|
||||
$ipsearch = $_GET[data];
|
||||
$query = "select servicedb.client_code, servicedb.service_code, servicedb.server_code,servicedb.service_ip,servicedb.service_sw,servicedb.service_note, clientdb.Client_Code, clientdb.Client_Name, clientdb.Client_Phone1, clientdb.Client_EMail1 from servicedb INNER JOIN clientdb ON clientdb.Client_Code = servicedb.client_code where servicedb.service_ip like \"%$ipsearch%\" order by Client_Name asc";
|
||||
$result = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
$num = mysql_num_rows($result);
|
||||
?>
|
||||
<div align="center">
|
||||
[ <a href="http://<?$_SERVER['HTTP_HOST']?>:6752/DefaultPage.cli">돌아가기</a> ]
|
||||
|
||||
<form method=get>
|
||||
IP 입력 : <input type=text name=data>
|
||||
<input type=submit value="검색">
|
||||
</form>
|
||||
</div>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;width:40px;">CODE</th>
|
||||
<th style="text-align:center;width:60px;">NAME</th>
|
||||
<th style="text-align:center;width:60px;">SERVER</th>
|
||||
<th style="text-align:center;width:80px;">IP</th>
|
||||
<th style="text-align:center;width:80px;">SW</th>
|
||||
<th style="text-align:center;">NOTE</th>
|
||||
<th style="text-align:center;width:80px;">TEL</th>
|
||||
<th style="text-align:center;width:80px;">MAIL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?=$data[client_code]?></td>
|
||||
<td><?=$data[Client_Name]?></td>
|
||||
<td><?=$data[server_code]?></td>
|
||||
<td><?=$data[service_ip]?></td>
|
||||
<td><?=$data[service_sw]?></td>
|
||||
<td><?=$data[service_note]?></td>
|
||||
<td><?=$data[Client_Phone1]?></td>
|
||||
<td><?=$data[Client_EMail1]?></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
Binary file not shown.
@ -1,81 +0,0 @@
|
||||
<?
|
||||
//Platform for Personal Preferences
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"');
|
||||
|
||||
// 프로그램 정보
|
||||
$code_name = 'MK Core';
|
||||
$code_version = '0.4';
|
||||
$code_author = 'MINKUN';
|
||||
$code_homepage = 'dev.minkun.net';
|
||||
$code_e_mail = 'dev _____at_____ minkun.net';
|
||||
$code_r_date = 'Mar/19/2006';
|
||||
$code_p_date = 'Apr/17/2015';
|
||||
|
||||
//DB 에러 메세지
|
||||
$db_c_error = 'Database Connect Error!';
|
||||
$db_s_error = 'Database Select Error';
|
||||
$db_i_error = 'Data Insert Error';
|
||||
$db_q_error = 'Query Error';
|
||||
|
||||
//프로그램 로딩 시작
|
||||
$MK_start = getmicrotime();
|
||||
|
||||
//gzip 압축
|
||||
//if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
|
||||
|
||||
//DB 접속
|
||||
$envs = parse_ini_file($_SERVER["DOCUMENT_ROOT"] . "/env.ini", true);
|
||||
$db_connect = @mysql_connect($envs['db']['host'], $envs['db']['id'], $envs['db']['passwd']) or die($db_c_error);
|
||||
@mysql_select_db($envs['db']['name'], $db_connect) or die($db_s_error);
|
||||
|
||||
//사이트 기본 환경 DB 접속
|
||||
//$query='select * from '. $MK_Config;
|
||||
//$default_config=@mysql_query($query,$db_connect) or die($db_q_error);
|
||||
|
||||
//사이트 정보 로딩
|
||||
//$core=mysql_fetch_assoc($default_config);
|
||||
|
||||
$site_secure = "1";
|
||||
$site_domain = "localhost";
|
||||
$ssl_mode = "0";
|
||||
$rewrite_mode = "1";
|
||||
$site_title = "MK WORK";
|
||||
$time_zone = "Asia/Seoul";
|
||||
$default_lang = "ko";
|
||||
$lang = "ko";
|
||||
$fontsize = "9";
|
||||
$basewidth = "100%";
|
||||
$meta_keywords = "MK WORK";
|
||||
$meta_description = "MK WORK";
|
||||
$setup_dir = "/";
|
||||
//$landing_module=$core['landing_module'];
|
||||
//$landing_page=$core['landing_page'];
|
||||
//$google_smtp=$core['google_smtp'];
|
||||
//$google_access_id=$core['google_access_id'];
|
||||
//$google_access_pw=$core['google_access_pw'];
|
||||
//$google_access_pw=base64_decode("$google_access_pw");
|
||||
//$google_reply_mail=$core['google_reply_mail'];
|
||||
//$google_reply_name=$core['google_reply_name'];
|
||||
//$google_send_name=$core['google_send_name'];
|
||||
$referer_mode = "1";
|
||||
$referer_no = "10";
|
||||
$status_mode = "0";
|
||||
|
||||
//SSL 사용
|
||||
$https = ($ssl_mode == true) ? 'https' : 'http';
|
||||
|
||||
//타임존 , 현재시간 설정
|
||||
date_default_timezone_set($time_zone);
|
||||
$nowtime = $_SERVER['REQUEST_TIME'];
|
||||
$date = date("Y-m-d", $nowtime);
|
||||
|
||||
//공통 URL 지정
|
||||
$default_url = $setup_dir;
|
||||
$default_img_url = $setup_dir . 'img/';
|
||||
$default_script_url = $setup_dir . 'script/';
|
||||
$default_css_url = $setup_dir . 'css/';
|
||||
|
||||
mysql_query("set session character_set_connection=utf8;");
|
||||
mysql_query("set session character_set_results=utf8;");
|
||||
mysql_query("set session character_set_client=utf8;");
|
||||
@ -1,207 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
if ($_GET[page] == 'default') {$option = 'limit 0,5';} else { $option = '';}
|
||||
|
||||
switch ($_GET[name]) {
|
||||
#기타
|
||||
case '송충호':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
case '김효영':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
#1팀
|
||||
case '신인철':$option2 = "or receiver like '1팀' or receiver like '팀장' or receiver like '네트워크'";
|
||||
break;
|
||||
case '박요한':$option2 = "or receiver like '1팀' or receiver like '영업' or receiver like '네트워크'";
|
||||
break;
|
||||
case '이지승':$option2 = "or receiver like '1팀' or receiver like '시스템'";
|
||||
break;
|
||||
case '조준희':$option2 = "or receiver like '1팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김대영':$option2 = "or receiver like '1팀' or receiver like '네트워크'";
|
||||
break;
|
||||
#2팀
|
||||
case '김용민':$option2 = "or receiver like '2팀' or receiver like '팀장' or receiver like '시스템'";
|
||||
break;
|
||||
case '이풍호':$option2 = "or receiver like '2팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '강부중':$option2 = "or receiver like '2팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김은혁':$option2 = "or receiver like '2팀' or receiver like '영업' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김영석':$option2 = "or receiver like '2팀' or receiver like '시스템'";
|
||||
break;
|
||||
#기타
|
||||
case '고병남':$option2 = "or receiver like '영업' or receiver like '팀장'";
|
||||
break;
|
||||
case '최진호':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
|
||||
#알바
|
||||
case '류축복':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '박소영':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '이민제':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '류은총':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
|
||||
default:$option2 = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$query = "select * from commentdb where receiver like '$_GET[name]' $option2 or receiver like '전체' order by num desc $option";
|
||||
#$query="select * from onetimedb inner join memberdb where onetime_case like 'domain' order by onetime_request_date desc";
|
||||
?>
|
||||
<?
|
||||
$list_no = (!$_GET[ea]) ? '200' : $_GET[ea];
|
||||
|
||||
$total_num = mysql_num_rows(mysql_query($query, $db_connect));
|
||||
|
||||
$total = $total_num;
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<!--수신한 전체 메모 : <?=$total?>-->
|
||||
<?=$msg?>
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped" border=1 text-align=center>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:50px;text-align:center;">구분</th>
|
||||
<th style="width:80px;text-align:center;">보낸사람</th>
|
||||
<th style="text-align:center;">내용</th>
|
||||
<th style="width:100px;text-align:center;">보낸날짜</th>
|
||||
<th style="width:90px;text-align:center;">보낸시간</th>
|
||||
<th style="width:80px;text-align:center;">받는사람</th>
|
||||
<th style="width:80px;text-align:center;">확인</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
$num = ($total) - $i;
|
||||
# $reg_date=date("Y/m/d H:i", $data['reg_date']);
|
||||
# ($data[onetime_manager])
|
||||
/*
|
||||
switch($_GET[mode]){
|
||||
case "today":
|
||||
//당일
|
||||
$name="";
|
||||
break;
|
||||
case "1day":
|
||||
*/
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<?
|
||||
switch ($data[comment_case]) {
|
||||
case '1':$data[comment_case] = '<b><font color=red>긴급</font></b>';
|
||||
break;
|
||||
case '2':$data[comment_case] = '<font color=skyblue>지시</font>';
|
||||
break;
|
||||
case '3':$data[comment_case] = '<font color=green>전달';
|
||||
break;
|
||||
case '4':$data[comment_case] = '<font color=pupple>기타';
|
||||
break;
|
||||
default:$data[comment_case] = '일반';
|
||||
break;
|
||||
}
|
||||
$content = nl2br($data[content]);
|
||||
if ($_GET[page] == 'default') {$content = cut_str($content, 180, "<a href=/commentList.cm#receive> ... more</a>");} else {}
|
||||
?>
|
||||
<td style="text-align:center;"><?=$data[comment_case]?></td>
|
||||
<td style="text-align:center;"><?=$data[ID]?></td>
|
||||
<td ><?=$content?></td>
|
||||
<td style="text-align:center;"><?=$data[write_date]?></td>
|
||||
<td style="text-align:center;"><?=$data[write_time]?></td>
|
||||
<td style="text-align:center;"><?if ($data[receiver] != '전체') {echo "$data[receiver]";} else {echo "<font color=red>$data[receiver]</font>";}?></td>
|
||||
<td style="text-align:center;">
|
||||
<?
|
||||
//if(preg_match("/$data[read_check]/","$_GET[name]")){$mkflag="Y";}else{$mkflag="N";}
|
||||
if (strpos("$data[read_check]", "$_GET[name]") == true) {$mkflag = "Y";} else { $mkflag = "N";}
|
||||
|
||||
if ($data[read_check] == '1' or $mkflag == 'Y') {
|
||||
$msg = "<b>확인완료</b>";
|
||||
} 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 = "<form action=/member_memo_up.php method=post>
|
||||
<input type=hidden name=http_host value=$_GET[HTTP_HOST]>
|
||||
<input type=hidden name=mkread value=1>
|
||||
<input type=hidden name=num value=$data[num]>
|
||||
<input type=hidden name=page value=$_GET[page]>
|
||||
<input type=hidden name=name value='$_GET[name]'>
|
||||
<input type=hidden name=readname value='$data[read_check]'>
|
||||
<input type=submit value=읽음></form>";
|
||||
} else {
|
||||
$msg = "<form action=/member_memo_up.php method=post><input type=hidden name=page value=$_GET[page]><input type=hidden name=num value=$data[num]><input type=submit value=읽음></form>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?=$msg?>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
<!--
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,190 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
if ($_GET[page] == 'default') {$option = 'limit 0,5';} else { $option = '';}
|
||||
|
||||
switch ($_GET[name]) {
|
||||
#기타
|
||||
case '송충호':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
case '김효영':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
#1팀
|
||||
case '신인철':$option2 = "or receiver like '1팀' or receiver like '팀장' or receiver like '네트워크'";
|
||||
break;
|
||||
case '박요한':$option2 = "or receiver like '1팀' or receiver like '영업' or receiver like '네트워크'";
|
||||
break;
|
||||
case '이지승':$option2 = "or receiver like '1팀' or receiver like '시스템'";
|
||||
break;
|
||||
case '조준희':$option2 = "or receiver like '1팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김대영':$option2 = "or receiver like '1팀' or receiver like '네트워크'";
|
||||
break;
|
||||
#2팀
|
||||
case '김용민':$option2 = "or receiver like '2팀' or receiver like '팀장' or receiver like '시스템'";
|
||||
break;
|
||||
case '이풍호':$option2 = "or receiver like '2팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '강부중':$option2 = "or receiver like '2팀' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김은혁':$option2 = "or receiver like '2팀' or receiver like '영업' or receiver like '네트워크'";
|
||||
break;
|
||||
case '김영석':$option2 = "or receiver like '2팀' or receiver like '시스템'";
|
||||
break;
|
||||
#기타
|
||||
case '고병남':$option2 = "or receiver like '영업' or receiver like '팀장'";
|
||||
break;
|
||||
case '최진호':$option2 = "or receiver like '영업'";
|
||||
break;
|
||||
#알바
|
||||
case '류축복':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '박소영':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '이민제':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
case '류은총':$option2 = "or receiver like '알바'";
|
||||
break;
|
||||
|
||||
default:$option2 = '';
|
||||
break;
|
||||
}
|
||||
|
||||
$query = "select * from commentdb where ID like '$_GET[name]' order by num desc $option";
|
||||
#$query="select * from onetimedb inner join memberdb where onetime_case like 'domain' order by onetime_request_date desc";
|
||||
?>
|
||||
<?
|
||||
$list_no = (!$_GET[ea]) ? '200' : $_GET[ea];
|
||||
|
||||
$total_num = mysql_num_rows(mysql_query($query, $db_connect));
|
||||
|
||||
$total = $total_num;
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<!--수신한 전체 메모 : <?=$total?>-->
|
||||
<?=$msg?>
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped" border=1 text-align=center>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="40">구분</td>
|
||||
<td width="170">내용</td>
|
||||
<td width="70">보낸날짜</td>
|
||||
<td width="80">보낸시간</td>
|
||||
<td width="90">받는사람</td>
|
||||
<td width="90">확인</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
$num = ($total) - $i;
|
||||
# $reg_date=date("Y/m/d H:i", $data['reg_date']);
|
||||
# ($data[onetime_manager])
|
||||
/*
|
||||
switch($_GET[mode]){
|
||||
case "today":
|
||||
//당일
|
||||
$name="";
|
||||
break;
|
||||
case "1day":
|
||||
*/
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<?
|
||||
switch ($data[comment_case]) {
|
||||
case '1':$data[comment_case] = '<b><font color=red>긴급</font></b>';
|
||||
break;
|
||||
case '2':$data[comment_case] = '<font color=skyblue>지시</font>';
|
||||
break;
|
||||
case '3':$data[comment_case] = '<font color=green>전달';
|
||||
break;
|
||||
case '4':$data[comment_case] = '<font color=pupple>기타';
|
||||
break;
|
||||
default:$data[comment_case] = '일반';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<td><?=$data[comment_case]?></td>
|
||||
<td><?=nl2br($data[content])?></td>
|
||||
<td><?=$data[write_date]?></td>
|
||||
<td><?=$data[write_time]?></td>
|
||||
<td><?if ($data[receiver] != '전체') {echo "$data[receiver]";} else {echo "<font color=red>$data[receiver]</font>";}?></td>
|
||||
<td>
|
||||
<?if ($data[read_check] == 1) {
|
||||
$msg = '읽음';
|
||||
} elseif ($data[read_check] == "0") {
|
||||
$msg = '읽지않음';
|
||||
} else {
|
||||
$msg = $data[read_check];
|
||||
$msg = str_replace("0,", '', $msg);
|
||||
}?>
|
||||
<?=$msg?>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
<!--
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&page=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
if ($_POST[mkread]) {
|
||||
$query = "UPDATE commentdb SET read_check='$_POST[readname],$_POST[name]' WHERE num='$_POST[num]'";
|
||||
@mysql_query($query, $db_connect) or die(mysql_error() . $db_q_error);
|
||||
|
||||
} elseif ($_POST[num]) {
|
||||
// echo "발신자를 찾을 수 없습니다";
|
||||
$query = "UPDATE commentdb SET read_check='1' WHERE num='$_POST[num]'";
|
||||
@mysql_query($query, $db_connect) or die(mysql_error() . $db_q_error);
|
||||
|
||||
} else {
|
||||
$query = "INSERT INTO commentDB (ID, comment_case, content, receiver, write_date, write_time, read_check) values('$_POST[name]', '$_POST[comment_case]', '$_POST[content]', '$_POST[receiver]', curdate(), curtime(), 0)";
|
||||
//$query="UPDATE comment.db SET comment_case='$_POST[comment_case]',ID='$_POST[name]',content='$_POST[content]',receiver='$_POST[receiver]' WHERE Client_Code='$_POST[client_code]'";
|
||||
@mysql_query($query, $db_connect) or die(mysql_error() . $db_q_error);
|
||||
}
|
||||
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
if ($_POST[page] != 'comment') {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;URL='" . $setup_dir . "/DefaultPage.cli'\" />";
|
||||
} else {
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0;URL='" . $setup_dir . "/commentList.cm#receive'\" />";
|
||||
}
|
||||
@ -1,245 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<!-- Start Base -->
|
||||
<div id='base'>
|
||||
<!-- Start Header -->
|
||||
<div id='header'></div>
|
||||
<!-- End Header -->
|
||||
<!-- Start Container -->
|
||||
<div id='container'>
|
||||
|
||||
<?
|
||||
switch ($_GET[mode]) {
|
||||
case "today":
|
||||
//당일
|
||||
$count = "SELECT count(clientdb.Client_Code) 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";
|
||||
$msg = "당일 미납리스트";
|
||||
$checkall2 = "checked";
|
||||
break;
|
||||
case "1day":
|
||||
//1일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+1 days"));
|
||||
$msg = "1일전 미납리스트($date)";
|
||||
$checkall3 = "checked";
|
||||
break;
|
||||
case "2day":
|
||||
//2일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+2 days"));
|
||||
$msg = "2일전 미납리스트($date)";
|
||||
$checkall4 = "checked";
|
||||
break;
|
||||
case "3day":
|
||||
//3일전
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$date = str_replace('-', '/', $date);
|
||||
$date = date('Y-m-d', strtotime($date . "+3 days"));
|
||||
$msg = "3일전 미납리스트($date)";
|
||||
$checkall5 = "checked";
|
||||
break;
|
||||
|
||||
case "custom":
|
||||
//커스텀
|
||||
//$count = "SELECT count(servicedb.server_code) 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";
|
||||
$count = "SELECT count(clientdb.Client_Code) 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";
|
||||
$msg = "커스텀 미납리스트($date)+1일";
|
||||
$checkall6 = "checked";
|
||||
break;
|
||||
|
||||
default:
|
||||
//전체
|
||||
$count = "SELECT count(clientdb.Client_Code) 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 ";
|
||||
$msg = "전체 미납리스트";
|
||||
$checkall1 = "checked";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="get" action="#">
|
||||
<input type="radio" name="mode" value="all" <?=$checkall1?>>전체<br>
|
||||
<input type="radio" name="mode" value="today" <?=$checkall2?>>당일<br>
|
||||
<input type="radio" name="mode" value="1day" <?=$checkall3?>>1일전<br>
|
||||
<input type="radio" name="mode" value="2day" <?=$checkall4?>>2일전<br>
|
||||
<input type="radio" name="mode" value="3day" <?=$checkall5?>>3일전<br>
|
||||
<input type="radio" name="mode" value="custom" <?=$checkall6?>>커스텀(수정중)<br>
|
||||
<input type="hidden" name="ea" value="<?=$_GET[ea]?>">
|
||||
<input type="submit" value="확인">
|
||||
</form>
|
||||
|
||||
<?
|
||||
$list_no = (!$_GET[ea]) ? '50' : $_GET[ea];
|
||||
|
||||
$total_num = mysql_fetch_array(mysql_query($count, $db_connect));
|
||||
|
||||
$total = $total_num[0];
|
||||
if ($list_no > $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);
|
||||
?>
|
||||
<br>
|
||||
미납 서버 대수 : <?=$total?>
|
||||
<br>
|
||||
<?=$msg?>
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>고객명</td>
|
||||
<td>종류</td>
|
||||
<td>장비명</td>
|
||||
<td>결제일</td>
|
||||
<td>서비스 가격</td>
|
||||
<td>과금상태</td>
|
||||
<td>미납과금</td>
|
||||
<td>청구서 발행 대상</td>
|
||||
<td>비고</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--
|
||||
|
||||
<table border="1" cellspacing="0" text-align="center" align="center">
|
||||
<tr>
|
||||
<td>코드</td>
|
||||
<td>고객명</td>
|
||||
<td>장비번호</td>
|
||||
<td>서비스코드</td>
|
||||
<td>아이피</td>
|
||||
<td>결제일1</td>
|
||||
<td>서비스가</td>
|
||||
<td>결제금액</td>
|
||||
<td>미납</td>
|
||||
<td>종류</td>
|
||||
<td>완료</td>
|
||||
|
||||
</tr>
|
||||
-->
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
$num = ($total) - $i;
|
||||
$reg_date = date("Y/m/d H:i", $data['reg_date']);
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<!-- <td><input type="radio"></td>
|
||||
<td><?=$data[Client_Code]?></td>
|
||||
-->
|
||||
<td><a href="/IdcDepositNonPaymentList.dep?searchContent=<?=$data[Client_Name]?>"><?=$data[Client_Name]?></a></td>
|
||||
<td><?=$data[adddb_case]?></td>
|
||||
<td><?=$data[server_code]?>(<?=$data[service_ip]?>)</td>
|
||||
<!--<td><?=$data[service_code]?></td>-->
|
||||
<!--<td><?=$data[service_ip]?></td>-->
|
||||
<td><?=$data[service_payment_date]?></td>
|
||||
<td><?=$data[service_amount]?></td>
|
||||
<!--<td><?=$data[adddb_payment]?></td>-->
|
||||
<td><?=$data[adddb_accountStatus]?></td>
|
||||
<td><?=$data[adddb_nonpayment]?></td>
|
||||
<!--<td><?=$data[adddb_accountStatus]?></td>-->
|
||||
<td></td>
|
||||
<td><?=$data[service_note]?></td>
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositNonPaymentListMK.dep?mode=$_GET[mode]&ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- End Container -->
|
||||
<!-- Start Footer -->
|
||||
<div id='footer'></div>
|
||||
<!-- End Footer -->
|
||||
</div>
|
||||
<!-- End Base -->
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!--<div id='exec_time'><?=sprintf('%0.3f', getmicrotime() - $MK_start)?> sec</div>-->
|
||||
@ -1,109 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
|
||||
|
||||
$mk_q1="select * from servicedb where service_line NOT IN ('onetime','vpn','substitution','event','office','test') order by client_code,service_request_date,service_line asc";
|
||||
$mk_q1_query = @mysql_query($mk_q1 , $db_connect) or die($db_q_error);
|
||||
$mk_q1_num = mysql_num_rows($mk_q1_query);
|
||||
|
||||
$mk_summary="select sum(amount_rack),sum(amount_line),sum(amount_cpu),sum(amount_ip),sum(amount_cs),sum(amount_vpc),sum(amount_defence),sum(amount_etc) from amountdb";
|
||||
$mk_summary_query=@mysql_query($mk_summary , $db_connect) or die($db_q_error);
|
||||
$mk_summary_data=mysql_fetch_assoc($mk_summary_query);
|
||||
?>
|
||||
<?=$mk_summary_data['sum(amount_rack)']+$mk_summary_data['sum(amount_line)']+$mk_summary_data['sum(amount_cpu)']+$mk_summary_data['sum(amount_ip)']+$mk_summary_data['sum(amount_cs)']+$mk_summary_data['sum(amount_vpc)']+$mk_summary_data['sum(amount_defence)']+$mk_summary_data['sum(amount_etc)']?> / <?=$mk_summary_data['sum(amount_rack)']?> / <?//=$mk_summary_data?>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<th>업체명</th>
|
||||
<th>회선</th>
|
||||
<th>장비번호</th>
|
||||
<th>장비사양</th>
|
||||
<th>스위치</th>
|
||||
<th>OS</th>
|
||||
<th>기본IP</th>
|
||||
<th>정상가</th>
|
||||
<th>할인금액</th>
|
||||
<th>서비스가</th>
|
||||
</tr>
|
||||
<?
|
||||
for ($i=0;$i<$mk_q1_num;$i++){
|
||||
$mk_q1_data=mysql_fetch_assoc($mk_q1_query);
|
||||
|
||||
$mk_q2="select * from clientdb where Client_Code like '".$mk_q1_data[client_code]."'";
|
||||
$mk_q2_query = @mysql_query($mk_q2 , $db_connect) or die($db_q_error);
|
||||
$mk_q2_data=mysql_fetch_assoc($mk_q2_query);
|
||||
|
||||
$mk="select * from amountdb where service_code like '".$mk_q1_data[service_code]."' order by service_code asc";
|
||||
$mk_query = @mysql_query($mk , $db_connect) or die($db_q_error);
|
||||
$mk_num = mysql_num_rows($mk_query);
|
||||
$mk_data=mysql_fetch_assoc($mk_query);
|
||||
$mk_default=$mk_data[amount_rack]+$mk_data[amount_line]+$mk_data[amount_cpu]+$mk_data[amount_ip]+$mk_data[amount_cs]+$mk_data[amount_vpc]+$mk_data[amount_defence]+$mk_data[amount_etc];
|
||||
$mk_discount=$mk_data[amount_total_discount]+$mk_data[amount_sub_discount]+$mk_data[amount_defence_discount];
|
||||
$mk_service=$mk_default-$mk_discount;
|
||||
|
||||
|
||||
$mk_q3="select * from serverdb where server_code like '".$mk_q1_data[server_code]."'";
|
||||
$mk_q3_query = @mysql_query($mk_q3 , $db_connect) or die($db_q_error);
|
||||
$mk_q3_data=mysql_fetch_assoc($mk_q3_query);
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$mk_q2_data[Client_Name]?></td>
|
||||
<td><?=$mk_q1_data[service_line]?></td>
|
||||
<td><?=$mk_q1_data[server_code]?></td>
|
||||
<td><?=$mk_q3_data[server_spec]?></td>
|
||||
<td><?=$mk_q1_data[service_sw]?></td>
|
||||
<td><?=$mk_q1_data[service_os]?></td>
|
||||
<td><?=$mk_q1_data[service_ip]?></td>
|
||||
<td><?=$mk_default?></td>
|
||||
<td><?=$mk_discount?></td>
|
||||
<td><?=$mk_service?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
|
||||
/*
|
||||
|
||||
$mk="select * from amountdb order by service_code asc";
|
||||
$mk_query = @mysql_query($mk , $db_connect) or die($db_q_error);
|
||||
$mk_num = mysql_num_rows($mk_query);
|
||||
?>
|
||||
<ul class="table-ul">
|
||||
<?
|
||||
for ($i=0;$i<$mk_num;$i++){
|
||||
$mk_data=mysql_fetch_assoc($mk_query);
|
||||
$mk_default=$mk_data[amount_rack]+$mk_data[amount_line]+$mk_data[amount_cpu]+$mk_data[amount_ip]+$mk_data[amount_cs]+$mk_data[amount_vpc]+$mk_data[amount_defence]+$mk_data[amount_etc];
|
||||
$mk_discount=$mk_data[amount_total_discount]+$mk_data[amount_sub_discount]+$mk_data[amount_defence_discount];
|
||||
$mk_service=$mk_default-$mk_discount;
|
||||
?>
|
||||
<li>
|
||||
<?
|
||||
echo $mk_default;
|
||||
echo "/";
|
||||
echo $mk_discount;
|
||||
echo "/";
|
||||
echo $mk_service;
|
||||
?>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
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 "<br>";
|
||||
*/
|
||||
?>
|
||||
@ -1,130 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<!-- Start Base -->
|
||||
|
||||
|
||||
<?
|
||||
//if ($_GET[page]=='default'){$option='limit 0,5';} else { $option='';}
|
||||
|
||||
switch ($_GET[name]) {
|
||||
case '송충호':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '김효영':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
#1팀
|
||||
case '신인철':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '팀장' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '박요한':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '이지승':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) or (receiver like '시스템'and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '조준희':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '김대영':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
#2팀
|
||||
case '김용민':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '팀장' and read_check not like ('%,$_GET[name]%')) or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '시스템'and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '이풍호':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '강부중':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '김은혁':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '김영석':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '시스템'and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
#기타
|
||||
case '고병남':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '팀장' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '최진호':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '영업' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
#알바
|
||||
case '류축복':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '알바' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '박소영':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '알바' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '이민제':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '알바' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
case '류은총':$option2 = "or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '알바' and read_check not like ('%,$_GET[name]%')) ";
|
||||
break;
|
||||
/*
|
||||
#기타
|
||||
case '김효영': $option2="or receiver like '영업'";break;
|
||||
#1팀
|
||||
case '신인철': $option2="or receiver like '1팀' or receiver like '팀장' or receiver like '네트워크'";break;
|
||||
case '박요한': $option2="or receiver like '1팀' or receiver like '영업' or receiver like '네트워크'";break;
|
||||
case '이지승': $option2="or receiver like '1팀' or receiver like '시스템'";break;
|
||||
case '조준희': $option2="or receiver like '1팀' or receiver like '네트워크'";break;
|
||||
case '김대영': $option2="or receiver like '1팀' or receiver like '네트워크'";break;
|
||||
#2팀
|
||||
case '김용민': $option2="or receiver like '2팀' or receiver like '팀장' or receiver like '시스템'";break;
|
||||
case '이풍호': $option2="or receiver like '2팀' or receiver like '네트워크'";break;
|
||||
case '강부중': $option2="or receiver like '2팀' or receiver like '네트워크'";break;
|
||||
case '김은혁': $option2="or receiver like '2팀' or receiver like '영업' or receiver like '네트워크'";break;
|
||||
case '김영석': $option2="or receiver like '2팀' or receiver like '시스템'";break;
|
||||
#기타
|
||||
case '고병남': $option2="or receiver like '영업' or receiver like '팀장'";break;
|
||||
case '최진호': $option2="or receiver like '영업'";break;
|
||||
#알바
|
||||
case '류축복': $option2="or receiver like '알바'";break;
|
||||
case '박소영': $option2="or receiver like '알바'";break;
|
||||
case '이민제': $option2="or receiver like '알바'";break;
|
||||
case '류은총': $option2="or receiver like '알바'";break;
|
||||
*/
|
||||
default:$option2 = '';
|
||||
break;
|
||||
}
|
||||
|
||||
//$query="select * from commentdb where (receiver like '$_GET[name]' and read_check like '0') or (receiver like '2팀'and read_check not like ('%,$_GET[name]%')) or (receiver like '팀장'and read_check not like ('%,$_GET[name]%')) or (receiver like '시스템'and read_check not like ('%,$_GET[name]%')) or (receiver like '전체' and read_check not like ('%,$_GET[name]%')) or (receiver like '알바' and read_check not like ('%,$_GET[name]%')) or (receiver like '네트워크' and read_check not like ('%,$_GET[name]%')) or (receiver like '1팀' and read_check not like ('%,$_GET[name]%')) order by num desc";
|
||||
$query = "select * from commentdb where (receiver like '$_GET[name]' and read_check like '0') $option2 order by num desc";
|
||||
$total = mysql_num_rows(mysql_query($query, $db_connect));
|
||||
$total == "0" ? $newicon = "" : $newicon = "<img src=/new-icon.gif border=0>";
|
||||
$result = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
|
||||
?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i><?=$newicon?>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-messages">
|
||||
<?
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$data = mysql_fetch_assoc($result);
|
||||
?>
|
||||
<li>
|
||||
<a href="#">
|
||||
<div>
|
||||
<strong><?=$data[ID]?></strong>
|
||||
<span class="pull-right text-muted">
|
||||
<em><?=$data[write_date]?></em>
|
||||
</span>
|
||||
</div>
|
||||
<div><a href="http://<?=$_SERVER['HTTP_HOST']?>:6752/commentList.cm#receive"><?=nl2br($data[content])?></a></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<?}?>
|
||||
<li>
|
||||
<a class="text-center" href="#">
|
||||
<strong><a href="http://<?=$_SERVER['HTTP_HOST']?>:6752/commentList.cm#receive">Read All Messages</a></strong>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- End Container -->
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!--<div id='exec_time'><?=sprintf('%0.3f', getmicrotime() - $MK_start)?> sec</div>-->
|
||||
@ -1,94 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
if (!$_GET[limit]){$limit=5;} else {$limit=$_GET[limit];}
|
||||
|
||||
//$limit=$limit-1;
|
||||
$query="select * from servicedb order by service_num desc limit 0,$limit";
|
||||
$query_data = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;width:100px;">서비스코드</th>
|
||||
<th style="text-align:center;width:100px;">업체명</th>
|
||||
<th style="text-align:center;width:80px;">구분</th>
|
||||
<th style="text-align:center;width:100px;">장비번호</th>
|
||||
<th style="text-align:center;width:140px;">스위치정보</th>
|
||||
<th style="text-align:center;width:140px;">IP정보</th>
|
||||
<th style="text-align:center;width:50px;">CS</th>
|
||||
<th style="text-align:center;width:80px;">등록자</th>
|
||||
<th style="text-align:center;width:100px;">비고</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0;$i<$limit;$i++){
|
||||
$data=mysql_fetch_assoc($query_data);
|
||||
$customer= mysql_query("select Client_Code,Client_Name from clientdb where Client_Code like '".$data[client_code]."'",$db_connect) or die($db_q_error);
|
||||
$customer=mysql_fetch_assoc($customer);
|
||||
$member= mysql_query("select id,name from memberdb where id like '".$data[service_manager]."'",$db_connect) or die($db_q_error);
|
||||
$member=mysql_fetch_assoc($member);
|
||||
|
||||
$service_code=$data[service_code];
|
||||
$client_code=$data[client_code];
|
||||
$vpc="SELECT COUNT(*) AS cs_count FROM vpcdb WHERE `service_code` = '$service_code'";
|
||||
$kcs="SELECT COUNT(*) AS cs_count FROM kcsdb WHERE `service_code` = '$service_code'";
|
||||
$resultvpc = @mysql_query($vpc , $db_connect) or die($db_q_error);
|
||||
$resultkcs = @mysql_query($kcs , $db_connect) or die($db_q_error);
|
||||
$datavpc=mysql_fetch_assoc($resultvpc);
|
||||
$datakcs=mysql_fetch_assoc($resultkcs);
|
||||
//cut_str($str, $len, $suffix="…")
|
||||
|
||||
|
||||
switch ($data[service_line]) {
|
||||
case 'test': $data[service_line]="테스트";break;
|
||||
case 'event': $data[service_line]="이벤트";break;
|
||||
case 'office': $data[service_line]="자사서버";break;
|
||||
case 'onetime': $data[service_line]="일회성장비";break;
|
||||
case 'substitution': $data[service_line]="대체";break;
|
||||
case 'vpn': $data[service_line]="VPN";break;
|
||||
case 'normal': $data[service_line]="일반";break;
|
||||
case 'defence': $data[service_line]="방어";break;
|
||||
case 'solo': $data[service_line]="전용";break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:center;"><a href="/serviceDetailSolo.sev?client_code=<?=$data[client_code]?>&service_code=<?=$data[service_code]?>"><?=$data[service_code]?></a></td>
|
||||
<td style="text-align:center;"><nobr style=" display:block;"><?=cut_str($customer[Client_Name],10)?></nobr></td>
|
||||
<td style="text-align:center;"><?=$data[service_line]?></td>
|
||||
<td style="text-align:center;"><nobr style=" display:block;"><?=cut_str($data[server_code],10)?></nobr></td>
|
||||
<td style="text-align:center;"><nobr style=" display:block;"><?=cut_str($data[service_sw],10)?></nobr></td>
|
||||
<td style="text-align:center;"><?=$data[service_ip]?></td>
|
||||
<td style="text-align:center;">
|
||||
<?
|
||||
echo "<a href=/vpcInfo.sev?client_code=$client_code&csInfoFlag=true&service_code=$service_code>";
|
||||
echo $datavpc[cs_count];
|
||||
echo "</a> / ";
|
||||
echo "<a href=/vpcInfo.sev?client_code=$client_code&csInfoFlag=false&service_code=$service_code>";
|
||||
echo $datakcs[cs_count];
|
||||
echo "</a>";
|
||||
?>
|
||||
</td>
|
||||
<td style="text-align:center;"><?=$member[name]?></td>
|
||||
<td><nobr style=" display:block;"><?=cut_str($data[service_note],30)?></nobr></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,25 +0,0 @@
|
||||
<?
|
||||
//호스트네임
|
||||
$db_host='127.0.0.1';
|
||||
$db_id='idcjp';
|
||||
$db_pw='12clqkidc@!';
|
||||
$db_name='idc';
|
||||
|
||||
$db_c_error='Database Connect Error!';
|
||||
$db_s_error='Database Select Error';
|
||||
$db_i_error='Data Insert Error';
|
||||
$db_q_error='Query Error';
|
||||
|
||||
$db_connect=@mysql_connect($db_host, $db_id, $db_pw) or die($db_c_error);
|
||||
@mysql_select_db($db_name, $db_connect) or die($db_s_error);
|
||||
|
||||
$query="select * from officenetmk order by idx asc";
|
||||
$result = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
$num = mysql_num_rows($result);
|
||||
for ($i=0;$i<$num;$i++){
|
||||
$data=mysql_fetch_assoc($result);
|
||||
echo $data['address']."\n";
|
||||
}
|
||||
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,174 +0,0 @@
|
||||
<?
|
||||
|
||||
// 기본 설정 로딩
|
||||
require_once 'config.php';
|
||||
require_once 'function.php';
|
||||
require_once 'lib.php';
|
||||
|
||||
//HTML 시작
|
||||
if (!$_GET[limit]) {$limit = 10;} else { $limit = $_GET[limit];}
|
||||
|
||||
$query = "select deposit_num from depositdb";
|
||||
$total_data = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
$total = mysql_num_rows($total_data);
|
||||
|
||||
$list_no = (!$_GET[ea]) ? '20' : $_GET[ea];
|
||||
|
||||
if ($list_no > $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 * from depositdb order by deposit_num desc limit " . $next_page . "," . $next_no;
|
||||
$query_data = @mysql_query($query, $db_connect) or die($db_q_error);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<!--
|
||||
<form action="IdcDepositList.dep" method="post">
|
||||
<div class="col-lg-6 col-md-7 col-sm-8 col-xs-12">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="searchContent" placeholder="고객명" value="${searchContent }">
|
||||
<div class="input-group-btn">
|
||||
<input type="submit" class="btn btn-info btn-outline" value="검색">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
<input type="hidden" id="token">
|
||||
<div class="table-responsive" id="table">
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align:center;width:85px;">고객명</th>
|
||||
<th style="text-align:center;width:60px;">은행</th>
|
||||
<th style="text-align:center;width:80px;">날짜</th>
|
||||
<th style="text-align:center;width:90px;">금액</th>
|
||||
<th style="text-align:center;width:60px;">입금자</th>
|
||||
<th style="text-align:center;width:300px;">비고</th>
|
||||
<th style="text-align:center;width:80px;">처리자</th>
|
||||
<th style="text-align:center;width:40px;">수정</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
|
||||
for ($i = $next_page; $i < $next_no; $i++) {
|
||||
$data = mysql_fetch_assoc($query_data);
|
||||
$deposit_amount = number_format($data[deposit_amount]);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:center"><a href="/serviceList.sev?filter=mk_all&searchContextService=<?=$data[client_name]?>"><?=$data[client_name]?></a></td>
|
||||
<td style="text-align:center"><?=$data[deposit_bank]?></td>
|
||||
<td style="text-align:center"><?=$data[deposit_date]?></td>
|
||||
<td style="text-align:center"><?=$deposit_amount?></td>
|
||||
<td style="text-align:center"><?=$data[deposit_name]?></td>
|
||||
<td><?=$data[deposit_note]?></td>
|
||||
<td style="text-align:center"><?=$data[mkworker]?></td>
|
||||
<td style="text-align:center"><a href=/IdcDepositList.dep?searchContent=<?=$data[client_name]?>>수정</a></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<!--
|
||||
<div>
|
||||
<ul class="pagination" style="margin:0px;">
|
||||
<li>
|
||||
<a class="btn btn-outline btn-default" href="IdcDepositList.dep?searchContent=${searchContent }">
|
||||
<i class="fa fa-angle-double-left "></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<c:if test="${curPage!=1 }">
|
||||
<a class="btn btn-outline_btn-default" href="IdcDepositList.dep?searchOption=${searchOption }&curPage=${curPage-1 }&searchContent=${searchContent}">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</c:if>
|
||||
<c:if test="${curPage==1 }">
|
||||
<a class="btn btn-outline_btn-default" href="IdcDepositList.dep?searchOption=${searchOption }&curPage=1&searchContent=${searchContent}">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</c:if>
|
||||
</li>
|
||||
<c:forEach var="i" begin="${firstPage }" end="${endPage }">
|
||||
<li>
|
||||
<a class="btn btn-outline btn-defualt" href="IdcDepositList.dep?curPage=${i}&searchContent=${searchContent }">${i}</a>
|
||||
</li>
|
||||
</c:forEach>
|
||||
<li>
|
||||
<c:if test="${curPage!=pageCnt }">
|
||||
<a class="btn btn-outline_btn-default" href="IdcDepositList.dep?searchOption=${searchOption }&curPage=${curPage+1 }&searchContent=${searchContent}">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</c:if>
|
||||
<c:if test="${curPage==pageCnt }">
|
||||
<a class="btn btn-outline_btn-default" href="IdcDepositList.dep?searchOption=${searchOption }&curPage=${pageCnt }&searchContent=${searchContent}">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</c:if>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-outline btn-default" href="IdcDepositList.dep?curPage=${pageCnt}&searchContent=${searchContent }">
|
||||
<i class="fa fa-angle-double-right "></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div align='center'>
|
||||
<?
|
||||
$setup_dir = "http://" . $_SERVER['HTTP_HOST'] . ":6752";
|
||||
$page_scale = 10;
|
||||
$page3 = floor(($total_page-'1') / $page_scale);
|
||||
$n_page = floor(($page-'1') / $page_scale);
|
||||
|
||||
if ($n_page > 0) {
|
||||
|
||||
$p_start = (($n_page - 1) * $page_scale)+'1';
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositListMK.dep?ea=$_GET[ea]&curPage=" . $p_start . "'>";
|
||||
$link .= "<<";
|
||||
$link .= "</a>";
|
||||
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 = "<b>$i</b>";} else { $ib = $i;}
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositListMK.dep?ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= $ib;
|
||||
$link .= "</a>";
|
||||
echo $link . " ";
|
||||
}
|
||||
}
|
||||
if ($n_page < $page3) {
|
||||
$link = "<a onfocus=blur() href='" . $setup_dir . "/IdcDepositListMK.dep?ea=$_GET[ea]&curPage=" . $i . "'>";
|
||||
$link .= ">>";
|
||||
$link .= "</a>";
|
||||
echo $link;
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
|
||||
?>
|
||||
@ -1,236 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
/*
|
||||
$lineup_data=@mysql_query("select * from serverdb where
|
||||
server_cpuname not in ('X4-Q','X6-Q','A1.6','CN2.','C2800','C2600','COL','CUS','NX227','NX20','NX21','DQ28','DQ26','DQ31','DQ18','DQ23','DQ20','DX34','DX38','DX28','DX32','DX36',
|
||||
'DX30','MD32','MD30','Q16R','Q316','Q310','Q283','Q266','Q25R','Q213','Q20R','Q186','Q24','Q20','Q240','DX3','DQ233')
|
||||
and server_process not in ('COLOCATION','CELERON','INTEL i5','INTEL i3','INTEL i7','ATOM','AMD','XEON Single','CUSTOM','INS-일회성','','','')
|
||||
and server_spec not in ('DQ266','DQ240','DQ213','Q2.130','Q2.4','Q16','DQ20R12','Q330','i3-3.30','i5-3.20','i7-3.4','i7-3.33','X36','X24','X30','NX213','i7-4790','DQ316','MQ23',
|
||||
'DQ183','DQ283','Q25','A1.66','','','','','','')
|
||||
#and server_spec like 'DH266'
|
||||
group by server_cpuname
|
||||
order by server_process,server_cpuname asc" , $db_connect) or die($db_q_error);
|
||||
*/
|
||||
|
||||
|
||||
$lineup_data=@mysql_query("select * from gearlist where process not in
|
||||
('COLOCATION','','','','','','','XEON Single','CUSTOM','INS-일회성','NEHALEM','Cisco Router','')
|
||||
and cpuname not in
|
||||
('','X6-Q','','','C2800','C2600','COL','CUS','NX227','NX20','NX21','DQ28','DQ26','DQ31','DQ18','DQ23','DQ20','DX34','DX38','DX28','DX32','DX36',
|
||||
'DX30','MD32','MD30','Q16R','Q316','Q310','Q283','Q266','Q25R','Q213','Q20R','Q186','Q24','Q20','Q240','DX3','DQ233')
|
||||
order by process,price,cpuname asc" , $db_connect) or die($db_q_error);
|
||||
|
||||
/* 2015년 8월 이후 신장비만 적용
|
||||
$lineup_data=@mysql_query("select * from gearlist where process not in
|
||||
('COLOCATION','CELERON','INTEL i5','INTEL i3','INTEL i7','ATOM','AMD','XEON Single','CUSTOM','INS-일회성','NEHALEM','Cisco Router','')
|
||||
and cpuname not in
|
||||
('X4-Q','X6-Q','A1.6','CN2.','C2800','C2600','COL','CUS','NX227','NX20','NX21','DQ28','DQ26','DQ31','DQ18','DQ23','DQ20','DX34','DX38','DX28','DX32','DX36',
|
||||
'DX30','MD32','MD30','Q16R','Q316','Q310','Q283','Q266','Q25R','Q213','Q20R','Q186','Q24','Q20','Q240','DX3','DQ233')
|
||||
order by cpuname,spec desc" , $db_connect) or die($db_q_error);
|
||||
*/
|
||||
$lineup_total = mysql_num_rows($lineup_data);
|
||||
|
||||
/*
|
||||
$query="select * from serverdb where
|
||||
server_cpuname not in ('X4-Q','X6-Q','A1.6','CN2.','C2800','C2600','COL','CUS','NX227','NX20','NX21','DQ28','DQ26','DQ31','DQ18','DQ23','DQ20','DX34','DX38','DX28','DX32','DX36',
|
||||
'DX30','MD32','MD30','Q16R','Q316','Q310','Q283','Q266','Q25R','Q213','Q20R','Q186','Q24','Q20','Q240','DX3','DQ233')
|
||||
and server_process not in ('COLOCATION','CELERON','INTEL i5','INTEL i3','INTEL i7','ATOM','AMD','XEON Single','CUSTOM','INS-일회성','','','')
|
||||
and server_spec not in ('DQ266','DQ240','DQ213','Q2.130','Q2.4','Q16','DQ20R12','Q330','i3-3.30','i5-3.20','i7-3.4','i7-3.33','X36','X24','X30','NX213','i7-4790','DQ316','MQ23',
|
||||
'DQ183','DQ283','Q25','A1.66','','','','','','')
|
||||
and server_spec like 'DH266'
|
||||
order by server_process,server_cpuname asc";
|
||||
$DH266_all_data = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
$DH266_all=mysql_fetch_assoc($server_data);
|
||||
mysql_num_rows($DH266_all_data);
|
||||
|
||||
|
||||
$query="select * from serverdb where
|
||||
server_cpuname not in ('X4-Q','X6-Q','A1.6','CN2.','C2800','C2600','COL','CUS','NX227','NX20','NX21','DQ28','DQ26','DQ31','DQ18','DQ23','DQ20','DX34','DX38','DX28','DX32','DX36',
|
||||
'DX30','MD32','MD30','Q16R','Q316','Q310','Q283','Q266','Q25R','Q213','Q20R','Q186','Q24','Q20','Q240','DX3','DQ233')
|
||||
and server_process not in ('COLOCATION','CELERON','INTEL i5','INTEL i3','INTEL i7','ATOM','AMD','XEON Single','CUSTOM','INS-일회성','','','')
|
||||
and server_spec not in ('DQ266','DQ240','DQ213','Q2.130','Q2.4','Q16','DQ20R12','Q330','i3-3.30','i5-3.20','i7-3.4','i7-3.33','X36','X24','X30','NX213','i7-4790','DQ316','MQ23',
|
||||
'DQ183','DQ283','Q25','A1.66','','','','','','')
|
||||
and server_spec like 'DH266' and server_use_status like 'y'
|
||||
order by server_process,server_cpuname asc";
|
||||
$server_data = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
$server_count=mysql_fetch_assoc($server_data);
|
||||
echo mysql_num_rows($server_data);
|
||||
*/
|
||||
?>
|
||||
|
||||
* CPU 명칭 :
|
||||
싱글 코어 = 1개 코어 /
|
||||
듀얼 코어 = 2개 코어 /
|
||||
트리플 코어 = 3개 코어 /
|
||||
쿼드 코어(Q) = 4개 코어 /
|
||||
헥사 코어(H) = 6개 코어 /
|
||||
옥타 코어(O) = 8개 코어 /
|
||||
도데카(D) = 12개 코어 <!--(AMD CPU일 경우 옵테론 코어)--> /
|
||||
헥사데시멀 코어 = 16개코어<br>
|
||||
* 도쿄 회선 + 1U상면비 : 60만원 (50+10) / 치바 회선 + 1U상면비 : 40만원 (30+10)<br>
|
||||
* HDD : 1단위당 일회성 10만원 / 메모리 : 2G당 1회성 5만원 / 방어서비스 : CS방어 40만원 , BL상시 60만원 , CS-Pre상시 300만원 , CF방어 도메인당 40만원 , 인증방어 사이트당 80만원(+유동CS4개 기본)
|
||||
<table class="table table-bordered table-hover table-striped" style="text-align:center;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>구분</td>
|
||||
<td>장비사양</td>
|
||||
<td>CPU모델명</td>
|
||||
<td>임대가격</td>
|
||||
<td>전체서버</td>
|
||||
<td>임대중</td>
|
||||
<td>사용가능</td>
|
||||
<td>포맷보류</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
for ($i=0;$i<$lineup_total;$i++){
|
||||
$lineup=mysql_fetch_assoc($lineup_data);
|
||||
$num=($lineup_total)-$i;
|
||||
$lineup_explode=explode('.',$lineup['spec']);
|
||||
$all_query = "select count(*) from serverdb where server_cpuname like '%".$lineup['cpuname']."%' and server_spec like '%".$lineup_explode[0]."%'";
|
||||
$use_query = "select count(*) from serverdb where server_cpuname like '%".$lineup['cpuname']."%' and server_spec like '%".$lineup_explode[0]."%' and server_use_status='n' ";
|
||||
$empty_query = "select count(*) from serverdb where server_cpuname like '%".$lineup['cpuname']."%' and server_spec like '%".$lineup_explode[0]."%' and server_use_status='y'";
|
||||
$format_query = "select count(*) from serverdb where server_cpuname like '%".$lineup['cpuname']."%' and server_spec like '%".$lineup_explode[0]."%' and server_fomat_date !='NULL'";
|
||||
|
||||
$all_data = @mysql_query($all_query , $db_connect) or die($db_q_error);
|
||||
$use_data = @mysql_query($use_query , $db_connect) or die($db_q_error);
|
||||
$empty_data = @mysql_query($empty_query , $db_connect) or die($db_q_error);
|
||||
$format_data = @mysql_query($format_query , $db_connect) or die($db_q_error);
|
||||
|
||||
$all=mysql_fetch_assoc($all_data);
|
||||
$use=mysql_fetch_assoc($use_data);
|
||||
$empty=mysql_fetch_assoc($empty_data);
|
||||
$format=mysql_fetch_assoc($format_data);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$lineup['process']?></td>
|
||||
<td><?=$lineup['spec']?></td>
|
||||
<td><a href="https://www.google.co.jp/search?q=<?=$lineup['cpuname']?>" target=_blank><?=$lineup['cpuname']?></a></td>
|
||||
<td><?=$lineup['price']?> 만원</td>
|
||||
<td><?=$all['count(*)']?> 대</td>
|
||||
<td><?=$use['count(*)']?> 대</td>
|
||||
<td><font color=blue><?=$empty['count(*)']?></font> 대</td>
|
||||
<td><?=$format['count(*)']?> 대</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
$all_query = "select count(*) from serverdb where server_cpuname like '%i5-2%' and server_spec like '%i5-2%'";
|
||||
$use_query = "select count(*) from serverdb where server_cpuname like '%i5-2%' and server_spec like '%i5-2%' and server_use_status='n' ";
|
||||
$empty_query = "select count(*) from serverdb where server_cpuname like '%i5-2%' and server_spec like '%i5-2%' and server_use_status='y'";
|
||||
$format_query = "select count(*) from serverdb where server_cpuname like '%i5-2%' and server_spec like '%i5-2%' and server_fomat_date !='NULL'";
|
||||
|
||||
$all_data = @mysql_query($all_query , $db_connect) or die($db_q_error);
|
||||
$use_data = @mysql_query($use_query , $db_connect) or die($db_q_error);
|
||||
$empty_data = @mysql_query($empty_query , $db_connect) or die($db_q_error);
|
||||
$format_data = @mysql_query($format_query , $db_connect) or die($db_q_error);
|
||||
|
||||
$all=mysql_fetch_assoc($all_data);
|
||||
$use=mysql_fetch_assoc($use_data);
|
||||
$empty=mysql_fetch_assoc($empty_data);
|
||||
$format=mysql_fetch_assoc($format_data);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>INTEL i5(구세대)</td>
|
||||
<td>i5-2.xx</td>
|
||||
<td>i5-2</td>
|
||||
<td>23 만원</td>
|
||||
<td><?=$all['count(*)']?> 대</td>
|
||||
<td><?=$use['count(*)']?> 대</td>
|
||||
<td><font color=blue><?=$empty['count(*)']?></font> 대</td>
|
||||
<td><?=$format['count(*)']?> 대</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?
|
||||
$all_query = "select count(*) from serverdb where server_cpuname like '%i7-2%' and server_spec like '%i7-2%'";
|
||||
$use_query = "select count(*) from serverdb where server_cpuname like '%i7-2%' and server_spec like '%i7-2%' and server_use_status='n' ";
|
||||
$empty_query = "select count(*) from serverdb where server_cpuname like '%i7-2%' and server_spec like '%i7-2%' and server_use_status='y'";
|
||||
$format_query = "select count(*) from serverdb where server_cpuname like '%i7-2%' and server_spec like '%i7-2%' and server_fomat_date !='NULL'";
|
||||
|
||||
$all_data = @mysql_query($all_query , $db_connect) or die($db_q_error);
|
||||
$use_data = @mysql_query($use_query , $db_connect) or die($db_q_error);
|
||||
$empty_data = @mysql_query($empty_query , $db_connect) or die($db_q_error);
|
||||
$format_data = @mysql_query($format_query , $db_connect) or die($db_q_error);
|
||||
|
||||
$all=mysql_fetch_assoc($all_data);
|
||||
$use=mysql_fetch_assoc($use_data);
|
||||
$empty=mysql_fetch_assoc($empty_data);
|
||||
$format=mysql_fetch_assoc($format_data);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>INTEL i7(구세대)</td>
|
||||
<td>i7-2.xx</td>
|
||||
<td>i7-2</td>
|
||||
<td>45 만원</td>
|
||||
<td><?=$all['count(*)']?> 대</td>
|
||||
<td><?=$use['count(*)']?> 대</td>
|
||||
<td><font color=blue><?=$empty['count(*)']?></font> 대</td>
|
||||
<td><?=$format['count(*)']?> 대</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
$all_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%'";
|
||||
$use_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_use_status='n' ";
|
||||
$empty_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_use_status='y'";
|
||||
$format_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_fomat_date !='NULL'";
|
||||
|
||||
$all_data = @mysql_query($all_query , $db_connect) or die($db_q_error);
|
||||
$use_data = @mysql_query($use_query , $db_connect) or die($db_q_error);
|
||||
$empty_data = @mysql_query($empty_query , $db_connect) or die($db_q_error);
|
||||
$format_data = @mysql_query($format_query , $db_connect) or die($db_q_error);
|
||||
|
||||
$all=mysql_fetch_assoc($all_data);
|
||||
$use=mysql_fetch_assoc($use_data);
|
||||
$empty=mysql_fetch_assoc($empty_data);
|
||||
$format=mysql_fetch_assoc($format_data);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td>INTEL i7(4세대)</td>
|
||||
<td>i7-4.xx</td>
|
||||
<td>i7-4</td>
|
||||
<td>45 만원</td>
|
||||
<td><?=$all['count(*)']?> 대</td>
|
||||
<td><?=$use['count(*)']?> 대</td>
|
||||
<td><font color=blue><?=$empty['count(*)']?></font> 대</td>
|
||||
<td><?=$format['count(*)']?> 대</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="1">합계</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?
|
||||
//$rental_query = "select count(*) from serverdb where server_cpuname like 'E5504' and server_spec like 'Q20' and server_use_status='n' and server_rental_date > DATE_ADD(now(), INTERVAL -7 DAY)";
|
||||
$rental_query = "select count(*) from serverdb where server_cpuname like 'E5504' and server_spec like 'Q20' and server_use_status='n' and server_rental_date > DATE_ADD(now(), INTERVAL -7 DAY)";
|
||||
|
||||
// WHERE (server_rental_date BETWEEN '2015-09-01' AND '2015-09-30')
|
||||
$use_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_use_status='n' ";
|
||||
$empty_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_use_status='y'";
|
||||
$format_query = "select count(*) from serverdb where server_cpuname like '%i7-4%' and server_spec like '%i7-4%' and server_fomat_date !='NULL'";
|
||||
?>
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,192 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
?>
|
||||
<?
|
||||
$E5504=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$E5504=mysql_fetch_assoc($E5504);
|
||||
$E5504_LIST=@mysql_query("select * from serverdb where server_cpuname in ('E5504') and server_use_status = 'y' and gear_notready = 'n'" , $db_connect) or die($db_q_error);
|
||||
$E5504_DATA=mysql_fetch_assoc($E5504_LIST);
|
||||
|
||||
#select * from serverdb where server_cpuname in ('E5504') and server_use_status = 'y' and gear_notready = 'n';
|
||||
#select * from serverdb where server_cpuname in ('E5540') and server_use_status = 'y' and gear_notready = 'n';
|
||||
/*
|
||||
#select * from serverdb where server_cpuname in ('E5504') and server_use_status = 'y' and gear_notready = 'n';
|
||||
select * from serverdb where server_cpuname in ('E5540') and server_use_status = 'y' and gear_notready = 'n';
|
||||
select * from serverdb where server_cpuname in ('E5540') and server_use_status = 'y';
|
||||
|
||||
#UPDATE `idc`.`serverdb` SET `gear_notready`='y',`server_ram`='', `server_hdd`='', `server_ram1`='', `server_ram2`='', `server_ram3`='', `server_ram4`='', `server_ram5`='', `server_hdd1`='', `server_hdd2`='', `server_hdd3`='', `server_hdd4`='', `server_hdd5`='' WHERE `server_code` like
|
||||
#'%M024';
|
||||
#select server_code,gear_notready,server_ram,server_hdd,server_ram1,server_ram2,server_ram3,server_ram4,server_ram5,server_hdd1,server_hdd2,server_hdd3,server_hdd4,server_hdd5 from serverdb where server_code like
|
||||
#'%M024';
|
||||
#select * from serverdb where server_cpuname in ('E5504','E5530','E5540','X5570','X5650','X5670','X5675') and server_use_status like 'y' order by server_spec asc;
|
||||
#SELECT * FROM `idc`.`serverdb` where server_code not like ('%일회성') and server_code not like ('%전용회선') and server_process not like ('INTEL%') ORDER BY `server_recieve_date` desc;
|
||||
#select * from serverdb where server_cpuname like 'E5504' order by server_code asc;
|
||||
#select * from serverdb where server_spec like 'DQ20' order by server_code asc;
|
||||
#select * from serverdb order by server_code asc;
|
||||
*/
|
||||
|
||||
$E5530=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('E5530')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5530') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5530') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$E5530=mysql_fetch_assoc($E5530);
|
||||
|
||||
$E5540=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('E5540')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5540') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5540') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$E5540=mysql_fetch_assoc($E5540);
|
||||
|
||||
$X5560=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('X5560')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5560') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5560') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$X5560=mysql_fetch_assoc($X5560);
|
||||
|
||||
$X5570=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('X5570')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5570') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5570') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$X5570=mysql_fetch_assoc($X5570);
|
||||
|
||||
$X5650=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('X5650')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5650') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5650') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$X5650=mysql_fetch_assoc($X5650);
|
||||
|
||||
$X5670=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('X5670')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5670') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5670') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$X5670=mysql_fetch_assoc($X5670);
|
||||
|
||||
$X5675=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('X5675')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5675') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('X5675') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$X5675=mysql_fetch_assoc($X5675);
|
||||
|
||||
$TOTAL=@mysql_query("SELECT
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504','E5530','E5540','X5570','X5650','X5670','X5675')) as 'total',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504','E5530','E5540','X5570','X5650','X5670','X5675') and server_use_status like 'y') as 'use',
|
||||
(select count(*) from serverdb where server_cpuname in ('E5504','E5530','E5540','X5570','X5650','X5670','X5675') and gear_notready like 'y') as 'notready'
|
||||
" , $db_connect) or die($db_q_error);
|
||||
$TOTAL=mysql_fetch_assoc($TOTAL);
|
||||
?>
|
||||
|
||||
<table border="1" cellspacing="0" cellpadding="0" style="text-align:center;">
|
||||
<tr>
|
||||
<th width="120" scope="col">구분</th>
|
||||
<th width="120" scope="col">전체</th>
|
||||
<th width="120" scope="col">임대+포맷보류(부품부족)</th>
|
||||
<th width="120" scope="col">가용가능</th>
|
||||
<th width="120" scope="col">사용가능</th>
|
||||
<th width="120" scope="col">실제 사용 가능</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>E5504 (A-i3급)</td>
|
||||
<td><?=$E5504['total']?></td>
|
||||
<td><?=$E5504['total']-$E5504['use']?>(<?=$E5504['notready']?>)</td>
|
||||
<td><?=$E5504['use']?></td>
|
||||
<td><?=$E5504['use']-$E5504['notready']?></td>
|
||||
<td>9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>E5530 (B-i5급)</td>
|
||||
<td><?=$E5530['total']?></td>
|
||||
<td><?=$E5530['total']-$E5530['use']?>(<?=$E5530['notready']?>)</td>
|
||||
<td><?=$E5530['use']?></td>
|
||||
<td><?=$E5530['use']-$E5530['notready']?></td>
|
||||
<td>10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>E5540 (B-i5급)</td>
|
||||
<td><?=$E5540['total']?></td>
|
||||
<td><?=$E5540['total']-$E5540['use']?>(<?=$E5540['notready']?>)</td>
|
||||
<td><?=$E5540['use']?></td>
|
||||
<td><?=$E5540['use']-$E5540['notready']?></td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X5560 (C-i7급)</td>
|
||||
<td><?=$X5560['total']?></td>
|
||||
<td><?=$X5560['total']-$X5560['use']?>(<?=$X5560['notready']?>)</td>
|
||||
<td><?=$X5560['use']?></td>
|
||||
<td><?=$X5560['use']-$X5560['notready']?></td>
|
||||
<td>6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X5570 (C-i7급)</td>
|
||||
<td><?=$X5570['total']?></td>
|
||||
<td><?=$X5570['total']-$X5570['use']?></td>
|
||||
<td><?=$X5570['use']?></td>
|
||||
<td><?=$X5570['notready']?></td>
|
||||
<td><?=$X5570['use']-$X5570['notready']?></td>
|
||||
<td>7(+1/300G , +1/테스트중)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X5650 (D급)</td>
|
||||
<td><?=$X5650['total']?></td>
|
||||
<td><?=$X5650['total']-$X5650['use']?></td>
|
||||
<td><?=$X5650['use']?></td>
|
||||
<td><?=$X5650['notready']?></td>
|
||||
<td><?=$X5650['use']-$X5650['notready']?></td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X5670 (D급)</td>
|
||||
<td><?=$X5670['total']?></td>
|
||||
<td><?=$X5670['total']-$X5670['use']?></td>
|
||||
<td><?=$X5670['use']?></td>
|
||||
<td><?=$X5670['notready']?></td>
|
||||
<td><?=$X5670['use']-$X5670['notready']?></td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X5675 (D급)</td>
|
||||
<td><?=$X5675['total']?></td>
|
||||
<td><?=$X5675['total']-$X5675['use']?></td>
|
||||
<td><?=$X5675['use']?></td>
|
||||
<td><?=$X5675['notready']?></td>
|
||||
<td><?=$X5675['use']-$X5675['notready']?></td>
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr style="font-weight:bold;">
|
||||
<td>전체</td>
|
||||
<td><?=$TOTAL['total']?></td>
|
||||
<td><?=$TOTAL['total']-$TOTAL['use']?></td>
|
||||
<td><?=$TOTAL['use']?></td>
|
||||
<td><?=$TOTAL['notready']?></td>
|
||||
<td><?=$TOTAL['use']-$TOTAL['notready']?></td>
|
||||
<td>25</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
* HP Prolaint DL360 G6 / G7 부품 재고현황<br>
|
||||
2015년 11월 12일자 <br>
|
||||
메모리 2G : 12 (+52) = 64개<br>
|
||||
메모리 4G : 24 (+51) = 65개<br>
|
||||
SAS 146G : 스페어 4 개<br>
|
||||
SAS 300G : 스페어 4 개<br>
|
||||
SATA 500G : 3 개<br>
|
||||
SATA 1T : 6 개<br>
|
||||
SATA 2T : 1 개<br>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,31 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<?
|
||||
$service_code=$_GET[service_code];
|
||||
$client_code=$_GET[client_code];
|
||||
|
||||
$query="select service_code, service_line, client_code , coupon From servicedb where service_line NOT IN ( 'vpn', 'test','soloLine','substitution' ) and service_code = '$service_code'";
|
||||
|
||||
$coupon_data = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
$coupon=mysql_fetch_assoc($coupon_data);
|
||||
/*
|
||||
$server_date= explode('-', $coupon['service_open_date']);
|
||||
$server_timestamp = mktime('0','0','0',$server_date[1],$server_date[2],$server_date[0]);
|
||||
|
||||
$timestamp = mktime('0','0','0','18','9','2015');
|
||||
$default = $timestamp - 32676480; // 1432721520 <- 기준점에서 1년전 타임스탬프
|
||||
if ( $server_timestamp < $default ) { echo "<font color=blue>5</font>"; } else { echo "<font color=red>3</font>";}
|
||||
*/
|
||||
if ( $coupon[coupon] == NULL ) {$coupon[coupon] = 0;}
|
||||
echo "<a href='/IdcCouponUseMK.cup?client_code=$client_code' onclick=\"location.href='/IdcCouponUseMK.cup?client_code=<?=$coupon[client_code]?>'\" style=\"cursor: pointer;\">$coupon[coupon] 개</a>";
|
||||
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,31 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
|
||||
?>
|
||||
<?
|
||||
$service_code = $_GET[service_code];
|
||||
$vpc = "SELECT COUNT(*) AS cs_count FROM vpcdb WHERE `service_code` = '$service_code'";
|
||||
$kcs = "SELECT COUNT(*) AS cs_count FROM kcsdb WHERE `service_code` = '$service_code'";
|
||||
$resultvpc = @mysql_query($vpc, $db_connect) or die($db_q_error);
|
||||
$resultkcs = @mysql_query($kcs, $db_connect) or die($db_q_error);
|
||||
$datavpc = mysql_fetch_assoc($resultvpc);
|
||||
$datakcs = mysql_fetch_assoc($resultkcs);
|
||||
$client_code = $_GET[client_code];
|
||||
echo "<a href=/vpcInfo.sev?client_code=$client_code&csInfoFlag=true&service_code=$service_code>";
|
||||
echo $datavpc[cs_count];
|
||||
echo "</a> / ";
|
||||
echo "<a href=/vpcInfo.sev?client_code=$client_code&csInfoFlag=false&service_code=$service_code>";
|
||||
echo $datakcs[cs_count];
|
||||
echo "</a>";
|
||||
?>
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
<!--<div id='exec_time'><?= sprintf('%0.3f', getmicrotime() - $MK_start) ?> sec</div>-->
|
||||
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
$dotenv = Dotenv::createImmutable(__DIR__);
|
||||
$dotenv->load();
|
||||
|
||||
require_once "lib/Configs/Config.php";
|
||||
try {
|
||||
$control = isset($argv[1]) ? $argv[1] : "lib\\Controllers\\SiteController";
|
||||
$control = new $control();
|
||||
$function = isset($argv[2]) ? $argv[2] : "totalcount";
|
||||
$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();
|
||||
}
|
||||
@ -1,146 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
|
||||
|
||||
$chiba_vpn="select count(*) as mkcount from servicedb where service_line = 'vpn' and service_status = 'o' and Client_Code = '$_GET[client_code]'";
|
||||
$chivpn = @mysql_query($chiba_vpn , $db_connect) or die($db_q_error);
|
||||
$datachivpn=mysql_fetch_assoc($chivpn);
|
||||
|
||||
$chiba_query="select
|
||||
(select count(*) from servicedb where service_line = 'normal' and service_status = 'o' and service_sw between 'C00%' and 'C49%' and Client_Code = '$_GET[client_code]') as chiba_01_normal,
|
||||
(select count(*) from servicedb where service_line = 'defence' and service_status = 'o' and service_sw between 'C00%' and 'C49%' and Client_Code = '$_GET[client_code]') as chiba_01_defence,
|
||||
(select count(*) from servicedb where service_line = 'solo' and service_status = 'o' and Client_Code = '$_GET[client_code]') as chiba_solo,
|
||||
(select count(*) from servicedb where service_line = 'test' and service_status = 'o' and service_sw between 'C00%' and 'C49%' and Client_Code = '$_GET[client_code]') as chiba_01_test,
|
||||
(select count(*) from servicedb where service_line = 'event' and service_status = 'o' and service_sw between 'C00%' and 'C49%' and Client_Code = '$_GET[client_code]') as chiba_01_event,
|
||||
(select count(*) from servicedb where service_line = 'substitution' and service_status = 'o' and service_sw between 'C00%' and 'C49%' and Client_Code = '$_GET[client_code]') as chiba_01_substitution,
|
||||
|
||||
(select count(*) from servicedb where service_line = 'normal' and service_status = 'o' and service_sw between 'C50%' and 'C79%' and Client_Code = '$_GET[client_code]') as chiba_02_normal,
|
||||
(select count(*) from servicedb where service_line = 'defence' and service_status = 'o' and service_sw between 'C50%' and 'C79%' and Client_Code = '$_GET[client_code]') as chiba_02_defence,
|
||||
(select count(*) from servicedb where service_line = 'test' and service_status = 'o' and service_sw between 'C50%' and 'C79%' and Client_Code = '$_GET[client_code]') as chiba_02_test,
|
||||
(select count(*) from servicedb where service_line = 'event' and service_status = 'o' and service_sw between 'C50%' and 'C79%' and Client_Code = '$_GET[client_code]') as chiba_02_event,
|
||||
(select count(*) from servicedb where service_line = 'substitution' and service_status = 'o' and service_sw between 'C50%' and 'C79%' and Client_Code = '$_GET[client_code]') as chiba_02_substitution";
|
||||
|
||||
$chiba = @mysql_query($chiba_query , $db_connect) or die($db_q_error);
|
||||
$data_chiba=mysql_fetch_assoc($chiba);
|
||||
|
||||
$tokyo_query="select
|
||||
(select count(*) from servicedb where service_line = 'normal' and service_status = 'o' and service_sw between 'C80%' and 'C99%' and Client_Code = '$_GET[client_code]') as normal,
|
||||
(select count(*) from servicedb where service_line = 'defence' and service_status = 'o' and service_sw between 'C80%' and 'C99%' and Client_Code = '$_GET[client_code]') as defence,
|
||||
(select count(*) from servicedb where service_line = 'test' and service_status = 'o' and service_sw between 'C80%' and 'C99%' and Client_Code = '$_GET[client_code]') as test,
|
||||
(select count(*) from servicedb where service_line = 'event' and service_status = 'o' and service_sw between 'C80%' and 'C99%' and Client_Code = '$_GET[client_code]') as event,
|
||||
(select count(*) from servicedb where service_line = 'substitution' and service_status = 'o' and service_sw between 'C80%' and 'C99%' and Client_Code = '$_GET[client_code]') as substitution";
|
||||
|
||||
$tokyo = @mysql_query($tokyo_query , $db_connect) or die($db_q_error);
|
||||
$data_tokyo=mysql_fetch_assoc($tokyo);
|
||||
|
||||
$coupon_query="select service_line, client_code , sum(coupon) From servicedb where service_line NOT IN ( 'vpn', 'test','soloLine','substitution','event' ) and client_code = '$_GET[client_code]'";
|
||||
$data_coupon = @mysql_query($coupon_query , $db_connect) or die($db_q_error);
|
||||
$coupon=mysql_fetch_assoc($data_coupon);
|
||||
if ( $coupon['sum(coupon)'] == NULL ) {$coupon['sum(coupon)'] = 0;}
|
||||
?>
|
||||
<div class="col-lg-2 col-md-2 col-xs-4" style="padding:3px">
|
||||
<table width="100%" border="0"align="left" class="table table-bordered table-condensed info_table" style="margin-bottom:0px" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>도쿄</th>
|
||||
<th class=" ">치바</th>
|
||||
<th class=" ">VPN</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?=$data_tokyo[normal]+$data_tokyo[defence]?></td>
|
||||
<td><?=$data_chiba[chiba_01_normal]+$data_chiba[chiba_02_normal]+$data_chiba[chiba_01_defence]+$data_chiba[chiba_02_defence]+$data_chiba[chiba_solo]?></td>
|
||||
<td><?=$datachivpn[mkcount]?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-4 col-xs-5" style="padding:3px">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-condensed info_table" style="margin-bottom:0px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>일반</th>
|
||||
<th class=" ">방어</th>
|
||||
<th class=" ">전용</th>
|
||||
<th class=" ">이벤트</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?=$data_tokyo[normal]+$data_chiba[chiba_01_normal]+$data_chiba[chiba_02_normal]?></td>
|
||||
<td class=" "><?=$data_tokyo[defence]+$data_chiba[chiba_01_defence]+$data_chiba[chiba_02_defence]?></td>
|
||||
<td class=" "><?=$data_chiba[chiba_solo]?></td>
|
||||
<td class=" "><?=$data_tokyo[event]+$data_chiba[chiba_01_event]+$data_chiba[chiba_02_event]?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-3 col-xs-3" style="padding:3px">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-condensed info_table" style="margin-bottom:0px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>테스트</th>
|
||||
<th>대체</th>
|
||||
<th>장기할인</th>
|
||||
<th>쿠폰</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?=$data_tokyo[test]+$data_chiba[chiba_01_test]+$data_chiba[chiba_02_test]?></td>
|
||||
<td class=" "><?=$data_tokyo[tokyo_substitution]+$data_chiba[chiba_01_substitution]+=$data_chiba[chiba_02_substitution]?></td>
|
||||
<?
|
||||
$discount_query="select * from servicedb where client_code='$_GET[client_code]' and service_line NOT IN ( 'vpn', 'test', 'event' ) order by service_open_date asc";
|
||||
$discount = @mysql_query($discount_query , $db_connect) or die($db_q_error);
|
||||
$data_discount=mysql_fetch_assoc($discount);
|
||||
|
||||
//$oneyears = date("Y-m-d", mktime(0,0,0,date(m),date(d),date(Y)-1));
|
||||
|
||||
|
||||
|
||||
$server_date= explode('-', $data_discount['service_open_date']);
|
||||
$server_timestamp = mktime('0','0','0',$server_date[1],$server_date[2],$server_date[0]);
|
||||
$today_timestamp = mktime();
|
||||
|
||||
$oneyears = $today_timestamp - 32676480;
|
||||
$twoyears = $today_timestamp - 65352960;
|
||||
$threeyears = $today_timestamp - 98029440;
|
||||
|
||||
//echo $today_timestamp;
|
||||
//echo "/";
|
||||
//echo $oneyears;
|
||||
$mk_sum=$today_timestamp - $server_timestamp ;
|
||||
|
||||
if ( $mk_sum >= 163382400 ){$dis_cnt="30";}
|
||||
elseif ( $mk_sum >= 130705920 ){$dis_cnt="25";}
|
||||
elseif ( $mk_sum >= 98029440 ){$dis_cnt="20";}
|
||||
elseif ( $mk_sum >= 65352960 ) {$dis_cnt="15";}
|
||||
elseif ( $mk_sum >= 32676480 ) {$dis_cnt="10";}
|
||||
else {$dis_cnt="0";}
|
||||
|
||||
if ($server_timestamp == '0') {$dis_cnt="0";}
|
||||
|
||||
//if $data_discount['service_open_date']
|
||||
?>
|
||||
|
||||
<td><?=$dis_cnt?> %</td>
|
||||
<td onclick="location.href='/IdcCouponUseMK.cup?client_code=<?=$coupon[client_code]?>'" style="cursor: pointer;"><?=$coupon['sum(coupon)']?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
|
||||
//HTML 시작
|
||||
echo "
|
||||
<style>
|
||||
input[type=text] {padding:2px; border:1px solid #ccc;-webkit-border-radius: 5px;border-radius: 5px;}
|
||||
input[type=text]:focus {border-color:#333; }
|
||||
</style>
|
||||
";
|
||||
|
||||
function MKRAND() {
|
||||
$array = array_merge(range('A', 'Z'), range('z', 'a'), range(1, 9));
|
||||
for($i=0; $i<8; $i++) {
|
||||
$rand .= $array[mt_rand(0,count($array)-1)];
|
||||
}
|
||||
return $rand;
|
||||
}
|
||||
$mkrand = MKRAND();
|
||||
|
||||
echo "<strong>패스워드용 난수 : </strong><input type=text style='width:290px;' value='$mkrand'><br><br>";
|
||||
if (!$_GET[limit]){$limit=5;} else {$limit=$_GET[limit];}
|
||||
|
||||
//$limit=$limit-1;
|
||||
//$query="select * from historydb order by history_num desc limit 0,$limit";
|
||||
$query = "SELECT c.Client_Code,c.Client_Name,s.server_code,h.note,h.behavior
|
||||
FROM servicedb AS s
|
||||
JOIN historydb AS h ON s.service_code = h.service_code
|
||||
JOIN clientdb AS c ON s.client_code = c.Client_Code
|
||||
ORDER BY history_num DESC LIMIT 0,$limit";
|
||||
$result = @mysql_query($query , $db_connect) or die($db_q_error);
|
||||
while ($row = mysql_fetch_assoc($result)) {
|
||||
?>
|
||||
<i class="fa fa-info-circle fa-fw"></i><a href="/serviceDetailSolo.sev?client_code=<?=$row[Client_Code]?>&service_code=<?=$row[service_code]?>" style="text-decoration: none;color:gray;font-size:10pt;line-height:1.6em;">[ <?=$row[Client_Name]?> ] <?=$row[server_code]?> / <?=$row[behavior]?></a><span class="pull-right text-muted small"><em><?=$row[note]?></em></span><br>
|
||||
<?
|
||||
}
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
@ -1,37 +0,0 @@
|
||||
<?
|
||||
// 기본 설정 로딩
|
||||
require_once('config.php');
|
||||
require_once('function.php');
|
||||
require_once('lib.php');
|
||||
?>
|
||||
test
|
||||
<div align=center>
|
||||
<table cellspacing="0" cellpadding="0" dir="ltr" border="1" style="width:100%;">
|
||||
<tr>
|
||||
<th style="text-align:center;width:60px;" />작성자</th>
|
||||
<th style="text-align:center;width:70px;" />작성일</th>
|
||||
<th style="text-align:center;width:110px;" />구분</th>
|
||||
<th style="text-align:center;width:113px;" />고객명</th>
|
||||
<th style="text-align:center;width:770px;" />금일업무내용</th>
|
||||
<th style="text-align:center;width:70px;"/>작업자</th>
|
||||
<th style="text-align:center;width:80px;"/>예정일</th>
|
||||
<th style="text-align:center;width:40px;"/>보고</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align:center;">김용민</td>
|
||||
<td style="text-align:center;">15.10.11</td>
|
||||
<td style="text-align:center;">전달</td>
|
||||
<td style="text-align:center;">IDCJP</td>
|
||||
<td style="text-align:center;">작업 내용입니다</td>
|
||||
<td style="text-align:center;">김용민</td>
|
||||
<td style="text-align:center;">15.10.12</td>
|
||||
<td style="text-align:center;">X</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?
|
||||
//DB닫기
|
||||
mysql_close($db_connect);
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user