<?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)){
						
						
						
							?>
                        

<!doctype html>
<html lang="en">

<!-- Mirrored from admissions.mu.ac.ke/ssp/register by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 28 Jun 2023 12:33:52 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="A4ZbzBd2H2KhywWjI8v5kjoQiULtD2nJ6gPLmmvc">
            <meta name="description" content="Online Application Portal for Moi University">
        <title>Inscription- Université du burundi </title>
    <!-- Scripts -->
    <script src="../js/app.js" defer></script>
	<script src="../../ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <!-- Fonts -->
    <link rel="dns-prefetch" href="http://fonts.gstatic.com/">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
    <!-- Styles -->
    <link href="../css/app.css" rel="stylesheet">
    <link href="../css/custom.css" rel="stylesheet">
    <link href="../css/all.min.css" rel="stylesheet">
    <link rel="icon" href="../logub.PNG">
	
	<style>
	
.bg-theme-color1{

background-color:#922B21;
color:white;
}


 </style>
        </head>
<body>
    <div id="app">
                    <nav class="navbar navbar-expand-md navbar-light bg-theme-color shadow-sm fixed-top p-0">
    <div class="container">
        <!-- Branding Image -->
        <I><FONT SIZE=6><strong>UNIVERSITE DU BURUNDI 'RUMURI'</strong></FONT></I>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <!-- Left Side Of Navbar -->
            <ul class="navbar-nav mr-auto">

            </ul>
            <!-- Right Side Of Navbar -->
            <ul class="navbar-nav ml-auto">
                <!-- Authentication Links -->
                
                    <li class="nav-item">
                        <a class="nav-link " href="../logout.php" title="Déconnexion">
                            <span class="d-none d-md-block d-lg-none"><i class="fas fa-sign-in-alt"></i> </span>
                            <span class="d-md-none d-lg-block"><?php echo $row['nom']; ?> <?php echo $row['prenom']; ?>,    Déconnexion</span>
                        </a>
                    </li>
                            </ul>
        </div>
    </div>
</nav>
            <div class="container-fluid" style="margin-top:12vh !important;min-height:75vh">
                <div class="container" style="max-width:75%">
</div>                <div class="alert 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 border-theme-color customPanel">
    <div class="panel-heading bg-theme-color1 text-center">
        Vos informations 
    </div>
    <div class="panel-body pb-2">
        <form action=""  method="POST">
                
			
			
			<div class="row">
                <!--Email-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Nom </label>
                        <input type="text"class="form-control "  value="<?php echo $row['nom']; ?>" readonly required>
                    </div>
                </div>
                <!--surname-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Prénom</label>
                        <input type="text"class="form-control "   value="<?php echo $row['prenom']; ?>" readonly required>
                    </div>
                </div>
                <!--other_names-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Direction Provinciale de l'Enseignement (DPE)</label>
                        <input type="text"class="form-control "  value="<?php echo $row['dpe']; ?>" readonly required>
                    </div>
                </div>
                <!--gender-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Direction Communale de l'Enseignement (DCE)</label>
                        <input type="text"class="form-control "   value="<?php echo $row['dce']; ?>" readonly required>
                    </div>
                </div>
                <!--dob-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Ecole d'origine</label>
                        <input type="text"class="form-control "   value="<?php echo $row['ecole']; ?>" readonly required>
                    </div>
                </div>
                <!--Nationality-->
               <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Section fréquentée</label>
                        <input type="text"class="form-control "   value="<?php echo $row['section']; ?>" readonly required>
                    </div>
                </div>
                <!--id_number-->
               <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Numéro d'inscription</label>
                        <input type="text"class="form-control "   value="<?php echo $row['numinscription']; ?>" readonly required>
                    </div>
                </div>
                <!--passport_no-->
                 <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Sexe</label>
                        <input type="text"class="form-control "   value="<?php echo $row['sexe']; ?>" readonly 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">Notes total obtenus</label>
                        <input type="text"class="form-control "  value="<?php echo $row['total']; ?>" readonly 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">Notes en pourcentage obtenus</label>
                        <input type="text"class="form-control "   value="<?php echo $row['notes']; ?>" readonly required>
                    </div>
                </div>
                <!--birtCertificateNo-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Edition</label>
                        <input type="text"class="form-control "   value="<?php echo $row['edition']; ?>" readonly required>
                    </div>
                </div>
                <!--phone number-->
              
				
				 </br> </br>
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column">
                    <div class="form-group">
                        <label class="control-label">Numero d'ordre</label>
                        <input type="text"class="form-control " name="phone_number" placeholder="e.g 0712345678" value="<?php echo $row['numero']; ?>" readonly required>
                    </div>
                </div>
            </div><!--/row-biodata-->
			
			
			  <h4><center> Etape 2 : <font color='blue'><strong> Completer les informations suivantes</strong></font></center></h4>
	       <input type="hidden"class="form-control "name='nom'  value="<?php echo $row['nom']; ?>" readonly required>
			 <input type="hidden"class="form-control "name='prenom'  value="<?php echo $row['prenom']; ?>" readonly required>
			  <input type="hidden"class="form-control "name='genre'  value="<?php echo $row['sexe']; ?>" readonly required>
	        <input type="hidden"class="form-control "name='dpe'  value="<?php echo $row['dpe']; ?>" readonly required>
			 <input type="hidden"class="form-control "name='dce'  value="<?php echo $row['dce']; ?>" readonly required>
			  <input type="hidden"class="form-control "name='anneeAcademique'  value="2022-2023" readonly required>
			   <input type="hidden"class="form-control "name='numero_inscription' value="<?php echo $row['numinscription']; ?>" readonly required>
            
			<div class="row">
			
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column" id="password">
                    <div class="form-group">
                         <label class="control-label">Votre nationalité <font color='red'>*</font></label>
						
                         <select type="text"class="form-control "name='nationalite' required>
<option value=''>Selection votre nationalite</option>
<option>Algeria (+213)</option>
<option>Andorra (+376)</option>
<option>Angola (+244)</option>
<option>Anguilla (+1264)</option>
<option>Antigua &amp; Barbuda (+1268)</option>
<option>Argentina (+54)</option>
<option>Armenia (+374)</option>
<option>Aruba (+297)</option>
<option>Australia (+61)</option>
<option>Austria (+43)</option>
<option>Azerbaijan (+994)</option>
<option>Bahamas (+1242)</option>
<option>Bahrain (+973)</option>
<option>Bangladesh (+880)</option>
<option>Barbados (+1246)</option>
<option>Belarus (+375)</option>
<option>Belgium (+32)</option>
<option>Belize (+501)</option>
<option>Benin (+229)</option>
<option>Bermuda (+1441)</option>
<option>Bhutan (+975)</option>
<option>Bolivia (+591)</option>
<option>Bosnia Herzegovina (+387)</option>
<option>Botswana (+267)</option>
<option>Brazil (+55)</option>
<option>Brunei (+673)</option>
<option>Bulgaria (+359)</option>
<option>Burkina Faso (+226)</option>
<option>Burundi (+257)</option>
<option>Cambodia (+855)</option>
<option>Cameroon (+237)</option>
<option>Canada (+1)</option>
<option>Cape Verde Islands (+238)</option>
<option>Cayman Islands (+1345)</option>
<option>Central African Republic (+236)</option>
<option>Chile (+56)</option>
<option>China (+86)</option>
<option>Colombia (+57)</option>
<option>Comoros (+269)</option>
<option>Congo (+242)</option>
<option>Cook Islands (+682)</option>
<option>Costa Rica (+506)</option>
<option>Croatia (+385)</option>
<option>Cuba (+53)</option>
<option>Cyprus North (+90392)</option>
<option>Cyprus South (+357)</option>
<option>Czech Republic (+42)</option>
<option>Denmark (+45)</option>
<option>Djibouti (+253)</option>
<option>Dominica (+1809)</option>
<option>Dominican Republic (+1809)</option>
<option>Ecuador (+593)</option>
<option>Egypt (+20)</option>
<option>El Salvador (+503)</option>
<option>Equatorial Guinea (+240)</option>
<option>Eritrea (+291)</option>
<option>Estonia (+372)</option>
<option>Ethiopia (+251)</option>
<option>Falkland Islands (+500)</option>
<option>Faroe Islands (+298)</option>
<option>Fiji (+679)</option>
<option>Finland (+358)</option>
<option>France (+33)</option>
<option>French Guiana (+594)</option>
<option>French Polynesia (+689)</option>
<option>Gabon (+241)</option>
<option>Gambia (+220)</option>
<option>Georgia (+7880)</option>
<option>Germany (+49)</option>
<option>Ghana (+233)</option>
<option>Gibraltar (+350)</option>
<option>Greece (+30)</option>
<option>Greenland (+299)</option>
<option>Grenada (+1473)</option>
<option>Guadeloupe (+590)</option>
<option>Guam (+671)</option>
<option>Guatemala (+502)</option>
<option>Guinea (+224)</option>
<option>Guinea - Bissau (+245)</option>
<option>Guyana (+592)</option>
<option>Haiti (+509)</option>
<option>Honduras (+504)</option>
<option>Hong Kong (+852)</option>
<option>Hungary (+36)</option>
<option>Iceland (+354)</option>
<option>India (+91)</option>
<option>Indonesia (+62)</option>
<option>Iran (+98)</option>
<option>Iraq (+964)</option>
<option>Ireland (+353)</option>
<option>Israel (+972)</option>
<option>Italy (+39)</option>
<option>Jamaica (+1876)</option>
<option>Japan (+81)</option>
<option>Jordan (+962)</option>
<option>Kazakhstan (+7)</option>
<option>Kenya (+254)</option>
<option>Kiribati (+686)</option>
<option>Korea North (+850)</option>
<option>Korea South (+82)</option>
<option>Kuwait (+965)</option>
<option>Kyrgyzstan (+996)</option>
<option>Laos (+856)</option>
<option>Latvia (+371)</option>
<option>Lebanon (+961)</option>
<option>Lesotho (+266)</option>
<option>Liberia (+231)</option>
<option>Libya (+218)</option>
<option>Liechtenstein (+417)</option>
<option>Lithuania (+370)</option>
<option>Luxembourg (+352)</option>
<option>Macao (+853)</option>
    <option>Macedonia (+389)</option>
<option>Madagascar (+261)</option>
<option>Malawi (+265)</option>
<option>Malaysia (+60)</option>
<option>Maldives (+960)</option>
<option>Mali (+223)</option>
<option>Malta (+356)</option>
<option>Marshall Islands (+692)</option>
<option>Martinique (+596)</option>
<option>Mauritania (+222)</option>
<option>Mayotte (+269)</option>
<option>Mexico (+52)</option>
<option>Micronesia (+691)</option>
<option>Moldova (+373)</option>
<option>Monaco (+377)</option>
<option>Mongolia (+976)</option>
<option>Montserrat (+1664)</option>
<option>Morocco (+212)</option>
<option>Mozambique (+258)</option>
<option>>Myanmar (+95)</option>
<option>Namibia (+264)</option>
<option>Nauru (+674)</option>
<option>Nepal (+977)</option>
<option>Netherlands (+31)</option>
<option>New Caledonia (+687)</option>
<option>New Zealand (+64)</option>
<option>Nicaragua (+505)</option>
<option>Niger (+227)</option>
    <option>Nigeria (+234)</option>
<option>Niue (+683)</option>
<option>Norfolk Islands (+672)</option>
<option>Northern Marianas (+670)</option>
<option>Norway (+47)</option>
<option>Oman (+968)</option>
<option>Palau (+680)</option>
<option>Panama (+507)</option>
<option>Papua New Guinea (+675)</option>
<option>Paraguay (+595)</option>
<option>Peru (+51)</option>
<option>Philippines (+63)</option>
<option>Poland (+48)</option>
<option>Portugal (+351)</option>
<option>Puerto Rico (+1787)</option>
<option>Qatar (+974)</option>
<option>Reunion (+262)</option>
<option>Romania (+40)</option>
<option>Russia (+7)</option>
<option>Rwanda (+250)</option>
<option>San Marino (+378)</option>
<option>Sao Tome &amp; Principe (+239)</option>
<option>Saudi Arabia (+966)</option>
<option>Senegal (+221)</option>
<option>Serbia (+381)</option>
<option>Seychelles (+248)</option>
<option>Sierra Leone (+232)</option>
<option>Singapore (+65)</option>
<option>Slovak Republic (+421)</option>
<option>Slovenia (+386)</option>
<option>Solomon Islands (+677)</option>
<option>Somalia (+252)</option>
<option>South Africa (+27)</option>
<option>Spain (+34)</option>
<option>Sri Lanka (+94)</option>
<option>St. Helena (+290)</option>
<option>St. Kitts (+1869)</option>
<option>St. Lucia (+1758)</option>
<option>Sudan (+249)</option>
<option>Suriname (+597)</option>
<option>Swaziland (+268)</option>
<option>Sweden (+46)</option>
<option>Switzerland (+41)</option>
<option>Syria (+963)</option>
<option>Taiwan (+886)</option>
<option>Tajikstan (+7)</option>
<option>Thailand (+66)</option>
<option>Togo (+228)</option>
<option>onga (+676)</option>
<option>Trinidad &amp; Tobago (+1868)</option>
<option>Tunisia (+216)</option>
<option>Turkey (+90)</option>
<option>Turkmenistan (+7)</option>
<option>Turkmenistan (+993)</option>
<option>Turks &amp; Caicos Islands (+1649)</option>
<option>Tuvalu (+688)</option>
<option>Uganda (+256)</option>
<!-- <option data-countryCode="GB" value="44">UK (+44)</option> -->
<option>Ukraine (+380)</option>
<option>United Arab Emirates (+971)</option>
<option>Uruguay (+598)</option>
<!-- <option data-countryCode="US" value="1">USA (+1)</option> -->
<option>Uzbekistan (+7)</option>
<option>Vanuatu (+678)</option>
<option>Vatican City (+379)</option>
<option>Venezuela (+58)</option>
<option>Vietnam (+84)</option>
<option>Virgin Islands - British (+1284)</option>
<option>Virgin Islands - US (+1340)</option>
<option>Wallis &amp; Futuna (+681)</option>
<option>Yemen (North)(+969)</option>
<option>Yemen (South)(+967)</option>
<option>Zambia (+260)</option>
<option>Zimbabwe (+263)</option>
</optgroup>
</select>
                    </div>
                </div>
                <!--confirmPassword-->
                <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column" id="password">
                    <div class="form-group">
                        <label class="control-label">Date de naissance <font color='red'>*</font></label>
						
                        <input type="date" class="form-control " name="date_birthday" placeholder="" value="" required>
					  
                    </div>
                </div>
				
				 <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column" id="password">
                    <div class="form-group">
                        <label class="control-label">Etat civil<font color='red'>*</font></label>
						
                        <select type="text"class="form-control "name='etat_civil' required>
               <option value=''> Selection votre etat civil </option>
			   <option> Marie</option> 
			   <option> Célibataire </option> 
			 </select>
                    </div>
                </div>
				
				<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column" id="password">
                    <div class="form-group">
                        <label class="control-label">Numéro de compte BCB <font color='red'>*</font></label>
						
                        <input type="text"class="form-control "name='numero_compte' placeholder='Tapez votre Numéro de compte BCB' required>
                    </div>
                </div>
				
				
			<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 column" id="password">
                    <div class="form-group">
                        <label class="control-label">Numéro de Téléphone</label>
						
                        <input type="text"class="form-control "name='numero_telephone' placeholder='Tapez votre Numero de téléphone'/>
                    </div>
                </div>
				
				
				
		
            </div>
			
			 <div class="col-xs-12 col-md-6">
  <input type="submit" name="save" value="S'inscrire" class="btn btn-info" tabindex="7">    <input type="reset" name="save" value="Annuler" class="btn btn-info" tabindex="7">
  </div>
     
							
							
        </form>
		
		
		 <style>
		 
		 .tel{
			 float:right;
			 
			 
            }



		 
		  </style>
		
		
		
		<div class="tel">
                   
                       
   <?php
     
$query=mysqli_query($conn,"SELECT * FROM etudiant where numero_inscription ='$_SESSION[password]'")or die(mysqli_error($conn));
while($row=mysqli_fetch_array($query))
           {
$numinscription=$row['numero_inscription'];
                   
                    if($numinscription!=NULL)    
{?>
      <a href='upload.php'>
     Telechargez les fichiers
     
        </a>
<?php
}

else
{

}


}

?>
</div>
   
                    </br> </br>
                </div>
		
		
		
	</div>
</div>
<script>
	window.onload = function(){
		step1();
	}
    function step1(){
        //nationality
        var nationality_cookie = "";
        var old_nationality = "";
        old_nationality != null && old_nationality != ''? $("#nationality").val(old_nationality):$("#nationality").val(nationality_cookie);
        onNationalityChange();
    }
    //
    function onNationalityChange(){
        var nationality = document.getElementById("nationality").value;
        var other_nationality = document.getElementById("other_nationality");
        if(nationality != ''){
            onChangeDob();
        }
    }
    function onChangeDob(){
        var today = new Date();
        var dob = new Date(document.getElementById('dob').value);
        var age = today.getFullYear() - dob.getFullYear();
        var month = today.getMonth() - dob.getMonth();
        if (month < 0 || (month === 0 && today.getDate() < dob.getDate())) {
            age--;
        }
        var nationality = $("#nationality").val();
        var KE_code = "KEN";
        $(".nationalityDOB").hide();
        if(nationality == KE_code){
            if(age >= 18){
                $("#id_number").show();
                // $("#scanned_id").show();
            }else{
                if($("#dob").val() != ''){
                    // $("#scanned_birthCertificate").show();
                    $("#birthCertificateNo").show();
                }
            }
        }
        else{
            $("#passport_no").show();
            // $("#scanned_passport").show();
        }
    }
</script>
            </div>
            <hr>
            <div class="container-fluid footer mt-3 pt-4 pb-0 bg-theme-color d-flex justify-content-center">
			<div class="m-0 p-0">
				<p class="text-center m-0"><h6>Université du Burundi .&copy 2023 Tous les droits réservés</h6></p>
		   
			</div>
</div>            </div>
    <script>
        function toggleSidebar(){
            var sidebarActions = document.getElementById('rootWrapper');
            sidebarActions.classList.toggle("toggled");
        }
    </script>
    </body>

<!-- Mirrored from admissions.mu.ac.ke/ssp/register by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 28 Jun 2023 12:33:52 GMT -->
<?php
include('../dbcon.php');
if (isset($_POST['save'])){
	
$no = $_POST['nom'];
$pre = $_POST['prenom'];	
$dpe = $_POST['dpe'];
$dce = $_POST['dce'];
$num = $_POST['numero_inscription'];
$an = $_POST['anneeAcademique'];
$sex = $_POST['genre'];
$dat = $_POST['date_birthday'];
$civ = $_POST['etat_civil'];
$nation = $_POST['nationalite'];
$compte = $_POST['numero_compte'];
$tel = $_POST['numero_telephone'];
		
$query = mysqli_query($conn,"select * from etudiant where numero_inscription='$num' and dpe='$dpe' and dce='$dce' and anneeAcademique='$an'")or die(mysqli_error());
$count = mysqli_num_rows($query);

if ($count > 0){ 

?>
<script>
alert("Désolé!!! Vous ne pouvez pas s'inscrire deux fois.Merci.")  
window.location = "index.php";
</script>
<?php
}else{
	
mysqli_query($conn,"INSERT INTO etudiant(nom,prenom,date_birthday,genre,etat_civil,nationalite,anneeAcademique,dpe,dce,numero_inscription,numero_compte,numero_telephone) VALUES('$no','$pre','$dat','$sex','$civ','$nation','$an','$dpe','$dce','$num','$compte','$tel')")or die(mysqli_error($conn));
?>
<script>
alert("Merci!!!Vous etez bien s'inscrit.L'Université du Burundi vous souhaite le Bienvenu.");
window.location = "upload.php";
</script>

<?php
}
}
}

?>





</html>