diff --git a/includes/dashboard.php b/includes/dashboard.php index 4756552..925010b 100644 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -1,17 +1,10 @@ Deligraph"; - echo "

Deligraph is a tool that helps you to manage your social media.

"; - echo "

For more information, please visit www.deligraph.com.

"; -} - function myprefix_register_options_page() { @@ -27,6 +20,23 @@ function myprefix_register_options_page() } add_action('admin_menu', 'myprefix_register_options_page'); +function admin_dashboard_widget_callback() +{ + $url = menu_page_url('session-datas-options', false); + +?> +
+ +

Statistiques

+

Pour consulter les statistiques des jeux sur la page de session datas

+ Consulter +
+ +get_results(" - SELECT user_locale, COUNT(user_locale) as count - FROM $table_name - GROUP BY user_locale + + $level_post_ids = $wpdb->get_col(" + SELECT DISTINCT level_post_id + FROM $table_name "); - $users_countries = $wpdb->get_results(" - SELECT user_country, COUNT(user_country) as count - FROM $table_name - GROUP BY user_country -"); - - $notes_repartition = $wpdb->get_results(" - SELECT level_score, COUNT(level_score) as count - FROM $table_name - GROUP BY level_score - "); - - write_log($users_countries); - - $average_level_score = $wpdb->get_var(" - SELECT AVG(level_score) as average - FROM $table_name - "); - ?> -
+

-
-

Données de jeu

-
-

Score moyen

- -

- + + -
+
+ get_results(" + SELECT user_locale, COUNT(user_locale) as count + FROM $table_name + WHERE level_post_id = $level_post_id + GROUP BY user_locale + "); -
-

Répartition des notes

-
    - -
  • level_score ?> : count ?>
  • - -
-
+ $users_countries = $wpdb->get_results(" + SELECT user_country, COUNT(user_country) as count + FROM $table_name + WHERE level_post_id = $level_post_id + GROUP BY user_country + "); + + $notes_repartition = $wpdb->get_results(" + SELECT level_score, COUNT(level_score) as count + FROM $table_name + WHERE level_post_id = $level_post_id + GROUP BY level_score + "); + + $average_level_score = $wpdb->get_var(" + SELECT AVG(level_score) as average + FROM $table_name + WHERE level_post_id = $level_post_id + "); + $completeLevelsScores = $wpdb->get_results(" + SELECT level_score + FROM $table_name + WHERE level_post_id = $level_post_id + "); + + + + ?> + +

post_title ?>

+
+ + +
+
+

Score moyen

+ + +
+ + + +

+ +
+ + +
+
+

Répartition des scores

+ + +
    + +
  • level_score ?> : count ?> joueurs
  • + +
+ +
+ +
+
+

Langue et Géographie

+
+ +
+

Répartition des langues

+
    + +
  • user_locale ?> : count ?>
  • + +
+
+
+

Répartition des pays

+
    + +
  • user_country ?> : count ?> joueurs
  • + +
+
+
+
+
+
+ + +
+ - -
-

Langue et Géographie

-
-

Répartition des langues

-
    - -
  • user_locale ?> : count ?>
  • - -
-
-
-

Répartition des pays

-
    - -
  • user_country ?> : count ?>
  • - -
-
-