Пример #1
0
function a_rectree($p,$path='/',$niv=0) {//{{{
	global $cf_datadir,$cf_adminroot,$SCRIPT_NAME,$cm_navfile;
	$c = "$cf_adminroot/$cf_datadir";
	if (is_dir("$c$path")) {
		$class = "dir";
		$query[] = "^[^.]*";
		$args[] = '1';
		$args[] = '-r';
		$ls = c_ls($c.$path,'',$query,$args);
		if ($path == $p) { $class = "bdir"; }
		$cm_navfile.= "<div id=nopad1 onmouseover=\"this.style.background='#FFFFFF';\" onmouseout=\"this.style.background='none';\">";
		$cm_navfile.=  "<a href=$SCRIPT_NAME?p=".urlencode("$path")." class=$class>";
		$cm_navfile.= "<img src=/picto/0.png width=1 height=1 hspace=".(1+(5*$niv))." vspace=0 border=0 alt=''>";
		$cm_navfile.= a_icondirtree(basename($path)).basename($path)."/</a></div>\n";
		$nivmore = $niv + 1;
		if (!is_array($ls)) return FALSE;
		foreach ($ls as $it) {
			if ($p and strstr($p,$path)) {
				a_rectree($p,"$path/$it",$nivmore);
			}
		}
	} else {
		$class = "file";
		if ($path == $p) { $class = "bfile"; }
		$cm_navfile.=  "<div id=nopad onmouseover=\"this.style.background='#FFFFFF';\" onmouseout=\"this.style.background='none';\">";
		$cm_navfile.= "<a href=$SCRIPT_NAME?p=".urlencode("$path");
		$cm_navfile.=  " class=$class>".str_repeat("&nbsp;",$niv*4).a_iconfiletree(basename($path)).basename($path)."</a></div>\n";
	}
}//}}}
Пример #2
0
include 'inc/conf.php';
define(NOCACHE,true);
$closed = TRUE;
include 'inc/auth.php';
include 'inc/admin.php';

if (is_array($output)) {
	$cm_out = "<tr><td colspan=2 bgcolor=#ffffff class=bmenu>&nbsp;";
	$cm_out.= implode("</td></tr><tr><td colspan=2 class=bmenu bgcolor=#ffffff>&nbsp;",$output);
	$cm_out.= "</td></tr>";
} else {
	$cm_out = '';
}

foreach ($cf_domds as $do) {
	a_rectree($p,"/$do");
}

$cm_head = c_bread($p);
include "html/head.php";
include "html/head_browse.php";
if ((strstr($p,'_images')) or (strstr($p,'_docs'))) {
	include 'inc/image.php';
} else {
	include 'inc/file.php';
}
include "html/foot_browse.php";
include "html/foot.php";
?>

<? /*