<div class="web-booking-main" id="gridbody">
            <div class="clear"></div>
   			
    <?php echo $headerpanel;?>        
    
    <?php echo $pagingTop;?>        
    
               <br class="clear" />

               <div class="grid-list-subtitle-bg" style="margin-top:10px;">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="3%" align="left" valign="top" class="grid-td-left"><input name="chkall" id="chkall" type="checkbox" onclick="checkall('chkgrow')"  /></td>
                       <td width="6%" align="left" valign="top" class="grid-td-top">&nbsp;</td>
                      
                      <td width="26%" align="left" valign="top" class="grid-td-top"><a href="javascript:;" onclick="SendGridBindRequest('<?=$settingsObj->urlwithoutsort?>&orderby=var_themename&sorting=Y','gridbody','ST')">Theme Name
                      <?=$setsortimgvar_themename?></a></td>
                      
                      <td width="19%" align="left" valign="top" class="grid-td-top">Positions</td>
                      <td width="26%" align="left" valign="top" class="grid-td-top">Default</td>
                    </tr>
                  </table>
            </div>

            <div class="information-white-bg" id="dvpersonalinformation" >
            <div class="clear"></div>

    <div class="grid-list-inner-table-text">
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
              
     <?php
	      while($row1=$configObj->glDbObj->fetch_array($result1)) 
		  {
			$olddefault=$row1['int_glcode'];
		  }
	        
		 if($numofrows > 0)
		 {
			$rowcount = 0;
			while($row=$configObj->glDbObj->fetch_array($result)) 
			{
				$clsname = ($row['chr_read'] == 'N')?"grid-list-inner-table-text-active":"grid-list-inner-table-text";	// For read unread class
				$clsname = 'grid-list-inner-table-text-active';
				
				$starimg = ($row['chr_star'] == 'Y')?"gstar.png":"gstar-disable.png"; // Displaying the stat and unstart image
				
				$sql = "select p.var_positionname from ".DB_PREFIX."positions p,".DB_PREFIX."themes_positions th where th.fk_positions=p.int_glcode and th.fk_themes =".$row['int_glcode'];
				
				$themeposition = $configObj->glDbObj->query($sql);

		 ?>
       	  <tr id="gtr-<?=$row['int_glcode']?>"  style="background-color: transparent;"  class="<?=$clsname?>" onmouseover="this.style.backgroundColor='#f6f6f6'" onmouseout="this.style.backgroundColor='transparent'" >
                               
          <td width="3%" align="left" valign="top" class="grid-td-left"><input name="chkgrow" id="chkgrow" type="checkbox" value="<?php echo $row['int_glcode']?>" /></td>
          
          <td width="6%" align="center" valign="top" class="grid-left1"><img id="star-<?=$row['int_glcode']?>" height="16" width="16" alt="remember me" title="remember me" src="<?=GLOBAL_ADMIN_IMAGES_PATH?><?=$starimg?>" style="vertical-align:middle;cursor:pointer;"onclick="UpdateStar('<?=DB_PREFIX ?>themes','chr_star','<?=$row['int_glcode']?>');"></td>
           
          <td width="26%" align="left" valign="top" class="grid-td-top"><span><?=$row['var_themename']?></span></td>

          
          <td width="19%" align="left" valign="top" class="grid-td-top">
          <table border="0" cellpadding="3" cellspacing="3" align="left">
          <?
		  while ($themeposition1 = $configObj->glDbObj->fetch_array($themeposition))
			{
		?>
           <tr>
           <td><?=$themeposition1['var_positionname'] ?></td>
           </tr>
        		
		<?		
			}
		  
          ?>
          </table>
          </td>
           <td width="25%" align="left" valign="middle" class="grid-td-top">
          
            <?php if($row['chr_publish']=='Y') {
			
			 ?>
            <img src="<?=GLOBAL_ADMIN_IMAGES_PATH?>/tick.png" alt="Tick" width="16" height="16" border="0" />
            <?php } else { ?>
            <a href="#">
            <img src="<?=GLOBAL_ADMIN_IMAGES_PATH?>/tick_cross.png" alt="Tick" width="16" height="16" border="0" onclick="SendGridBindRequest('<?=$settingsObj->urlwithpara?>&defaultflag=<?=$row['chr_publish']?>&newdefaultid=<?=$row['int_glcode']?>&olddefaultid=<?=$olddefault?>','gridbody','DEFAULT')"  />
            </a>
            <? } ?>
           </td>       
          
          
        </tr>
                
        <?php  $rowcount++;
			} 
		 }
		 else
		 {
		?>
             <tr style="background-color: transparent;"  class="<?=$clsname?>" onmouseover="this.style.backgroundColor='#f6f6f6'" onmouseout="this.style.backgroundColor='transparent'"> 
                <td height="25" align="center" valign="middle" colspan="6" class="form_titles">Sorry! No records are available.</td>
             </tr>
		<?
		 }
		?>
			<input type="hidden" name="ptrecords" id="ptrecords" value="<?=$rowcount?>">
	  </table>
      </div>
  </div>
<div class="clear"></div>
            
       	   <?php echo $pagingBottom;?>  
        
       	    <?php /*?><div class="add-new-user-button"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image47','','<?=GLOBAL_ADMIN_IMAGES_PATH?>delete-button-hover.jpg',0)"><img src="<?=GLOBAL_ADMIN_IMAGES_PATH?>delete-button.jpg" alt="Delete" name="Image47" width="80" height="25" border="0" id="Image47" /></a></div><?php */?>
</div>