if (is_array($response)) { if ($response['description']) { $desc = $response['description']; } if (in_array($response['status'], array("info", "success", "error"))) { $status = $response['status']; } } $title = $aInt->lang("addonmodules", "moduledeactivated"); if (!$status) { $status = "success"; } infoBox($title, $desc, $status); } echo $infobox; $aInt->deleteJSConfirm("deactivateMod", "addonmodules", "deactivatesure", $_SERVER['PHP_SELF'] . "?action=deactivate&module="); $jscode = "function showConfig(module) {\n \$(\"#\"+module+\"config\").fadeToggle();\n}"; echo "<p>" . $aInt->lang("addonmodules", "description") . "</p>\n\n<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\n<input type=\"hidden\" name=\"action\" value=\"save\" />\n\n<div class=\"tablebg\">\n<table class=\"datatable\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\">\n<tr><th>" . $aInt->lang("addonmodules", "module") . "</th><th width=\"100\">" . $aInt->lang("global", "version") . "</th><th width=\"100\">" . $aInt->lang("addonmodules", "author") . "</th><th width=\"350\"></th></tr>\n"; $modulevars = $addonmodulesperms = array(); $result = select_query("tbladdonmodules", "", ""); while ($data = mysql_fetch_array($result)) { $modulevars[$data['module']][$data['setting']] = $data['value']; } foreach ($addon_modules as $module => $vals) { $bgcolor = in_array($module, $activemodules) ? "FDF4E8" : "fff"; echo "<tr><td style=\"background-color:#" . $bgcolor . ";text-align:left;\"><a name=\"act" . $module . "\"></a><a name=\"" . $module . "\"></a>"; if (array_key_exists("logo", $vals)) { echo "<div style=\"float:left;padding:5px 15px;\"><img src=\"" . $vals['logo'] . "\" /></div><div style=\"float:left;\">"; } echo "<b> » " . $vals['name'] . "</b>"; if (array_key_exists("premium", $vals)) {
check_token("WHMCS.admin.default"); checkPermission("Edit Products/Services"); foreach ($so as $pid => $sort) { update_query("tblproducts", array("order" => $sort), array("id" => $pid)); } redir(); } ob_start(); if ($action == "") { $result = select_query("tblproductgroups", "COUNT(*)", ""); $data = mysql_fetch_array($result); $num_rows = $data[0]; $result = select_query("tblproducts", "COUNT(*)", ""); $data = mysql_fetch_array($result); $num_rows2 = $data[0]; $aInt->deleteJSConfirm("doDelete", "products", "deleteproductconfirm", "?sub=delete&id="); $aInt->deleteJSConfirm("doGroupDelete", "products", "deletegroupconfirm", "?sub=deletegroup&id="); echo "\n<p>"; echo $aInt->lang("products", "description"); echo "</p>\n<p><b>"; echo $aInt->lang("addons", "options"); echo ":</b> <a href=\""; echo $PHP_SELF; echo "?action=creategroup\">"; echo $aInt->lang("products", "createnewgroup"); echo "</a> | "; if ($num_rows == "0") { echo "<font color=#cccccc>" . $aInt->lang("products", "createnewproduct") . "</font>"; } else { echo "<a href=\""; echo $PHP_SELF;
} echo ">" . ($aInt->lang("status", strtolower($data['title'])) ? $aInt->lang("status", strtolower($data['title'])) : $data['title']) . "</option>"; } echo "</select></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "amount"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"amount\" value=\""; echo $amount = $filters->get("amount"); echo "\" size=\"10\"></td><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "ipaddress"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"orderip\" value=\""; echo $orderip = $filters->get("orderip"); echo "\" size=\"20\"></td></tr>\n</table>\n\n<img src=\"images/spacer.gif\" height=\"8\" width=\"1\"><br>\n<div align=\"center\"><input type=\"submit\" value=\""; echo $aInt->lang("global", "search"); echo "\" class=\"button\"></div>\n\n</form>\n\n </div>\n</div>\n\n<br>\n\n"; $filters->store(); $aInt->deleteJSConfirm("doDelete", "orders", "confirmdelete", "orders.php?action=delete&id="); $name = "orders"; $orderby = "id"; $sort = "DESC"; $pageObj = new WHMCS_Pagination($name, $orderby, $sort); $pageObj->digestCookieData(); $tbl = new WHMCS_ListTable($pageObj); $tbl->setColumns(array("checkall", array("id", $aInt->lang("fields", "id")), array("ordernum", $aInt->lang("fields", "ordernum")), array("date", $aInt->lang("fields", "date")), $aInt->lang("fields", "clientname"), array("paymentmethod", $aInt->lang("fields", "paymentmethod")), array("amount", $aInt->lang("fields", "total")), $aInt->lang("fields", "paymentstatus"), array("status", $aInt->lang("fields", "status")), "")); $criteria = array("clientid" => $clientid, "amount" => $amount, "orderid" => $orderid, "ordernum" => $ordernum, "orderip" => $orderip, "orderdate" => $orderdate, "clientname" => $clientname, "paymentstatus" => $paymentstatus, "status" => $status); $ordersModel = new WHMCS_Orders($pageObj); $ordersModel->execute($criteria); $numresults = $pageObj->getNumResults(); if ($filters->isActive() && $numresults == 1) { $order = $pageObj->getOne(); redir("action=view&id=" . $order['id']); } else {
update_query("tblaccounts", array("gateway" => $paymentmethod, "date" => toMySQLDate($date), "description" => $description, "amountin" => $amountin, "fees" => $fees, "amountout" => $amountout, "transid" => $transid, "invoiceid" => $invoiceid), array("id" => $id)); logActivity("Modified Transaction (User ID: " . $userid . " - Transaction ID: " . $id . ")"); redir("userid=" . $userid); exit; } if ($sub == "delete") { check_token("WHMCS.admin.default"); checkPermission("Delete Transaction"); delete_query("tblaccounts", array("id" => $ide)); logActivity("Deleted Transaction (ID: " . $ide . " - User ID: " . $userid . ")"); redir("userid=" . $userid); exit; } ob_start(); if ($action == "") { $aInt->deleteJSConfirm("doDelete", "transactions", "deletesure", "clientstransactions.php?userid=" . $userid . "&sub=delete&ide="); $currency = getCurrency($userid); if ($error == "invalidinvid") { infoBox("Check Invoice ID", "The Invoice ID you entered could not be found", "error"); } else { if ($error == "wronguser") { infoBox("Check Invoice ID", "The Invoice ID you entered to assign this payment to belongs to a different client", "error"); } } echo $infobox; $result = select_query("tblaccounts", "SUM(amountin),SUM(fees),SUM(amountout),SUM(amountin-fees-amountout)", array("userid" => $userid)); $data = mysql_fetch_array($result); echo "\n<table width=90% cellspacing=1 cellpadding=5 bgcolor=\"#CCCCCC\" align=\"center\"><tr bgcolor=\"#f4f4f4\" style=\"text-align:center\"><td><a href=\""; echo $PHP_SELF; echo "?userid="; echo $userid;
} echo ">" . $contactlistfirstname . " " . $contactlistlastname . " - " . $contactlistemail . "</option>"; } if (!$contactid) { $contactid = "addnew"; } echo "<option value=\"addnew\""; if ($contactid == "addnew") { echo " selected"; } echo ">"; echo $aInt->lang("global", "addnew"); echo "</option>\n</select> <input type=\"submit\" value=\""; echo $aInt->lang("global", "go"); echo "\">\n</form>\n\n<br>\n\n"; $aInt->deleteJSConfirm("deleteContact", "clients", "deletecontactconfirm", "?action=delete&userid=" . $userid . "&contactid="); if ($resetpw) { check_token("WHMCS.admin.default"); sendMessage("Automated Password Reset", $userid, array("contactid" => $contactid)); infoBox($aInt->lang("clients", "resetsendpassword"), $aInt->lang("clients", "passwordsuccess")); echo $infobox; } if ($contactid && $contactid != "addnew") { $result = select_query("tblcontacts", "", array("userid" => $userid, "id" => $contactid)); $data = mysql_fetch_array($result); $contactid = $data['id']; $firstname = $data['firstname']; $lastname = $data['lastname']; $companyname = $data['companyname']; $email = $data['email']; $address1 = $data['address1'];
} $invoiceid = createInvoices($userid, true, true); redir("userid=" . $userid . "&masspayid=" . $invoiceid . "&filter=1"); } if ($delete) { check_token("WHMCS.admin.default"); checkPermission("Delete Invoice"); delete_query("tblinvoices", array("id" => $invoiceid)); logActivity("Deleted Invoice - Invoice ID: " . $invoiceid, $userid); if ($page) { $userid .= "&page=" . $page; } redir("userid=" . $userid . "&filter=1"); } ob_start(); $aInt->deleteJSConfirm("doDelete", "invoices", "delete", "clientsinvoices.php?userid=" . $userid . "&delete=true&invoiceid="); $jquerycode .= "\$(\".invtooltip\").tooltip({cssClass:\"invoicetooltip\"});"; if ($mergeerr) { infoBox($aInt->lang("invoices", "mergeerror"), $aInt->lang("invoices", "mergeerrordesc")); } if ($masspayerr) { infoBox($aInt->lang("invoices", "masspay"), $aInt->lang("invoices", "mergeerrordesc")); } if ($masspayid) { infoBox($aInt->lang("invoices", "masspay"), $aInt->lang("invoices", "masspaysuccess") . " - <a href=\"invoices.php?action=edit&id=" . (int) $masspayid . "\">" . $aInt->lang("fields", "invoicenum") . $masspayid . "</a>"); } echo $infobox; $filt = new WHMCS_Filter("clinv"); $filterops = array("serviceid", "addonid", "domainid", "clientname", "invoicenum", "lineitem", "paymentmethod", "invoicedate", "duedate", "datepaid", "totalfrom" . "totalto", "status"); $filt->setAllowedVars($filterops); $filters = array();
check_token("WHMCS.admin.default"); delete_query("tbltax", array("id" => $id)); redir(); exit; } $result = select_query("tblconfiguration", "", ""); while ($data = mysql_fetch_array($result)) { $setting = $data['setting']; $value = $data['value']; $CONFIG["" . $setting] = "" . $value; } if ($saved) { infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "taxconfig", "delsuretaxrule", "?action=delete&id="); echo "\n"; echo "<s"; echo "cript type=\"text/javascript\" src=\"../includes/jscript/statesdropdown.js\"></script>\n\n<p>"; echo $aInt->lang("taxconfig", "taxrulesconfigheredesc"); echo "</p>\n\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?action=save\">\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("taxconfig", "taxsupportenabled"); echo "</td><td class=\"fieldarea\"><input type=\"checkbox\" name=\"taxenabled\" id=\"taxenabled\""; if ($CONFIG['TaxEnabled'] == "on") { echo " checked"; } echo "> <label for=\"taxenabled\">"; echo $aInt->lang("taxconfig", "taxsupportenableddesc"); echo "</label></td></tr>\n<tr><td class=\"fieldlabel\">";
define("ADMINAREA", true); require "../init.php"; $aInt = new WHMCS_Admin("Manage Quotes"); $aInt->requiredFiles(array("clientfunctions", "invoicefunctions")); $aInt->inClientsProfile = true; $aInt->valUserID($userid); if ($delete == "true") { check_token("WHMCS.admin.default"); checkPermission("Manage Quotes"); delete_query("tblquotes", array("id" => $quoteid)); logActivity("Deleted Quote (ID: " . $quoteid . " - User ID: " . $userid . ")"); redir("userid=" . $userid); exit; } ob_start(); $aInt->deleteJSConfirm("doDelete", "quotes", "deletesure", "?userid=" . $userid . "&delete=true"eid="); echo "\n<div align=center><input type=\"button\" value=\""; echo $aInt->lang("quotes", "createnew"); echo "\" class=\"button\" onClick=\"window.location='quotes.php?action=manage&userid="; echo $userid; echo "'\"></div>\n\n"; $currency = getCurrency($userid); $aInt->sortableTableInit("id", "DESC"); $result = select_query("tblquotes", "COUNT(*)", array("userid" => $userid)); $data = mysql_fetch_array($result); $numrows = $data[0]; $result = select_query("tblquotes", "", array("userid" => $userid), $orderby, $order, $page * $limit . ("," . $limit)); while ($data = mysql_fetch_assoc($result)) { $id = $data['id']; $subject = $data['subject']; $validuntil = $data['validuntil'];
} if ($delete == "true") { check_token("WHMCS.admin.default"); checkPermission("Delete Email Templates"); delete_query("tblemailtemplates", array("id" => $id)); redir("deleted=true"); } if ($success) { infoBox($aInt->lang("emailtpls", "updatesuccess"), $aInt->lang("emailtpls", "updatesuccessinfo")); } else { if ($deleted) { infoBox($aInt->lang("emailtpls", "delsuccess"), $aInt->lang("emailtpls", "delsuccessinfo")); } } echo $infobox; $aInt->deleteJSConfirm("doDelete", "emailtpls", "delsure", "?delete=true&id="); echo "\n<p>"; echo $aInt->lang("emailtpls", "info"); echo "</p>\n\n"; if (checkPermission("Create/Edit Email Templates", true)) { echo "<div class=\"contextbar\">\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?action=new\">\n<b>"; echo $aInt->lang("emailtpls", "createnew"); echo "</b> Type: "; echo "<s"; echo "elect name=\"type\"><option value=\"general\">"; echo $aInt->lang("emailtpls", "typegeneral"); echo "</option><option value=\"product\">"; echo $aInt->lang("emailtpls", "typeproduct"); echo "</option><option value=\"domain\">";
update_query("tblticketdepartments", array("order" => $order1), array("id" => $premid)); redir(); } ob_start(); if ($createsuccess) { infoBox($aInt->lang("supportticketdepts", "deptaddsuccess"), $aInt->lang("supportticketdepts", "deptaddsuccessdesc")); } if ($savesuccess) { infoBox($aInt->lang("supportticketdepts", "changessavesuccess"), $aInt->lang("supportticketdepts", "changessavesuccessdesc")); } if ($delsuccess) { infoBox($aInt->lang("global", "success"), "The selected support department was deleted successfully"); } echo $infobox; if ($action == "") { $aInt->deleteJSConfirm("doDelete", "supportticketdepts", "delsuredept", "?sub=delete&id="); echo "\n<p>"; echo $aInt->lang("supportticketdepts", "supportticketdeptsconfigheredesc"); echo "</p>\n\n<div class=\"contentbox\">\n"; echo $aInt->lang("supportticketdepts", "ticketimportusingef"); echo ":<br><input type=\"text\" size=\"100\" value=\" | php -q "; $pos = strrpos($_SERVER['SCRIPT_FILENAME'], "/"); $str = substr($_SERVER['SCRIPT_FILENAME'], 0, $pos); $pos = strrpos($str, "/"); $str = substr($str, 0, $pos); echo $str; echo "/pipe/pipe.php\"><br><b>"; echo $aInt->lang("global", "or"); echo "</b><br>\n"; echo $aInt->lang("supportticketdepts", "ticketimportusingpop3imap"); echo ":<br><input type=\"text\" size=\"100\" value=\"*/5 * * * * php -q ";
if ($action == "send" && $messagename == "newmessage") { redir("type=" . $type . "&id=" . $id, "sendmessage.php"); } if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblemails", array("id" => $id)); redir("userid=" . $userid); } $aInt->valUserID($userid); ob_start(); $jscode = ""; if ($action == "send") { check_token("WHMCS.admin.default"); sendMessage($messagename, $id, "", true); } $aInt->deleteJSConfirm("doDelete", "emails", "suredelete", "clientsemails.php?userid=" . $userid . "&action=delete&id="); $aInt->sortableTableInit("date", "DESC"); $result = select_query("tblemails", "COUNT(*)", array("userid" => $userid)); $data = mysql_fetch_array($result); $numrows = $data[0]; $result = select_query("tblemails", "", array("userid" => $userid), $orderby, $order, $page * $limit . ("," . $limit)); while ($data = mysql_fetch_array($result)) { $id = $data['id']; $date = $data['date']; $date = fromMySQLDate($date, "time"); $subject = $data['subject']; if ($subject == "") { $subject = $aInt->lang("emails", "nosubject"); } $tabledata[] = array($date, "<a href=\"#\" onClick=\"window.open('clientsemails.php?&displaymessage=true&id=" . $id . "','','width=650,height=400,scrollbars=yes');return false\">" . $subject . "</a>", "<a href=\"sendmessage.php?resend=true&emailid=" . $id . "\"><img src=\"images/icons/resendemail.png\" border=\"0\" alt=\"" . $aInt->lang("emails", "resendemail") . "\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\" /></a>"); }
$aInt = new WHMCS_Admin("Browser"); $aInt->title = $aInt->lang("utilities", "browser"); $aInt->sidebar = "browser"; $aInt->icon = "browser"; if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblbrowserlinks", array("id" => $id)); redir(); } if ($action == "add") { check_token("WHMCS.admin.default"); insert_query("tblbrowserlinks", array("name" => $sitename, "url" => $siteurl)); redir(); } //$url = "http://www.whmcs.com/"; $url = "http://www.google.com/"; // change to whatever you want $link = $whmcs->get_req_var("link"); $result = select_query("tblbrowserlinks", "", "", "name", "ASC"); while ($data = mysql_fetch_array($result)) { $browserlinks[] = $data; if ($data['id'] == $link) { $url = $data['url']; } } $aInt->assign("browserlinks", $browserlinks); $content = "<iframe width=\"100%\" height=\"580\" src=\"" . $url . "\" name=\"brwsrwnd\" style=\"min-width:1000px;\"></iframe>"; $aInt->deleteJSConfirm("doDelete", "browser", "deleteq", "?action=delete&id="); $aInt->content = $content; $aInt->jscode = $jscode; $aInt->display();
update_query("tblcustomfields", array("fieldname" => $value, "fieldtype" => $fieldtype[$fid], "description" => $description[$fid], "fieldoptions" => $fieldoptions[$fid], "regexpr" => html_entity_decode($regexpr[$fid]), "adminonly" => $adminonly[$fid], "required" => $required[$fid], "showorder" => $showorder[$fid], "showinvoice" => $showinvoice[$fid], "sortorder" => $sortorder[$fid]), array("id" => $fid)); } } if ($addfieldname) { insert_query("tblcustomfields", array("type" => "client", "fieldname" => $addfieldname, "fieldtype" => $addfieldtype, "description" => $adddescription, "fieldoptions" => $addfieldoptions, "regexpr" => html_entity_decode($addregexpr), "adminonly" => $addadminonly, "required" => $addrequired, "showorder" => $addshoworder, "showinvoice" => $addshowinvoice, "sortorder" => $addsortorder)); } redir("success=true"); } else { if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblcustomfields", array("id" => $id)); delete_query("tblcustomfieldsvalues", array("fieldid" => $id)); redir("deleted=true"); } } $aInt->deleteJSConfirm("doDelete", "customfields", "delsure", $_SERVER['PHP_SELF'] . "?action=delete&id="); ob_start(); if ($whmcs->get_req_var("success")) { infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc")); } echo $infobox; echo "\n<p>"; echo $aInt->lang("customfields", "clientinfo"); echo "</p>\n<form method=\"post\" action=\""; echo $_SERVER['PHP_SELF']; echo "?action=save\">\n"; $result = select_query("tblcustomfields", "", array("type" => "client"), "sortorder` ASC,`id", "ASC"); while ($data = mysql_fetch_array($result)) { $fid = $data['id']; $fieldname = $data['fieldname']; $fieldtype = $data['fieldtype'];
check_token("WHMCS.admin.default"); checkPermission("Delete Promotions"); delete_query("tblpromotions", array("id" => $id)); redir("deleted=true"); exit; } if ($expire) { check_token("WHMCS.admin.default"); checkPermission("Create/Edit Promotions"); update_query("tblpromotions", array("expirationdate" => date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 1, date("Y")))), array("id" => $expire)); redir("expired=true"); exit; } ob_start(); if (!$action) { $aInt->deleteJSConfirm("doDelete", "promos", "deletesure", "?action=delete&id="); if ($deleted) { infoBox($aInt->lang("global", "success"), $aInt->lang("promos", "deletesuccess")); } if ($updated) { infoBox($aInt->lang("global", "success"), $aInt->lang("global", "changesuccess")); } if ($created) { infoBox($aInt->lang("global", "success"), $aInt->lang("promos", "addsuccess")); } if ($expired) { infoBox($aInt->lang("global", "success"), $aInt->lang("promos", "expiresuccess")); } echo $infobox; echo "\n<div style=\"float:right;\"><a href=\""; echo $PHP_SELF;
if ($visitors) { $visitorstype = $visitorstype == "greater" ? ">" : "<"; $query .= " AND visitors " . $visitorstype . " '" . db_escape_string($visitors) . "'"; } if ($balance) { $balancetype = $balancetype == "greater" ? ">" : "<"; $query .= " AND balance " . $balancetype . " '" . db_escape_string($balance) . "'"; } if ($withdrawn) { $withdrawntype = $withdrawntype == "greater" ? ">" : "<"; $query .= " AND withdrawn " . $withdrawntype . " '" . db_escape_string($withdrawn) . "'"; } $result = full_query("SELECT COUNT(tblaffiliates.id) " . $query); $data = mysql_fetch_array($result); $numrows = $data[0]; $aInt->deleteJSConfirm("doDelete", "affiliates", "deletesure", "affiliates.php?sub=delete&ide="); echo $aInt->Tabs(array($aInt->lang("global", "searchfilter")), true); echo "\n<div id=\"tab0box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<form action=\""; echo $PHP_SELF; echo "\" method=\"get\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "clientname"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"client\" size=\"25\" value=\""; echo $client; echo "\"></td><td width=\"10%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "balance"); echo "</td><td class=\"fieldarea\">"; echo "<s"; echo "elect name=\"balancetype\"><option value=\"greater\">"; echo $aInt->lang("affiliates", "greaterthan"); echo "<option>"; echo $aInt->lang("affiliates", "lessthan");
redir("deleted=true"); exit; } ob_start(); if ($action == "") { if ($added) { infoBox($aInt->lang("supportticketescalations", "ruleaddsuccess"), $aInt->lang("supportticketescalations", "ruleaddsuccessdesc")); } if ($saved) { infoBox($aInt->lang("supportticketescalations", "ruleeditsuccess"), $aInt->lang("supportticketescalations", "ruleeditsuccessdesc")); } if ($deleted) { infoBox($aInt->lang("supportticketescalations", "ruledelsuccess"), $aInt->lang("supportticketescalations", "ruledelsuccessdesc")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "supportticketescalations", "delsureescalationrule", "?action=delete&id="); echo "\n<p>"; echo $aInt->lang("supportticketescalations", "escalationrulesinfo"); echo "</p>\n\n<div class=\"contentbox\">\n"; echo $aInt->lang("supportticketescalations", "croncommandreq"); echo "<br /><input type=\"text\" size=\"100\" value=\"php -q "; echo ROOTDIR . "/" . $whmcs->get_admin_folder_name(); echo "/cron.php escalations\" />\n</div>\n\n<p><B>"; echo $aInt->lang("fields", "options"); echo ":</B> <a href=\""; echo $_SERVER['PHP_SELF']; echo "?action=manage\">"; echo $aInt->lang("supportticketescalations", "addnewrule"); echo "</a></p>\n\n"; $aInt->sortableTableInit("nopagination"); $result = select_query("tblticketescalations", "", "", "name", "ASC");
insert_query("tblannouncements", array("parentid" => $id, "title" => html_entity_decode($title), "announcement" => html_entity_decode($multilang_announcement[$language]), "language" => $language)); continue; } } if ($toggleeditor) { if ($editorstate) { redir("action=manage&id=" . $id); } else { redir("action=manage&id=" . $id . "&noeditor=1"); } } redir("success=1"); } ob_start(); if ($action == "") { $aInt->deleteJSConfirm("doDelete", "support", "announcesuredel", "?sub=delete&id="); if ($success) { infoBox($aInt->lang("global", "success"), $aInt->lang("global", "changesuccess")); } echo $infobox; echo "\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?action=manage\">\n<p align=\"center\"><input type=\"submit\" value=\""; echo $aInt->lang("support", "announceadd"); echo "\" class=\"button\" /></p>\n</form>\n\n"; $query = "SELECT * FROM tblannouncements WHERE language='' ORDER BY date DESC"; $result = full_query($query); $numrows = mysql_num_rows($result); $aInt->sortableTableInit("date", "DESC"); $query .= " LIMIT " . (int) $page * $limit . "," . (int) $limit; $result = full_query($query);
infoBox($aInt->lang("global", "success"), $aInt->lang("support", "predefsave")); } if ($savecat) { infoBox($aInt->lang("global", "success"), $aInt->lang("support", "predefsavecat")); } if ($delete) { infoBox($aInt->lang("global", "success"), $aInt->lang("support", "predefdelete")); } if ($deletecat) { infoBox($aInt->lang("global", "success"), $aInt->lang("support", "predefdeletecat")); } echo $infobox; if ($catid) { $catid = get_query_val("tblticketpredefinedcats", "id", array("id" => $catid)); } $aInt->deleteJSConfirm("doDelete", "support", "predefdelsure", $_SERVER['PHP_SELF'] . "?catid=" . $catid . "&sub=delete&id="); $aInt->deleteJSConfirm("doDeleteCat", "support", "predefdelcatsure", $_SERVER['PHP_SELF'] . "?catid=" . $catid . "&sub=deletecategory&id="); echo $aInt->Tabs(array($aInt->lang("support", "addcategory"), $aInt->lang("support", "addpredef"), $aInt->lang("global", "searchfilter")), true); echo "\n<div id=\"tab0box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "?catid="; echo $catid; echo "&addcategory=true\">\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("support", "catname"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"catname\" size=\"40\"></tr>\n</table>\n<img src=\"images/spacer.gif\" width=\"1\" height=\"10\"><br>\n<div align=\"center\"><input type=\"submit\" value=\""; echo $aInt->lang("support", "addcategory"); echo "\" class=\"button\"></div>\n</form>\n\n </div>\n</div>\n<div id=\"tab1box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n"; if ($catid != "") { echo "<form method=\"post\" action=\""; echo $PHP_SELF; echo "?catid=";
* **/ define("ADMINAREA", true); require "../init.php"; $aInt = new WHMCS_Admin("View Cancellation Requests"); $aInt->title = $aInt->lang("clients", "cancelrequests"); $aInt->sidebar = "clients"; $aInt->icon = "cancelrequests"; $aInt->helplink = "Cancellation Requests"; if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblcancelrequests", array("id" => $id)); redir(); exit; } $aInt->deleteJSConfirm("doDelete", "clients", "cancelrequestsdelete", "?action=delete&id="); ob_start(); echo $aInt->Tabs(array("Search/Filter"), true); echo "\n<div id=\"tab0box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<form action=\""; echo $PHP_SELF; echo "\" method=\"get\"><input type=\"hidden\" name=\"filter\" value=\"true\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "reason"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"reason\" size=\"40\" value=\""; echo $reason; echo "\" /></td><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "client"); echo "</td><td class=\"fieldarea\">"; echo $aInt->clientsDropDown($userid, "", "userid", 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=\"40\" value=\"";
redir(); } delete_query("tbladminroles", array("id" => $id)); delete_query("tbladminperms", array("roleid" => $id)); redir("deleted=true"); } ob_start(); if (!$action) { if ($saved) { infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc")); } if ($deleted) { infoBox($aInt->lang("adminroles", "deletesuccess"), $aInt->lang("adminroles", "deletesuccessinfo")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "adminroles", "suredelete", $_SERVER['PHP_SELF'] . "?action=delete&id="); echo "\n<p>"; echo $aInt->lang("adminroles", "description"); echo "</p>\n<p><b>"; echo $aInt->lang("adminroles", "options"); echo ":</b> <a href=\"configadminroles.php?action=add\">"; echo $aInt->lang("adminroles", "addnew"); echo "</a> | <a href=\"configadminroles.php?action=duplicate\">"; echo $aInt->lang("adminroles", "duplicate"); echo "</a></p>\n\n"; $aInt->sortableTableInit("nopagination"); $result = select_query("tbladminroles", "", "", "name", "ASC"); while ($data = mysql_fetch_array($result)) { $deletejs = 3 < $data['id'] ? "doDelete('" . $data['id'] . "')" : "alert('" . $aInt->lang("adminroles", "nodeldefault", 1) . "')"; $assigned = array(); $result2 = select_query("tbladmins", "id,username,disabled", array("roleid" => $data['id']), "username", "ASC");
insert_query("tbldomainpricing", array("extension" => trim(strtolower($newtld)), "dnsmanagement" => $newdns, "emailforwarding" => $newemail, "idprotection" => $newidprot, "eppcode" => $neweppcode, "autoreg" => $newautoreg, "order" => $lastorder)); } } if ($errormessage) { redir("errormessage=" . $errormessage); } redir("success=true"); } if ($action == "saveaddons") { check_token("WHMCS.admin.default"); foreach ($_POST['currency'] as $currency_id => $pricing) { update_query("tblpricing", $pricing, array("type" => "domainaddons", "currency" => $currency_id, "relid" => 0)); } redir("success=true"); } $aInt->deleteJSConfirm("doDelete", "domains", "delsureextension", "?action=delete&id="); $jquerycode = "\n\$('#domainpricing').tableDnD({\n onDrop: function(table, row) {\n \$.post(\"configdomains.php\", { action: \"saveorder\", pricingarr: \$('#domainpricing').tableDnDSerialize(), token: \"" . generate_token("plain") . "\" });\n },\n dragHandle: \"sortcol\"\n });\n"; if ($success) { infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc")); } if ($errormessage) { infoBox($aInt->lang("global", "erroroccurred"), $errormessage, "error"); } echo $infobox; echo "<p>" . $aInt->lang("domains", "pricinginfo") . "</p>"; echo "\n<form method=\"post\" action=\""; echo $_SERVER['PHP_SELF']; echo "\">\n<input type=\"hidden\" name=\"action\" value=\"save\" />\n\n<div class=\"tablebg\">\n<table class=\"datatable\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\" id=\"domainpricing\">\n<tr><th>"; echo $aInt->lang("fields", "tld"); echo "</th><th>"; echo $aInt->lang("global", "pricing");
delete_query("tblticketstatuses", array("id" => $id)); header("Location: configticketstatuses.php?delete=true"); exit; } ob_start(); if ($added) { infoBox($aInt->lang("ticketstatusconfig", "statusaddtitle"), $aInt->lang("ticketstatusconfig", "statusadddesc")); } if ($update) { infoBox($aInt->lang("ticketstatusconfig", "statusedittitle"), $aInt->lang("ticketstatusconfig", "statuseditdesc")); } if ($delete) { infoBox($aInt->lang("ticketstatusconfig", "statusdeltitle"), $aInt->lang("ticketstatusconfig", "statusdeldesc")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "ticketstatusconfig", "delsureticketstatus", "?action=delete&id="); echo "\n<p>"; echo $aInt->lang("ticketstatusconfig", "pagedesc"); echo "</p>\n\n<p>"; echo "<s"; echo "trong>"; echo $aInt->lang("fields", "options"); echo ":</strong> <a href=\""; echo $PHP_SELF; echo "\"><img src=\"images/icons/add.png\" align=\"top\" /> "; echo $aInt->lang("global", "addnew"); echo "</a></p>\n\n"; $aInt->sortableTableInit("nopagination"); $result = select_query("tblticketstatuses", "", "", "sortorder", "ASC"); while ($data = mysql_fetch_assoc($result)) { $statusid = $data['id'];
infoBox($aInt->lang("configservers", "error"), $aInt->lang("configservers", "errordesc")); } if ($savesuccess) { infoBox($aInt->lang("configservers", "changesuccess"), $aInt->lang("configservers", "changesuccessdesc")); } if ($enablesuccess) { infoBox($aInt->lang("configservers", "enabled"), $aInt->lang("configservers", "enableddesc")); } if ($disablesuccess) { infoBox($aInt->lang("configservers", "disabled"), $aInt->lang("configservers", "disableddesc")); } if ($makedefault) { infoBox($aInt->lang("configservers", "defaultchange"), $aInt->lang("configservers", "defaultchangedesc")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "configservers", "delserverconfirm", "?action=delete&id="); $aInt->deleteJSConfirm("doDeleteGroup", "configservers", "delgroupconfirm", "?action=deletegroup&id="); echo "\n<p>"; echo $aInt->lang("configservers", "pagedesc"); echo "</p>\n\n<p><B>"; echo $aInt->lang("fields", "options"); echo ":</B> <a href=\""; echo $PHP_SELF; echo "?action=manage\">"; echo $aInt->lang("configservers", "addnewserver"); echo "</a> | <a href=\""; echo $PHP_SELF; echo "?action=managegroup\">"; echo $aInt->lang("configservers", "createnewgroup"); echo "</a></p>\n\n"; $modulesarray = array();
foreach ($selectedinvoices as $invid) { sendMessage("Invoice Payment Reminder", $invid); logActivity("Invoice Payment Reminder Sent - Invoice ID: " . $invid); } $filters->redir(); } if ($whmcs->get_req_var("delete")) { check_token("WHMCS.admin.default"); checkPermission("Delete Invoice"); delete_query("tblinvoices", array("id" => $invoiceid)); logActivity("Deleted Invoice - Invoice ID: " . $invoiceid); $filters->redir(); } ob_start(); if ($action == "") { $aInt->deleteJSConfirm("doDelete", "invoices", "delete", $_SERVER['PHP_SELF'] . "?status=" . $status . "&delete=true&invoiceid="); $name = "invoices"; $orderby = "duedate"; $sort = "DESC"; $pageObj = new WHMCS_Pagination($name, $orderby, $sort); $pageObj->digestCookieData(); $tbl = new WHMCS_ListTable($pageObj); $tbl->setColumns(array("checkall", array("id", $aInt->lang("fields", "invoicenum")), array("clientname", $aInt->lang("fields", "clientname")), array("date", $aInt->lang("fields", "invoicedate")), array("duedate", $aInt->lang("fields", "duedate")), array("total", $aInt->lang("fields", "total")), array("paymentmethod", $aInt->lang("fields", "paymentmethod")), array("status", $aInt->lang("fields", "status")), "", "")); $invoicesModel = new WHMCS_Invoices($pageObj); if (checkPermission("View Income Totals", true)) { $invoicetotals = $invoicesModel->getInvoiceTotals(); if (count($invoicetotals)) { echo "<div class=\"contentbox\" style=\"font-size:18px;\">"; foreach ($invoicetotals as $vals) { echo "<b>" . $vals['currencycode'] . "</b> " . $aInt->lang("status", "paid") . ": <span class=\"textgreen\"><b>" . $vals['paid'] . "</b></span> " . $aInt->lang("status", "unpaid") . ": <span class=\"textred\"><b>" . $vals['unpaid'] . "</b></span> " . $aInt->lang("status", "overdue") . ": <span class=\"textblack\"><b>" . $vals['overdue'] . "</b></span><br />"; }
ob_start(); if ($action == "") { if ($view == "scheduled") { $pagetitle = "Scheduled"; $where = array("status" => "Scheduled"); } else { if ($view == "resolved") { $pagetitle = "Resolved"; $where = array("status" => "Resolved"); } else { $pagetitle = "Open"; $where = "status!='Resolved' AND status!='Scheduled'"; } } $result = select_query("tblnetworkissues", "*,(select name from tblservers where id = tblnetworkissues.server) as server", $where, "lastupdate", "DESC"); $aInt->deleteJSConfirm("doDelete", "global", "deleteconfirm", "?action=delete&id="); echo "\n<p>"; echo "<s"; echo "trong>"; echo $aInt->lang("fields", "options"); echo ":</strong> <a href=\"networkissues.php\">"; echo $aInt->lang("networkissues", "open"); echo "</a> | <a href=\"networkissues.php?view=scheduled\">"; echo $aInt->lang("networkissues", "scheduled"); echo "</a> | <a href=\"networkissues.php?view=resolved\">"; echo $aInt->lang("networkissues", "resolved"); echo "</a> | <a href=\"?action=manage\"><img src=\"images/icons/add.png\" border=\"0\" align=\"absmiddle\" /> "; echo $aInt->lang("networkissues", "addnew"); echo "</a></p>\n\n<h2>"; echo $pagetitle; echo " Issues</h2>\n\n";
header("Location: configorderstatuses.php"); } exit; } ob_start(); if ($added) { infoBox($aInt->lang("orderstatusconfig", "addtitle"), $aInt->lang("orderstatusconfig", "adddesc")); } if ($update) { infoBox($aInt->lang("orderstatusconfig", "edittitle"), $aInt->lang("orderstatusconfig", "editdesc")); } if ($delete) { infoBox($aInt->lang("orderstatusconfig", "deltitle"), $aInt->lang("orderstatusconfig", "deldesc")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "orderstatusconfig", "delsure", "?action=delete&id="); echo "\n<p>"; echo $aInt->lang("orderstatusconfig", "pagedesc"); echo "</p>\n\n<p>"; echo "<s"; echo "trong>"; echo $aInt->lang("fields", "options"); echo ":</strong> <a href=\""; echo $PHP_SELF; echo "\"><img src=\"images/icons/add.png\" align=\"top\" /> "; echo $aInt->lang("global", "addnew"); echo "</a></p>\n\n"; $aInt->sortableTableInit("nopagination"); $result = select_query("tblorderstatuses", "", "", "sortorder", "ASC"); while ($data = mysql_fetch_assoc($result)) { $statusid = $data['id'];
if (!$action) { if ($invoice && is_array($bitem)) { foreach ($bitem as $id => $v) { update_query("tblbillableitems", array("invoiceaction" => "1"), array("id" => $id)); } infoBox($aInt->lang("billableitems", "invoiceitems"), $aInt->lang("billableitems", "itemswillinvoice")); echo $infobox; } if ($delete && is_array($bitem)) { foreach ($bitem as $id => $v) { delete_query("tblbillableitems", array("id" => $id)); } infoBox($aInt->lang("billableitems", "itemsdeleted"), $aInt->lang("billableitems", "itemsdeleteddesc")); echo $infobox; } $aInt->deleteJSConfirm("doDelete", "billableitems", "itemsdeletequestion", "billableitems.php?userid=" . $userid . "&action=delete&id="); echo $aInt->Tabs(array($aInt->lang("global", "searchfilter")), true); echo "\n<div id=\"tab0box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<form action=\""; echo $_SERVER['PHP_SELF']; echo "\" method=\"get\">\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "client"); echo "</td><td class=\"fieldarea\">"; echo $aInt->clientsDropDown($userid, "", "userid", true); echo "</td><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "amount"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"amount\" size=\"15\" value=\""; echo $amount; echo "\"></td></tr>\n<tr><td class=\"fieldlabel\">"; echo $aInt->lang("fields", "description"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"description\" size=\"50\" value=\""; echo $description;
} if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblbannedemails", array("id" => $id)); redir("delete=true"); exit; } ob_start(); if ($success) { infoBox($aInt->lang("bans", "emailaddsuccess"), $aInt->lang("bans", "emailaddsuccessinfo")); } if ($delete) { infoBox($aInt->lang("bans", "emaildelsuccess"), $aInt->lang("bans", "emaildelsuccessinfo")); } echo $infobox; $aInt->deleteJSConfirm("doDelete", "bans", "emaildelsure", "?action=delete&id="); echo $aInt->Tabs(array($aInt->lang("global", "add")), true); echo "\n<div id=\"tab0box\" class=\"tabbox\">\n <div id=\"tab_content\">\n\n<form method=\"post\" action=\""; echo $PHP_SELF; echo "\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">"; echo $aInt->lang("fields", "email"); echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"email\" size=\"50\"> ("; echo $aInt->lang("bans", "onlydomain"); echo ")</td></tr>\n</table>\n\n<img src=\"images/spacer.gif\" height=\"10\" width=\"1\"><br>\n<div align=\"center\"><input type=\"submit\" value=\""; echo $aInt->lang("bans", "addbannedemail"); echo "\" class=\"button\"></div>\n\n</form>\n\n </div>\n</div>\n\n<br>\n\n"; $aInt->sortableTableInit("nopagination"); $result = select_query("tblbannedemails", "", "", "domain", "ASC"); while ($data = mysql_fetch_array($result)) { $id = $data['id']; $domain = $data['domain'];
} redir("deactivated=true"); exit; } ob_start(); if ($saved) { infoBox($aInt->lang("domainregistrars", "changesuccess"), $aInt->lang("domainregistrars", "changesuccessinfo")); } if ($activated) { infoBox($aInt->lang("domainregistrars", "moduleactivated"), $aInt->lang("domainregistrars", "moduleactivatedinfo"), "success"); } if ($deactivated) { infoBox($aInt->lang("domainregistrars", "moduledeactivated"), $aInt->lang("domainregistrars", "moduledeactivatedinfo"), "success"); } echo $infobox; $aInt->deleteJSConfirm("deactivateMod", "domainregistrars", "deactivatesure", $_SERVER['PHP_SELF'] . "?action=deactivate&module="); $jscode .= "function showConfig(module) {\n \$(\"#\"+module+\"config\").fadeToggle();\n}\n"; echo "<div class=\"tablebg\">\n<table class=\"datatable\" width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\">\n<tr><th width=\"140\"></th><th>" . $aInt->lang("addonmodules", "module") . "</th><th width=\"350\"></th></tr>"; $modulesarray = array(); $dh = opendir("../modules/registrars/"); while (false !== ($file = readdir($dh))) { if (is_file("../modules/registrars/" . $file . "/" . $file . ".php")) { $modulesarray[] = $file; } } closedir($dh); sort($modulesarray); foreach ($modulesarray as $module) { if (!isValidforPath($module)) { exit("Invalid Registrar Module Name"); }
update_query("tblnotes", array("note" => $note, "sticky" => $sticky, "modified" => "now()"), array("id" => $id)); logActivity("Updated Note - User ID: " . $userid . " - ID: " . $id); redir("userid=" . $userid); exit; } else { if ($sub == "delete") { check_token("WHMCS.admin.default"); checkPermission("Delete Client Notes"); delete_query("tblnotes", array("id" => $id)); logActivity("Deleted Note - User ID: " . $userid . " - ID: " . $id); redir("userid=" . $userid); exit; } } } $aInt->deleteJSConfirm("doDelete", "clients", "deletenote", "clientsnotes.php?userid=" . $userid . "&sub=delete&id="); ob_start(); $aInt->sortableTableInit("created", "ASC"); $result = select_query("tblnotes", "COUNT(*)", array("userid" => $userid), "created", "ASC", "", "tbladmins ON tbladmins.id=tblnotes.adminid"); $data = mysql_fetch_array($result); $numrows = $data[0]; $result = select_query("tblnotes", "tblnotes.*,(SELECT CONCAT(firstname,' ',lastname) FROM tbladmins WHERE tbladmins.id=tblnotes.adminid) AS adminuser", array("userid" => $userid), "modified", "DESC"); while ($data = mysql_fetch_array($result)) { $noteid = $data['id']; $created = $data['created']; $modified = $data['modified']; $note = $data['note']; $admin = $data['adminuser']; if (!$admin) { $admin = "Admin Deleted"; }