$img - $time - $size Tags: ";
$tags = explode(" ", $tags);
foreach($tags as $tag){
echo "$tag "; // For future use - catagorize by tag
}
echo "
";
}
$result->free();
//echo " ";
}
}
function tag(){
if(!empty($_GET['tag'])){ // Show list of pictures according to one tag - maybe multiple tags in the future
echo "
";
}
$result->free();
//echo " ";
}
}
function search(){
if(!empty($_GET['search'])){ // Show list of pictures according to search term
$search = sanitize($_GET['search']);
$search = explode(" ", $search);
echo "
Pictures found using search terms: ";
foreach ($search as $searches){
echo $searches." ";
}
echo ":
";
}
$result->free();
}else{
if($_SESSION['noimg'] == 'search' || $_SESSION['noimg'] == 'tag' || $_SESSION['noimg'] == 'uname'){
}else{
noimg();
$_SESSION['noimg'] = true;
}
}
}
// END OF MAIN PROGRAM
function headstuff(){ // Sets the meta tags - WIP/iffy
if(isset($_SESSION['img'])){
echo "\n";
echo " \n";
echo " \n";
echo " \n";
}
}
function textstuff(){ // Sets up right side box of info under the other sidebars
if($_SESSION['noimg'] == false){
echo "
\n";
echo "
Image Name:
- ".$_SESSION['img']."\n";
echo "
Image Type:
- ".$_SESSION['type']."\n";
echo "
Image Size:
- ".$_SESSION['size']."\n";
echo "
Time Uploaded:
- ".$_SESSION['time']."\n";
echo "
Username:
- ";
$username = $_SESSION['username'];
echo "$username"; // For future use - catagorize by username
echo "\n";
echo "
Comment:
- ".$_SESSION['comment']."\n";
echo "
Tags:
- ";
$tags = $_SESSION['tags'];
$tags = explode(" ", $tags);
foreach($tags as $tag){
echo "$tag "; // For future use - catagorize by tag
}
echo "\n";
echo "
";
}
}
function noimg(){ // Shown in place of the image if one isn't available
$thelist = '';
// Last Modified not working, so removed for the time being
if($handle = opendir('Pictures')){
while(false != ($file = readdir($handle))){
if($file != "." && $file != ".." && $file != ".htaccess"){
$thelist .= ' └ '.$file.' '."\n";
}
}
closedir($handle);
}
echo "
Please specify an image with the url:
img.unps-gama.info/?img=(IMGAGE STUFF HERE)
List of Uploaded Pictures:
$thelist
";
}
function title(){ // Suffers same problem as headstuff()
if(!isset($_SESSION['img'])){
echo "";
}else{
echo " - Now Showing: ".$_SESSION['img'];
}
}
?>
UnPS-GAMA Image Host