dbms_primeidc_init...1
This commit is contained in:
parent
6ef14fd7c6
commit
0504d434aa
@ -3,8 +3,6 @@
|
||||
namespace lib\Controllers;
|
||||
|
||||
use lib\Core\Controller as Core;
|
||||
use lib\Models\ClientModel;
|
||||
use lib\Models\ServiceModel;
|
||||
|
||||
class CommonController extends Core
|
||||
{
|
||||
|
||||
@ -21,10 +21,11 @@ class CouponController extends ClientController
|
||||
return $this->_memberService;
|
||||
}
|
||||
//IdcCouponUseMK.jsp -> domain_coupon_use.php
|
||||
//CLI 접속방법 : php index.php site/client/counpon
|
||||
//WEB 접속방법 : http://localhost/site/client/coupon
|
||||
//CLI 접속방법 : php index.php site/client/counpon/index
|
||||
//WEB 접속방법 : http://localhost/site/client/coupon/index
|
||||
public function index(array $params)
|
||||
{
|
||||
//사용자정보
|
||||
if (!array_key_exists('client_code', $params)) {
|
||||
throw new \Exception("client_code 값이 정의되지 않았습니다.");
|
||||
}
|
||||
@ -35,7 +36,10 @@ class CouponController extends ClientController
|
||||
}
|
||||
$this->client = $client;
|
||||
//전체 관리자정보(등록자)
|
||||
$member_code = $params['member_code'];
|
||||
if (!array_key_exists('mkid', $params)) {
|
||||
throw new \Exception("mkid 값이 정의되지 않았습니다.");
|
||||
}
|
||||
$member_code = $params['mkid'];
|
||||
$member = $this->getMemberService()->getEntityByCode($member_code);
|
||||
if (!$member) {
|
||||
throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
|
||||
@ -48,8 +52,8 @@ class CouponController extends ClientController
|
||||
$this->getServiceService()->getModel()->setContinue(true);
|
||||
$this->total = $this->getServiceService()->getCount();
|
||||
//limit, offset 설정
|
||||
$this->curPage = intval($params['curPage'] ?? $this->getRequest()->get('curPage') ?? 1);
|
||||
$this->perPage = intval($params['perPage'] ?? $this->getRequest()->get('perPage') ?? VIEW_LIST_PERPAGE);
|
||||
$this->curPage = intval($params['curPage'] ?? $this->request->get('curPage') ?? 1);
|
||||
$this->perPage = intval($params['perPage'] ?? $this->request->get('perPage') ?? VIEW_LIST_PERPAGE);
|
||||
$this->getServiceService()->getModel()->limit($this->perPage);
|
||||
$this->getServiceService()->getModel()->offset(($this->curPage - 1) * $this->perPage);
|
||||
$this->services = $this->getServiceService()->getEntities();
|
||||
@ -61,4 +65,106 @@ class CouponController extends ClientController
|
||||
$this->total_coupon = $total_coupon;
|
||||
return $this->render(__FUNCTION__);
|
||||
}
|
||||
//IdcCouponBuyMK.jsp -> domain_coupon_buy.php
|
||||
//CLI 접속방법 : php index.php site/client/counpon/insert_form
|
||||
//WEB 접속방법 : http://localhost/site/client/coupon/insert_form
|
||||
public function insert_form(array $params)
|
||||
{
|
||||
if (!array_key_exists('service_code', $params)) {
|
||||
throw new \Exception("service_code 값이 정의되지 않았습니다.");
|
||||
}
|
||||
$service_code = $params['service_code'];
|
||||
$service = $this->getServiceService()->getEntityByCode($service_code);
|
||||
if (!$service) {
|
||||
throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->service = $service;
|
||||
//사용자정보
|
||||
$client = $this->getClientService()->getEntityByCode($service->getClientCode());
|
||||
if (!$client) {
|
||||
throw new \Exception("[{$service->getClientCode()}]에 해당하는 사용자정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->client = $client;
|
||||
//전체 관리자정보(등록자)
|
||||
if (!array_key_exists('mkid', $params)) {
|
||||
throw new \Exception("mkid 값이 정의되지 않았습니다.");
|
||||
}
|
||||
$member_code = $params['mkid'];
|
||||
$member = $this->getMemberService()->getEntityByCode($member_code);
|
||||
if (!$member) {
|
||||
throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->member = $member;
|
||||
//쿠폰내역
|
||||
$this->getServiceService()->getModel()->where("client_code", $client_code);
|
||||
$this->getServiceService()->getModel()->whereNotIn("service_line", ['vpn', 'test', 'soloLine', 'substitution']);
|
||||
//Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue()
|
||||
$this->getServiceService()->getModel()->setContinue(true);
|
||||
$this->total = $this->getServiceService()->getCount();
|
||||
//limit, offset 설정
|
||||
$this->curPage = intval($params['curPage'] ?? $this->request->get('curPage') ?? 1);
|
||||
$this->perPage = intval($params['perPage'] ?? $this->request->get('perPage') ?? VIEW_LIST_PERPAGE);
|
||||
$this->getServiceService()->getModel()->limit($this->perPage);
|
||||
$this->getServiceService()->getModel()->offset(($this->curPage - 1) * $this->perPage);
|
||||
$this->services = $this->getServiceService()->getEntities();
|
||||
$this->pagination = new Pagination($this->total, (int)$this->curPage, (int)$this->perPage);
|
||||
$total_coupon = 0;
|
||||
foreach ($this->services as $service) {
|
||||
$total_coupon += $service->getCoupon();
|
||||
}
|
||||
$this->total_coupon = $total_coupon;
|
||||
return $this->render(__FUNCTION__);
|
||||
}
|
||||
|
||||
//IdcCouponBuyMK.jsp -> domain_coupon_buy.php
|
||||
//CLI 접속방법 : php index.php site/client/counpon/insert_form
|
||||
//WEB 접속방법 : http://localhost/site/client/coupon/insert_form
|
||||
public function insert(array $params)
|
||||
{
|
||||
if (!array_key_exists('service_code', $params)) {
|
||||
throw new \Exception("service_code 값이 정의되지 않았습니다.");
|
||||
}
|
||||
$service_code = $params['service_code'];
|
||||
$service = $this->getServiceService()->getEntityByCode($service_code);
|
||||
if (!$service) {
|
||||
throw new \Exception("[$service_code]에 해당하는 서비스정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->service = $service;
|
||||
//사용자정보
|
||||
$client = $this->getClientService()->getEntityByCode($service->getClientCode());
|
||||
if (!$client) {
|
||||
throw new \Exception("[{$service->getClientCode()}]에 해당하는 사용자정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->client = $client;
|
||||
//전체 관리자정보(등록자)
|
||||
if (!array_key_exists('mkid', $params)) {
|
||||
throw new \Exception("mkid 값이 정의되지 않았습니다.");
|
||||
}
|
||||
$member_code = $params['mkid'];
|
||||
$member = $this->getMemberService()->getEntityByCode($member_code);
|
||||
if (!$member) {
|
||||
throw new \Exception("[$member_code]에 해당하는 관리자정보가 존재하지 않습니다.");
|
||||
}
|
||||
$this->member = $member;
|
||||
try {
|
||||
$this->getServiceService()->getModel()->setTransaction(true);
|
||||
//서비스 수정
|
||||
$this->getServiceService()->getModel()->where("client_code", $client_code);
|
||||
$this->getServiceService()->update();
|
||||
// $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);
|
||||
$this->getServiceService()->getModel()->commit();
|
||||
return $this->render(__FUNCTION__);
|
||||
} catch (\PDOException $e) {
|
||||
$this->getServiceService()->getModel()->rollback();
|
||||
echo $e->getMessage();
|
||||
return $this->redirect->back()->withInput()->with('error', ['message' => '쿠폰 사용에 실패하였습니다.']);
|
||||
}
|
||||
}
|
||||
} //Class
|
||||
|
||||
@ -50,7 +50,7 @@ class PaymentController extends ClientController
|
||||
$exclude_clients = ['C116', 'C219'];
|
||||
//mode 당일,1일전,2일전,3일전,custom
|
||||
$today = date("Y-m-d");;
|
||||
$mode = $params['mode'] ?? $this->getRequest()->get('mode') ?? 'all';
|
||||
$mode = $params['mode'] ?? $this->request->get('mode') ?? 'all';
|
||||
switch ($mode) {
|
||||
case 'today':
|
||||
$this->getServiceService()->getModel()->where("service_payment_date = CURDATE()");
|
||||
@ -89,8 +89,8 @@ class PaymentController extends ClientController
|
||||
$this->getServiceService()->getModel()->setContinue(true);
|
||||
$this->total = $this->getServiceService()->getCount();
|
||||
//limit, offset 설정
|
||||
$this->curPage = intval($params['curPage'] ?? $this->getRequest()->get('curPage') ?? 1);
|
||||
$this->perPage = intval($params['perPage'] ?? $this->getRequest()->get('perPage') ?? VIEW_LIST_PERPAGE);
|
||||
$this->curPage = intval($params['curPage'] ?? $this->request->get('curPage') ?? 1);
|
||||
$this->perPage = intval($params['perPage'] ?? $this->request->get('perPage') ?? VIEW_LIST_PERPAGE);
|
||||
$this->getServiceService()->getModel()->limit($this->perPage);
|
||||
$this->getServiceService()->getModel()->offset(($this->curPage - 1) * $this->perPage);
|
||||
$this->entities = $this->getServiceService()->getEntities();
|
||||
|
||||
@ -5,13 +5,25 @@ 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;
|
||||
|
||||
abstract class Controller
|
||||
{
|
||||
private ?View $_view = null;
|
||||
private ?Request $_request = null;
|
||||
protected function __construct() {} //
|
||||
final protected ?Url $url = null;
|
||||
final protected ?Session $session = null;
|
||||
final protected ?Redirect $redirect = null;
|
||||
final protected ?Request $request = null;
|
||||
protected function __construct()
|
||||
{
|
||||
$this->url = new Url();
|
||||
$this->session = new Session();
|
||||
$this->redirect = new Redirect($this->session);
|
||||
$this->request = new Request();
|
||||
} //
|
||||
final public function __get($name)
|
||||
{
|
||||
return $this->getView()->$name;
|
||||
@ -31,11 +43,4 @@ abstract class Controller
|
||||
{
|
||||
return $this->getView()->render($path);
|
||||
}
|
||||
final public function getRequest(): Request
|
||||
{
|
||||
if ($this->_request === null) {
|
||||
$this->_request = new Request();
|
||||
}
|
||||
return $this->_request;
|
||||
}
|
||||
} //Class
|
||||
|
||||
@ -306,7 +306,10 @@ class QueryBuilder
|
||||
foreach ($data as $col => $val) {
|
||||
$stmt->bindValue(':' . $col, $val);
|
||||
}
|
||||
return $stmt->execute();
|
||||
if ($stmt->execute()) {
|
||||
return (int)$this->pdo->lastInsertId();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
final public function update(array $data): bool
|
||||
|
||||
52
extdbms/lib/Http/Redirect.php
Normal file
52
extdbms/lib/Http/Redirect.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace lib\Http;
|
||||
|
||||
class Redirect
|
||||
{
|
||||
protected Session $session;
|
||||
|
||||
public function __construct(Session $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
}
|
||||
|
||||
// 리다이렉트할 때 캐시를 방지하는 헤더 추가
|
||||
private function noCacheHeaders(): void
|
||||
{
|
||||
header("Cache-Control: no-cache, no-store, must-revalidate");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
}
|
||||
|
||||
// 이전 페이지로 리다이렉트 (캐시 방지)
|
||||
public function back(): self
|
||||
{
|
||||
$this->noCacheHeaders(); // 캐시 방지
|
||||
$backUrl = $_SERVER['HTTP_REFERER'] ?? '/';
|
||||
header("Location: {$backUrl}");
|
||||
return $this;
|
||||
}
|
||||
|
||||
// 특정 URL로 리다이렉트 (캐시 방지)
|
||||
public function to(string $url): self
|
||||
{
|
||||
$this->noCacheHeaders(); // 캐시 방지
|
||||
header("Location: {$url}");
|
||||
return $this;;
|
||||
}
|
||||
|
||||
// 세션에 값 추가 후 리다이렉트
|
||||
public function withInput(): self
|
||||
{
|
||||
$this->session->flashInput($_POST);
|
||||
return $this;
|
||||
}
|
||||
|
||||
// 세션에 에러 메시지 저장 후 리다이렉트
|
||||
public function with(string $key, mixed $value): self
|
||||
{
|
||||
$this->session->flash($key, $value);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@ -7,8 +7,10 @@ class Session extends Http
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->start();
|
||||
}
|
||||
|
||||
// 세션 시작
|
||||
public function start(): void
|
||||
{
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
@ -16,23 +18,51 @@ class Session extends Http
|
||||
}
|
||||
}
|
||||
|
||||
public function get(string $key, $default = null): mixed
|
||||
{
|
||||
return $_SESSION[$key] ?? $default;
|
||||
}
|
||||
|
||||
// 세션에 값 저장
|
||||
public function set(string $key, $value): void
|
||||
{
|
||||
$_SESSION[$key] = $value;
|
||||
}
|
||||
|
||||
// 세션에서 값 가져오기
|
||||
public function get(string $key): mixed
|
||||
{
|
||||
return $_SESSION[$key] ?? null;
|
||||
}
|
||||
|
||||
// 세션에서 값 삭제
|
||||
public function remove(string $key): void
|
||||
{
|
||||
unset($_SESSION[$key]);
|
||||
}
|
||||
|
||||
public function destroy(): void
|
||||
// 세션에 에러 메시지 설정
|
||||
public function flash(string $key, $message): void
|
||||
{
|
||||
session_destroy();
|
||||
$_SESSION['flash'][$key] = $message;
|
||||
}
|
||||
|
||||
// 세션에 입력값 설정 (입력값 유지)
|
||||
public function flashInput(array $input): void
|
||||
{
|
||||
$_SESSION['flash']['input'] = $input;
|
||||
}
|
||||
|
||||
// 세션에 flash 메시지가 있는지 확인
|
||||
public function hasFlash(string $key): bool
|
||||
{
|
||||
return isset($_SESSION['flash'][$key]);
|
||||
}
|
||||
|
||||
// flash 메시지 가져오기
|
||||
public function getFlash(string $key): mixed
|
||||
{
|
||||
return $_SESSION['flash'][$key] ?? null;
|
||||
}
|
||||
|
||||
// flash 메시지 삭제
|
||||
public function clearFlash(): void
|
||||
{
|
||||
unset($_SESSION['flash']);
|
||||
}
|
||||
}
|
||||
|
||||
66
extdbms/lib/Http/Url.php
Normal file
66
extdbms/lib/Http/Url.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?
|
||||
|
||||
namespace Lib\Http;
|
||||
|
||||
class Url extends Http
|
||||
{
|
||||
protected string $baseUrl;
|
||||
protected string $uri;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->baseUrl = $this->detectBaseUrl();
|
||||
$this->uri = $this->detectUri();
|
||||
}
|
||||
|
||||
// 현재 전체 URL 반환
|
||||
public function current(): string
|
||||
{
|
||||
return $this->baseUrl . '/' . ltrim($this->uri, '/');
|
||||
}
|
||||
|
||||
// base URL만 반환
|
||||
public function baseURL(): string
|
||||
{
|
||||
return $this->baseUrl;
|
||||
}
|
||||
|
||||
// 세그먼트 배열 반환
|
||||
public function segments(): array
|
||||
{
|
||||
return explode('/', trim($this->uri, '/'));
|
||||
}
|
||||
|
||||
// N번째 세그먼트 반환 (1부터 시작)
|
||||
public function segment(int $n): ?string
|
||||
{
|
||||
$segments = $this->segments();
|
||||
return $segments[$n - 1] ?? null;
|
||||
}
|
||||
|
||||
// 특정 경로에 대한 URL 생성
|
||||
public function to(string $path): string
|
||||
{
|
||||
return rtrim($this->baseUrl, '/') . '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
// URI 추출 (도메인 제외)
|
||||
protected function detectUri(): string
|
||||
{
|
||||
$uri = $_SERVER['REQUEST_URI'] ?? '/';
|
||||
$scriptName = dirname($_SERVER['SCRIPT_NAME'] ?? '');
|
||||
$uri = str_replace($scriptName, '', $uri);
|
||||
$uri = strtok($uri, '?'); // 쿼리 스트링 제거
|
||||
return $uri;
|
||||
}
|
||||
|
||||
// base URL 추출
|
||||
protected function detectBaseUrl(): string
|
||||
{
|
||||
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
||||
$scriptDir = rtrim(dirname($_SERVER['SCRIPT_NAME'] ?? ''), '/');
|
||||
return $scheme . '://' . $host . $scriptDir;
|
||||
}
|
||||
}
|
||||
@ -48,4 +48,13 @@ abstract class CommonService extends Core
|
||||
// echo "<BR>" . $this->getModel()->getLastQuery();
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function insert(array $formData): int
|
||||
{
|
||||
$insertId = $this->getModel()->insert($formData);
|
||||
if (!$insertId) {
|
||||
throw new \Exception("Insert Error : " . $this->getModel()->getLastError());
|
||||
}
|
||||
return $insertId;
|
||||
} //
|
||||
} //Class
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<tr>
|
||||
<td><?= $num ?></td>
|
||||
<td><?= $service->getCoupon() + $service->getUsedCoupon() ?></td>
|
||||
<td onclick="location.href='/IdcCouponBuyMK.cup?service_code=<?= $service->getServiceCode() ?>'" style=" cursor: pointer;"><?= $service->getCoupon() ?></td>
|
||||
<td onclick="location.href='/IdcCouponBuyMK.cup?service_code=<?= $service->getServiceCode() ?>&mkid=<?= $this->member->getPK() ?>'" style=" cursor: pointer;"><?= $service->getCoupon() ?></td>
|
||||
<td><?= $this->client->getTitle() ?></td>
|
||||
<td><?= $service->getUsedCoupon() ?></td>
|
||||
<td><a href="/serviceDetailSolo.sev?client_code=<?= $service->getClientCode() ?>&service_code=<?= $service->getServiceCode() ?>"><?= $service->getServiceCode() ?></td>
|
||||
@ -32,7 +32,7 @@
|
||||
<td><?= $service->service_ip ?></td>
|
||||
<td><?= $service->service_open_date ?></td>
|
||||
<td><?= $service->service_line ?></td>
|
||||
<td><a href=/IdcCouponBuyMK.cup?service_code=<?= $service->getServiceCode() ?>&client_name=<?= $this->client->getTitle() ?>&client_code=<?= $service->getClientCode() ?>&server_code=<?= $service->getServerCode() ?>&coupon=<?= $service->getCoupon() ?>&mkid=<?= $this->member->getPK() ?>>사용하기</a></td>
|
||||
<td><a href="/IdcCouponBuyMK.cup?service_code=<?= $service->getServiceCode() ?>&mkid=<?= $this->member->getPK() ?>">사용하기</a></td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php } ?>
|
||||
|
||||
93
extdbms/lib/Views/dbms/client/coupon/insert_form.php
Normal file
93
extdbms/lib/Views/dbms/client/coupon/insert_form.php
Normal file
@ -0,0 +1,93 @@
|
||||
<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);
|
||||
?>
|
||||
@ -22,7 +22,7 @@
|
||||
<h4><i class="fa fa-desktop fa-fw"></i> 도메인 쿠폰 사용하기</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<c:import url="${phpurl}/domain_coupon_buy.php?client_code=${mk_client_code }&onetime_sub=${param.onetime_sub }&onetime_request_date=${param.onetime_request_date }&mkworker=${param.mkworker}&mkid=${param.mkid}&service_code=${mk_service_code }&client_name=${mk_client_name }&server_code=${mk_server_code }&coupon=${mk_coupon }&mode=${mk_mode}&onetime_note=${param.onetime_note }" />
|
||||
<c:import url="${phpurl}/dbms/client/coupon/insert_form/service_code/${mk_service_code}/mkid/${mk_id}" />
|
||||
</div>
|
||||
<!-- panel-body -->
|
||||
</div>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<h4><i class="fa fa-desktop fa-fw"></i> 도메인 쿠폰 사용하기</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<c:import url="${phpurl}/dbms/client/coupon/index/client_code/${mk_client_code }/member_code/${member.id}" />
|
||||
<c:import url="${phpurl}/dbms/client/coupon/index/client_code/${mk_client_code}/mkid/${member.id}" />
|
||||
</div>
|
||||
<!-- panel-body -->
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user