コード例 #1
0
ファイル: configtwofa.php プロジェクト: billyprice1/whmcs
    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 &raquo;\" 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();