cnsImport.php 2.75 KB
Newer Older
Hamza Arfaoui's avatar
Hamza Arfaoui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
<?php
session_start();
if(!isset($_SESSION['auth'])){
	header("location:index.php");
}
if($_SESSION['profil']!=100 && !in_array("add_all_users",$_SESSION['permissions']) && !in_array("add_agence_users",$_SESSION['permissions'])) {
	header("location:dashboard.php");
}
require_once("../inc/confNetisse.php");

?>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><?php echo $PROJECT_TITLE;?> : Import Conseillers</title>
	<link rel="stylesheet" type="text/css" href="css/cans/jquery-ui-1.8.17.custom.css" />
	<link rel="stylesheet" href="css/font-awesome.min.css" />
	<link rel="stylesheet" type="text/css" href="css/cadif.css" />
	<link rel="stylesheet" type="text/css" href="css/dashboard.css" />
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
	<script type="text/javascript">
		function checkForm() {
			if (document.getElementById("cnsImport").files.length == 0) {
				var POP = $('<div></div>').html("<center>Vous devez sélectionner un fichier Excel.</center>").dialog({autoOpen: false,title: 'Erreur'});
				POP.dialog({autoOpen:false, modal:true, draggable: false, width:360,close:function(ev, ui){} });
				POP.dialog("open");
				return false;
			} else {
				document.formCnsImport.submit();
			}
		}
	</script>
</head>


<body>

<div id="global">

	<div id="home">
		<div id="logo"><a href="dashboard.php"><img src="<?php echo $SERVER;?>assets/img/logo.png" height="110" border="0"/></a></div>
		<div id="username">
			<b><?php echo isset($_SESSION["nom"]) ? $_SESSION["nom"] : $_SESSION["matricule"];?></b> &nbsp; | &nbsp; <a href="close.php" class="link" title="Fermer et clore votre session">D&#233;connexion</a>
			<br/>
		</div>
	</div>
	<div id="panels">
	  <?php include "menu.php";?>
	  <div class="main-content">
			<div id="title">
				Importer les conseillers
			</div>
			<div id="form">
			<form name="formCnsImport" id="formCnsImport" action="do.php" method="post" enctype="multipart/form-data">
				<input type="hidden" name="act" value="cnsImport"/>
				<table align="center" class="form">
					<tr>
						<td colspan="3" style="padding-bottom: 30px;font-size: 14px;">
							<a href="../uploads/imports/model_import_conseillers.xlsx" download>Cliquez ici pour télécharger le modèle de fichier Excel d'import et voir le format requis</a>
						</td>
					</tr>
					<tr>
					<td>Séléctionner un fichier Excel :</td>
					<td><input type="file" name="cnsImport" id="cnsImport" /></td>
					<td><input type="button" class="formAct" name="valider" id="valider" value="Valider" onclick="checkForm();" tabindex="10"/></td>
					</tr>
				</table>
			</form>
			</div>
		</div>
	</div>

</div>

<?php include 'footer.php';?>

</body>

</html>