Além de uma tabela regular, tamanhos alternativos estão disponíveis.
$render=explode(" ",$_POST["partial_render"]);
if(isset($_POST["tabela_expand"])){
$expandir=$_POST["tabela_expand"];
}
if(isset($_POST["tabela2_expand"])){
$expandir=$_POST["tabela2_expand"];
}
if(isset($_POST["tabela3_expand"])){
$expandir=$_POST["tabela3_expand"];
}
$abrir=explode("_",$expandir);
$total=count($abrir);
$nivel=$total+1;
$local=$abrir[$total-1];
$espaco="";
for ($i = 0; $i <= $total; $i++) {
$espaco.="<span class="ui-treetable-indent"></span>";
}
$result = "SELECT * FROM arquivos WHERE local="".$local.""";
$result = $pdo->query($result);
$resposta="";
while ($linha = $result->fetch(PDO::FETCH_ASSOC)){
if($linha["tipo"]=="Pasta"){
$resposta.="
<tr id="node_".$_POST["tabela_expand"]."_".$linha["id_arquivo"]."" class="ui-widget-content default ui-node-level-".$nivel."" aria-expanded="false" data-rk="".$_POST["tabela_expand"]."_".$linha["id_arquivo"]."" data-prk="".$_POST["tabela_expand"]."">
<td role="gridcell">".$espaco."<span class="ui-treetable-toggler ui-icon ui-icon-triangle-1-e ui-c"></span>".$linha["nome"]."</td>
<td role="gridcell">".$linha["tamanho"]."</td>
<td role="gridcell">".$linha["tipo"]."</td>
</tr>
";
}else{
$resposta.="
<tr id="node_".$_POST["tabela_expand"]."_".$linha["id_arquivo"]."" class="ui-widget-content app ui-node-level-".$nivel."" aria-expanded="false" data-rk="".$_POST["tabela_expand"]."_".$linha["id_arquivo"]."" data-prk="".$_POST["tabela_expand"]."">
<td role="gridcell">".$espaco."<span class="ui-treetable-toggler ui-icon ui-icon-triangle-1-e ui-c" style="visibility:hidden"></span>".$linha["nome"]."</td>
<td role="gridcell">".$linha["tamanho"]."</td>
<td role="gridcell">".$linha["tipo"]."</td>
</tr>
";
}
}
dc.cw("TreeTable", "widget_tabela", {
id: "tabela"
});
dc.cw("TreeTable", "widget_tabela2", {
id: "tabela2"
});
dc.cw("TreeTable", "widget_tabela3", {
id: "tabela3"
});