if (!$errormessage) { $firstname = $data['firstname']; $lastname = $data['lastname']; $email = $data['email']; $signature = $data['signature']; $notes = $data['notes']; $template = $data['template']; $language = $data['language']; $ticketnotifications = $data['ticketnotifications']; $ticketnotify = explode(",", $ticketnotifications); } $username = $data['username']; $adminrole = $data['name']; $language = $whmcs->validateLanguage($language, true); ob_start(); $aInt->dialog("2fasetup"); if ($whmcs->get_req_var("success")) { infoBox($aInt->lang("administrators", "changesuccess"), $aInt->lang("administrators", "changesuccessinfo2")); } if ($errormessage) { infoBox($aInt->lang("global", "validationerror"), $errormessage); } echo $infobox; echo "\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?action=save\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"20%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "username"); echo "</td><td class=\"fieldarea\"><b>"; echo $username; echo "</b></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("administrators", "role");
} $invoicedialog = $aInt->jqueryDialog("geninvoices", $aInt->lang("invoices", "geninvoices"), $aInt->lang("invoices", "geninvoicessendemails"), array($aInt->lang("global", "yes") => "window.location='index.php?generateinvoices=true" . generate_token("link") . "'", $aInt->lang("global", "no") => "window.location='index.php?generateinvoices=true&noemails=true" . generate_token("link") . "'")); $cccapturedialog = $aInt->jqueryDialog("cccapture", $aInt->lang("invoices", "attemptcccaptures"), $aInt->lang("invoices", "attemptcccapturessure"), array($aInt->lang("global", "yes") => "window.location='index.php?attemptccpayments=true" . generate_token("link") . "'", $aInt->lang("global", "no") => "")); $addons_html = run_hook("AdminHomepage", array()); $templatevars['addons_html'] = $addons_html; if (get_query_val("tbladmins", "roleid", array("id" => (int) $_SESSION['adminid'])) == 1) { $infotoggle = unserialize($whmcs->get_config("ToggleInfoPopup")); if (!is_array($infotoggle)) { $infotoggle = array(); } $showdialog = true; if (isset($infotoggle[$_SESSION['adminid']])) { $dismissdate = $infotoggle[$_SESSION['adminid']]; $lastupdate = curlCall("http://api.mtimer.cn/whmcs/popup/popup.php", "lastupdate=1", array("CURLOPT_TIMEOUT" => "5")); if ($dismissdate < $lastupdate) { unset($infotoggle[$_SESSION['adminid']]); $whmcs->set_config("ToggleInfoPopup", serialize($infotoggle)); } else { $showdialog = false; } } if ($showdialog) { $aInt->dialog("infopopup"); $jquerycode .= "dialogOpen();"; $jscode .= "function toggleInfoPopup() { jQuery.post(\"index.php\", \"toggleinfopopup=1" . generate_token("link") . "&showhide=\"+\$(\"#toggleinfocb\").is(\":checked\")); }"; } } $aInt->jscode = $jscode; $aInt->jquerycode = $jquerycode; $aInt->templatevars = $templatevars; $aInt->display();
echo "<div id=\"conf" . $module . "\" style=\"" . $showstyle . "\">"; $tbl = new WHMCS_Table(); $tbl->add("Enable for Clients", $frm->checkbox("mod[" . $module . "][clientenabled]", "Tick to Enable", $moduleconfigdata['clientenabled'], "1", "enable" . $module), 1); $tbl->add("Enable for Staff", $frm->checkbox("mod[" . $module . "][adminenabled]", "Tick to Enable", $moduleconfigdata['adminenabled'], "1", "enable" . $module), 1); foreach ($configarray as $key => $values) { if ($values['Type'] != "System") { if (!isset($values['FriendlyName'])) { $values['FriendlyName'] = $key; } $values['Name'] = "mod[" . $module . "][" . $key . "]"; $values['Value'] = htmlspecialchars($moduleconfigdata[$key]); $tbl->add($values['FriendlyName'], moduleConfigFieldOutput($values), 1); continue; } } echo $tbl->output(); echo "<p align=\"center\">" . $frm->submit($aInt->lang("global", "savechanges")) . "</p>"; echo "</div>"; echo "</div>"; ++$i; } echo "</td></tr></table>"; echo $frm->close(); $aInt->dialog("", "<div class=\"content\"><div style=\"padding:15px;\"><h2>Two-Factor Authentication Subscription</h2><br /><br /><div align=\"center\">You will now be redirected to purchase the selected<br />Two-Factor Authentcation solution in a new browser window.<br /><br />Once completed, please click on the button below to continue.<br /><br /><br /><form method=\"post\" action=\"configtwofa.php\"><input type=\"hidden\" name=\"purchased\" value=\"1\" /><input type=\"submit\" value=\"Continue »\" class=\"btn\" onclick=\"dialogClose()\" /></form></div></div></div>"); $content = ob_get_contents(); ob_end_clean(); $jscode = "\nfunction activate(mod) {\n \$(\"#activatebtn\"+mod).hide();\n \$(\"#conf\"+mod).fadeIn();\n}\nfunction deactivate(mod) {\n \$(\".enable\"+mod).attr(\"checked\",false);\n \$(\"#conf\"+mod).fadeOut();\n \$(\"#" . $frm->getname() . "\").submit();\n}\n"; $aInt->content = $content; $aInt->jquerycode = $jquerycode; $aInt->jscode = $jscode; $aInt->display();