Browse code

Externalisation du systeme de menu commun aux jeux

schardon authored on 27/04/2020 23:08:28
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,12 @@
1
+<?php
2
+
3
+function isAjax() {
4
+  return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest';
5
+}
6
+
7
+if( !isAjax() ) {
8
+  header('Location: ../index.php');
9
+  exit();
10
+}
11
+
12
+?>