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정보 //DBMS Site정보
define('DBMS_SITE_DASHBOARD_DAY', $_ENV['DBMS_SITE_DASHBOARD_DAY'] ?? $_SERVER['DBMS_SITE_DASHBOARD_DAY'] ?? 7); 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', [ define('DBMS_SITEINFOS', [
'dbms.prime-idc.jp' => [ 'dbms.prime-idc.jp' => [
"id" => "PRIMEIDC", "id" => "PRIMEIDC",

View File

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

View File

@ -1,93 +1,66 @@
<script type='text/javascript'> <div class="table-responsive">
location.href='/serviceDetail.sev?client_code=" . $_GET[client_code] . "'; <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() ?>">
</script> <input type="hidden" name="onetime_case" id="onetime_case" value="domain">
"; <input type="hidden" name="onetime_request_date" value="<?= $today ?>" />
} else { <?php $today = date("Y-m-d") ?>
//$sql = sprintf("select * from servicedb where service_code='%s'", $_GET['service_code']); <table class="table table-bordered table-hover table-striped">
//$stmt = @mysql_query($sql, $db_connect) or die($db_q_error); <thead></thead>
//$service = mysql_fetch_assoc($stmt); <tbody>
?> <tr>
<div class="table-responsive"> <td>고객코드</td>
<form method="get"> <td colspan="5"><?= $this->service->getServiceCode() ?></td>
<input type="hidden" name="mode" value="coupon_reg"> </tr>
<input type="hidden" name="mkworker" value="<?= $member['name'] ?>"> <tr>
<input type="hidden" name="mkid" value="<?= $_GET[mkid] ?>"> <td>서비스코드</td>
<table class="table table-bordered table-hover table-striped"> <td colspan="5"><?= $this->service->getServiceCode() ?></td>
<thead> </tr>
</thead> <tr>
<tbody> <td>고객명</td>
<tr> <td colspan="5"><?= $this->client->getTitle() ?></td>
<td>고객코드</td> </tr>
<td colspan="5"><input type="hidden" name=client_code readonly="readonly" value="<?= $_GET[client_code] ?>"><?= $_GET[client_code] ?></td> <tr>
</tr> <td>장비번호</td>
<tr> <td colspan="5"><?= $this->service->getServerCode() ?></td>
<td>서비스코드</td> </tr>
<td colspan="5"><input type="hidden" name=service_code readonly="readonly" value="<?= $_GET[service_code] ?>"><?= $_GET[service_code] ?></td> <tr>
</tr> <td>도메인 구매 수량</td>
<tr> <td colspan="5">
<td>고객명</td> <select name="onetime_sub" id="onetime_sub">
<td colspan="5"><input type="hidden" name="client_name" readonly="readonly" value="<?= $service['Client_Name'] ?>"><?= $service['Client_Name'] ?></td> <?php
</tr> for ($i = 1; $i < $this->service->getCoupon(); $i++) {
<tr> echo "<option value=\"$i\">$i </option>";
<td>장비번호</td> }
<td colspan="5"><input type="hidden" name="server_code" readonly="readonly" value="<?= $service['server_code'] ?>"><?= $service['server_code'] ?></td> ?>
</tr> </select> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $this->service->getCoupon() ?>)
<tr> <!--<input type="text" name="onetime_sub" id="onetime_sub"/> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $service['coupon'] ?>)
<td> <br>* 도메인 쿠폰 사용시 반드시 숫자로만 갯수를 입력하세요 (* 3 구매시 작성 예제 : <font color=red><b>3</b></font>)-->
<input type="hidden" name="onetime_case" id="onetime_case" value="domain"> </td>
도메인 구매 수량 </tr>
</td> <tr>
<td colspan="5"> <td>서비스 금액</td>
<select name="onetime_sub" id="onetime_sub"> <td colspan="3">도메인 쿠폰 사용</td>
<? </tr>
for ($i = 0; $i < $service['coupon']; $i++) { <tr>
$mkvalue = $i + 1; <td>도메인 신청일</td>
echo "<option value=\"$mkvalue\">$mkvalue </option>"; <td><?= $today ?></td>
} <td>쿠폰 사용일</td>
?> <td colspan="3"><?= $today ?></td>
</select> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $service['coupon'] ?>) </tr>
<!--<input type="text" name="onetime_sub" id="onetime_sub"/> (개별 서버에 할당된 남은 쿠폰 수량 : <?= $service['coupon'] ?>) <tr>
<br>* 도메인 쿠폰 사용시 반드시 숫자로만 갯수를 입력하세요 (* 3 구매시 작성 예제 : <font color=red><b>3</b></font>)--> <td>도메인 리스트</td>
</td> <td colspan="5"><textarea cols="100" rows="4" type="text" name="onetime_note" id="onetime_note"></textarea>
</tr> <br>(공백을 허용하지 않습니다. 예제처럼 붙여쓰기 하세요 / 예제 : test.com/123.com/idcjp.jp)
<tr> </td>
<td>서비스 금액</td> </tr>
<td colspan="3"> </tbody>
<input type="hidden" name="onetime_amount" id="onetime_amount" onkeyup="calc()" value="0" /> 도메인 쿠폰 사용 <tfoot>
<input type="hidden" name="onetime_payment" id="onetime_payment" value="0" /> <tr>
<input type="hidden" name="onetime_nonpayment" id="onetime_nonpayment" /> <td colspan="6">
</td> <input class="btn btn-outline btn-primary" type="submit" value="저장하기">
</tr> <input class="btn btn-outline btn-default" type="button" value="취소" onclick="location.href='/IdcCouponUseMK.cup?client_code=<?= $this->service->getClientCode() ?>'">
<tr><? $today = date("Y-m-d", mktime(0, 0, 0, date(m), date(d), date(Y))); ?> </td>
<td>도메인 신청일</td> </tr>
<td> </tfoot>
<input type="hidden" name="onetime_request_date" value="<?= $today ?>" /><?= $today ?> </table>
</td> </form>
<td>쿠폰 사용일</td> </div>
<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);
?>