Esempio n. 1
0
                foreach ($fieldsarray as $k => $v) {
                    $tbl->add($k, $v, 1);
                }
            }
        }
    }
    $hookret = run_hook("AdminClientServicesTabFields", array("id" => $id));
    foreach ($hookret as $hookdat) {
        foreach ($hookdat as $k => $v) {
            $tbl->add($k, $v, 1);
        }
    }
    $addonshtml = "";
    $aInt->sortableTableInit("nopagination");
    $service = new WHMCS_Service($id);
    $addons = $service->getAddons();
    foreach ($addons as $vals) {
        $tabledata[] = array($vals['regdate'], $vals['name'], $vals['pricing'], $vals['status'], $vals['nextduedate'], "<a href=\"" . $PHP_SELF . "?userid=" . $userid . "&id=" . $id . "&aid=" . $vals['id'] . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Edit\"></a>", "<a href=\"#\" onClick=\"doDeleteAddon('" . $vals['id'] . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
    }
    $addonshtml = $aInt->sortableTable(array($aInt->lang("addons", "regdate"), $aInt->lang("addons", "name"), $aInt->lang("global", "pricing"), $aInt->lang("fields", "status"), $aInt->lang("fields", "nextduedate"), "", ""), $tabledata);
    $tbl->add($aInt->lang("addons", "title"), $addonshtml . "<div style=\"padding:5px 25px;\"><a href=\"clientsservices.php?userid=" . $userid . "&id=" . $id . "&aid=add\"><img src=\"images/icons/add.png\" border=\"0\" align=\"top\" /> Add New Addon</a></div>", 1);
    $customfields = getCustomFields("product", $packageid, $id, true);
    foreach ($customfields as $customfield) {
        $tbl->add($customfield['name'], $customfield['input'], 1);
    }
    $tbl->add($aInt->lang("services", "overrideautosusp"), $frm->checkbox("overideautosuspend", $aInt->lang("services", "nosuspenduntil"), $overideautosuspend) . " " . $frm->date("overidesuspenduntil", $overidesuspenduntil), 1);
    $tbl->add($aInt->lang("services", "endofcycle"), $frm->checkbox("autoterminateendcycle", $aInt->lang("services", "reason"), $autoterminateendcycle) . " " . $frm->text("autoterminatereason", $autoterminatereason, "60"), 1);
    $tbl->add($aInt->lang("fields", "adminnotes"), $frm->textarea("notes", $notes, "4", "100%"), 1);
    echo $tbl->output();
    echo "\n<br />\n<div align=\"center\">" . $frm->submit($aInt->lang("global", "savechanges"), "btn btn-primary") . " " . $frm->reset($aInt->lang("global", "cancelchanges")) . "<br />\n<a href=\"#\" onclick=\"showDialog('delete');return false\" style=\"color:#cc0000\"><strong>" . $aInt->lang("global", "delete") . "</strong></a></div>";
}
Esempio n. 2
0
 $ca->assign("assignedips", $service->getData("assignedips"));
 $ca->assign("ns1", $service->getData("ns1"));
 $ca->assign("ns2", $service->getData("ns2"));
 $ca->assign("packagesupgrade", $service->getAllowProductUpgrades());
 $ca->assign("configoptionsupgrade", $service->getAllowConfigOptionsUpgrade());
 $ca->assign("customfields", $customfields);
 $ca->assign("productcustomfields", $customfields);
 $ca->assign("suspendreason", $service->getSuspensionReason());
 $ca->assign("subscriptionid", $service->getData("subscriptionid"));
 $diskstats = $service->getDiskUsageStats();
 foreach ($diskstats as $k => $v) {
     $ca->assign($k, $v);
 }
 $ca->assign("showcancelbutton", $service->getAllowCancellation());
 $ca->assign("configurableoptions", $service->getConfigurableOptions());
 $ca->assign("addons", $service->getAddons());
 $ca->assign("addonsavailable", $service->hasProductGotAddons());
 $ca->assign("downloads", $service->getAssociatedDownloads());
 $servicepw = $service->getData("password");
 $moduleclientarea = "";
 if ($service->getModule() && $service->getData("status") == "Active") {
     $allowedclientmodulefunctions = array();
     $success = $service->moduleCall("ClientAreaAllowedFunctions");
     if ($success) {
         $data = $service->getModuleReturn("data");
         if (is_array($data)) {
             foreach ($data as $v) {
                 $allowedclientmodulefunctions[] = $v;
             }
         }
     }