ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/toadmin/good/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/good/good_discount.html
<?php
    include "../include/top.html";
    include "_common.php";

    // 상품정보
    $data_good = good_list(" and g_uid='{$g_uid}' ");
    $row_good = good_list_replace($data_good[0]);
    $data = good_discount($g_uid);
?>

<div class="contents_wrap">
	<div class="contents_wrap_in">
		<div class="title"><strong>할인관리 - <?=$row_good['g_title']?></strong></div>
		<div class="contents_detail">

		<div id="Content_box">

			<!-- 본문 -->
			<?
				include "_menu.html";
			?>
			
			<!-- 폼 -->
			<form name="frm_discount" id="frm_discount" method="post">
			<input type="hidden" name="SqlType" id="SqlType" value="discount_ins">
			<input type="hidden" name="g_uid" value="<?=$g_uid?>">
                <br>
                <b style="color:red">짚라인의 할인 옵션을 추가, 수정 한 후 개발자에게 알려주세요.</b>
				<table border="0" cellspacing="0" cellpadding="0" class="t_list mt25" width="">
					<thead>
					<tr>
						<th width="40">No.</th>
						<th width="40">사용</th>
						<th width="50"><a href="#" onclick="chg_order();">순서</a></th>
						<th width="50" style="color:red">테스트<br>(회사 내부에서만 보임)</th>
						<th width="350">할인명</th>
						<th width="300">할인설명</th>
						<th width="70">
                        1+1<br>
                        짝수 인원 적용<br>
                        </th>
						<th width="100">할인율</th>
                        <th width="120" style="color:red">인당 할인 가격<br>(개발중)</th>
						<th width="30">제한 최소 인원수</th>
						<th width="30">제한 최대 인원수</th>
                        <th width="6">할인시작날짜</th>
						<th width="6">할인종료날짜</th>
						<th width="100">-</th>
					</tr>
					</thead>
					<tbody>
                    <?
                        for($i=0 ; $i<count($data) ; $i++){
                            $row = $data[$i];
                            $num = count($data)-$i;
                        ?>
                            <tr>
                                <td><?=$num?></td>
                                <td>
                                    <input type="checkbox" name="disp_yn[]" id="disp_yn_<?=$row['dcid']?>" value="<?=$row['disp_yn']?>" <?=(($row['disp_yn'] == 'Y') ? 'checked' : '')?>/>
                                </td>
                                <td>
                                    <input type="hidden" name="opid_arr[]" value="<?=$row['dcid']?>">
                                    <input type="text" name="order_num_arr[]" id="order_num_<?=$row['dcid']?>" class="input_text" size="3" maxlength="3" value="<?=$row['order_num']?>">
                                </td>
                                <td>
                                    <input type="checkbox" id="dc_test_<?=$row['dcid']?>" name="dc_test" <?=(($row['dc_test'] == 'Y') ? 'checked' : '')?> />
                                </td>
                                <td><input type="text" name="dc_nm" id="dc_nm_<?=$row['dcid']?>" class="input_text pl10" style="width:94%;" value="<?=htmlspecialchars($row['dc_nm'])?>" hname="옵션명" required></td>
                                <td><input type="text" name="dc_nm_view" id="dc_nm_view_<?=$row['dcid']?>" class="input_text pl10" style="width:94%;" value="<?=htmlspecialchars($row['dc_nm_view'])?>" hname="할인 설명 문구" ></td>

                                <td>
                                    <input type="checkbox" name="onePlusOne" id="onePlusOne_<?=$row['dcid']?>" <?=(($row['onePlusOne'] == 'Y') ? 'checked' : '')?> value="Y" />
                                </td>

                                <td><input type="number" name="dc_rate" id="dc_rate_<?=$row['dcid']?>" class="input_text pr10" value="<?=$row['dc_rate']?>" style="width:50%; text-align:right;ime-mode:disabled;" > %</td>
                                <!-- <td><input type="text" name="op_price_agent" id="op_price_agent_<?=$row['dcid']?>" class="input_text pr10" value="<?=$row['op_price_agent']?>" style="width:50%;text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)"><?=$row_good['ext_nm']?></td>-->

                                <td><input type="number" name="dc_price" id="dc_price_<?=$row['dcid']?>" class="input_text pr10" value="<?=$row['dc_price']?>" style="width:50%; text-align:right;ime-mode:disabled;" > 원</td>


                                <td><input type="number" name="dc_people_cnt" id="dc_people_cnt_<?=$row['dcid']?>" class="input_text pr10" value="<?=(($row['dc_people_cnt'] > 0) ? $row['dc_people_cnt'] : '')?>" style="text-align:center;ime-mode:disabled;" placeholder="인원제한없이할인"></td>

                                <td><input type="number" name="dc_people_max_cnt" id="dc_people_max_cnt_<?=$row['dcid']?>" class="input_text pr10" value="<?=(($row['dc_people_max_cnt'] > 0) ? $row['dc_people_max_cnt'] : '')?>" style="text-align:center;ime-mode:disabled;" placeholder="인원제한없이할인"></td>

                                <td>
                                    <input type="text" name="start_date" class="input_text pr10" id="start_date_<?=$row['dcid']?>" onclick="AjaxCal(this,event,{});" value="<?=$row['start_date']?>" />
                                </td>
                                <td>
                                    <input type="text" name="end_date" class="input_text pr10" id="end_date_<?=$row['dcid']?>"  onclick="AjaxCal(this,event,{});" value="<?=$row['end_date']?>" />
                                </td>

                                <td>
                                    <input class="Table_btn" type="button" value="수정" onclick="chk_edit_frm('<?=$row['dcid']?>')" />
                                    <input class="Table_btn gray" type="button" value="삭제" onclick="if(!confirm('정말삭제하시겠습니까?'))return;ajax_loader('good_discount_proc.html?SqlType=discount_del&g_uid=<?=$g_uid?>&dcid=<?=$row['dcid']?>');" />
                                </td>
                            </tr>
                        <?}?>


                        <tr class="bg_gray">
                            <td colspan="4">등록</td>
                            <td><input type="text" name="dc_nm" id="dc_nm_<?=$row['dcid']?>" class="input_text pl10" style="width:94%;" value="" hname="할인명" required></td>
                            <td><input type="text" name="dc_nm_view" id="dc_nm_view_<?=$row['dcid']?>" class="input_text pl10" style="width:94%;" value="" hname="할인 설명 문구" ></td>
                            <td><input type="text" name="dc_rate" id="dc_rate_<?=$row['dcid']?>" class="input_text pr10" value="" style="width:50%; text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)"> %</td>
                            <td><input type="text" name="dc_price" id="dc_price_<?=$row['dcid']?>" class="input_text pr10" value="" style="width:50%; text-align:right;ime-mode:disabled;"> 원</td>
                            <td><input type="text" name="dc_people_cnt" id="dc_people_cnt_<?=$row['dcid']?>" class="input_text pr10" value="" style="text-align:right;ime-mode:disabled;" ></td>
                            <td><input type="text" name="dc_people_max_cnt" id="dc_people_max_cnt_<?=$row['dcid']?>" class="input_text pr10" value="" style="text-align:right;ime-mode:disabled;" ></td>
                            <td>
                                <input type="text" name="start_date" class="input_text pr10" onclick="AjaxCal(this,event,{});" value="<?=$row['start_date']?>" />
                            </td>
                            <td>
                                <input type="text" name="end_date" class="input_text pr10" onclick="AjaxCal(this,event,{});" value="<?=$row['end_date']?>" />
                            </td>

                            <td ><input class="Table_btn red2" type="button" value="저장하기" onclick="chk_frm();"></td>
                        </tr>

					</tbody>
				</table>
			</form>
			<!-- /폼 -->
			</div>
			<!-- /본문 -->
		</div>
	</div>
