ist es möglich hier eine alhabteische ausgabe zurück zubekommen???
Code: Alles auswählen
?><?php
/**
* $Revision: 1.3 $
* $Source: D:/cvs/cvsrepo/test/PPI_Nade/module/picture/input.php,v $
* $Date: 2005/11/29 16:10:51 $
*/
/**
* picture
* @author Andreas Kummer
* @copyright Copyright © 2005 w3concepts AG
*/
if (!class_exists('pictureInput')) {
class pictureInput {
function pictureInput($pfad) {
$this->pfad = $pfad;
$this->pathlen = strlen($this->pfad);
}
function getPath($root,$level = 0) {
$content = $this->readDir($root);
foreach ($content as $file) {
if (is_dir($root.$file)) {
$verzeichnis = substr($root,$this->pathlen);
$returnvalue["{$verzeichnis}{$file}/"] = str_repeat(" ",$level * 5).$file;
$returnvalue = array_merge((array)$returnvalue,(array)$this->getPath($root.$file."/",$level+1));
// $returnvalue = array_merge($returnvalue,$this->getPath($root.$file."/",$level+1));
}
}
return $returnvalue;
}
function readDir($path) {
$handle = opendir($path);
while ($file = readdir ($handle)) {
if ($file != "." && $file != "..") $returnvalue[] = $file;
}
closedir($handle);
return $returnvalue;
}
function makeSelect($preselection) {
$pfad = $this->getPath($this->pfad);
foreach ($pfad as $key => $value) {
if ($preselection == $key) {
echo "<option value=\"$key\" selected=\"selected\">$value</option>";
} else {
echo "<option value=\"$key\">$value</option>";
}
}
}
}
}
$pfad = new pictureInput($cfgClient[$client]['path']['frontend'].$cfgClient[$client]['upload']);
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">";
echo "<tr><td>Bildzielpfad:</td>";
echo "<td><select size=\"1\" name=\"CMS_VAR[0]\" />";
$pfad->makeSelect("CMS_VALUE[0]");
echo "</td></tr>";
echo "</table>";