| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 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/ |
Upload File : |
<?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>
</head>
<body bgcolor="#ffffff" text="#000000">
<?php
$count = array();
$mess = '';
$table = $_GET['list'];
if(isset($_POST['insert']))
{
$site_name = trim($_POST["site_name"]," ");
$thumb = trim($_POST["site_name"]).".jpg";
$query = "insert into $table ";
$query .= " (site_name, thumb) ";
echo $query .= " values ('".$site_name."', '".$thumb."') ";
$connection->update($query) or die("<br>check to see if you siteiate name is already entered<br>");
}
elseif(isset($_POST['modify']))
{
$site_name = trim($_POST["site_name"]," ");
$thumb = trim($_POST["site_name"]).".jpg";
$query = "update $table set ";
echo $query .= " site_name = '".$site_name."',
thumb = '".$thumb."'
where site_id = '".$_POST["site_id"]."'";
$connection->update($query) or die("<br>update<br>");
$mess = 'Record Updated!<br />';
}
elseif(isset($_POST['delete']))
{
$query = " delete from $table
where site_id = '".$_POST["site_id"]."'";
$connection->update($query) or die("<br>update<br>");
}
$uploaddir = ROOT."/images/$table/";
echo $uploadfile = $uploaddir . $thumb;
/*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 = $site_name.'.jpg';
$max_x = "20";
$max_y = "20";
include("thumb.php");
}
$query = "select site_id, site_name, thumb ";
$query .= " from $table order by site_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.site_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="?list=<?php echo $table ?>" method="post">
<td colspan="3" ><input name="site_name" type="text" /></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="?list=<?php echo $table ?>" method="post">
<input name="site_id" value="<?php if(isset($value['site_id'])){echo $value['site_id'];} ?>" type="hidden" />
<input type="hidden" name="MAX_FILE_SIZE" value="500000"/>
<td style="border:ridge 1px #cccccc;">
<input name="site_name" value="<?php if(isset($value['site_name'])){echo $value['site_name'];} ?>" type="text" />
</td>
<td style="border:ridge 1px #cccccc;" align="center">
<a href="javascript:ShowPopup('popupload.php?for=<?php echo $table ?>&site_name=<?php echo $value['site_name']; ?>')">
<img src="../images/<?php echo $table ?>/<?php echo $value["thumb"];?>" border="0" alt="U"/></a>
</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>