<?php
session_start();

?>

<?php 
include'dbcon.php';
	$query=mysqli_query($conn,"select * from tbl_excel where numinscription ='$_SESSION[password]'")or die(mysqli_error($conn));
	 while($row=mysqli_fetch_array($query)){
						
						
						
							?>
<html>
<title>Inscription- Université du burundi</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
<link href="logoubvilus.JPG" rel="shortcut icon">
<?php
date_default_timezone_set("Asia/Calcutta");
//echo date_default_timezone_get();
?>


<?php
include'dbcon.php';
if(isset($_POST['submit'])!=""){
  $name=$_FILES['diploma']['name'];
  $size=$_FILES['diploma']['size'];
  $type=$_FILES['diploma']['type'];
  $temp=$_FILES['diploma']['tmp_name'];
  
  
  $name1=$_FILES['identite']['name'];
  $size=$_FILES['identite']['size'];
  $type=$_FILES['identite']['type'];
  $temp1=$_FILES['identite']['tmp_name'];
  
   $name2=$_FILES['casierJud']['name'];
  $size=$_FILES['casierJud']['size'];
  $type=$_FILES['casierJud']['type'];
  $temp2=$_FILES['casierJud']['tmp_name'];
  
  $name3=$_FILES['extraitNaic']['name'];
  $size=$_FILES['extraitNaic']['size'];
  $type=$_FILES['extraitNaic']['type'];
  $temp3=$_FILES['extraitNaic']['tmp_name'];
  
   $name4=$_FILES['bonneCond']['name'];
  $size=$_FILES['bonneCond']['size'];
  $type=$_FILES['bonneCond']['type'];
  $temp4=$_FILES['bonneCond']['tmp_name'];
  
  $name5=$_FILES['photopass']['name'];
  $size=$_FILES['photopass']['size'];
  $type=$_FILES['photopass']['type'];
  $temp5=$_FILES['photopass']['tmp_name'];
  
  $name6=$_FILES['recupaie']['name'];
  $size=$_FILES['recupaie']['size'];
  $type=$_FILES['recupaie']['type'];
  $temp6=$_FILES['recupaie']['tmp_name'];
  
  $name7=$_FILES['cvs']['name'];
  $size=$_FILES['cvs']['size'];
  $type=$_FILES['cvs']['type'];
  $temp7=$_FILES['cvs']['tmp_name'];
  
   
  
  $date = date('Y-m-d H:i:s');
  $no=$_POST['nometud'];
  $pre=$_POST['prenometud'];
    $num=$_POST['numeroInscription'];
  
  
  move_uploaded_file($temp,"files/".$name);
  move_uploaded_file($temp1,"files/".$name1);
   move_uploaded_file($temp2,"files/".$name2);
  move_uploaded_file($temp3,"files/".$name3);
   move_uploaded_file($temp4,"files/".$name4);
  move_uploaded_file($temp5,"files/".$name5);
   move_uploaded_file($temp6,"files/".$name6);
    move_uploaded_file($temp7,"files/".$name7);

$query = mysqli_query($conn,"select * from upload where numeroInscription='$num'")or die(mysqli_error());
$count = mysqli_num_rows($query);

if ($count > 0){ 

?>
<script>
alert("Désolé!!! Vous ne pouvez pas deposer vos document deux fois.Merci.")  
window.location = "editfile.php";
</script>
<?php
}else{

$query=$conn->query("INSERT INTO upload (nometud,prenometud,numeroInscription,diplome,identiteComplete,casierJudiciaire,extraitActeNaissance,bonneConduite,photopassport,recupaiement,cv,date) VALUES ('$no','$pre','$num','$name','$name1','$name2','$name3','$name4','$name5','$name6','$name7','$date')");
?>
<script>
alert("Vous etez bien téléchargé vos documents.Université du Burundi vous souhaite le Bienvenu Merci.")  
window.location = "documents.php";
</script>

<?php
}
}

 ?>




<html>
<body>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="screen">
<link rel="stylesheet" type="text/css" href="css/DT_bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"/>
</head>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>

<script type="text/javascript" charset="utf-8" language="javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8" language="javascript" src="js/DT_bootstrap.js"></script>
<?php include('dbcon.php'); ?>
<style>
.table tr th{
	
	border:#eee 1px solid;
	
	position:relative;
	#font-family:"Times New Roman", Times, serif;
	font-size:12px;

	}
	table tr td{
	
	border:#eee 1px solid;

	position:relative;
	#font-family:"Times New Roman", Times, serif;
	font-size:12px;
	
	
	}
	
#wb_Form1
{

   border: 0px #000 solid;
  
}
#photo
{
   border: 1px #A9A9A9 solid;
  

   font-family:Arial;
   font-size: 20px;
}

.alert {
 
   background-color: GREEN;
  
}
.col-xs-12{
 
  margin-left:40px;
  
}

.btn btn-danger{
 
  margin-left:40px;
  
}

.al{
 
background-color:#e8f9f9;
  
}

.dec{
 
float:right;
  
}

	</style>
	
	<div class="alert alert-info">
                              
                               
								&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;  <I><FONT SIZE=4><strong><font color='white'>UNIVERSITE DU BURUNDI 'RUMURI'</font></strong></FONT></I>
                           
						      <p class='dec'> 

                             
                       <a  href="../logout.php" title="Déconnexion">
                         
                            <font color='white'>    <strong> <?php echo $row['nom']; ?> <?php echo $row['prenom']; ?>,    Déconnexion       </strong></font></a>
                   
                 
                         


							  </p>

						   </div>
						   
						   
							
							 <div class="container-fluid" style="margin-top:3vh !important;min-height:75vh">
                <div class="container" style="max-width:80%">
</div>                <div class="alert al alert-info">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><strong><font color='blue'><center><?php echo $row['nom']; ?> <?php echo $row['prenom']; ?>,&nbsp;&nbsp;Bienvenue au formulaire d'inscription à l'Université du Burundi</center></font></strong> 
     
</div>
							     <div class="panel-body pb-2">
								 
						<form enctype="multipart/form-data"  action="" id="wb_Form1" name="form" method="post">
						
					<input type="hidden" name="prenometud" id="photo"  value="<?php echo $row['prenom']; ?>" required="required"> 
					<input type="hidden" name="nometud" id="photo"  value="<?php echo $row['nom']; ?>" required="required">
					<input type="hidden" name="numeroInscription" id="photo"  value="<?php echo $row['numinscription']; ?>" required="required">
				<div class="row">
					
					
					 
					
					
					<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Télécharger le diplome d'Etat ou l'attestation d'équivalence</label>
                        		
					<input type="file" name="diploma" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
				    </br>
                    <div class="form-group">
                        <label class="control-label">Télécharger l'identité Complète</label>
                        		
				<input type="file" name="identite" id="photo"  required="required">
                    </div>
                </div>
					
					
					<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
					 </br>
                    <div class="form-group">
                        <label class="control-label">Télécharger le Casier Judiciaire </label>
                        		
					<input type="file" name="casierJud" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
				  </br>  </br>
                    <div class="form-group">
                        <label class="control-label">Télécharge l'extrait d'acte de naissance</label>
                        		
				<input type="file" name="extraitNaic" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
					 </br>
                    <div class="form-group">
                        <label class="control-label">Télécharger l'attestation de bonne conduite vie Moeurs </label>
                        		
					<input type="file" name="bonneCond" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
				  </br>  </br>
                    <div class="form-group">
                        <label class="control-label">Télécharge le photo passport recupaie</label>
                        		
				<input type="file" name="photopass" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Télécharge le Reçu de paiement</label>
                        		
				<input type="file" name="recupaie" id="photo"  required="required">
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Télécharge le Curriculum vitae </label>
                   <input type="hidden" name="MAX_FILE_SIZE" value="1048576">       		
				<input type="file" name="cvs" id="photo"  required="required">
                    </div>
                </div>
					
				    </div>	
					&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <input type="submit" class="btn btn-danger" value="téléchargez" name="submit">
			</form> 
			      </center>
				     <?php  } ?>
							 <div class="col-md-18">
	<div class="container-fluid" style="margin-top:0px;">
   <?php 
