<?php
	include "db_connection/db_connection.php";
	include "config/config.php";
	
	if($_SESSION['admin_login_id'] == '')
	{
		echo "<script>window.location='index.php';</script>";
	}
	$check_acc  = check_access('4');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?php echo $PROJECT_TITLE ?></title>

<script type="text/javascript" src="js/employee_add_JS.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<!--[if IE]> <link href="css/ie.css" rel="stylesheet" type="text/css"> <![endif]-->

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<script type="text/javascript" src="js/plugins/forms/ui.spinner.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.mousewheel.js"></script>
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript" src="js/plugins/charts/excanvas.min.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.orderBars.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.pie.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.resize.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.sparkline.min.js"></script>

<script type="text/javascript" src="js/plugins/tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.sortable.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.resizable.js"></script>

<script type="text/javascript" src="js/plugins/forms/autogrowtextarea.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.uniform.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.inputlimiter.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.autotab.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.chosen.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.dualListBox.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.cleditor.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.ibutton.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine.js"></script>

<script type="text/javascript" src="js/plugins/uploader/plupload.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html4.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html5.js"></script>
<script type="text/javascript" src="js/plugins/uploader/jquery.plupload.queue.js"></script>

<script type="text/javascript" src="js/plugins/wizards/jquery.form.wizard.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.validate.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.form.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.collapsible.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.breadcrumbs.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.tipsy.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.progress.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.colorpicker.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fileTree.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.sourcerer.js"></script>

<script type="text/javascript" src="js/plugins/others/jquery.fullcalendar.js"></script>
<script type="text/javascript" src="js/plugins/others/jquery.elfinder.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.easytabs.min.js"></script>
<script type="text/javascript" src="js/files/bootstrap.js"></script>
<script type="text/javascript" src="js/files/functions.js"></script>

<!-- Shared on MafiaShare.net  --><!-- Shared on MafiaShare.net  --></head>

<body onload="document.getElementById('listpage').focus();">

<!-- Top line begins -->
<?php include "header_footer/header.php"; ?>
<!-- Top line ends -->


<!-- Sidebar begins -->
<?php include "menus/left_menu.php"; ?>
<!-- Sidebar ends -->



<!-- Content begins -->
<div id="content">
    <!--<div class="contentTop">
        <span class="pageTitle"><span class="icon-key-2"></span>Form validation engines</span>
        <ul class="quickStats">
            <li>
                <a href="" class="blueImg"><img src="images/icons/quickstats/plus.png" alt="" /></a>
                <div class="floatR"><strong class="blue">5489</strong><span>visits</span></div>
            </li>
            <li>
                <a href="" class="redImg"><img src="images/icons/quickstats/user.png" alt="" /></a>
                <div class="floatR"><strong class="blue">4658</strong><span>users</span></div>
            </li>
            <li>
                <a href="" class="greenImg"><img src="images/icons/quickstats/money.png" alt="" /></a>
                <div class="floatR"><strong class="blue">1289</strong><span>orders</span></div>
            </li>
        </ul>
        <div class="clear"></div>
    </div>-->
    <?php include "menus/top_menu.php"; ?> 
    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href="home.php">Dashboard</a></li>
				 <li><a href="party_list.php">Registration</a></li>
                <li><a href="javascript:;">Employee</a></li>
            </ul>
        </div>        
        <?php include "menus/top_left_menu.php"; ?>  
    </div>
    
    <!-- Main content -->
    <div class="wrapper">
	<?php if($check_acc==1){?>
        <ul class="middleNavR">
            <!--<li><a href="#" title="Add an article" class="tipN"><img src="images/icons/middlenav/create.png" alt="" /></a></li>
            <li><a href="#" title="Upload files" class="tipN"><img src="images/icons/middlenav/upload.png" alt="" /></a></li>
            <li><a href="#" title="Add something" class="tipN"><img src="images/icons/middlenav/add.png" alt="" /></a></li>
            <li><a href="#" title="Messages" class="tipN"><img src="images/icons/middlenav/dialogs.png" alt="" /></a><strong>8</strong></li>-->
            <li><a href="employee_list.php" title="List Employee" id="listpage" class="tipN"><img src="images/icons/middlenav/stats.png" alt="" /></a></li>
        </ul>
    	<?php
		$page_id= base64_encode(base64_encode(base64_encode(1))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for add		 
					 
		?>

        <div class="fluid"><!--style="width:600px; margin-left:150px;"-->
            <form id="validate" name="fm" class="main" method="post" action="bl/employee_BL.php?page_id=<?php echo $page_id; ?>" enctype="multipart/form-data">
                <fieldset>
				
				<div class="widget">
                        <div class="whead"><h6>Employee Add</h6><div class="clear"></div></div>
						<div style="border: #949494 solid 1px; ">
                        <div class="formRow">
                            <div class="grid2"><label>Select Department:<span class="req">*</span></label></div>
                            <div id="dept_name_div" class="grid4 searchDrop">
                                <select data-placeholder="Choose the Department.." multiple="multiple" class="select" name="dept_name[]"  id="dept_name" style="width:350px;" onfocus="foc(this.id)" onblur="stnon(this.id)" />
                                    <option value=""></option>
                                    <?php
									$SLCT = "SELECT  * FROM master_dept ORDER BY master_dept_id ASC";
									//echo $SLCT;
									$QURY = mysqli_query($connect,$SLCT);
									while($FTCH = mysqli_fetch_object($QURY))
									{
									?>
                                    <option value="<?php echo $FTCH->master_dept_id ?>"><?php echo $FTCH->master_dept_name ?></option>
                                    <?php
									}
									?>
                                        
                                </select>
                            </div>
                            
                            <div class="grid2"><label>Employee Name:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" name="e_name" id="e_name" onblur="check_ajax(this.value);" onkeyup="check_ajax(this.value);"/></div><div class="grid2" id="lod" style="padding-top:10px;"></div>
                            <div class="clear"></div>
                        </div>
                        
                    	<!--<div class="formRow">
                            </div><div class="clear"></div>
                        </div>-->
                        
                        <div class="formRow">
                        <div class="grid2"><label>Date of Birth:<span class="req">*</span></label></div>
                        <div class="grid4"><input type="text" name="dob" id="dob" class="datepicker" /></div>
                        
                        <div class="grid2"><label>Blood Group:<span class="req"></span></label></div>
                        <div class="grid2"><input type="text" name="bg" id="bg"  /></div>
                        
                        <div class="clear"></div>
                    	</div>
                        
                        <div class="formRow">
                            <div class="grid2"><label>Mobile No 1:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" maxlength="10" onkeypress="return isNumberKey(event)"  name="mob1" id="mob1"/></div>
                            
                            <div class="grid2"><label>Mobile No 2:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class="" maxlength="10" onkeypress="return isNumberKey(event)"  name="mob2" id="mob2"/></div>
                            
                            <div class="clear"></div>
                        </div>
						 <div class="formRow">							
                            <div class="grid2"><label>Email ID:<span class="req"></span></label></div>
                            <div class="grid4"><input type="email" class="" name="e_id" id="e_id"/></div><div class="clear"></div>
                        </div>  
						</div>
						<div style="border: #949494 solid 1px; ">
						<div class="formRow">
                            <div class="grid2"><label>Contact Person Name:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" name="per_nm" id="per_nm"/></div>
                            
                            <div class="grid2"><label>Contact Person Mob:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" maxlength="10" onkeypress="return isNumberKey(event)"  name="mob3" id="mob3"/></div>
                            
                            <div class="clear"></div>
                        </div>
                        
                        <div class="formRow">
							<div class="grid2"><label>Relationship:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" name="relan" id="relan"/></div>
							 <div class="clear"></div>
                        </div>                        
                        </div>                      
                         <!--<div class="formRow">
                            <div class="grid3"><label>Address:<span class="req">*</span></label></div>
                            <div class="grid6"><textarea rows="6" cols="" name="add" id="add"></textarea> </div>
                            <div class="clear"></div>
                        </div>-->
                        
                         <div class="formRow">
                            <div class="grid2"><label>Perminant Address:<span class="req">*</span></label></div>
                            <div class="grid4"><textarea rows="6" cols="" name="of_add" id="of_add"></textarea> </div>
                            
                            <div class="grid2"><label>Recidential Address:<span class="req">*</span></label> <br/><br/>
							<input type="button" class="buttonM bDefault ml10"  value="&nbsp;&gt;&nbsp;&gt;&nbsp;" title="Click for Copy" tabindex="0" onclick="copy_addr();" />
                            </div>
                            
                            <div class="grid4"><textarea rows="6" cols="" name="co_add" id="co_add"></textarea> </div>
                            
                            <div class="clear"></div>
                        </div>
						
						
						<div class="formRow">
                            <div class="grid2"><label>Bank Name:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class=""  name="bnk_name" id="bnk_name"/></div>
                            
                            <div class="grid2"><label>Branch Name:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class="" name="brn_name" id="brn_name"/></div>
                            
                            <div class="clear"></div>
                        </div>
						
						
						<div class="formRow">
                            <div class="grid2"><label>Ac/ Holder Name:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class=""  name="ach_name" id="ach_name"/></div>
                            
                            <div class="grid2"><label>Ac / No:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class="" name="acno" id="acno"/></div>
                            
                            <div class="clear"></div>
                        </div>
						
						
						<div class="formRow">
                            <div class="grid2"><label>IFSC Code:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class=""  name="ifsc" id="ifsc"/></div>
                                                    
                            
                            <div class="clear"></div>
                        </div>
						
						<div class="formRow">
                            <div class="grid2"><label>Resume:<span class="req"></span></label></div>
							<div class="grid4" id="resume_div">
                                <input type="file" class="fileInput" id="resume" name="resume" onfocus="foc(this.id)" onblur="stnon(this.id)"/>
                            </div>
                            
                            <div class="grid2"><label>Remarks:<span class="req"></span></label></div>
                            <div class="grid4"><input type="text" class="" name="remak" id="remak"/></div>
                            <div class="clear"></div>
                        </div>
						
						
						<div style="border: #949494 solid 1px; ">
						 <div class="formRow" >
                            <div class="grid2" style="margin-top:6px;"><label>From Date:<span class="req"></span></label></div>
							<div class="grid4" style="margin-left:-50px;">
                               <input type="text" name="fmd" id="fmd" class="datepicker" />
                            </div>
                            
                            <div class="grid2" style="width:100px; margin-left:-100px; margin-top:6px;"><label>To Date:<span class="req"></span></label></div>
                            <div class="grid4" style="margin-left:-50px;"><input type="text" name="tod" id="tod" class="datepicker" /></div>
							
							<div class="grid2" style="width:100px; margin-left:-50px; margin-top:6px;"><label>Salary:<span class="req"></span></label></div>
                            <div class="grid4" style="margin-left:-50px;"><input type="text" name="sal_amt" id="sal_amt" style="width:100px; text-align:right;" /></div>
							<div class="clear"></div>
                        </div>
						<div class="formRow">
                           	<div class="grid2" style="margin-top:6px;"><label>Remarks:<span class="req"></span></label></div>
                            <div class="grid4" style="margin-left:-50px;"><input type="text" class="" name="rem" id="rem" style="width:200px;"/></div>
                          
                          	
                            <div class="clear"></div>
                        </div>
						</div>
					</div>
					<div class="widget">
						<div class="whead"><h6>Category Cost</h6><div class="clear"></div></div>
						<div id="dyn" class="hiddenpars">
							<a href="javascript:0" id="searchlink" onfocus="foc(this.id)" onblur="stnon(this.id)" class="tOptions" title="Options"><img src="images/icons/options.png" alt="" /></a>
							<div style="max-height:400px; overflow-y:auto;">
								<table cellpadding="0" cellspacing="0" width="100%" class="dTable check" id="checkAll">
									<thead>
										<tr>    
											<th width="10%">S.No<span class="sorting" style="display: block;"></span></th>
											<th width="30%">Points</th>
											<th width="30%">From Date </th>
											<th width="30%">Time</th> 
										</tr>
									</thead>
									<tbody> 
									<?php
										$SLCT = "SELECT master_cad_cat_id,cad_cat_name,cat_hrs FROM master_cad_cat WHERE statu_s = 'active' ORDER BY cad_cat_name ASC";
										$QURY = mysqli_query($connect,$SLCT);
										$loop=1;
										if(mysqli_num_rows($QURY)>0)
										{			
											while($FTCH = mysqli_fetch_object($QURY))
											{
												if($loop%2 != "0")
												$bg = "gradeX";
												else
												$bg = "class='gradeC'";
									?>

												<tr <?php echo $bg ?>>
													<td align="center"><?php echo $loop ?><input name="cat_id[<?php echo $loop ?>]" id="cat_id<?php echo $loop ?>" type="hidden" value="<?php echo $FTCH->master_cad_cat_id ?>" /></td>
													<td align="center"><?php echo $FTCH->cad_cat_name; ?></td>
													<td align="center"><input type="text" class="datepicker" name="fmdate[<?php echo $loop ?>]" id="fmdate<?php echo $loop ?>" style="width:250px"/></td>
													<td align="center"><input type="text" name="cost_vl[<?php echo $loop ?>]" id="cost_vl<?php echo $loop ?>" value="<?php echo $FTCH->cat_hrs; ?>" class="mas_weit_tx"/></td>
												</tr>

									<?php
												$loop ++;

											}
										}
										if($loop==1)
										{ 
									?>
											<tr><td colspan="12" align="center"><div class="nNote nFailure"><p>Oops Sorry No Data Found...</p></div></td></tr>
									<?php 
										} 
									?>
									</tbody>                           
								</table> 
							</div>
						</div>
					</div>
					<input name="tot_cn" id="tot_cn" type="hidden" value="<?php echo $loop ?>" />
					<div class="widget">
	                    <div class="formRow">
	                    <input type="button" value="Submit" class="buttonM bBlack formSubmit" onclick="fom_validate();" style="float: right; margin-left:20px;"/>
	                    <input type="button" value="Reset" class="buttonM bRed" style="float: right; margin-left:20px;" onclick="form_rest();"/>                        
	                    <div class="clear"></div></div>
	                    <div class="clear"></div>
                    </div>
                </fieldset>
            </form>
        
            <form id="usualValidate" class="main" method="post" action="">
                <fieldset>
                </fieldset>
            </form>
        </div>
		<?php } else {  echo ACCESS_MSG;} ?>
    </div>
</div>
<!-- Content ends -->    
        
</body>
</html>