diff --git a/site/crapaud-fou.css b/site/crapaud-fou.css
index da18aa3..304ff66 100644
--- a/site/crapaud-fou.css
+++ b/site/crapaud-fou.css
@@ -4,15 +4,8 @@
position: relative;
}
.header img {
- transition: 1s;
margin-right: 1em;
}
-.header img:hover {
- transition: 1s;
- position: absolute;
- height: 400px;
- z-index: 999;
-}
.entete {
background-color: rgb(33, 36, 32);
color: rgb(240, 233, 233);
diff --git a/site/index.html b/site/index.html
index 651c32e..f2f4455 100644
--- a/site/index.html
+++ b/site/index.html
@@ -194,16 +194,6 @@
Les dernières pages modifiées
diff --git a/tools/wiki/stats.php b/tools/wiki/stats.php
new file mode 100644
index 0000000..ef8689b
--- /dev/null
+++ b/tools/wiki/stats.php
@@ -0,0 +1,65 @@
+connect_errno) {
+ echo mysqli_connect_error();
+ exit;
+}
+
+$db->set_charset("utf8");
+
+function getone($query) {
+ global $db;
+ $result = $db->query($query);
+ return $result->fetch_row()[0];
+}
+function getlist($query) {
+ global $db;
+ $result = $db->query($query);
+ $back = array();
+ while ($row = $result->fetch_row()) {
+ $back[$row[0]] = $row[1];
+ }
+ return $back;
+}
+
+$interval = "unix_timestamp(date_sub(current_date(), interval 30 day))";
+
+$data = array(
+ 'crapauds' => array(
+ 'total' => 0,
+ 'recent' => 0
+ ),
+ 'pages' => array(
+ 'total' => 0,
+ 'recent' => 0,
+ 'liste' => array()
+ ),
+ 'photos' => array(
+ 'total' => 0,
+ 'recent' => 0
+ )
+);
+
+$data['crapauds']['total'] = getone("select count(*) from users_users");
+$data['crapauds']['recent'] = getone("select count(*) from users_users where currentLogin > $interval");
+
+$data['pages']['total'] = getone("select count(*) from tiki_pages");
+$data['pages']['recent'] = getone("select count(*) from tiki_pages where lastModif > $interval");
+$data['pages']['liste'] = getlist("select pageSlug, pageName from tiki_pages order by lastModif desc limit 10");
+
+$data['photos']['total'] = getone("select count(*) from tiki_files");
+$data['photos']['recent'] = getone("select count(*) from tiki_files where created > $interval");
+
+header('Content-Type: application/json');
+$json = json_encode( (object) $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
+
+if ($json === false) {
+ $json = json_encode(array("jsonError", json_last_error_msg()));
+}
+
+echo $json;