Exemplo n.º 1
0
print '<table class="border" width="100%">';
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
$s='';
$tmpecmdir=new ECMDirectory($db);	// Need to create a new one
$tmpecmdir->fetch($ecmdir->id);
$result = 1;
$i=0;
while ($tmpecmdir && $result > 0)
{
	$tmpecmdir->ref=$tmpecmdir->label;
	if ($i == 0 && $_GET["action"] == 'edit')
	{
		$s='<input type="text" name="label" size="40" maxlength="32" value="'.$tmpecmdir->label.'">';
	}
	else $s=$tmpecmdir->getNomUrl(1).$s;
	if ($tmpecmdir->fk_parent)
	{
		$s=' -> '.$s;
		$result=$tmpecmdir->fetch($tmpecmdir->fk_parent);
	}
	else
	{
		$tmpecmdir=0;
	}
	$i++;
}

print img_picto('','object_dir').' <a href="'.DOL_URL_ROOT.'/ecm/index.php">'.$langs->trans("ECMRoot").'</a> -> ';
print $s;
print '</td></tr>';
Exemplo n.º 2
0
			if ($b == 0 || ! in_array($val['id'],$expandedsectionarray)) $n='3';
			if (! in_array($val['id'],$expandedsectionarray)) $ref=img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/plustop'.$n.'.gif','',1);
			else $ref=img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/minustop'.$n.'.gif','',1);
			if ($option == 'indexexpanded') $lien = '<a href="'.$_SERVER["PHP_SELF"].'?section='.$val['id'].'&amp;sectionexpand=false">';
	    	if ($option == 'indexnotexpanded') $lien = '<a href="'.$_SERVER["PHP_SELF"].'?section='.$val['id'].'&amp;sectionexpand=true">';
	    	//$newref=str_replace('_',' ',$ref);
	    	$newref=$ref;
	    	$lienfin='</a>';
	    	print $lien.$newref.$lienfin;
			if (! in_array($val['id'],$expandedsectionarray)) print img_picto($ecmdirstatic->ref,DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);
			else print img_picto($ecmdirstatic->ref,DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif','',1);
			print '</td>';
			// Show link
			print '<td valign="middle">';
			if ($section == $val['id']) print ' <u>';
			print $ecmdirstatic->getNomUrl(0,'index',32);
			if ($section == $val['id']) print '</u>';
			print '</td>';
			print '<td>&nbsp;</td>';
			print '</tr></table>';
			print "</td>\n";

			// Nb of docs
			print '<td align="right">';
			print $val['cachenbofdoc'];
			print '</td>';
			print '<td align="left">';
			if ($nbofsubdir && $nboffilesinsubdir) print '<font color="#AAAAAA">+'.$nboffilesinsubdir.'</font> ';
			print '</td>';

			// Edit link