<?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="dispscreeningtype" 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 } 
if($this->call != 'ajaxcall'){
?>
<div class="count_new_dis_par">
	<div  class="count_new_dis" id="all" onClick="displaycandidatedata('<?php echo sapp_Global::_encrypt(0);?>','shortlistedcandidates');"><span>All Candidates<span><br><label><?php echo $this->allcandidatescount;?></label></div>
	<div  class="count_new_dis" id="shortlisted" onClick="displaycandidatedata('<?php echo sapp_Global::_encrypt(1);?>','shortlistedcandidates');"><span>Shortlisted Candidates<span><br><label><?php echo $this->shortlistcandidatescount;?></label></div>

	<div   class="count_new_dis" id="selecetd" onClick="displaycandidatedata('<?php echo sapp_Global::_encrypt(2);?>','shortlistedcandidates');"><span>Selected Candidates<span><br><label><?php echo $this->selectedcandidatescount;?></label></div>

	<div  class="count_new_dis"  id="rejected" onClick="displaycandidatedata('<?php echo sapp_Global::_encrypt(3);?>','shortlistedcandidates');"><span>Rejected Candidates<span><br><label><?php echo $this->rejectedcandidatescount;?></label></div>

</div>
<?php 
}
?>
<div id="error_message"></div><?php 
if($this->call == 'ajaxcall'){
	$div = ''; $endDiv = ''; 
} else { 
	$div = '<div id="grid_'.$this->dataArray['objectname'].'" class="all-grid-control">'; $endDiv = '</div>';
}
	echo $div.'<div id="msg" style="display:none;font-style: oblique; font-weight: bold; color: green;""></div>'.$this->requisitiongrid($this->dataArray).$endDiv;
?>
<script type="text/javascript" language="javascript">

<?php if($this->statusidstring !=''){ ?>
      // $('#statusid').val('<?php echo $this->statusidstring; ?>');
<?php }?>
<?php if($this->statusidstring ==sapp_Global::_encrypt(3)){?>

       $('#rejected').addClass('count_new_dis_active');
<?php }?>

<?php if($this->statusidstring ==sapp_Global::_encrypt(2)){ ?>

        $('#selecetd').addClass('count_new_dis_active');
   
<?php }?>
<?php if($this->statusidstring ==sapp_Global::_encrypt(1)){ ?>

        $('#shortlisted').addClass('count_new_dis_active');
   
<?php }?>
<?php if($this->statusidstring == sapp_Global::_encrypt(0)){ ?>

        $('#all').addClass('count_new_dis_active');
   
<?php }?>
<?php if($this->statusidstring ==''){ ?>

        $('#all').addClass('count_new_dis_active');
   
<?php }?>
</script>