<? global $vis_language; 
if($domain_details==-1){   
	include(VIS_PATH_TEMPLATE.'no_record_yet.php'); 
	echo '<script> $("#view_action").hide(); $("#vis_domain_form .panel-footer").hide(); $("#vis_domain_list").hide(); $(".fullFrame").removeClass("b-t").addClass("m-t-lg m-b-lg"); </script>';
 } else { ?>
<script> $("#view_action").show(); $("#vis_domain_form .panel-footer").show(); $("#vis_domain_list").show(); </script>
<table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
   <thead class="table_head">
      <tr>
         <th>
            <div class="btn-group">
               <label class="checkbox m-n m-r-sm i-checks"  style="float: left;"><input type="checkbox"><i></i></label>		
            </div>
         </th>
         <th><? echo $vis_language['TXTTITLE']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTSUPPORTPORTALURL']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTDEFAULTEMAIL']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTDEPARTMENTS']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTDISPLAYORDER']; ?></th>
         <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
         <th></th>
      </tr>
   </thead>
   <tbody>
      <?
         if($domain_details!=-1) for($i=0;$i<$domain_info['domain_count'];$i++) {
			 if($domain_details[$i]['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}
			 echo '<tr>';?>
			 <td width="30"><label class="checkbox m-n i-checks" <? if($domain_details[$i]['domain_id']==1 ) { ?> onclick='$("#vis_global_msg_div").visInterface("load_global_message", "<? echo $vis_language['MSGCOREDOMAINSTATUS']; ?>"); return false;' <? } ?> ><input type="checkbox" name="vis_global_mass_chk_<? echo $i; ?>" id="vis_global_mass_chk_<? echo $i; ?>" value="<? echo $domain_details[$i]['domain_id']; ?>" <? if($domain_details[$i]['domain_id']==1 ) { ?>  disabled="disabled" <? } ?> /><i></i></label></td>
            <? echo '<td><a href="#/setting/domain_details/'.rawurlencode(str_replace("/"," ",$domain_details[$i]['domain_name'])).'/'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['domain_name'].'</a></td>';
             echo '<td><a href="#/setting/domain_details/'.rawurlencode(str_replace("/"," ",$domain_details[$i]['domain_name'])).'/'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['domain_url'].'</a></td>';
             echo '<td><a href="#/setting/domain_details/'.rawurlencode(str_replace("/"," ",$domain_details[$i]['domain_name'])).'/'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['default_email'].'</a></td>';
             echo '<td><a href="#/setting/domain_details/'.rawurlencode(str_replace("/"," ",$domain_details[$i]['domain_name'])).'/'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['total_department'].'</a></td>';
             echo '<td><a href="#/setting/domain_details/'.rawurlencode(str_replace("/"," ",$domain_details[$i]['domain_name'])).'/'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['display_order'].'</a></td>';
             echo '<td><span class="label '.$lbl.'">'.$status.'</span></td>'; 
             ?>
      <td align="center"><? if($domain_details[$i]['domain_id']!=1) { ?>
         <a class="text-muted" href="javascript:void(0);"  data-toggle="ajaxModal" data-modal-arguments="vis_module=setting&vis_operation=get_domain_delete&vis_domain_id=<? echo $domain_details[$i]['domain_id']; ?>&vis_static_area=vis_domain_delete_form" title="<? echo $vis_language['TXTDELETE']; ?>"><i class="vh vh-delete-round"></i></a>
         <? } ?>
      </td>
      </tr>
      <? } ?>
   </tbody>
</table>
<? } ?>
<script type="text/javascript">
   $(".selectpicker").selectpicker(); 
   $(document).ready(function() {	
   $('[data-ride="datatables"]').dataTable({		
           "bPaginate" : false,	
   		"sDom": 't', "bAutoWidth": false,
   		"aoColumns": [
   			{ "bSortable": false },
   		  	null,
   		  	null,
   		  	null,
   		  	null,
   		  	null,
   		  	null,
   			{ "bSortable": false }
   		]
   	});
   });
</script>
