MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/handle.php
<? require_once "application_top.php";
$userid = $_SESSION['useridsess']?$_SESSION['useridsess']:"";
$action = (isset($_REQUEST['action']) && ($_REQUEST['action']))? $_REQUEST['action'] : 0;
$id = (isset($_REQUEST['id']) && ($_REQUEST['id']))? decode($_REQUEST['id']) : 0;
$filename = (isset($_REQUEST['pic']) && ($_REQUEST['pic']))? $_REQUEST['pic'] : 0;

if($action == "verifiedstatus"){
	if($id){
		$newstat = $_REQUEST['newstatus'];
		$sql = "update register set verified = ".$_REQUEST['newstatus']." where userid = ".$id;
		mysql_query($sql) or die(mysql_error());
		$_SESSION['msg'] = "verification Status changed successfully!";
		
	}
}
if($action == "activestatus"){
	if($id){
		$newstat = $_REQUEST['newstatus'];
		$sql = "update register set istatus = ".$_REQUEST['newstatus']." where userid = ".$id;
		mysql_query($sql) or die(mysql_error());
		$_SESSION['msg'] = "Member Status changed successfully!";
	}
}

if($action == "productstatus"){
	if($id){
		$newstat = $_REQUEST['newstatus'];
		$updatedata = array(
			'isactive'=> $newstat,
		);
		$db->where('pid',$id);
		$db->where('sellerid',$userid);
		$db->update('products',$updatedata);
		$_SESSION['msg'] = "Product updated successfully!";
	}
}

if($action == "deleteproduct"){
	if($id){
		$sql = "select * from products where pid = ? limit 1";
		$param[] = $id;
		$row = $db->rawQuery($sql,$param);
		if(count($row)){
			for($i=1;$i<=6;$i++){
				@unlink('images/products/'.$row[0]["pic".$i]);				
			}
		}
		$db->where('pid',$id);
		$db->delete('products');
		$_SESSION['msg'] = "Data Deleted";
	}
}	

if($action == "removedp"){
	if($userid){
		$sql = "select * from register where userid = ? limit 1";
		$param[] = $userid;
		$row = $db->rawQuery($sql,$param);
		if(count($row)){
			if($row[0]["pic1"]){
			@unlink('images/photos/photosThumbs/'.$row[0]["pic"]);
			}
		}
		$updatedata = array(
			'pic1'=> ''
		);
		$db->where('userid',$userid);
		$db->update('register',$updatedata);
		
		$_SESSION['dpsess'] = "";
		$_SESSION['msg'] = "Display pic removed";
	}
}	


header("location:".$_SERVER['HTTP_REFERER']);exit;
?>