Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        module
5
 * @package         droplet
6
 * @author          Ruud Eisinga (Ruud) John (PCWacht)
7
 * @author          WebsiteBaker Project
8
 * @copyright       Ryan Djurovich
9
 * @copyright       WebsiteBaker Org. e.V.
10
 * @link            http://websitebaker.org/
11
 * @license         http://www.gnu.org/licenses/gpl.html
12
 * @platform        WebsiteBaker 2.8.3
13
 * @requirements    PHP 5.3.6 and higher
14
 * @version         $Id: call_import.php 2 2017-07-02 15:14:29Z Manuela $
15
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/branches/main/modules/droplets/commands/call_import.php $
16
 * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
17
 *
18
 */
19
/* -------------------------------------------------------- */
20
// Must include code to stop this file being accessed directly
21
if(defined('WB_PATH') == false) { die('Illegale file access /'.basename(__DIR__).'/'.basename(__FILE__).''); }
22
/* -------------------------------------------------------- */
23
$sBackupDir = $sAddonRel.'/data/archiv/';
24
$aZipFiles = glob($oReg->AppPath.$sAddonRel.'/data/archiv/*.zip', GLOB_NOSORT);
25
?><form action="<?php echo $ToolUrl; ?>" method="post" name="droplets_form" enctype="multipart/form-data" >
26
    <div class="droplet-import block-outer modalDialog" id="import" draggable="true" style="overflow: hidden;">
27
    <div style="width: 71.525em;">
28
         <button name="cancel" class="close" type="button" onclick="window.location='<?php echo $ToolUrl; ?>';">X</button>
29
        <header class="modal-label"><h2><?php echo $oTrans->DR_TEXT_RESTORE; ?></h2></header>
30
        <div class="modal-inner file-select-box">
31
            <span style="margin-left: 10.525em;"></span>
32
            <span style="text-align: left; padding: 0.525em 0;">
33
                <select size="1" name="zipFiles" >
34
                    <option style=" padding: 0.225em 0.455em;" value=""><?php echo $oTrans->DR_TEXT_PLEASE_SELECT; ?></option>
35
<?php
36
foreach( $aZipFiles as $files ) {
37
      $value =  basename($files);
38
      $files = str_replace($oReg->AppPath, '', $files );
39
 ?>
40
              <option style=" padding: 0.225em 0.455em;" value="<?php echo $files; ?>"><?php echo $value; ?></option>
41
<?php } ?></select>
42
            <button class="btn" type="submit" name="command" value="import_droplets"><?php echo $oTrans->DR_TEXT_ARCHIV_LOAD; ?></button>
43
            <button class="btn" type="submit" name="command" value="delete_archiv"><?php echo $oTrans->TEXT_DELETE; ?></button>
44
            </span>
45
            <div class="file-box">
46
                <span style="margin-left: 10.025em;"> </span>
47
                <span style="text-align: left; padding: 0.525em 0; display: inline-block; margin: 0.525em;">
48
                    <input type="file" name="zipFiles" id="file" class="inputfile inputfile-6" data-multiple-caption="{count} files selected" multiple />
49
                    <label for="file"><span></span> <strong>
50
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17">
51
                    <path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/>
52
                    </svg> Choose a file&hellip;</strong>
53
                    </label>
54
                    <button  class="input-file btn command" name="command" value="import_droplets" type="submit"><?php echo $oTrans->DROPLET_MESSAGE_GENERIC_LOCAL_UPLOAD; ?></button>
55
                </span>
56
            </div>
57
        </div>
58
        <footer class="modal-label">
59
            <h4 style="margin-left: 0.955em; top: 0.925em; position: relative;">Upload icon by <a href="http://www.flaticon.com/free-icon/outbox_3686" target="_blank">FlatIcon</a>.</h4>
60
        </footer>
61
    </div>
62
  </div>
63
</form>
(5-5/16)