From 5f2a948f5551f0c168e6572ba500724bddf4c576 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 21 Apr 2018 18:06:42 +0200 Subject: V2 W V0 M --- public/m/index.php | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 public/m/index.php (limited to 'public/m') 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 @@ +head($titre); + +// _____________________________________________________ A L E R T _______________________________________________________________ + +if (isset($_GET['message'])) { + echo '

' . $_GET['message'] . '

'; +} + + + +// ____________________________________________________ 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 ''; +$aff->nav($app); +$aff->addmedia(); + +echo '

Media

'; + +var_dump(2 ** 29); +var_dump(readablesize(2 ** 29)); + +echo '
'; + + +$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 ''; + echo '

' . $entry . '

'; + + echo 'width = ' . $width; + echo '
'; + echo 'height = ' . $height; + echo '
'; + echo 'filesize = ' . readablesize($filesize); + echo '
'; + + + echo 'image'; + + echo '
'; + } + } + closedir($handle); +} + +echo '
'; + +echo ''; + + +?> + + + -- cgit v1.2.3