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: select_archiv.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/select_archiv.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
    $aFtan = $admin->getFTAN('');
26
    // prepare default data for phplib and twig
27
    $aTplData = array (
28
        'FTAN_NAME' => $aFtan['name'],
29
        'FTAN_VALUE' => $aFtan['value'],
30
        );
31
// Create new template object with phplib
32
    $oTpl = new Template($sAddonThemePath, 'keep' );
33
    $oTpl->set_file('page', 'select_archiv.htt');
34
    $oTpl->set_block('page', 'main_block', 'main');
35
    $oTpl->set_var($aLang);
36
    $oTpl->set_var($aTplDefaults);
37
    $oTpl->set_var($aTplData);
38
    $oTpl->set_block('main_block', 'list_archiv_block', 'list_archiv');
39
    foreach( $aZipFiles as $files ) {
40
        $value =  basename($files);
41
        $files = str_replace($oReg->AppPath, '', $files );
42
        $oTpl->set_var('files', $files);
43
        $oTpl->set_var('value', $value);
44
        $oTpl->parse('list_archiv', 'list_archiv_block', true);
45
    }
46

    
47
/*-- finalize the page -----------------------------------------------------------------*/
48
    $oTpl->parse('main', 'main_block', false);
49
    $oTpl->pparse('output', 'page');
50

    
(16-16/16)