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,75 +1,157 @@
<?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 = " "; <script src="http://code.jquery.com/jquery-latest.js"></script>
}else{ <script type="text/javascript" language="JavaScript">
$title = " - Now Showing: " . $img; function set_body_height(){
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 type="text/javascript" language="JavaScript">
function set_body_height()
{
var wh = $(window).height(); var wh = $(window).height();
$('body').attr('style', 'height:' + wh + 'px;'); $('body').attr('style', 'height:' + wh + 'px;');
} }
$(document).ready(function() { $(document).ready(function() {
set_body_height(); set_body_height();
$(window).bind('resize', function() { set_body_height(); }); $(window).bind('resize', function() { set_body_height(); });
}); });
</script> </script>
<style> <style>
* { * {
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.fit { .fit {
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
} }
.center { .center {
display: block; display: block;
margin: auto; margin: auto;
} }
</style> .image{
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="greem" link="red" vlink="purple"> text-align: center;
<div 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>
</head>
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="white" link="red" vlink="purple">
<div align="center">
<a href="http://www.unps-gama.info/">
<img src="http://unps-gama.info/upload/Pictures/header.png" alt="To UnPS-GAMA" title="To Home" />
</a>
<br>
<a href="http://unps-gama.tk/img/">
<img src="http://unps-gama.tk/upload/Pictures/header.png" alt="To UnPS-GAMA" title="To Home" />
</a>
<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;
}
include('getfiles.php'); $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";
if ($img == null){ echo "<meta property='og:url' content='http://img.unps-gama.info/index.php?img=". $img ."' />\n";
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>"; 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";
}else{ $title = " - Now Showing: " . $img;
echo "<table><div align='center'>\n"; echo "<title>GAMA IMGShare" . $title ."</title>\n";
echo "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a></div></td><tr>\n"; echo "
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"; <table id=\"image\">
echo "<tr><td><div align='center'><p>Currently viewing: <a href='http://unps-gama.tk/img/" . $img . "'>" . $img . "</a></p></div><tr><td>\n"; <tr>
echo "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a><tr><td></div></table>\n"; <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');
echo "
<title>GAMA IMGShare</title>
<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>img.unps-gama.info/?img=(IMGAGE STUFF HERE)</code></font></p>
<br />
<h4>Want to upload pictures?</h4>
<a href='imgup.php'>Image Uploader Here</a><br />
<hr />";
echo "<table><tr><td><P>List of files:</p></td></tr><tr><td>" . $thelist . "</td></tr></table>";
mysql_close();
} }
?> ?>
<br></div> </div>
</body></html>