smarty?
gruß
peter
gruß
peter
<?php
#Session starten
session_start();
#Configs einbinden
REQUIRE ('../../../lib/global/url_vars.inc.php');
REQUIRE ('../../../lib/global/checkuser.php');
DEFINE ('must_be_online',0);
DEFINE ('must_be_active',0);
REQUIRE (root.'lib/global/configure.inc.php');
function read_recursiv($path)
{
$result = array();
$handle = opendir($path);
if ($handle)
{
while (false !== ($file = readdir($handle)))
{
if ($file != "."
&& $file != ".."
&& $file != "temp_images"
&& $file != "js"
&& $file != "jpg"
&& $file != "gif"
&& $file != "png"
&& $file != "css"
&& $file != "admin"
&& $file != "footer"
&& $file != "left"
&& $file != "right"
&& $file != "header" )
{
$name = $path . "/" . $file;
if (is_dir($name))
{
$ar = read_recursiv($name);
foreach ($ar as $value)
{
$result[] = $value;
}
}
else
{
$result[] = $name;
}
}
}
}
closedir($handle);
return $result;
}
$dir_ = $_GET['dir_'];
$data = read_recursiv("../../../../handel/work/templates/default/$dir_");
$counter = count($data);
$value = $data;
sort($value);
foreach($value as $file) {
$file = basename($value);
}
#Smarty Validierung
$title=$conf['cms_name']."Admin";
$nowtext="Start";
INCLUDE (LOADTEMPLATE);
$tpl->assign('value',$value);
$tpl->assign('file',$file);
$tpl->assign('counter',$counter);
$tpl->display(template_dir.'bin/admin/file_editor/templates.tpl');
?>
{include file="$temp_dir/header/admin_header.tpl"}
<div id="main">
<h2>Smarty</h2>
<h3>Templates</h3>
<br><span style="font-size:10px; color:green;">Es wurden {$counter} Datein gefunden</span><br>
<hr>
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=bin/admin">Admin</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=header">Header</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=footer">Footer</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=left">Left</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=right">Right</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=bin">Web-Templates</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=css">Stylesheet</a> |
<a style="font-size:10px; color:#ff2200;" href="templates.php?dir_=js">Javascript</a> |
</div>
<div id="main"><br>
{foreach from=$value item=value}
<a style="font-size:10px; color:blue;" href="read.php?file={$value}">{$file}</a>
<br>
{/foreach}
<br>
</div>
{include file="$temp_dir/footer/admin_footer.tpl"}
$value = $data;
//siehe
$result[] = $name;
foreach($value as $file) {
$file = basename($value);
}
$tpl->assign('file',$file);
OffTopic:
da hat das forum meinen neuen thread verschluckt
if (is_dir($name))
{
$ar = read_recursiv($name);
foreach ($ar as $value)
{
$result[] = $value;
}
}
else
{
$result[] = $name;
echo "$file <br>";
}
}
}
}
foreach($value as $file) {
...
}
$result[] = array("dateiname" => basename($value), "path" => $value);
Kommentar