Beispiel #1
0
            }
            $options .= "</td></tr>";
        }
        $options .= "</table>";
    }
    $customfields = getCustomFields("product", $pid, "", "", "on", $customfields);
    if (count($customfields)) {
        $options .= "<p><b>" . $aInt->lang("setup", "customfields") . "</b></p>\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">";
        foreach ($customfields as $customfield) {
            $inputfield = str_replace("name=\"customfield", "name=\"customfield[" . $orderid . "]", $customfield['input']);
            $options .= "<tr><td width=\"130\" class=\"fieldlabel\">" . $customfield['name'] . "</td><td class=\"fieldarea\">" . $inputfield . "</td></tr>";
        }
        $options .= "</table>";
    }
    $addonshtml = "";
    $addonsarray = getAddons($pid);
    if (count($addonsarray)) {
        foreach ($addonsarray as $addon) {
            $addonshtml .= "<label>" . str_replace("<input type=\"checkbox\" name=\"addons", "<input type=\"checkbox\" onclick=\"updatesummary()\" name=\"addons[" . $orderid . "]", $addon['checkbox']) . " " . $addon['name'] . " (" . $addon['pricing'] . ")";
            if ($addon['description']) {
                $addonshtml .= " - " . $addon['description'];
            }
            $addonshtml .= "</label><br />";
        }
    }
    echo json_encode(array("options" => $options, "addons" => $addonshtml));
    exit;
}
if ($action == "getdomainaddlfields") {
    check_token("WHMCS.admin.default");
    $domainparts = explode(".", $domain, 2);
Beispiel #2
0
         redir("a=confdomains");
         exit;
     }
 }
 $billingcycle = $_SESSION['cart']['products'][$i]['billingcycle'];
 $server = $_SESSION['cart']['products'][$i]['server'];
 $customfields = $_SESSION['cart']['products'][$i]['customfields'];
 $configoptions = $_SESSION['cart']['products'][$i]['configoptions'];
 $addons = $_SESSION['cart']['products'][$i]['addons'];
 $domain = $_SESSION['cart']['products'][$i]['domain'];
 $noconfig = $_SESSION['cart']['products'][$i]['noconfig'];
 $billingcycle = $orderfrm->validateBillingCycle($billingcycle);
 $pricing = getPricingInfo($pid);
 $configurableoptions = getCartConfigOptions($pid, $configoptions, $billingcycle, "", true);
 $customfields = getCustomFields("product", $pid, "", "", "on", $customfields);
 $addonsarray = getAddons($pid, $addons);
 $recurringcycles = 0;
 if ($pricing['type'] == "recurring") {
     if (0 <= $pricing['rawpricing']['monthly']) {
         ++$recurringcycles;
     }
     if (0 <= $pricing['rawpricing']['quarterly']) {
         ++$recurringcycles;
     }
     if (0 <= $pricing['rawpricing']['semiannually']) {
         ++$recurringcycles;
     }
     if (0 <= $pricing['rawpricing']['annually']) {
         ++$recurringcycles;
     }
     if (0 <= $pricing['rawpricing']['biennially']) {