コード例 #1
0
ファイル: clientsservices.php プロジェクト: billyprice1/whmcs
    $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>";
    $content .= $aInt->jqueryDialog("modcreate", $aInt->lang("services", "confirmcommand"), $aInt->lang("services", "createsure"), array($aInt->lang("global", "yes") => "runModuleCommand('create')", $aInt->lang("global", "no") => ""), "", "450");
    $content .= $aInt->jqueryDialog("modsuspend", $aInt->lang("services", "confirmcommand"), $aInt->lang("services", "suspendsure") . "<br /><div align=\"center\">" . $aInt->lang("services", "suspendreason") . ": <input type=\"text\" id=\"suspreason\" size=\"20\" /><br /><br /><input type=\"checkbox\" id=\"suspemail\" /> " . $aInt->lang("services", "suspendsendemail") . "</div>", array($aInt->lang("global", "yes") => "runModuleCommand('suspend')", $aInt->lang("global", "no") => ""), "", "450");
    $content .= $aInt->jqueryDialog("modunsuspend", $aInt->lang("services", "confirmcommand"), $aInt->lang("services", "unsuspendsure"), array($aInt->lang("global", "yes") => "runModuleCommand('unsuspend')", $aInt->lang("global", "no") => ""), "", "450");
    $content .= $aInt->jqueryDialog("modterminate", $aInt->lang("services", "confirmcommand"), $aInt->lang("services", "terminatesure"), array($aInt->lang("global", "yes") => "runModuleCommand('terminate')", $aInt->lang("global", "no") => ""), "", "450");
    $content .= $aInt->jqueryDialog("modchangepackage", $aInt->lang("services", "confirmcommand"), $aInt->lang("services", "chgpacksure"), array($aInt->lang("global", "yes") => "runModuleCommand('changepackage')", $aInt->lang("global", "no") => ""), "", "450");
    $content .= $aInt->jqueryDialog("delete", $aInt->lang("services", "deleteproduct"), $aInt->lang("services", "proddeletesure"), array($aInt->lang("global", "yes") => "window.location='" . $PHP_SELF . "?userid=" . $userid . "&id=" . $id . "&action=delete" . generate_token("link") . "'", $aInt->lang("global", "no") => ""), "180", "450");
コード例 #2
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();