ÿØÿà 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_options.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_option($g_uid);


?>
    <style>
        #allEditBtn{float: right;margin: 3px 3px 3px 0;}
    </style>
    <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">
                    <!-- 본문 -->
                    <?php
                    include "_menu.html";
                    ?>
                    <!-- 폼 -->

                    <button class="Table_btn red2" id="allEditBtn">전체 수정</button>
                    <form name="frm_option" id="frm_option" method="post">
                        <input type="hidden" name="SqlType" id="SqlType" value="option_ins">
                        <input type="hidden" name="g_uid" value="<?=$g_uid?>">
                        <table border="0" cellspacing="0" cellpadding="0" class="t_list mt25" width="100%">
                            <thead>
                            <tr>
                                <th width="40">No.</th>
                                <th width="40">사용</th>
                                <th width="50"><a href="#" onclick="chg_order();">순서</a></th>
                                <th width="300">옵션명(한국어)</th>
                                <th>옵션명(노출언어)</th>
                                <th width="200">원가</th>
                                <th width="200">B2B</th>
                                <th width="200">B2C</th>
                                <!-- <th>대리점가</th> -->
                                <th width="80">-</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?
                            for($i=0 ; $i<count($data) ; $i++){
                                $row = $data[$i];
                                $num = count($data)-$i;
                                ?>
                                <tr>
                                    <td><?=$num?></td>
                                    <td>
									<span id="disp_<?=$row['opid']?>">
										<img src="<?=$row['disp_yn_icon']?>" onclick="ajax_obj_loader('good_options_proc.html?SqlType=chg_disp&g_uid=<?=$row['g_uid']?>&opid=<?=$row['opid']?>&disp_yn=<?=$row['disp_yn_opp']?>','disp_<?=$row['opid']?>');" style="cursor:pointer;">
									</span>
                                    </td>
                                    <td>
                                        <input type="hidden" class="dataOpId" value="<?=$row['opid']?>" />
                                        <input type="hidden" name="opid_arr[]" value="<?=$row['opid']?>">
                                        <input type="text" name="order_num_arr[]" id="order_num_<?=$row['opid']?>" class="input_text" size="3" maxlength="3" value="<?=$row['order_num']?>">
                                    </td>



                                    <!-- 옵션명(한국어) -->
                                    <td><input type="text" name="op_nm_ko" id="op_nm_ko_<?=$row['opid']?>" class="input_text pl10" style="width:90%;" value="<?=$row['op_nm_ko']?>" hname="옵션명(한국어)"></td>


                                    <!-- 옵션명(노출언어) -->
                                    <td>
                                        <input type="text" name="op_nm" id="op_nm_<?=$row['opid']?>" class="input_text pl10" style="width:90%;" value="<?=$row['op_nm']?>" hname="옵션명" required>
                                        <?php

                                            if($TO_MB['mb_id'] == 'developer3'){
                                                echo $row['opid'];
                                            }


                                        ?>
                                    </td>









                                    <!-- 원가 -->
                                    <td><input type="text" name="op_price_cost" id="op_price_cost_<?=$row['opid']?>" class="input_text pr10" value="<?=number_format($row['op_price_cost'])?>" style="width:50%; text-align:right;ime-mode:disabled;" ><?=$row_good['ext_nm']?></td>
                                    <!-- B2B -->
                                    <td><input type="text" name="op_price_agent" id="op_price_agent_<?=$row['opid']?>" class="input_text pr10" value="<?=number_format($row['op_price_agent'])?>" style="width:50%; text-align:right;ime-mode:disabled;" ><?=$row_good['ext_nm']?></td>










                                    <td><input type="text" name="op_price_sell" id="op_price_sell_<?=$row['opid']?>" class="input_text pr10" value="<?=number_format($row['op_price_sell'])?>" style="width:50%; text-align:right;ime-mode:disabled;" ><?=$row_good['ext_nm']?></td>
                                    <!-- <td><input type="text" name="op_price_agent" id="op_price_agent_<?=$row['opid']?>" 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 class="Table_btn" type="button" value="수정" onclick="chk_edit_frm('<?=$row['opid']?>')" />
                                        <input class="Table_btn gray" type="button" value="삭제" onclick="if(!confirm('정말삭제하시겠습니까?'))return;ajax_loader('good_options_proc.html?SqlType=option_del&g_uid=<?=$g_uid?>&opid=<?=$row['opid']?>');" />
                                    </td>
                                </tr>
                            <?}?>
                            <tr class="bg_gray">
                                <td colspan="3"> + 신규 옵션 추가</td>
                                <!-- 옵션명(한국어) -->
                                <td><input type="text" name="op_nm_ko" class="input_text pl10" value="" style="width:90%;" hname="옵션명(한국어)" required></td>

                                <!-- 옵션명(노출언어) -->
                                <td><input type="text" name="op_nm" class="input_text pl10" value="" style="width:90%;" hname="옵션명" required></td>

                                <!-- 원가 -->
                                <td><input type="text" name="op_price_cost" class="input_text pr10" value="" style="width:50%;text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" hname="원가" required><?=$row_good['ext_nm']?></td>

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

                                <!-- B2C -->
                                <td><input type="text" name="op_price_sell" class="input_text pr10" value="" style="width:50%;text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" hname="B2C" required><?=$row_good['ext_nm']?></td>
                                <!-- <td><input type="text" name="op_price_agent" class="input_text pr10" value="" style="width:50%;text-align:right;ime-mode:disabled;" onkeydown="ChkNum(this,event);" onblur="this.value=comma(this.value)" hname="대리점가" required><?=$row_good['ext_nm']?></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_option_edit" id="frm_option_edit" method="post">
        <input type="hidden" name="SqlType" id="SqlType" value="option_updt">
        <input type="hidden" name="g_uid" value="<?=$g_uid?>">
        <input type="hidden" name="opid" value="">
        <input type="hidden" name="op_nm" value="">
        <input type="hidden" name="op_nm_ko" value="">
        <input type="hidden" name="order_num" value="">
        <input type="hidden" name="op_price_cost" value="" hname="원가" required>
        <input type="hidden" name="op_price_sell" value="" hname="판매가" required>
        <input type="hidden" name="op_price_agent" value="" required>
    </form>
    <!-- /폼 -->

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

            var result = to_validation(f);

            if(result == false) return;

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

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

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

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

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




        function chk_edit_frm(opid)
        {
            if(!opid){
                iziToast.show({
                    timeout:10000,
                    color: 'red',
                    title: '옵션 일련번호가 없습니다.',
                    message: "개발자를 불러주세요.",
                });

                iziToast.show({
                    timeout:10000,
                    color: 'red',
                    title: '옵션 일련번호가 없습니다.',
                    message: "개발자를 불러주세요.",
                });

                return false;
            }

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

            gUid = $('input[name="g_uid"]').val();
            op_nm = $("#op_nm_"+opid).val();
            op_nm_ko = $("#op_nm_ko_"+opid).val();
            order_num = $("#order_num_"+opid).val();
            op_price_cost = $("#op_price_cost_"+opid).val();
            op_price_sell = $("#op_price_sell_"+opid).val();
            op_price_agent = $("#op_price_agent_"+opid).val();


            $.ajax({
                type: "POST",
                url: "/toadmin/ajaxData/",
                data: {mode:'setGoodOption',gUid, opid, op_nm, op_nm_ko, order_num, op_price_cost, op_price_sell, op_price_agent},
                dataType: 'json',
                async:false,
                success: function (data) {
                    console.log(JSON.stringify(data));
                    if(data.result == true){
                        iziToast.show({
                            timeout:2000,
                            color: 'green',
                            title: '옵션수정',
                            message: "완료되었습니다.",
                        });

                    }else{
                        iziToast.show({
                            timeout:2000,
                            color: 'red',
                            title: '옵션수정실패',
                            message: data.errorMsg,
                        });
                    }
                },
                error: function (e) {
                    iziToast.show({
                        timeout:10000,
                        color: 'red',
                        title: '오류발생',
                        message: '개발자에게 문의해주세요.',
                    });
                    iziToast.show({
                        timeout:10000,
                        color: 'red',
                        title: '오류발생',
                        message: '개발자에게 문의해주세요.',
                    });
                    iziToast.show({
                        timeout:10000,
                        color: 'red',
                        title: '오류발생',
                        message: '개발자에게 문의해주세요.',
                    });
                }
            });

        }

        $(window).load(function(){
            $('#allEditBtn').click(function(){
                document.getElementsByClassName('dataOpId').length;
                for(i = 0; i < document.getElementsByClassName('dataOpId').length; i++){
                    opID = document.getElementsByClassName('dataOpId')[i].value;
                    chk_edit_frm(opID)
                }
            })
        });
    </script>

<?
include "../include/footer.html";
?>

Anon7 - 2021