problem mit modul nach upgrade
Verfasst: Mo 28. Jan 2008, 14:41
ich habe auf die aktuelle contenido version upgegraded...
und jetzt ein problem mit dem modul uploadverzeichnis auswählen
man kann kein verzeichnis auswählem es bleibt leer...
hat jemand eine idee?
und jetzt ein problem mit dem modul uploadverzeichnis auswählen
man kann kein verzeichnis auswählem es bleibt leer...
hat jemand eine idee?
Code: Alles auswählen
echo'<table>
<tr>
<td align="left" valign="middle">Standbild anzeigen?</td>
<td align="left" valign="top">';
$cfg_check_parequal = "CMS_VALUE[1001]";
echo " <input class=\"text_medium\" type=\"checkbox\" name=\"CMS_VAR[1001]\" value=\"1\"";
if ( $cfg_check_parequal == 1 )
{
echo " checked=checked";
}
echo"</td>
</tr>
</table>";
class pfad {
function pfad($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($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 pfad($cfgClient[$client]['path']['frontend'].$cfgClient[$client]['upload']);
echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">";
echo "<tr><td>Bilderpfad:</td>";
echo "<td><select size=\"1\" name=\"CMS_VAR[0]\" />";
$pfad->makeSelect("CMS_VALUE[0]");
echo "</td></tr></table>";