aboutsummaryrefslogtreecommitdiff
path: root/public/m
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-04-21 18:06:42 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-04-21 18:06:42 +0200
commit5f2a948f5551f0c168e6572ba500724bddf4c576 (patch)
treec0e4563a3dac7eaf3e45508733dda0f0bb2e8888 /public/m
parentbf51c13452f7c38d7dc347bac8a6e9f2932532fb (diff)
downloadwcms-5f2a948f5551f0c168e6572ba500724bddf4c576.tar.gz
wcms-5f2a948f5551f0c168e6572ba500724bddf4c576.zip
V2 W V0 M
Diffstat (limited to 'public/m')
-rw-r--r--public/m/index.php104
1 files changed, 104 insertions, 0 deletions
diff --git a/public/m/index.php b/public/m/index.php
new file mode 100644
index 0000000..f5e101d
--- /dev/null
+++ b/public/m/index.php
@@ -0,0 +1,104 @@
+<?php
+
+// _____________________________________________________ R E Q U I R E ________________________________________________________________
+
+
+$config = require('../../config.php');
+
+
+
+require('../../fn/fn.php');
+require('../../class/class.art.php');
+require('../../class/class.app.php');
+require('../../class/class.aff.php');
+session();
+if (!isset($_SESSION['level'])) {
+ $level = 0;
+} else {
+ $level = $_SESSION['level'];
+}
+$app = new App($config);
+$aff = new Aff($level);
+
+
+
+// ______________________________________________________ H E A D _____________________________________________________________
+$titre = 'home';
+$aff->head($titre);
+
+// _____________________________________________________ A L E R T _______________________________________________________________
+
+if (isset($_GET['message'])) {
+ echo '<h4>' . $_GET['message'] . '</h4>';
+}
+
+
+
+// ____________________________________________________ A C T I O N _______________________________________________________________
+
+
+if (isset($_POST['action'])) {
+ switch ($_POST['action']) {
+ case 'addmedia':
+ $app->addmedia($_FILES, 2 ** 30, $_POST['id']);
+ break;
+ }
+}
+
+// ______________________________________________________ B O D Y _______________________________________________________________
+
+
+
+echo '<body>';
+$aff->nav($app);
+$aff->addmedia();
+
+echo '<h1>Media</h1>';
+
+var_dump(2 ** 29);
+var_dump(readablesize(2 ** 29));
+
+echo '<section class="grid">';
+
+
+$dir = "../media/";
+
+
+if ($handle = opendir($dir)) {
+ while (false !== ($entry = readdir($handle))) {
+ if ($entry != "." && $entry != "..") {
+ $fileinfo = pathinfo($entry);
+
+ $filepath = '../media/' . $fileinfo['filename'] . '.' . $fileinfo['extension'];
+
+ list($width, $height, $type, $attr) = getimagesize($filepath);
+ $filesize = filesize($filepath);
+
+ echo '<span>';
+ echo '<h2>' . $entry . '</h2>';
+
+ echo 'width = ' . $width;
+ echo '<br/>';
+ echo 'height = ' . $height;
+ echo '<br/>';
+ echo 'filesize = ' . readablesize($filesize);
+ echo '<br/>';
+
+
+ echo '<img class="thumbnail" src="' . $filepath . '" title="' . $fileinfo['filename'] . '" alt="image">';
+
+ echo '</span>';
+ }
+ }
+ closedir($handle);
+}
+
+echo '</section>';
+
+echo '</body>';
+
+
+?>
+
+
+