Move accessible files to public folders and adjust paths.
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
<?php
|
||||
|
||||
$imgPath = __DIR__ . '/../../../public/img';
|
||||
|
||||
if ('will' == $_GET['t']) {
|
||||
$path = "../img/will/";
|
||||
$path = $imgPath . '/will/';
|
||||
echo "<h2>Fotos auf der Seite Willkommen</h2>\n";
|
||||
} elseif ('haus' == $_GET['t']) {
|
||||
$path = "../img/haus/";
|
||||
$path = $imgPath . '/haus/';
|
||||
echo "<h2>Fotos auf der Seite Unser Haus</h2>\n";
|
||||
} elseif ('lage' == $_GET['t']) {
|
||||
$path = "../img/haus/lage/";
|
||||
$path = $imgPath . '/haus/lage/';
|
||||
echo "<h2>Fotos auf der Seite Unser Haus - Lage</h2>\n";
|
||||
} elseif ('geschichte' == $_GET['t']) {
|
||||
$path = "../img/haus/geschichte/";
|
||||
$path = $imgPath . '/haus/geschichte/';
|
||||
echo "<h2>Fotos auf der Seite Unser Haus - Geschichte</h2>\n";
|
||||
} elseif ('gaby' == $_GET['t']) {
|
||||
$path = "../img/gaby/";
|
||||
$path = $imgPath . '/gaby/';
|
||||
echo "<h2>Fotos auf der Seite Wohnung Gaby</h2>\n";
|
||||
} elseif ('amelie' == $_GET['t']) {
|
||||
$path = "../img/amelie/";
|
||||
$path = $imgPath . '/amelie/';
|
||||
echo "<h2>Fotos auf der Seite Wohnung Amelie</h2>\n";
|
||||
} else {
|
||||
die();
|
||||
@@ -32,7 +34,7 @@ if (!isset($_GET['action'])) {
|
||||
if (file_exists($pic)) {
|
||||
$link = $ref . "&action=del&pic=" . $i;
|
||||
echo "<a href=\"$link\">";
|
||||
echo "<img style=\"margin: 20px 20px 20px 20px; border: 2px solid red;\" src=\"$pic\" width=\"100px\" height=\"100px\"/>";
|
||||
echo "<img style=\"margin: 20px 20px 20px 20px; border: 2px solid red;\" src=\"" . str_replace(__DIR__ . '/../../../public', '', $pic) . "\" width=\"100px\" height=\"100px\"/>";
|
||||
} else {
|
||||
$link = $ref . "&action=add&pic=" . $i;
|
||||
echo "<a href=\"$link\">";
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
<?php
|
||||
|
||||
if (isset($_POST['add'])) {
|
||||
include "inhalte/fotos/bilder/add.php";
|
||||
include __DIR__ . '/bilder/add.php';
|
||||
} elseif (isset($_POST['edit'])) {
|
||||
include "inhalte/fotos/bilder/edit.php";
|
||||
include __DIR__ . '/bilder/edit.php';
|
||||
} elseif (isset($_POST['del'])) {
|
||||
include "inhalte/fotos/bilder/del.php";
|
||||
include __DIR__ . '/bilder/del.php';
|
||||
} else {
|
||||
include "inhalte/fotos/bilder/standard.php";
|
||||
}
|
||||
?>
|
||||
include __DIR__ . '/bilder/standard.php';
|
||||
}
|
||||
@@ -33,9 +33,9 @@ if (!isset($_POST['Speichern'])) {
|
||||
$last = $result2->fetch_assoc();
|
||||
$id = $last['last_insert_id()'];
|
||||
|
||||
$uploaddir = '../img/umgebung/bilder/';
|
||||
$uploaddir = __DIR__ . '/../../../../public/img/umgebung/bilder/';
|
||||
$uploadfile = $uploaddir . $_FILES['Foto']['name'];
|
||||
move_uploaded_file($_FILES['Foto']['tmp_name'], $uploadfile);
|
||||
$test = move_uploaded_file($_FILES['Foto']['tmp_name'], $uploadfile);
|
||||
$src = imagecreatefromjpeg($uploadfile);
|
||||
list($width, $height) = getimagesize($uploadfile);
|
||||
if ($height > $width) {
|
||||
@@ -55,4 +55,3 @@ if (!isset($_POST['Speichern'])) {
|
||||
}
|
||||
echo '<a href="index.php?section=fotos&t=bilder">Zurück zur Übersicht</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -32,6 +32,4 @@ if (!isset($_POST['Speichern'])) {
|
||||
echo "Fehler beim L<>schen";
|
||||
}
|
||||
echo '<a href="index.php?section=fotos&t=bilder">Zurück zur Übersicht</a>';
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@@ -33,5 +33,4 @@ if (!isset($_POST['Speichern'])) {
|
||||
}
|
||||
echo "Die Überschrift wurde gespeichert<br />";
|
||||
echo '<a href="index.php?section=fotos&t=bilder">Zurück zur Übersicht</a>';
|
||||
}
|
||||
?>
|
||||
}
|
||||
@@ -60,5 +60,4 @@ if (!isset($_GET['action'])) {
|
||||
echo "<p>Bild hochgeladen</p>";
|
||||
echo "<a href=\"index.php?section=fotos&t=$_GET[t]\">Zurück zur Übersicht</a>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
Reference in New Issue
Block a user