Skip to content
Snippets Groups Projects
Select Git revision
  • ac3e362037a1b31c36a2dc49eb38320cf4906e79
  • main default protected
  • correction_video
  • going_further
  • ImprovedMouseInteraction
  • final2023
  • template
  • ModifGUI
8 results

README.md

Blame
  • Forked from YAGOUBI Rim / Game of life Template
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    index.php 1.63 KiB
    <?php
    /**
     * Page d'accueil
     */
    include 'include/php/functions.php';
    ?>
    <!DOCTYPE html>
    <html lang="fr">
    <head>
        <meta charset="utf-8">
        <title>SAÉ 303</title>
    </head>
    <body>
    	<h1>SAÉ 303</h1>
    	<p>
    		Concevoir des visualisations de données pour le web et un support animé. Voici quelques exemples, dont un avec une graphique avec Google Charts <a href="test-charts.html">ici</a>.
    	</p>
    	<section>
    		<h2>Les BUT avec le plus grand nombre de candidats</h2>
    		<ol>
    <?php
    $dbh = db_connection();
    $sth = $dbh->prepare('SELECT lib_comp_voe_ins, voe_tot FROM parcoursup
            WHERE fili = "BUT"
            ORDER BY voe_tot DESC LIMIT 5');
    $sth->execute();
    $result = $sth->fetchAll();
    foreach ($result as $row) {
    	echo '<li>' . $row['lib_comp_voe_ins'] . ' (' . $row['voe_tot'] . ' candidats)</li>';
      }
    ?>
    		</ol>
    	</section>
    
    <section>
    	<h2>Les villes avec le plus de BTS</h2>
    	<ol>
    <?php
    $sth = $dbh->prepare('SELECT ville_etab, count(*) AS count FROM parcoursup
    	WHERE fili = "BTS"
    	GROUP BY ville_etab
    	ORDER BY count DESC LIMIT 5');
    $sth->execute();
    $result = $sth->fetchAll();
    foreach ($result as $row) {
    echo '<li>' . $row['ville_etab'] . ' (' . $row['count'] . ' BTS)</li>';
    }
    ?>
    	</ol>
    </section>
    
    	<section>
    		<h2>Les BUT Informatique avec le plus grand nombre de filles</h2>
    		<ol>
    <?php
    $sth = $dbh->prepare('SELECT lib_comp_voe_ins, acc_tot_f FROM parcoursup
    		WHERE lib_for_voe_ins LIKE "BUT - Informatique%"
            ORDER BY acc_tot_f DESC LIMIT 5');
    $sth->execute();
    $result = $sth->fetchAll();
    foreach ($result as $row) {
    	echo '<li>' . $row['lib_comp_voe_ins'] . ' (' . $row['acc_tot_f'] . ' filles)</li>';
      }
    ?>
    		</ol>
    	</section>
    </body>
    </html>