<?php include 'inc_classes.php'; 
include "admin_authentication.php";
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Staff Performance Report</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="bower_components/Ionicons/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
  <!-- Morris chart -->
  <link rel="stylesheet" href="bower_components/morris.js/morris.css">
  <!-- jvectormap -->
  <link rel="stylesheet" href="bower_components/jvectormap/jquery-jvectormap.css">
  <!-- Date Picker -->
  <link rel="stylesheet" href="bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="bower_components/bootstrap-daterangepicker/daterangepicker.css">
  <!-- bootstrap wysihtml5 - text editor -->
  <link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
  <!-- 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/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <!-- Google Font -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  <?php include "include/header-main.php"; ?>
  <!-- Left side column. contains the logo and sidebar -->
  <?php include "include/menu_left.php"; ?>
  <!-- Content Wrapper. Contains page content -->
    <!-- Left side column. contains the logo and sidebar -->
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Performance Report
        <!--<small>Version 2.0</small>-->
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Dashboard</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      
      <div class="row">
        <div class="col-md-12" style="display:none">
          <div class="box">
            <!--<div class="box-header with-border">
              <h3 class="box-title">Monthly Recap Report</h3>

              <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
                <div class="btn-group">
                  <button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown">
                    <i class="fa fa-wrench"></i></button>
                  <ul class="dropdown-menu" role="menu">
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Separated link</a></li>
                  </ul>
                </div>
                <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
              </div>
            </div>-->
            <!-- /.box-header -->
            <div class="box-body">
              <div class="row" >
                <div class="col-md-8">
                  <p class="text-center">
                    <strong>Sales: 1 Jan, 2014 - 30 Jul, 2014</strong>
                  </p>

                  <div class="chart">
                    <!-- Sales Chart Canvas -->
                    <canvas id="salesChart" style="height: 180px;"></canvas>
                  </div>
                  <!-- /.chart-responsive -->
                </div>
                <!-- /.col -->
                
                <!-- /.col -->
              </div>
              <!-- /.row -->
            </div>
      
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- Main row -->
      <div class="row">
        <!-- Left col -->
        <div class="col-md-12">
          <!-- TABLE: LATEST ORDERS -->
          <div class="box box-info">
          <form name="filter_form" method="get">
            <div class="box-header with-border">
              <h3 class="box-title">Performance Report</h3>
              <div class="box-tools pull-right" style="display:inline-flex">
              
                <input type="text" class="form-control" width="60%" name="from_date" placeholder="Select Date" id="datepicker">
                <input type="submit" class="btn pull-right" name="search" id="search" value="Search">
              
              </div>
            </div>
          </form>
            <!-- /.box-header -->
            <div class="box-body">
              <div class="table-responsive">
                <table class="table table-striped table-bordered no-margin" border="1px" style="border:1px solid black; border-collapse:collapse">
                  <!--<thead>
                  <tr>
                    <th>Sr. No.</th>
                    <th>Date</th>
                    <th>Punch-In</th>
                    <th>Punch-Out</th>
                    <th>Total Hours</th>
                    <th>Extra Hrs.</th>
                    <th>On Time</th>
                  </tr>
                  </thead>-->
                  <?php
				  //$enquiry_from_date = date('Y-m-d');
				  if($_REQUEST['from_date']!='')
				  {
					  $frm_date=$_REQUEST['from_date'];
					  $arr_date=explode("/",$frm_date);
					  $rep_date=$arr_date[2].'-'.$arr_date[1].'-'.$arr_date[0];
				  }
				  else
				  {
					  $rep_date = date('Y-m-d');
				  }
				  
				  //$report_date=date('Y-m-d',strtotime('-1 days'));
				  $enquiry_from_date=" and DATE(`report_date`) ='".Date('Y-m-d', strtotime('-1 day',strtotime($rep_date)))."'";
				  //$prv_month=;
				  ?>
                  <thead>
                  	<th>
                    	<td align="center"><strong>Report Date</strong></td>
                    	<td colspan="2" align="center"><strong><?php echo $rep_date; ?></strong></td>
                    </th>
                  </thead>
                  <tbody>
                    <tr class="grey_td" >
                        <td width="10%" align="center"><strong>Sr. No.</strong></td>
                        <td width="20%" align="center" colspan="2"><strong>Field Name</strong></td>
                        <?php
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            ?>
                            <td align="left"><strong><?php echo $data_couc['name']; ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Timesheet Status==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>1</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Timesheet Status</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select timesheet_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['timesheet_mark']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Utilisation==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>2</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Utilisation</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select utilisation_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['utilisation_mark']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Presence==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>3</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Presence</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select presence from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['presence']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Working Hours==========================================-->
                    <tr>
                        <td align="center" width="10"><strong>4</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Working Hours</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select working_hrs from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['working_hrs']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Task Completion==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>5</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Task Completion</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select task_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['task_mark']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    
                    <!--==============================Quality Of Work==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>6</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Quality Of Work</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select quality_work_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['quality_work_mark']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Rules Followed==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>7</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Rules Followed</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select * from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            $rules_foll=round($data_per['class_start_time_mark']+$data_per['class_end_time_r_mark']+$data_per['faculty_grooming_r_mark']+$data_per['logsheet_send_r_mark']+$data_per['mobile_used_r_mark']+$data_per['timetable_followed_r_mark']+$data_per['student_decoram_r_mark']);
                            ?>
                            <td align="left"><strong><?php echo ($rules_foll);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============  Class Start on Time =============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>A</strong></td>
                        <td align="center" width="20%"><strong>Class Start on Time</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select class_start_time_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['class_start_time_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--=================  Class End on Time =============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>B</strong></td>
                        <td align="center" width="20%"><strong>Class End on Time</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select class_end_time_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['class_end_time_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--================  Faculty Grooming ====================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>C</strong></td>
                        <td align="center" width="20"><strong>Faculty Grooming</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select faculty_grooming_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['faculty_grooming_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--============================== Logsheet Send ==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>D</strong></td>
                        <td align="center" width="20%"><strong>Logsheet Send</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select logsheet_send_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['logsheet_send_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--===================Mobile Not Used in Batch Hours============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>E</strong></td>
                        <td align="center" width="20%"><strong>Mobile Not Used in Batch Hours</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select mobile_used_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['mobile_used_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--===================  Timetable Followed ============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>F</strong></td>
                        <td align="center" width="20%"><strong>Timetable Followed</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select timetable_followed_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['timetable_followed_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--=================== Student Decoram ============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>G</strong></td>
                        <td align="center" width="20%"><strong>Student Decoram</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select student_decoram_r_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['student_decoram_r_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Phone Submited==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>8</strong></td>
                        <td align="center" width="30%" colspan="2"><strong>Phone Submited</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select phone_submited from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo $data_per['phone_submited']; ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================No. Of Negative Remark==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>9</strong></td>
                        <td align="center" width="30%" colspan="2"><strong>No. Of Negative Remark</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select negative_remarks from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['negative_remarks']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--====================== Late Login Without Info ================================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>A</strong></td>
                        <td align="center" width="20"><strong>Late Login Without Info</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select late_login_without_info_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['late_login_without_info_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--================ Absent Without Info ==========================================-->
                    <tr>
                        <td align="center" width="10"><strong></strong></td>
                        <td align="center" width="10%"><strong>B</strong></td>
                        <td align="center" width="20%"><strong>Absent Without Info</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select absent_without_info_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['absent_without_info_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--===================  Early Checkout Without Info ===========================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>C</strong></td>
                        <td align="center" width="20%"><strong>Early Checkout Without Info</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select early_checkout_info_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['early_checkout_info_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--=========================== Misconduct With Staff=======================================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>D</strong></td>
                        <td align="center" width="20%"><strong>Misconduct With Staff</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select misconduct_with_staff_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['misconduct_with_staff_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--===================Misconduct With Student===========================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>E</strong></td>
                        <td align="center" width="20%"><strong>Misconduct With Student</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select misconduct_with_student_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['misconduct_with_student_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--=================== Logsheet Not Checked============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>F</strong></td>
                        <td align="center" width="20%"><strong>Logsheet Not Checked</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select logsheet_not_checked_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['logsheet_not_checked_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--=================== Other Issue ============================-->
                    <tr>
                        <td align="center" width="10%"><strong></strong></td>
                        <td align="center" width="10%"><strong>G</strong></td>
                        <td align="center" width="20%"><strong>Other Issue</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select other_issue_mark from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['other_issue_mark']);?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Points==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>10</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Points</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select points from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['points']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Monthly Points==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>11</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Monthly Points</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select monthly_points from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo ($data_per['monthly_points']); ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                    <!--==============================Comments==========================================-->
                    <tr>
                        <td align="center" width="10%"><strong>12</strong></td>
                        <td align="center" width="20%" colspan="2"><strong>Comments</strong></td>
                        <?php
                        $tota_ld_lead='';
                        $select_counc="select * from site_setting where 1 and system_status='Enabled' and cm_id='".$_SESSION['cm_id']."' and admin_id='".$_SESSION['admin_id']."' order by admin_id asc";
                        $ptr_counc=mysql_query($select_counc);
                        $rules_foll='';
                        while($data_couc=mysql_fetch_array($ptr_counc))
                        {
                            $select_per="select comments from emp_performance_report where employee_id='".$data_couc['admin_id']."' ".$enquiry_from_date." ";
                            $ptr_per=mysql_query($select_per);
                            $data_per=mysql_fetch_array($ptr_per);
                            ?>
                            <td align="left"><strong><?php echo $data_per['comments']; ?></strong></td>
                            <?php
                        }
                        ?>
                    </tr>
                 </tbody>
               </table>
              </div>
              <!-- /.table-responsive -->
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix">
              <!--<a href="javascript:void(0)" class="btn btn-sm btn-info btn-flat pull-left">Place New Order</a>
              <a href="javascript:void(0)" class="btn btn-sm btn-default btn-flat pull-right">View All Orders</a>-->
            </div>
            <!-- /.box-footer -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
	  </div>
      
      <!--<div class="row">
        <div class="col-md-4">
          <div class="info-box bg-yellow">
            <span class="info-box-icon"><i class="ion ion-ios-pricetag-outline"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Inventory</span>
              <span class="info-box-number">5,200</span>

              <div class="progress">
                <div class="progress-bar" style="width: 50%"></div>
              </div>
              <span class="progress-description">
                    50% Increase in 30 Days
                  </span>
            </div>
          </div>
          <div class="info-box bg-green">
            <span class="info-box-icon"><i class="ion ion-ios-heart-outline"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Mentions</span>
              <span class="info-box-number">92,050</span>

              <div class="progress">
                <div class="progress-bar" style="width: 20%"></div>
              </div>
              <span class="progress-description">
                    20% Increase in 30 Days
                  </span>
            </div>
          </div>
          <div class="info-box bg-red">
            <span class="info-box-icon"><i class="ion ion-ios-cloud-download-outline"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Downloads</span>
              <span class="info-box-number">114,381</span>

              <div class="progress">
                <div class="progress-bar" style="width: 70%"></div>
              </div>
              <span class="progress-description">
                    70% Increase in 30 Days
                  </span>
            </div>
          </div>
          <div class="info-box bg-aqua">
            <span class="info-box-icon"><i class="ion-ios-chatbubble-outline"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Direct Messages</span>
              <span class="info-box-number">163,921</span>

              <div class="progress">
                <div class="progress-bar" style="width: 40%"></div>
              </div>
              <span class="progress-description">
                    40% Increase in 30 Days
                  </span>
            </div>
          </div>
          
        </div>
      </div>-->
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <?php include "include/footer-main.php"; ?>
</div>
<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- Sparkline -->
<script src="bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
<!-- date-range-picker -->
<script src="bower_components/moment/min/moment.min.js"></script>
<script src="bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- bootstrap datepicker -->
<script src="bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<!-- jvectormap  -->
<script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- SlimScroll -->
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- ChartJS -->
<script src="bower_components/chart.js/Chart.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="dist/js/pages/dashboard2.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<script>
  $(function () {
    //Initialize Select2 Elements
    //Date picker
    $('#datepicker').datepicker({
      autoclose: true,
	  format: 'dd/mm/yyyy',
	  /*startDate: '-1d',*/
	  Default: true,
	  todayHighlight: true
    })
	
  })
</script>
</body>
</html>