$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);
        $tabledata[] = array($id, $name, "<a href=\"" . $link . "\" target=\"_blank\">" . $displaylink . "</a>", $clicks, $conversions, $conversionrate . "%", "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $id . generate_token("link") . "\"><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(array("id", "ID"), array("name", "Name"), array("link", "Link"), array("clicks", "Clicks"), array("conversions", "Conversions"), array("conversionrate", "Conversion Rate"), "", ""), $tabledata);
} else {
    if ($action == "manage") {
        if ($id) {
            $table = "tbllinks";
            $fields = "";
            $where = array("id" => $id);
            $result = select_query($table, $fields, $where);
            $data = mysql_fetch_array($result);
            $id = $data['id'];
            $name = $data['name'];
            $url = $data['link'];
            $clicks = $data['clicks'];
            $conversions = $data['conversions'];
            $actiontitle = "Edit Link";
        } else {
Beispiel #2
0
    if (mysql_num_rows($result)) {
        while ($open_row = mysql_fetch_assoc($result)) {
            $enddate = $open_row['enddate'];
            $enddate = $enddate ? fromMySQLDate($enddate, true) : "None";
            if ($open_row['server']) {
                $open_row->type .= " (" . $open_row['server'] . ")";
            }
            if ($open_row['status'] == "Resolved") {
                $actions = "<a href=\"" . $_SERVER['PHP_SELF'] . "?action=reopen&id=" . $open_row['id'] . generate_token("link") . "\">Reopen</a>";
            } else {
                $actions = "<a href=\"" . $_SERVER['PHP_SELF'] . "?action=close&id=" . $open_row['id'] . generate_token("link") . "\">Close</a>";
            }
            $tabledata[] = array("<a href=\"" . $_SERVER['PHP_SELF'] . "?action=manage&id=" . $open_row['id'] . "\">" . $open_row['title'] . "</a>", $open_row['type'], $open_row['priority'], $open_row['status'], fromMySQLDate($open_row['startdate'], true), $enddate, $actions, "<a href=\"#\" onClick=\"doDelete('" . $open_row['id'] . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
        }
    }
    echo $aInt->sortableTable(array("Title", "Type", "Priority", "Status", "Start Date", "End Date", " ", ""), $tabledata);
} else {
    if ($action == "manage") {
        if ($errormessage) {
            infoBox("Validation Failed", $errormessage);
            echo $infobox;
        }
        echo "<script type=\"text/javascript\" src=\"../includes/jscript/jquery-ui-timepicker-addon.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../includes/jscript/css/jquery-ui-timepicker-addon.css\" />\n<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?action=save\">";
        if ($id) {
            $pagetitle = "Modify Existing Issue";
            $result = select_query("tblnetworkissues", "", array("id" => $id));
            $data = mysql_fetch_array($result);
            $title = $data['title'];
            $startdate = $data['startdate'];
            $enddate = $data['enddate'];
            $description = $data['description'];
Beispiel #3
0
        }
    }
    $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>";
}
echo $frm->close() . "\n\n<br />\n\n<div class=\"contentbox\">\n<table align=\"center\"><tr><td>\n<strong>" . $aInt->lang("global", "sendmessage") . "</strong>\n</td><td>\n";
$frmsub = new WHMCS_Form("frm3");
echo $frmsub->form("clientsemails.php?userid=" . $userid);
echo $frmsub->hidden("action", "send");
Beispiel #4
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 Email Message Log");
$aInt->title = $aInt->lang("system", "emailmessagelog");
$aInt->sidebar = "utilities";
$aInt->icon = "logs";
$aInt->sortableTableInit("date");
$result = select_query("tblemails,tblclients", "COUNT(tblemails.id)", "tblemails.userid=tblclients.id");
$data = mysql_fetch_array($result);
$numrows = $data[0];
$result = select_query("tblemails,tblclients", "tblemails.id,tblemails.date,tblemails.subject,tblemails.userid,tblclients.firstname,tblclients.lastname", "tblemails.userid=tblclients.id", "tblemails`.`id", "DESC", $page * $limit . ("," . $limit));
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $date = $data['date'];
    $subject = $data['subject'];
    $userid = $data['userid'];
    $firstname = $data['firstname'];
    $lastname = $data['lastname'];
    $tabledata[] = array(fromMySQLDate($date, "time"), "<a href=\"#\" onClick=\"window.open('clientsemails.php?&displaymessage=true&id=" . $id . "','','width=650,height=400,scrollbars=yes');return false\">" . $subject . "</a>", "<a href=\"clientssummary.php?userid=" . $userid . "\">" . $firstname . " " . $lastname . "</a>", "<a href=\"sendmessage.php?resend=true&emailid=" . $id . "\"><img src=\"images/icons/resendemail.png\" border=\"0\" alt=\"" . $aInt->lang("emails", "resendemail") . "\"></a>");
}
$content = $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "subject"), $aInt->lang("system", "recepient"), ""), $tabledata);
$aInt->content = $content;
$aInt->display();
    $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'];
    $date = $data['date'];
    $duedate = $data['duedate'];
    $total = $data['total'];
    $paymentmethod = $data['paymentmethod'];
    $paymentmethod = $gatewaysarray[$paymentmethod];
    $date = fromMySQLDate($date);
    $duedate = fromMySQLDate($duedate);
    $firstname = $data['firstname'];
    $lastname = $data['lastname'];
    $companyname = $data['companyname'];
    $groupid = $data['groupid'];
    $currency = getCurrency($userid);
    $total = formatCurrency($total);
    $tabledata[] = array("<a href=\"invoices.php?action=edit&id=" . $id . "\">" . $id . "</a>", $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid), $date, $duedate, $total, "<input type=\"button\" value=\"View Processing Window\" onClick=\"openCCDetails(" . $id . ");return false\">");
}
echo $aInt->sortableTable(array(array("id", $aInt->lang("fields", "id")), array("clientname", $aInt->lang("fields", "clientname")), array("date", $aInt->lang("fields", "invoicedate")), array("duedate", $aInt->lang("fields", "duedate")), array("total", $aInt->lang("fields", "total")), $aInt->lang("supportticketescalations", "actions")), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jscode = $jscode;
$aInt->display();
Beispiel #6
0
 $result = select_query("tbladmins", "tbladmins.*,tbladminroles.name", array("disabled" => "0"), "firstname` ASC,`lastname", "ASC", "", "tbladminroles ON tbladmins.roleid=tbladminroles.id");
 while ($data = mysql_fetch_array($result)) {
     $departments = $deptnames = array();
     $supportdepts = db_build_in_array(explode(",", $data['supportdepts']));
     if ($supportdepts) {
         $resultdeptids = select_query("tblticketdepartments", "name", "id IN (" . $supportdepts . ")");
         while ($data_resultdeptids = mysql_fetch_array($resultdeptids)) {
             $deptnames[] = $data_resultdeptids[0];
         }
     }
     if (!count($deptnames)) {
         $deptnames[] = $aInt->lang("global", "none");
     }
     $tabledata[] = array($data['firstname'] . " " . $data['lastname'], "<a href=\"mailto:" . $data['email'] . "\">" . $data['email'] . "</a>", $data['username'], $data['name'], implode(", ", $deptnames), "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $data['id'] . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Edit\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $data['id'] . "')\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
 }
 echo $aInt->sortableTable(array($aInt->lang("fields", "name"), $aInt->lang("fields", "email"), $aInt->lang("fields", "username"), $aInt->lang("administrators", "adminrole"), $aInt->lang("administrators", "assigneddepts"), "", ""), $tabledata);
 echo "<h2>" . $aInt->lang("administrators", "inactive") . " </h2>";
 $tabledata = array();
 $result = select_query("tbladmins", "tbladmins.*,tbladminroles.name", array("disabled" => "1"), "firstname` ASC,`lastname", "ASC", "", "tbladminroles ON tbladmins.roleid=tbladminroles.id");
 while ($data = mysql_fetch_array($result)) {
     $departments = $deptnames = array();
     $supportdepts = db_build_in_array(explode(",", $data['supportdepts']));
     if ($supportdepts) {
         $resultdeptids = select_query("tblticketdepartments", "name", "id IN (" . $supportdepts . ")");
         while ($data_resultdeptids = mysql_fetch_array($resultdeptids)) {
             $deptnames[] = $data_resultdeptids[0];
         }
     }
     if (!count($deptnames)) {
         $deptnames[] = $aInt->lang("global", "none");
     }
$patterns[] = "/Service ID: (.*?) /";
$patterns[] = "/Domain ID: (.*?) /";
$patterns[] = "/Invoice ID: (.*?) /";
$patterns[] = "/Quote ID: (.*?) /";
$patterns[] = "/Order ID: (.*?) /";
$patterns[] = "/Transaction ID: (.*?) /";
$replacements[] = "<a href=\"clientssummary.php?userid=\$1\">User ID: \$1</a> ";
$replacements[] = "<a href=\"clientsservices.php?id=\$1\">Service ID: \$1</a> ";
$replacements[] = "<a href=\"clientsdomains.php?id=\$1\">Domain ID: \$1</a> ";
$replacements[] = "<a href=\"invoices.php?action=edit&id=\$1\">Invoice ID: \$1</a> ";
$replacements[] = "<a href=\"quotes.php?action=manage&id=\$1\">Quote ID: \$1</a> ";
$replacements[] = "<a href=\"orders.php?action=view&id=\$1\">Order ID: \$1</a> ";
$replacements[] = "<a href=\"transactions.php?action=edit&id=\$1\">Transaction ID: \$1</a> ";
$result = select_query("tblactivitylog", "", $where, "id", "DESC", $page * $limit . ("," . $limit));
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $description = $data['description'];
    $username = $data['user'];
    $date = $data['date'];
    $ipaddr = $data['ipaddr'];
    $description .= " ";
    $description = whmcsHtmlspecialchars($description);
    $description = preg_replace($patterns, $replacements, $description);
    $tabledata[] = array(fromMySQLDate($date, "time"), "<div align=\"left\">" . $description . "</div>", $username, $ipaddr);
}
echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "description"), $aInt->lang("fields", "username"), $aInt->lang("fields", "ipaddress")), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->display();
        $status = "<font color=#669900>" . $aInt->lang("system", "ticketreplyimportsuccess") . "</font>";
    }
    if ($status == "Blocked Potential Email Loop") {
        $status = $aInt->lang("system", "ticketimportblockloop");
    }
    if ($status == "Department Not Found") {
        $status = $aInt->lang("system", "ticketimportdeptnotfound");
    }
    if ($status == "Ticket ID Not Found") {
        $status = $aInt->lang("system", "ticketimporttidnotfound");
    }
    if ($status == "Unregistered Email Address") {
        $status = $aInt->lang("system", "ticketimportunregistered");
    }
    if ($status == "Exceeded Limit of 10 Tickets within 15 Minutes") {
        $status = $aInt->lang("system", "ticketimportexceededlimit");
    }
    if ($status == "Blocked Ticket Opening from Unregistered User") {
        $status = $aInt->lang("system", "ticketimportunregisteredopen");
    }
    if ($status == "Only Replies Allowed by Email") {
        $status = $aInt->lang("system", "ticketimportrepliesonly");
    }
    $subject = 75 < strlen($subject) ? substr($subject, 0, 75) . "..." : $subject;
    $tabledata[] = array(fromMySQLDate($date, true), $to, "<a href=\"#\" onClick=\"window.open('" . $_SERVER['PHP_SELF'] . ("?display=true&id=" . $id . "','','width=650,height=400,scrollbars=yes');return false\">" . $subject . "</a><br>") . $aInt->lang("emails", "from") . (": " . $name . " &laquo;" . $email . "&raquo;"), $status);
}
echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("emails", "to"), $aInt->lang("emails", "subject"), $aInt->lang("fields", "status")), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->display();
    $color = $data['color'];
    $showactive = $data['showactive'];
    $showawaiting = $data['showawaiting'];
    $autoclose = $data['autoclose'];
    $sortorder = $data['sortorder'];
    $showactive = $showactive ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    $showawaiting = $showawaiting ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    $autoclose = $autoclose ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    if (4 < $statusid) {
        $delete = "<a href=\"#\" onClick=\"doDelete('" . $statusid . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>";
    } else {
        $delete = "";
    }
    $tabledata[] = array("<span style=\"font-weight:bold;color:" . $color . "\">" . $title . "</span>", $showactive, $showawaiting, $autoclose, $sortorder, "<a href=\"" . $_SERVER['PHP_SELF'] . "?action=edit&id=" . $statusid . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", $delete);
}
echo $aInt->sortableTable(array($aInt->lang("fields", "title"), $aInt->lang("ticketstatusconfig", "includeinactivetickets"), $aInt->lang("ticketstatusconfig", "includeinawaitingreply"), $aInt->lang("ticketstatusconfig", "autoclose"), $aInt->lang("products", "sortorder"), "", ""), $tabledata);
echo "\r\n";
echo "<s";
echo "cript type=\"text/javascript\" src=\"../includes/jscript/jquery.miniColors.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../includes/jscript/css/jquery.miniColors.css\" />\n";
$jquerycode = "\$(\".colorpicker\").miniColors();";
echo "\n<h2>";
if ($action == "edit") {
    $result = select_query("tblticketstatuses", "", array("id" => $id));
    $data = mysql_fetch_array($result);
    $title = $data['title'];
    $color = $data['color'];
    $sortorder = $data['sortorder'];
    $showactive = $data['showactive'];
    $showawaiting = $data['showawaiting'];
    $autoclose = $data['autoclose'];
    echo $aInt->lang("ticketstatusconfig", "edit");
Beispiel #10
0
            if (isset($AdminsArray[$adminid])) {
                $admin = $AdminsArray[$adminid];
            } else {
                $result2 = select_query("tbladmins", "firstname,lastname", array("id" => $adminid));
                $data = mysql_fetch_array($result2);
                $admin = $data['firstname'] . " " . $data['lastname'];
                $AdminsArray[$adminid] = $admin;
            }
        } else {
            $admin = "";
        }
        $tabledata[] = array("<input type=\"checkbox\" name=\"selids[]\" value=\"" . $id . "\" class=\"checkall\">", $date, $title, $description, $admin, $status, $duedate, "<a href=\"" . $PHP_SELF . "?action=edit&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
    }
    $tableformurl = $_SERVER['PHP_SELF'];
    $tableformbuttons = "<input type=\"submit\" value=\"Assign to Me\" class=\"button\" name=\"mass_assign\"> <input type=\"submit\" value=\"Set In Progress\" class=\"button\" name=\"mass_inprogress\"> <input type=\"submit\" value=\"Set as Completed\" class=\"button\" name=\"mass_completed\"> <input type=\"submit\" value=\"Set to Postponed\" class=\"button\" name=\"mass_postponed\"> <input type=\"submit\" value=\"Delete\" class=\"button\" name=\"mass_delete\">";
    echo $aInt->sortableTable(array("checkall", array("date", "Date"), array("title", "Title"), array("description", "Description"), array("admin", "Admin"), array("status", "Status"), array("duedate", "Due Date"), "", ""), $tabledata, $tableformurl, $tableformbuttons);
} else {
    if ($action == "edit") {
        $table = "tbltodolist";
        $fields = "";
        $where = array("id" => $id);
        $result = select_query($table, $fields, $where);
        $data = mysql_fetch_array($result);
        $date = $data['date'];
        $title = $data['title'];
        $description = $data['description'];
        $admin = $data['admin'];
        $status = $data['status'];
        $duedate = $data['duedate'];
        $date = fromMySQLDate($date);
        $duedate = fromMySQLDate($duedate);
Beispiel #11
0
        $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>");
    }
    $content = "<p>" . $aInt->lang("system", "moduledebuglogdesc") . "</p>\n<form method=\"post\" action=\"\">\n<p align=\"center\">";
    if ($CONFIG['ModuleDebugMode']) {
        $content .= "<input type=\"submit\" name=\"disable\" value=\"" . $aInt->lang("system", "disabledebuglogging") . "\" />";
    } else {
        $content .= "<input type=\"submit\" name=\"enable\" value=\"" . $aInt->lang("system", "enabledebuglogging") . "\" />";
    }
    $content .= " <input type=\"submit\" name=\"reset\" value=\"" . $aInt->lang("system", "resetdebuglogging") . "\" /></p>\n</form>\n" . $aInt->sortableTable(array(array("", $aInt->lang("fields", "date"), 120), array("", $aInt->lang("fields", "module"), 120), array("", $aInt->lang("fields", "action"), 150), $aInt->lang("fields", "request"), $aInt->lang("fields", "response")), $tabledata);
} else {
    $result = select_query("tblmodulelog", "", array("id" => $id));
    $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'];
    $date = fromMySQLDate($date, "time");
    $content = $aInt->lang("fields", "date") . ": " . $date . " - " . $aInt->lang("fields", "module") . ": " . $module . " - " . $aInt->lang("fields", "action") . ": " . $action . "<br /><br />\n<b>" . $aInt->lang("fields", "request") . "</b><br />\n<textarea rows=\"10\" style=\"width:100%;\">" . htmlentities($request) . "</textarea><br /><br />\n<b>" . $aInt->lang("fields", "response") . "</b><br />\n<textarea rows=\"20\" style=\"width:100%;\">" . htmlentities($response) . "</textarea><br /><br />";
    if ($arrdata) {
        $content .= "<b>" . $aInt->lang("fields", "interpretedresponse") . "</b><br />\n<textarea rows=\"20\" style=\"width:100%;\">" . htmlentities($arrdata) . "</textarea><br /><br />";
    }
Beispiel #12
0
    $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");
        while ($data2 = mysql_fetch_array($result2)) {
            $assigned[] = "<a href=\"configadmins.php?action=manage&id=" . $data2['id'] . "\"" . ($data2['disabled'] ? " style=\"color:#ccc;\"" : "") . ">" . $data2['username'] . "</a>";
        }
        if (count($assigned)) {
            $deletejs = "alert('" . $aInt->lang("adminroles", "nodelinuse", 1) . "')";
        } else {
            $assigned[] = $aInt->lang("global", "none");
        }
        $tabledata[] = array($data['name'], implode(", ", $assigned), "<a href=\"" . $PHP_SELF . "?action=edit&id=" . $data['id'] . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", "<a href=\"#\" onClick=\"" . $deletejs . "\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>");
    }
    echo $aInt->sortableTable(array($aInt->lang("fields", "groupname"), $aInt->lang("supportticketdepts", "assignedadmins"), "", ""), $tabledata);
} else {
    if ($action == "add") {
        echo "\n<p>";
        echo "<s";
        echo "trong>";
        echo $aInt->lang("adminroles", "addnew");
        echo "</strong></p>\n<form method=\"post\" action=\"";
        echo $_SERVER['PHP_SELF'];
        echo "?action=addrole\">\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">";
        echo $aInt->lang("fields", "name");
        echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"name\" size=\"40\" value=\"";
        echo $name;
        echo "\"></td></tr>\n</table>\n<p align=\"center\"><input type=\"submit\" value=\"";
        echo $aInt->lang("global", "continue");
        echo " >>\" class=\"button\" /></p>\n</form>\n\n";
    $nextduedate = $data['nextduedate'];
    $status = $data['domainstatus'];
    $notes = $data['notes'];
    $firstname = $data['firstname'];
    $lastname = $data['lastname'];
    $companyname = $data['companyname'];
    $groupid = $data['groupid'];
    $currency = $data['currency'];
    if (!$domain) {
        $domain = "(" . $aInt->lang("addons", "nodomain") . ")";
    }
    $linkvalue = $dtype == "other" ? "" : " <a href=\"http://" . $domain . "\" target=\"_blank\" style=\"color:#cc0000\"><small>www</small></a>";
    if ($billingcycle == "One Time" || $billingcycle == "Free Account") {
        $nextduedate = "0000-00-00";
        $amount = $firstpaymentamount;
    }
    $currency = getCurrency("", $currency);
    $amount = formatCurrency($amount);
    $regdate = fromMySQLDate($regdate);
    $nextduedate = $nextduedate == "0000-00-00" ? "-" : fromMySQLDate($nextduedate);
    $billingcycle = $aInt->lang("billingcycles", str_replace(array("-", "account", " "), "", strtolower($billingcycle)));
    $tabledata[] = array("<input type=\"checkbox\" name=\"selectedclients[]\" value=\"" . $id . "\" class=\"checkall\" />", "<a href=\"clientshosting.php?userid=" . $userid . "&id=" . $id . "\">" . $id . "</a>", $dpackage . " <span class=\"label " . strtolower($status) . "\">" . $status . "</span>", "<a href=\"clientshosting.php?userid=" . $userid . "&id=" . $id . "\">" . $domain . "</a>" . $linkvalue, $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid), $amount, $billingcycle, $nextduedate);
}
$tableformurl = "sendmessage.php?type=product&multiple=true";
$tableformbuttons = "<input type=\"submit\" value=\"" . $aInt->lang("global", "sendmessage") . "\" class=\"button\">";
echo $aInt->sortableTable(array("checkall", array("id", $aInt->lang("fields", "id")), array("product", $aInt->lang("fields", "product")), array("domain", $aInt->lang("fields", "domain")), array("clientname", $aInt->lang("fields", "clientname")), array("amount", $aInt->lang("fields", "price")), array("billingcycle", $aInt->lang("fields", "billingcycle")), array("nextduedate", $aInt->lang("fields", "nextduedate"))), $tabledata, $tableformurl, $tableformbuttons);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->display();
    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");
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $name = $data['name'];
        $tabledata[] = array($name, "<a href=\"" . $_SERVER['PHP_SELF'] . ("?action=manage&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"") . $aInt->lang("global", "edit") . "\"></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>");
    }
    echo $aInt->sortableTable(array($aInt->lang("addons", "name"), "", ""), $tabledata);
} else {
    if ($action == "manage") {
        if ($id) {
            $edittitle = "Edit Rule";
            $result = select_query("tblticketescalations", "", array("id" => $id));
            $data = mysql_fetch_array($result);
            $id = $data['id'];
            $name = $data['name'];
            $departments = $data['departments'];
            $statuses = $data['statuses'];
            $priorities = $data['priorities'];
            $timeelapsed = $data['timeelapsed'];
            $newdepartment = $data['newdepartment'];
            $newstatus = $data['newstatus'];
            $newpriority = $data['newpriority'];
Beispiel #15
0
    $invoicenum = $data['invoicenum'];
    $date = $data['date'];
    $duedate = $data['duedate'];
    $datepaid = $data['datepaid'];
    $credit = $data['credit'];
    $total = $data['total'];
    $paymentmethod = $data['paymentmethod'];
    $paymentmethod = $gatewaysarray[$paymentmethod];
    $status = $data['status'];
    $status = getInvoiceStatusColour($status, false);
    $date = fromMySQLDate($date);
    $duedate = fromMySQLDate($duedate);
    $datepaid = $datepaid == "0000-00-00 00:00:00" ? "-" : fromMySQLDate($datepaid);
    $total = formatCurrency($credit + $total);
    if (!$invoicenum) {
        $invoicenum = $id;
    }
    $tabledata[] = array("<input type=\"checkbox\" name=\"selectedinvoices[]\" value=\"" . $id . "\" class=\"checkall\">", "<a href=\"invoices.php?action=edit&id=" . $id . "\">" . $invoicenum . "</a>", $date, $duedate, $datepaid, "<a href=\"invoices.php?action=invtooltip&id=" . $id . "&userid=" . $userid . generate_token("link") . ("\" class=\"invtooltip\" lang=\"\">" . $total . "</a>"), $paymentmethod, $status, "<a href=\"invoices.php?action=edit&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
}
$tableformurl = $_SERVER['PHP_SELF'] . "?userid=" . $userid . "&filter=1";
if ($page) {
    $tableformurl .= "&page=" . $page;
}
$tableformbuttons = "<input type=\"submit\" value=\"" . $aInt->lang("invoices", "markpaid") . "\" class=\"btn-success\" name=\"markpaid\" onclick=\"return confirm('" . $aInt->lang("invoices", "markpaidconfirm", "1") . "')\" /> <input type=\"submit\" value=\"" . $aInt->lang("invoices", "markunpaid") . "\" name=\"markunpaid\" onclick=\"return confirm('" . $aInt->lang("invoices", "markunpaidconfirm", "1") . "')\" /> <input type=\"submit\" value=\"" . $aInt->lang("invoices", "markcancelled") . "\" name=\"markcancelled\" onclick=\"return confirm('" . $aInt->lang("invoices", "markcancelledconfirm", "1") . "')\" />   <input type=\"submit\" value=\"" . $aInt->lang("invoices", "duplicateinvoice") . "\" name=\"duplicateinvoice\" onclick=\"return confirm('" . $aInt->lang("invoices", "duplicateinvoiceconfirm", "1") . "')\" />   <input type=\"submit\" value=\"" . $aInt->lang("invoices", "sendreminder") . "\" name=\"paymentreminder\" onclick=\"return confirm('" . $aInt->lang("invoices", "sendreminderconfirm", "1") . "')\" /> <input type=\"submit\" value=\"" . $aInt->lang("invoices", "merge") . "\" name=\"merge\" onclick=\"return confirm('" . $aInt->lang("invoices", "mergeconfirm", "1") . "')\" /> <input type=\"submit\" value=\"" . $aInt->lang("invoices", "masspay") . "\" name=\"masspay\" onclick=\"return confirm('" . $aInt->lang("invoices", "masspayconfirm", "1") . "')\" /> <input type=\"submit\" value=\"" . $aInt->lang("global", "delete") . "\" class=\"btn-danger\" name=\"massdelete\" onclick=\"return confirm('" . $aInt->lang("invoices", "massdeleteconfirm", "1") . "')\" />";
echo $aInt->sortableTable(array("checkall", array("id", $aInt->lang("fields", "invoicenum")), array("date", $aInt->lang("fields", "invoicedate")), array("duedate", $aInt->lang("fields", "duedate")), array("datepaid", $aInt->lang("fields", "datepaid")), array("total", $aInt->lang("fields", "total")), array("paymentmethod", $aInt->lang("fields", "paymentmethod")), array("status", $aInt->lang("fields", "status")), "", ""), $tabledata, $tableformurl, $tableformbuttons);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
$aInt->display();
Beispiel #16
0
        $aInt->sortableTableInit("nopagination");
        $result = select_query("tblaccounts", "", array("invoiceid" => $id), "date` ASC,`id", "ASC");
        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'];
            $amount = formatCurrency($amountin - $amountout);
            $fees = formatCurrency($fees);
            if ($gateway) {
                $result2 = select_query("tblpaymentgateways", "", array("gateway" => $gateway, "setting" => "name"));
                $data = mysql_fetch_array($result2);
                $gateway = $data['value'];
            } else {
                $gateway = "No Gateway";
            }
            $tabledata[] = array($date, $gateway, $transid, $amount, $fees, "<a href=\"#\" onClick=\"doDeleteTransaction('" . $ide . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
        }
        echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "paymentmethod"), $aInt->lang("fields", "transid"), $aInt->lang("fields", "amount"), $aInt->lang("fields", "fees"), ""), $tabledata);
    }
}
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->display();
Beispiel #17
0
    $id2 = $data['id'];
    $date = $data['date'];
    $relid = $data['relid'];
    $reason = $data['reason'];
    $type = $data['type'];
    $date = fromMySQLDate($date, "time");
    $domain = $data['domain'];
    $productname = $data['productname'];
    $groupname = $data['groupname'];
    $productid = $data['productid'];
    $userid = $data['userid'];
    $firstname = $data['firstname'];
    $lastname = $data['lastname'];
    $companyname = $data['companyname'];
    $groupid = $data['groupid'];
    $nextduedate = $data['nextduedate'];
    $nextduedate = fromMySQLDate($nextduedate);
    $xname = "<a href=\"clientshosting.php?userid=" . $userid . "&id=" . $productid . "\">" . $groupname . " - " . $productname . "</a><br>" . $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid);
    if ($domain) {
        $xname .= " (" . $domain . ")";
    }
    $type = $type == "Immediate" ? $aInt->lang("clients", "cancelrequestimmediate") : $aInt->lang("clients", "cancelrequestendofperiod") . ("<br>(" . $nextduedate . ")");
    $tabledata[] = array($date, $xname, "<textarea rows=3 cols=64 readonly>" . $reason . "</textarea>", $type, "<a href=\"#\" onClick=\"doDelete('" . $id2 . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>");
}
echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "product"), $aInt->lang("fields", "reason"), $aInt->lang("fields", "type"), ""), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
$aInt->display();
    $color = $data['color'];
    $showpending = $data['showpending'];
    $showactive = $data['showactive'];
    $showcancelled = $data['showcancelled'];
    $sortorder = $data['sortorder'];
    $showpending = $showpending ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    $showactive = $showactive ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    $showcancelled = $showcancelled ? "<img src=\"images/icons/tick.png\">" : "<img src=\"images/icons/disabled.png\">";
    if (4 < $statusid) {
        $delete = "<a href=\"#\" onClick=\"doDelete('" . $statusid . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>";
    } else {
        $delete = "";
    }
    $tabledata[] = array("<span style=\"font-weight:bold;color:" . $color . "\">" . $title . "</span>", $showpending, $showactive, $showcancelled, $sortorder, "<a href=\"" . $_SERVER['PHP_SELF'] . "?action=edit&id=" . $statusid . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", $delete);
}
echo $aInt->sortableTable(array($aInt->lang("fields", "title"), $aInt->lang("orderstatusconfig", "includeinpending"), $aInt->lang("orderstatusconfig", "includeinactive"), $aInt->lang("orderstatusconfig", "includeincancelled"), $aInt->lang("products", "sortorder"), "", ""), $tabledata);
echo "\n";
echo "<s";
echo "cript type=\"text/javascript\" src=\"../includes/jscript/jquery.miniColors.js\"></script>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../includes/jscript/css/jquery.miniColors.css\" />\n";
$jquerycode = "\$(\".colorpicker\").miniColors();";
echo "\n<h2>";
if ($action == "edit") {
    $data = get_query_vals("tblorderstatuses", "", array("id" => $id));
    extract($data);
    echo $aInt->lang("orderstatusconfig", "edit");
} else {
    $title = $showpending = $showactive = $showcancelled = "";
    $color = "#000000";
    echo $aInt->lang("orderstatusconfig", "addnew");
}
echo "</h2>\n\n<form method=\"post\" action=\"";
Beispiel #19
0
$result = select_query("tbltax", "", array("level" => "1"), "state", "ASC");
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $name = $data['name'];
    $state = $data['state'];
    $country = $data['country'];
    $taxrate = $data['taxrate'];
    if ($state == "") {
        $state = $aInt->lang("taxconfig", "taxappliesanystate");
    }
    if ($country == "") {
        $country = $aInt->lang("taxconfig", "taxappliesanycountry");
    }
    $tabledata[] = array($name, $country, $state, $taxrate . "%", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\"><img src=\"images/delete.gif\" border=\"0\"></a>");
}
echo $aInt->sortableTable(array($aInt->lang("fields", "name"), $aInt->lang("fields", "country"), $aInt->lang("fields", "state"), $aInt->lang("fields", "taxrate"), ""), $tabledata);
echo "\n  </div>\n</div>\n<div id=\"tab1box\" class=\"tabbox\">\n  <div id=\"tab_content\">\n\n";
$aInt->sortableTableInit("nopagination");
$tabledata = "";
$result = select_query("tbltax", "", array("level" => "2"), "state", "ASC");
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $name = $data['name'];
    $state = $data['state'];
    $country = $data['country'];
    $taxrate = $data['taxrate'];
    if ($state == "") {
        $state = $aInt->lang("taxconfig", "taxappliesanystate");
    }
    if ($country == "") {
        $country = $aInt->lang("taxconfig", "taxappliesanycountry");
Beispiel #20
0
     $currencyid = $data['currencyid'];
     $clientlink = $userid ? $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid) : "-";
     $currency = $userid ? getCurrency("", $currencyid) : getCurrency("", $currency);
     $amountin = formatCurrency($amountin);
     $fees = formatCurrency($fees);
     $amountout = formatCurrency($amountout);
     if ($invoiceid != "0") {
         $description .= " (<a href=\"invoices.php?action=edit&id=" . $invoiceid . "\">#" . $invoiceid . "</a>)";
     }
     if ($transid != "") {
         $description .= "<br>Trans ID: " . $transid;
     }
     $gateway = $gatewaysarray[$gateway];
     $tabledata[] = array($clientlink, $date, $gateway, $description, $amountin, $fees, $amountout, "<a href=\"" . $PHP_SELF . "?action=edit&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
 }
 echo $aInt->sortableTable(array($aInt->lang("fields", "clientname"), $aInt->lang("fields", "date"), $aInt->lang("fields", "paymentmethod"), $aInt->lang("fields", "description"), $aInt->lang("transactions", "amountin"), $aInt->lang("transactions", "fees"), $aInt->lang("transactions", "amountout"), "", ""), $tabledata, $tableformurl, $tableformbuttons);
 if (checkPermission("View Income Totals", true)) {
     echo "\n<table cellspacing=\"1\" cellpadding=\"5\" bgcolor=\"#cccccc\" width=\"600\" align=\"center\">\n<tr bgcolor=\"#f4f4f4\" style=\"text-align:center;font-weight:bold;\"><td></td><td>";
     echo $aInt->lang("transactions", "totalincome");
     echo "</td><td>";
     echo $aInt->lang("transactions", "totalfees");
     echo "</td><td>";
     echo $aInt->lang("transactions", "totalexpenditure");
     echo "</td><td>";
     echo $aInt->lang("transactions", "totalbalance");
     echo "</td></tr>\n";
     foreach ($totals as $currency => $values) {
         $currency = getCurrency("", $currency);
         echo "<tr bgcolor=\"#ffffff\" style=\"text-align:center;\"><td bgcolor=\"#f4f4f4\"><b>" . $currency['code'] . "</b></td><td>" . formatCurrency($values['in']) . "</td><td>" . formatCurrency($values['fees']) . "</td><td>" . formatCurrency($values['out']) . "</td><td bgcolor=\"#f4f4f4\"><b>" . formatCurrency($values['total']) . "</b></td></tr>";
     }
     if (!count($totals)) {
        $totalfees = $totalfees + $fees;
        $amountin = formatCurrency($amountin);
        $fees = formatCurrency($fees);
        $amountout = formatCurrency($amountout);
        if ($invoiceid != "0") {
            $description .= " (<a href=\"invoices.php?action=edit&id=" . $invoiceid . "\">#" . $invoiceid . "</a>)";
        }
        if ($transid != "") {
            $description .= " - Trans ID: " . $transid;
        }
        $result2 = select_query("tblpaymentgateways", "", array("gateway" => $gateway, "setting" => "name"));
        $data = mysql_fetch_array($result2);
        $gateway = $data['value'];
        $tabledata[] = array($date, $gateway, $description, $amountin, $fees, $amountout, "<a href=\"" . $PHP_SELF . "?userid=" . $userid . "&action=edit&id=" . $ide . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Edit\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $ide . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Delete\"></a>");
    }
    echo $aInt->sortableTable(array(array("date", $aInt->lang("fields", "date")), array("gateway", $aInt->lang("fields", "paymentmethod")), array("description", $aInt->lang("fields", "description")), array("amountin", $aInt->lang("transactions", "amountin")), array("fees", $aInt->lang("transactions", "fees")), array("amountout", $aInt->lang("transactions", "amountout")), "", ""), $tabledata);
} else {
    if ($action == "add") {
        $date2 = getTodaysDate();
        echo "\n<p><b>";
        echo $aInt->lang("transactions", "addnew");
        echo "</b></p>\n\n<form method=\"post\" action=\"";
        echo $PHP_SELF;
        echo "?userid=";
        echo $userid;
        echo "&sub=add\" name=\"calendarfrm\">\n\n<table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n<tr><td width=\"15%\" class=\"fieldlabel\">";
        echo $aInt->lang("fields", "date");
        echo "</td><td class=\"fieldarea\"><input type=\"text\" name=\"date\" value=\"";
        echo $date2;
        echo "\" class=\"datepick\"></td><td class=\"fieldlabel\" width=\"15%\">";
        echo $aInt->lang("transactions", "amountin");
Beispiel #22
0
    echo "';\n}}\n</script>\n\n";
    $aInt->sortableTableInit("nopagination");
    $patterns = $replacements = array();
    $patterns[] = "/ Invoice #(.*?) /";
    $replacements[] = " <a href=\"invoices.php?action=edit&id=\$1\" target=\"_blank\">Invoice #\$1</a>";
    $result = select_query("tblcredit", "", array("clientid" => $userid), "date", "DESC");
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $date = $data['date'];
        $date = fromMySQLDate($date);
        $description = $data['description'];
        $amount = $data['amount'];
        $description = preg_replace($patterns, $replacements, $description . " ");
        $tabledata[] = array($date, nl2br(trim($description)), formatCurrency($amount), "<a href=\"" . $PHP_SELF . "?userid=" . $userid . "&action=edit&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
    }
    echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "description"), $aInt->lang("fields", "amount"), "", ""), $tabledata);
    echo "\n<p align=\"center\"><input type=\"button\" value=\"";
    echo $aInt->lang("addons", "closewindow");
    echo "\" onClick=\"window.close()\" class=\"button\" /></p>\n\n";
} else {
    if ($action == "add" || $action == "remove") {
        checkPermission("Manage Credits");
        $date = getTodaysDate();
        $amount = "0.00";
        if ($action == "add") {
            $title = $aInt->lang("credit", "addcredit");
        } else {
            $title = $aInt->lang("credit", "removecredit");
        }
        $result = select_query("tblclients", "", array("id" => $userid));
        $data = mysql_fetch_array($result);
Beispiel #23
0
             }
             require_once "../modules/servers/" . $type . "/" . $type . ".php";
             $adminlogincode = function_exists($type . "_AdminLink") ? call_user_func($type . "_AdminLink", $params) : "-";
         } else {
             $adminlogincode = $aInt->lang("global", "modulefilemissing");
         }
         if ($disabled) {
             $disableddata[] = array("<i>" . $name . " (" . $aInt->lang("emailtpls", "disabled") . ")</i>", "<i>" . $ipaddress . "</i>", "<i>" . $numaccounts . "/" . $maxaccounts . "</i>", "<i>" . $percentuse . "%</i>", $adminlogincode, "<div align=\"center\"><a href=\"" . $PHP_SELF . "?sub=enable&id=" . $id . generate_token("link") . "\" title=\"" . $aInt->lang("configservers", "enableserver") . "\"><img src=\"images/icons/disabled.png\"></a></div>", "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $id . "\" title=\"" . $aInt->lang("global", "edit") . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"Edit\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\" title=\"" . $aInt->lang("global", "delete") . "\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>");
         }
         $tabledata[] = array("<a href=\"" . $PHP_SELF . "?sub=makedefault&id=" . $id . generate_token("link") . "\" title=\"" . $aInt->lang("configservers", "defaultsignups") . ("\">" . $name . "</a> " . $active), $ipaddress, "" . $numaccounts . "/" . $maxaccounts, "" . $percentuse . "%", $adminlogincode, "<div align=\"center\"><a href=\"" . $PHP_SELF . "?sub=disable&id=" . $id . generate_token("link") . "\" title=\"" . $aInt->lang("configservers", "disableserver") . "\"><img src=\"images/icons/tick.png\"></a></div>", "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $id . "\" title=\"" . $aInt->lang("global", "edit") . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\" title=\"" . $aInt->lang("global", "delete") . "\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>");
     }
     foreach ($disableddata as $data) {
         $tabledata[] = $data;
     }
 }
 echo $aInt->sortableTable(array($aInt->lang("configservers", "servername"), $aInt->lang("fields", "ipaddress"), $aInt->lang("configservers", "activeaccounts"), $aInt->lang("configservers", "usage"), " ", $aInt->lang("fields", "status"), "", ""), $tabledata);
 echo "\n<h2>";
 echo $aInt->lang("configservers", "groups");
 echo "</h2>\n\n<p>";
 echo $aInt->lang("configservers", "groupsdesc");
 echo "</p>\n\n";
 $tabledata = "";
 $result = select_query("tblservergroups", "", "", "name", "ASC");
 while ($data = mysql_fetch_array($result)) {
     $id = $data['id'];
     $name = $data['name'];
     $filltype = $data['filltype'];
     if ($filltype == 1) {
         $filltype = $aInt->lang("configservers", "addleast");
     } else {
         if ($filltype == 2) {
}
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'];
    $count = $data['count'];
    $tabledata[] = array($domain, $count, "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "delete") . "\"></a>");
}
echo $aInt->sortableTable(array($aInt->lang("bans", "emaildomain"), $aInt->lang("bans", "usagecount"), ""), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
$aInt->display();
Beispiel #25
0
$patterns[] = "/Domain ID: (.*?) /";
$patterns[] = "/Invoice ID: (.*?) /";
$patterns[] = "/Quote ID: (.*?) /";
$patterns[] = "/Order ID: (.*?) /";
$patterns[] = "/Transaction ID: (.*?) /";
$replacements[] = "";
$replacements[] = "<a href=\"clientsservices.php?id=\$1\">Service ID: \$1</a> ";
$replacements[] = "<a href=\"clientsdomains.php?id=\$1\">Domain ID: \$1</a> ";
$replacements[] = "<a href=\"invoices.php?action=edit&id=\$1\">Invoice ID: \$1</a> ";
$replacements[] = "<a href=\"quotes.php?action=manage&id=\$1\">Quote ID: \$1</a> ";
$replacements[] = "<a href=\"orders.php?action=view&id=\$1\">Order ID: \$1</a> ";
$replacements[] = "<a href=\"transactions.php?action=edit&id=\$1\">Transaction ID: \$1</a> ";
$result = select_query("tblactivitylog", "", $where, "id", "DESC", $page * $limit . ("," . $limit));
while ($data = mysql_fetch_array($result)) {
    $id = $data['id'];
    $description = $data['description'];
    $username = $data['user'];
    $date = $data['date'];
    $ipaddr = $data['ipaddr'];
    $description .= " ";
    $description = whmcsHtmlspecialchars($description);
    $description = preg_replace($patterns, $replacements, $description);
    $tabledata[] = array(fromMySQLDate($date, "time"), "<div align=\"left\">" . $description . "</div>", $username, $ipaddr);
}
echo $aInt->sortableTable(array("Date", "Description", "User", "IP Address"), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
$aInt->display();
Beispiel #26
0
        $withdrawn = $data['withdrawn'];
        $firstname = $data['firstname'];
        $lastname = $data['lastname'];
        $companyname = $data['companyname'];
        $groupid = $data['groupid'];
        $currency = $data['currency'];
        $signups = $data['signups'];
        $currency = getCurrency("", $currency);
        $balance = formatCurrency($balance);
        $withdrawn = formatCurrency($withdrawn);
        $date = fromMySQLDate($date);
        $tabledata[] = array("<input type=\"checkbox\" name=\"selectedclients[]\" value=\"" . $id . "\" class=\"checkall\" />", "<a href=\"affiliates.php?action=edit&id=" . $id . "\">" . $id . "</a>", $date, $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid), $visitors, $signups, $balance, $withdrawn, "<a href=\"" . $PHP_SELF . "?action=edit&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
    }
    $tableformurl = "sendmessage.php?type=affiliate&multiple=true";
    $tableformbuttons = "<input type=\"submit\" value=\"" . $aInt->lang("global", "sendmessage") . "\" class=\"button\">";
    echo $aInt->sortableTable(array("checkall", array("id", $aInt->lang("fields", "id")), array("date", $aInt->lang("affiliates", "signupdate")), array("clientname", $aInt->lang("fields", "clientname")), array("visitors", $aInt->lang("affiliates", "visitorsref")), $aInt->lang("affiliates", "signups"), array("balance", $aInt->lang("fields", "balance")), array("withdrawn", $aInt->lang("affiliates", "withdrawn")), "", ""), $tabledata, $tableformurl, $tableformbuttons);
} else {
    if ($action == "edit") {
        if ($pay == "true") {
            $error = AffiliatePayment($affaccid, "");
            if ($error) {
                infoBox($aInt->lang("affiliates", "paymentfailed"), $error);
            } else {
                infoBox($aInt->lang("affiliates", "paymentsuccess"), $aInt->lang("affiliates", "paymentsuccessdetail"));
            }
        }
        echo $infobox;
        $result = select_query("tblaffiliates", "", array("id" => $id));
        $data = mysql_fetch_array($result);
        $id = $data['id'];
        if (!$id) {
Beispiel #27
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();
    $query .= " LIMIT " . (int) $page * $limit . "," . (int) $limit;
    $result = full_query($query);
    while ($data = mysql_fetch_array($result)) {
        $id = $data['id'];
        $date = $data['date'];
        $title = $data['title'];
        $published = $data['published'];
        $date = fromMySQLDate($date, true);
        if ($published == "on") {
            $published = "Yes";
        } else {
            $published = "No";
        }
        $tabledata[] = array($date, $title, $published, "<a href=\"" . $PHP_SELF . "?action=manage&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>", "<a href=\"#\" onClick=\"doDelete('" . $id . "');return false\"><img src=\"images/delete.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></a>");
    }
    echo $aInt->sortableTable(array($aInt->lang("fields", "date"), $aInt->lang("fields", "title"), $aInt->lang("support", "announcepublished"), "", ""), $tabledata, $tableformurl, $tableformbuttons);
} else {
    if ($action == "manage") {
        $multilang_title = array();
        $multilang_announcement = array();
        if ($id) {
            $action = "Edit";
            $result = select_query("tblannouncements", "", array("id" => $id, "language" => ""));
            $data = mysql_fetch_array($result);
            $id = $data['id'];
            $date = $data['date'];
            $title = $data['title'];
            $announcement = $data['announcement'];
            $published = $data['published'];
            $date = fromMySQLDate($date, true);
            $result = select_query("tblannouncements", "", array("parentid" => $id));
Beispiel #29
0
                        }
                    }
                }
            }
        }
        if ($invoicecount) {
            $invoiced = $aInt->lang("global", "yes");
        } else {
            $invoiced = $aInt->lang("global", "no");
        }
        $managelink = "<a href=\"billableitems.php?action=manage&id=" . $id . "\">";
        $tabledata[] = array("<input type=\"checkbox\" name=\"bitem[" . $id . "]\" class=\"checkall\" />", $managelink . $id . "</a>", $aInt->outputClientLink($userid, $firstname, $lastname, $companyname, $groupid), $managelink . $description . "</a>", $hours, $amount, $invoiceaction, $invoiced, $managelink . "<img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
    }
    $tableformurl = $_SERVER['PHP_SELF'] . "?status=" . $status;
    $tableformbuttons = "<input type=\"submit\" name=\"invoice\" value=\"" . $aInt->lang("billableitems", "invoicenextcronrun") . "\" onclick=\"return confirm('" . $aInt->lang("billableitems", "invoicenextcronrunconfirm", "1") . "')\" /> <input type=\"submit\" name=\"delete\" value=\"" . $aInt->lang("global", "delete") . "\" class=\"btn-danger\" onclick=\"return confirm('" . $aInt->lang("global", "deleteconfirm", "1") . "')\" />";
    echo $aInt->sortableTable(array("checkall", array("id", $aInt->lang("fields", "id")), $aInt->lang("fields", "clientname"), array("description", $aInt->lang("fields", "description")), array("hours", $aInt->lang("billableitems", "hours")), array("amount", $aInt->lang("fields", "amount")), array("invoiceaction", $aInt->lang("billableitems", "invoiceaction")), array("invoicecount", $aInt->lang("status", "invoiced")), "", ""), $tabledata, $tableformurl, $tableformbuttons);
} else {
    if ($action == "manage") {
        $jquery = "";
        if ($id) {
            $pagetitle = $aInt->lang("billableitems", "edititem");
            $result = select_query("tblbillableitems", "", array("id" => $id));
            $data = mysql_fetch_array($result);
            $id = $data['id'];
            $userid = $data['userid'];
            $description = $data['description'];
            $hours = $data['hours'];
            $amount = $data['amount'];
            if ($hours != 0) {
                $amount = format_as_currency($amount / $hours);
            }
Beispiel #30
0
$aInt->deleteJSConfirm("doDelete", "quotes", "deletesure", "?userid=" . $userid . "&delete=true&quoteid=");
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'];
    $datecreated = $data['datecreated'];
    $stage = $aInt->lang("status", str_replace(" ", "", strtolower($data['stage'])));
    $total = $data['total'];
    $validuntil = fromMySQLDate($validuntil);
    $datecreated = fromMySQLDate($datecreated);
    $total = formatCurrency($total);
    $tabledata[] = array("<a href=\"quotes.php?action=manage&id=" . $id . "\">" . $id . "</a>", $subject, $datecreated, $validuntil, $total, $stage, "<a href=\"quotes.php?action=manage&id=" . $id . "\"><img src=\"images/edit.gif\" width=\"16\" height=\"16\" border=\"0\" alt=\"" . $aInt->lang("global", "edit") . "\"></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>");
}
echo $aInt->sortableTable(array(array("id", $aInt->lang("quotes", "quotenum")), array("subject", $aInt->lang("quotes", "subject")), array("datecreated", $aInt->lang("quotes", "createdate")), array("validuntil", $aInt->lang("quotes", "validuntil")), array("total", $aInt->lang("fields", "total")), array("stage", $aInt->lang("quotes", "stage")), "", ""), $tabledata);
$content = ob_get_contents();
ob_end_clean();
$aInt->content = $content;
$aInt->jquerycode = $jquerycode;
$aInt->jscode = $jscode;
$aInt->display();