$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']; $servername = $data['name'];
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>"; $result2 = select_query("tblcustomfields", "tblcustomfields.id,tblcustomfields.fieldname,tblproducts.name", array("tblcustomfields.type" => "product"), "", "", "", "tblproducts ON tblproducts.id=tblcustomfields.relid"); while ($data = mysql_fetch_array($result2)) { $fieldid = $data['id']; $fieldname = $data['fieldname'];