Exemple #1
0
 * @ Release on : 2013-12-24
 * @ Website  : http://www.mtimer.cn
 *
 **/
define("ADMINAREA", true);
require "../init.php";
$aInt = new WHMCS_Admin("List Clients");
$aInt->title = $aInt->lang("clients", "viewsearch");
$aInt->sidebar = "clients";
$aInt->icon = "clients";
$name = "clients";
$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("firstname", $aInt->lang("fields", "firstname")), array("lastname", $aInt->lang("fields", "lastname")), array("companyname", $aInt->lang("fields", "companyname")), array("email", $aInt->lang("fields", "email")), $aInt->lang("fields", "services"), array("datecreated", $aInt->lang("fields", "created")), array("status", $aInt->lang("fields", "status"))));
$clientsModel = new WHMCS_Clients($pageObj);
$filters = new WHMCS_Filter();
ob_start();
echo $aInt->Tabs(array($aInt->lang("global", "searchfilter")), true);
$userid = $filters->get("userid");
$country = $filters->get("country");
echo "<div id=\"tab0box\" class=\"tabbox\">\n  <div id=\"tab_content\">\n\n<form action=\"clients.php\" method=\"post\">\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=\"clientname\" size=\"30\" value=\"";
echo $clientname = $filters->get("clientname");
echo "\" /></td><td width=\"15%\" class=\"fieldlabel\">";
echo $aInt->lang("fields", "companyname");
echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"companyname\" size=\"30\" value=\"";
echo $companyname = $filters->get("companyname");
Exemple #2
0
 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 {
     $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();
Exemple #3
0
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 />";
            }
            echo "</div><br />";
        }
    }
    echo $aInt->Tabs(array($aInt->lang("global", "searchfilter")), true);
    $clientid = $filters->get("clientid");
    $invoicenum = $filters->get("invoicenum");