<?php
session_start();
?>

<!DOCTYPE html>
<html>
    <head>
         <?php include("header-js.php");?>	
		
<!-----hrm-------------->		


<!--<script type="text/javascript" src="js/jquery.min.js"></script>-->
<link rel="stylesheet" href="css/styles.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/responsive.css" />
<link rel="stylesheet" href="css/simplePagination.css" />
<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.jui_pagination.css"/>
<!-- Responsive -->
<script language="javascript" src="js/css3-mediaqueries.js" type="text/javascript"></script>

<!-- /Responsive -->
<!-- Tabcontent (ORDER) -->
<link rel="stylesheet" type="text/css" href="css/tab-content.css" />	
<script type="text/javascript" src="js/jquery.jui_pagination.min.js"></script>
<script type="text/javascript" src="js/en.js"></script>
<script src="js/dateFormat.js"></script>
<script type="text/javascript" src="js/jquery.tools.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/tab-content.js"></script>
<script type="text/javascript" src="js/circular.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script src="js/jquery.form.js"></script>

<!-- FORM -->

<link rel="stylesheet" href="css/form-slide.css" type="text/css" media="screen"/>
<script type="text/javascript" src="js/sliding.form.js"></script>
<script type="text/javascript" >

$(function(){
	usertype="<?php echo $_SESSION['usertype']; ?>";
})

$('#recdate').live('click',function(){
		 $(this).datepicker({dateFormat:"dd-mm-yy"}).focus();	
	});

$('#policydate').live('click',function(){
		 $(this).datepicker({dateFormat:"dd-mm-yy"}).focus();	
	});
	
$('#formdate').live('click',function(){
		 $(this).datepicker({dateFormat:"dd-mm-yy"}).focus();	
	});
	


function costratio(){
	//alert(document.getElementById("recost").value);
	var costratio = 0;
	var recselcand = document.getElementById('recselcand').value;
	var recost = document.getElementById('recost').value;
	costratio = recost/recselcand;
	document.getElementById('recostratio').value = costratio;
	//recselcand
	//alert(myTextField);
}

function printDiv(divName) {
	
     var printContents = document.getElementById(divName).innerHTML;
	
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();
	setTimeout(function(){document.body.innerHTML = originalContents;},3000);
     
}
</script>

<!-----hrm-------------->
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>


    <body class="skin-blue"> <?php 
	include("header.php");
?>

                    <!-- Small boxes (Stat box) -->
                    <!-- Main row -->
                    <div class="row">
					<div id="wrapper">

<div class="content">
<div style="color:#666;font-size:18px;font-weight:bold;text-transform:uppercase;margin-bottom:25px;margin-top:40px;"><translate>Policies and Forms</translate></div>
<div id="form-content">
            <div id="form-wrapper">
			<div class="report-cell-02">
			
									<?php 
$sub_rights=mysql_query("select * from menu as m,menu_sub as s where  m.menu_name='Policies & Forms' and m.menu_id=s.menu_id  ");


?>		

<?php /*?><?php if($userid!=1){  while($rows=mysql_fetch_array($sub_rights)){

if($rows['s_menu_name']=='viewcirculars')
{$class='viewcirculars';$val='View Circulars';}
if($rows['s_menu_name']=='addcirculars')
{$class='addcirculars';$val='Add Circulars';}
if($rows['s_menu_name']=='viewpolices')
{$class='viewpolices';$val='View polices';}
if($rows['s_menu_name']=='addpolices')
{$class='addpolices';$val='Add polices';}
if($rows['s_menu_name']=='viewform')
{$class='viewform';$val='View Form';}
if($rows['s_menu_name']=='addforms')
{$class='addforms';$val='Add Form';}

$view_rights=mysql_fetch_array(mysql_query("select * from tbl_user_rights where user_id='$userid' and s_submenu_id='$rows[s_id]'"));
?>

<?php if($view_rights['view_right']==1){?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="<?php echo $class;?>" class="<?php echo $class;?>" style="padding-bottom: 30px !important;"><translate><?php echo $val;?></translate></li>
</ul>
<?php }?>


<?php } }else{?><?php  }?><?php */?>

<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="viewcirculars" class="viewcirculars" style="padding-bottom: 30px !important;"><translate>View Circulars</translate></li>
</ul>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addcirculars" class="addcirculars" style="padding-bottom: 30px !important;"><translate>Add Circulars</translate></li>
</ul>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="viewpolices" class="viewpolices" style="padding-bottom: 30px !important;"><translate>View polices</translate></li>
</ul>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addpolices" class="addpolices" style="padding-bottom: 30px !important;"><translate>Add polices</translate></li>
</ul>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="viewform" class="viewform" style="padding-bottom: 30px !important;"><translate>View Form</translate></li>
</ul>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addforms" class="addforms" style="padding-bottom: 30px !important;"><translate>Add Form</translate></li>
</ul>




