Location: PHPKode > scripts > Create Your Own Directory > cms/header.php
<html>
<?php
include "db-connect.php";
//include urls
include "includes/urls.php";
$query="select layout from defaulttab";
$result=mysql_query($query);

if($row=@mysql_fetch_array($result, MYSQL_ASSOC))
{
  $layout=$row['layout'];
}
if(!($layout))
{
echo"<div align=center><a href='admin/defaultval.php' style='text-decoration:none;font-size:18px;'><br><br>Click here to select Layout to display site</a></div>";
}else{

echo"<script src=".$home."js/tree.js>";
echo"</script>";
echo"<script src=".$home."HRAS/login/view/ajax/pageload.js></script>
<script src=".$home."HRAS/login/validate.js></script>
<script src=".$home."HRAS/login/ajaxfun.js></script>
<script src=".$home."HRAS/login/view/ajax/admin.js></script>";

echo"<SCRIPT type='text/javascript' src='".$home."js/objects.js'></SCRIPT>";
//close the mysql database connection
//$mysqlClass -> dbClose();
//$con=$mysqlClass -> dbConnect();

include "HRAS/login/Registration.php";
?>
<script src="HRAS/login/pageload.js"></script>
<script src="HRAS/login/val.js"></script>
<script src="HRAS/login/validate.js"></script>
<script src="HRAS/login/ajaxfun.js"></script>

<script language="javascript">
function ctck()
{
var sds = document.getElementById("dum");
if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}
}
</script>
<?php
	$id=array();
	$width=array();
	$height=array();
	$typ=array();
	$i=1;
	$umail="";
	$qry="SELECT *  FROM images";
	$result = mysql_query($qry);
	while($row =mysql_fetch_array($result,MYSQL_BOTH))
	{
		$field[$i]=$row[0];
		$width[$i]=$row[2];
		$height[$i]=$row[3];
		$id[$i] = $row[4];
		$typ[$i]=$row[6];	
            $link[$i]=$row[8];
		$uwidth[$i]=$row[9];
		$uheight[$i]=$row[10];

		$i++;
	}

	$qq="select * from defaulttab";
	$rres = mysql_query($qq);
	while($rrow =mysql_fetch_array($rres,MYSQL_ASSOC))
	{
	$umail=$rrow['mailid'];
	$userdomain=$rrow['userdomain'];
	}
	echo"<script language=javascript>";
	echo "var typ7='$typ[7]';";
	echo "var id7=$id[7];";
	echo "var width7=$width[7];";
	echo "var height7=$height[7];";

	echo"</script>";
	?>

	<LINK REL="STYLESHEET" TYPE="text/css" HREF="<?php echo"$home";?>style/dirstyles.css">

	<body>
