<?php

/**
 * @version $Id: editorbrowser.html 1059 2013-11-08 18:30:47Z cmb69 $
 */

?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title>Filebrowser</title>
        <link rel="stylesheet" href="./css/stylesheet.css" type="text/css" />
        <link rel="stylesheet" href="../../css/core.css" type="text/css" />
        <style type="text/css">body {padding: 0; margin: 0; overflow: auto;}</style>

        %SCRIPT%

        <script type="text/javascript" src="./js/filebrowser.js"></script>
    </head>
    <body>
        <div id="xhFilebrowserMenu">
        %MESSAGE%
            <!--   <b><?php echo $tx['filetype']['folder']; ?>:</b> <?php echo $this->currentDirectory; ?> -->
            <button type="button" onclick="FILEBROWSER.togglexhfbForm('xhfbCreateDir');"><?php echo $this->translate('create_folder'); ?></button>
            <button type="button" onclick="FILEBROWSER.togglexhfbForm('xhfbUploadFile');"><?php echo $this->translate('upload_file'); ?></button>
            <fieldset id="xhfbUploadFile" class="xhfbform">
                <legend><?php echo $this->translate('upload_file_to', $this->currentDirectory); ?></legend>
                <div style="padding: 3em;">

                    <form method="post" action="" enctype="multipart/form-data" onsubmit="return FILEBROWSER.checkUpload(this, '<?php echo $this->translate('confirm_upload');?>')">
                        <input type="file" name="fbupload" />
                        <input type="hidden" name="upload" value="upload" />
			<input type="hidden" name="filebrowser_csrf_token" value="<?php echo $this->getCSRFToken();?>"/>
                        <input type="submit" class="submit" value="<?php echo $this->translate('upload_file'); ?>" />
                    </form>
                </div>
            </fieldset>
            <fieldset id="xhfbCreateDir" class="xhfbform">
                <legend><?php echo $this->translate('create_subfolder_in', $this->currentDirectory); ?></legend>
                <div style="padding: 3em;">

                    <form method="post" action="">
                        <input type="text" name="createFolder" size="30" />
			<input type="hidden" name="filebrowser_csrf_token" value="<?php echo $this->getCSRFToken();?>"/>
                        <input type="submit" class="submit" value="<?php echo $this->translate('create_folder');?>" />
                    </form>
                </div>
            </fieldset>
        </div>
        <div id="xhFilebrowser">
            <div id="filebrowser_folders">
                %FOLDERS%
            </div>
            <div id="filebrowser_files" style="overflow: auto; z-index: 3; font-weight: 300; padding: 6px 6px 100px 30px;">
			<span class="xhfb_files"><?php echo $this->translate('files');?></span><br /><br />
                %FILES%
            </div>
            <div style="clear:both;"></div>
        </div>
    </body>
</html>