
<div style="width:830px; margin-left:auto; margin-right:auto; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:12px;">

	<fieldset style="background-color:#FFFFFF;">
		
		<?php
				  $sql="select * from  modules_form where moduleid='".$_REQUEST['modid']."' and status='Y' order by sequence";
				$query=DB_query($sql,$db);
				$db1=DB_fetch_array($query);
				$sql2="select * from module_form_categories where module_id='".$_REQUEST['modid']."'  and status='Y' order by sequence";
				$query1=DB_query($sql2,$db);
				while($catid=DB_fetch_array($query1))
				{
				  ?>		
		<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" style="text-align:justify; ">
		<tr> 
		<h1 style="font-size:15; font-family:Arial, Helvetica, sans-serif; background-color:#3e3939; color:#FFFFFF; padding-left:10px; padding-top:5px; padding-bottom:5px;"><?php echo $catid['cat_desc']; ?></h1>
 		<!--Table 1 --> 
   <?php  $i=0;
					    $sql3="select * from modules_form where module_form_category_id='".$catid['id']."'  and status='Y'";
						$query3=DB_query($sql3,$db);
 						while($cat=DB_fetch_array($query3))
						{
						   if($i%3==0){
						   echo " </td> <tr>";
						   $i=0;
						   }
							?>
 						<td  width="14%" valign="top"><a href="index.php?route=<?php echo  $cat['frm_url'];?>&amp;modid=<?php echo $cat['moduleid'];?>&amp;frmid=<?php echo $cat['id']; ?>">
						<?php 	   if($cat['setuplogo']!=''){?>					   
							<img src="<?php echo  $cat['setuplogo'];?>" width="30" height="30" />
							<?php } else{?>
								<img src="img1/terms.gif" width="30" height="30" />
							<?php } ?>
						</a>
						</td>
						<td width="20%" valign="top">
						<a href="index.php?route=<?php echo  $cat['frm_url'];?>&amp;modid=<?php echo $cat['moduleid'];?>&amp;frmid=<?php echo $cat['id']; ?>" style="text-decoration:none; color:#000000; font-size:12px">
						<B><?php  echo $cat['frm_name']?></B></a>
						<?php  //echo $cat['description']?>
						</td>
  	<?php 
		$i++;	} 
					if( DB_num_rows($query3)==2)
						echo "<td  colspan=6> </td> ";
						if( DB_num_rows($query3)==1)
						echo "<td colspan=6></td> ";?>
	 </tr>
		<?php 		}?>
	</table></fieldset></div>
	
 