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 { $content = "<div id=\"servicecontent\">" . $content . "</div>";
$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 />"; echo $frm->checkbox("forceadmin", "Force Administrator Users to enable Two Factor Authentication on Next Login", $twofasettings['forceadmin']) . "<br /><br />"; echo $frm->submit($aInt->lang("global", "savechanges")); echo "</td><td width=\"55%\" valign=\"top\">"; $mod = new WHMCS_Module(); $moduleslist = $mod->getList("security"); if (!$moduleslist) { $aInt->gracefulExit("Security Module Folder Not Found. Please try reuploading all WHMCS related files."); } $i = 0; foreach ($moduleslist as $module) { $mod->load($module); $configarray = $mod->call("config");