Exemple #1
0
<?php

if (cfr('BACKUP')) {
    set_time_limit(0);
    $alterConf = $ubillingConfig->getAlter();
    if (!wf_CheckGet(array('restore'))) {
        if (isset($_POST['createbackup'])) {
            if (isset($_POST['imready'])) {
                if (!empty($alterConf['MYSQLDUMP_PATH'])) {
                    //run system mysqldump command
                    zb_backup_database();
                } else {
                    //using old native mysql storing function
                    zb_backup_tables();
                }
            } else {
                show_error(__('You are not mentally prepared for this'));
            }
        }
        //downloading mysql dump
        if (wf_CheckGet(array('download'))) {
            if (cfr('ROOT')) {
                $filePath = base64_decode($_GET['download']);
                zb_DownloadFile($filePath);
            } else {
                show_error(__('Access denied'));
            }
        }
        //deleting dump
        if (wf_CheckGet(array('deletedump'))) {
            if (cfr('ROOT')) {
Exemple #2
0
     if ($alterconf['CAP_ENABLED']) {
         $dostoevsky = new CrimeAndPunishment();
         $dostoevsky->processing();
         die('OK:CRIMEANDPUNISHMENT');
     } else {
         die('ERROR:CRIMEANDPUNISHMENT_DISABLED');
     }
 }
 /*
  * database backup
  */
 if ($_GET['action'] == 'backupdb') {
     if ($alterconf['MYSQLDUMP_PATH']) {
         $backpath = zb_backup_database(true);
     } else {
         $backpath = zb_backup_tables('*', true);
     }
     die('OK:BACKUPDB ' . $backpath);
 }
 /*
  * database cleanup
  */
 if ($_GET['action'] == 'autocleandb') {
     $cleancount = zb_DBCleanupAutoClean();
     die('OK:AUTOCLEANDB ' . $cleancount);
 }
 /*
  * UHW brute attempts cleanup
  */
 if ($_GET['action'] == 'uhwbrutecleanup') {
     $uhw = new UHW();