include'dbcon.php';
	$query=mysqli_query($conn,"select * from upload where numeroInscription ='$_SESSION[password]'")or die(mysqli_error($conn));
	 while($row=mysqli_fetch_array($query)){
						    $name=$row['diplome'];
							$name1=$row['identiteComplete'];
							$name2=$row['casierJudiciaire'];
							$name3=$row['extraitActeNaissance'];
							$name4=$row['bonneConduite'];
							$name5=$row['photopassport'];
							$name6=$row['recupaiement'];
							$name7=$row['cv'];
							
						
							?> 
         
	  
	 
     <ol> <li><a href="download.php?filename=<?php echo $name;?>" title="click to download"><?php echo $row['diplome'] ?> </a> 	&nbsp;&nbsp;	&nbsp;&nbsp;	&nbsp;&nbsp;<a href="editfile.php?numeroInscription=<?php echo $row['numeroInscription'] ?>"><font color='green'>Modifier<a/><a/></li> <hr/>
	<li><a href="download.php?filename=<?php echo $name1;?>" title="click to download"><?php echo $row['identiteComplete'] ?> </a></li> <hr/>
	<li><a href="download.php?filename=<?php echo $name2;?>" title="click to download"><?php echo $row['casierJudiciaire'] ?> </a> </li> <hr/>
	<li><a href="download.php?filename=<?php echo $name3;?>" title="click to download"><?php echo $row['extraitActeNaissance'] ?> </a></li> <hr/>
	<li><a href="download.php?filename=<?php echo $name4;?>" title="click to download"><?php echo $row['bonneConduite'] ?> </a> </li> <hr/>
	<li><a href="download.php?filename=<?php echo $name5;?>" title="click to download"><?php echo $row['photopassport'] ?> </a></li> <hr/>
	<li><a href="download.php?filename=<?php echo $name6;?>" title="click to download"><?php echo $row['recupaiement'] ?> </a> </li> <hr/>
	<li><a href="download.php?filename=<?php echo $name7;?>" title="click to download"><?php echo $row['cv'] ?> </a></li>  </ol><hr/>
  


	
	
	
	
	
	
	             <?php  } ?>
	 </br>  </br>	 </br>	 </br>	 </br> </br>	 </br>
   <div class = "row">
		<div class="panel panel-default">
			<div class="panel-body">
			<div class="table-responsive">
       <table cellpadding="0" cellspacing="0" border="0" class="table table-condensed" id="example">
                            
                           

                         
						 
                          
                        </table>
					<form id="formulaire method="post" action="form_fin.php" enctype="multipart/form-data" onsubmit="return validate(this);">
 
<label for="document">Choisir un fichier <span>*</span> <i>(maximum 1 mo) :</i></label>
                            <input type="hidden" name="MAX_FILE_SIZE" value="1048576">
                            <input type="file" name="document1" id="document1" required><br><br>
 
<label for="document2">Choisir un fichier <i>(maximum 1 mo) :</i></label>
                            <input type="hidden" name="MAX_FILE_SIZE" value="1048576">
                            <input type="file" name="document2" id="document2" ><br><br>
 
<label for="document3">Choisir un fichier <i>(maximum 1 mo) :</i></label>
                            <input type="hidden" name="MAX_FILE_SIZE" value="1048576">
                            <input type="file" name="document3" id="document3" ><br><br>	
						
						
						
                              
                               
								
                            </div>
          
</form>

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

      

</body>
</html>


