Example #1
0
            $options .= "<option value='{$p}'>{$p}</option>\n";
        }
        $dat = htmlentities($vars['dat']);
        print "<form method='post' action='rebill_log.php'>\n\t<select name='paysys_id'>\n\t<option value=''>*** Select a Payment System to continue ***</option>\n\t{$options}</select> <br />\n\t<label><input type='checkbox' name='repeat_declined' value='1' />\n\tRe-process payments that were marked as declined\n\t</label><br />\n\t<input type='submit' value='Continue'>\n\t<input type='hidden' name='dat' value='{$dat}'>\n\t<input type='hidden' name='do' value='rebill'>\n\t</form>\n\t";
    } else {
        // do rebill
        print "\n\t\t<h2>Manual CC Rebill {$hdat} - {$vars['paysys_id']}</h2>";
        print "<p><b>Please do not stop/exit your browser, do not run other payment processes until this process is finished!</b></p>";
        for ($i = 0; $i < 100; $i++) {
            print "          \n";
        }
        // to flush browser/apache buffer for sure
        print " Rebilling Process started at " . strftime($config['time_format']) . "....<br />\n";
        ob_end_flush();
        $dat = date('Y-m-d', strtotime($vars['dat']));
        $was = $db->query_one("SELECT COUNT(*) FROM {$db->config[prefix]}rebill_log");
        cc_core_rebill($vars['paysys_id'], $dat, $from_cron = false, intval($vars['repeat_declined']));
        $now = $db->query_one("SELECT COUNT(*) FROM {$db->config[prefix]}rebill_log");
        $added = $now - $was;
        print " Rebilling Process finished at " . strftime($config['time_format']) . ".<br />\n\t\t <b>{$added}</b> transactions processed. <br />\n";
        print "<br /><a href='rebill_log.php?do=rebill_stats'>Go back to Rebilling Stats</a>";
    }
    $t->display('admin/footer.inc.html');
}
if ($_REQUEST['do'] == 'rebill_stats') {
    do_stats();
} elseif ($_REQUEST['do'] == 'rebill') {
    do_rebill();
} else {
    do_logs();
}
        process_errors("easypress-console-proxy: admin_editor error. No edits argument provided. Domain is {$domain}.", true);
    }
}
// Print error message and exit if the API key is not valid.
if (!validate_api_key($api_key, $domain)) {
    $message = 'API key is not valid';
    echo "<h2>{$message}</h2>";
    process_errors($message, true);
}
log_console_usage($domain, $_POST);
switch ($do) {
    case 'perms':
        do_perms($domain);
        break;
    case 'logs':
        do_logs($domain);
        break;
    case 'cache':
        do_cache($domain);
        break;
    case 'stats':
        do_stats($domain);
        break;
    case 'stats_month':
        do_stats_month($domain);
        break;
    case 'lockdown':
        do_lockdown($domain);
        break;
    case 'undo_lockdown':
        do_undo_lockdown($domain);