<?php
session_start();
include_once('connection.php');
if($_COOKIE["adminLogAdmin"] == ''){
	header("Location: login.php");
	exit();
}else{}


?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <meta name="description" content="" />
        <meta name="author" content="" />
        <title>Dashboard</title>
        <link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
        <link href="css/styles.css" rel="stylesheet" />
        <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>
    </head>
    <body class="sb-nav-fixed">
       <?php include('include/header.php'); ?>
        <div id="layoutSidenav">
            <?php include('include/sidebar.php'); ?>
            <div id="layoutSidenav_content">
                <main>
                    <div class="container-fluid px-4">
 

					   <h1 class="mt-4">Dashboard</h1>
                        <ol class="breadcrumb mb-4">
                            <li class="breadcrumb-item active">Dashboard</li>
							<li class="breadcrumb-item active">Upload Data</li>
                        </ol>
                        
						
					
                       



                        <div class="card mb-4">
                            <div class="card-header">
                                <i class="fas fa-table me-1"></i>
                               Upload Your File
                            </div>
                            
							<div class="card mb-4">
                            
                            <div class="card-body">
                            	<form name="the_Form" id="the_Form" action="admin.php" method="post" enctype="multipart/form-data">
                                	<div class="mb-3">
                                      <label class="form-label">Select File</label>
                                      <input type="file" name="file" id="file" onChange="preview_Image(document.the_Form.file)" />
                                    </div>
                                                                      
                                   
                                   
                                    
                                    <div class="mb-3">
                                      <button type="submit" class="btn btn-info" id="upload_file" name="upload_file">Submit</button>
                                    </div>
                                 </form>  
                                 <div id="message_sent" class="text-danger d-block mt-3">
<?php
echo $_SESSION['error_ph_upload'];
unset($_SESSION['error_ph_upload']);
?>
								 </div> 
                            </div>
                        </div>
							
							
							
                        </div>
                    </div>
                </main>
               <?php include('include/footer.php'); ?>
            </div>
        </div>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
        <script src="js/scripts.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
        <script src="js/datatables-simple-demo.js"></script>
		
		
		
    </body>
</html>
