예제 #1
0
 echo "</option>\n<option";
 if ($status == "Active Recurring") {
     echo " selected";
 }
 echo ">";
 echo $aInt->lang("status", "activerecurring");
 echo "</option>\n<option";
 if ($status == "Completed Recurring") {
     echo " selected";
 }
 echo ">";
 echo $aInt->lang("status", "completedrecurring");
 echo "</option>\n</select></td></tr>\n</table>\n<img src=\"images/spacer.gif\" height=\"10\" width=\"1\"><br>\n<DIV ALIGN=\"center\"><input type=\"submit\" value=\"";
 echo $aInt->lang("global", "searchfilter");
 echo "\" class=\"button\"></DIV>\n\n</form>\n\n  </div>\n</div>\n\n<br />\n\n";
 $aInt->sortableTableInit("id", "DESC");
 $where = array();
 if ($status == "Uninvoiced") {
     $where['invoicecount'] = 0;
 } else {
     if ($status == "Invoiced") {
         $where['invoicecount'] = array("sqltype" => ">", "value" => "0");
     } else {
         if ($status == "Recurring") {
             $where['invoiceaction'] = 4;
         } else {
             if ($status == "Active Recurring") {
                 $where['invoiceaction'] = 4;
                 $where['invoicecount'] = array("sqltype" => "<", "value" => "recurfor");
             } else {
                 if ($status == "Completed Recurring") {
예제 #2
0
/**
 *
 * @ WHMCS FULL DECODED & NULLED
 *
 * @ 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("View WHOIS Lookup Log");
$aInt->title = $aInt->lang("system", "whois");
$aInt->sidebar = "utilities";
$aInt->icon = "logs";
$aInt->sortableTableInit("date");
$numrows = get_query_val("tblwhoislog", "COUNT(*)", "");
$result = select_query("tblwhoislog", "", "", "id", "DESC", $page * $limit . "," . $limit);
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $date = $data['date'];
    $domain = $data['domain'];
    $ip = $data['ip'];
    $tabledata[] = array(fromMySQLDate($date, true), "<a href=\"#\" onclick=\"\$('#frmWhoisDomain').val('" . addslashes($domain) . ("');\$('#frmWhois').submit();return false\">" . $domain . "</a>"), "<a href=\"http://www.geoiptool.com/en/?IP=" . $ip . "\" target=\"_blank\">" . $ip . "</a>");
}
$content = $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "domain"), $aInt->lang("fields", "ipaddress")), $tabledata);
$content .= "\n<form method=\"post\" action=\"whois.php\" target=\"_blank\" id=\"frmWhois\">\n<input type=\"hidden\" name=\"domain\" value=\"\" id=\"frmWhoisDomain\" />\n</form>\n";
$aInt->content = $content;
$aInt->display();
예제 #3
0
         $fieldsarray = call_user_func($params['moduletype'] . "_AdminServicesTabFields", $params);
         if (is_array($fieldsarray)) {
             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();
예제 #4
0
 echo ": ";
 echo formatCurrency($data[0]);
 echo "</td><td>";
 echo $aInt->lang("transactions", "totalfees");
 echo ": ";
 echo formatCurrency($data[1]);
 echo "</td><td>";
 echo $aInt->lang("transactions", "totalout");
 echo ": ";
 echo formatCurrency($data[2]);
 echo "</td><td><B>";
 echo $aInt->lang("fields", "balance");
 echo ": ";
 echo formatCurrency($data[3]);
 echo "</B><br></td></tr></table>\n\n<br>\n\n";
 $aInt->sortableTableInit("date", "DESC");
 $result = select_query("tblaccounts", "COUNT(*)", array("userid" => $userid));
 $data = mysql_fetch_array($result);
 $numrows = $data[0];
 $result = select_query("tblaccounts", "", array("userid" => $userid), $orderby, $order, $page * $limit . ("," . $limit));
 while ($data = mysql_fetch_array($result)) {
     $ide = $data['id'];
     $date = $data['date'];
     $date = fromMySQLDate($date);
     $gateway = $data['gateway'];
     $description = $data['description'];
     $amountin = $data['amountin'];
     $fees = $data['fees'];
     $amountout = $data['amountout'];
     $transid = $data['transid'];
     $invoiceid = $data['invoiceid'];
예제 #5
0
            echo "?processwindow=true&id=";
            echo $id;
            echo "&failed=true\"><input type=\"hidden\" name=\"cchash\" value=\"";
            echo $cchash;
            echo "\"><input type=\"submit\" value=\"Failed\" class=\"button\"></form>\n";
        }
    }
    $content = ob_get_contents();
    ob_end_clean();
    $aInt->content = $content;
    $aInt->displayPopUp();
    exit;
}
ob_start();
$jscode = "function openCCDetails(id) {\nvar winl = (screen.width - 500) / 2;\nvar wint = (screen.height - 400) / 2;\nwinprops = 'height=400,width=500,top='+wint+',left='+winl+',scrollbars=no'\nwin = window.open('" . $_SERVER['PHP_SELF'] . "?processwindow=true" . generate_token("link") . "&id='+id, 'ccdetails', winprops)\nif (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }\n}";
$aInt->sortableTableInit("duedate", "ASC");
$gatewaysarray = getGatewaysArray();
$query = "SELECT tblinvoices.*,tblclients.firstname,tblclients.lastname,tblclients.companyname,tblclients.groupid FROM tblinvoices INNER JOIN tblclients ON tblclients.id=tblinvoices.userid WHERE paymentmethod='offlinecc' AND tblinvoices.status='Unpaid' ORDER BY ";
if ($orderby == "clientname") {
    $query .= "firstname " . db_escape_string($order) . ", lastname";
} else {
    $query .= db_escape_string($orderby);
}
$query .= " " . db_escape_string($order);
$numresults = full_query($query);
$numrows = mysql_num_rows($numresults);
$query .= " LIMIT " . (int) $page * $limit . "," . (int) $limit;
$result = full_query($query);
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $userid = $data['userid'];
예제 #6
0
        insert_query("tblconfiguration", array("setting" => "ModuleDebugMode", "value" => "on"));
    }
    $CONFIG['ModuleDebugMode'] = "on";
}
if ($disable) {
    check_token("WHMCS.admin.default");
    update_query("tblconfiguration", array("value" => ""), array("setting" => "ModuleDebugMode"));
    $CONFIG['ModuleDebugMode'] = "";
}
if ($reset) {
    check_token("WHMCS.admin.default");
    delete_query("tblmodulelog", "id!=''");
    redir();
}
if (!$id) {
    $aInt->sortableTableInit("id");
    $numrows = get_query_val("tblmodulelog", "COUNT(*)", "", "id", "DESC");
    $result = select_query("tblmodulelog", "", "", "id", "DESC", $page * $limit . "," . $limit);
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $date = $data['date'];
        $module = $data['module'];
        $action = $data['action'];
        $request = $data['request'];
        $response = $data['response'];
        $arrdata = $data['arrdata'];
        if ($arrdata) {
            $response = $arrdata;
        }
        $date = fromMySQLDate($date, "time");
        $tabledata[] = array("<a href=\"?id=" . $id . "\">" . $date . "</a>", $module, $action, "<textarea rows=\"5\" style=\"width:100%;\">" . htmlentities($request) . "</textarea>", "<textarea rows=\"5\" style=\"width:100%;\">" . htmlentities($response) . "</textarea>");
예제 #7
0
            update_query("tblclients", array("credit" => "+=" . $amount), array("id" => $clientid));
            logActivity("Processed Affiliate Commissions Withdrawal to Credit Balance - User ID: " . $clientid . " - Amount: " . $amount);
        }
    }
    redir("action=edit&id=" . $id);
    exit;
}
if ($sub == "delete") {
    check_token("WHMCS.admin.default");
    delete_query("tblaffiliates", array("id" => $ide));
    logActivity("Affiliate " . $ide . " Deleted");
    redir();
}
ob_start();
if ($action == "") {
    $aInt->sortableTableInit("clientname", "ASC");
    $query = "FROM `tblaffiliates` INNER JOIN tblclients ON tblclients.id=tblaffiliates.clientid WHERE tblaffiliates.id!=''";
    if ($client) {
        $query .= " AND concat(firstname,' ',lastname) LIKE '%" . db_escape_string($client) . "%'";
    }
    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) . "'";
예제 #8
0
    redir();
    exit;
}
if ($sub == "delete") {
    check_token("WHMCS.admin.default");
    delete_query("tbllinks", array("id" => $id));
    redir();
    exit;
}
ob_start();
if (!$action) {
    $aInt->deleteJSConfirm("doDelete", "global", "deleteconfirm", "?sub=delete&id=");
    echo "\n<p>The Link Tracking system allows you to track how people are arriving at your site (what links they are clicking on) and then how many conversions you get from people who have clicked on that link.</p>\n\n<p><b>Options:</b> <a href=\"";
    echo $PHP_SELF;
    echo "?action=manage\">Add a New Link</a></p>\n\n";
    $aInt->sortableTableInit("id", "ASC");
    $result = select_query("tbllinks", "COUNT(*)", "", $orderby, $order);
    $data = mysql_fetch_array($result);
    $numrows = $data[0];
    $result = select_query("tbllinks", "", "", $orderby, $order, $page * $limit . ("," . $limit));
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $name = $data['name'];
        $link = $data['link'];
        $clicks = $data['clicks'];
        $conversions = $data['conversions'];
        $displaylink = $link;
        if (40 < strlen($displaylink)) {
            $displaylink = substr($link, 0, 40) . "...";
        }
        $conversionrate = @round($conversions / $clicks * 100, 2);
예제 #9
0
                $pagetitle = $aInt->lang("services", "listother");
            } else {
                $pagetitle = $aInt->lang("services", "title");
            }
        }
    }
}
$aInt->title = $pagetitle;
$aInt->sidebar = "clients";
$aInt->icon = "products";
$aInt->requiredFiles(array("clientfunctions", "customfieldfunctions", "gatewayfunctions"));
ob_start();
if (listtype) {
    $filter = "true";
}
$aInt->sortableTableInit("domain", "ASC");
$query = "FROM tblhosting INNER JOIN tblclients ON tblclients.id=tblhosting.userid INNER JOIN tblproducts ON tblhosting.packageid=tblproducts.id WHERE tblhosting.id!='' ";
if ($clientname) {
    $query .= "AND concat(firstname,' ',lastname) LIKE '%" . db_escape_string($clientname) . "%' ";
}
if ($listtype) {
    $query .= "AND tblproducts.type='" . db_escape_string($listtype) . "' ";
}
if ($package) {
    $query .= "AND tblproducts.id='" . db_escape_string($package) . "' ";
}
if ($billingcycle) {
    $query .= "AND tblhosting.billingcycle='" . db_escape_string($billingcycle) . "' ";
}
if ($server) {
    $query .= "AND tblhosting.server='" . db_escape_string($server) . "' ";
예제 #10
0
 echo ">";
 echo $aInt->lang("promos", "activepromos");
 echo "</a> | <a href=\"configpromotions.php?view=expired\"";
 if ($view == "expired") {
     echo " style=\"font-weight:bold\"";
 }
 echo ">";
 echo $aInt->lang("promos", "expiredpromos");
 echo "</a> | <a href=\"configpromotions.php?view=all\"";
 if ($view == "all") {
     echo " style=\"font-weight:bold\"";
 }
 echo ">";
 echo $aInt->lang("promos", "allpromos");
 echo "</a></p>\n\n";
 $aInt->sortableTableInit("code", "ASC");
 if ($view == "all") {
     $where = "";
 } else {
     if ($view == "expired") {
         $where = "(maxuses>0 AND uses>=maxuses) OR (expirationdate!='0000-00-00' AND expirationdate<'" . date("Ymd") . "')";
     } else {
         $where = "(maxuses<=0 OR uses<maxuses) AND (expirationdate='0000-00-00' OR expirationdate>='" . date("Ymd") . "')";
     }
 }
 $result = select_query("tblpromotions", "COUNT(*)", $where);
 $data = mysql_fetch_array($result);
 $numrows = $data[0];
 $result = select_query("tblpromotions", "", $where, "code", "ASC", $page * $limit . ("," . $limit));
 while ($data = mysql_fetch_array($result)) {
     $pid = $data['id'];
예제 #11
0
}
if ($action == "getticketlog") {
    check_token("WHMCS.admin.default");
    $access = validateAdminTicketAccess($id);
    if ($access) {
        exit;
    }
    $totaltickets = get_query_val("tblticketlog", "COUNT(id)", array("tid" => $id));
    $qlimit = 10;
    $offset = (int) $offset;
    if ($offset < 0) {
        $offset = 0;
    }
    $endnum = $offset + $qlimit;
    echo "<div style=\"padding:0 0 5px 0;text-align:left;\">Showing <strong>" . ($offset + 1) . "</strong> to <strong>" . ($totaltickets < $endnum ? $totaltickets : $endnum) . "</strong> of <strong>" . $totaltickets . " total</strong></div>";
    $aInt->sortableTableInit("nopagination");
    $result = select_query("tblticketlog", "", array("tid" => $id), "date", "DESC", "" . $offset . "," . $qlimit);
    while ($data = mysql_fetch_array($result)) {
        $tabledata[] = array(fromMySQLDate($data['date'], 1), "<div style=\"text-align:left;\">" . $data['action'] . "</div>");
    }
    echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("permissions", "action")), $tabledata);
    echo "<table width=\"80%\" align=\"center\"><tr><td style=\"text-align:left;\">";
    if (0 < $offset) {
        echo "<a href=\"#\" onclick=\"loadTab(" . $target . ",'ticketlog'," . ($offset - $qlimit) . ");return false\">";
    }
    echo "&laquo; Previous</a></td><td style=\"text-align:right;\">";
    if ($endnum < $totaltickets) {
        echo "<a href=\"#\" onclick=\"loadTab(" . $target . ",'ticketlog'," . $endnum . ");return false\">";
    }
    echo "Next &raquo;</a></td></tr></table>";
    exit;
예제 #12
0
        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";
    }
    $note = nl2br($note);
    $note = autoHyperLink($note);
예제 #13
0
 echo ">On Hold</option>\n<option";
 if ($stage == "Accepted") {
     echo " selected";
 }
 echo ">Accepted</option>\n<option";
 if ($stage == "Lost") {
     echo " selected";
 }
 echo ">Lost</option>\n<option";
 if ($stage == "Dead") {
     echo " selected";
 }
 echo ">Dead</option>\n</select></td><td class=\"fieldlabel\">Validity Period</td><td class=\"fieldarea\">";
 echo "<s";
 echo "elect name=\"validity\"><option value=\"\">Any</option><option>Valid</option><option>Expired</option></select></td></tr>\n</table>\n\n<img src=\"images/spacer.gif\" height=\"10\" width=\"1\"><br>\n<DIV ALIGN=\"center\"><input type=\"submit\" value=\"Filter\" class=\"button\"></DIV>\n\n</form>\n\n  </div>\n</div>\n\n<br />\n\n";
 $aInt->sortableTableInit("lastmodified", "DESC");
 $where = array();
 if ($stage) {
     $where['stage'] = $stage;
 }
 if ($validity == "Valid") {
     $where['validuntil'] = array("sqltype" => ">", "value" => date("Ymd"));
 }
 if ($validity == "Expired") {
     $where['validuntil'] = array("sqltype" => "<=", "value" => date("Ymd"));
 }
 if ($userid) {
     $where['userid'] = $userid;
 }
 if ($subject) {
     $where['subject'] = array("sqltype" => "LIKE", "value" => $subject);
예제 #14
0
        insert_query("tblemailmarketer", array("name" => $name, "type" => $type, "settings" => $settings, "disable" => $disable, "marketing" => $marketing));
    }
    redir();
}
if ($action == "delete") {
    check_token("WHMCS.admin.default");
    delete_query("tblemailmarketer", array("id" => $id));
    redir();
}
ob_start();
if (!$action) {
    $aInt->deleteJSConfirm("doDelete", "global", "deleteconfirm", "?action=delete&id=");
    echo "\n<p>The email marketer tool allows you to schedule automated emails to be sent out to your clients when certain events and/or criteria are met.</p>\n\n<p><b>Options:</b> <a href=\"";
    echo $PHP_SELF;
    echo "?action=manage\">Create New</a></p>\n\n";
    $aInt->sortableTableInit("name", "ASC");
    $result = select_query("tblemailmarketer", "COUNT(*)", "");
    $data = mysql_fetch_array($result);
    $numrows = $data[0];
    $result = select_query("tblemailmarketer", "", "", $orderby, $order, $page * $limit . ("," . $limit));
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $name = $data['name'];
        $type = $data['type'];
        $disable = $data['disable'];
        $marketing = $data['marketing'];
        $type = $type == "client" ? "Client" : "Product/Service";
        $disable = $disable ? "<img src=\"images/icons/disabled.png\">" : "<img src=\"images/icons/tick.png\">";
        $tabledata[] = array($id, $name, $type, "<div align=\"center\">" . $disable . "</a>", "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Edit\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
    }
    echo $aInt->sortableTable(array("ID", "Name", "Type", "Active", "", ""), $tabledata);