} else { $orderlist = $pageObj->getData(); foreach ($orderlist as $order) { $tbl->addRow(array("<input type=\"checkbox\" name=\"selectedorders[]\" value=\"" . $order['id'] . "\" class=\"checkall\">", "<a href=\"" . $PHP_SELF . "?action=view&id=" . $order['id'] . "\"><b>" . $order['id'] . "</b></a>", $order['ordernum'], $order['date'], $order['clientname'], $order['paymentmethod'], $order['amount'], $order['paymentstatusformatted'], $order['statusformatted'], "<a href=\"#\" onClick=\"doDelete('" . $order['id'] . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>")); } $tbl->setMassActionBtns("<input type=\"submit\" name=\"massaccept\" value=\"" . $aInt->lang("orders", "accept") . "\" class=\"btn-success\" onclick=\"return confirm('" . $aInt->lang("orders", "acceptconfirm", "1") . "')\" /> <input type=\"submit\" name=\"masscancel\" value=\"" . $aInt->lang("orders", "cancel") . "\" onclick=\"return confirm('" . $aInt->lang("orders", "cancelconfirm", "1") . "')\" /> <input type=\"submit\" name=\"massdelete\" value=\"" . $aInt->lang("orders", "delete") . "\" class=\"btn-danger\" onclick=\"return confirm('" . $aInt->lang("orders", "deleteconfirm", "1") . "')\" /> <input type=\"submit\" name=\"sendmessage\" value=\"" . $aInt->lang("global", "sendmessage") . "\" />"); echo $tbl->output(); unset($orderlist); unset($ordersModel); } } else { if ($action == "view") { if ($whmcs->get_req_var("activate")) { check_token("WHMCS.admin.default"); $errors = acceptOrder($id, $vars); wSetCookie("OrderAccept", $errors); redir("action=view&id=" . $id . "&activated=true"); exit; } if ($whmcs->get_req_var("cancel")) { check_token("WHMCS.admin.default"); changeOrderStatus($id, "Cancelled"); redir("action=view&id=" . $id . "&cancelled=true"); exit; } if ($whmcs->get_req_var("fraud")) { check_token("WHMCS.admin.default"); changeOrderStatus($id, "Fraud"); redir("action=view&id=" . $id . "&frauded=true"); exit; }
if (!$oldlockstatus) { $oldlockstatus = $newlockstatus; } if ($newlockstatus != $oldlockstatus) { $params['lockenabled'] = $newlockstatus; $values = RegSaveRegistrarLock($params); if ($values['error']) { infoBox($aInt->lang("domains", "reglockfailed"), $values['error'], "error"); } else { infoBox($aInt->lang("domains", "reglocksuccess"), $aInt->lang("domains", "reglockinfo"), "success"); } } if ($regaction == "renew") { check_token("WHMCS.admin.default"); $values = RegRenewDomain($params); wSetCookie("DomRenewRes", $values); redir("userid=" . $userid . "&id=" . $id . "&conf=renew"); exit; } if ($regaction == "eppcode") { check_token("WHMCS.admin.default"); $values = RegGetEPPCode($params); if ($values['error']) { infoBox($aInt->lang("domains", "eppfailed"), $values['error'], "error"); } else { if ($values['eppcode']) { infoBox($aInt->lang("domains", "epprequest"), $_LANG['domaingeteppcodeis'] . " " . $values['eppcode']); } else { infoBox($aInt->lang("domains", "epprequest"), $_LANG['domaingeteppcodeemailconfirmation'], "success"); } }
wSetCookie("ModCmdResult", $result); redir("userid=" . $userid . "&id=" . $id . "&act=updown&ajaxupdate=1"); } if ($modop == "changepw") { check_token("WHMCS.admin.default"); $result = ServerChangePassword($id); wSetCookie("ModCmdResult", $result); redir("userid=" . $userid . "&id=" . $id . "&act=pwchange&ajaxupdate=1"); } if ($modop == "custom") { check_token("WHMCS.admin.default"); $result = ServerCustomFunction($id, $ac); if (substr($result, 0, 9) == "redirect|") { exit($result); } wSetCookie("ModCmdResult", $result); redir("userid=" . $userid . "&id=" . $id . "&act=custom&ajaxupdate=1"); } if (in_array($whmcs->get_req_var("act"), array("create", "suspend", "unsuspend", "terminate", "updown", "pwchange", "custom"))) { if ($result = wGetCookie("ModCmdResult")) { if ($result != "success") { infoBox($aInt->lang("services", "moduleerror"), $result, "error"); } else { infoBox($aInt->lang("services", "modulesuccess"), $aInt->lang("services", $act . "success"), "success"); } } } if ($whmcs->get_req_var("success")) { infoBox($aInt->lang("global", "changesuccess"), $aInt->lang("global", "changesuccessdesc")); } $regdate = fromMySQLDate($regdate);
$localdateformat = "dd/mm/yy"; } else { if ($CONFIG['DateFormat'] == "MM/DD/YYYY") { $localdateformat = "mm/dd/yy"; } else { if ($CONFIG['DateFormat'] == "YYYY/MM/DD" || $CONFIG['DateFormat'] == "YYYY-MM-DD") { $localdateformat = "yy/mm/dd"; } } } if ($action == "fetch") { echo "<p align=\"center\"><b>Add New Event</b></p><p>Title<br /><input type=\"text\" name=\"title\" style=\"width:80%;\" /></p>\n<p>Description<br /><input type=\"text\" name=\"desc\" style=\"width:90%;\" /></p>\n<table>\n\t<tr>\n\t\t<td width=\"160\">Start Date/Time<br /><input type=\"text\" name=\"start\" class=\"datepick\" id=\"start\" value=\"" . fromMySQLDate(substr($ymd, 0, 4) . "-" . substr($ymd, 4, 2) . "-" . substr($ymd, 6, 2)) . " 00:00:00" . "\" style=\"width:145px;\" /></td>\n\t\t<td width=\"160\">End Date/Time<br /><input type=\"text\" name=\"end\" class=\"datepick\" id=\"end\" value=\"" . fromMySQLDate(substr($ymd, 0, 4) . "-" . substr($ymd, 4, 2) . "-" . substr($ymd, 6, 2)) . " 23:59:59\" disabled style=\"width:145px;\" /></td>\n\t</tr>\n</table>\n<p><label><input type=\"checkbox\" name=\"allday\" id=\"allday\" value=\"1\" checked /> All Day</label></p>\n<p><label>Recur Every <input type=\"text\" style=\"width:25px;\" name=\"recurevery\" /></label> <select name=\"recurtype\"><option value=\"days\">Days</option><option value=\"weeks\">Weeks</option><option value=\"months\">Months</option><option value=\"years\">Years</option></select> for <label><input type=\"text\" style=\"width:25px;\" name=\"recurtimes\" /> times*</label></p>\n<p>*0 = Unlimited</label></p>\n<p align=\"center\"><input type=\"submit\" value=\"Save\" /> <input type=\"button\" value=\"Cancel\" onclick=\"jQuery('#caledit').fadeOut()\" /></p>"; exit; } if ($action == "refresh") { wSetCookie("CalendarDisplayTypes", $displaytypes, time() + 86400 * 365); redir(); } if ($action == "save") { check_token("WHMCS.admin.default"); $start = toMySQLDate($start); $start = strtotime($start, time()); $end = toMySQLDate($end); $end = !$allday && $end ? strtotime($end, time()) : ""; if ($id) { update_query("tblcalendar", array("title" => $title, "desc" => $desc, "start" => $start, "end" => $end, "allday" => $allday), array("id" => $id)); } else { $neweventid = insert_query("tblcalendar", array("title" => $title, "desc" => $desc, "start" => $start, "end" => $end, "allday" => $allday)); if ($recurevery && $recurtype) { if ($recurtimes == 0) { $recurtimes = 99;
} else { if (strpos($gotourl, "?")) { $gotourl .= "&"; } else { $gotourl .= "?"; } $gotourl .= "incorrect=true"; header("Location: " . $gotourl); exit; } } if (!$loginsuccess) { if (validateClientLogin($username, $password)) { $loginsuccess = true; if ($rememberme) { wSetCookie("User", $_SESSION['uid'] . ":" . sha1($_SESSION['upw'] . $whmcs->get_hash()), time() + 60 * 60 * 24 * 365); } else { wDelCookie("User"); } } else { if (isset($_SESSION['2faverifyc'])) { $istwofa = true; } else { if ($hash) { $autoauthkey = ""; require "configuration.php"; if ($autoauthkey) { $login_uid = $login_cid = ""; if ($timestamp < time() - 15 * 60 || time() < $timestamp) { exit("Link expired"); }
if ($addon_modules[$module]['version'] != $aInt->lang("addonmodules", "nooutput")) { insert_query("tbladdonmodules", array("module" => $module, "setting" => "version", "value" => $addon_modules[$module]['version'])); } } redir("activated=true"); exit; } if ($action == "deactivate") { check_token("WHMCS.admin.default"); if (!array_key_exists($module, $addon_modules)) { $aInt->gracefulExit("Invalid Module Name. Please Try Again."); } if (function_exists($module . "_deactivate")) { $response = call_user_func($module . "_deactivate"); } wSetCookie("AddonModActivate", $response); if (!$response || is_array($response) && ($response['status'] == "success" || $response['status'] == "info")) { delete_query("tbladdonmodules", array("module" => $module)); foreach ($activemodules as $k => $mod) { if ($mod == $module) { unset($activemodules[$k]); continue; } } sort($activemodules); update_query("tblconfiguration", array("value" => implode(",", $activemodules)), array("setting" => "ActiveAddonModules")); } redir("deactivated=true"); exit; } ob_start();
infoBox($aInt->lang("support", "spamupdatefailed"), $aInt->lang("support", "spamupdatefailedinfo")); } else { insert_query("tblticketspamfilters", array("type" => "Sender", "content" => $email)); infoBox($aInt->lang("support", "spamupdatesuccess"), $aInt->lang("support", "spamupdatesuccessinfo")); } } } } } } if ($autorefresh) { check_token("WHMCS.admin.default"); if ($autorefresh == "Never") { wDelCookie("AutoRefresh"); } else { wSetCookie("AutoRefresh", $autorefresh, time() + 90 * 24 * 60 * 60); } redir(); } if ($action == "viewticket") { $result = select_query("tbltickets", "", array("id" => $id)); $data = mysql_fetch_array($result); $replyingadmin = $data['replyingadmin']; if (!$replyingadmin) { $adminheaderbodyjs = "onunload=\"endMakingReply();\""; } } $supportdepts = getAdminDepartmentAssignments(); ob_start(); $smartyvalues['ticketfilterdata'] = array("view" => $filt->getFromSession("view"), "deptid" => $filt->getFromSession("deptid"), "subject" => $filt->getFromSession("subject"), "email" => $filt->getFromSession("email")); if (!$action) {
* @ Version : 5.2.15 * @ Author : MTIMER * @ Release on : 2013-12-24 * @ Website : http://www.mtimer.cn * **/ define("ADMINAREA", true); require "../init.php"; $aInt = new WHMCS_Admin("loginonly"); if ($a == "savenotes") { check_token("WHMCS.admin.default"); update_query("tbladmins", array("notes" => $notes), array("id" => $_SESSION['adminid'])); exit; } if ($a == "minsidebar") { wSetCookie("MinSidebar", "1"); exit; } if ($a == "maxsidebar") { wDelCookie("MinSidebar"); exit; } $matches = $tempmatches = $invoicematches = $ticketmatches = ""; if ($intellisearch) { check_token("WHMCS.admin.default"); $value = trim($_POST['value']); if (strlen($value) < 3 && !is_numeric($value)) { exit; } $value = db_escape_string($value); if (checkPermission("List Clients", true) || checkPermission("View Clients Summary", true)) {