Example #1
0
                     $cells .= wf_TableCell($downloadLink);
                     $rows .= wf_TableRow($cells, 'row3');
                 } else {
                     $cells = wf_TableCell('');
                     $cells .= wf_TableCell('');
                     $cells .= wf_TableCell($eachConfig);
                     $rows .= wf_TableRow($cells, 'row3');
                 }
             }
             $result = wf_TableBody($rows, '100%', '0', 'sortable');
         }
         return $result;
     }
     //tables cleanup
     if (wf_CheckGet(array('tableclean'))) {
         zb_DBTableCleanup($_GET['tableclean']);
         rcms_redirect("?module=backups");
     }
     show_window(__('Create backup'), web_BackupForm());
     show_window(__('Available database backups'), web_AvailableDBBackupsList());
     show_window(__('Important Ubilling configs'), web_ConfigsUbillingList());
     show_window(__('Database cleanup'), web_DBCleanupForm());
 } else {
     //database restoration functionality
     if (cfr('ROOT')) {
         if (!empty($alterConf['MYSQL_PATH'])) {
             if (wf_CheckGet(array('restoredump'))) {
                 $mysqlConf = rcms_parse_ini_file(CONFIG_PATH . 'mysql.ini');
                 $billingConf = $ubillingConfig->getBilling();
                 $restoreFilename = base64_decode($_GET['restoredump']);
                 if (file_exists($restoreFilename)) {
Example #2
0
function zb_DBCleanupAutoClean()
{
    $oldLogs = zb_DBCleanupGetLogs();
    $oldDstat = zb_DBCleanupGetDetailstat();
    $allClean = $oldLogs + $oldDstat;
    $counter = 0;
    if (!empty($allClean)) {
        foreach ($allClean as $io => $each) {
            zb_DBTableCleanup($each['name']);
            $counter++;
        }
    }
    return $counter;
}