
<table width="100%" border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse; border:#666666 solid 1px;">
   <tr>
   <td class="tabledata">SNo.</td>
   <td class="tabledata">Title</td>
   <td class="tabledata">Parent</td>
   <td class="tabledata">Status</td>
   <td class="tabledata">Edit</td>
  
   </tr>
   <?php 
      // LIMIT $startpoint,$perpage
   $GetRecord = "Select * from $table order by picklist_id  ";
   $ResultData = DB_query($GetRecord,$db);
   $i=1;
   if(DB_num_rows($ResultData)==0)
   echo "<td>--No Record--</td>";
   
   while($RowData = DB_fetch_array($ResultData))
   {?>
<tr bgcolor="#c1c1c1">
    <td><div align="center"><?php echo $i; ?></div></td>
    <td><?php echo $RowData['picklist_title']; ?>	  </td>
    <td><?php 
	   
	    $parent= $s->GetFieldValue($table,"picklist_id='".$RowData['parent_id']."'",'picklist_title');	 
	  if($parent!='')
	  echo $parent;
	  else{
	  echo "--Root--";
	  }
 	   ?></td>
   
   	<td><div align="center"><?php echo ($RowData['status']=='Y'?'Active':'Inactive'); ?></div> </td>	

   <td><div align="center"><a href="<?php echo $targetpage?>&amp;action=Edit&amp;picklist_id=<?php echo $RowData['picklist_id']; ?>"><img src="images/icon-edit.png"  width="10" height="10"/></a></div></td>
	 </tr>
 
	<?php $i++;}   
   ?> 
   
    
    <!-- <td colspan="4">
	<?php  
	//$cond="1=1";
	//Pages($table,20,"index.php?route=AccountGroups_Master&action=Edit".$url,$cond,'picklist_id');
	 //echo Pages("jos_users",$perpage,"index.php?option=com_empdictory&dept=$dept&",$condition);?>
	</td> -->
   
  </tr>
 