dbms_primeidc_init...1

This commit is contained in:
최준흠 2025-04-10 19:06:46 +09:00
parent 656856326e
commit 66bd63ce63
3 changed files with 73 additions and 98 deletions

View File

@ -14,7 +14,9 @@ define('VIEW_LIST_PAGINATION_GROUPSIZE', $_ENV['VIEW_LIST_PAGINATION_GROUPSIZE']
//DBMS Site정보
define('DBMS_SITE_DASHBOARD_DAY', $_ENV['DBMS_SITE_DASHBOARD_DAY'] ?? $_SERVER['DBMS_SITE_DASHBOARD_DAY'] ?? 7);
define('DBMS_SITE_URL', $_ENV['DBMS_SITE_URL'] ?? $_SERVER['DBMS_SITE_URL'] ?? "http://dbms.prime-idc.jp:675");
define('DBMS_SITE_HOST', $_ENV['DBMS_SITE_HOST'] ?? $_SERVER['DBMS_SITE_HOST'] ?? "http://dbms.prime-idc.jp");
define('DBMS_SITE_JAVA_PORT', $_ENV['DBMS_SITE_JAVA_PORT'] ?? $_SERVER['DBMS_SITE_JAVA_PORT'] ?? 6752);
define('DBMS_SITE_URL', DBMS_SITE_HOST . ":" . DBMS_SITE_JAVA_PORT);
define('DBMS_SITEINFOS', [
'dbms.prime-idc.jp' => [
"id" => "PRIMEIDC",

View File

@ -96,7 +96,7 @@ class CouponController extends ClientController
}
$this->member = $member;
//쿠폰내역
$this->getServiceService()->getModel()->where("client_code", $client_code);
$this->getServiceService()->getModel()->where("client_code", $service->getClientCode());
$this->getServiceService()->getModel()->whereNotIn("service_line", ['vpn', 'test', 'soloLine', 'substitution']);
//Query문 Rest여부 -> 같은조건에 Count 받고, 결과값을 받고 싶을때는 continue()
$this->getServiceService()->getModel()->setContinue(true);
@ -149,8 +149,8 @@ class CouponController extends ClientController
try {
$this->getServiceService()->getModel()->setTransaction(true);
//서비스 수정
$this->getServiceService()->getModel()->where("client_code", $client_code);
$this->getServiceService()->update();
// $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);
@ -160,7 +160,7 @@ class CouponController extends ClientController
// $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->redirect->back()->with('success', ['message' => '쿠폰 사용이 완료되었습니다.']);
return $this->redirect->to(DBMS_SITE_URL . "/IdcCouponUseMK.cup?client_code=" . $this->client->getClientCode());
} catch (\PDOException $e) {
$this->getServiceService()->getModel()->rollback();
return $this->redirect->back()->withInput()->with('error', ['message' => '쿠폰 사용에 실패하였습니다.:' . $e->getMessage()]);

View File

@ -1,93 +1,66 @@
<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);
?>
<div class="table-responsive">
<form method="post" action="<?= DBMS_SITE_HOST ?>/dbms/client/coupon/insert/service_code/<?= $this->service->getServiceCode() ?>/client_code/<?= $this->service->getClientCode() ?>/mkid/<?= $this->member->getPK() ?>">
<input type="hidden" name="onetime_case" id="onetime_case" value="domain">
<input type="hidden" name="onetime_request_date" value="<?= $today ?>" />
<?php $today = date("Y-m-d") ?>
<table class="table table-bordered table-hover table-striped">
<thead></thead>
<tbody>
<tr>
<td>고객코드</td>
<td colspan="5"><?= $this->service->getServiceCode() ?></td>
</tr>
<tr>
<td>서비스코드</td>
<td colspan="5"><?= $this->service->getServiceCode() ?></td>
</tr>
<tr>
<td>고객명</td>
<td colspan="5"><?= $this->client->getTitle() ?></td>
</tr>
<tr>
<td>장비번호</td>
<td colspan="5"><?= $this->service->getServerCode() ?></td>
</tr>
<tr>
<td>도메인 구매 수량</td>
<td colspan="5">
<select name="onetime_sub" id="onetime_sub">
<?php
for ($i = 1; $i < $this->service->getCoupon(); $i++) {
echo "<option value=\"$i\">$i </option>";
}
?>
</select> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $this->service->getCoupon() ?>)
<!--<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">도메인 쿠폰 사용</td>
</tr>
<tr>
<td>도메인 신청일</td>
<td><?= $today ?></td>
<td>쿠폰 사용일</td>
<td colspan="3"><?= $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=<?= $this->service->getClientCode() ?>'">
</td>
</tr>
</tfoot>
</table>
</form>
</div>