?> </button> </td> </tr> </table> <br /> <div class="cb-import" id="cb-droplets" > <?php if (is_readable($sArchiveFile)) { if (!class_exists('PclZip', false)) { require WB_PATH . '/include/pclzip/pclzip.lib.php'; } $oArchive = new PclZip($sArchiveFile); $aFilesInArchiv = $oArchive->listContent(); if ($aFilesInArchiv == 0) { msgQueue::add($Droplet_Message['GENERIC_MISSING_ARCHIVE_FILE']); } else { ?> <table class="droplets_import" style="margin-bottom: 1.225em;"> <thead> <tr> <th style="width: 3%;"> <label> <input name="select_all" id="select_all" type="checkbox" value="1" /> </label> </th> <th style="width: 3%;"></th> <th style="width: 3%;"></th> <th style="width: 30%;"><?php echo $Droplet_Header['FILENAME']; ?>
</div> </div> </form> </div> <?php } elseif (!isset($aRequestVars['cancel'])) { $sDropletsToDelete = $aRequestVars['DropletsToDelete']; $iDELETED = sizeof(explode(',', $sDropletsToDelete)); $sql = 'DELETE FROM `' . TABLE_PREFIX . 'mod_droplets` ' . 'WHERE `id` IN (' . $sDropletsToDelete . ') '; // Delete droplet $database->query($sql); // Check if there is a db error, otherwise say successful if ($database->is_error()) { msgQueue::add($database->get_error() . '<br />' . $sql); } else { msgQueue::add(sprintf("%'.02d", $iDELETED) . ' ' . $DR_TEXT['DROPLETS_DELETED'], true); } } else { /* do nothing */ } ?> </div><script > <!-- domReady(function() { LoadOnFly('head', WB_URL+"<?php echo $ModuleRel . $sStyleFolder; ?> css/customAlert.css"); }); --> </script>
} // unzip to buffer and store in DB / fetch ach entry as single process, to surpress buffer overflow foreach ($aRequestVars['restore_id'] as $index => $iArchiveIndex) { $oArchive = new PclZip($aRequestVars['ArchiveFile']); $sDroplet = $oArchive->extract(PCLZIP_OPT_BY_INDEX, $iArchiveIndex, PCLZIP_OPT_EXTRACT_AS_STRING); if ($sDroplet == 0) { msgQueue::add('UNABLE TO UNZIP FILE' . '::' . $oArchive->errorInfo(true)); } else { // $sSearchFor = 'php'; // $file_types = preg_replace( '/\s*[,;\|#]\s*/','|',$sSearchFor ); // if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) { $aDroplet['name'] = $sDroplet[0]['filename']; $aDroplet['content'] = explode("\n", $sDroplet[0]['content']); // if ( !preg_match('/'.$file_types.'/si', $aDroplet['name'], $aMatch) ) { // continue; } if ($sTmp = insertDroplet($aDroplet, false)) { $aUnzipDroplets[] = $sTmp; } } } // if (($error = $oArchive->errorCode()) != 0) { msgQueue::add(sizeof($aUnzipDroplets) . ' ' . $Droplet_Import['ARCHIV_IMPORTED']); } else { if (sizeof($aUnzipDroplets) > 0) { msgQueue::add(implode(', ', $aUnzipDroplets) . '<br />' . sizeof($aUnzipDroplets) . ' ' . $Droplet_Import['ARCHIV_IMPORTED'], true); } else { msgQueue::add(sizeof($aUnzipDroplets) . ' ' . $Droplet_Import['ARCHIV_IMPORTED'], true); } } }
* @copyright WebsiteBaker Org. e.V. * @link http://websitebaker.org/ * @license http://www.gnu.org/licenses/gpl.html * @platform WebsiteBaker 2.8.3 * @requirements PHP 5.4 and higher * @version $Id: $ * @filesource $HeadURL: $ * @lastmodified $Date: $ * */ /* -------------------------------------------------------- */ // Must include code to stop this file being accessed directly if (defined('WB_PATH') == false) { die('Cannot access ' . basename(__DIR__) . '/' . basename(__FILE__) . ' directly'); } /* -------------------------------------------------------- */ if (!$admin->checkFTAN()) { $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $ToolUrl); exit; } if (@$aRequestVars['zipFiles'] == '') { msgQueue::add($Droplet_Message['GENERIC_MISSING_ARCHIVE_FILE']); } else { $sArchFile = WB_PATH . $aRequestVars['zipFiles']; $unlink = @unlink($sArchFile); if ($unlink == false) { msgQueue::add($Droplet_Message['ARCHIVE_NOT_DELETED']); } else { msgQueue::add($Droplet_Message['ARCHIVE_DELETED'], true); } }
echo $aDroplet['stored_filename']; ?> </strong></li> <?php } ?> </ol> <div class="drop-backup"> <h2>Backup created - <a class="btn" href="<?php echo WB_URL . $sBackupDir . $sBackupName; ?> "><?php echo $Droplet_Message['GENERIC_LOCAL_DOWNLOAD']; ?> </a> <button style="padding: 0.2825em 0.8525em; " name="cancel" class="btn" type="button" onclick="window.location='<?php echo $ToolUrl; ?> ';"><?php echo $TEXT['CANCEL']; ?> </button> </h2> </div> </section> <?php } else { msgQueue::add('Backup not created - ' . $TEXT['BACK'] . ''); }
extract($aQuery, EXTR_PREFIX_SAME, "dr"); if (is_readable($sCommand)) { include $sCommand; } $output = ob_get_clean(); break; case 'delete_archiv': ob_start(); extract($aQuery, EXTR_PREFIX_SAME, "dr"); if (is_readable($sCommand)) { include $sCommand; } $output = ob_get_clean(); break; default: msgQueue::add($DR_TEXT['INVALID_BACK']); break; } if (($msg = msgQueue::getSuccess()) != '') { $output = $admin->print_success($msg, $ToolUrl) . $output; } if (($msg = msgQueue::getError()) != '') { $output = $admin->print_error($msg, $ToolUrl) . $output; } print $output; $admin->print_footer(); ?> <script type="text/javascript"> <!-- domReady(function() { LoadOnFly('head', WB_URL+"<?php