<?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 (count($this->messages)) {?>
	<div id="dispidentitydocument" class="settingssuccess">
		<?php 
			foreach ($this->messages as $message)
			{
				$flag = array();				
				$flag = array_keys($message);
				echo "<div id='messageData' class='ml-alert-1-$flag[0]'><div style='display:block;'><span class='style-1-icon $flag[0]'></span>";
				echo $message[$flag[0]];
				echo "</div></div>";
			} 
		?>
	</div>	
	
<?php } ?>
<span id="error_message"></span>



<?php if(empty($this->dataArray)){?>
	 <div class="ml-alert-1-info m1-info-set"><div class="style-1-icon info"></div>Identity documents are not yet set.
		<a href='<?php echo BASE_URL;?>identitydocuments/add'>Click here</a>&nbsp; to add the identity documents.
	  </div>
<?php }else{?>
<div class="company-info-block">
      <div class="edit-btn"><a href='<?php echo BASE_URL;?>identitydocuments/edit/id/1'>Edit</a></div>
<table cellpadding="0" cellspacing="0" width="100%" border="0" >
<tr>
<td class="td-1" align="left" valign="top">
    <div class="site-info">
	      <label>Passport 
		      <b>:</b>
		  </label>
		  <?php if($this->dataArray[0]['passport'] == 1){?>
		        <span>Yes</span>
		  <?php }else{?>
                <span>No</span>	
          <?php }?>				
	</div>
    <div class="site-info alter-div">
	      <label>SSN
		      <b>:</b>
		  </label>
		  <?php if($this->dataArray[0]['ssn'] == 1){?>
		        <span>Yes</span>
		  <?php }else{?>
                <span>No</span>	
          <?php }?>	
    </div>
	<div class="site-info">
	      <label>Aadhar 
		      <b>:</b>
		  </label>
		  <?php if($this->dataArray[0]['aadhaar'] == 1){?>
		        <span>Yes</span>
		  <?php }else{?>
                <span>No</span>	
          <?php }?>	
	</div>
    <div class="site-info alter-div">
	      <label>Pancard 
		      <b>:</b>
		  </label>
		 <?php if($this->dataArray[0]['pancard'] == 1){?>
		        <span>Yes</span>
		  <?php }else{?>
                <span>No</span>	
          <?php }?>	
		
    </div>
	<div class="site-info">
	      <label>Driving License
		      <b>:</b>
		  </label>
		  <?php if($this->dataArray[0]['drivinglicense'] == 1){?>
		        <span>Yes</span>
		  <?php }else{?>
                <span>No</span>	
          <?php }?>	
	</div>
	
	
	 <?php if(isset($this->dataArray[0]['others']) && $this->dataArray[0]['others'] !=''){?>
     <div class="site-info alter-div">
	        <label><?php echo $this->dataArray[0]['others'];?>
		      <b>:</b>
		  </label>
		    <span>Yes</span>
                </div> 
	 <?php }?>
   
</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>

