<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/
?>

<?php 
	
	if(!empty($this->messages)){?>
	<div class="ml-alert-1-success" id="messageData">
	<div style="display:block;"><span class="style-1-icon success"></span>
	 <?php if($this->messages[0] == 'success')
	        echo "Employee tabs configured successfully.";
		   else
             echo "Employee tabs cannot be configured.";		   
	    ?>		 
	</div>
	</div>
	<?php }?>



<?php if(empty($this->dataArray)){?>
	 <div class="ml-alert-1-info"><div class="style-1-icon info"></div>Employee Tabs are not yet set.
		<a href='<?php echo BASE_URL;?>empconfiguration/add'>Click here</a>&nbsp; to add the Employee Tabs.
	  </div>
<?php }else{?>
<div class="company-info-block">
      <div class="new_actions">
      	  <a class="edit_action_new" href='<?php echo BASE_URL;?>empconfiguration/edit/'><i class="fa fa-pencil"></i>Edit</a>
	      <p class="fltleft"><span class="sprite yes-icon-info">Configured</span><span class="sprite no-icon-info">Not Configured</span></p>
      </div>
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
<tr>
<td class="td-1" align="left" valign="top">

<?php if($this->dataArray){ 
	    $i = 1;
	    $extradiv = '';
		
		foreach($this->dataArray as $tab => $check){
			$addclass = '';
			if($i == 3 || $i == 4){
				$addclass = 'alter-div';
				if($i == 4){
					$i = 0;
				}
			}
		?>
	
		<div class="emp-info <?php echo $addclass;?>">
			<label><?php echo $tab;?> <b></b> </label>	
			<?php if($check == 'YES'){?>				
			<span><i class="sprite yes-icon"></i></span>
			<?php }else{?>
			<span><i class="sprite no-icon"></i></span>
			<?php }?>					
		</div>
	<?php  $i= $i+1;
		}
           if((count($this->dataArray)) % 2 != 0){
           	$addclass = '';
           	if($i == 3 || $i == 4){
				$addclass = 'alter-div';
           	}
			   $extradiv = "<div class='emp-info ".$addclass."'><label>&nbsp;</label><span>&nbsp;</span></div>";
		   } 
	      echo $extradiv;
}?>
   
</td>

</tr>
</table>
<?php } ?>
</div>
<script type="text/javascript">
$(document).ready(function(){
<?php if (count($this->messages)) {?>
      setTimeout(function(){
			$('#dispidentitydocument').fadeOut('slow');
		},3000);

<?php } ?>

});
</script>

