<?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>
 ********************************************************************************/
if($this->ermsg !='')
		{
?>
     <div class="ml-alert-1-info m1-info-set"><div class="style-1-icon info"></div>No data found.</div>
<?php }else
{
	/* Start Performance Header Conditions */ 
	if($this->initializationdata['id']!='')
	{
		$appraisalid = $this->initializationdata['id'];
	    $step1status = 'Completed';
	}    
	else
	{
		$step1status = 'In Progress';
		$appraisalid = '';
	}
	if($this->initializationdata['manager_level_type']!='')	
		$step2status = 'Completed';
	else
		$step2status = 'In Progress';	    
	if($this->initializationdata['initialize_status'] == 1) 
		$step3status = 'Completed';
	else
		$step3status = 'In Progress';
	$currentpage = 'initstep_3';	
	$context = 'view';
	$ratingsflag = $this->ratingsflag;		
	$perf_array = array('appraisalid'=>$appraisalid,'step1status'=>$step1status,'step2status'=>$step2status,'step3status'=>$step3status,'currentpage'=>$currentpage,'context'=>$context,'ratingsflag'=>$ratingsflag);
	$this->performancesteps($perf_array);
	
	/*End Performance Steps */
	?>
 <style type="text/css">
.invfrnds_confirm{width:900px !important; height:522px !important;}
.white_content{top: 10% !important; position: fixed !important;}
</style>

<?php 
	if (count($this->messages)) {?>
	<div id="dispmsgsddept">
    <?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>
<!--<div class="cofig_title" style="padding-bottom: 0;"><span id="info_message"></span>
	<div class="new-form-ui-submit "  style="margin-top: 0px; float: right; width: auto; margin-left: 0px; margin-right: 1.9%;">
						<div class="back-to-page" style="position: relative; float: right; top: 0px;">
							<input type="button" onclick="window.location.href='<?php //echo BASE_URL; ?>appraisalinit';" name="Back" value="Back"  style="margin-right: 0px;">
						</div>
	</div>
</div>-->
<?php 
		$initializationdata = $this->initializationdata; 
		
		if($initializationdata['group_settings'] == 0)
		{
?>
		
		<div class="total-form-controller ">
			<div class="ml-alert-1-info m1-info-set-2"><div class="style-1-icon info"></div>Not yet configured.</div>              
		</div>
        </div>
<?php 
		}else if($initializationdata['group_settings'] == 1)
		{
			
			if(!empty($this->questionsArr))
				{
?>
				<form name="assignquestions" id="formid" action="" method="post" style="padding-top: 20px;" >					
			<?php 		
					sapp_PerformanceHelper::questions_privileges_view($this->questionsArr,$this->appraisalid,$this->checkArr,$this->initializationdata);
			?>
				</form>	<div class="clear"></div>
				 </div>
<?php 
				}
		}else if($initializationdata['group_settings'] == 2)
		{
					sapp_PerformanceHelper::employee_group_questions_privileges($this->groupEmployeeCountArr,$this->appraisalid,$this->initializationdata,'view');
		?>
			</div>			
<?php 	}
					
?>
<input type="hidden" id="encryptappid" name="encryptappid" value="<?php echo $this->encryptapprslid;?>" >



<script type="text/javascript" language="javascript">

$(document).ready(function()
{
	$('#initstep_3').addClass('active');
});
</script>

<?php }?>	