</div>
</div>

<!-- 폼 -->
<form name="frm_discount_edit" id="frm_discount_edit" method="post">
<input type="hidden" name="SqlType" id="SqlType" value="discount_edit">
<input type="hidden" name="g_uid" value="<?=$g_uid?>">
<input type="hidden" name="dcid" value="">
<input type="hidden" name="dc_nm" value="">
<input type="hidden" name="dc_nm_view" value="">
<input type="hidden" name="onePlusOne" value="">
<input type="hidden" name="dc_test" value="">
<input type="hidden" name="dc_rate" value="">
<input type="hidden" name="dc_people_cnt" value="">
<input type="hidden" name="dc_people_max_cnt" value="">
<input type="hidden" name="start_date" value="">
<input type="hidden" name="end_date" value="">
<input type="hidden" name="order_num" value="">
<input type="hidden" name="disp_yn" value="">
</form>
<!-- /폼 -->

<script type="text/javascript">
function chk_frm()
{
	var f=document.frm_discount;

	var result = to_validation(f);

	if(result == false) return;

	if (!confirm('저장하시겠습니까?')) return;


    console.log('f is ' + JSON.stringify(f));

	ajax_post("","good_discount_proc.html","frm_discount");
}

/*function chg_order()
{
	if (!confirm('순서를 수정 하시겠습니까?')) return;

	$("#SqlType").val("order_chg");

	ajax_post("","good_discount_proc.html","frm_option");
}

*/

function chk_edit_frm(dcid)
{
	var f=document.frm_discount_edit;

    console.log('dcid is ' + dcid);
    console.log($("#dc_nm_"+dcid).val());
    console.log($("#dc_rate_"+dcid).val());
    console.log($("#dc_people_cnt_"+dcid).val());

    // if (!confirm('수정하시겠습니까?')) return;

	f.dcid.value = dcid;
	f.dc_nm.value = $("#dc_nm_"+dcid).val();
	f.dc_nm_view.value = $("#dc_nm_view_"+dcid).val();
    f.dc_rate.value = $("#dc_rate_"+dcid).val();
    f.dc_people_cnt.value = $("#dc_people_cnt_"+dcid).val();
    f.dc_people_max_cnt.value = $("#dc_people_max_cnt_"+dcid).val();


    f.start_date.value = $("#start_date_"+dcid).val();
    f.end_date.value = $("#end_date_"+dcid).val();

    f.order_num.value = $("#order_num_"+dcid).val();

    disp_ynValue = 'N';
    if($('#disp_yn_'+dcid).prop('checked')){
        disp_ynValue = 'Y';
    }
    f.disp_yn.value = disp_ynValue;

    test_ynValue = 'N';
    if($('#dc_test_'+dcid).prop('checked')){
        test_ynValue = 'Y';
    }
    f.dc_test.value = test_ynValue;

    onePlusOneValue = "N";
    if($('#onePlusOne_'+dcid).prop('checked')){
        onePlusOneValue = 'Y';
    }

    f.onePlusOne.value = onePlusOneValue;

    <?php
        if(devCookie()){
    ?>

        // return false;
    <?php
        }
    ?>


    var result = to_validation(f);

	if(result == false) return;

	ajax_post("","good_discount_proc.html","frm_discount_edit");
	
}
</script>
<?
include "../include/footer.html";
?>

Anon7 - 2021