Location: PHPKode > scripts > Create Your Own Directory > cms/functions/catlist.php
include"./objects.php";
echo "<br><table border=0 width=90% align=center><tr><td colspan=3 align=right><strong><a class=heading1 href=\"$home"."HRAS/users/index.php\">ADD YOUR LISTING</a></strong></td></tr><tr>";
?>
<script language=javascript>
var par=child[0].split("#");
for(i=0;i<par.length;i++)
{
  if(i%3 == 0)
   document.write("</tr><tr>");
  document.write("<td valign=top width=33%><br>");
  var arr=(par[i].split("::"));
  var parentnam=arr[1];
  var parentid=arr[2];
  //alert(parentnam);
  var temp1="<table bgcolor=#dedede width=100%><tr><td><img src=image/folder.gif><a class=heading  href='"+parentnam+"/index.html'>"+parentnam+"</a></td></tr>";
  document.write(temp1);
  var childs = getChilds(parentid);
  for(var j=0;j<childs.length;j++)
  {
      var arr2=(childs[j].split("::"));
	var cname = arr2[1].replace(' ','_');
	if(getChilds(arr2[2]).length > 0)
 	 document.write("<tr bgcolor=#fefefe><td><a class=heading1 href='"+parentnam+"/"+cname+"/index.html'>"+arr2[1]+"</a></td></tr>");
	else
	 document.write("<tr bgcolor=#fefefe><td><a class=heading1 href='"+parentnam+"/"+cname+"-"+arr2[2]+".php'>"+arr2[1]+"</a></td></tr>"); 
  }
  document.write("</table>");
  document.write("</td>");
}
</script>
<?php
	echo "</tr></table>";	
?>
Return current item: Create Your Own Directory