403Webshell
Server IP : 51.89.169.208  /  Your IP : 216.73.216.57
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/edit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/yellowleaf/public_html/edit/edit_4.html
<? 
require('../../connect.php'); 
$pagename='edit_4.html';
// css for menu
$styleManage = 'color:#ff6131;background-color:#fff;border-top:1px solid #c9c9c9;font-weight:bold;';
/// variable initialisations
$adid=$_GET['adid'];
$photoid=$_GET['photoid'];
$del=$_GET['del'];
$memberid=$_GET['memberid'];
$companyname=$_GET['adname'];
/////// finish
if(isset($_POST['finish'])){
	header('Location: /staff');
}

/////// delete image
if (!empty($del)) {
	$file = '../../members/uploads/'.$photoid.'/'.$adid.'_'.$photoid.'.jpg'; // name and directory of file
	@unlink($file); // deleting file
	$q6 = "UPDATE ads SET photo_{$photoid}='' WHERE photo_{$photoid}='{$photoid}' AND memberid='{$memberid}' AND adid='{$adid}'";
	$r6 = mysql_query($q6) or die(mysql_error());
}

/////// FETCHING PHOTOS
$query = mysql_query("SELECT * FROM ads WHERE memberid = '$memberid' and adid = '$adid'");
$row = mysql_fetch_array($query);
				
$photos=array($row['photo_1'],$row['photo_2'],$row['photo_3'],$row['photo_4']);
$pic1=$photos['0'];
$pic2=$photos['1'];
$pic3=$photos['2'];
$pic4=$photos['3'];

// checking fields are blank
if($pic1=='0'){
	$pic_content.= '<input type="hidden" name="pic" value="1">';
}elseif($pic2=='0'){
	$pic_content.= '<input type="hidden" name="pic" value="2">';
}elseif($pic3=='0'){
	$pic_content.= '<input type="hidden" name="pic" value="3">';
}elseif($pic4=='0'){
	$pic_content.= '<input type="hidden" name="pic" value="4">';
}

// photo contents
$total_rows=0;
$i = -1;
$pic_content.= '<table width="100%">';
foreach($photos as $photo){
	if($photo!='0'){
		$i++;
		if($i/4 == intval($i/4)){
			$pic_content.= '<tr>';
		}
		$pic_content.= '<td valign="bottom">
						<a target="_blank" href="../../members/uploads/'.$photo.'/'.$adid.'_'.$photo.'.jpg"><img width="100" src="../../members/uploads/'.$photo.'/'.$adid.'_'.$photo.'.jpg"></a><br>
						<div style="text-align:left;margin-right:20px;">
						Photo ID: '.$photo.'<br>
						<a style="color:red" href="'.$pagename.'?del=yes&photoid='.$photo.'&adid='.$row['adid'].'&memberid='.$memberid.'">Delete</a>
						</div></td>';
		if(($i+1)/4 == intval(($i+1)/4)){
			$pic_content.= '<tr>';
		}
		$total_rows++;
	}
}
$pic_content.= '</table>';
// CHECKING if photo limit reached
$photo_limit=4;
if($total_rows==$photo_limit){$limit=TRUE;}

?>
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>YellowLeaf UK</title>
<link href="../../style.css" rel="stylesheet" type="text/css">
<link href="../style_staff.css" rel="stylesheet" type="text/css">
</head>

<body>

<? include '../staff_header.php'; include 'edit_menu.php';?>
<table class="tbwdth">
	<tr>
		<td valign="top">
		<div class="cnHead">Manage Advert</div>				
		<?if($success==TRUE){?>
		<div class="successDvBx">
		Update Successful. Your details have been saved. <br><a href="manage.html">Click here to go back to Manage Advert ></a>
		</div>
		<?}?>
		<?if($limit==TRUE){?>
		<div class="limitDvBx">You have reached your picture upload limit! You cannot upload any more pictures.</div>
		<?}?>
		<form name="PostAdForm" action="<?=$pagename?>?adid=<?=$adid?>&memberid=<?=$memberid?>" method="POST" enctype="multipart/form-data" onsubmit="return CheckPostAd();" autocomplete="off">
			<table width="100%" border="0" cellspacing="0" cellpadding="5">
			<tr>
			<td colspan="2" align="left">
			<?=$pic_content?>
			</td>
			</tr>
			<tr>
			<td valign="top" colspan="2">
			<hr style="background-color: rgb(204, 204, 204);" width="100%" size="1" noshade="noshade" color="#cccccc">
			</td>
			</tr>
			<tr>
			<td align="center" colspan="2">
			</td>
			</tr>
		</table>
		</form>
		</td>
	</tr>
</table>

</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit