403Webshell
Server IP : 51.89.169.208  /  Your IP : 18.216.230.65
Web Server : Apache
System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64
User : yellowleaf ( 1019)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/yellowleaf/public_html/members/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yellowleaf/public_html/members/upload-logo.php
<?php

$path  = $_SERVER['DOCUMENT_ROOT'];
include_once $path.'/connect_db.php';
include 'accesscontrol.php';
$adid=addslashes($_GET['adid']);
// if(advert_check($adid,$memberid)===false){
// 	header('Location: index.html');exit();
// }
if(isset($_POST['submit'])){
	$vaild = true;

	// if ($vaild == true) {

	// 	$query = $connect->query("select image from members WHERE memberid='{$memberid}'");
	// 	// $query = $connect->query("select image from members WHERE memberid='{$memberid}'");
	// 	$tel_exist = mysqli_fetch_array($query);
	
		$target_dir = "/uploads/logo/";
		$image = $_FILES['image']['name'];
		$tmp_image = $_FILES['image']['tmp_name'];
		$newFileName = $target_dir.$memberid.'.'. pathinfo($image ,PATHINFO_EXTENSION);
		define ('SITE_ROOT', realpath(dirname(__FILE__)));
		move_uploaded_file($tmp_image,SITE_ROOT.$newFileName);
		$result = $connect->query("UPDATE members SET image = '$newFileName' WHERE memberid ='{$memberid}'");

		if ($result) {
			$postbusiness_error =$tel_exist['image'].'-'. '<div class="alert alert-success">your image uploaded successfully</div>';
		} else {
			$postbusiness_error =$tel_exist['image'].'-'. '<div class="alert alert-error">Ups someting is wrong. image not uploaded</div>';
		}
	// }

}
?>


<!DOCTYPE html>
<html lang="en">

<head>
	<title>YellowLeaf - Submit Advert</title>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'>
	<link rel="stylesheet" href="/header-footer/global.css">
	<link rel="stylesheet" href="index.css">
	<style>
		.form-group .select,
		.form-group input {
			border-radius: 4px;
			padding: 0 16px;
		}
		.form-group textarea {
			border-radius: 4px;
			padding: 12px 16px;
		}
	</style>
</head>
<body>

	<? include 'member_menu.php'; ?>

	<!-- NAVBAR -->
	<section id="content">
		<!-- NAVBAR -->
		<nav>
			<i class='bx bx-menu toggle-sidebar'></i>
			<a href="/members/logout.html" class="logout">
				<i class='bx bx-log-out'></i>
				Logout
			</a>
		</nav>
		<!-- NAVBAR -->

		<!-- MAIN -->
		<main>
			<div class="container">
				<h1 class="title">Upload Logo</h1>
				<!-- <ul class="breadcrumbs">
			<li><a href="#">Home</a></li>
			<li class="divider">/</li>
			<li><a href="#" class="active">Dashboard</a></li>
			</ul> -->
				<div class="main-content">
					<div class="main-box">
					<?= $postbusiness_error ?>
						<form action="" method="POST" enctype="multipart/form-data">
							<div class="form-box">
								<div class="form-description">Upload your advert logo</div>
								<div class="form-group">
									<input type="file" id="postcode" name="image" accept="image/*" class="upload-image-input">
                                    <label for="postcode" class="upload-image">
                                        <i class='bx bx-cloud-upload'></i>
                                        <div class="upload-image-text">Click to upload logo</div>
                                    </label>
								</div>
							</div>
							<button type="submit" name="submit" class="button button-yellow">Save</button>
						</form>
					</div>
				</div>
			</div>
		</main>
		<!-- MAIN -->
	</section>
	<!-- NAVBAR -->

    <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script src="script.js"></script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit