Esempio n. 1
0
            }
        }
        redir("id=" . $invoiceid);
    }
    $smartyvalues['manualapplycredit'] = true;
    $smartyvalues['totalcredit'] = formatCurrency($creditbal) . generate_token("form");
    if (!$creditamount) {
        $creditamount = $balance <= $creditbal ? $balance : $creditbal;
    }
    $smartyvalues['creditamount'] = $creditamount;
}
$outputvars = $invoice->getOutput();
$smartyvalues = array_merge($smartyvalues, $outputvars);
$invoiceitems = $invoice->getLineItems();
$smartyvalues['invoiceitems'] = $invoiceitems;
$transactions = $invoice->getTransactions();
$smartyvalues['transactions'] = $transactions;
$paymentbutton = $invoice->getData("status") == "Unpaid" && 0 < $invoice->getData("balance") ? $invoice->getPaymentLink() : "";
$smartyvalues['paymentbutton'] = $paymentbutton;
$smartyvalues['offlinepaid'] = $whmcs->get_req_var("offlinepaid");
if ($whmcs->get_config("AllowCustomerChangeInvoiceGateway")) {
    $smartyvalues['allowchangegateway'] = true;
    $gateways = new WHMCS_Gateways();
    $availablegateways = $gateways->getAvailableGateways($invoiceid);
    $frm = new WHMCS_Form();
    $gatewaydropdown = generate_token("form") . $frm->dropdown("gateway", $availablegateways, $invoice->getData("paymentmodule"), "submit()");
    $smartyvalues['gatewaydropdown'] = $gatewaydropdown;
} else {
    $smartyvalues['allowchangegateway'] = false;
}
outputClientArea("viewinvoice", true);
Esempio n. 2
0
echo $frmsub->hidden("action", "send");
echo $frmsub->hidden("type", "product");
echo $frmsub->hidden("id", $id);
$emailarr = array();
$emailarr['newmessage'] = $aInt->lang("emails", "newmessage");
$result = select_query("tblemailtemplates", "", array("type" => "product", "language" => ""), "name", "ASC");
while ($data = mysql_fetch_array($result)) {
    $messagename = $data['name'];
    $custom = $data['custom'];
    $emailarr[$messagename] = $custom ? array("#efefef", $messagename) : $messagename;
}
echo $frmsub->dropdown("messagename", $emailarr);
echo $frmsub->submit($aInt->lang("global", "sendmessage"));
echo $frmsub->close();
echo "</td><td>";
$frmsub = new WHMCS_Form("frm4");
echo $frmsub->form("clientsemails.php?userid=" . $userid);
echo $frmsub->hidden("action", "send");
echo $frmsub->hidden("type", "product");
echo $frmsub->hidden("id", $id);
echo $frmsub->hidden("messagename", "defaultnewacc");
echo $frmsub->submit($aInt->lang("emails", "senddefaultproductwelcome"));
echo $frmsub->close();
echo "</td></tr></table>\n</div>\n\n<form method=\"post\" action=\"whois.php\" target=\"_blank\" id=\"frmWhois\">\n<input type=\"hidden\" name=\"domain\" value=\"" . $domain . "\" />\n</form>\n";
$content = ob_get_contents();
ob_end_clean();
if ($whmcs->get_req_var("ajaxupdate")) {
    $content = preg_replace('/(<form\\W[^>]*\\bmethod=(\'|"|)POST(\'|"|)\\b[^>]*>)/i', '$1' . "\n" . generate_token(), $content);
    echo $content;
    exit;
} else {
Esempio n. 3
0
 *
 * @ Version  : 5.2.15
 * @ Author   : MTIMER
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
define("ADMINAREA", true);
require "../init.php";
$aInt = new WHMCS_Admin("Configure Two-Factor Authentication");
$aInt->title = $aInt->lang("twofa", "title");
$aInt->sidebar = "config";
$aInt->icon = "security";
$aInt->helplink = "Security Modules";
$aInt->requiredFiles(array("modulefunctions"));
$frm = new WHMCS_Form();
if ($frm->issubmitted()) {
    $whmcs->set_config("2fasettings", serialize(array("forceclient" => $whmcs->get_req_var("forceclient"), "forceadmin" => $whmcs->get_req_var("forceadmin"), "modules" => $whmcs->get_req_var("mod"))));
    redir("success=1");
}
ob_start();
if ($purchased) {
    $licensing->forceRemoteCheck();
    redir();
}
$twofasettings = $whmcs->get_config("2fasettings");
$twofasettings = unserialize($twofasettings);
echo $frm->form();
echo "<table width=\"100%\"><tr><td width=\"45%\" valign=\"top\">\n\n<div style=\"padding:20px;background-color:#FAF5E4;-moz-border-radius: 10px;-webkit-border-radius: 10px;-o-border-radius: 10px;border-radius: 10px;\">";
echo "\n\n<strong>What is Two-Factor Authentication?</strong><br /><br />\n\nTwo-factor authentication adds an additional layer of security by adding a second step to your login. It takes something you know (ie. your password) and adds a second factor, typically something you have (such as your phone.) Since both are required to log in, even if an attacker has your password they can't access your account.\n\n<div style=\"margin:20px auto;padding:10px;width:370px;background-color:#fff;-moz-border-radius: 10px;-webkit-border-radius: 10px;-o-border-radius: 10px;border-radius: 10px;\"><img src=\"images/twofahow.png\" width=\"350\" height=\"233\" /></div>\n\n<strong>Why do you need it?</strong><br /><br />\n\nPasswords are increasingly easy to compromise. They can often be guessed or leaked, they usually don't change very often, and despite advice otherwise, many of us have favorite passwords that we use for more than one thing. So Two-factor authentication gives you additional security because your password alone no longer allows access to your account.<br /><br />\n\n<strong>How it works?</strong><br /><br />\n\nThere are many different options available, and in WHMCS we support more than one so <i>you</i> have the choice.  But one of the most common and simplest to use is time based one-time passwords.  With these, in addition to your regular username & password, you also have to enter a 6 digit code that changes every 30 seconds.  Only your token device (typically a mobile smartphone) will know your secret key, and be able to generate valid one time passwords for your account.  And so your account is far safer.<br /><br />\n\n<strong>Force Settings</strong><br /><br />\n\n";
echo $frm->checkbox("forceclient", "Force Clients to enable Two Factor Authentication on Next Login", $twofasettings['forceclient']) . "<br />";