Viewing file: list.php (3.01 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script type="text/javascript" src="jquery.js"></script>
<style type="text/css">
.ajaxtooltip{
position: absolute; /*leave this alone*/
display: none; /*leave this alone*/
width: 300px;
left: 0; /*leave this alone*/
top: 0; /*leave this alone*/
background: white;
border: 3px solid #2f81c4;
border-width: 1px 1px 1px 1px;
padding: 3px;
}
</style>
<script type="text/javascript" src="ajaxl.js">
/***********************************************
* Ajax Tooltip script- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/
</script>
<style type="text/css">
html,
body {
background-color: transparent;
}
</style>
<body link=#2f81c4 alink=white vlink=#2f81c4>
<?php
@session_start();
$dir = $_GET[team];
$dh = opendir($dir);
$i=1;
while (false !== ($filename = readdir($dh))) {
$path_parts = pathinfo($filename);
if($path_parts['extension']=='jpg' or $path_parts['extension']=='JPG'){
if (!is_dir($dir."/".$filename)) {
echo "<a title='ajax:query.php?image=".$dir."/".$filename."' href=zoom.php?image=".$dir."/".$filename."><img border=6 src=mini.php?img=".$dir."/".$filename." width=100 height=100></a> ";
$i++;
}}
}
if(!empty($_SESSION[admin])){
print('
<form name=form1 enctype=multipart/form-data method=POST action=>
<input type=hidden name=MAX_FILE_SIZE value=4000000>
<input type=file name=file size=30 style="font-family:tahoma; background-color:#2f81c4; border:1px solid #2f81c4; color:#1f7184">
<input type=Submit value=Feltöltés style=" font-family:tahoma; background-color:#2f81c4; border:1px solid #2f81c4; color:#1f7184">
</form>');
$mappa = $_GET[team]."/";
$type = $_FILES['file']['type'];
if (($type == "image/jpg") or ($type == "image/jpeg")){
if($_FILES['file']['tmp_name'] != "")
{
if (move_uploaded_file($_FILES['file']['tmp_name'],$mappa.$_FILES['file']['name']))
{
chmod($mappa.$_FILES['file']['name'], 0644);
print "
<font color=#bb4419 face=tahoma>Sikeres fájlfeltöltés!<br>";
$today = date("Y. m. d. G:i:s");
$ip = gethostbyaddr($_SERVER[REMOTE_ADDR]);
$somecontent = "[ MIKOR: ".$today." ][ IP: ".$ip." ][ IMAGEUP: ".$mappa.$_FILES['file']['name']." ] \n";
$filename = 'log.txt';
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
fclose($handle);
}
}
else
{
print "
<font color=#bb4419 face=tahoma>Sikertelen!";
}
}}
}
?>
|