echo "<h2>" . $managetitle . "</h2>"; $predefaddons = array(); $result = select_query("tbladdons", "", "", "weight` ASC,`name", "ASC"); while ($data = mysql_fetch_array($result)) { $preid = $data['id']; $name = $data['name']; $predefaddons[$preid] = $name; } $tbl = new WHMCS_Table(); $tbl->add($aInt->lang("fields", "product"), $frm->hidden("oldserviceid", $id) . $frm->dropdown("id", $servicesarr, $id), 1); $tbl->add($aInt->lang("fields", "regdate"), $frm->date("regdate", $regdate)); $tbl->add($aInt->lang("fields", "setupfee"), $frm->text("setupfee", $setupfee, "10")); $tbl->add($aInt->lang("addons", "predefinedaddon"), $frm->dropdown("addonid", $predefaddons, $addonid, "", "", true)); $tbl->add($aInt->lang("global", "recurring"), $frm->text("recurring", $recurring, "10") . ($aid == "add" ? " " . $frm->checkbox("defaultpricing", $aInt->lang("addons", "usedefault"), true) : "")); $tbl->add($aInt->lang("addons", "customname"), $frm->text("name", $customname, "40")); $tbl->add($aInt->lang("fields", "billingcycle"), $aInt->cyclesDropDown($billingcycle, "", "Free")); $tbl->add($aInt->lang("fields", "status"), $aInt->productStatusDropDown($status)); $tbl->add($aInt->lang("fields", "nextduedate"), $frm->date("nextduedate", $nextduedate)); $tbl->add($aInt->lang("fields", "paymentmethod"), paymentMethodsSelection()); $tbl->add($aInt->lang("addons", "taxaddon"), $frm->checkbox("tax", "", $tax)); $tbl->add($aInt->lang("fields", "adminnotes"), $frm->textarea("notes", $notes, "4", "100%"), 1); echo $tbl->output(); if ($aid == "add") { echo "<p align=\"center\"><input type=\"checkbox\" name=\"geninvoice\" id=\"geninvoice\" checked /> <label for=\"geninvoice\">" . $aInt->lang("addons", "geninvoice") . "</a></p>"; } echo "<p align=\"center\">" . $frm->submit($aInt->lang("global", "savechanges"), "btn btn-primary") . " " . $frm->button($aInt->lang("global", "cancel"), "window.location='?userid=" . $userid . "&id=" . $id . "'") . "</p>"; } else { $serversarr = $serversarr2 = array(); $result = select_query("tblservers", "", array("type" => $module), "name", "ASC"); while ($data = mysql_fetch_array($result)) { $serverid = $data['id'];
} echo $servers . $disabledservers; echo "</select></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "product"); echo "</td><td class=\"fieldarea\">"; echo "<s"; echo "elect name=\"package\">"; echo $aInt->productDropDown($package, 0, true); echo "</select></td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "paymentmethod"); echo "</td><td class=\"fieldarea\">"; echo paymentMethodsSelection($aInt->lang("global", "any")); echo "</td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "billingcycle"); echo "</td><td class=\"fieldarea\">"; echo $aInt->cyclesDropDown($billingcycle, true); echo "</td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "status"); echo "</td><td class=\"fieldarea\">"; echo $aInt->productStatusDropDown($status, true); echo "</td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "domain"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domain\" size=\"35\" value=\""; echo $domain; echo "\"></td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "customfield"); echo "</td><td class=\"fieldarea\">"; echo "<s"; echo "elect name=\"customfield\" style=\"width:200px;\"><option value=\"\">"; echo $aInt->lang("global", "any"); echo "</option>";
echo $aInt->lang("fields", "product"); echo "</td><td class=\"fieldarea\">"; echo "<s"; echo "elect name=\"pid[]\" id=\"pid0\" onchange=\"loadproductoptions(this)\">"; echo $aInt->productDropDown(0, true); echo "</select></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "domain"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"domain[]\" size=\"40\" id=\"domain0\" onkeyup=\"updatesummary()\" /> "; echo "<s"; echo "pan id=\"whoisresult0\"></span></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "billingcycle"); echo "</td><td class=\"fieldarea\">"; if (!$billingcycle) { $billingcycle = "Monthly"; } echo $aInt->cyclesDropDown($billingcycle, "", "", "billingcycle[]", "updatesummary()"); echo "</td></tr>\n<tr id=\"addonsrow0\" style=\"display:none;\"><td class=\"fieldlabel\">"; echo $aInt->lang("addons", "title"); echo "</td><td class=\"fieldarea\" id=\"addonscont0\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "quantity"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"qty[]\" value=\"1\" size=\"5\" onkeyup=\"updatesummary()\" /></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "priceoverride"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"priceoverride[]\" size=\"10\" onkeyup=\"updatesummary()\" /> "; echo $aInt->lang("orders", "priceoverridedesc"); echo "</td></tr>\n</table>\n\n<div id=\"productconfigoptions0\"></div>\n\n</div>\n</div>\n\n<p style=\"padding-left:20px;\"><a href=\"#\" class=\"addproduct\"><img src=\"images/icons/add.png\" border=\"0\" align=\"absmiddle\" /> "; echo $aInt->lang("orders", "anotherproduct"); echo "</a></p>\n\n<p><b>"; echo $aInt->lang("domains", "domainreg"); echo "</b></p>\n\n<div id=\"domains\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"130\" class=\"fieldlabel\">"; echo $aInt->lang("domains", "regtype"); echo "</td><td class=\"fieldarea\"><input type=\"radio\" name=\"regaction[0]\" id=\"domnon0\" value=\"\" onclick=\"loaddomainoptions(this,0);updatesummary()\" checked /> <label for=\"domnon0\">";
} echo ">\n<b>" . $aInt->lang("fields", "product") . "</b><br />\n<div style=\"background-color:#efefef;padding:5px;margin:2px;\">\n<select name=\"pid\" id=\"pid\" style=\"max-width:350px;\" onchange=\"loadaddons()\">"; $result = select_query("tblproducts", "tblproducts.id,tblproducts.gid,tblproducts.name,tblproductgroups.name AS groupname", "", "tblproductgroups`.`order` ASC,`tblproducts`.`order` ASC,`name", "ASC", "", "tblproductgroups ON tblproducts.gid=tblproductgroups.id"); while ($data = mysql_fetch_array($result)) { $pid = $data['id']; $gid = $data['gid']; $name = $data['name']; $packtype = $data['groupname']; echo "<option value=\"" . $pid . "\""; if ($pid == $vals['pid']) { echo " SELECTED"; } echo ">" . $packtype . " - " . $name . "</option>"; } echo "</select>\n</div>\n<br />\n<b>" . $aInt->lang("fields", "billingcycle") . "</b><br />\n<div style=\"background-color:#efefef;padding:5px;margin:2px;\">\n"; echo $aInt->cyclesDropDown($vals['billingcycle'], true); echo $aInt->lang("bundles", "selectrequiresbc") . "\n</div>\n<br />\n<b>" . $aInt->lang("fields", "priceoverride") . "</b><br />\n<div style=\"background-color:#efefef;padding:5px;margin:2px;\">\n<input type=\"checkbox\" name=\"priceoverride\" value=\"1\"" . ($vals['priceoverride'] ? " checked" : "") . " />" . $aInt->lang("bundles", "enableamount") . ": <input type=\"text\" name=\"price\" size=\"10\" value=\"" . $vals['price'] . "\" />" . $aInt->lang("bundles", "pricebeforeoptionsaddons") . "\n</div>\n<br />\n<div id=\"addonops\">\n</div>\n<br />"; BundleDomainsConfigOptions($vals); echo "</div>\n<div id=\"domoptions\""; if ($vals['type'] != "domain") { echo " style=\"display:none;\""; } echo ">"; BundleDomainsConfigOptions($vals, "2"); echo "\n</div>\n</div>\n</form>"; exit; } if ($action == "saveitem") { check_token("WHMCS.admin.default"); $result = select_query("tblbundles", "", array("id" => $id)); $data = mysql_fetch_array($result);