Total revamp, brand new code

This commit is contained in:
alopexc0de 2012-11-16 04:15:24 -05:00
parent 817425c9dc
commit 3a9a44f608

View File

@ -1,29 +1,13 @@
<?php
$img = $_GET["img"];
strip_tags($img);
$img = strip_tags($img);
?>
<html prefix="og: http://ogp.me/ns#"> <html prefix="og: http://ogp.me/ns#">
<head> <head>
<meta name="description" content="UnPS-GAMA IMGSHARE" /> <meta name="description" content="UnPS-GAMA IMGSHARE" />
<meta name="keywords" content="GAMA,UnPS,upstandards,unps-gama,gama-unps,unps,gama,davitech,davitodd" /> <meta name="keywords" content="GAMA,UnPS,upstandards,unps-gama,gama-unps,unps,gama,davitech,davitodd" />
<meta name="author" content="David Todd" /> <meta name="author" content="David Todd" />
<?php <link rel="shortcut icon" type="image/ico" href="http://unps-gama.info/favicon.ico" />
if ($img == null){ <link rel="shortcut icon" type="image/x-icon" href="http://unps-gama.info/favicon.ico" />
$title = " ";
}else{
$title = " - Now Showing: " . $img;
print "<meta property='og:title' content='". $img ."' />\n";
print "<meta property='og:url' content='http://unps-gama.tk/img/index.php?img=". $img ."' />\n";
print "<meta property='og:image' content='http://unps-gama.tk/img/". $img ."' />\n";
print "<meta property='og:description' content='http://unps-gama.tk/img/". $img ."' />\n";
}
print "<title>GAMA IMGShare" . $title ."</title>\n";
?>
<script src="http://code.jquery.com/jquery-latest.js"></script> <script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript" language="JavaScript">
function set_body_height() function set_body_height(){
{
var wh = $(window).height(); var wh = $(window).height();
$('body').attr('style', 'height:' + wh + 'px;'); $('body').attr('style', 'height:' + wh + 'px;');
} }
@ -45,31 +29,129 @@ $(document).ready(function() {
display: block; display: block;
margin: auto; margin: auto;
} }
.image{
text-align: center;
max-width: 100%;
max-height: 100%;
color: #fff;
float: center;
}
.info{
text-align: right;
max-width: 100%;
max-height: 100%;
color: #fff;
float: right;
}
</style> </style>
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="greem" link="red" vlink="purple"> </head>
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="white" link="red" vlink="purple">
<div align="center"> <div align="center">
<a href="http://www.unps-gama.info/">
<a href="http://unps-gama.tk/img/"> <img src="http://unps-gama.info/upload/Pictures/header.png" alt="To UnPS-GAMA" title="To Home" />
<img src="http://unps-gama.tk/upload/Pictures/header.png" alt="To UnPS-GAMA" title="To Home" />
</a> </a>
<br> <br>
<?php <?php
function sanatize($input){
if ($input == null) die("Sanatize() - No Input Provided, Aborting\r\n<br>");
$output = strip_tags($input);
$output = stripslashes($output);
$output = mysql_real_escape_string($output);
$output = strtolower($output);
return $output;
}
$img = $_GET["img"]; // get the image
if(isset($img) || $img != null || $img != ''){
require('dbsettings.php');
$img = sanatize($img); // clean image string
$sql = "SELECT id, name, location, type, size, time, comment, username FROM $tbl_name WHERE name='$img'";
$result = mysql_query($sql);
$count = mysql_num_rows($result);
if($count == 1){
$i = 0;
while ($row = mysql_fetch_assoc($result)){ // Attempt to pull all data concerning that one user from table
$id = $row['id'];
$img = $row['name'];
$location = $row['location'];
$type = $row['type'];
$size = $row['size'];
$time = $row['time'];
$comment = $row['comment'];
$username = $row['username'];
echo "<meta property='og:title' content='". $img ."' />\n";
echo "<meta property='og:url' content='http://img.unps-gama.info/index.php?img=". $img ."' />\n";
echo "<meta property='og:image' content='http://img.unps-gama.info/". $location."/".$img ."' />\n";
echo "<meta property='og:description' content='http://img.unps-gama.info/". $comment ."' />\n";
$title = " - Now Showing: " . $img;
echo "<title>GAMA IMGShare" . $title ."</title>\n";
echo "
<table id=\"image\">
<tr>
<td><img id='the_pic' class='fit' src=\"$location/$img\" /></td>
<td>
<table id=\"info\">
<tr>
<td>
Currently Viewing: $img
</td>
</tr>
<tr>
<td>
Image Type: $type
</td>
</tr>
<tr>
<td>
Image Size: $size
</td>
</tr>
<tr>
<td>
Time/Date Posted: $time
</td>
</tr>
<tr>
<td>
Poster's Username: $username
</td>
</tr>
<tr>
<td>
Poster's Comment: $comment
</td>
</tr>
<tr>
<td>
<a href=\"index.php\">Back to index</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
";
mysql_close();
}
}}else{
include('getfiles.php'); include('getfiles.php');
echo "
<title>GAMA IMGShare</title>
<img src='zen1.png' align='left'>
<p>You didn't specify an image. This is an image hoster.
if ($img == null){ <img src='zen1.png' align='right'>
echo "<img src='zen1.png' align='left'><p>You didn't specify an image. This is an image hoster.<img src='zen1.png' align='right'> <br />Please specify an image with the url: <font color='blue'><code>unps-gama.tk/img/?img=(IMGAGE STUFF HERE)</code></font></p><br /><h4>Want to upload pictures?</h4><a href='imgup.php'>Image Uploader Here</a><br /><hr /><br />" . "<table><tr><td><P>List of files:</p></td><td>" . $thelist . "</td></table>"; <br />
Please specify an image with the url: <font color='blue'><code>img.unps-gama.info/?img=(IMGAGE STUFF HERE)</code></font></p>
}else{ <br />
echo "<table><div align='center'>\n"; <h4>Want to upload pictures?</h4>
echo "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a></div></td><tr>\n"; <a href='imgup.php'>Image Uploader Here</a><br />
echo "<tr><td><div align='center'><a href='http://unps-gama.tk/img/" . $img . "'><img id='the_pic' class='center fit' src='" . $img . "' /></a></div></td></tr>\n"; <hr />";
echo "<tr><td><div align='center'><p>Currently viewing: <a href='http://unps-gama.tk/img/" . $img . "'>" . $img . "</a></p></div><tr><td>\n"; echo "<table><tr><td><P>List of files:</p></td></tr><tr><td>" . $thelist . "</td></tr></table>";
echo "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a><tr><td></div></table>\n"; mysql_close();
} }
?> ?>
<br></div> </div>
</body></html>