is_logged()) { die('Vous devez être connecté !'); } if (!empty($_GET['delete']) && !empty($_GET['yes'])) { $nanokubbe->deleteFile($_GET['delete']); header('Location: files.php?base='.$_GET['delete']); exit; } if (!empty($_POST['base'])) $base = $_POST['base']; elseif (!empty($_GET['base'])) $base = $_GET['base']; if (preg_match('/[\.:]/', $base)) $base = ''; $base = preg_replace('/^\//', '', $base); $base = preg_replace('/([^\/]+)$/', '', $base); if (!empty($_POST['newpage']) && !empty($_POST['createPage'])) { $page = preg_replace('/^[^a-z0-9A-Z_-]+$/', '', $_POST['newpage']); header('Location: page.php?page='.$base.'/'.$page); exit; } if (!empty($_POST['newfile']) && !empty($_POST['createFile'])) { $file = preg_replace('/^[^a-z0-9A-Z._-]+$/', '', $_POST['newfile']); header('Location: edit.php?file='.$base.'/'.$file); exit; } if (!empty($_POST['newdir']) && !empty($_POST['createDir'])) { $dir = $nanokubbe->createDir($base, $_POST['newdir']); header('Location: files.php?base='.$base.'/'.$dir); exit; } if (!empty($_FILES['upload'])) { $nanokubbe->uploadFile($base, $_FILES['upload']); header('Location: files.php?base='.$base); exit; } $files = $nanokubbe->listFiles($base); header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); echo '
Aucun fichier ici.
'; else { echo ''.$file['name'].' | '; } elseif ($file['type'] == 'page') { echo ''.$file['name'].' | Editer | '; } elseif ($file['type'] == 'text') { echo ' | '.$file['file'].' | Editer | Supprimer | '; } elseif ($file['type'] == 'image') { echo ''.$file['file'].' | Supprimer | '; } else { echo ''.$file['file'].' | '; } echo '
---|