%PDF- %PDF-
Direktori : /home/jalalj2hb/www/ftm-admin/ |
Current File : /home/jalalj2hb/www/ftm-admin/tests_bycode.php |
<!doctype html> <!--[if lte IE 9]> <html class="lte-ie9" lang="en"> <![endif]--> <!--[if gt IE 9]><!--> <html lang="en"> <!--<![endif]--> <head> <?php $page_name="tests"; /* <div style="width: 100%;border: 2px dashed grey;margin-top: 2px;"></div> */ include "config/conf.php"; include "core/model.php"; include "core/function.php"; $db = new Model(); $error=false; if(isset($_GET['NAgrement'])) { $NAgrement=intval($_GET['NAgrement']); $phone=intval($_GET['phone']); $sql="SELECT * FROM `autoecoles` where agrement='".$NAgrement."'"; $autoecoles=$db->executeQuery($sql); $count_autoecoles=count($autoecoles); if ($count_autoecoles < 1) { $text= "veuillez saisir correctement vos informations d'auto-ecole, et essayez à nouveau"; $error=true; } }else { $text= "veuillez saisir correctement vos informations d'auto-ecole, et essayez à nouveau"; $error=true; } ?> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Remove Tap Highlight on Windows Phone IE --> <meta name="msapplication-tap-highlight" content="no"/> <link rel="icon" type="image/png" href="assets/img/favicon-32x32.png" sizes="32x32"> <title>FTM</title> <!-- uikit --> <link rel="stylesheet" href="bower_components/uikit/css/uikit.almost-flat.min.css" media="all"> <!-- flag icons --> <link rel="stylesheet" href="assets/icons/flags/flags.min.css" media="all"> <!-- style switcher --> <link rel="stylesheet" href="assets/css/style_switcher.min.css" media="all"> <!-- altair admin --> <link rel="stylesheet" href="assets/css/main.min.css" media="all"> <!-- themes --> <link rel="stylesheet" href="assets/css/themes/themes_combined.min.css" media="all"> <link rel="stylesheet" href="assets/css/select2.css" media="all"> <!-- matchMedia polyfill for testing media queries in JS --> <!--[if lte IE 9]> <script type="text/javascript" src="bower_components/matchMedia/matchMedia.js"></script> <script type="text/javascript" src="bower_components/matchMedia/matchMedia.addListener.js"></script> <link rel="stylesheet" href="assets/css/ie.css" media="all"> <![endif]--> </head> <body class=" sidebar_main_open sidebar_main_swipe"> <!-- main header --> <div class="uk-width-medium-1-1"> <button class="md-btn message_success" data-message="<a href='#' class='notify-action'>Fermer</a> Mise à jour réussi avec succès" data-status="success" data-pos="bottom-center">Success</button> </div> <div id="" style="padding: 20px; "> <div id="page_content_inner"> <?php if($error==true){ ?> <div style="width:50%; margin:100px auto;"; class="md-col s4"> <div class="md-card "> <div class="md-card-stacked"> <div class="md-card-content"> <p><?php echo $text; ?></p> </div> <div style="width:100%;"; class="md-card-action center-align "> <a style="width:90%; margin: 5px;"; class="green accent-3 waves-effect waves-light md-btn" href="./results.php">réessayer</a> </div> </div> </div> </div> <?php die(); } ?> <div class="md-card uk-margin-medium-bottom"> <div class="md-card-content"> <div class="uk-overflow-container"> <h3 class="title_p"><a href="tests.php"><i class="material-icons">list</i> Tests</a></h3> <table class="uk-table" id="ecole"> <thead> <tr> <th class="uk-text-nowrap">Nom </th> <th class="uk-text-nowrap">Serie</th> <th class="uk-text-nowrap">Permis</th> <th class="uk-text-nowrap">Note</th> <th class="uk-text-nowrap">Actions</th> </tr> </thead> <tbody> <?php $sql="SELECT cnd.nom,cnd.nom_famille,c.id_categorie,c.icon,sc.sous_categorie,ur.user_id,ur.sous_categorie_id,CONCAT(COUNT(*) ,'/40') as note,cnd.permis_id FROM candidats cnd,`candidat_reponses` ur, sous_categories sc ,categories c WHERE sc.categorie_id=c.id_categorie AND ur.sous_categorie_id=sc.id_sous_categorie AND ur.user_id=cnd.id_user AND cnd.code='".@$_GET['code']."'"; $sql.=" GROUP by ur.sous_categorie_id"; $tests=$db->executeQuery($sql); $sum_count_r=0; $count_total=0; $count_tests=count($tests); $arr_series=array(); $arr_note=array(); foreach($tests as $test){ $sql_c="SELECT COUNT(*)as count FROM `candidat_reponses` WHERE user_id=".$test->user_id." AND sous_categorie_id=".$test->sous_categorie_id." AND repense_valide=1"; $count_n=$db->executeQuery($sql_c); $count_n=$count_n[0]->count; $count_total+=$count_n; array_push($arr_series,$test->sous_categorie); array_push($arr_note,$count_n); $coun_r=$db->executeQuery("SELECT count(*) as c FROM `questions` WHERE `id_sous_categorie` = ".$test->sous_categorie_id); $coun_r=$coun_r[0]->c; $sum_count_r+=$coun_r; $permis=$db->executeQuery("SELECT categorie FROM `categorie` WHERE id_categorie=".$test->permis_id); $permis=$permis[0]->categorie; ?> <tr class="uk-table-middle"> <td class="uk-width-2-10 uk-text-nowrap"> <?php echo $test->nom?></td> <td class="uk-width-2-10 uk-text-nowrap"><?php echo $test->sous_categorie ?></td> <td class="uk-width-2-10 uk-text-nowrap"><?php echo $permis?></td> <td class="uk-width-2-10 uk-text-nowrap"> <?php echo $count_n;?>/<?php echo $coun_r;?> </td> <td><a href="Detaills.php?sous_categorie_id=<?php echo $test->sous_categorie_id;?>&user_id=<?php echo $test->user_id;?>&NAgrement=<?php echo $NAgrement?>&phone=<?php echo $phone?>">Détails</a></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <div class="md-card uk-margin-medium-bottom"> <div class="md-card-content"> <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> </div> </div> <div class="md-card uk-margin-medium-bottom"> <div class="md-card-content"> <?php $Moyen=0;$moyen_c_r=0; if($count_tests!=0){ $count_total=$count_total; $count_tests=$count_tests; $Moyen=$count_total/$count_tests; $moyen_c_r=$sum_count_r/$count_tests; } ?> <h2> Nombre de séries : <?php echo $count_tests ;?>, Moyen générale : <?php echo $Moyen;?>/<?php echo $moyen_c_r;?></h2> </div> </div> </div> <!-- common functions --> <script src="assets/js/common.min.js"></script> <!-- uikit functions --> <script src="assets/js/uikit_custom.min.js"></script> <!-- altair common functions/helpers --> <script src="assets/js/altair_admin_common.min.js"></script> <script src="assets/js/select2.js"></script> <!-- notifications functions --> <script src="assets/js/pages/components_notifications.min.js"></script> <!-- datatables --> <script src="bower_components/datatables/media/js/jquery.dataTables.min.js"></script> <!-- datatables buttons--> <script src="bower_components/datatables-buttons/js/dataTables.buttons.js"></script> <script src="assets/js/custom/datatables/buttons.uikit.js"></script> <script src="bower_components/datatables-buttons/js/buttons.colVis.js"></script> <script src="bower_components/datatables-buttons/js/buttons.html5.js"></script> <script src="bower_components/datatables-buttons/js/buttons.print.js"></script> <!-- datatables custom integration --> <script src="assets/js/custom/datatables/datatables.uikit.min.js"></script> <!-- datatables functions --> <script src="assets/js/pages/plugins_datatables.min.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <script> Highcharts.chart('container', { chart: { type: 'line' }, title: { text: 'evolution de formation' }, subtitle: { text: '' }, xAxis: { categories: [ <?php foreach($arr_series as $as){?> '<?php echo $as;?>', <?php }?> ] }, yAxis: { title: { text: 'series' } , labels: { formatter: function () { return this.value + '/<?php echo $coun_r; ?>'; } } }, legend: { enabled: false }, tooltip: { headerFormat: '<b>{series.name}</b><br/>', pointFormat: '{point.y}/<?php echo $coun_r; ?>' }, plotOptions: { line: { dataLabels: { enabled: false }, enableMouseTracking: true } }, series: [{ name: 'evolution de formation', data: [ <?php foreach($arr_note as $an){?> <?php echo $an;?>, <?php }?> ] }] }); </script> <script> $(function() { $("#ecole").dataTable({ /* dataTable language FR */ "iDisplayLength": 10, "language": { "sProcessing": "Traitement en cours...", "sSearch": "Rechercher :", "sLengthMenu": "Afficher _MENU_ éléments", "sInfo": "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments", "sInfoEmpty": "Affichage de l'élément 0 à 0 sur 0 élément", "sInfoFiltered": "(filtré de _MAX_ éléments au total)", "sInfoPostFix": "", "sLoadingRecords": "Chargement en cours...", "sZeroRecords": "Aucun élément à afficher", "sEmptyTable": "Aucune donnée disponible dans le tableau", "oPaginate": { "sFirst": "Premier", "sPrevious": "Précédent", "sNext": "Suivant", "sLast": "Dernier" }, "oAria": { "sSortAscending": ": activer pour trier la colonne par ordre croissant", "sSortDescending": ": activer pour trier la colonne par ordre décroissant" } } /* */ }); }); </script> <script> $(function() { if(isHighDensity) { // enable hires images altair_helpers.retina_images(); } if(Modernizr.touch) { // fastClick (touch devices) FastClick.attach(document.body); } }); $window.load(function() { // ie fixes altair_helpers.ie_fix(); }); </script> <style> img { width: auto\9; height: auto; max-width: 100%; vertical-align: middle; border: 0; -ms-interpolation-mode: bicubic; } </style> <script> $(function() { var $switcher = $('#style_switcher'), $switcher_toggle = $('#style_switcher_toggle'), $theme_switcher = $('#theme_switcher'), $mini_sidebar_toggle = $('#style_sidebar_mini'), $slim_sidebar_toggle = $('#style_sidebar_slim'), $boxed_layout_toggle = $('#style_layout_boxed'), $accordion_mode_toggle = $('#accordion_mode_main_menu'), $html = $('html'), $body = $('body'); $switcher_toggle.click(function(e) { e.preventDefault(); $switcher.toggleClass('switcher_active'); }); $theme_switcher.children('li').click(function(e) { e.preventDefault(); var $this = $(this), this_theme = $this.attr('data-app-theme'); $theme_switcher.children('li').removeClass('active_theme'); $(this).addClass('active_theme'); $html .removeClass('app_theme_a app_theme_b app_theme_c app_theme_d app_theme_e app_theme_f app_theme_g app_theme_h app_theme_i app_theme_dark') .addClass(this_theme); if(this_theme == '') { localStorage.removeItem('altair_theme'); $('#kendoCSS').attr('href','bower_components/kendo-ui/styles/kendo.material.min.css'); } else { localStorage.setItem("altair_theme", this_theme); if(this_theme == 'app_theme_dark') { $('#kendoCSS').attr('href','bower_components/kendo-ui/styles/kendo.materialblack.min.css') } else { $('#kendoCSS').attr('href','bower_components/kendo-ui/styles/kendo.material.min.css'); } } }); // hide style switcher $document.on('click keyup', function(e) { if( $switcher.hasClass('switcher_active') ) { if ( ( !$(e.target).closest($switcher).length ) || ( e.keyCode == 27 ) ) { $switcher.removeClass('switcher_active'); } } }); // get theme from local storage if(localStorage.getItem("altair_theme") !== null) { $theme_switcher.children('li[data-app-theme='+localStorage.getItem("altair_theme")+']').click(); } // toggle mini sidebar // change input's state to checked if mini sidebar is active if((localStorage.getItem("altair_sidebar_mini") !== null && localStorage.getItem("altair_sidebar_mini") == '1') || $body.hasClass('sidebar_mini')) { $mini_sidebar_toggle.iCheck('check'); } $mini_sidebar_toggle .on('ifChecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.setItem("altair_sidebar_mini", '1'); localStorage.removeItem('altair_sidebar_slim'); location.reload(true); }) .on('ifUnchecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.removeItem('altair_sidebar_mini'); location.reload(true); }); // toggle slim sidebar // change input's state to checked if mini sidebar is active if((localStorage.getItem("altair_sidebar_slim") !== null && localStorage.getItem("altair_sidebar_slim") == '1') || $body.hasClass('sidebar_slim')) { $slim_sidebar_toggle.iCheck('check'); } $slim_sidebar_toggle .on('ifChecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.setItem("altair_sidebar_slim", '1'); localStorage.removeItem('altair_sidebar_mini'); location.reload(true); }) .on('ifUnchecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.removeItem('altair_sidebar_slim'); location.reload(true); }); // toggle boxed layout if((localStorage.getItem("altair_layout") !== null && localStorage.getItem("altair_layout") == 'boxed') || $body.hasClass('boxed_layout')) { $boxed_layout_toggle.iCheck('check'); $body.addClass('boxed_layout'); $(window).resize(); } $boxed_layout_toggle .on('ifChecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.setItem("altair_layout", 'boxed'); location.reload(true); }) .on('ifUnchecked', function(event){ $switcher.removeClass('switcher_active'); localStorage.removeItem('altair_layout'); location.reload(true); }); // main menu accordion mode if($sidebar_main.hasClass('accordion_mode')) { $accordion_mode_toggle.iCheck('check'); } $accordion_mode_toggle .on('ifChecked', function(){ $sidebar_main.addClass('accordion_mode'); }) .on('ifUnchecked', function(){ $sidebar_main.removeClass('accordion_mode'); }); }); </script> <?php include 'include/footer.php'; ?> </body> </html>