if
(!
empty
(
$_FILES
[
'file'
][
'name'
])) {
if
(!
file_exists
(
$uploadordner
)) {
@
mkdir
(
substr
(
$uploadordner
,0,-1), 0777)
or
die
(
'Could not create directory (CHMOD)'
);
dir_access(
$uploadordner
,
'remove'
);
}
$ext
=
strrchr
(
$_FILES
[
'file'
][
'name'
],
'.'
);
$ext
=
strtolower
(
substr
(
$ext
, 1));
$fname
= escape(
$_FILES
[
'file'
][
'name'
],
'string'
);
$fname
=
str_replace
(
' '
,
''
,
$fname
);
if
(
$sizebytes
!= 0 AND (
$_FILES
[
'file'
][
'size'
] >
$sizebytes
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>The file size is to large. MAX $sizebytes bytes .</p>"
;
}
elseif
(
$sizelimituser
!= 0 AND (dirsize(
$uploadordner
) +
$_FILES
[
'file'
][
'size'
]) >
$sizelimituser
) {
echo
"<p style='color:Red;'> <b>ERROR: </b>The free space is unfortunately not sufficient for this file</p>"
;
}
elseif
(
$extlimit
AND !in_array(
$ext
,
$limitedext
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>This file has an unauthorized file format, TGA only allowed!</p>"
;
}
elseif
(
file_exists
(
$uploadordner
.
$fname
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>A file with this name already exists.</p>"
;
}
elseif
(move_uploaded_file(
$_FILES
[
'file'
][
'tmp_name'
],
$uploadordner
.
$fname
)) {
@
chmod
(
$uploadordner
.
$fname
, 0777);
$link
=
$server
.
$uploadordner
.
$fname
;
$link1
=
$server
.
$uploadordner
.
$fname
;
echo
'<p style="color:Green;">File <b>'
.
$fname
.
'</b> was successfully uploaded!</p> '
;
$mail
=
'screenshot@vetus-clan.de'
;
$betreff
=
'Screenshot Upload Feld 1-3'
;
$text
=
'Screenshot '
.
$link
.
' wurden über Feld1 hochgeladen.'
;
$from
=
'Feld1-3@vetus-clan.de'
;
icmail (
$mail
,
$betreff
,
$text
,
$from
);
}
}
if
(!
empty
(
$_FILES
[
'file1'
][
'name'
])) {
if
(!
file_exists
(
$uploadordner
)) {
@
mkdir
(
substr
(
$uploadordner
,0,-1), 0777)
or
die
(
'Could not create directory (CHMOD)'
);
dir_access(
$uploadordner
,
'remove'
);
}
$ext
=
strrchr
(
$_FILES
[
'file1'
][
'name'
],
'.'
);
$ext
=
strtolower
(
substr
(
$ext
, 1));
$fname
= escape(
$_FILES
[
'file1'
][
'name'
],
'string'
);
$fname
=
str_replace
(
' '
,
''
,
$fname
);
if
(
$sizebytes
!= 0 AND (
$_FILES
[
'file1'
][
'size'
] >
$sizebytes
)) {
echo
"<b>ERROR:</b> The file size is to large. MAX $sizebytes bytes ."
;
}
elseif
(
$sizelimituser
!= 0 AND (dirsize(
$uploadordner
) +
$_FILES
[
'file1'
][
'size'
]) >
$sizelimituser
) {
echo
"<p style='color:Red;'> <b>ERROR: </b>The free space is unfortunately not sufficient for this file</p>"
;
}
elseif
(
$extlimit
AND !in_array(
$ext
,
$limitedext
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>This file has an unauthorized file format, TGA only allowed!</p>"
;
}
elseif
(
file_exists
(
$uploadordner
.
$fname
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>A file with this name already exists.</p>"
;
}
elseif
(move_uploaded_file(
$_FILES
[
'file1'
][
'tmp_name'
],
$uploadordner
.
$fname
)) {
@
chmod
(
$uploadordner
.
$fname
, 0777);
$link
=
$server
.
$uploadordner
.
$fname
;
$link2
=
$server
.
$uploadordner
.
$fname
;
echo
'<p style="color:Green;">File <b>'
.
$fname
.
'</b> was successfully uploaded!</p> '
;
$mail
=
'screenshot@vetus-clan.de'
;
$betreff
=
'Screenshot Upload Feld 2-3'
;
$text
=
'Screenshot '
.
$link
.
' wurden über Feld2 hochgeladen.'
;
$from
=
'Feld2-3@vetus-clan.de'
;
icmail (
$mail
,
$betreff
,
$text
,
$from
);
}
}
if
(!
empty
(
$_FILES
[
'file2'
][
'name'
])) {
if
(!
file_exists
(
$uploadordner
)) {
@
mkdir
(
substr
(
$uploadordner
,0,-1), 0777)
or
die
(
'Could not create directory (CHMOD)'
);
dir_access(
$uploadordner
,
'remove'
);
}
$ext
=
strrchr
(
$_FILES
[
'file2'
][
'name'
],
'.'
);
$ext
=
strtolower
(
substr
(
$ext
, 1));
$fname
= escape(
$_FILES
[
'file2'
][
'name'
],
'string'
);
$fname
=
str_replace
(
' '
,
''
,
$fname
);
if
(
$sizebytes
!= 0 AND (
$_FILES
[
'file2'
][
'size'
] >
$sizebytes
)) {
echo
"The file size is to large. MAX $sizebytes bytes ."
;
}
elseif
(
$sizelimituser
!= 0 AND (dirsize(
$uploadordner
) +
$_FILES
[
'file2'
][
'size'
]) >
$sizelimituser
) {
echo
"<p style='color:Red;'> <b>ERROR: </b>The free space is unfortunately not sufficient for this file</p>"
;
}
elseif
(
$extlimit
AND !in_array(
$ext
,
$limitedext
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>This file has an unauthorized file format, TGA only allowed!</p>"
;
}
elseif
(
file_exists
(
$uploadordner
.
$fname
)) {
echo
"<p style='color:Red;'> <b>ERROR: </b>A file with this name already exists.</p>"
;
}
elseif
(move_uploaded_file(
$_FILES
[
'file2'
][
'tmp_name'
],
$uploadordner
.
$fname
)) {
@
chmod
(
$uploadordner
.
$fname
, 0777);
$link
=
$server
.
$uploadordner
.
$fname
;
$link3
=
$server
.
$uploadordner
.
$fname
;
echo
'<p style="color:Green;">File <b>'
.
$fname
.
'</b> was successfully uploaded!</p> '
;
$mail
=
'screenshot@vetus-clan.de'
;
$betreff
=
'New Screenshots Uploaded!'
;
$text
= 'Screenshots wurden hochgeladen:
Upload Feld 1:
'. $link1 .'
Upload Feld 2:
'. $link2 .'
Upload Feld 3:
'. $link3 .'
';
$from
=
'ss_upload@vetus-clan.de'
;
}
}