コード例 #1
0
ファイル: index.php プロジェクト: billyprice1/whmcs
$aInt->template = "homepage";
$chart = new WHMCSChart();
$action = $whmcs->get_req_var("action");
if ($whmcs->get_req_var("createinvoices") || $whmcs->get_req_var("generateinvoices")) {
    check_token("WHMCS.admin.default");
    checkPermission("Generate Due Invoices");
    createInvoices("", $noemails);
    redir("generatedinvoices=1&count=" . $invoicecount);
}
if ($whmcs->get_req_var("generatedinvoices")) {
    infoBox($aInt->lang("invoices", "gencomplete"), (int) $whmcs->get_req_var("count") . " Invoices Created");
}
if ($whmcs->get_req_var("attemptccpayments")) {
    check_token("WHMCS.admin.default");
    checkPermission("Attempts CC Captures");
    $_SESSION['AdminHomeCCCaptureResultMsg'] = ccProcessing();
    redir("attemptedccpayments=1");
}
if ($whmcs->get_req_var("attemptedccpayments") && isset($_SESSION['AdminHomeCCCaptureResultMsg'])) {
    infoBox($aInt->lang("invoices", "attemptcccapturessuccess"), $_SESSION['AdminHomeCCCaptureResultMsg']);
    unset($_SESSION['AdminHomeCCCaptureResultMsg']);
}
releaseSession();
if ($action == "savenotes") {
    check_token("WHMCS.admin.default");
    update_query("tbladmins", array("notes" => $notes), array("id" => $_SESSION['adminid']));
    redir();
}
if ($whmcs->get_req_var("infopopup")) {
    $data = curlCall("http://api.mtimer.cn/whmcs/popup/popup.php", array("licensekey" => $whmcs->get_license_key(), "version" => $whmcs->get_config("Version"), "ssl" => isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off" ? "1" : "0"));
    if (substr($data, 0, 2) != "ok") {
コード例 #2
0
ファイル: cron.php プロジェクト: billyprice1/whmcs
if ($whmcs->get_config("CurrencyAutoUpdateExchangeRates") && $cron->isScheduled("updaterates")) {
    currencyUpdateRates();
    $cron->logActivity("Done", true);
}
if ($whmcs->get_config("CurrencyAutoUpdateProductPrices") && $cron->isScheduled("updatepricing")) {
    currencyUpdatePricing();
    $cron->logActivity("Done", true);
}
if ($cron->isScheduled("invoices")) {
    createInvoices();
}
if ($cron->isScheduled("latefees")) {
    InvoicesAddLateFee();
}
if ($cron->isScheduled("ccprocessing")) {
    ccProcessing();
}
if ($cron->isScheduled("invoicereminders")) {
    if ($CONFIG['SendReminder'] == "on") {
        $reminders = "";
        if ($CONFIG['SendInvoiceReminderDays']) {
            $invoiceids = array();
            $invoicedateyear = date("Ymd", mktime(0, 0, 0, date("m"), date("d") + $CONFIG['SendInvoiceReminderDays'], date("Y")));
            $query = "SELECT * FROM tblinvoices WHERE duedate='" . $invoicedateyear . "' AND `status`='Unpaid'";
            $result = full_query($query);
            while ($data = mysql_fetch_array($result)) {
                $id = $data['id'];
                sendMessage("Invoice Payment Reminder", $id);
                run_hook("InvoicePaymentReminder", array("invoiceid" => $id, "type" => "reminder"));
                $invoiceids[] = $id;
            }