<?php /*?><?php
if($_SESSION['usertype'] != 'Subadmin')
{	
?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addcirculars" class="addcirculars" style="padding-bottom: 30px !important;"><translate>Add Circulars</translate></li>
</ul>
<?php } ?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="viewpolices" class="viewpolices" style="padding-bottom: 30px !important;"><translate>View polices</translate></li>
</ul>
<?php
if($_SESSION['usertype'] != 'Subadmin')
{	
?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addpolices" class="addpolices" style="padding-bottom: 30px !important;"><translate>Add polices</translate></li>
</ul>
<?php } ?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="viewform" class="viewform" style="padding-bottom: 30px !important;"><translate>View Form</translate></li>
</ul>
<?php
if($_SESSION['usertype'] != 'Subadmin')
{	
?>
<ul class="payroll-menu" style="margin-bottom:0px !important; ">
<li data-page="addforms" class="addforms" style="padding-bottom: 30px !important;"><translate>Add Form</translate></li>
</ul>
<?php } ?><?php */?>






<div id="tabletabheadlist">
    <!--<label><input type="button" value="Employee" class="btn-tab-01" /></label>
    <label><input type="button" value="Owner" class="btn-tab-01"/></label>
    <label><input type="button" value="Manager" class="btn-tab-01" /></label>-->
</div>

<div class="clear-float"></div>
<div class="report-cell-03" id="circulardiv" style="display:none;">

<form class="pdtcircularSearchForm">
<label><input type="text" placeholder="From date" name="from_date" id="prd_addate" style="width:100px;"/></label>
<label><input type="text" placeholder="To date" name="to_date" id="toaddate" style="width:100px;" /></label>



</form>

<label><input type="button" value="Search" id="searchcircularPdt" class="searchcircularPdt" style="width:70px;" />
</label>
<div class="clear-float"></div>
</div>
</div>
<div class="addpolicy" style="display:none;">
                <div id="steps">
			
									<?php 
$sub_rights_p=mysql_fetch_array(mysql_query("select * from menu as m,menu_sub as s where  m.menu_name='Policies & Forms' and s.s_menu_name='addpolices' and m.menu_id=s.menu_id "));

$sub_rights_sub_p=mysql_fetch_array(mysql_query("select * from tbl_user_rights where  s_submenu_id='$sub_rights_p[s_id]' and user_id='$userid' and m_menu_id='$sub_rights_p[menu_id]' "));

?>	

				
                     <form method="post" enctype="multipart/form-data" id="policyform" name="policyform" onSubmit="return false;" action="" >
<!-- Recruitment ////////////////////////////////////////////////////////////////////// -->		
<?php if($_SESSION['usertype']=='Superadmin' || $_SESSION['branchadmin']=='Y'){ ?>		         
                        <fieldset class="step">
                            <legend><translate>Policies</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="policytitle" id="policytitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>policy Date</translate></label>
                               <input type="text" name="policydate" id="policydate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="policyfileupload" name="policyfileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
                          
							<p class="submit">
									<button id="policysubmit" class="policysubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
<?php } else {?>
				
<?php if($sub_rights_sub_p['add_right']==1){?>	
<fieldset class="step">
                            <legend><translate>Policies</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="policytitle" id="policytitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>policy Date</translate></label>
                               <input type="text" name="policydate" id="policydate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="policyfileupload" name="policyfileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
                          
							<p class="submit">
									<button id="policysubmit" class="policysubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
<?php } else {?>
          <fieldset class="step">
				         <p>
             <font color="#FF0000" size="4"><b>Sorry, You Do Not Have Enough Permission To View This Form</b></font>
                            </p>
                         </fieldset>

<?php   } } ?>					
						
                    </form>
                </div>
				</div>
                <div class="addcircular" style="display:none;">
				
							<?php 
$sub_rights=mysql_fetch_array(mysql_query("select * from menu as m,menu_sub as s where  m.menu_name='Policies & Forms' and s.s_menu_name='addcirculars' and m.menu_id=s.menu_id "));

$sub_rights_sub=mysql_fetch_array(mysql_query("select * from tbl_user_rights where  s_submenu_id='$sub_rights[s_id]' and user_id='$userid' and m_menu_id='$sub_rights[menu_id]' "));

?>
				
                <div id="steps">
				
                     <form method="post" enctype="multipart/form-data" id="circularform" name="circularform" onSubmit="return false;" action="" >
<!-- Recruitment ////////////////////////////////////////////////////////////////////// -->		


