Subversion-Projekte lars-tiefland.ci

Revision

Revision 2115 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2115 Revision 2116
Zeile 1... Zeile 1...
1
<?php
1
<?php
-
 
2
 
2
/*
3
/*
3
 * jQuery File Upload Plugin PHP Class
4
* jQuery File Upload Plugin PHP Class
4
 * https://github.com/blueimp/jQuery-File-Upload
5
* https://github.com/blueimp/jQuery-File-Upload
5
 *
6
*
6
 * Copyright 2010, Sebastian Tschan
7
* Copyright 2010, Sebastian Tschan
7
 * https://blueimp.net
8
* https://blueimp.net
8
 *
9
*
9
 * Licensed under the MIT license:
10
* Licensed under the MIT license:
10
 * https://opensource.org/licenses/MIT
11
* https://opensource.org/licenses/MIT
11
 */
12
*/
-
 
13
 
-
 
14
$GLOBALS["web"] = $webs;
-
 
15
$GLOBALS["web_rechte"] = $web_rechte;
-
 
16
$GLOBALS["site"] = $site;
-
 
17
if (preg_match("/\.local$/", $_SERVER["SERVER_NAME"]))
-
 
18
{
-
 
19
	//$GLOBALS["site"] .= ".local";
-
 
20
}
-
 
21
$options = null;
-
 
22
 
-
 
23
$real_url = getDokDomain();
-
 
24
$real_url .= "/images/upload/";
-
 
25
$real_folder = $GLOBALS["web"]["verzeichnis"] . "/images/upload/";
-
 
26
 
-
 
27
$folder = "";
-
 
28
$GLOBALS["folder"] = "";
-
 
29
if (isset($_POST["folder"]) && $_POST["folder"])
-
 
30
{
-
 
31
	$folder = Weban_Utils::clean_global_input("folder");
-
 
32
} elseif (isset($_GET["folder"]) && $_GET["folder"])
-
 
33
{
-
 
34
	$folder = Weban_Utils::clean_global_input("folder", "get");
-
 
35
}
-
 
36
 
-
 
37
$bvKonf = "";
-
 
38
if (isset($GLOBALS["web_rechte"]["admin"]["toolbox"]["bildverwaltung"]))
-
 
39
{
-
 
40
	$bvKonf = $GLOBALS["web_rechte"]["admin"]["toolbox"]["bildverwaltung"];
-
 
41
}
-
 
42
if (!$bvKonf)
-
 
43
{
-
 
44
	$bvKonf = "Bild;;651;651";
-
 
45
}
-
 
46
$GLOBALS["Imagedaten"] = array_chunk(explode(";", $bvKonf), 4);
-
 
47
if ($folder)
-
 
48
{
-
 
49
	$folder = rtrim($folder, "/");
-
 
50
	$GLOBALS["folder"] = $folder;
-
 
51
	$folder .= "/";
-
 
52
	$real_folder .= $folder;
-
 
53
	$real_url .= $folder;
-
 
54
	$options["upload_dir"] = $real_folder;
-
 
55
	$options["upload_url"] = $real_url;
-
 
56
	foreach ($GLOBALS["Imagedaten"] as $set)
-
 
57
	{
-
 
58
		$options["image_versions"][$set[0]] = array(
-
 
59
			"upload_dir" => $real_folder . $set[1] . "/",
-
 
60
			"upload_url" => $real_url . $set[1] . "/",
-
 
61
			"max_width" => $set[2],
-
 
62
			"max_height" => $set[3],
-
 
63
			);
-
 
64
	}
-
 
65
	if (!file_exists($options["upload_dir"] . "/orig/"))
-
 
66
	{
-
 
67
		mkdir($options["upload_dir"] . "/orig/", 0755, true);
-
 
68
	}
-
 
69
}
Zeile 12... Zeile 70...
12
 
70
 
13
class UploadHandler
71
class UploadHandler
Zeile 14... Zeile 72...
14
{
72
{
Zeile 1395... Zeile 1527...
1395
        $splited = preg_split('/\//', rtrim ($filepath, '/ '));
1527
		$splited = preg_split('/\//', rtrim($filepath, '/ '));