Exemple #1
0
    $widgets = explode(",", $widgets);
    foreach ($widgets as $k => $v) {
        if ($v == "getting_started") {
            unset($widgets[$k]);
            continue;
        }
    }
    update_query("tbladminroles", array("widgets" => implode(",", $widgets)), array("id" => $roleid));
    exit;
}
if ($whmcs->get_req_var("getincome")) {
    check_token("WHMCS.admin.default");
    if (!checkPermission("View Income Totals", true)) {
        return false;
    }
    $stats = getAdminHomeStats("income");
    echo "<a href=\"transactions.php\"><img src=\"images/icons/transactions.png\" align=\"absmiddle\" border=\"0\"> <b>" . $aInt->lang("billing", "income") . "</b></a> " . $aInt->lang("billing", "incometoday") . ": <span class=\"textgreen\"><b>" . $stats['income']['today'] . "</b></span> " . $aInt->lang("billing", "incomethismonth") . ": <span class=\"textred\"><b>" . $stats['income']['thismonth'] . "</b></span> " . $aInt->lang("billing", "incomethisyear") . ": <span class=\"textblack\"><b>" . $stats['income']['thisyear'] . "</b></span>";
    exit;
}
$templatevars['licenseinfo'] = array("registeredname" => $licensing->getKeyData("registeredname"), "productname" => $licensing->getKeyData("productname"), "expires" => $licensing->getExpiryDate(), "currentversion" => $CONFIG['Version'], "latestversion" => $licensing->getKeyData("latestversion"));
if ($licensing->getKeyData("productname") == "15 Day Free Trial") {
    $templatevars['freetrial'] = true;
}
$templatevars['infobox'] = $infobox;
$query = "SELECT COUNT(*) FROM tblpaymentgateways WHERE setting='type' AND value='CC'";
$result = full_query($query);
$data = mysql_fetch_array($result);
if ($data[0]) {
    $templatevars['showattemptccbutton'] = true;
}
if ($CONFIG['MaintenanceMode']) {
Exemple #2
0
<?php

/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
if (!defined("WHMCS")) {
    exit("This file cannot be accessed directly");
}
$stats = getAdminHomeStats();
$apiresults = array("result" => "success");
foreach ($stats['income'] as $k => $v) {
    $apiresults["income_" . $k] = $v;
}
$result = select_query("tblorders", "COUNT(*)", array("status" => "Pending"));
$data = mysql_fetch_array($result);
$apiresults['orders_pending'] = $data[0];
foreach ($stats['orders']['today'] as $k => $v) {
    $apiresults["orders_today_" . $k] = $v;
}
foreach ($stats['orders']['yesterday'] as $k => $v) {
    $apiresults["orders_yesterday_" . $k] = $v;
}
$apiresults['orders_thismonth_total'] = $stats['orders']['thismonth']['total'];
$apiresults['orders_thisyear_total'] = $stats['orders']['thisyear']['total'];