Beispiel #1
0
    public function display()
    {
        $contentpath = Settings::getInstance()->get("root") . "content/articles/" . $_SESSION['dir'] . "/";
        if (isset($_POST['name'])) {
            if (FileServer::IsValidFoldername($_POST['name'])) {
                FileServer::createFolder($contentpath, $_POST['name']);
                ?>
            <script language="JavaScript"><!--
                window.location.href="<?php 
                echo UrlRewriting::GetUrlByAlias("admin/home", "dir=" . $_SESSION['dir'] . "/" . $_POST['name']);
                ?>
";
            // --></script> 
            <?php 
            } else {
                echo Language::DirectTranslateHtml("INVALID_FOLDERNAME");
            }
        }
        $template = new Template();
        $template->load("new_folder");
        $template->output();
    }