Пример #1
0
    echo $moduleaction;
    echo "</td>\n\t</tr>\n\t<tr><td id=\"";
    echo $module;
    echo "config\" class=\"config\" style=\"display:none;padding:15px;\" colspan=\"3\"><form method=\"post\" action=\"";
    echo $PHP_SELF;
    echo "?action=save&module=";
    echo $module . generate_token("link");
    echo "\">\n\t\t<table class=\"form\" width=\"100%\">\n        ";
    foreach ($configarray as $key => $values) {
        if ($values['Type'] != "System") {
            if (!$values['FriendlyName']) {
                $values['FriendlyName'] = $key;
            }
            $values['Name'] = $key;
            $values['Value'] = htmlspecialchars($moduleconfigdata[$key]);
            echo "<tr><td class=\"fieldlabel\">" . $values['FriendlyName'] . "</td><td class=\"fieldarea\">" . moduleConfigFieldOutput($values) . "</td></tr>";
            continue;
        }
    }
    echo "\t\t</table><br /><div align=\"center\"><input type=\"submit\" name=\"save\" value=\"";
    echo $aInt->lang("global", "savechanges");
    echo "\" class=\"btn primary\" /></form></div><br />\n\t</td></tr>\n";
}
echo "</table>\n</div>\n\n";
echo "<s";
echo "cript language=\"javascript\">\n\$(document).ready(function(){\n    var modpass = window.location.hash;\n    if (modpass) \$(modpass+\"config\").show();\n});\n</script>\n\n";
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
Пример #2
0
    }
    if ($configarray['Description']['Value']) {
        echo "<p>" . $configarray['Description']['Value'] . "</p>";
    }
    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";