repaired image selecta
This commit is contained in:
parent
5b173f381c
commit
43152b3b68
3 changed files with 8 additions and 10 deletions
|
@ -26,7 +26,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
|
||||||
$type = 'page';
|
$type = 'page';
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = getcwd().'/img/' . $type . '/';
|
$path = getcwd().'/public/img/' . $type . '/';
|
||||||
|
|
||||||
if(isset($_FILES['myfile']))
|
if(isset($_FILES['myfile']))
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$ar = array();
|
$ar = array();
|
||||||
if (is_readable($path) && $handle = opendir())
|
if (is_readable($path) && $handle = opendir($path))
|
||||||
{
|
{
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if(is_dir($file)) continue;
|
if(is_dir($file)) continue;
|
||||||
|
@ -63,6 +63,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
|
||||||
|
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
$this->_view->type = $type;
|
||||||
$this->_view->files = $ar;
|
$this->_view->files = $ar;
|
||||||
echo $this->_view->render('AdminPage/image');
|
echo $this->_view->render('AdminPage/image');
|
||||||
|
|
||||||
|
|
|
@ -55,13 +55,11 @@ class Upload extends Katharsis_Model_Abstract
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fullName = $dir . '/' . $name . $ext;
|
if (!move_uploaded_file($file['tmp_name'], $dir . '/' . $name . $ext))
|
||||||
|
|
||||||
if (!move_uploaded_file($file['tmp_name'], $fullName))
|
|
||||||
{
|
{
|
||||||
throw new DidgeridooArtwork_Exception('Hochladen fehlgeschlagen. (move_uploaded_file: false)');
|
throw new DidgeridooArtwork_Exception('Hochladen fehlgeschlagen. (move_uploaded_file: false)');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return $fullName;
|
return $name . $ext;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Swiss Didgeridoo Artwork</title>
|
<title>Seinheit</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/style/main.css" />
|
<link rel="stylesheet" type="text/css" href="/style/main.css" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="Description" content="Swiss Didgeridoo Artwork - Online Shop" />
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -18,8 +17,8 @@
|
||||||
<ul style="padding-left: 16px; list-style-type: none">
|
<ul style="padding-left: 16px; list-style-type: none">
|
||||||
<?php foreach($this->files as $file): ?>
|
<?php foreach($this->files as $file): ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="javascript: void(0);" onclick="window.open('/img/page/<?php echo $file; ?>', 'Bild', 'width=400,height=300,status=yes,scrollbars=yes,resizable=yes');"><img src="/img/page/<?php echo $file; ?>" width="50" height="50" /></a>
|
<a href="javascript: void(0);" onclick="window.open('/img/page/<?php echo $file; ?>', 'Bild', 'width=400,height=300,status=yes,scrollbars=yes,resizable=yes');"><img src="/img/<?php echo $this->type; ?>/<?php echo $file; ?>" width="50" height="50" /></a>
|
||||||
<a href="javascript: void(0);" onclick="opener.document.getElementById('src').value='/img/page/<?php echo $file; ?>'; window.close();" >Einfügen</a>
|
<a href="javascript: void(0);" onclick="opener.document.getElementById('src').value='/img/<?php echo $this->type; ?>/<?php echo $file; ?>'; window.close();" >Einfügen</a>
|
||||||
<a href="?delete=<?php echo $file ?>" style="float:right; margin-top: 35px">Löschen</a>
|
<a href="?delete=<?php echo $file ?>" style="float:right; margin-top: 35px">Löschen</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue