<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{
include 'dbc.php';

$username=$_SESSION["username"];
$current_file_name = basename($_SERVER['PHP_SELF']);
$sql = "SELECT * FROM adduser where feedisc2 = '$current_file_name' and uname = '$username'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$status=$row['feedisc3'] ;

if ($status =="")
{
echo "You are not Authorized This Page <a href='maindashboard.php'>Back </a> ";
}
else
{
include 'dbc.php';
date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		 $my=$month_name . " " . $year;
$userid=$_SESSION["userid"];
$sql = "SELECT MAX( id ) AS max FROM `teacher` where user_id='$userid';" ;
$result = $conn->query($sql);
$row = $result ->fetch_assoc();
$largestNumber = $row['max'];
$largestNumber = $largestNumber +1;

//$rows3=$result1 ->fetch_assoc();
?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

 
    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        <header id="header" class="header">

             <?php include("includes/emp_menu.php") ?>

        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="col-sm-6">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><? echo "" . $_SESSION["userid"]; ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li class="active"><? echo "" . $_SESSION["username"]; ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="content mt-3">

           


          <div class="col-lg-12">
                                                <div class="card">
                                                    <div class="card-header">
                                                        <strong>Employee Registration</strong> Form
                                                    </div>
                                                    <div class="card-body card-block">
                                                        <form action="save_tech.php" method="post" enctype="multipart/form-data" class="form-horizontal">
                                                            
                                                            <div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Employee Id</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="teacher_id" name="teacher_id" placeholder="Employee Id" class="form-control" value=" <? echo $largestNumber ?>" readonly><small class="form-text text-muted">This is a Software genrated no</small></div>
                                                            </div>
                                                            
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Session</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="sess1" name="sess1" placeholder="Year Session" class="form-control" value=" <? echo $year ?>"><small class="form-text text-muted">This is School Year Session</small><input type="text" id="month" name="month" placeholder="Year Session" class="form-control" value=" <? echo $my ?>"><small class="form-text text-muted">This is Session Month</small></div>
                                                            </div>
                                                          
                                                            <div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Joinning Date</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="adm_date" name="adm_date" placeholder="Joinning Date" class="form-control" value=" <? echo $today ?>"><small class="form-text text-muted">This is Joinning Date of Employee</small></div>
                                                            </div>
															 <div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Increament Date</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="idate" name="idate" placeholder="Increament Date" class="form-control" value=" <? echo $today ?>"><small class="form-text text-muted">This is Increament Date of Employee</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Date of Birh</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="dob" name="dob" placeholder="date of Birh" class="form-control" value=" <? echo $today ?>"><small class="form-text text-muted">This is date of Birh of Employee</small></div>
                                                            </div>
															
																
																
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Employee Name</label></div>
                                                                <div class="col-12 col-md-6"><input type="text" id="tech_name" name="tech_name" placeholder="Employee Name" class="form-control"><small class="form-text text-muted">This is Employee Name</small></div>
                                                            </div>
																
																
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Father/Husband Name</label></div>
                                                                <div class="col-12 col-md-6"><input type="text" id="father_name" name="father_name" placeholder="Father Name" class="form-control"><small class="form-text text-muted">This is Father Name</small></div>
                                                            </div>
																
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label"> Nic No</label></div>
                                                                <div class="col-12 col-md-4"><input type="text" id="nic_no" name="nic_no" placeholder=" Nic No" class="form-control"><small class="form-text text-muted">This is  Nic No</small></div>
                                                            </div>
															
															
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label"> Cell No</label></div>
                                                                <div class="col-12 col-md-4"><input type="text" id="cell_no" name="cell_no" placeholder=" Cell No" class="form-control"><small class="form-text text-muted">This is  Cell No</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label"> Employee Desg</label></div>
                                                                <div class="col-12 col-md-4"><input type="text" id="class_name" name="class_name" placeholder="Employee Desg" class="form-control"><small class="form-text text-muted">This is  Employee Desg</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                    <div class="col col-md-3"><label for="select" class=" form-control-label">Select Gender</label></div>
                                                                    <div class="col-12 col-md-4">
                                                                        <select name="camp" id="camp" class="form-control">
                                                                            <option value="0">Please select</option>
                                                                            <option value="Male">Male</option>
                                                                            <option value="Female">Female</option>
                                                                           
                                                                        </select>
                                                                    </div>
                                                                </div>
																<div class="row form-group">
                                                                    <div class="col col-md-3"><label for="select" class=" form-control-label">Select Marital Status</label></div>
                                                                    <div class="col-12 col-md-4">
                                                                        <select name="marital" id="marital" class="form-control">
                                                                            <option value="0">Please select</option>
                                                                            <option value="Married">Married</option>
                                                                            <option value="UnMarried">UnMarried</option>
                                                                           
                                                                        </select>
                                                                    </div>
                                                                </div>
																
																<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Home Address</label></div>
                                                                <div class="col-12 col-md-9"><input type="text" id="home_adress" name="home_adress" placeholder="Home Address" class="form-control"><small class="form-text text-muted">This is Home Address</small></div>
                                                            </div>
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">E-mail</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="mat" name="mat" placeholder="E-mail" class="form-control"><small class="form-text text-muted">This is E-mail</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Master Edu</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="master_edu" name="master_edu" placeholder="Master Edu" class="form-control"><small class="form-text text-muted">This is Master Edu</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Batch Edu</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="bach_edu" name="bach_edu" placeholder="Batch Edu" class="form-control"><small class="form-text text-muted">This is Batch Edu</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">F.A Edu</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="fa_edu" name="fa_edu" placeholder="F.A Edu" class="form-control"><small class="form-text text-muted">This is F.A Edu</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Computer/Other Diploma</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="computer" name="computer" placeholder="Computer Diploma" class="form-control"><small class="form-text text-muted">This is Computer Diploma</small></div>
                                                            </div>
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Account No</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="ap" name="ap" placeholder="Account No" class="form-control"><small class="form-text text-muted">This is Account No</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Bank Name</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="fp" name="fp" placeholder="Bank Name" class="form-control"><small class="form-text text-muted">This is Bank Name</small></div>
                                                            </div>
															
															<div class="row form-group">
                                                                <div class="col col-md-3"><label for="text-input" class=" form-control-label">Basic Salary</label></div>
                                                                <div class="col-12 col-md-3"><input type="text" id="monthly_salary" name="monthly_salary" placeholder="Basic Salary" class="form-control"><small class="form-text text-muted">This is Basic Salary</small></div>
                                                            </div>
															
											
                                                       
                                                    </div>
                                                    <div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i> Submit
                                                        </button>
                                                        <button type="reset" class="btn btn-danger btn-sm">
                                                            <i class="fa fa-ban"></i> Reset
                                                        </button>
                                                    </div>
													 </form>
                                                </div>
                                                
                                            </div>

            


        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}
}
?>