Esempio n. 1
0
 /**
  * Removes all the ZIPs
  * 
  * @author Woxxy
  * @returns bool 
  */
 function remove_all()
 {
     $archives = new Archive();
     $archives->get();
     foreach ($archive->all as $archive) {
         $archive->remove();
     }
 }
Esempio n. 2
0
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* create a archive dump of a database
* 
* Calendar
* 
* 07/09/2004 by Christian Ehret chris@uffbasse.de
*/
$nocachecontrol = true;
include_once "../includes/default.inc.php";
include_once "archiveclass.inc.php";
$archive = new Archive();
$auth->is_authenticated();
$database = $request->getVar('frm_database', 'post');
$filename = $database . "_archive_" . date("Ymd") . ".sql";
$date = $request->getVar('frm_thedate', 'post');
if ($request->getVar('frm_delete') == 'yes') {
    $delete = true;
} else {
    $delete = false;
}
$output = $archive->get($date, $delete);
header("Cache-control: private");
header("Content-type: application/txt");
header("Content-Disposition: attachment; filename=\"{$filename}\"");
echo $output;