<?php
session_start();

include("../includes/config.php");


$S_ID = $_SESSION['S_Log'];


if (!$_SESSION['S_Log'])
echo '<script language="JavaScript">
 document.location="../Staff_Login.php";
</script>';






?>
<!DOCTYPE html>
<html>

<head>


    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>SHEELD | Staff Area</title>

   <link href="../css/bootstrap.min.css" rel="stylesheet">
	    <link href="../css/plugins/bootstrap/bootstrap.min.css" rel="stylesheet">

    <link href="../font-awesome/css/font-awesome.css" rel="stylesheet">
	    <link href="../css/plugins/dataTables/datatables.min.css" rel="stylesheet">


    <!-- Toastr style -->
    <link href="../css/plugins/toastr/toastr.min.css" rel="stylesheet">

    <!-- Gritter -->
    <link href="../js/plugins/gritter/jquery.gritter.css" rel="stylesheet">

    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css" rel="stylesheet">
    <link rel="shortcut icon" href="../img/icon.ico"/>
	
	<style>
@font-face {
   font-family: myFirstFont;
   src: url(../fonts/NotoKufiArabic-Regular.ttf);
   font-size:8px;
}
body {
   font-family: myFirstFont;
}

</style>

</head>

<body style="back">
    <div id="wrapper">
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav metismenu" id="side-menu">
                     <li class="nav-header" style="background-color:#fff">
                        <div class="dropdown profile-element"> <span>
                            <center><img alt="image"  src="../img/icon.png" style="border-radius: 10%;" width="70%"/></center>
                             </span>
							 

                       
                           
                           
                        </div>
                        <div class="logo-element" style="color:#000">
                            SHEELD
                        </div>
						
							
                    </li>
                    <li class="">
                        <a href="index.php"><i class="fa fa-th-large"></i> <span class="nav-label">Home</span></a>

                    </li>
					
					
					
			
							<li class="active">
                        <a href="#"><i class="fa fa-users"></i> <span class="nav-label">Drivers Recharges</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level collapse">

                            <li><a href="Add_New_Driver_Recharge.php">Add New Driver Recharge</a></li>
                            <li><a href="View_Driver_Recharges_List.php">View Driver Recharges List</a></li>

                        </ul>
						</li>
					


                </ul>

            </div>
        </nav>

        <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>

        </div>
            <ul class="nav navbar-top-links navbar-right">
                <li>
                    <span class="m-r-sm text-muted welcome-message">Welcome To SHEELD - Staff Portal</span>
                </li>
                <li class="dropdown">

                    <ul class="dropdown-menu dropdown-messages">


                        <li class="divider"></li>


                    </ul>
                </li>



                <li>
                    <a href="Logout.php">
                        <i class="fa fa-sign-out"></i> Logout
                    </a>
                </li>

            </ul>

        </nav>
        </div>
            
        <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>Drivers Recharges					
					
					
					</h2>
                   
                </div>
                <div class="col-lg-2">

                </div>
            </div>
            
 <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>View Drivers List Information</h5>
                        <div class="ibox-tools">
                            
                          
                           
                        </div>
                    </div>
                   
                        
                        
                        
                        
                          <div class="ibox-content">

                  
                     <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover dataTables-example" >
                    <thead>
                    <tr>
                            <th>Name</th>
                            <th>Gender</th>
                            <th>Phone Number</th>
                            <th>Email Address</th>
                            <th>Photo</th>
                            <th>Driving Licence ID</th>
                            <th>Car Licence ID</th>
                            <th>Lack Of Judgment File</th>
                            <th>Car Plate Number</th>
                            <th>Car Type</th>
                            <th>Car Color</th>
                            <th>Avalability Status</th>
							<th>Accept Private Trips Status</th>
							<th>Accept Private Trips Gender Status</th>
                            <th>Total Rates</th>
                            <th>Penalty Balance</th>
                            <th>Credit Balance</th>
                            <th>Total Need Balance</th>
                            <th>Phone Type</th>
                            <th>Status</th>
                            <th>Add Date / Time</th>

                        <th>Actions</th>
                      
                    </tr>
                    </thead>
                    <tbody>
                    <?php
					$sql1 = mysqli_query($dbConn,"select * from drivers order by ID DESC");
					while ($row1 = mysqli_fetch_array($sql1)){
						
						$D_ID = $row1['ID'];
						$Name = $row1['Name'];
						$Gender = $row1['Gender'];
						$Phone_Number = $row1['Phone_Number'];
						$Email_Address = $row1['Email_Address'];
						$Photo = $row1['Photo'];
						$Driver_licence_ID = $row1['Driver_licence_ID'];
						$Car_Licence_ID = $row1['Car_Licence_ID'];
						$Lack_Of_Judgment_File = $row1['Lack_Of_Judgment_File'];
						$Car_Plat_Number = $row1['Car_Plat_Number'];
						$Car_Type = $row1['Car_Type'];
						$Car_Color = $row1['Car_Color'];
						$Avalability_Status = $row1['Avalability_Status'];
						$Accept_Private_Trips_Status = $row1['Accept_Private_Trips_Status'];
						$Accept_Private_Trips_Gender_Status = $row1['Accept_Private_Trips_Gender_Status'];
						$Total_Rates = $row1['Total_Rates'];	
						$Penalty_Balance = $row1['Penalty_Balance'];
						$Credit_Balance = $row1['Credit_Balance'];
						$Total_Need_Balance = $row1['Total_Need_Balance'];
						$Phone_Type = $row1['Phone_Type'];
						$Status = $row1['Status'];
						$Add_Date_Time = $row1['Add_Date_Time'];
						
				
						
						

		


					?>
                    <tr class="grade" >

                          <td><?php echo $Name; ?></td>
                          <td><?php echo $Gender; ?></td>
                          <td><?php echo $Phone_Number; ?></td>
                          <td><?php echo $Email_Address; ?></td>
                          <td><img src="../../App/Drivers_App/EN/Drivers/<?php echo $Photo; ?>" width="100%"/></td>
                          <td><img src="<?php echo $Driver_licence_ID; ?>" width="50%"/></td>
                          <td><img src="<?php echo $Car_Licence_ID; ?>" width="50%"/></td>
                          <td><img src="<?php echo $Lack_Of_Judgment_File; ?>" width="50%"/></td>
                          <td><?php echo $Car_Plat_Number; ?></td>
                          <td><?php echo $Car_Type; ?></td>
                          <td><?php echo $Car_Color; ?></td>
                          <td><?php echo $Avalability_Status; ?></td>
                          <td><?php echo $Accept_Private_Trips_Status; ?></td>
                          <td><?php echo $Accept_Private_Trips_Gender_Status; ?></td>
                          <td>
						  
						  
						    <?php
				  
				  for ($i=1; $i<=$Total_Rates; $i++){
					  
					  
					  echo '<img width="10" height="10" src="../img/star.png"/>';
					  
					  
					  
				  }
				  
				  ?>
						  
						  
						  </td>
						  
                          <td><?php echo $Penalty_Balance; ?></td>
                          <td><?php echo $Credit_Balance; ?></td>
                          <td><?php echo $Total_Need_Balance; ?></td>
                          <td><?php echo $Phone_Type; ?></td>
                          <td><?php echo $Status; ?></td>
                          <td><?php echo $Add_Date_Time; ?></td>
                         
                      
                     
 <td><center>
 

 

 

 <a href="JavaScript:if(confirm('Are You Sure To Select This Driver ?')==true)
{window.location='Add_New_Driver_Recharge_2.php?D_ID=<?php echo $D_ID; ?>';}" class="btn btn-primary btn-sm" role="button">Add New Driver Recharge</a>


 
 
 </center></td>                     
                                       
 </tr>
                    
                    <?php
					}
					?>
                    
                    </tbody>
                    
                    </table>
                        </div>   
                  
                  
                   
                  
                  
              
                        </div>
                        
                        
                        
                        
                        
                        
                        
                        
                        
                    </div>
                </div>
               </div></div>
                <div class="footer">
                   
                    <div>
                         <center><strong>SHEELD © <?php echo date("Y"); ?>. All Rights Reserved.</center>

                    </div>
                </div>
            </div>
        </div>

        </div>
       



        </div>
    </div>

     <script src="../js/jquery-2.1.1.js"></script>
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="../js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Flot -->
    <script src="../js/plugins/flot/jquery.flot.js"></script>
    <script src="../js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="../js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="../js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="../js/plugins/flot/jquery.flot.pie.js"></script>

    <!-- Peity -->
    <script src="../js/plugins/peity/jquery.peity.min.js"></script>
    <script src="../js/demo/peity-demo.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="../js/inspinia.js"></script>
    <script src="../js/plugins/pace/pace.min.js"></script>

    <!-- jQuery UI -->
    <script src="../js/plugins/jquery-ui/jquery-ui.min.js"></script>

    <!-- GITTER -->
    <script src="../js/plugins/gritter/jquery.gritter.min.js"></script>

    <!-- Sparkline -->
    <script src="../js/plugins/sparkline/jquery.sparkline.min.js"></script>

    <!-- Sparkline demo data  -->
    <script src="../js/demo/sparkline-demo.js"></script>

    <!-- ChartJS-->
    <script src="../js/plugins/chartJs/Chart.min.js"></script>

    <!-- Toastr -->
    <script src="../js/plugins/toastr/toastr.min.js"></script>


      
    <script src="../js/plugins/jeditable/jquery.jeditable.js"></script>

    <script src="../js/plugins/dataTables/datatables.min.js"></script>
    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function(){
            $('.dataTables-example').DataTable({
                dom: '<"html5buttons"B>lTfgitp',
                buttons: [
                   
 
 /*                   {extend: 'excel', title: 'ExampleFile'},
                    {extend: 'pdf', title: 'ExampleFile'},

                    {extend: 'print',
                     customize: function (win){
                            $(win.document.body).addClass('white-bg');
                            $(win.document.body).css('font-size', '10px');

                            $(win.document.body).find('table')
                                    .addClass('compact')
                                    .css('font-size', 'inherit');
                    }
                    }    */
                   
                ]

            });

            /* Init DataTables */
            var oTable = $('#editable').DataTable();

            /* Apply the jEditable handlers to the table */
            oTable.$('td').editable( '../example_ajax.php', {
                "callback": function( sValue, y ) {
                    var aPos = oTable.fnGetPosition( this );
                    oTable.fnUpdate( sValue, aPos[0], aPos[1] );
                },
                "submitdata": function ( value, settings ) {
                    return {
                        "row_id": this.parentNode.getAttribute('id'),
                        "column": oTable.fnGetPosition( this )[2]
                    };
                },

                "width": "90%",
                "height": "100%"
            } );


        });

        function fnClickAddRow() {
            $('#editable').dataTable().fnAddData( [
                "Custom row",
                "New row",
                "New row",
                "New row",
                "New row" ] );

        }
    </script>
</body>
</html>