<?php 
if($_SESSION['usertype']=='Superadmin' || $_SESSION['branchadmin']=='Y')
{
?>
				         
                        <fieldset class="step">
                            <legend><translate>Circulars</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="circulartitle" id="circulartitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>Circular Date</translate></label>
                               <input type="text" name="circulardate" id="circulardate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="fileupload" name="fileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            
                            <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
							<p class="submit">
									<button id="circularsubmit" class="circularsubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
						
				<?php } else {?>
				
				
				  <?php if($sub_rights_sub['view_right']==1){?>
				
				               <fieldset class="step">
                            <legend><translate>Circulars</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="circulartitle" id="circulartitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>Circular Date</translate></label>
                               <input type="text" name="circulardate" id="circulardate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="fileupload" name="fileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            
                            <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
							<p class="submit">
									<button id="circularsubmit" class="circularsubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
				<?php } else {?>
				         <fieldset class="step">
				         <p>
             <font color="#FF0000" size="4"><b>Sorry, You Do Not Have Enough Permission To View This Form</b></font>
                            </p>
                         </fieldset>
				
				<?php   } } ?>
						
                    </form>
                </div>
				</div>
                
                <div class="addform" style="display:none;">
                <div id="steps">
				
	<?php 
$sub_rights_f=mysql_fetch_array(mysql_query("select * from menu as m,menu_sub as s where  m.menu_name='Policies & Forms' and s.s_menu_name='addforms' and m.menu_id=s.menu_id "));

$sub_rights_sub_f=mysql_fetch_array(mysql_query("select * from tbl_user_rights where  s_submenu_id='$sub_rights_f[s_id]' and user_id='$userid' and m_menu_id='$sub_rights_f[menu_id]' "));

?>
				
                     <form method="post" enctype="multipart/form-data" id="add_form" name="add_form" onSubmit="return false;" action="" >
<!-- Recruitment ////////////////////////////////////////////////////////////////////// -->		
<?php if($_SESSION['usertype']=='Superadmin' || $_SESSION['branchadmin']=='Y'){ ?>	         
                        <fieldset class="step">
                            <legend><translate>Form</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="formtitle" id="formtitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>Form Date</translate></label>
                               <input type="text" name="formdate" id="formdate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="formfileupload" name="formfileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            
                             <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
							<p class="submit">
									<button id="formsubmit" class="formsubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
<?php } else {?>
				
<?php if($sub_rights_sub_f['view_right']==1){?>
 <fieldset class="step">
                            <legend><translate>Form</translate></legend>
                            
                            
							<!--<p class="heading01">Reference</p>-->
                            <p>
                               <label for="Title"><translate>Title</translate></label>
                               <input type="text" name="formtitle" id="formtitle"   />
                               
                              
                            </p>
							
                            <p>
                                <label for="Date"><translate>Form Date</translate></label>
                               <input type="text" name="formdate" id="formdate"  AUTOCOMPLETE=OFF />
                            </p>
							
                            <p>
                                <label for="username"><translate>Upload File</translate></label>
                               <input type="file" id="formfileupload" name="formfileupload"  value="" placeholder="Input Value" /><a id="resumelist"></a> </p>                             
                            
                             <div class="page-p" >
							<div class="progressbox" id="progressbox" style="display:none;">
							<div class="progressbar" id="progressbar"></div ><div class="statustxt" id="statustxt">0%</div></div>
							<div id="output"></div>
							</div>
							<p class="submit">
									<button id="formsubmit" class="formsubmit" type="button" ><translate>Finish</translate></button>
								</p>
                        </fieldset>
<?php } else {?>
     <fieldset class="step">
  <p>
  <font color="#FF0000" size="4"><b>Sorry, You Do Not Have Enough Permission To View This Form</b></font>
    </p>
  </fieldset>
				
<?php   } } ?>						
                    </form>
                </div>
				</div>
                
                <div class="musteroll" id="musteroll" style="display:block;">
                <div id="steps">
				
                     
                </div>
				</div>
                
        <div id="tablelist"></div>  
		      
            </div>
			<div class="pagination-holder clearfix"align="center" >
			<div id="light-pagination" style="width:500px"  class="pagination light-theme simple-pagination"></div>
			</div><!-- /content -->  
  
 </div>
    <!--<div class="employee-col-02 recruitmentGrid"></div>-->




<div class="footer">
<strong>© add-HRM</strong><br />
<span>Developed by <a href="http://www.aadhocc.com" target="_blank">Aadhocc</a></span></div><!-- /footer -->
</div>
</div>
					
					
                    </div><!-- /.row (main row) -->

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- add new calendar event modal -->


        <!-- jQuery 2.0.2 -->

        <!-- Bootstrap -->
       <?php 
	include("footer-js.php");
?>
		
		<!--<script type="text/javascript" src="js/showpath.js" language="javascript"></script>-->
	
		<!--------------scripts for employee list-------------->

	<!--------------scripts for employee list-------------->
    </body>
</html>