} if ($showline) { if (in_array($val['id'], $expandedsectionarray)) { $option = 'indexexpanded'; } else { $option = 'indexnotexpanded'; } //print $option; print '<li class="directory collapsed">'; // Show tree graph pictos $cpt = 1; while ($cpt < $sqltree[$key]['level']) { print ' '; $cpt++; } $resarray = tree_showpad($sqltree, $key, 1); $a = $resarray[0]; $nbofsubdir = $resarray[1]; $nboffilesinsubdir = $resarray[2]; // Show link print $ecmdirstatic->getNomUrl(0, $option, 32, 'class="fmdirlia jqft ecmjqft"'); print '<div class="ecmjqft">'; // Nb of docs print '<table class="nobordernopadding"><tr><td>'; print $val['cachenbofdoc']; print '</td>'; print '<td align="left">'; if ($nbofsubdir && $nboffilesinsubdir) { print '<font color="#AAAAAA">+' . $nboffilesinsubdir . '</font> '; } print '</td>';
elseif ($val['level'] < 2) $showline=1; if ($showline) { $var=!$var; if (in_array($val['id'],$expandedsectionarray)) $option='indexexpanded'; else $option='indexnotexpanded'; //print $option; print "<tr ".$bc[$var].">"; // Show tree graph pictos print '<td align="left">'; print '<table class="nobordernopadding"><tr class="nobordernopadding"><td>'; $resarray=tree_showpad($fulltree,$key); $a=$resarray[0]; $nbofsubdir=$resarray[1]; $c=$resarray[2]; $nboffilesinsubdir=$resarray[3]; print '</td>'; // Show picto print '<td valign="top">'; //print $val['fullpath']."(".$showline.")"; $n='2'; 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'].'&type='.$type.'&sectionexpand=false">'; if ($option == 'indexnotexpanded') $lien = '<a href="'.$_SERVER["PHP_SELF"].'?section='.$val['id'].'&type='.$type.'&sectionexpand=true">';