<LINK REL="shortcut icon" href='<?php echo"$home";?>image/favicon.gif'>

	  <table width=80% border=0 align=center cellpadding=0 cellspacing=0 border=0>
	<?php

		if($typ[10]=="updated"){
	    	  	echo"<tr width=100%><td width=100% background=".$home."includes/print.php?cnt=".$id[10]."width=".$uwidth[10]." height=".$uheight[10]." border=0 align=right valign=bottom style='padding-right:10px;'>";
		}else{
		  	echo"<tr width=100%><td width=100% background=".$home."image/img10.gif  width=".$width[10]." height=".$height[10]." border=0 align=right valign=bottom style='padding-right:10px;'>";
      	}

      	
	?>
	    
		<form method=GET action="<?php echo($home);?>functions/search.php"> 

	
   
	<input type=text name=search style='border: 1px solid #63b8ff;'  value=<?php echo($search)?>></input>
	  
	  <select name=cat style='border: 1px solid #63b8ff;'  >
	  <option name=any value=any > Any </option>
	  <?php
	    $qry="select name from type where parentid =0";
	    $res=mysql_query($qry);
	    while($row=mysql_fetch_array($res,MYSQL_ASSOC))
	    {
	      $cat=$row['name'];
	      if($catname==$cat)
	      {     
	        echo"<option name='$cat' value='$cat' selected>$cat</option>";
	      }else
	      {
	        echo"<option name='$cat' value='$cat'>$cat</option>";
	      }
	   }

		

	  ?>
	  </select>
        <input type=submit class=butgo value=GO></input>
	  <input type=hidden name=sub value=ssearch>
		<?php
		if($_SESSION['ActiveUser'] == "DriveIn")
	    	{
			echo"&nbsp;<a class=log href=\"$home"."HRAS/login/logout.php\"><b>Logout</b></a>";
	    	}else{
	      	echo "&nbsp;<a class=log href=\"$home"."HRAS/login/index.php\"><b>Login</b></a>";
	    	}
		?>


	  </form>
     </td></tr>
	<?php
	echo"<tr><td colspan=2 valign=top align=right  style='margin-right: 20px; font-size: 15px; font-weight: bold; '>";	 
	
		
    	echo"</td></tr>
    	<tr width=100%>
    	<td colspan=2 align=center brcolor=#efefef >
        <table width=100%><tr><td align=center width=16%>";
      	if($typ[10]=="updated")
      	{
      		echo"<table width=100% align=center background=".$home."includes/print.php?cnt=".$id[11]." cellpadding=0 cellspacing=0 border=0>";
      	}else{
      		echo"<table width=100%  align=center background=".$home."image/img11.gif cellpadding=0 cellspacing=0 border=0>";   
   		}

	  echo"<tr>";

      	if($typ[1]=="updated"){
	    		echo"<td  width=16% align=center background=".$home."includes/print.php?cnt=".$id[1]."width=".$uwidth[1]." height=".$uheight[1]." border=0 ><a class=menu  href=".$link[1].">".$field[1]."</a></td>";
		}else{
	   		echo"<td  width=16% align=center background=".$home."image/img1.gif  width=".$width[1]." height=".$height[1]." border=0 width=16%><a class=menu  href=".$link[1].">".$field[1]."</a></td>";
      	}
    		if($typ[13]=="updated"){
	    		echo"<td><img src=".$home."includes/print.php?cnt=".$id[13]."></td>";
		}else{
	   		echo"<td><img src=".$home."image/img13.gif></td>";
      	}

		if($typ[2]=="updated"){
		      echo"<td  width=16%  align=center background=".$home."includes/print.php?cnt=".$id[2]."width=".$uwidth[2]." height=".$uheight[2]." border=0  ><a class=menu  href=".$link[2].">".$field[2]."</a></td>";
		}else{
	   		echo"<td  width=16% align=center background=".$home."image/img2.gif  width=".$width[2]." height=".$height[2]." border=0 ><a class=menu href=".$link[2].">".$field[2]."</a></td>";
		}
		if($typ[13]=="updated"){
	    		echo"<td><img src=".$home."includes/print.php?cnt=".$id[13]."></td>";
		}else{
	   		echo"<td><img src=".$home."image/img13.gif></td>";
      	}

	
     		if($typ[3]=="updated"){
	   	 	  echo"<td  width=16%  align=center background=".$home."includes/print.php?cnt=".$id[3]."width=".$uwidth[3]." height=".$uheight[3]." border=0 ><a class=menu style='padding: 0px;' href=".$link[3].">".$field[3]."</a></td>";
		}else{
	  		 echo"<td  width=16%  align=center background=".$home."image/img3.gif  width=".$width[3]." height=".$height[3]." border=0 ><a class=menu href=".$link[3].">".$field[3]."</a></td>";
      	}
		if($typ[13]=="updated"){
	    		echo"<td><img src=".$home."includes/print.php?cnt=".$id[13]."></td>";
		}else{
	   		echo"<td><img src=".$home."image/img13.gif></td>";
      	}

	 
      	if($typ[4]=="updated"){
	       	echo"<td  width=16%  align=center background=".$home."includes/print.php?cnt=".$id[4]."width=".$uwidth[4]." height=".$uheight[4]." border=0 ><a class=menu  href=".$link[4].">".$field[4]."</a></td>";
		}else{
	   		echo"<td  width=16% align=center background=".$home."image/img4.gif  width=".$width[4]." height=".$height[4]." border=0 ><a class=menu href=".$link[4].">".$field[4]."</a></td>";

      	}
		
		if($typ[13]=="updated"){
	    		echo"<td><img src=".$home."includes/print.php?cnt=".$id[13]."></td>";
		}else{
	   		echo"<td><img src=".$home."image/img13.gif></td>";
      	}

	 
      	if($typ[5]=="updated"){
	     		echo"<td  width=16% align=center background=".$home."includes/print.php?cnt=".$id[5]."width=".$uwidth[5]." height=".$uheight[5]." border=0 ><a class=menu  href=".$link[5].">".$field[5]."</a></td>";
		}else{
	   		echo"<td  width=16% align=center background=".$home."image/img5.gif  width=".$width[5]." height=".$height[5]." border=0 ><a class=menu  href=".$link[5].">".$field[5]."</a></td>";
      	}
	
		if($typ[13]=="updated"){
	    		echo"<td><img src=".$home."includes/print.php?cnt=".$id[13]."></td>";
		}else{
	   		echo"<td><img src=".$home."image/img13.gif></td>";
      	}

     		if($typ[6]=="updated"){
	     		echo"<td  width=16% align=center background=".$home."includes/print.php?cnt=".$id[6]."width=".$uwidth[6]." height=".$uheight[6]." border=0><a class=menu href=".$link[6].">".$field[6]."</a></td>";
		}else{
	   		echo"<td  width=16% align=center background=".$home."image/img6.gif  width=".$width[6]." height=".$height[6]." border=0><a class=menu  href=".$link[6].">".$field[6]."</a></td>";
		}
	
		echo"<script language='javascript'>";
		echo"var foldtyp=\"$typ[6]\";";
		echo"</script>";

	?>
      	</td></tr></table>
   	</td></tr></table>
 	</td></tr></table>
 	<table style='padding-top:10px;' align=center width=80% border=0 valign=top>
 	<tr>
    	<td height=100% width=20% valign=top>
 		<?php
    			include "includes/tree.php";
	 	?>	 
   	</td>
   	<td valign=top  height=100% width=80% align=center>
	<table valign=top height=100%   width=100% align=right cellpadding=0 cellspacing=0 border=0>
	  
	  <tr  valign=top ><td valign=top colspan=2>
         <br>
<?php
}
?>
   
Return current item: Create Your Own Directory