<?php

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

global $tx;
?>
<div id="xhFilebrowserMenu">
    <div id="filebrowser_folders">
        %MESSAGE%
        %FOLDERS%
    </div>

</div>
<div id="xhFilebrowser">


    <div style="clear: both;"></div>

    <div id="filebrowser_subfolders">
        <div style="clear: both; margin: 0px 0;"><b><?php echo $tx['filetype']['folder']; ?>:</b> <?php echo $this->currentDirectory; ?></div>
        <div style="text-align: right;">
        <button type="button" onclick="FILEBROWSER.togglexhfbForm('xhfbCreateDir');"><?php echo $this->translate('create_folder'); ?></button>

        </div>



        <fieldset id="xhfbCreateDir" class="xhfbform">
            <legend><?php echo $this->translate('create_subfolder_in', $this->currentDirectory); ?></legend>
            <div style="padding: 3em;">

                <form method="POST" action="#">
                    <?php echo tag('input type="text" name="createFolder" size="30"');?>
                    <?php echo tag('input type="submit" class="submit" value="' . $this->translate('create_folder') . '"');?>
		    <?php global $_XH_csrfProtection; echo $_XH_csrfProtection->tokenInput();?>
                </form>
            </div>
        </fieldset>

        %SUBFOLDERS%

    </div>
	<?php echo tag('hr');?>
	<p class="xhfb_files"><?php echo $this->translate('files');?></p>
    <div id="filebrowser_files">
         <div style="text-align: right; font-weight: 900">
                <button type="button" onclick="FILEBROWSER.togglexhfbForm('xhfbUploadFile');"><?php echo $this->translate('upload_file'); ?></button>
        </div>
               <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');?>')">
                    <?php echo tag('input type="file" name="fbupload"');?>
                    <?php echo tag('input type="hidden" name="upload" value="upload"');?>
                    <?php echo tag('input type="submit" class="submit" value="' . $this->translate('upload_file') . '"');?>
		    <?php global $_XH_csrfProtection; echo $_XH_csrfProtection->tokenInput();?>
                </form>
            </div>
        </fieldset>
        %FILES%

    </div>

    <div style="clear:both;"></div>
</div>