</ul>
    <h3>Category Overview</h3>
  
    <table id="page_manager">
    
      <thead>
        <tr class="headers">
          <td width="30"> ID </td>
          <td width="100">Category Name</td>          
          <td width="150" align="center">Action</td>
        </tr>
      </thead>
    
      <tbody id="alter_rows">
       <?php 
$count_record = Category::countCategory(0);
if (!isset($_REQUEST['page'])) {
    $page = 1;
} else {
    $page = $_GET[page];
}
$pagination = new Pagination();
//for display
$pg = $pagination->page_pagination(20, $count_record, $page, 20);
//$result_prod = mysql_query($query_Recordset2.$pg[1]);
$category = Category::findAll($pg[1], 0);
?>
		  	<? if($count_record == 0) { ?>
            	  <tr>
                  	<td colspan="3" align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#F00; font-weight:bold">No Record Found</td>
                  </tr>
Example #2
0
 <h2>Our Products</h2>
<menu>
	<? $category = Category::displayAllCategory(0);?>
	<? foreach($category as $categories):
		$ctr=0;
		$subcat = Category::displayAllCategory($categories->fldCategoryID);
		$subcatCount = Category::countCategory($categories->fldCategoryID);
		?>
		<? if(empty($subcat)): ?>
	  		<li><a href="products-<?php 
echo $categories->fldCategoryID;
?>
.html"><?php 
echo $categories->fldCategoryName;
?>
</a></li>
	    <? else: ?>
	    	<li class=parentmenu><?php 
echo $categories->fldCategoryName;
?>
	        <ul class=childmenu>
			<? foreach($subcat as $subcats):
				$ctr=$ctr+1;
				$class = ($ctr==$subcatCount) ? "class='lstmenu'" : ""; ?>
				<li <?php 
echo $class;
?>
><a href="products-<?php 
echo $subcats->fldCategoryID;
?>
.html"><?php