mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-11-01 02:27:46 +00:00
Uses an even more modified Prymont2 theme and cleaner code inside
This commit is contained in:
parent
352b9bb13e
commit
c6b0ee8564
362
img/index.php
362
img/index.php
@ -1,11 +1,134 @@
|
|||||||
<html prefix="og: http://ogp.me/ns#">
|
<?php
|
||||||
|
session_start();
|
||||||
|
session_unset();
|
||||||
|
session_destroy();
|
||||||
|
$thelist = '';
|
||||||
|
$img = 'meow.png';
|
||||||
|
$id = '';
|
||||||
|
$location = '';
|
||||||
|
$type = '';
|
||||||
|
$size = '';
|
||||||
|
$time = '';
|
||||||
|
$comment = '';
|
||||||
|
$username = '';
|
||||||
|
$tags = '';
|
||||||
|
$noimg = false;
|
||||||
|
|
||||||
|
function sanitize($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;
|
||||||
|
}
|
||||||
|
|
||||||
|
function imgstuff(){
|
||||||
|
if (empty($_GET['img']) || $_GET['img'] == null || $_GET['img'] == ''){
|
||||||
|
$img = '';
|
||||||
|
}else{
|
||||||
|
$img = $_GET["img"]; // get the image
|
||||||
|
}
|
||||||
|
if(!empty($img) || $img != null || $img != ''){
|
||||||
|
require('dbsettings.php');
|
||||||
|
$img = sanitize($img); // clean image string
|
||||||
|
$sql = "SELECT id, name, location, type, size, time, comment, username, tags FROM $tbl_name WHERE name='$img' LIMIT 1;";
|
||||||
|
$result = mysql_query($sql);
|
||||||
|
$row = mysql_fetch_assoc($result);
|
||||||
|
if ($row){
|
||||||
|
$_SESSION['noimg'] = false;
|
||||||
|
$_SESSION['id'] = $row['id'];
|
||||||
|
$_SESSION['img'] = $row['name'];
|
||||||
|
$_SESSION['location'] = $row['location'];
|
||||||
|
$_SESSION['type'] = $row['type'];
|
||||||
|
$_SESSION['size'] = $row['size'];
|
||||||
|
$_SESSION['time'] = $row['time'];
|
||||||
|
$_SESSION['comment'] = $row['comment'];
|
||||||
|
$_SESSION['username'] = $row['username'];
|
||||||
|
$_SESSION['tags'] = $row['tags'];
|
||||||
|
echo "<img id='the_pic' class='fit' src=\"".$_SESSION['location']."/$img\" /><br /><p></p>";
|
||||||
|
//echo "$id<br>$img<br>$location<br>$type<br>$size<br>$time<br>$comment<br>$username<br>$tags\n";
|
||||||
|
mysql_close();
|
||||||
|
}else{
|
||||||
|
$_SESSION['noimg'] = true;
|
||||||
|
echo "<center><h3>That image was not found in our database D:</h3></center>";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
noimg();
|
||||||
|
$_SESSION['noimg'] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function headstuff(){
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
|
function textstuff(){
|
||||||
|
if($_SESSION['noimg'] == false){
|
||||||
|
echo "<div align=\"left\">\n";
|
||||||
|
echo "<h3>Image Name:</h3><code> - ".$_SESSION['img']."</code>\n";
|
||||||
|
echo "<h3>Image Type:</h3><code> - ".$_SESSION['type']."</code>\n";
|
||||||
|
echo "<h3>Image Size:</h3><code> - ".$_SESSION['size']."</code>\n";
|
||||||
|
echo "<h3>Time Uploaded:</h3><code> - ".$_SESSION['time']."</code>\n";
|
||||||
|
echo "<h3>Username:</h3><code> - ".$_SESSION['username']."</code>\n";
|
||||||
|
echo "<h3>Comment:</h3><code> - ".$_SESSION['comment']."</code>\n";
|
||||||
|
echo "<h3>Tags:</h3><code> - ".$_SESSION['tags']."</code>\n";
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function noimg(){
|
||||||
|
$thelist = '';
|
||||||
|
//include('getfiles.php');
|
||||||
|
echo "
|
||||||
|
<p>
|
||||||
|
Please specify an image with the url:
|
||||||
|
<code>
|
||||||
|
img.unps-gama.info/?img=(IMGAGE STUFF HERE)
|
||||||
|
</code>
|
||||||
|
</p>
|
||||||
|
<center>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<center>List of files:</center>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
$thelist
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
function title(){
|
||||||
|
if(empty($img) || $img = null || $img = ''){
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
return " - Now Showing: ".$img;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!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" prefix="og: http://ogp.me/ns#">
|
||||||
<head>
|
<head>
|
||||||
<meta name="description" content="UnPS-GAMA IMGSHARE" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<meta name="description" content="Image Host for UnProfessional Standards" />
|
||||||
<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" />
|
||||||
<link rel="shortcut icon" type="image/ico" href="http://unps-gama.info/favicon.ico" />
|
<?php //headstuff(); ?>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="http://unps-gama.info/favicon.ico" />
|
<title>UnPS-GAMA Image Host<?php echo title(); ?></title>
|
||||||
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
|
||||||
|
<script src="jquery.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();
|
||||||
@ -16,150 +139,115 @@
|
|||||||
$(window).bind('resize', function() { set_body_height(); });
|
$(window).bind('resize', function() { set_body_height(); });
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style type="text/css">
|
||||||
* {
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.fit {
|
.fit {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
}
|
}
|
||||||
.center {
|
|
||||||
display: block;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
.footer{
|
|
||||||
padding-left: 4%;
|
|
||||||
padding-right: 4%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
* a{ color: #003399;}
|
|
||||||
* a:visited { color: #ff0000;}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="white">
|
<body>
|
||||||
<div align="center">
|
<div id="page_wrap">
|
||||||
<a href="http://www.unps-gama.info/">
|
<div id="header">
|
||||||
<img src="http://unps-gama.info/upload/Pictures/header.png" alt="To UnPS-GAMA" title="To Home" />
|
<img src="header.png" alt="Header image"/>
|
||||||
</a>
|
</div>
|
||||||
<br>
|
<div id="main_navi">
|
||||||
|
<ul class="left">
|
||||||
|
<li><a href="http://www.unps-gama.info">Home</a></li>
|
||||||
|
<li><a href="http://unps.us" target="_unps">Shortener</a></li>
|
||||||
|
<li><a href="http://p.unps.us" target="_pro">Projects</a></li>
|
||||||
|
<li><a href="https://github.com/alopexc0de/GAMA-Site" target="_git">GitHub</a></li>
|
||||||
|
<li><a href="http://www.unps-gama.info/ToS.html">Terms of Service</a></li>
|
||||||
|
<li><a href="http://www.unos-gama.info/privacy.html">Privacy Policy</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul class="right">
|
||||||
|
<li class="twitter"><a href="http://twitter.com/upstandards" title="Follow UnPS on twitter">TWITTER</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div id="container">
|
||||||
|
<div id="main">
|
||||||
|
<div class="sticky">
|
||||||
|
New design underway :D
|
||||||
|
</div>
|
||||||
|
<div class="post">
|
||||||
|
<div class="entry">
|
||||||
<?php
|
<?php
|
||||||
function sanatize($input){
|
imgstuff();
|
||||||
if ($input == null) die("Sanatize() - No Input Provided, Aborting\r\n<br>");
|
?>
|
||||||
$output = strip_tags($input);
|
</div>
|
||||||
$output = stripslashes($output);
|
</div>
|
||||||
$output = mysql_real_escape_string($output);
|
</div>
|
||||||
$output = strtolower($output);
|
<div id="sidebar">
|
||||||
return $output;
|
<ul>
|
||||||
}
|
<li class="widget widget_text">
|
||||||
|
<div class="textwidget">
|
||||||
$img = $_GET["img"]; // get the image
|
<span>
|
||||||
if(isset($img) || $img != null || $img != ''){
|
ADS GO HERE
|
||||||
require('dbsettings.php');
|
<script type="text/javascript">
|
||||||
|
//<!--
|
||||||
$img = sanatize($img); // clean image string
|
google_ad_client = "ca-pub-6762927271223365";
|
||||||
|
/* sidebar ads */
|
||||||
$sql = "SELECT id, name, location, type, size, time, comment, username FROM $tbl_name WHERE name='$img'";
|
google_ad_slot = "1523932882";
|
||||||
$result = mysql_query($sql);
|
google_ad_width = 120;
|
||||||
$count = mysql_num_rows($result);
|
google_ad_height = 240;
|
||||||
if($count == 1){
|
//-->
|
||||||
$i = 0;
|
</script>
|
||||||
while ($row = mysql_fetch_assoc($result)){ // Attempt to pull all data concerning that one user from table
|
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||||
$id = $row['id'];
|
</span>
|
||||||
$img = $row['name'];
|
</div>
|
||||||
$location = $row['location'];
|
</li>
|
||||||
$type = $row['type'];
|
</ul>
|
||||||
$size = $row['size'];
|
<br />
|
||||||
$time = $row['time'];
|
<ul>
|
||||||
$comment = $row['comment'];
|
<li class="widget widget_text">
|
||||||
$username = $row['username'];
|
<div class="textwidget">
|
||||||
|
<span>
|
||||||
echo "<meta property='og:title' content='". $img ."' />\n";
|
Social Media Buttons Here
|
||||||
echo "<meta property='og:url' content='http://img.unps-gama.info/index.php?img=". $img ."' />\n";
|
</span>
|
||||||
echo "<meta property='og:image' content='http://img.unps-gama.info/". $location."/".$img ."' />\n";
|
</div>
|
||||||
echo "<meta property='og:description' content='http://img.unps-gama.info/". $comment ."' />\n";
|
</li>
|
||||||
$title = " - Now Showing: " . $img;
|
</ul>
|
||||||
echo "<title>GAMA IMGShare" . $title ."</title>\n";
|
<?php
|
||||||
|
if($_SESSION['noimg'] == false){
|
||||||
echo "
|
echo "
|
||||||
<table id=\"image\">
|
<br />
|
||||||
<tr>
|
<ul>
|
||||||
<td><img id='the_pic' class='fit' src=\"$location/$img\" /></td>
|
<li class=\"widget widget_text\">
|
||||||
<td>
|
<div class=\"textwidget\">
|
||||||
<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();
|
textstuff();
|
||||||
}
|
echo "
|
||||||
}}else{
|
</div>
|
||||||
include('getfiles.php');
|
</li>
|
||||||
|
</ul>
|
||||||
|
";
|
||||||
|
}else{
|
||||||
echo "
|
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 />
|
<br />
|
||||||
|
<ul>
|
||||||
|
<li class=\"widget widget_text\">
|
||||||
|
<div class=\"textwidget\">
|
||||||
<h4>Want to upload pictures?</h4>
|
<h4>Want to upload pictures?</h4>
|
||||||
<a href='imgup.php'>Image Uploader Here</a><br />
|
<a href='imgup.php'>Image Uploader Here</a>
|
||||||
<hr />";
|
</div>
|
||||||
echo "<table><tr><td><P>List of files:</p></td></tr><tr><td>" . $thelist . "</td></tr></table>";
|
</li>
|
||||||
mysql_close();
|
</ul>
|
||||||
|
";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div><hr />
|
</div>
|
||||||
<div class="footer"><a href="http://unps-gama.info">Home</a> <a href="http://unps-gama.info/ToS.html">Terms of Service</a> <a href="http://unps-gama.info/privacy.html">Privacy Policy</a></div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<div class="footer_wrapper">
|
||||||
|
<div class="footer_left">
|
||||||
|
<p>
|
||||||
|
<a href="http://www.unps-gama.info/privacy.html">Privacy Policy</a> - <a href="http://www.unps-gama.info/ToS.html">Terms of Service</a> - Modified <a href="http://imotta.cn/wordpress/pyrmont-theme-v2-for-wordpress.html">Pyrmont V2</a> - <strong>Copyright © 2012-2013 UnPS-GAMA</strong>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- end footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user