mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-22 01:32:40 +00:00
Added the files of the project to the repo
This commit is contained in:
parent
a827816c25
commit
3891df50bf
28
404.html
Normal file
28
404.html
Normal file
@ -0,0 +1,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Hmm... a 404 error...</title>
|
||||
<link rel="shortcut icon" type="image/ico" href="favicon.ico">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="green" link="purple" vlink="red">
|
||||
<div align="center">
|
||||
<a href="http://unps-gama.tk/index.php"><img src="http://unps-gama.tk/upload/Pictures/header.png" alt="Home" title="Go to index" /></a>
|
||||
<br />
|
||||
<h1>I spy a 404 error</h1>
|
||||
<img src="http://unps-gama.tk/img/zen1.png" alt="anthrostuff" title="Something's not right here..." align="left" />
|
||||
<font size="4" face="Helvetica"><p>It seems that you tried to access a GAMA resource that you aren't allowed to access yet, <img src="http://unps-gama.tk/img/zen1.png" alt="anthrostuff" title="Something's not right here..." align="right" /><br />you tried to get to a file that used to exist,
|
||||
but could have been moved or deleted, or you tried to access a file that was never hosted on this server.<br /><hr /><br />
|
||||
Regardless of the reason, you have been brought here. Now I would love to help you, but I can only do what I'm told if I know what you want.<br /></p></font>
|
||||
<h2>Some useful links would include...</h2>
|
||||
<p align="center"><font size="3" face="Arial">
|
||||
<a href="skype:alopexlagopus-c0de?chat">Skype the admin</a> ||
|
||||
<a href="malito:c0de@unps-gama.tk">E-mail the admin</a> ||
|
||||
<a href="http://unps-gama.tk/index.php">Home</a> ||
|
||||
<a href="http://unps-gama.tk/upload/index.php">Uploads</a> ||
|
||||
<a href="http://unps-gama.tk/img/index.php">Image Host</a> ||
|
||||
<a href="http://unps-gama.tk/fp/flatpress">Personal Blog</a> ||
|
||||
<a href="http://unps-gama.tk/linfo/linfo-1.8.1">Server Information</a>
|
||||
</font></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
favicon.ico
Executable file
BIN
favicon.ico
Executable file
Binary file not shown.
After Width: | Height: | Size: 6.6 KiB |
14
img/getfiles.php
Executable file
14
img/getfiles.php
Executable file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if ($handle = opendir('.')) {
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != ".." && $file != "index.php" && $file != "getfiles.php" && $file != "imgup.php")
|
||||
{
|
||||
$last_modified = filemtime($file);
|
||||
//print(date("m/j/y h:i:s a", $last_modified));
|
||||
$thelist .= '<a href="http://unps-gama.tk/img/?img='.$file.'">'.$file.'</a> Last Modified: <font align="right" color="green">'. date("m/j/y h:i:s a", $last_modified) .'</font><br />';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
429
img/imgup.php
Executable file
429
img/imgup.php
Executable file
@ -0,0 +1,429 @@
|
||||
<?
|
||||
/*
|
||||
//================================================================================
|
||||
* phphq.Net Custom PHP Scripts *
|
||||
//================================================================================
|
||||
:- Script Name: phUploader
|
||||
:- Version: 1.3
|
||||
:- Release Date: June 23rd 2004
|
||||
:- Last Updated: Jan 23 2010
|
||||
:- Author: Scott Lucht <scott@phphq.net> http://www.phphq.net
|
||||
:- Copyright (c) 2010 All Rights Reserved
|
||||
:-
|
||||
:- This script is free software; you can redistribute it and/or modify
|
||||
:- it under the terms of the GNU General Public License as published by
|
||||
:- the Free Software Foundation; either version 2 of the License, or
|
||||
:- (at your option) any later version.
|
||||
:-
|
||||
:- This script is distributed in the hope that it will be useful,
|
||||
:- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
:- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
:- GNU General Public License for more details.
|
||||
:- http://www.gnu.org/licenses/gpl.txt
|
||||
:-
|
||||
//================================================================================
|
||||
* Description
|
||||
//================================================================================
|
||||
:- phUploader is a script for uploading single or multiple images or files to your website. You can specify your
|
||||
:- own file extensions that are accepted, the file size and naming options. This script was built and tested on
|
||||
:- IIS6/7 and Apache 2+. It's recommended to use php 5.1+ This script is very useful for temporary file
|
||||
:- storage or simple sig and avatar hosting.
|
||||
//================================================================================
|
||||
* Setup
|
||||
//================================================================================
|
||||
:- To setup this script, upload phUploader.php to a folder on your server. Create a new folder named uploads
|
||||
:- and chmod it to 777. Edit the variables below to change how the script acts. Please read the notes if you
|
||||
:- don't understand something.
|
||||
//================================================================================
|
||||
* Change log
|
||||
//================================================================================
|
||||
:- Version 1.0
|
||||
:- 1) Initial Release
|
||||
:- Version 1.1
|
||||
:- 1) Minor bug fixes
|
||||
:- 2) Enabled multiple file uploads
|
||||
:- Version 1.2
|
||||
:- 1) Added CSS styling
|
||||
:- 2) Removed automatic creation of file upload folder.
|
||||
:- 3) Improved cookie security by hashing password and storing it within the cookie for authentication.
|
||||
:- 4) Minor bug fixes
|
||||
:- Version 1.3
|
||||
:- 1) Re-write of many core functions to increase security.
|
||||
:- 2) Patched a vulnerability that allowed a remote attacker to upload a file with two extensions and then
|
||||
:- remotely execute the script on a vulnerable web server. <http://www.securityfocus.com/bid/25405>
|
||||
:- 3) New feature allows files that pass validation to be uploaded while files that fail validation are not
|
||||
:- uploaded without rejecting to whole group of files.
|
||||
:- 4) Fixed a flaw that allowed files with blank names or un-sanitized names to be uploaded which may
|
||||
:- cause issues for some users.
|
||||
:- 5) Minor bug fixes
|
||||
//================================================================================
|
||||
* Frequently Asked Questions
|
||||
//================================================================================
|
||||
:- Q1: I always get an error that the files were not uploaded. IE: GENERAL ERROR
|
||||
:- 1) Make sure you have CHMOD your "uploads" folder to 777 using your FTP client or similar. If you do
|
||||
:- not know how to do this ask your hosting provider.
|
||||
:- 2) Make sure the uploads folder actually exists. This is the second most common mistake aside from
|
||||
:- improper permissions.
|
||||
:- 3) If you are having problems uploading after you have chmod the uploads folder 777, try using the
|
||||
:- full server path in $fullpath below. If you do not know this ask your host.
|
||||
:- 4) Make sure "file_uploads" is set to ON in php.ini
|
||||
:-
|
||||
:- Q2: The page takes long to load and then gives me a page cannot be displayed or a blank page.
|
||||
:- 1) This is usually due to a low value in php.ini for "max_execution_time".
|
||||
:- 2) A newer ini setting "max_file_uploads" in php 5.2.12 was added which may be limiting the number
|
||||
of simultaneous uploads.
|
||||
:- 3) Your "upload_max_filesize" and "post_max_size" in php.ini might be set to low.
|
||||
:-
|
||||
:- Q3: How do I edit the colors of the form?
|
||||
:- 1) You will need to edit the CSS near the bottom of the script to change the looks and colors of the form.
|
||||
:- Check http://www.w3schools.com/css/default.asp for more information on CSS.
|
||||
:-
|
||||
:- Q4: Can I remove your copyright link?
|
||||
:- 1) I can't physically stop you. However, I really appreciate it when people leave it intact.
|
||||
:- Some people donate $5, $10, $20 to take it off.
|
||||
:-
|
||||
:- Q5: You never respond to my emails or to my questions in your forums!
|
||||
:- 1) I'm a very busy guy. I'm out of town a lot, and at any given time I have several projects going on.
|
||||
:- I get a lot of emails about this script, not to mention my other ones.
|
||||
:- 2) I only understand English. If your English is very bad please write in your native language and then
|
||||
:- translate it to English using <http://babelfish.altavista.com/babelfish/tr>.
|
||||
:- 3) If you are going to contact me, describe the issue you are having as completly as possible.
|
||||
:- "dude me form don't work see it at blah.com what's wrong??!?!" will get no response, ever. Write
|
||||
:- in detail what the problem is. Spend a minute on it, and maybe I'll take some of my time to reply.
|
||||
:-
|
||||
/*
|
||||
//================================================================================
|
||||
* ! ATTENTION !
|
||||
//================================================================================
|
||||
:- Please read the above FAQ before giving up or emailing me. It may sort out your problems!
|
||||
*/
|
||||
|
||||
// Max size PER file in KB
|
||||
$max_file_size="4096";
|
||||
|
||||
// Max size for all files COMBINED in KB
|
||||
$max_combined_size="8102";
|
||||
|
||||
//Maximum file uploades at one time
|
||||
$file_uploads="4";
|
||||
|
||||
//The name of your website
|
||||
$websitename="UnPS-GAMA IMGShare Uploader";
|
||||
|
||||
// Full browser accessable URL to where files are accessed. With trailing slash.
|
||||
$full_url="http://unps-gama.tk/img/?img=";
|
||||
|
||||
// Path to store files on your server If this fails use $fullpath below. With trailing slash.
|
||||
$folder="./";
|
||||
|
||||
// Use random file names? true=yes (recommended), false=use original file name.
|
||||
// Random names will help prevent files being denied because a file with that name already exists.
|
||||
$random_name=true;
|
||||
|
||||
// Types of files that are acceptiable for uploading. Keep the array structure.
|
||||
$allow_types=array("jpg","gif","png","bmp","JPEG","JPG","GIF","PNG");
|
||||
|
||||
// Only use this variable if you wish to use full server paths. Otherwise leave this empty. With trailing slash.
|
||||
$fullpath="/var/www/img/";
|
||||
|
||||
//Use this only if you want to password protect your upload form.
|
||||
$password="";
|
||||
|
||||
/*
|
||||
//================================================================================
|
||||
* ! ATTENTION !
|
||||
//================================================================================
|
||||
: Don't edit below this line.
|
||||
*/
|
||||
|
||||
// Initialize variables
|
||||
$password_hash=md5($password);
|
||||
$error="";
|
||||
$success="";
|
||||
$display_message="";
|
||||
$file_ext=array();
|
||||
$password_form="";
|
||||
|
||||
// Function to get the extension a file.
|
||||
function get_ext($key) {
|
||||
$key=strtolower(substr(strrchr($key, "."), 1));
|
||||
$key=str_replace("jpeg","jpg",$key);
|
||||
return $key;
|
||||
}
|
||||
|
||||
// Filename security cleaning. Do not modify.
|
||||
function cln_file_name($string) {
|
||||
$cln_filename_find=array("/\.[^\.]+$/", "/[^\d\w\s-]/", "/\s\s+/", "/[-]+/", "/[_]+/");
|
||||
$cln_filename_repl=array("", ""," ", "-", "_");
|
||||
$string=preg_replace($cln_filename_find, $cln_filename_repl, $string);
|
||||
return trim($string);
|
||||
}
|
||||
|
||||
// If a password is set, they must login to upload files.
|
||||
If($password) {
|
||||
|
||||
//Verify the credentials.
|
||||
If($_POST['verify_password']==true) {
|
||||
If(md5($_POST['check_password'])==$password_hash) {
|
||||
setcookie("phUploader",$password_hash);
|
||||
sleep(1); //seems to help some people.
|
||||
header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//Show the authentication form
|
||||
If($_COOKIE['phUploader']!=$password_hash) {
|
||||
$password_form="<form method=\"POST\" action=\"".$_SERVER['PHP_SELF']."\">\n";
|
||||
$password_form.="<table align=\"center\" class=\"table\">\n";
|
||||
$password_form.="<tr>\n";
|
||||
$password_form.="<td width=\"100%\" class=\"table_header\" colspan=\"2\">Password Required</td>\n";
|
||||
$password_form.="</tr>\n";
|
||||
$password_form.="<tr>\n";
|
||||
$password_form.="<td width=\"35%\" class=\"table_body\">Enter Password:</td>\n";
|
||||
$password_form.="<td width=\"65%\" class=\"table_body\"><input type=\"password\" name=\"check_password\" /></td>\n";
|
||||
$password_form.="</tr>\n";
|
||||
$password_form.="<td colspan=\"2\" align=\"center\" class=\"table_body\">\n";
|
||||
$password_form.="<input type=\"hidden\" name=\"verify_password\" value=\"true\">\n";
|
||||
$password_form.="<input type=\"submit\" value=\" Verify Password \" />\n";
|
||||
$password_form.="</td>\n";
|
||||
$password_form.="</tr>\n";
|
||||
$password_form.="</table>\n";
|
||||
$password_form.="</form>\n";
|
||||
}
|
||||
|
||||
} // If Password
|
||||
|
||||
// Dont allow submit if $password_form has been populated
|
||||
If(($_POST['submit']==true) AND ($password_form=="")) {
|
||||
|
||||
//Tally the size of all the files uploaded, check if it's over the ammount.
|
||||
If(array_sum($_FILES['file']['size']) > $max_combined_size*1024) {
|
||||
|
||||
$error.="<b>FAILED:</b> All Files <b>REASON:</b> Combined file size is to large.<br />";
|
||||
|
||||
// Loop though, verify and upload files.
|
||||
} Else {
|
||||
|
||||
// Loop through all the files.
|
||||
For($i=0; $i <= $file_uploads-1; $i++) {
|
||||
|
||||
// If a file actually exists in this key
|
||||
If($_FILES['file']['name'][$i]) {
|
||||
|
||||
//Get the file extension
|
||||
$file_ext[$i]=get_ext($_FILES['file']['name'][$i]);
|
||||
|
||||
// Randomize file names
|
||||
If($random_name){
|
||||
$file_name[$i]=time()+rand(0,100000);
|
||||
} Else {
|
||||
$file_name[$i]=cln_file_name($_FILES['file']['name'][$i]);
|
||||
}
|
||||
|
||||
// Check for blank file name
|
||||
If(str_replace(" ", "", $file_name[$i])=="") {
|
||||
|
||||
$error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> Blank file name detected.<br />";
|
||||
|
||||
//Check if the file type uploaded is a valid file type.
|
||||
} ElseIf(!in_array($file_ext[$i], $allow_types)) {
|
||||
|
||||
$error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> Invalide file type.<br />";
|
||||
|
||||
//Check the size of each file
|
||||
} Elseif($_FILES['file']['size'][$i] > ($max_file_size*1024)) {
|
||||
|
||||
$error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> File to large.<br />";
|
||||
|
||||
// Check if the file already exists on the server..
|
||||
} Elseif(file_exists($folder.$file_name[$i].".".$file_ext[$i])) {
|
||||
|
||||
$error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> File already exists.<br />";
|
||||
|
||||
} Else {
|
||||
|
||||
If(move_uploaded_file($_FILES['file']['tmp_name'][$i],$folder.$file_name[$i].".".$file_ext[$i])) {
|
||||
|
||||
$success.="<b>SUCCESS:</b> ".$_FILES['file']['name'][$i]."<br />";
|
||||
$success.="<b>URL:</b> <a href=\"".$full_url.$file_name[$i].".".$file_ext[$i]."\" target=\"_blank\">".$full_url.$file_name[$i].".".$file_ext[$i]."</a><br /><br />";
|
||||
|
||||
} Else {
|
||||
$error.="<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> General upload failure.<br />";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // If Files
|
||||
|
||||
} // For
|
||||
|
||||
} // Else Total Size
|
||||
|
||||
If(($error=="") AND ($success=="")) {
|
||||
$error.="<b>FAILED:</b> No files selected<br />";
|
||||
}
|
||||
|
||||
$display_message=$success.$error;
|
||||
|
||||
} // $_POST AND !$password_form
|
||||
|
||||
/*
|
||||
//================================================================================
|
||||
* Start the form layout
|
||||
//================================================================================
|
||||
:- Please know what your doing before editing below. Sorry for the stop and start php.. people requested that I use only html for the form..
|
||||
*/
|
||||
?>
|
||||
<!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" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title><?php echo $websitename; ?> - Powered By phUploader</title>
|
||||
|
||||
<style type="text/css">
|
||||
body{
|
||||
background-image:url('https://si0.twimg.com/profile_background_images/468495900/bg.gif');
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 12pt;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 11pt;
|
||||
color: #000000;
|
||||
background-color:#EBEBEB;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration:none;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse:collapse;
|
||||
border:1px solid #000000;
|
||||
width:450px;
|
||||
}
|
||||
|
||||
.table_header {
|
||||
border:1px solid #000000;
|
||||
background-color:#111111;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 11pt;
|
||||
font-weight:bold;
|
||||
color: #FFFFFF;
|
||||
text-align:center;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
.upload_info {
|
||||
border:1px solid #000000;
|
||||
background-color:#EBEBEB;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 8pt;
|
||||
color: #000000;
|
||||
text-align:center;
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
.table_body {
|
||||
border:1px solid #000000;
|
||||
background-color:#999999;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #000000;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
.table_footer {
|
||||
border:1px solid #000000;
|
||||
background-color:#111111;
|
||||
text-align:center;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
input,select,textarea {
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: #000000;
|
||||
background-color:#AFAEAE;
|
||||
border:1px solid #000000;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
border:0px;
|
||||
font-family: Verdana, Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
color: #999999;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
form {
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?
|
||||
If($password_form) {
|
||||
|
||||
Echo $password_form;
|
||||
|
||||
} Else {
|
||||
?>
|
||||
<div align="center"><a href="http://unps-gama.tk/img/"><img src="http://unps-gama.tk/upload/Pictures/header.png"></a></div><br />
|
||||
<form action="<?=$_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="phuploader">
|
||||
<table align="center" class="table">
|
||||
<tr>
|
||||
<td class="table_header" colspan="2"><b><?=$websitename;?></b> </td>
|
||||
</tr>
|
||||
|
||||
<?If($display_message){?>
|
||||
<tr>
|
||||
<td colspan="2" class="message">
|
||||
<br />
|
||||
<?=$display_message;?>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<?}?>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="upload_info">
|
||||
<b>Allowed Types:</b> <?=implode($allow_types, ", ");?><br />
|
||||
<b>Max size per file:</b> <?=$max_file_size?>kb.
|
||||
<b>Max size for all files combined:</b> <?=$max_combined_size?>kb.<br />
|
||||
</td>
|
||||
</tr>
|
||||
<?For($i=0;$i <= $file_uploads-1;$i++) {?>
|
||||
<tr>
|
||||
<td class="table_body" width="20%"><b>Select File:</b> </td>
|
||||
<td class="table_body" width="80%"><input type="file" name="file[]" size="30" /></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
<tr>
|
||||
<td colspan="2" align="center" class="table_footer">
|
||||
<input type="hidden" name="submit" value="true" />
|
||||
<input type="submit" value=" Upload File(s) " />
|
||||
<input type="reset" name="reset" value=" Reset Form " onclick="window.location.reload(true);" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?}//Please leave this here.. it really dosen't make people hate you or make your site look bad.. ?>
|
||||
<table class="table" style="border:0px;" align="center">
|
||||
<tr>
|
||||
<td><div class="copyright"><a href="index.php">UnPS-GAMA IMGShare</a> ©<a href="http://www.phphq.net/?script=phUploader" target="_blank" title="Uploader Powered By phUploader <www.phphq.net>">phUploader</a></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
73
img/index.php
Executable file
73
img/index.php
Executable file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
$img = $_GET["img"];
|
||||
?>
|
||||
<html prefix="og: http://ogp.me/ns#">
|
||||
<head>
|
||||
<meta name="description" content="UnPS-GAMA IMGSHARE" />
|
||||
<meta name="keywords" content="GAMA,UnPS,upstandards,unps-gama,gama-unps,unps,gama,davitech,davitodd" />
|
||||
<meta name="author" content="David Todd" />
|
||||
<?php
|
||||
if ($img == null){
|
||||
$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 type="text/javascript" language="JavaScript">
|
||||
function set_body_height()
|
||||
{
|
||||
var wh = $(window).height();
|
||||
$('body').attr('style', 'height:' + wh + 'px;');
|
||||
}
|
||||
$(document).ready(function() {
|
||||
set_body_height();
|
||||
$(window).bind('resize', function() { set_body_height(); });
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.fit {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.center {
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="greem" link="red" vlink="purple">
|
||||
<div align="center">
|
||||
|
||||
<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
|
||||
|
||||
include('getfiles.php');
|
||||
|
||||
|
||||
|
||||
|
||||
if ($img == null){
|
||||
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>";
|
||||
|
||||
}else{
|
||||
echo "<table><div align='center'>\n";
|
||||
echo "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a></div></td><tr>\n";
|
||||
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";
|
||||
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 "<tr><td><div align='center'><a href='./'><b><---- Back to Index</b></a><tr><td></div></table>\n";
|
||||
}
|
||||
?>
|
||||
<br></div>
|
||||
</body></html>
|
BIN
img/zen1.png
Executable file
BIN
img/zen1.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
137
index.php
Executable file
137
index.php
Executable file
@ -0,0 +1,137 @@
|
||||
<!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=utf-8" />
|
||||
<meta name="description" content="Main page for UnProfessional Standards" />
|
||||
<meta name="keywords" content="GAMA,UnPS,upstandards,unps-gama,gama-unps,unps,gama,davitech,davitodd" />
|
||||
<meta name="author" content="David Todd" />
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-24492597-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
||||
<title>UnProfessional Standards GAMATechnologies</title>
|
||||
|
||||
<link rel="stylesheet" href="site.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<a href="http://unps-gama.tk">
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png" alt="UnPS-GAMA Header logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="navigation">
|
||||
<ul>
|
||||
<li><a href="http://unps-gama.tk">Home</a></li>
|
||||
<li><a href="placeholder.html">About</a></li>
|
||||
<li><a href="http://unps-gama.tk/img/">IMGShare</a></li>
|
||||
<li><a href="http://unps-gama.tk/fp/flatpress/">Personal Blog</a></li>
|
||||
<li><a href="http://unps-gama.tk/upload/index.php">Uploads</a></li>
|
||||
<li><a href="placeholder.html">Contact us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content-container1">
|
||||
<div id="content-container2">
|
||||
<div id="section-navigation">
|
||||
<ul>
|
||||
<li><h4>Offered Services:</h4></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/IRC">IRC</a> - unps-gama.tk:6667</li>
|
||||
<li><a href="http://teamspeak.com">TeamSpeak</a> - unps-gama.tk:9987</li>
|
||||
<li><a href="http://unps-gama.tk/img">Image Host</a></li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH Access</a> - email <a href="mailto:c0de@unps-gama.tk">c0de</a> for info</li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Email">EMail</a> (through SSH)</li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Ftp">FTP</a> (through <a href="http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol">SFTP</a>)</li>
|
||||
<li><a href="upload.html">File Storage</a> (up to 20MB)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>
|
||||
UnProfessional Standards - GAMATechnologies | Home Page
|
||||
</h2><hr />
|
||||
<p>
|
||||
Hello and welcome to the newly designed UnPS-GAMA website! The past week has mainly been spent upgrading my image share system, and it is nearly at completion. I have been absolutly dreading redesiging this page, but I decided today, September 13th 2012 at 1500 EST, that I would finally get to work. I decided to start more from scratch and pull in the things that I wanted. Currently this is beta and not every page is done with formatting. Pages that I'm happy with for now (aside for not having CSS2 or XHTML1 compliance) are the <a href="http://unps-gama.tk/404.html">404</a> page, and pretty much anything with the <a href="http://unps-gama.tk/img">image host</a>. Pages that I need to work on are the upload, contact us, and about pages so far. As of now, they'll just redirect to the 404 page until I get to them.<br />As I have placement tests for college today, I am trying to get as much done as I can before then, <strike>but it could be unlikely that I get the page uploaded and live until then.</strike> I got it uploaded and debugged quickly. There are some alignment issues but good otherwise. Updates soon to follow.
|
||||
</p><hr />
|
||||
<p>(Pulled from old index)</p><h4>Whoo! We've gone through our first actual hack!</h4>
|
||||
<p>This page was defaced today, May 25th at 8:18am EST by Nightmare Team.
|
||||
The page can still be accessed <a href="index.php.hack" target="unps-hack">here</a>
|
||||
It was actually pretty fun, and I saw that it was a simple php upload exploit to change the way php worked on the system.
|
||||
The person who pulled it off has not been banned from this server (because of my hackerish side)
|
||||
ciao - dc0de
|
||||
</p>
|
||||
</div>
|
||||
<div id="aside">
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "ca-pub-6762927271223365";
|
||||
/* Side ad unps1 */
|
||||
google_ad_slot = "3534639421";
|
||||
google_ad_width = 160;
|
||||
google_ad_height = 90;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
</script><br />
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="cmd" value="_s-xclick" />
|
||||
<input type="hidden" name="hosted_button_id" value="JWBVWZ8XGM73W" />
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
|
||||
<img alt="" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
|
||||
</form>
|
||||
<br />
|
||||
<h3>
|
||||
Upload Files (20MB limit)
|
||||
</h3>
|
||||
<p>
|
||||
Files will automatically sort after 5 minutes. If you can't find your file, check <a href="http://unps-gama.tk/upload/index.php">Uploads</a> for your files.
|
||||
</p>
|
||||
<form enctype="multipart/form-data" method="post" action="upload.php">
|
||||
<label for="file">Filename:</label>
|
||||
<input id="file" type="file" name="file" /><br />
|
||||
<input value="Upload!" type="submit" name="submit" />
|
||||
</form>
|
||||
<br /><h3>Files currently on GAMA (No links): </h3>
|
||||
<?php
|
||||
include 'preg_find.php';
|
||||
$files = preg_find('/./', './upload', PREG_FIND_RECURSIVE);
|
||||
foreach($files as $file) printf("<br />%s\n", $file);
|
||||
?>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>
|
||||
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||
<img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" />
|
||||
</a>
|
||||
<a href="http://validator.w3.org/check?uri=referer">
|
||||
<img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" />
|
||||
</a>
|
||||
</p>
|
||||
<h5>Copyright © UnPS-GAMATechnologies, 2012 - CSS Provided by: <a href="http://www.maxdesign.com.au/articles/css-layouts/three-liquid/" target="maxdesign">maxdesign</a></h5>
|
||||
<h5>
|
||||
<?php
|
||||
$last_modified = filemtime("index.php");
|
||||
print("Last Modified ");
|
||||
print(date("m/j/y h:i:s a", $last_modified));
|
||||
?>
|
||||
<?php
|
||||
//displays the time / date a page was last accessed
|
||||
echo "Last viewed on: " . date( "m/d/Y h:i:s a");
|
||||
?> Server time.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
148
index.php.hack
Executable file
148
index.php.hack
Executable file
@ -0,0 +1,148 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<html dir="rtl">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<title>!~! HaCkeD By NabiloS-Tn-X-Hack From Tunisian Nightmare team !~!</title>
|
||||
<link rel="shortcut icon" href="http://i26.tinypic.com/ilknxj.gif"">
|
||||
</head>
|
||||
|
||||
|
||||
<style>
|
||||
<!--
|
||||
.style11 {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body style="background-color: #000000">
|
||||
.......Error......
|
||||
<span class="style56">!!</span> You Have Just Got Owned By Nabilos-Tn-X-Hack<span class="style56">!!</span></font></em></strong></p>
|
||||
|
||||
<h2 align="center"><font</font>
|
||||
|
||||
</font>
|
||||
<font face="Courier New" color="#ffffff" style="margin: 0px; padding: 0px">
|
||||
<h2 align="center">
|
||||
<img alt="" src="http://2.bp.blogspot.com/_ZFUQMqRo-wM/SEcTsuFilDI/AAAAAAAAAAM/L0KZ0w0fp8E/S1600-R/logo.jpg"></h2>
|
||||
<p align="center"> </p>
|
||||
<span style="height: 0px; border: 1px dotted rgb(255, 0, 0)">
|
||||
<p class="style40" style="text-shadow: 0px 0px 10px rgb(248, 42, 42);" align="center">
|
||||
|
||||
<strong><em style="font-style: normal;"><font color="#FF0000">
|
||||
<span class="style56">!!</span> You Have Just Got Owned By Nightmare Team <span class="style56">!!</span></font></em></strong></p>
|
||||
<p class="style64" style="text-shadow: 0px 0px 10px rgb(248, 42, 42);" align="center">
|
||||
<font face="Comic Sans MS" color="#FF0000">Thnx to All TUnisiens Hackers </font>
|
||||
<span>
|
||||
<font face="Comic Sans MS" color="#FF0000"> </font>
|
||||
</span>
|
||||
</p>
|
||||
</span>
|
||||
<p class="style64" style="text-shadow: 0px 0px 10px rgb(248, 42, 42);" align="center">
|
||||
<img alt="http://www14.0zz0.com/2011/12/03/15/302261600.gif" src="http://www14.0zz0.com/2011/12/03/15/302261600.gif"></p>
|
||||
|
||||
<span>
|
||||
<strong>
|
||||
<span class="style11">
|
||||
<div align="center">
|
||||
<p dir="ltr" align="center">
|
||||
<font face="Akhbar MT" size="4" color="#008000"><br>
|
||||
</font>
|
||||
<font face="Akhbar MT" size="4" color="#FF00FF"></font></div>
|
||||
|
||||
<div align="center">
|
||||
<p dir="ltr" align="center">
|
||||
<font color="#FF00FF" face="Akhbar MT">
|
||||
<img alt="http://www14.0zz0.com/2011/12/03/15/302261600.gif" src="http://www14.0zz0.com/2011/12/03/15/302261600.gif"></font></div>
|
||||
<div align="center">
|
||||
<p dir="ltr" align="center">
|
||||
<font face="Akhbar MT" size="4" color="#008000"></font></div>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</strong>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
<p class="style64" style="text-shadow: 0px 0px 10px rgb(248, 42, 42);" align="center">
|
||||
<span>
|
||||
<strong>
|
||||
<span class="style11">
|
||||
<span style="height: 0px; font-style:normal">
|
||||
|
||||
<span id="theText13">
|
||||
<img height="80" src="http://qanony.com/vb/sahara/images/storm_9761679342144499258_heartbeat.gif" width="319" border="0"></span></span></span></strong></span></p>
|
||||
<p align="center"><font face="Comic Sans MS" color="#FF0000">Contact Me:
|
||||
https://www.facebook.com/NabilosTnHack3r//***//</font></p>
|
||||
<p align="center"><font face="Comic Sans MS" size="4" color="#FF00FF">
|
||||
</font></p>
|
||||
<p align="center"><font face="Comic Sans MS" size="4" color="#FF0000">! Go To
|
||||
Hell !</font></p>
|
||||
<embed src="http://youtube.googleapis.com/v/PRiyGfPPtUA&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="1" height="1"></embed>
|
||||
|
||||
|
||||
|
||||
</body>
|
BIN
layout-three-liquid-background1.gif
Executable file
BIN
layout-three-liquid-background1.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
layout-three-liquid-background2.gif
Executable file
BIN
layout-three-liquid-background2.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
59
mcping.php
Executable file
59
mcping.php
Executable file
@ -0,0 +1,59 @@
|
||||
<title>UnPS MC Checker</title>
|
||||
<body background="https://si0.twimg.com/profile_background_images/468495900/bg.gif" text="white">
|
||||
<div align="center">
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png"><br>
|
||||
<table align="center">
|
||||
<tr><td>If you want to parse this information for yourself, just give the script an $ip and $port (default assumed)</td></tr>
|
||||
<tr><td>then pull an arraylist for $srvinfo from 0-2 to get motd, players online, and max players. </td></tr>
|
||||
<tr><td>Server and port are just echo'd $ip and $port. To check online status, use testserver.php. </td></tr>
|
||||
<tr><td>Call testserver.php and use the GetServerStatus($ip, $port); function - echo that and done :3</td></tr>
|
||||
<tr><td>Example: <pre>
|
||||
include('http://unps-gama.tk/mcping.php?ip=$ip&port=$port')
|
||||
echo "Server:<font color='red'> " . $ip . "</font> on port:<font color='yellow'> " . $port . " </font> is: ";
|
||||
include('http://unps-gama.tk/testserver.php');
|
||||
$status = GetServerStatus($ip, $port);
|
||||
if ($status=="ONLINE") echo "<font color='green'>" . $status . "</font>\n";
|
||||
if ($status=="OFFLINE") echo "<font color='red'>" . $status . "</font>\n";
|
||||
echo "motd: " . $srvinfo[0] . "\n";
|
||||
echo "players online: " . $srvinfo[1] . "\n";
|
||||
echo "max players: " . $srvinfo[2] . "\n";</pre></td></tr>
|
||||
</table><br><hr><br><table align="center">
|
||||
<?php
|
||||
//$ip = "mc.techfurs.net"; // Minecraf$port = "36565"; // Minecraft port
|
||||
$ip = $_GET["ip"];
|
||||
$port = $_GET["port"];
|
||||
if ($port==null){$port = 25565;}
|
||||
$fp = fsockopen($ip, $port, $errno, $errstr, 5); // Socket for connecting to server
|
||||
|
||||
if (!$fp) {
|
||||
echo "<font color='red'>Error</font>";
|
||||
} else {
|
||||
$out = "\xFE"; // Hex needed for server info
|
||||
|
||||
fwrite($fp, $out);
|
||||
while (!feof($fp)) {
|
||||
$result .= fgets($fp, 128);
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
// Remove extra spaces between characters
|
||||
$result = str_replace("\x00", "", $result);
|
||||
$result = str_replace("\x1A", "", $result);
|
||||
$result = str_replace("\xFF", "", $result);
|
||||
|
||||
$srvinfo = explode("\xA7",$result);
|
||||
|
||||
echo "<tr><td>\n";
|
||||
echo "Server:<font color='red'> " . $ip . "</font> on port:<font color='yellow'> " . $port . " </font> is: ";
|
||||
include('testserver.php');
|
||||
$status = GetServerStatus($ip, $port);
|
||||
if ($status=="ONLINE") echo "<font color='green'>" . $status . "</font></td></tr>\n";
|
||||
if ($status=="OFFLINE") echo "<font color='red'>" . $status . "</font></td></tr>\n";
|
||||
//echo $status . "<br>";
|
||||
echo "<tr><td>motd: " . $srvinfo[0] . "</td></tr>\n";
|
||||
echo "<tr><td>players online: " . $srvinfo[1] . "</td></tr>\n";
|
||||
echo "<tr><td>max players: " . $srvinfo[2] . "</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
138
preg_find.php
Executable file
138
preg_find.php
Executable file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/*
|
||||
* Find files in a directory matching a pattern
|
||||
*
|
||||
*
|
||||
* Paul Gregg <pgregg@pgregg.com>
|
||||
* 20 March 2004, Updated 20 April 2004
|
||||
* Updated 18 April 2007 to add the ability to sort the result set
|
||||
* Updated 9 June 2007 to prevent multiple calls to sort during recursion
|
||||
* Updated 12 June 2009 to allow for sorting by extension and prevent following
|
||||
* symlinks by default
|
||||
* Version: 2.3
|
||||
* This function is backwards capatible with any code written for a
|
||||
* previous version of preg_find()
|
||||
*
|
||||
* Open Source Code: If you use this code on your site for public
|
||||
* access (i.e. on the Internet) then you must attribute the author and
|
||||
* source web site: http://www.pgregg.com/projects/php/preg_find/preg_find.phps
|
||||
* Working examples: http://www.pgregg.com/projects/php/preg_find/
|
||||
*
|
||||
*/
|
||||
|
||||
define('PREG_FIND_RECURSIVE', 1);
|
||||
define('PREG_FIND_DIRMATCH', 2);
|
||||
define('PREG_FIND_FULLPATH', 4);
|
||||
define('PREG_FIND_NEGATE', 8);
|
||||
define('PREG_FIND_DIRONLY', 16);
|
||||
define('PREG_FIND_RETURNASSOC', 32);
|
||||
define('PREG_FIND_SORTDESC', 64);
|
||||
define('PREG_FIND_SORTKEYS', 128);
|
||||
define('PREG_FIND_SORTBASENAME', 256); # requires PREG_FIND_RETURNASSOC
|
||||
define('PREG_FIND_SORTMODIFIED', 512); # requires PREG_FIND_RETURNASSOC
|
||||
define('PREG_FIND_SORTFILESIZE', 1024); # requires PREG_FIND_RETURNASSOC
|
||||
define('PREG_FIND_SORTDISKUSAGE', 2048); # requires PREG_FIND_RETURNASSOC
|
||||
define('PREG_FIND_SORTEXTENSION', 4096); # requires PREG_FIND_RETURNASSOC
|
||||
define('PREG_FIND_FOLLOWSYMLINKS', 8192);
|
||||
|
||||
// PREG_FIND_RECURSIVE - go into subdirectorys looking for more files
|
||||
// PREG_FIND_DIRMATCH - return directorys that match the pattern also
|
||||
// PREG_FIND_DIRONLY - return only directorys that match the pattern (no files)
|
||||
// PREG_FIND_FULLPATH - search for the pattern in the full path (dir+file)
|
||||
// PREG_FIND_NEGATE - return files that don't match the pattern
|
||||
// PREG_FIND_RETURNASSOC - Instead of just returning a plain array of matches,
|
||||
// return an associative array with file stats
|
||||
// PREG_FIND_FOLLOWSYMLINKS - Recursive searches (from v2.3) will no longer
|
||||
// traverse symlinks to directories, unless you
|
||||
// specify this flag. This is to prevent nasty
|
||||
// endless loops.
|
||||
//
|
||||
// You can also request to have the results sorted based on various criteria
|
||||
// By default if any sorting is done, it will be sorted in ascending order.
|
||||
// You can reverse this via use of:
|
||||
// PREG_FIND_SORTDESC - Reverse order of sort
|
||||
// PREG_FILE_SORTKEYS - Sort on the keyvalues or non-assoc array results
|
||||
// The following sorts *require* PREG_FIND_RETURNASSOC to be used as they are
|
||||
// sorting on values stored in the constructed associative array
|
||||
// PREG_FIND_SORTBASENAME - Sort the results in alphabetical order on filename
|
||||
// PREG_FIND_SORTMODIFIED - Sort the results in last modified timestamp order
|
||||
// PREG_FIND_SORTFILESIZE - Sort the results based on filesize
|
||||
// PREG_FILE_SORTDISKUSAGE - Sort based on the amount of disk space taken
|
||||
// PREG_FIND_SORTEXTENSION - Sort based on the filename extension
|
||||
// to use more than one simply seperate them with a | character
|
||||
|
||||
|
||||
|
||||
// Search for files matching $pattern in $start_dir.
|
||||
// if args contains PREG_FIND_RECURSIVE then do a recursive search
|
||||
// return value is an associative array, the key of which is the path/file
|
||||
// and the value is the stat of the file.
|
||||
Function preg_find($pattern, $start_dir='.', $args=NULL) {
|
||||
|
||||
static $depth = -1;
|
||||
++$depth;
|
||||
|
||||
$files_matched = array();
|
||||
|
||||
$fh = opendir($start_dir);
|
||||
|
||||
while (($file = readdir($fh)) !== false) {
|
||||
if (strcmp($file, '.')==0 || strcmp($file, '..')==0) continue;
|
||||
$filepath = $start_dir . '/' . $file;
|
||||
if (preg_match($pattern,
|
||||
($args & PREG_FIND_FULLPATH) ? $filepath : $file)) {
|
||||
$doadd = is_file($filepath)
|
||||
|| (is_dir($filepath) && ($args & PREG_FIND_DIRMATCH))
|
||||
|| (is_dir($filepath) && ($args & PREG_FIND_DIRONLY));
|
||||
if ($args & PREG_FIND_DIRONLY && $doadd && !is_dir($filepath)) $doadd = false;
|
||||
if ($args & PREG_FIND_NEGATE) $doadd = !$doadd;
|
||||
if ($doadd) {
|
||||
if ($args & PREG_FIND_RETURNASSOC) { // return more than just the filenames
|
||||
$fileres = array();
|
||||
if (function_exists('stat')) {
|
||||
$fileres['stat'] = stat($filepath);
|
||||
$fileres['du'] = $fileres['stat']['blocks'] * 512;
|
||||
}
|
||||
if (function_exists('fileowner')) $fileres['uid'] = fileowner($filepath);
|
||||
if (function_exists('filegroup')) $fileres['gid'] = filegroup($filepath);
|
||||
if (function_exists('filetype')) $fileres['filetype'] = filetype($filepath);
|
||||
if (function_exists('mime_content_type')) $fileres['mimetype'] = mime_content_type($filepath);
|
||||
if (function_exists('dirname')) $fileres['dirname'] = dirname($filepath);
|
||||
if (function_exists('basename')) $fileres['basename'] = basename($filepath);
|
||||
if (($i=strrpos($fileres['basename'], '.'))!==false) $fileres['ext'] = substr($fileres['basename'], $i+1); else $fileres['ext'] = '';
|
||||
if (isset($fileres['uid']) && function_exists('posix_getpwuid')) $fileres['owner'] = posix_getpwuid ($fileres['uid']);
|
||||
$files_matched[$filepath] = $fileres;
|
||||
} else
|
||||
array_push($files_matched, $filepath);
|
||||
}
|
||||
}
|
||||
if ( is_dir($filepath) && ($args & PREG_FIND_RECURSIVE) ) {
|
||||
if (!is_link($filepath) || ($args & PREG_FIND_FOLLOWSYMLINKS))
|
||||
$files_matched = array_merge($files_matched,
|
||||
preg_find($pattern, $filepath, $args));
|
||||
}
|
||||
}
|
||||
|
||||
closedir($fh);
|
||||
|
||||
// Before returning check if we need to sort the results.
|
||||
if (($depth==0) && ($args & (PREG_FIND_SORTKEYS|PREG_FIND_SORTBASENAME|PREG_FIND_SORTMODIFIED|PREG_FIND_SORTFILESIZE|PREG_FIND_SORTDISKUSAGE)) ) {
|
||||
$order = ($args & PREG_FIND_SORTDESC) ? 1 : -1;
|
||||
$sortby = '';
|
||||
if ($args & PREG_FIND_RETURNASSOC) {
|
||||
if ($args & PREG_FIND_SORTMODIFIED) $sortby = "['stat']['mtime']";
|
||||
if ($args & PREG_FIND_SORTBASENAME) $sortby = "['basename']";
|
||||
if ($args & PREG_FIND_SORTFILESIZE) $sortby = "['stat']['size']";
|
||||
if ($args & PREG_FIND_SORTDISKUSAGE) $sortby = "['du']";
|
||||
if ($args & PREG_FIND_SORTEXTENSION) $sortby = "['ext']";
|
||||
}
|
||||
$filesort = create_function('$a,$b', "\$a1=\$a$sortby;\$b1=\$b$sortby; if (\$a1==\$b1) return 0; else return (\$a1<\$b1) ? $order : 0- $order;");
|
||||
uasort($files_matched, $filesort);
|
||||
}
|
||||
--$depth;
|
||||
return $files_matched;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
115
site.css
Executable file
115
site.css
Executable file
@ -0,0 +1,115 @@
|
||||
#container
|
||||
{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#header
|
||||
{
|
||||
text-align: center;
|
||||
background: #ccc;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#header h1 { margin: 0; }
|
||||
|
||||
#navigation
|
||||
{
|
||||
float: left;
|
||||
width: 100%;
|
||||
background: #333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#navigation ul
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#navigation ul li
|
||||
{
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#navigation li a
|
||||
{
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 5px 10px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
#navigation li a:hover { background: #383; }
|
||||
|
||||
#content-container1
|
||||
{
|
||||
float: left;
|
||||
width: 100%;
|
||||
background: #fff url(layout-three-liquid-background1.gif) repeat-y 20% 0;
|
||||
}
|
||||
|
||||
#content-container2
|
||||
{
|
||||
float: left;
|
||||
width: 100%;
|
||||
background: url(layout-three-liquid-background2.gif) repeat-y 80% 0;
|
||||
}
|
||||
|
||||
#section-navigation
|
||||
{
|
||||
float: left;
|
||||
width: 16%;
|
||||
padding: 20px 0;
|
||||
margin: 0 2%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#section-navigation ul
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#section-navigation ul li
|
||||
{
|
||||
margin: 0 0 1em;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#content
|
||||
{
|
||||
float: left;
|
||||
width: 56%;
|
||||
padding: 20px 0;
|
||||
margin: 0 0 0 2%;
|
||||
}
|
||||
|
||||
#content h2 { margin: 0; }
|
||||
|
||||
#aside
|
||||
{
|
||||
float: right;
|
||||
width: 16%;
|
||||
padding: 20px 0;
|
||||
margin: 0 2% 0 0;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#aside h3 { margin: 0; }
|
||||
|
||||
#footer
|
||||
{
|
||||
clear: both;
|
||||
background: #ccc;
|
||||
text-align: right;
|
||||
padding: 20px;
|
||||
height: 1%;
|
||||
}
|
11
testserver.php
Executable file
11
testserver.php
Executable file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
function GetServerStatus($site, $port)
|
||||
{
|
||||
$status = array("OFFLINE", "ONLINE");
|
||||
$fp = @fsockopen($site, $port, $errno, $errstr, 2);
|
||||
if (!$fp) {
|
||||
return $status[0];
|
||||
} else
|
||||
{ return $status[1];}
|
||||
}
|
||||
?>
|
24
upload.html
Executable file
24
upload.html
Executable file
@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-24492597-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<form action="upload.php" method="post" enctype="multipart/form-data">
|
||||
<label for="file">Filename:</label>
|
||||
<input type="file" name="file" id="file" />
|
||||
<br />
|
||||
<input type="submit" name="submit" value="Upload" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
49
upload.php
Executable file
49
upload.php
Executable file
@ -0,0 +1,49 @@
|
||||
<html>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-24492597-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
<body bgcolor="black" text="white">
|
||||
<?php
|
||||
if (($_FILES["file"]["size"] < 2000000000000000000000000000000000000000000))
|
||||
{
|
||||
if ($_FILES["file"]["error"] > 0)
|
||||
{
|
||||
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
|
||||
echo "Type: " . $_FILES["file"]["type"] . "<br />";
|
||||
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
|
||||
echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
|
||||
|
||||
if (file_exists("upload/" . $_FILES["file"]["name"]))
|
||||
{
|
||||
echo $_FILES["file"]["name"] . " already exists. ";
|
||||
}
|
||||
else
|
||||
{
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"],
|
||||
"upload/" . $_FILES["file"]["name"]);
|
||||
echo "Stored in: " . "unps-gama.tk/upload/" . $_FILES["file"]["name"];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Invalid file";
|
||||
}
|
||||
?>
|
||||
<div align="center"><a href="http://unps-gama.tk/index.php">Go Home</a>
|
||||
</div>
|
||||
</body></html>
|
97
upload/Audio/index.php
Executable file
97
upload/Audio/index.php
Executable file
@ -0,0 +1,97 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
index of UnPS-GAMA uploads
|
||||
</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="black" text="EEEEEE">
|
||||
<center>
|
||||
<style type="text/css">
|
||||
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
|
||||
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
|
||||
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
|
||||
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
|
||||
|
||||
.trone {
|
||||
background-color: #595959;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
.trtwo{
|
||||
background-color: #000000;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
BODY { TEXT-DECORATION: none;
|
||||
font-family:verdana;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br><br>
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png">
|
||||
<table border=0>
|
||||
<tr class="trtwo">
|
||||
<td><center><b>file</b></center></td>
|
||||
<td><center><b>size</b></center></td>
|
||||
<td><center><b>last modified</b></center></td>
|
||||
</tr>
|
||||
<?
|
||||
// shows the correct size & size-label
|
||||
|
||||
function size($file) {
|
||||
$size_label = array("Byte", "KB", "MB", "GB", "TB");
|
||||
|
||||
$size=filesize($file);
|
||||
for ($c=0;$size>1024; $c++) {
|
||||
$size/=1024;
|
||||
}
|
||||
|
||||
$size=round($size,1);
|
||||
return("$size ".$size_label[$c]);
|
||||
}
|
||||
|
||||
|
||||
$trbg = "1"; // which <TR> - background
|
||||
|
||||
// reading the content and...
|
||||
$mydir = dir("./");
|
||||
while ($file=$mydir->read()){
|
||||
$kind = filetype($file);
|
||||
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
|
||||
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){
|
||||
//... showing the content:
|
||||
//<tr> - backgroundcolor
|
||||
echo "<tr>";
|
||||
if ($trbg=="1"){
|
||||
echo "<tr class=\"trone\">";
|
||||
$trbg = "2";
|
||||
}
|
||||
else if ($trbg=="2"){
|
||||
echo "<tr class = \"trtwo\">";
|
||||
$trbg = "1";
|
||||
}
|
||||
|
||||
//<td> and filename...
|
||||
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
|
||||
//...filesize...
|
||||
echo "<td width=100>".size($file)." </td>";
|
||||
//... last change...
|
||||
$change = filemtime($file);
|
||||
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
|
||||
}
|
||||
//}
|
||||
$mydir->close();
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</center>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
97
upload/Documents/index.php
Executable file
97
upload/Documents/index.php
Executable file
@ -0,0 +1,97 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
index of UnPS-GAMA uploads
|
||||
</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="black" text="EEEEEE">
|
||||
<center>
|
||||
<style type="text/css">
|
||||
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
|
||||
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
|
||||
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
|
||||
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
|
||||
|
||||
.trone {
|
||||
background-color: #595959;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
.trtwo{
|
||||
background-color: #000000;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
BODY { TEXT-DECORATION: none;
|
||||
font-family:verdana;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br><br>
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png">
|
||||
<table border=0>
|
||||
<tr class="trtwo">
|
||||
<td><center><b>file</b></center></td>
|
||||
<td><center><b>size</b></center></td>
|
||||
<td><center><b>last modified</b></center></td>
|
||||
</tr>
|
||||
<?
|
||||
// shows the correct size & size-label
|
||||
|
||||
function size($file) {
|
||||
$size_label = array("Byte", "KB", "MB", "GB", "TB");
|
||||
|
||||
$size=filesize($file);
|
||||
for ($c=0;$size>1024; $c++) {
|
||||
$size/=1024;
|
||||
}
|
||||
|
||||
$size=round($size,1);
|
||||
return("$size ".$size_label[$c]);
|
||||
}
|
||||
|
||||
|
||||
$trbg = "1"; // which <TR> - background
|
||||
|
||||
// reading the content and...
|
||||
$mydir = dir("./");
|
||||
while ($file=$mydir->read()){
|
||||
$kind = filetype($file);
|
||||
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
|
||||
if ($kind != '.' && $kind != '..' && $kind != 'index.php'){
|
||||
//... showing the content:
|
||||
//<tr> - backgroundcolor
|
||||
echo "<tr>";
|
||||
if ($trbg=="1"){
|
||||
echo "<tr class=\"trone\">";
|
||||
$trbg = "2";
|
||||
}
|
||||
else if ($trbg=="2"){
|
||||
echo "<tr class = \"trtwo\">";
|
||||
$trbg = "1";
|
||||
}
|
||||
|
||||
//<td> and filename...
|
||||
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
|
||||
//...filesize...
|
||||
echo "<td width=100>".size($file)." </td>";
|
||||
//... last change...
|
||||
$change = filemtime($file);
|
||||
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
|
||||
}
|
||||
}
|
||||
$mydir->close();
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</center>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
BIN
upload/Pictures/header.png
Executable file
BIN
upload/Pictures/header.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
97
upload/Pictures/index.php
Executable file
97
upload/Pictures/index.php
Executable file
@ -0,0 +1,97 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
index of UnPS-GAMA uploads
|
||||
</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="black" text="EEEEEE">
|
||||
<center>
|
||||
<style type="text/css">
|
||||
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
|
||||
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
|
||||
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
|
||||
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
|
||||
|
||||
.trone {
|
||||
background-color: #595959;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
.trtwo{
|
||||
background-color: #000000;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
BODY { TEXT-DECORATION: none;
|
||||
font-family:verdana;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br><br>
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png">
|
||||
<table border=0>
|
||||
<tr class="trtwo">
|
||||
<td><center><b>file</b></center></td>
|
||||
<td><center><b>size</b></center></td>
|
||||
<td><center><b>last modified</b></center></td>
|
||||
</tr>
|
||||
<?
|
||||
// shows the correct size & size-label
|
||||
|
||||
function size($file) {
|
||||
$size_label = array("Byte", "KB", "MB", "GB", "TB");
|
||||
|
||||
$size=filesize($file);
|
||||
for ($c=0;$size>1024; $c++) {
|
||||
$size/=1024;
|
||||
}
|
||||
|
||||
$size=round($size,1);
|
||||
return("$size ".$size_label[$c]);
|
||||
}
|
||||
|
||||
|
||||
$trbg = "1"; // which <TR> - background
|
||||
|
||||
// reading the content and...
|
||||
$mydir = dir("./");
|
||||
while ($file=$mydir->read()){
|
||||
$kind = filetype($file);
|
||||
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
|
||||
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){
|
||||
//... showing the content:
|
||||
//<tr> - backgroundcolor
|
||||
echo "<tr>";
|
||||
if ($trbg=="1"){
|
||||
echo "<tr class=\"trone\">";
|
||||
$trbg = "2";
|
||||
}
|
||||
else if ($trbg=="2"){
|
||||
echo "<tr class = \"trtwo\">";
|
||||
$trbg = "1";
|
||||
}
|
||||
|
||||
//<td> and filename...
|
||||
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
|
||||
//...filesize...
|
||||
echo "<td width=100>".size($file)." </td>";
|
||||
//... last change...
|
||||
$change = filemtime($file);
|
||||
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
|
||||
}
|
||||
//}
|
||||
$mydir->close();
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</center>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
97
upload/Video/index.php
Executable file
97
upload/Video/index.php
Executable file
@ -0,0 +1,97 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
index of UnPS-GAMA uploads
|
||||
</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="black" text="EEEEEE">
|
||||
<center>
|
||||
<style type="text/css">
|
||||
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
|
||||
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
|
||||
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
|
||||
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
|
||||
|
||||
.trone {
|
||||
background-color: #595959;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
.trtwo{
|
||||
background-color: #000000;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
BODY { TEXT-DECORATION: none;
|
||||
font-family:verdana;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br><br>
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png">
|
||||
<table border=0>
|
||||
<tr class="trtwo">
|
||||
<td><center><b>file</b></center></td>
|
||||
<td><center><b>size</b></center></td>
|
||||
<td><center><b>last modified</b></center></td>
|
||||
</tr>
|
||||
<?
|
||||
// shows the correct size & size-label
|
||||
|
||||
function size($file) {
|
||||
$size_label = array("Byte", "KB", "MB", "GB", "TB");
|
||||
|
||||
$size=filesize($file);
|
||||
for ($c=0;$size>1024; $c++) {
|
||||
$size/=1024;
|
||||
}
|
||||
|
||||
$size=round($size,1);
|
||||
return("$size ".$size_label[$c]);
|
||||
}
|
||||
|
||||
|
||||
$trbg = "1"; // which <TR> - background
|
||||
|
||||
// reading the content and...
|
||||
$mydir = dir("./");
|
||||
while ($file=$mydir->read()){
|
||||
$kind = filetype($file);
|
||||
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
|
||||
// if ($kind != '.' && $kind != '..' && $kind != 'index.php'){
|
||||
//... showing the content:
|
||||
//<tr> - backgroundcolor
|
||||
echo "<tr>";
|
||||
if ($trbg=="1"){
|
||||
echo "<tr class=\"trone\">";
|
||||
$trbg = "2";
|
||||
}
|
||||
else if ($trbg=="2"){
|
||||
echo "<tr class = \"trtwo\">";
|
||||
$trbg = "1";
|
||||
}
|
||||
|
||||
//<td> and filename...
|
||||
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
|
||||
//...filesize...
|
||||
echo "<td width=100>".size($file)." </td>";
|
||||
//... last change...
|
||||
$change = filemtime($file);
|
||||
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
|
||||
}
|
||||
//}
|
||||
$mydir->close();
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</center>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
97
upload/index.php
Executable file
97
upload/index.php
Executable file
@ -0,0 +1,97 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
index of UnPS-GAMA uploads
|
||||
</TITLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY bgcolor="black" text="EEEEEE">
|
||||
<center>
|
||||
<style type="text/css">
|
||||
A:active {COLOR: #FFFFFF; TEXT-DECORATION: none}
|
||||
A:hover { COLOR: #FFFFFF; TEXT-DECORATION: underline}
|
||||
A:link {COLOR:#DDDDDD; TEXT-DECORATION: none}
|
||||
A:visited {COLOR: #C0C0C0; TEXT-DECORATION: none}
|
||||
|
||||
.trone {
|
||||
background-color: #595959;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
.trtwo{
|
||||
background-color: #000000;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
|
||||
BODY { TEXT-DECORATION: none;
|
||||
font-family:verdana;
|
||||
font-size: 9pt;
|
||||
text-indent: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<br><br>
|
||||
<img src="http://unps-gama.tk/upload/Pictures/header.png">
|
||||
<table border=0>
|
||||
<tr class="trtwo">
|
||||
<td><center><b>file</b></center></td>
|
||||
<td><center><b>size</b></center></td>
|
||||
<td><center><b>last modified</b></center></td>
|
||||
</tr>
|
||||
<?
|
||||
// shows the correct size & size-label
|
||||
|
||||
function size($file) {
|
||||
$size_label = array("Byte", "KB", "MB", "GB", "TB");
|
||||
|
||||
$size=filesize($file);
|
||||
for ($c=0;$size>1024; $c++) {
|
||||
$size/=1024;
|
||||
}
|
||||
|
||||
$size=round($size,1);
|
||||
return("$size ".$size_label[$c]);
|
||||
}
|
||||
|
||||
|
||||
$trbg = "1"; // which <TR> - background
|
||||
|
||||
// reading the content and...
|
||||
$mydir = dir("./");
|
||||
while ($file=$mydir->read()){
|
||||
$kind = filetype($file);
|
||||
// if ($kind != "php"){ // ATTENTION! if you want this file to show subdirectories, remove this query
|
||||
if ($kind != '.' && $kind != '..' && $kind != 'index.php'){
|
||||
//... showing the content:
|
||||
//<tr> - backgroundcolor
|
||||
echo "<tr>";
|
||||
if ($trbg=="1"){
|
||||
echo "<tr class=\"trone\">";
|
||||
$trbg = "2";
|
||||
}
|
||||
else if ($trbg=="2"){
|
||||
echo "<tr class = \"trtwo\">";
|
||||
$trbg = "1";
|
||||
}
|
||||
|
||||
//<td> and filename...
|
||||
echo "<td width=300><a href=\"$file\">".$file."</a></td>";
|
||||
//...filesize...
|
||||
echo "<td width=100>".size($file)." </td>";
|
||||
//... last change...
|
||||
$change = filemtime($file);
|
||||
echo "<td width=200>".date("j. - M. - Y; H:i:s",$change)."</td>";
|
||||
}
|
||||
}
|
||||
$mydir->close();
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<br><br>
|
||||
</center>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
Loading…
Reference in New Issue
Block a user