<?php
session_start();
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");

//header("Access-Control-Allow-Origin: *"); 
if(!isset($_SESSION["etudiant_i"]) OR !isset($_SESSION["idEtablissement"])){
	header("Location:index.php");
	exit();
}



include('/home/africawebstudent/public_html/gs/progicielgeststudent/footer.php');
include_once('Library/Basededonnees.php');

$DB_DATABASE = $_SESSION["DB_DATABASE"];

$database = new Basededonnees($DB_DATABASE);
$bdd = $database->getBdd();

include('Library/Identite.php');

//Afficher les compositions du jour
$session_etudiant=$_SESSION["etudiant_i"];
//$matricule = $_POST['matricule'];
?>
<!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">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" type="image/png" sizes="16x16" href="https://progiciel.africawebstudent.org/plugins/images/favicon.png">
    <title>GestStudent E-Services : Fiche parcourt</title>
    <script src="https://progiciel.africawebstudent.org/plugins/bower_components/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap Core CSS -->
    <link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
	 <!-- animation CSS -->
    <link href="css/animate.css" rel="stylesheet">
	<!-- Menu CSS -->
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css" rel="stylesheet">
    <!--alerts CSS -->
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/sweetalert/sweetalert.css" rel="stylesheet" type="text/css">
    <!-- Menu CSS -->
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.css" rel="stylesheet">
	<!-- Menu CSS -->
    <link rel="stylesheet" href="https://progiciel.africawebstudent.org/plugins/bower_components/dropify/dist/css/dropify.min.css">
	<!-- page CSS -->
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/custom-select/custom-select.css" rel="stylesheet" type="text/css" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/switchery/dist/switchery.min.css" rel="stylesheet" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.css" rel="stylesheet" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.css" rel="stylesheet" />
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/multiselect/css/multi-select.css" rel="stylesheet" type="text/css" />

    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
    <link href="https://cdn.datatables.net/buttons/1.2.2/css/buttons.dataTables.min.css" rel="stylesheet" type="text/css" />

    <!-- Wizard CSS -->
    <link href="https://progiciel.africawebstudent.org/plugins/bower_components/jquery-wizard-master/css/wizard.css" rel="stylesheet">
    <!-- animation CSS -->
    <link href="css/animate.css" rel="stylesheet">
    <!-- Custom CSS -->
    <link href="css/style.css" rel="stylesheet">
    <!-- color CSS -->
    <link href="css/colors/megna-dark.css" id="theme" rel="stylesheet">
	
	<!-- Include Select2 CSS -->
	<link rel="stylesheet" href="https://progiciel.africawebstudent.org/plugins/bower_components/multiselect/css/select2.min.css" />

	<!-- CSS to make Select2 fit in with Bootstrap 3.x -->
	<link rel="stylesheet" href="https://progiciel.africawebstudent.org/plugins/bower_components/multiselect/css/select2-bootstrap.min.css" />
	<!-- Include Select2 JS -->
	<script src="https://progiciel.africawebstudent.org/plugins/bower_components/multiselect/css/select2.min.js"></script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body class="fix-header">
    <!-- ============================================================== -->
    <!-- Preloader -->
    <!-- ============================================================== -->
    <div class="preloader">
        <svg class="circular" viewBox="25 25 50 50">
            <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" />
        </svg>
    </div>
    <!-- ============================================================== -->
    <!-- Wrapper -->
    <!-- ============================================================== -->
    <div id="wrapper">
        <!-- ============================================================== -->
        <!-- Topbar header - style you can find in pages.scss -->
        <!-- ============================================================== -->
        <nav class="navbar navbar-default navbar-static-top m-b-0">
            <div class="navbar-header">
                <div class="top-left-part">
                    <!-- Logo -->
                    <a class="logo" href="accueil.php">
                        <!-- Logo icon image, you can use font-icon also --><b><span class="hidden-xs">
						<!--This is light logo icon--><img srcset="https://progiciel.africawebstudent.org/plugins/images/gs_36.png 36w, https://progiciel.africawebstudent.org/plugins/images/gsr2.png 196w" sizes="(max-width: 320px) 30px, (max-width: 480px) 36px, 150px" src="../plugins/images/gsr2.png" alt="home" class="light-logo"/>
						</span> </b>
					</a>
                </div>
                <!-- /Logo -->
                <!-- Search input and Toggle icon -->
                <ul class="nav navbar-top-links navbar-left">
                    <li><a href="javascript:void(0)" class="open-close waves-effect waves-light visible-xs"><i class="ti-close ti-menu"></i></a></li>
                    <!-- .Task dropdown -->
                
                    <!-- .Megamenu -->

                    <!-- /.Megamenu -->
                </ul>
                <ul class="nav navbar-top-links navbar-right pull-right">
                    <li>
                        <form role="search" class="app-search hidden-sm hidden-xs m-r-10">
                            <input type="text" placeholder="Search..." class="form-control"> <a href=""><i class="fa fa-search"></i></a> </form>
                    </li>
                    <li class="dropdown">
                        <?php
							include('include/affiche_identite.php');
                        ?>
                        <!-- /.dropdown-user -->
                    </li>
                    <!-- /.dropdown -->
                </ul>
            </div>
            <!-- /.navbar-header -->
            <!-- /.navbar-top-links -->
            <!-- /.navbar-static-side -->
        </nav>
        <!-- End Top Navigation -->
        <!-- ============================================================== -->
        <!-- Left Sidebar - style you can find in sidebar.scss  -->
        <!-- ============================================================== -->
        <div class="navbar-default sidebar" role="navigation">
            <div class="sidebar-nav">
                <div class="sidebar-head">
                    <h3><span class="fa-fw open-close"><i class="ti-menu hidden-xs"></i><i class="ti-close visible-xs"></i></span> <span class="hide-menu">Navigation</span></h3> </div>
                <ul class="nav" id="side-menu">
                    <li class="user-pro">
                        <a href="javascript:void(0)" class="waves-effect"><img src="img/profil.png" alt="user-img" class="img-circle"> <span class="hide-menu"><?php echo $infoEtudiant['nom'].'  '.$infoEtudiant['prenom']?> <span class="fa arrow"></span></span>
                        </a>
                    </li>
                    <li> <a href="accueil.php" class="waves-effect"><i class="mdi mdi-av-timer fa-fw" data-icon="v"></i> <span class="hide-menu"> Accueil <span class="fa arrow"></span> <span class="label label-rouded label-inverse pull-right"></span></span></a>
                    </li>
                    <li> <a href="f_scolarite.php" class="waves-effect"><i class="mdi mdi-av-timer fa-fw" data-icon="v"></i> <span class="hide-menu"> Scolarité <span class="fa arrow"></span> <span class="label label-rouded label-inverse pull-right"></span></span></a>
                    </li>
                    <li> <a href="parcourt.php" class="waves-effect active"><i class="mdi mdi-av-timer fa-fw" data-icon="v"></i> <span class="hide-menu"> Parcourt <span class="fa arrow"></span> <span class="label label-rouded label-inverse pull-right"></span></span></a>
                    </li>
					<li> <a href='javascript:void(0)' class='waves-effect'><i class='mdi mdi-content-copy fa-fw'></i> <span class='hide-menu'>Demande<span class='fa arrow'></span><span class='label label-rouded label-warning pull-right'>3</span></span></a>
						<ul class='nav nav-second-level'>
                            <li> <a href="f_reclamation.php" class="waves-effect"><i class="mdi mdi-av-timer fa-fw" data-icon="v"></i> <span class="hide-menu"> Réclamation <span class="fa arrow"></span> <span class="label label-rouded label-inverse pull-right"></span></span></a>
                            </li>
                            <li> <a href="f_demande.php" class="waves-effect"><i class="mdi mdi-av-timer fa-fw" data-icon="v"></i> <span class="hide-menu">Documents <span class="fa arrow"></span> <span class="label label-rouded label-inverse pull-right"></span></span></a>
                            </li>
						</ul>
					</li>
                </ul>
            </div>
        </div>
        <!-- ============================================================== -->
        <!-- End Left Sidebar -->
        <!-- ============================================================== -->
        <!-- ============================================================== -->
        <!-- Page Content -->
        <!-- ============================================================== -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row bg-title">
                    <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
                        <h4 class="page-title">Etablir le parcourt d'un étudiant</h4> </div>
                    <div class="col-lg-9 col-sm-8 col-md-8 col-xs-12">
                        <button class="right-side-toggle waves-effect waves-light btn-info btn-circle pull-right m-l-20"><i class="ti-settings text-white"></i></button>
                        <a href="javascript: void(0);" target="_blank" class="btn btn-danger pull-right m-l-20 hidden-xs hidden-sm waves-effect waves-light">GestStudent v17.04</a>
                        <ol class="breadcrumb">
                            <li><a href="javascript:void(0)">Dashboard</a></li>
                            <li class="active">Parcourt de étudiant</li>
                        </ol>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!--.row <br />-->
                
                <!-- /row data-page-length='25'-->
                <div class="row">
                    <div class="col-sm-12">
                        <div class="white-box">
                            <h3 class="box-title m-b-0">Data Export</h3>
                            <p class="text-muted m-b-30">Export data to Excel, PDF & Print</p>
                            <div class="table-responsive">
                                <table id="examtable" class="display wrap" data-order='[[ 2, "asc" ]]'  cellspacing="0" width="100%">
                                    <thead>
                                        <tr>
											<th width = 1%>Photo</th>
                                            <th width = 2%>Matricule</th>
                                            <th width = >Nom & Prénom</th>
                                            <th>Niveau</th>
                                            <th>Filière</th>
                                            <th>Période</th>
                                            <th>Statut</th>
                                            <th>UE restant</th>
                                            <th>% Crédit</th>
                                            <th>Moy pondérée</th>
                                        </tr>
                                    </thead>
                                    <tfoot>
                                        <tr>
											<th>Photo</th>
                                            <th>Matricule</th>
                                            <th>Nom & Prénom</th>
                                            <th>Niveau</th>
                                            <th>Filière</th>
                                            <th>Période</th>
                                            <th>Statut</th>
                                            <th>UE restant</th>
                                            <th>% Crédit</th>
                                            <th>Moy pondérée</th>
                                       </tr>
                                    </tfoot>
                                    <tbody>
										
										<?php
										try{
					                        $sql = 'SELECT * FROM `tabinscription` AS f INNER JOIN tabetudiant AS t ON t.matricule = f.matricule WHERE t.matricule = :m ORDER BY annee ASC, niveauFormation ASC';
											$statement = $bdd->prepare($sql);
											$statement->bindParam(':m',$session_etudiant, PDO::PARAM_STR);
											$statement->execute();
											$niveau = '';
											$statut = '';
											while($row=$statement->fetch(PDO::FETCH_ASSOC)) {
												$sql1 = "SELECT sigleFilieres FROM `filieres` WHERE `idFiliere` = :id";
												$statement1 = $bdd->prepare($sql1);
												$statement1->bindParam(':id',  			$row['idFiliere'], PDO::PARAM_STR);
												$statement1->execute();
												$row_1=$statement1->fetch(PDO::FETCH_ASSOC);
												if($row['niveauFormation'] == 1) {
													$niveau = 'Licence '.$row['annee'];
												}else if($row['niveauFormation'] == 2) {
													$niveau = 'Master '.$row['annee'];
												}else{
													$niveau = 'Doctorat '.$row['annee'];
												}
												
												if($row['statut'] == 1) {
													$statut = 'Titre payant';
												}else if($row['statut'] == 2) {
													$statut = 'Boursier';
												}else{
												    $statut = 'Réduction';
												}
												$res = 'R';
												$annee_acad = $row['annee_acad'];
												$periode = ($annee_acad - 1).'-'.$annee_acad;
												$sql2 = 'SELECT intituleUnite, code_unite FROM unites  WHERE code_unite  IN ';
												$sql2 .= '(SELECT code_unite FROM tabinscriunite WHERE matricule = :matri AND resultat = :res AND premiere_inscription = :pre AND annee = :an AND idFiliere = :id) ';
												$sql2 .= 'AND annee_acad = :acad AND annee = :a AND idFiliere = :idf';
												$statement2 = $bdd->prepare($sql2);
												$statement2->bindParam(':matri',  		$row['matricule'], PDO::PARAM_STR);
												$statement2->bindParam(':res',  		$res, PDO::PARAM_STR);
												$statement2->bindParam(':pre',  		$annee_acad, PDO::PARAM_STR);
												$statement2->bindParam(':an',  			$row['annee'], PDO::PARAM_STR);
												$statement2->bindParam(':id',  			$row['idFiliere'], PDO::PARAM_STR);
												$statement2->bindParam(':acad',  		$annee_acad, PDO::PARAM_STR);
												$statement2->bindParam(':a',  			$row['annee'], PDO::PARAM_STR);
												$statement2->bindParam(':idf',  		$row['idFiliere'], PDO::PARAM_STR);
												$statement2->execute();
												
												$table = '<table border = 1>';												
												while($row2=$statement2->fetch(PDO::FETCH_ASSOC)) {
													$reqS1 = "SELECT * FROM ecu WHERE idFiliere = :idF AND annee = :an AND annee_acad = :acad AND code_unite = :code";
													$statement3 = $bdd->prepare($reqS1);
													$statement3->bindParam(':idF', $row['idFiliere'], PDO::PARAM_STR);
													$statement3->bindParam(':an',  $row['annee'], PDO::PARAM_STR);
													$statement3->bindParam(':acad',$annee_acad, PDO::PARAM_STR);
													$statement3->bindParam(':code',  $row2['code_unite'], PDO::PARAM_STR);
													$statement3->execute();
													$total = $statement3->rowCount();
													$row1 = $statement3->fetch(PDO::FETCH_ASSOC);
													$table .= '<tr>   	 	
															<td align=left rowspan='.$total.' ><font color = red size = 1>/='.$row2['intituleUnite'].'=/</font></td>
															<td align=left><font color = blue size = 1>/*'.$row1['intituleEcu'].'*/</td>
															</tr>';
													$i = 0;
													while($row3=$statement3->fetch(PDO::FETCH_ASSOC)) {         	
													$table .= '
													<tr>
															<td align=left><font color = blue size = 1>'.$row3['intituleEcu'].'*/</font></td>
													</tr>';
													}
												}
												
												$table .= '</table>';
												
												if($row['nombreUErestant'] == 0){
													$table = '0';
												}
												if($row['cheminPhoto'] ==''){
												    $row['cheminPhoto'] = 'imageEtudiant/votrephoto.jpg';
												}
												echo '<tr>
													<td align = left><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank ><img src="https://progiciel.africawebstudent.org/Inscription/'.$row['cheminPhoto'].'" alt="" height="60" width="60"></a></td>												
													<td align = center><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$row['matricule'].'</a></td>													
													<td><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$row['nom'].' '.$row['prenom'].'</a></td>
													<td><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$niveau.'</a></td>
													<td><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$row_1['sigleFilieres'].'</a></td>
													<td><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$periode.'</a></td>
													<td><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$statut.'</a></td>
													<td align = left><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$table.'</a></td>
													<td align = center><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$row['pourcentageCredit'].'</a></td>
													<td align = center><a href = "tcpdf/pdf/showparcourt-ue.php?matricule='.$row['matricule'].'&annee='.$row['annee'].'&idFiliere='.$row['idFiliere'].'&niveau='.$row['niveauFormation'].'&academique='.$annee_acad.'" target = _blank >'.$row['moyennePonderee'].'</a></td>
												</tr>';
											}
										}catch(PDOException  $e ){
											//echo notifierErreur2($e->getCode( ), $e->getMessage( ));
										}
										?>										
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
                <!--./row-->
                <!-- ============================================================== -->
                <!-- .right-sidebar -->
                <div class="right-sidebar">
                    <div class="slimscrollright">
                        <div class="rpanel-title"> Service Panel <span><i class="ti-close right-side-toggle"></i></span> </div>
                        <div class="r-panel-body">
                            <ul id="themecolors" class="m-t-20">
                                <li><b>With Light sidebar</b></li>
                                <li><a href="javascript:void(0)" data-theme="default" class="default-theme">1</a></li>
                                <li><a href="javascript:void(0)" data-theme="green" class="green-theme">2</a></li>
                                <li><a href="javascript:void(0)" data-theme="gray" class="yellow-theme">3</a></li>
                                <li><a href="javascript:void(0)" data-theme="blue" class="blue-theme">4</a></li>
                                <li><a href="javascript:void(0)" data-theme="purple" class="purple-theme">5</a></li>
                                <li><a href="javascript:void(0)" data-theme="megna" class="megna-theme">6</a></li>
                                <li><b>With Dark sidebar</b></li>
                                <br/>
                                <li><a href="javascript:void(0)" data-theme="default-dark" class="default-dark-theme">7</a></li>
                                <li><a href="javascript:void(0)" data-theme="green-dark" class="green-dark-theme">8</a></li>
                                <li><a href="javascript:void(0)" data-theme="gray-dark" class="yellow-dark-theme">9</a></li>
                                <li><a href="javascript:void(0)" data-theme="blue-dark" class="blue-dark-theme">10</a></li>
                                <li><a href="javascript:void(0)" data-theme="purple-dark" class="purple-dark-theme">11</a></li>
                                <li><a href="javascript:void(0)" data-theme="megna-dark" class="megna-dark-theme working">12</a></li>
                            </ul>
                         </div>
                    </div>
                </div>
                <!-- ============================================================== -->
                <!-- End Right sidebar -->
                <!-- ============================================================== -->
            </div>
            <!-- /.container-fluid -->
            <?php footer() ?>
        </div>
        <!-- ============================================================== -->
        <!-- End Page Content -->
        <!-- ============================================================== -->
    </div>
    <!-- ============================================================== -->
    <!-- End Wrapper -->
    <!-- ============================================================== -->
    <!-- ============================================================== -->
    <!-- All Jquery -->
    <!-- ============================================================== -->
		<!-- Bootstrap Core JavaScript -->
		<script src="bootstrap/dist/js/bootstrap.min.js"></script>
		<!-- Menu Plugin JavaScript -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/sidebar-nav/dist/sidebar-nav.min.js"></script>
		<!--slimscroll JavaScript -->
		<script src="js/jquery.slimscroll.js"></script>
		<!--Wave Effects -->
		<script src="js/waves.js"></script>
		<!-- Form Wizard JavaScript -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/jquery-wizard-master/dist/jquery-wizard.min.js"></script>
		<!-- FormValidation -->
		<link rel="stylesheet" href="https://progiciel.africawebstudent.org/plugins/bower_components/jquery-wizard-master/libs/formvalidation/formValidation.min.css">
		<!-- FormValidation plugin and the class supports validating Bootstrap form -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/jquery-wizard-master/libs/formvalidation/formValidation.min.js"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/jquery-wizard-master/libs/formvalidation/bootstrap.min.js"></script>
		<!-- Custom Theme JavaScript -->
		<script src="js/custom.min.js"></script>
		<!-- Sweet-Alert  -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/sweetalert/sweetalert.min.js"></script>
		 <!-- Date Picker Plugin JavaScript -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>

		<!-- Custom Theme JavaScript -->
		<script src="js/custom.min.js"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/switchery/dist/switchery.min.js"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/custom-select/custom-select.min.js" type="text/javascript"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-select/bootstrap-select.min.js" type="text/javascript"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js"></script>
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="https://progiciel.africawebstudent.org/plugins/bower_components/multiselect/js/jquery.multi-select.js"></script>
		<!-- Treeview Plugin JavaScript -->
		<script src="https://progiciel.africawebstudent.org/plugins/bower_components/datatables/jquery.dataTables.min.js"></script>
		<!-- start - This is for export functionality only -->
		<script src="https://cdn.datatables.net/buttons/1.2.2/js/dataTables.buttons.min.js"></script>
		<script src="https://cdn.datatables.net/buttons/1.2.2/js/buttons.flash.min.js"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
		<script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
		<script src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
		<script src="https://cdn.datatables.net/buttons/1.2.2/js/buttons.html5.min.js"></script>
		<script src="https://cdn.datatables.net/buttons/1.2.2/js/buttons.print.min.js"></script>
		<!-- end - This is for export functionality only -->
    
	<script>
			$('#examtable').DataTable({
				dom: 'Blfrtip',
				lengthMenu: [
					[ 10, 25, 50, -1 ],
					[ '10', '25', '50', 'All' ]
				],		
				buttons: [
					{
						extend: 'excel',
						exportOptions: {
							columns: [1, 2, 3, 4, 5, 6, 7, 8, 9]
						}              
					},
					{
						extend: 'pdf',
						exportOptions: {
							columns: [1, 2, 3, 4, 5, 6, 7, 8, 9]
						},
						pageSize: 'A3'              
					},
					{
						extend: 'print',
						customize: function ( win ) {
							$(win.document.body)
								.css( 'font-size', '10pt' )
								.prepend(
									'<img src="../images/iitech-logo.png" style="position:absolute; top:0; left:0;" />'
								);
		 
							$(win.document.body).find( 'table' )
								.addClass( 'compact' )
								.css( 'font-size', '8pt' );
						},
						exportOptions: {
							columns: [1, 2, 3, 4, 5, 6, 7, 8, 9]
						}             
					}
				]				
			});			
	</script>
        
</body>

</html>
