Location: PHPKode > scripts > Create Your Own Directory > cms/includes/tree.php
	<?php
  		if($typ[14]=="updated")
      	{
      		echo"<table width=100% valign=top height=100% align=center background=".$home."includes/print.php?cnt=".$id[14]." cellpadding=0 cellspacing=0 border=0>";
      	}else{
      		echo"<table width=100%  valign=top  height=100%  align=center background=".$home."image/img14.gif cellpadding=0 cellspacing=0 border=0>";   
   		}
$query="select * from type";
$result=mysql_query($query);
$id=0;
if($row=@mysql_fetch_array($result, MYSQL_ASSOC))
{
  $id=$row['id'];
}
if($id==0)
{
echo"<tr><td><div align=center><a href='./admin/addcat.php' style='text-decoration:none;font-size:12px;'><br><br><b>Click here to ADD Your CATEGORY<b></a></div></td></tr>";
}


	?>

			
		<tr  valign=top ><td valign=top height=400>
			<table width=95% height=100% valign=top   class=treeboder align=center cellpadding=1 cellspacing=1>
                  <script language=javascript>
			var parents=new Array();
                  var childd=new Array()
			parents=child[0].split("#");
          		var parentname = new Array();
			var parentids=new Array();
			var childname = new Array();
			var childids=new Array();
			for(var i=0;i<parents.length;i++)
			{
                 	  var arra=(parents[i].split("::"));
			  parentname[i]=arra[1];
  			  parentids[i]=arra[2];
                    var temp="<tr height=10><td valign=top ><br><div style='margin-left: 10px; text-decoration:none;'><a  class=treehead  href='"+home+parentname[i]+"/index.html'"+">"+parentname[i]+"</a></div></td></tr>";
			  document.write(temp);
                    var id=parentids[i];
			  childd=getChilds(id);
			  
			  for(var j=0;j<childd.length;j++)
                    {
      			var arr3=(childd[j].split("::"));
				var ccname = arr3[1].replace(' ','_');
                        childname[j]=arr3[1];
  			  	childids[j]=arr3[2];
				var ct=getChilds(childids[j]).length ;
				if(ct == 0)
                        {   
                          document.write("<tr height=10><td valign=top ><div style='margin-left: 25px; text-decoration:none;'><a  class=treehead1 href='"+home+parentname[i]+"/"+childname[j]+"-"+childids[j]+"-0.php'>"+childname[j]+"</a></div></td></tr>\n");
				  
				}else if(ct > 0)
				{
				  document.write("<tr height=10><td valign=top ><div style='margin-left: 25px; text-decoration:none;'><a  class=treehead1 href='"+home+parentname[i]+"/"+childname[j]+"/index.html'>"+childname[j]+"</a></div></td></tr>\n");
				}

                    }
			}
              //  }else
               //{
			//	document.write("<tr height=10><td valign=top ><div style='margin-left: 25px; text-decoration:none;'><a  class=treehead1 href='"index.html'>CLICK TO ADD CATEGORY </a></div></td></tr>");


               // }
			</script>
			</table></td></tr>
		
		<tr ><td valign=top ><br><br>
		<form name="setf" method="post" action="<?php echo($home);?>HRAS/login/index.php">
			<table width=95% align=center style='border: 0px solid grey; ' cellpadding=0 class=treeauth>

			<tr><td>
				
				<input name="type" value="auth" type="hidden">Email 
			</td><td>
				<input type=text name="usern" size=10></input>
			</td></tr>
			<tr><td>Password </td><td>
				<input type=password name="passw" size=10></input>
			</td></tr>
			<tr><td colspan=2 align=center>
<?php
  		if($typ[19]=="updated")
      	{
      		echo"<INPUT TYPE=image SRC=".$home."includes/print.php?cnt=".$id[19].">";
      	}else{
      		echo"<INPUT TYPE=image SRC=".$home."image/img19.gif>";   
   		}
	?>
				<div style="font-size:12px; color:blue;">
				<a style="text-decoration:none;" href="<?php echo($home); ?>HRAS/login/Forget_Password.php">forgot password</a><br>
				<a style="text-decoration:none;" href="<?php echo($home); ?>HRAS/login/useradd.php">Register Now</a></div>
				
			</td></tr>
		      </table>
             </form>

		</td></tr>
		<tr><td height=20>
		</td></tr>
	</table>
Return current item: Create Your Own Directory