diff --git a/server_static/assets/css/gestion_entreprises.css b/server_static/assets/css/gestion_entreprises.css index 5e78417..1d3c71c 100644 --- a/server_static/assets/css/gestion_entreprises.css +++ b/server_static/assets/css/gestion_entreprises.css @@ -53,6 +53,13 @@ table td { border: solid 1px black; } +.modal_stat_table +{ + margin: 0 auto; + padding-bottom: 10px; + text-align: center; +} + /*////////////////////////////////////////////////////////////////// [ Modal ] */ diff --git a/server_static/assets/js/gestion_entreprises.js b/server_static/assets/js/gestion_entreprises.js index 9ecfee2..521c575 100644 --- a/server_static/assets/js/gestion_entreprises.js +++ b/server_static/assets/js/gestion_entreprises.js @@ -1,6 +1,8 @@ var ID_company=0; $(document).ready(function(){ + $("#modal_stat").show(); + $("#li_gestion_entreprises").delay(2000).addClass("hover"); diff --git a/website/gestion_entreprises.php b/website/gestion_entreprises.php index 76bb73e..041566f 100644 --- a/website/gestion_entreprises.php +++ b/website/gestion_entreprises.php @@ -19,6 +19,10 @@ if (isset($_COOKIE['username']) && isset($_COOKIE['pass'])) { $query_localisations = $bdd->prepare('SELECT ID_localisation, city_localisation FROM localisations GROUP BY city_localisation ORDER BY city_localisation ASC;'); $query_localisations->execute(); $results_localisations = $query_localisations->fetchALL(PDO::FETCH_OBJ); + + $query_companies_top_internship = $bdd->prepare('SELECT companies.ID_company, name_company, COUNT(internships.ID_company) AS "number_of_internships" FROM companies NATURAL JOIN companies_located NATURAL JOIN localisations LEFT JOIN internships ON companies.ID_company=internships.ID_company INNER JOIN evaluate ON companies.ID_company=evaluate.ID_company INNER JOIN users ON evaluate.ID_user=users.ID_user NATURAL JOIN roles WHERE name_role="Pilote" GROUP BY internships.ID_company ORDER BY number_of_internships DESC;'); + $query_companies_top_internship->execute(); + $results_companies_top_internship = $query_companies_top_internship->fetchALL(PDO::FETCH_OBJ); ?>
@@ -93,7 +97,27 @@ if (isset($_COOKIE['username']) && isset($_COOKIE['pass'])) {