51.gif

Search (advanced search)
Use this Search form before posting, asking or make a new thread.
Tips: Use Quotation mark to search words (eg. "How To Make Money Online")

02-27-2015, 12:27 AM
Post: #1
[NULL This] [WHMCS Addon] ResellerClub and LogicBoxes Tools for WHMCS
Hello,

can anyone here null whmcs addons ResellerClub and LogicBoxes Tools for WHMCS

Download link :

Download link for php 5.3 :

http://mir.cr/1YB9GTKP

Download link for php 5.4

http://mir.cr/MGKELJIZ
02-27-2015, 12:54 AM (This post was last modified: 02-27-2015 12:54 AM by JustSomeDude.)
Post: #2
RE:
resellerclubmods_tools.php
[php]
<?php
error_reporting(1 | 4);
if (!defined("WHMCS")) {
echo "File cannot be accessed directly<br />";
$whmcs_root_dir = realpath(dirname(__FILE__) . "/../../../");
include_once($whmcs_root_dir . "/dbconnect.php");
}

if (!class_exists("idna_convert")) {
require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php");
}

$IDN = new idna_convert();
$transfer_complete_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>The Domain transfer process for {\$domain_name} has been successfully completed. The details of the domain transfer are below:</p>\r\n<p>Domain: {\$domain_name}<br />\r\nRegistration Length: {\$domain_reg_period}<br />\r\nTransfer Price: {\$domain_first_payment_amount}<br />\r\nNext Due Date: {\$domain_next_due_date}</p>\r\n<p>You may login to your client area at {\$whmcs_url} to manage your domain.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_unlock_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently locked with your losing domain register. Before we can continue with your transfer this domain would need to be unlocked.</p>\r\n<p>If you need help getting the lock removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_epp_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} secret code, EPP code and also known as authorization code was not provided with the Domain Transfer approval and we sent an approval mail requesting you to provide the EPP code.</p>\r\n<p>As soon as you have provided the EPP code, the domain transfer request will be send to your losing domain register.</p>\r\n<p>If you are having trouble with this step or if you have not received the mail to provide the EPP code please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_idprotect_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently WHOIS ID protected. Before we can continue with your transfer you need to disable the ID WHOIS Protection.</p>\r\n<p>If you need help getting the ID Protection removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$table = "tbladdonmodules";
$fields = "value";
$where = array(
"setting" => "rcfree_license"
);
$result = select_query($table, $fields, $where);
$data = mysql_fetch_array($result);
$rcfree_license = $data["value"];
global $softversion;
global $modulename;
global $mdf;
global $fse;
global $is_php;
$subver = ioncube_loader_iversion();
$is_php = substr(phpversion(), 0, 3);
$mdf = sha1(file_get_contents(__FILE__));
$fse = filesize(__FILE__);
$releasedate = "2014-12-05";
$softversion = "2.8.3";
$modulename = "RCLBT";
if (!function_exists("rcfree_check_license")) {
function rcfree_check_license($rcfree_license, $rcfree_localkey = "")
{
$results = array(
"status" => "Active",
"description" => "Enjoy the null!",
"validdomain" => $_SERVER['HTTP_HOST'],
"validip" => $_SERVER['SERVER_ADDR'],
"validdirectory" => $_SERVER['DOCUMENT_ROOT']
);
return $results;
}

}

if (!empty($rcfree_license)) {
$table = "mod_resellerclubmodstools";
$fields = "localkey";
$result = select_query($table, $fields, "");
$data = mysql_fetch_array($result);
$rcfree_localkey = $data["localkey"];
if (isset($_REQUEST["dolicensecheck"])) {
$rcfree_localkey = "";
update_query("mod_resellerclubmodstools", array(
"localkey" => ""
));
}

if (substr($_SERVER["argv"][0], -8) != "cron.php") {
$results = rcfree_check_license($rcfree_license, $rcfree_localkey);
} else {
$results["status"] = "Active";
}

switch ($results["status"]) {
case "Active":
if ($results["localkey"]) {
$localkeydata = $results["localkey"];
$datetime = date("Y-m-d H:i:s");
$table = "mod_resellerclubmodstools";
$update = array(
"localkey" => $localkeydata,
"lastcheck" => $datetime
);
update_query($table, $update);
}

if (isset($results["addons"])) {
$addons_array = explode(";", htmlspecialchars_decode($results["addons"]));
$addondue = str_replace("nextduedate=", "", $addons_array[1]);
if ($addondue < $releasedate) {
exit("<p style=\"color:red;font-weight:bold;\">Your \"" . $modulename . " Support and Updates\" Addon expired prior to this release and must be renewed to run this version</p>");
}

}

require(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/functions.php");
require(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/clientareatools.php");
function resellerclubmods_tools_output($vars)
{
if (!class_exists("idna_convert")) {
require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php");
}

$IDN = new idna_convert();
global $customadminpath;
global $CONFIG;
$maileradmin = $vars["maileradmin"];
$sendconfmail = $vars["sendconfmail"];
$emailtplname = $vars["templatename"];
$templatenameunlock = $vars["templatenameunlock"];
$templatenameeppcode = $vars["templatenameeppcode"];
$templatenameidprotect = $vars["templatenameidprotect"];
$templatenamefailed = $vars["templatenamefailed"];
$brokentransfers = $vars["brokentransfers"];
$promo_update_active = $vars["promo_end_check"];
$raa_report_active = $vars["raa_domain_check"];
$transferfree_tlds = $vars["transferfree_tlds"];
if (empty($transferfree_tlds)) {
$transferfree_tlds = "com.au,net.au,co.uk,me.uk,org.uk,com.ru,net.ru,org.ru,ru";
}

$transferfree_tlds_array = explode(",", $transferfree_tlds);
array_walk($transferfree_tlds_array, "rcm_array_trim");
if (isset($_POST["force"]) and& $_POST["force"] == "true") {
$table = "mod_resellerclubmodstools";
$update = array(
"localkey" => "",
"lastcheck" => ""
);
update_query($table, $update);
header("location: addonmodules.php?module=resellerclubmods_tools");
}

$table = "tblconfiguration";
$fields = "setting,value";
$result = select_query($table, $fields, "");
while ($data = mysql_fetch_array($result)) {
$tblconf[$data[0]] = $data[1];
}
$style_label = "class=\"label terminated\"";
$style_labelwarn = "class=\"label pending\"";
$style_labelinfo = "class=\"label expired\"";
$style_labelok = "class=\"label active\"";
$style_promolabel = "class=\"label active\" style=\"cursor:pointer;\"";
$nosupportedmovetlds = array(
".cn",
".com.cn",
".net.cn",
"org.cn",
".org.nz",
".net.nz",
".co.nz"
);
$LANG = $vars["_lang"];
if (isset($_POST["changeaccount"]) and& $_POST["changeaccount"] == "true") {
$table = "mod_resellerclubmodstools";
if ($_POST["account_number"] == 1) {
$rcauth_userid = $vars["first_rcauth_userid"];
$rcauth_password = $vars["first_rcauth_apikey"];
$logicbox_registrar = $vars["first_domainregistrar"];
$defaultcurrency = $vars["first_defaultcurrency"];
$currencyswitch = $vars["first_currencyswitch"];
$multiplicator = $vars["first_multiplicator"];
$account_name = $vars["first_acc_name"];
$account_number = 1;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table, $update);
echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>";
} else {
if ($_POST["account_number"] == 2) {
$rcauth_userid = $vars["second_rcauth_userid"];
$rcauth_password = $vars["second_rcauth_apikey"];
$logicbox_registrar = $vars["second_domainregistrar"];
$defaultcurrency = $vars["second_defaultcurrency"];
$currencyswitch = $vars["second_currencyswitch"];
$multiplicator = $vars["second_multiplicator"];
$account_name = $vars["second_acc_name"];
$account_number = 2;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table, $update);
echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>";
} else {
if ($_POST["account_number"] == 3) {
$rcauth_userid = $vars["third_rcauth_userid"];
$rcauth_password = $vars["third_rcauth_apikey"];
$logicbox_registrar = $vars["third_domainregistrar"];
$defaultcurrency = $vars["third_defaultcurrency"];
$currencyswitch = $vars["third_currencyswitch"];
$multiplicator = $vars["third_multiplicator"];
$account_name = $vars["third_acc_name"];
$account_number = 3;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table, $update);
echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>";
} else {
if ($_POST["account_number"] == 4) {
$rcauth_userid = $vars["fourth_rcauth_userid"];
$rcauth_password = $vars["fourth_rcauth_apikey"];
$logicbox_registrar = $vars["fourth_domainregistrar"];
$defaultcurrency = $vars["fourth_defaultcurrency"];
$currencyswitch = $vars["fourth_currencyswitch"];
$multiplicator = $vars["fourth_multiplicator"];
$account_name = $vars["fourth_acc_name"];
$account_number = 4;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table, $update);
echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>";
} else {
echo "<div style=\"padding-top:10px;padding-bottom:10px;\" class=\"errorbox\">" . $LANG["changeaccountinfo"] . "</div>";
}

}

}

}

}

$table = "mod_resellerclubmodstools";
$fields = "rcauth_userid,rcauth_password,rchttp_api,logicbox_registrar,defaultcurrency,curr​encyswitch,multiplicator,account_name,localkey,lastcheck,account_number";
$result = select_query($table, $fields, "");
$data = mysql_fetch_array($result);
$rcauth_userid = $data["rcauth_userid"];
$rcauth_password = $data["rcauth_password"];
$rchttp_api = $data["rchttp_api"];
$logicbox_registrar = $data["logicbox_registrar"];
$defaultcurrency = $data["defaultcurrency"];
$currencyswitch = $data["currencyswitch"];
$multiplicator = $data["multiplicator"];
$account_name = $data["account_name"];
$lockey = $data["localkey"];
$syncdate = $data["lastcheck"];
$account_number = $data["account_number"];
if ($logicbox_registrar == "resellerclub") {
$registrar_label = "ResellerClub";
}

if ($logicbox_registrar == "netearthone") {
$registrar_label = "NetEarthOne";
}

if ($logicbox_registrar == "stargate") {
$registrar_label = "Resell.biz (stargate/uk2)";
}

if ($logicbox_registrar == "resellercamp") {
$registrar_label = "ResellerCamp";
}

if ($account_number == 1) {
$is_transfercheck = $vars["first_transer_check"];
$is_hooksignup = $vars["first_hook_signup"];
$is_pwdsignup = $vars["first_pwd_signup"];
$is_hookmodify = $vars["first_hook_modify"];
$is_pwdmodify = $vars["first_pwd_modify"];
$is_hookdelete = $vars["first_hook_delete"];
$is_threshold = $vars["first_threshold"];
$is_domainsync = $vars["first_domainsync_check"];
$is_domainsynctlds = $vars["first_domainsync_tlds"];
$is_onlybaseslab = $vars["first_only_baseslab"];
$is_defaultns = $vars["first_ns_override"];
$is_domaintelescope = $vars["first_domainsync_telescope"];
} else {
if ($account_number == 2) {
$is_transfercheck = $vars["second_transer_check"];
$is_hooksignup = $vars["second_hook_signup"];
$is_pwdsignup = $vars["second_pwd_signup"];
$is_hookmodify = $vars["second_hook_modify"];
$is_pwdmodify = $vars["second_pwd_modify"];
$is_hookdelete = $vars["second_hook_delete"];
$is_threshold = $vars["second_threshold"];
$is_domainsync = $vars["second_domainsync_check"];
$is_domainsynctlds = $vars["second_domainsync_tlds"];
$is_onlybaseslab = $vars["second_only_baseslab"];
$is_defaultns = $vars["second_ns_override"];
$is_domaintelescope = $vars["second_domainsync_telescope"];
} else {
if ($account_number == 3) {
$is_transfercheck = $vars["third_transer_check"];
$is_hooksignup = $vars["third_hook_signup"];
$is_pwdsignup = $vars["third_pwd_signup"];
$is_hookmodify = $vars["third_hook_modify"];
$is_pwdmodify = $vars["third_pwd_modify"];
$is_hookdelete = $vars["third_hook_delete"];
$is_threshold = $vars["third_threshold"];
$is_domainsync = $vars["third_domainsync_check"];
$is_domainsynctlds = $vars["third_domainsync_tlds"];
$is_onlybaseslab = $vars["third_only_baseslab"];
$is_defaultns = $vars["third_ns_override"];
$is_domaintelescope = $vars["third_domainsync_telescope"];
} else {
if ($account_number == 4) {
$is_transfercheck = $vars["fourth_transer_check"];
$is_hooksignup = $vars["fourth_hook_signup"];
$is_pwdsignup = $vars["fourth_pwd_signup"];
$is_hookmodify = $vars["fourth_hook_modify"];
$is_pwdmodify = $vars["fourth_pwd_modify"];
$is_hookdelete = $vars["fourth_hook_delete"];
$is_threshold = $vars["fourth_threshold"];
$is_domainsync = $vars["fourth_domainsync_check"];
$is_domainsynctlds = $vars["fourth_domainsync_tlds"];
$is_onlybaseslab = $vars["fourth_only_baseslab"];
$is_defaultns = $vars["fourth_ns_override"];
$is_domaintelescope = $vars["fourth_domainsync_telescope"];
}

}

}

}

$is_promocheck = $vars["promo_end_check"];
$is_raacheck = $vars["raa_domain_check"];
$is_domainlookup = $vars["use_account_whois"];
$is_recurringdomupd = $vars["update_domain_recurring"];
$modulelink = $vars["modulelink"];
$version = $vars["version"];
$currencysymbol = $vars["currencysymbol"];
$google_currency = $vars["google_currency"];
if ($vars["totalfundscolor"]) {
$totalfundscolor = $vars["totalfundscolor"];
} else {
$totalfundscolor = "#000000";
}

if ($vars["blockedfundscolor"]) {
$blockedfundscolor = $vars["blockedfundscolor"];
} else {
$blockedfundscolor = "#CC0000";
}

if ($vars["availfundscolor"]) {
$availfundscolor = $vars["availfundscolor"];
} else {
$availfundscolor = "#779500";
}

if ($_GET["user"] == "rcuser-vs-whmcsusers") {
$qtyrecords = 20;
$qtypageno = 1;
$method = "GET";
$apifunction = "/api/customers/search.json";
$data = array(
"no-of-records" => $qtyrecords,
"page-no" => $qtypageno
);
$recsindb_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method);
$GLOBALS["recsindb_length"] = $recsindb_arrXml["recsindb"];
}

if (!class_exists("rcm_pagination")) {

class rcm_pagination
{
public $page = 1;
public $perPage = 20;
public $showFirstAndLast = false;

public function generate($array, $perPage = 20)
{
if (!empty($perPage)) {
$this->perPage = $perPage;
}

if (!empty($_GET["page"])) {
$this->page = $_GET["page"];
} else {
$this->page = 1;
}

if ($_GET["user"] == "rcuser-vs-whmcsusers") {
$this->length = $GLOBALS["recsindb_length"];
$this->pages = ceil($this->length / $this->perPage);
$this->start = 0;
} else {
$this->length = count($array);
$this->pages = ceil($this->length / $this->perPage);
$this->start = ceil(($this->page - 1) * $this->perPage);
}

return array_slice($array, $this->start, $this->perPage);
}

public function links()
{
global $_ADDONLANG;
$plinks = array();
$links = array();
$slinks = array();
if (count($_GET)) {
$queryURL = "";
foreach ($_GET as $key => $value) {
if ($key != "page") {
$queryURL .= "and" . $key . "=" . $value;
}

}
}

if (!isset($queryURL)) {
$queryURL = "";
}

if (1 < $this->pages) {
if ($this->page != 1) {
if ($this->showFirstAndLast) {
$plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=1" . $queryURL . "\">&laquo;&laquo; " . $_ADDONLANG["pagefirst"] . " </a>";
}

$plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page - 1) . $queryURL . "\">&laquo; " . $_ADDONLANG["pageprev"] . " </a>";
}

for ($j = 1; $j < $this->pages + 1; $j++) {
if ($this->page == $j) {
$links[] = "<a style=\"font-weight:bold;\">" . $j . "</a>";
} else {
$links[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $j . $queryURL . "\">" . $j . "</a>";
}

}
if ($this->page < $this->pages) {
$slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page + 1) . $queryURL . "\"> " . $_ADDONLANG["pagenext"] . " &raquo; </a>";
if ($this->showFirstAndLast) {
$slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $this->pages . $queryURL . "\"> " . $_ADDONLANG["pagelast"] . " &raquo;&raquo; </a>";
}

}

return implode(" ", $plinks) . implode(" ", $links) . implode(" ", $slinks);
}

}

}

}

$method = "GET";
$apifunction = "/api/resellers/details.json";
$resellerdetails_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method);
$reseller_buycurrency = $resellerdetails_arrXml["parentsellingcurrencysymbol"];
$lb_sellingcurrency = $resellerdetails_arrXml["sellingcurrencysymbol"];
$desglose_tblcurrencies = select_query("tblcurrencies", "id,code", array(
"default" => 1
));
$fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies);
$currency = $fila_tblcurrencies["id"];
$currencycode = $fila_tblcurrencies["code"];
$reseller_sellingcurrency = $currencycode;
if ($currencyswitch == "on") {
$desglose_tblcurrencies = select_query("tblcurrencies", "rate", array(
"code" => $defaultcurrency
));
$fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies);
$currencyrate = $fila_tblcurrencies["rate"];
}

echo "<table style=\"margin-bottom:10px;\"><tr><td><img style=\"float:left;border:0\" src=\"../modules/addons/resellerclubmods_tools/img/rcmini.png\" /></td>\r\n\t\t\t\t <td style=\"padding:5px 0px 0px 5px;\"><strong>" . $LANG["freetoolslike"] . "</strong> " . $LANG["followus"] . ": <a href=\"https://facebook.com/resmods\" target=\"_blank\">Facebook</a> <a href=\"https://twitter.com/resmods\" target=\"_blank\">Twitter</a><br />\r\n\t\t\t\t " . $LANG["freetoolslikevote1"] . " <a href=\"http://www.whmcs.com/appstore/329/FREE-ResellerClub-Tools-v2.html\" target=\"_blank\">WHMCS Appstore</a>. " . $LANG["freetoolslikevote2"] . "<br />\r\n\t\t\t\t </td></tr></table>";
$selectorarray = array();
if (!empty($vars["first_acc_name"])) {
$selectorarray[1] = $vars["first_acc_name"] . " - " . $vars["first_rcauth_userid"];
}

if (!empty($vars["second_acc_name"])) {
$selectorarray[2] = $vars["second_acc_name"] . " - " . $vars["second_rcauth_userid"];
}

if (!empty($vars["third_acc_name"])) {
$selectorarray[3] = $vars["third_acc_name"] . " - " . $vars["third_rcauth_userid"];
}

if (!empty($vars["fourth_acc_name"])) {
$selectorarray[4] = $vars["fourth_acc_name"] . " - " . $vars["fourth_rcauth_userid"];
}

foreach ($selectorarray as $key => $value) {
$selectoptions .= "<option value=\"" . $key . "\">" . $value . "</option>";
}
$tools_change_acc_dropdown = "\r\n\t\t\t<form action=\"" . $_SERVER["REQUEST_URI"] . "\" method=\"post\">\r\n\t\t\t<strong>" . $LANG["changeto"] . "</strong>\r\n\t\t\t<select name=\"account_number\" onchange=\"submit();\">\r\n\t\t\t<option value=\"\">" . $LANG["changercacc"] . "</option>\r\n\t\t\t" . $selectoptions . "\r\n\t\t\t</select>\r\n\t\t\t<input type=\"hidden\" name=\"changeaccount\" value=\"true\" />\r\n\t\t\t</form>";
$configuredto = "\r\n\t\t\t<div style=\"float:left;padding:4px;width:auto;\"><strong>" . $LANG["configuredto"] . "</strong> " . $account_name . " - <strong>" . $LANG["lbtitle"] . "</strong> <span " . $style_label . ">" . $logicbox_registrar . "</span> - <strong>ID:</strong> " . $rcauth_userid . "</div>\r\n\t\t\t<div style=\"float:left;padding-left:10px\">" . $tools_change_acc_dropdown . "</div>\r\n\t\t\t<div></div><br />\r\n\t\t\t<div style=\"border-bottom:1px solid #cccccc;margin-top:5px;padding-top:5px;\"></div><br />";
if ($_GET["trans"] == "showfunds") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/fundsbalance.php");
} else {
if ($_GET["domain"] == "domain-pricing-import") {
require(ROOTDIR . "/includes/currencyfunctions.php");
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdompricing.php");
} else {
if ($_GET["service"] == "hostingimport") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importproducts.php");
} else {
if ($_GET["domain"] == "domainimport") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdomains.php");
} else {
if ($_GET["domain"] == "showpromos") {
require(ROOTDIR . "/includes/currencyfunctions.php");
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/managepromos.php");
} else {
if ($_GET["user"] == "whmcsuser-vs-rcusers") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/exportusers.php");
} else {
if ($_GET["user"] == "rcuser-vs-whmcsusers") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importusers.php");
} else {
if ($_GET["domain"] == "transfercheck") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/transfercheck.php");
} else {
if ($_GET["domain"] == "moveservices") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/movedomain.php");
} else {
if ($_GET["domain"] == "bulkmove") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/bulkdomainmove.php");
} else {
if ($_GET["domain"] == "tldmanage") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/tldmanage.php");
} else {
if ($_GET["automation"] == "cronjobs") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/automationtools.php");
} else {
if ($_GET["domain"] == "raamanagement") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/raamanagement.php");
} else {
if ($_GET["domain"] == "rcmwhois") {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/guiwhois.php");
} else {
include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/home.php");
}

}

}

}

}

}

}

}

}

}

}

}

}

}

}

function resellerclubmods_tools_sidebar($vars)
{
$modulelink = $vars["modulelink"];
$version = $vars["version"];
$LANG = $vars["_lang"];
$rcfree_license = $vars["rcfree_license"];
if (!function_exists("check_versions")) {
function check_versions($verUrl)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_URL, $verUrl);
$result = curl_exec($ch);
curl_close($ch);
$headers = explode("\n", $result);
$redir = $verUrl;
$j = count($headers);
for ($i = 0; $i < $j; $i++) {
if (strpos($headers[$i], "Location:") !== false) {
$redir = trim(str_replace("Location:", "", $headers[$i]));
break;
}

}
return $redir;
}

}

$verUrl = "http://www.rcmodules.com/versions/rcfreetools_v3.txt";
$redir = check_versions($verUrl);
$stream = fopen($redir, "r");
$vcheck = stream_get_contents($stream);
fclose($stream);
$vk = str_replace(".", "", $vcheck);
$vn = str_replace(".", "", $version);
if ((int) $vk <= (int) $vn) {
$updateavail = $LANG["latestok"];
} else {
$updateavail = "<strong style=\"color:#CC0000;\">" . $LANG["updateavail"] . "</strong>";
}

$sidebar = "\r\n\t\t\t<span class=\"header\"><img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" /> RC and LB Tools v2</span>\r\n\t\t\t<ul class=\"menu\">\r\n\t\t\t<li><a style=\"color:#cc0000;\" href=\"configaddonmods.php#resellerclubmods_tools\">" . $LANG["configaddontitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "\">" . $LANG["toolshome"] . "</a></li>\r\n\t\t\t<li><hr style=\\\"border: 1px solid #1A4D80; height: 1px;\\\" /></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&automation=cronjobs\">" . $LANG["automationtools"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=whmcsuser-vs-rcusers\">" . $LANG["whmcsvsrcusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=rcuser-vs-whmcsusers\">" . $LANG["rcvswhmcscusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domainimport\">" . $LANG["domainimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domain-pricing-import\">" . $LANG["domainpriceimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsd\">" . $LANG["rsdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rmd\">" . $LANG["rmdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=vps\">" . $LANG["vpssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=dhs\">" . $LANG["dhssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rrd\">" . $LANG["rrdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ree\">" . $LANG["reesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ssl\">" . $LANG["sslsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsl\">" . $LANG["sitelocksidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rcg\">" . $LANG["codeguardsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=tldmanage\">" . $LANG["tldmanagesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=showpromos\">" . $LANG["domainpromos"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=raamanagement\">" . $LANG["raamanagementtitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=moveservices\">" . $LANG["movetitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=bulkmove\">" . $LANG["bulkmovesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&trans=showfunds\">" . $LANG["resellerclubbalance"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=transfercheck\">" . $LANG["transferchecktitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=rcmwhois\">" . $LANG["whoisaddonlinktitle"] . "</a></li>\r\n\t\t\t</ul>\r\n\t\t\t<span class=\"plain_header\">" . $LANG["toolsinfotitle"] . "</span>\r\n\t\t\t<div class=\"smallfont\">" . $LANG["toolsversiontitle"] . $version . "<br />" . $updateavail . "</div><br />\r\n\t\t\t";
return $sidebar;
}

break;
case "Invalid":
echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key invalid</strong>";
break;
case "Expired":
echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key expired</strong>";
break;
case "Suspended":
echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key suspended</strong>";
break;
default:
echo "<strong style=\"color:#cc0000;\">Invalid Response</strong>";
break;
}
}

function resellerclubmods_tools_config()
{
global $license_result;
if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "2") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "second_acc_name",
"value" => "Second Account"
));
}

if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "3") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "third_acc_name",
"value" => "Third Account"
));
}

if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "4") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "fourth_acc_name",
"value" => "Fourth Account"
));
}

if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "2") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'second_%'");
}

if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "3") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'third_%'");
}

if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "4") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'fourth_%'");
}

$result = select_query("tbladdonmodules", "setting,value", array(
"module" => "resellerclubmods_tools"
));
while ($data = mysql_fetch_array($result)) {
$vars[$data[0]] = $data[1];
}
$conf_license = $vars["rcfree_license"];
$conf_rchttp_api = $vars["rchttp_api"];
$first_rcauth_userid = $vars["first_rcauth_userid"];
$first_rcauth_password = $vars["first_rcauth_apikey"];
$first_logicbox_registrar = $vars["first_domainregistrar"];
$first_defaultcurrency = $vars["first_defaultcurrency"];
$first_currencyswitch = $vars["first_currencyswitch"];
$first_multiplicator = $vars["first_multiplicator"];
$first_account_name = $vars["first_acc_name"];
$first_account_number = 1;
$default_promostyle = $vars["default_promostyle"];
$default_sellingprice = $vars["default_sellingprice"];
$showdefault_price = $vars["showdefault_price"];
if ($showdefault_price == "Yes") {
$showdefaultprice = "7.50";
}

if (!empty($conf_license) and& !empty($conf_rchttp_api) and& !empty($first_rcauth_userid) and& !empty($first_rcauth_password) and& !empty($first_account_name)) {
$table = "mod_resellerclubmodstools";
$fields = "account_number";
$result = select_query($table, $fields, "");
$data = mysql_fetch_array($result);
$tools_account_number = $data["account_number"];
if (empty($tools_account_number)) {
$table = "mod_resellerclubmodstools";
$values = array(
"account_name" => $first_account_name,
"account_number" => $first_account_number,
"rcauth_userid" => $first_rcauth_userid,
"rcauth_password" => $first_rcauth_password,
"rchttp_api" => $conf_rchttp_api,
"logicbox_registrar" => $first_logicbox_registrar,
"defaultcurrency" => $first_defaultcurrency,
"currencyswitch" => $first_currencyswitch,
"multiplicator" => $first_multiplicator
);
insert_query($table, $values);
}

}

$table = "tblcurrencies";
$fields = "code";
$result = select_query($table, $fields, "");
while ($data = mysql_fetch_array($result)) {
$tblcurrencies[] = $data["code"];
}
$currency_comma_separated = implode(",", $tblcurrencies);
$table = "tblemailtemplates";
$fields = "language,name";
$where = array(
"type" => "domain"
);
$result = select_query($table, $fields, $where);
while ($data = mysql_fetch_array($result)) {
if (empty($data["language"])) {
$tblmailtpls[] = $data["name"];
}

}
$tblmailtpls_comma_separated = implode(",", $tblmailtpls);
$tbldomtemplates = "None," . $tblmailtpls_comma_separated;
$table = "tbladmins";
$fields = "username";
$result = select_query($table, $fields, "");
while ($data = mysql_fetch_array($result)) {
$tbladmins[] = $data["username"];
}
$tbladmins_comma_separated = implode(",", $tbladmins);
$table = "tblregistrars";
$fields = "registrar";
$result = select_query($table, $fields, "");
while ($data = mysql_fetch_array($result)) {
$tblregistrars[] = $data["registrar"];
}
$tblregistrars = array_unique($tblregistrars);
$tblregistrars = array_diff($tblregistrars, array(
"resellerclub",
"resellerclubrcm",
"netearthone",
"netearthonercm",
"stargate",
"stargatercm",
"resellercamp",
"resellercamprcm"
));
$lbregistrars = implode(",", $tblregistrars);
if (!empty($lbregistrars)) {
$lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp," . $lbregistrars;
} else {
$lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp";
}

$doconfirm_second = "<script language=\"javascript\" type=\"text/javascript\">function secondDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["second_acc_name"] . "\\\". Are you sure?\");}</script>";
$doconfirm_third = "<script language=\"javascript\" type=\"text/javascript\">function thirdDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["third_acc_name"] . "\\\". Are you sure?\");}</script>";
$doconfirm_fourth = "<script language=\"javascript\" type=\"text/javascript\">function fourthDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["fourth_acc_name"] . "\\\". Are you sure?\");}</script>";
if (!empty($vars["first_acc_name"])) {
if (empty($vars["second_acc_name"])) {
$doActivate_second = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Second Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=2#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_second = $doconfirm_second . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act02\"></a>To disable the &quot;2# Live or Demo Account&quot; (<strong>" . $vars["second_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=2#resellerclubmods_tools\" onclick=\"return secondDelete();\">here</a></div>";
$alink_second = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act02\">2# Account</a>";
}

if (empty($vars["third_acc_name"])) {
$doActivate_third = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Third Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=3#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_third = $doconfirm_third . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act03\"></a>To disable the &quot;3# Live or Demo Account&quot; (<strong>" . $vars["third_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=3#resellerclubmods_tools\" onclick=\"return thirdDelete();\">here</a></div>";
$alink_third = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act03\">3# Account</a>";
}

if (empty($vars["fourth_acc_name"])) {
$doActivate_fourth = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Fourth Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=4#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_fourth = $doconfirm_fourth . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act04\"></a>To disable the &quot;4# Live or Demo Account&quot; (<strong>" . $vars["fourth_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=4#resellerclubmods_tools\" onclick=\"return fourthDelete();\">here</a></div>";
$alink_fourth = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act04\">4# Account</a>";
}

}

$scroller = "<script type=\"text/javascript\">\r\n\tjQuery(document).ready(function(){\r\n\t jQuery(\".scroll\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tvar offset = jQuery(jQuery(this).attr('href')).offset().top;\r\n\t\tjQuery('html, body').animate({scrollTop:offset}, 1000);\r\n\t });\r\n\t});\r\n\t</script>";
$base_fields = array(
"rcfree_license" => array(
"FriendlyName" => "License Key <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Description" => "Set your License Key &nbsp;&nbsp;" . $license_result . ""
),
"sectionlinks" => array(
"FriendlyName" => "Goto Section",
"Description" => $scroller . "<div style=\"padding:3px;\"><a class=\"scroll\" href=\"#act01\">1# Account</a>" . $alink_second . $alink_third . $alink_fourth . "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dth\">Domain Transfer Handling</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#cat\">Client Area Tools</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dpp\">Domain Promo Pricelist</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#shopint\">OrderBox - Cart Integration</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#misc\">Miscellaneous</a></div>"
),
"textseparator0" => array(
"FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Funds Widget Setup</span>",
"Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />"
),
"fundsbalance" => array(
"FriendlyName" => "Funds Balance Widget",
"Type" => "yesno",
"Description" => "Tick to show the widget for your Resellerclub and LogicBoxes funds balance on the Admin Homepage"
),
"currencysymbol" => array(
"FriendlyName" => "Use Currency Symbol",
"Type" => "yesno",
"Description" => "Tick to show the currency symbol (&euro;) instead the currency code (EUR)"
),
"totalfundscolor" => array(
"FriendlyName" => "Font Color Total Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for Total Funds, default = <font color='#000000'>#000000</font>"
),
"blockedfundscolor" => array(
"FriendlyName" => "Font Color Blocked Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for blocked funds, default = <font color='#CC0000'>#CC0000</font>"
),
"availfundscolor" => array(
"FriendlyName" => "Font Color Available Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for available funds, default = <font color='#779500'>#779500</font>"
),
"fontsize" => array(
"FriendlyName" => "Font Size",
"Type" => "text",
"Size" => "3",
"Description" => "Set the font size for the ouput, default = 12"
),
"fontfamily" => array(
"FriendlyName" => "Font Family",
"Type" => "text",
"Size" => "100",
"Description" => "<br />Set the font family for the ouput, default = Lucida Grande,Lucida Sans Unicode,Verdana,Arial,sans-serif"
),
"textseparator1" => array(
"FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Reseller Accounts Setup</span>",
"Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />"
),
"rchttp_api" => array(
"FriendlyName" => "Reseller API <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Default" => "https://httpapi.com",
"Description" => "API Url: https://httpapi.com</strong>"
)
);
$first_account_fields = array(
"first_acc" => array(
"FriendlyName" => "<strong style=\"font-size:14px;\">1# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>",
"Description" => "<a id=\"act01\"></a>"
),
"first_acc_name" => array(
"FriendlyName" => "Display Name <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Description" => "Set a Friendly Display Name"
),
"first_domainregistrar" => array(
"FriendlyName" => "Select your Registrar <span style=\"color:#cc0000\">*</span>",
"Type" => "dropdown",
"Options" => $lbdropdown,
"Description" => "Select only a valid LogicBoxes Registrar!"
),
"first_rcauth_userid" => array(
"FriendlyName" => "Reseller ID <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "8",
"Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)"
),
"first_rcauth_apikey" => array(
"FriendlyName" => "API Key <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "50",
"Description" => "Set your unique Reseller API Key"
),
"first_show_fundsbalance" => array(
"FriendlyName" => "Disable Fundsbalance on Widget",
"Type" => "yesno",
"Description" => "Tick to Disable Fundsbalance Output on the widget"
),
"first_ns_override" => array(
"FriendlyName" => "Default Nameservers",
"Type" => "text",
"Size" => "120",
"Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com"
),
"first_transer_check" => array(
"FriendlyName" => "Disable Transfer Check Cron",
"Type" => "yesno",
"Description" => "Tick to Disable Transfer Check Cron on this account"
),
"first_hook_signup" => array(
"FriendlyName" => "Disable Auto Customer Signup",
"Type" => "yesno",
"Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS"
),
"first_pwd_signup" => array(
"FriendlyName" => "Use WHMCS Password with Signup",
"Type" => "yesno",
"Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;"
),
"first_hook_modify" => array(
"FriendlyName" => "Disable Auto Customer Modify",
"Type" => "yesno",
"Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS"
),
"first_pwd_modify" => array(
"FriendlyName" => "Apply WHMCS Password if changed",
"Type" => "yesno",
"Description" => "Tick to sync the password in the reseller customer account when the password in WHMCS got changed"
),
"first_hook_delete" => array(
"FriendlyName" => "Disable Auto Customer Delete",
"Type" => "yesno",
"Description" => "Tick to Disable Customer deletion in your reseller account when a customer has been deleted in WHMCS"
),
"first_threshold" => array(
"FriendlyName" => "Disable Funds Threshold Check",
"Type" => "yesno",
"Description" => "Tick to Disable the hook for funds threshold mail alert"
),
"first_threshold_value" => array(
"FriendlyName" => "Override Reseller Funds Threshold",
"Type" => "text",
"Size" => "6",
"Description" => "You can override the Threshold value from your reseller account settings. Leave blank to use your reseller settings"
),
"subseparator101" => array(
"FriendlyName" => "<span style=\"color:#cc0000;\">Domain Price Sync</span>"
),
"first_domainsync_check" => array(
"FriendlyName" => "Disable Domain Price Sync",
"Type" => "yesno",
"Description" => "Tick to Disable Disable Domain Price Sync Cron on this account"
),
"first_domainsync_telescope" => array(
"FriendlyName" => "Disable Telescope Pricing",
"Type" => "yesno",
"Description" => "Tick to disable Telescope Pricing for the Sync Cron on this account"
),
"first_only_baseslab" => array(
"FriendlyName" => "Sync Clientgroup Price Slabs",
"Type" => "yesno",
"Description" => "By default, only the Default Base Slab Pricing will be synced. Tick to activate sync for all Domain Price Slabs"
),
"first_domainsync_tlds" => array(
"FriendlyName" => "Sync Only this TLD's",
"Type" => "text",
"Size" => "40",
"Description" => "Leave empty to sync all active TLDs Prices<br />Example: .us,.com,.co.uk,.net"
),
"subseparator102" => array(
"FriendlyName" => "<span style=\"color:#cc0000;\">Currency Setup</span>"
),
"first_defaultcurrency" => array(
"FriendlyName" => "Reseller Selling Currencies",
"Type" => "dropdown",
"Options" => $currency_comma_separated,
"Description" => "&nbsp;Select your <strong>Reseller Selling Currency</strong> if it is <strong>not equal to the WHMCS Default Currency</strong>. For eg. you will need to do this if your Selling Currency in your Reseller Account is USD but in WHMCS Default is set to EUR!"
),
"first_multiplicator" => array(
"FriendlyName" => "Default multiplicator",
"Type" => "dropdown",
"Options" => "1,10,100,1000",
"Description" => "Change only if your Reseller Selling Currency is calculated in 10's, 100's or 1000's"
),
"first_currencyswitch" => array(
"FriendlyName" => "Activate Currency Conversion",
"Type" => "yesno",
"Description" => "<span style=\"color:#cc0000;font-weight:bold;\">Important!</span> Tick this checkbox only if the Reseller Selling Currency is not equal to the WHMCS Default Currency."
)
);
if ($vars["first_acc_name"]) {
$first_activate = array(
"first_activate_second" => array(
"FriendlyName" => "",
"Description" => $doActivate_second
)
);
} else {
$first_activate = array();
}

if ($vars["second_acc_name"]) {
$second_account_fields = array(
"second_acc" => array(
"FriendlyName" => "<strong style=\"font-size:14px;\">2# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>"
),
"second_acc_name" => array(
"FriendlyName" => "Display Name",
"Type" => "text",
"Size" => "30",
"Description" => "Set a Friendly Display Name"
),
"second_domainregistrar" => array(
"FriendlyName" => "Select your Registrar",
"Type" => "dropdown",
"Options" => $lbdropdown,
"Description" => "Select only a valid LogicBoxes Registrar!"
),
"second_rcauth_userid" => array(
"FriendlyName" => "Reseller ID",
"Type" => "text",
"Size" => "8",
"Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)"
),
"second_rcauth_apikey" => array(
If it can be encoded, it can be decoded. If it can be decoded, it can be encoded. The circle of cryptography... Cool
02-27-2015, 01:04 AM
Post: #3
RE:
@JustSomeDude,

I have to replace with this below code in resellerclubmods_tools.php correct ??

PHP Code:
<?php
error_reporting
(4);
if (!
defined("WHMCS")) {
echo 
"File cannot be accessed directly<br />";
$whmcs_root_dir realpath(dirname(__FILE__) . "/../../../");
include_once(
$whmcs_root_dir "/dbconnect.php");
}

if (!
class_exists("idna_convert")) {
require_once(
ROOTDIR "/modules/addons/resellerclubmods_tools/incs/idnclass.php");
}

$IDN = new idna_convert();
$transfer_complete_message "\r\n<p>Dear {\$client_name},</p>\r\n<p>The Domain transfer process for {\$domain_name} has been successfully completed. The details of the domain transfer are below:</p>\r\n<p>Domain: {\$domain_name}<br />\r\nRegistration Length: {\$domain_reg_period}<br />\r\nTransfer Price: {\$domain_first_payment_amount}<br />\r\nNext Due Date: {\$domain_next_due_date}</p>\r\n<p>You may login to your client area at {\$whmcs_url} to manage your domain.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_unlock_message "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently locked with your losing domain register. Before we can continue with your transfer this domain would need to be unlocked.</p>\r\n<p>If you need help getting the hide removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_epp_message "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} secret code, EPP code and also known as authorization code was not provided with the Domain Transfer approval and we sent an approval mail requesting you to provide the EPP code.</p>\r\n<p>As soon as you have provided the EPP code, the domain transfer request will be send to your losing domain register.</p>\r\n<p>If you are having trouble with this step or if you have not received the mail to provide the EPP code please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$transfer_idprotect_message "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently WHOIS ID protected. Before we can continue with your transfer you need to disable the ID WHOIS Protection.</p>\r\n<p>If you need help getting the ID Protection removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";
$table "tbladdonmodules";
$fields "value";
$where = array(
"setting" => "rcfree_license"
);
$result select_query($table$fields$where);
$data mysql_fetch_array($result);
$rcfree_license $data["value"];
global 
$softversion;
global 
$modulename;
global 
$mdf;
global 
$fse;
global 
$is_php;
$subver ioncube_loader_iversion();
$is_php substr(phpversion(), 03);
$mdf sha1(file_get_contents(__FILE__));
$fse filesize(__FILE__);
$releasedate "2014-12-05";
$softversion "2.8.3";
$modulename "RCLBT";
if (!
function_exists("rcfree_check_license")) {
function 
rcfree_check_license($rcfree_license$rcfree_localkey "")
{
$results = array(
"status" => "Active",
"description" => "Enjoy the null!",
"validdomain" => $_SERVER['HTTP_HOST'],
"validip" => $_SERVER['SERVER_ADDR'],
"validdirectory" => $_SERVER['DOCUMENT_ROOT']
);
return 
$results;
}

}

if (!empty(
$rcfree_license)) {
$table "mod_resellerclubmodstools";
$fields "localkey";
$result select_query($table$fields"");
$data mysql_fetch_array($result);
$rcfree_localkey $data["localkey"];
if (isset(
$_REQUEST["dolicensecheck"])) {
$rcfree_localkey "";
update_query("mod_resellerclubmodstools", array(
"localkey" => ""
));
}

if (
substr($_SERVER["argv"][0], -8) != "cron.php") {
$results rcfree_check_license($rcfree_license$rcfree_localkey);
} else {
$results["status"] = "Active";
}

switch (
$results["status"]) {
case 
"Active":
if (
$results["localkey"]) {
$localkeydata $results["localkey"];
$datetime date("Y-m-d H:i:s");
$table "mod_resellerclubmodstools";
$update = array(
"localkey" => $localkeydata,
"lastcheck" => $datetime
);
update_query($table$update);
}

if (isset(
$results["addons"])) {
$addons_array explode(";"htmlspecialchars_decode($results["addons"]));
$addondue str_replace("nextduedate="""$addons_array[1]);
if (
$addondue $releasedate) {
exit(
"<p style=\"color:red;font-weight:bold;\">Your \"" $modulename " Support and Updates\" Addon expired prior to this release and must be renewed to run this version</p>");
}

}

require(
ROOTDIR "/modules/addons/resellerclubmods_tools/incs/functions.php");
require(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/clientareatools.php");
function 
resellerclubmods_tools_output($vars)
{
if (!
class_exists("idna_convert")) {
require_once(
ROOTDIR "/modules/addons/resellerclubmods_tools/incs/idnclass.php");
}

$IDN = new idna_convert();
global 
$customadminpath;
global 
$CONFIG;
$maileradmin $vars["maileradmin"];
$sendconfmail $vars["sendconfmail"];
$emailtplname $vars["templatename"];
$templatenameunlock $vars["templatenameunlock"];
$templatenameeppcode $vars["templatenameeppcode"];
$templatenameidprotect $vars["templatenameidprotect"];
$templatenamefailed $vars["templatenamefailed"];
$brokentransfers $vars["brokentransfers"];
$promo_update_active $vars["promo_end_check"];
$raa_report_active $vars["raa_domain_check"];
$transferfree_tlds $vars["transferfree_tlds"];
if (empty(
$transferfree_tlds)) {
$transferfree_tlds "com.au,net.au,co.uk,me.uk,org.uk,com.ru,net.ru,org.ru,ru";
}

$transferfree_tlds_array explode(","$transferfree_tlds);
array_walk($transferfree_tlds_array"rcm_array_trim");
if (isset(
$_POST["force"]) and& $_POST["force"] == "true") {
$table "mod_resellerclubmodstools";
$update = array(
"localkey" => "",
"lastcheck" => ""
);
update_query($table$update);
header("location: addonmodules.php?module=resellerclubmods_tools");
}

$table "tblconfiguration";
$fields "setting,value";
$result select_query($table$fields"");
while (
$data mysql_fetch_array($result)) {
$tblconf[$data[0]] = $data[1];
}
$style_label "class=\"label terminated\"";
$style_labelwarn "class=\"label pending\"";
$style_labelinfo "class=\"label expired\"";
$style_labelok "class=\"label active\"";
$style_promolabel "class=\"label active\" style=\"cursor:pointer;\"";
$nosupportedmovetlds = array(
".cn",
".com.cn",
".net.cn",
"org.cn",
".org.nz",
".net.nz",
".co.nz"
);
$LANG $vars["_lang"];
if (isset(
$_POST["changeaccount"]) and& $_POST["changeaccount"] == "true") {
$table "mod_resellerclubmodstools";
if (
$_POST["account_number"] == 1) {
$rcauth_userid $vars["first_rcauth_userid"];
$rcauth_password $vars["first_rcauth_apikey"];
$logicbox_registrar $vars["first_domainregistrar"];
$defaultcurrency $vars["first_defaultcurrency"];
$currencyswitch $vars["first_currencyswitch"];
$multiplicator $vars["first_multiplicator"];
$account_name $vars["first_acc_name"];
$account_number 1;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table$update);
echo 
"<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" $LANG["changeaccountsuccess"] . " <strong>" $account_name "</strong></div>";
} else {
if (
$_POST["account_number"] == 2) {
$rcauth_userid $vars["second_rcauth_userid"];
$rcauth_password $vars["second_rcauth_apikey"];
$logicbox_registrar $vars["second_domainregistrar"];
$defaultcurrency $vars["second_defaultcurrency"];
$currencyswitch $vars["second_currencyswitch"];
$multiplicator $vars["second_multiplicator"];
$account_name $vars["second_acc_name"];
$account_number 2;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table$update);
echo 
"<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" $LANG["changeaccountsuccess"] . " <strong>" $account_name "</strong></div>";
} else {
if (
$_POST["account_number"] == 3) {
$rcauth_userid $vars["third_rcauth_userid"];
$rcauth_password $vars["third_rcauth_apikey"];
$logicbox_registrar $vars["third_domainregistrar"];
$defaultcurrency $vars["third_defaultcurrency"];
$currencyswitch $vars["third_currencyswitch"];
$multiplicator $vars["third_multiplicator"];
$account_name $vars["third_acc_name"];
$account_number 3;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table$update);
echo 
"<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" $LANG["changeaccountsuccess"] . " <strong>" $account_name "</strong></div>";
} else {
if (
$_POST["account_number"] == 4) {
$rcauth_userid $vars["fourth_rcauth_userid"];
$rcauth_password $vars["fourth_rcauth_apikey"];
$logicbox_registrar $vars["fourth_domainregistrar"];
$defaultcurrency $vars["fourth_defaultcurrency"];
$currencyswitch $vars["fourth_currencyswitch"];
$multiplicator $vars["fourth_multiplicator"];
$account_name $vars["fourth_acc_name"];
$account_number 4;
$update = array(
"account_name" => $account_name,
"account_number" => $account_number,
"rcauth_userid" => $rcauth_userid,
"rcauth_password" => $rcauth_password,
"logicbox_registrar" => $logicbox_registrar,
"defaultcurrency" => $defaultcurrency,
"currencyswitch" => $currencyswitch,
"multiplicator" => $multiplicator
);
update_query($table$update);
echo 
"<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" $LANG["changeaccountsuccess"] . " <strong>" $account_name "</strong></div>";
} else {
echo 
"<div style=\"padding-top:10px;padding-bottom:10px;\" class=\"errorbox\">" $LANG["changeaccountinfo"] . "</div>";
}

}

}

}

}

$table "mod_resellerclubmodstools";
$fields "rcauth_userid,rcauth_password,rchttp_api,logicbox_registrar,defaultcurrency,curr​​encyswitch,multiplicator,account_name,localkey,lastcheck,account_number";
$result select_query($table$fields"");
$data mysql_fetch_array($result);
$rcauth_userid $data["rcauth_userid"];
$rcauth_password $data["rcauth_password"];
$rchttp_api $data["rchttp_api"];
$logicbox_registrar $data["logicbox_registrar"];
$defaultcurrency $data["defaultcurrency"];
$currencyswitch $data["currencyswitch"];
$multiplicator $data["multiplicator"];
$account_name $data["account_name"];
$lockey $data["localkey"];
$syncdate $data["lastcheck"];
$account_number $data["account_number"];
if (
$logicbox_registrar == "resellerclub") {
$registrar_label "ResellerClub";
}

if (
$logicbox_registrar == "netearthone") {
$registrar_label "NetEarthOne";
}

if (
$logicbox_registrar == "stargate") {
$registrar_label "Resell.biz (stargate/uk2)";
}

if (
$logicbox_registrar == "resellercamp") {
$registrar_label "ResellerCamp";
}

if (
$account_number == 1) {
$is_transfercheck $vars["first_transer_check"];
$is_hooksignup $vars["first_hook_signup"];
$is_pwdsignup $vars["first_pwd_signup"];
$is_hookmodify $vars["first_hook_modify"];
$is_pwdmodify $vars["first_pwd_modify"];
$is_hookdelete $vars["first_hook_delete"];
$is_threshold $vars["first_threshold"];
$is_domainsync $vars["first_domainsync_check"];
$is_domainsynctlds $vars["first_domainsync_tlds"];
$is_onlybaseslab $vars["first_only_baseslab"];
$is_defaultns $vars["first_ns_override"];
$is_domaintelescope $vars["first_domainsync_telescope"];
} else {
if (
$account_number == 2) {
$is_transfercheck $vars["second_transer_check"];
$is_hooksignup $vars["second_hook_signup"];
$is_pwdsignup $vars["second_pwd_signup"];
$is_hookmodify $vars["second_hook_modify"];
$is_pwdmodify $vars["second_pwd_modify"];
$is_hookdelete $vars["second_hook_delete"];
$is_threshold $vars["second_threshold"];
$is_domainsync $vars["second_domainsync_check"];
$is_domainsynctlds $vars["second_domainsync_tlds"];
$is_onlybaseslab $vars["second_only_baseslab"];
$is_defaultns $vars["second_ns_override"];
$is_domaintelescope $vars["second_domainsync_telescope"];
} else {
if (
$account_number == 3) {
$is_transfercheck $vars["third_transer_check"];
$is_hooksignup $vars["third_hook_signup"];
$is_pwdsignup $vars["third_pwd_signup"];
$is_hookmodify $vars["third_hook_modify"];
$is_pwdmodify $vars["third_pwd_modify"];
$is_hookdelete $vars["third_hook_delete"];
$is_threshold $vars["third_threshold"];
$is_domainsync $vars["third_domainsync_check"];
$is_domainsynctlds $vars["third_domainsync_tlds"];
$is_onlybaseslab $vars["third_only_baseslab"];
$is_defaultns $vars["third_ns_override"];
$is_domaintelescope $vars["third_domainsync_telescope"];
} else {
if (
$account_number == 4) {
$is_transfercheck $vars["fourth_transer_check"];
$is_hooksignup $vars["fourth_hook_signup"];
$is_pwdsignup $vars["fourth_pwd_signup"];
$is_hookmodify $vars["fourth_hook_modify"];
$is_pwdmodify $vars["fourth_pwd_modify"];
$is_hookdelete $vars["fourth_hook_delete"];
$is_threshold $vars["fourth_threshold"];
$is_domainsync $vars["fourth_domainsync_check"];
$is_domainsynctlds $vars["fourth_domainsync_tlds"];
$is_onlybaseslab $vars["fourth_only_baseslab"];
$is_defaultns $vars["fourth_ns_override"];
$is_domaintelescope $vars["fourth_domainsync_telescope"];
}

}

}

}

$is_promocheck $vars["promo_end_check"];
$is_raacheck $vars["raa_domain_check"];
$is_domainlookup $vars["use_account_whois"];
$is_recurringdomupd $vars["update_domain_recurring"];
$modulelink $vars["modulelink"];
$version $vars["version"];
$currencysymbol $vars["currencysymbol"];
$google_currency $vars["google_currency"];
if (
$vars["totalfundscolor"]) {
$totalfundscolor $vars["totalfundscolor"];
} else {
$totalfundscolor "#000000";
}

if (
$vars["blockedfundscolor"]) {
$blockedfundscolor $vars["blockedfundscolor"];
} else {
$blockedfundscolor "#CC0000";
}

if (
$vars["availfundscolor"]) {
$availfundscolor $vars["availfundscolor"];
} else {
$availfundscolor "#779500";
}

if (
$_GET["user"] == "rcuser-vs-whmcsusers") {
$qtyrecords 20;
$qtypageno 1;
$method "GET";
$apifunction "/api/customers/search.json";
$data = array(
"no-of-records" => $qtyrecords,
"page-no" => $qtypageno
);
$recsindb_arrXml call_api($rcauth_userid$rcauth_password$rchttp_api$apifunction$data$method);
$GLOBALS["recsindb_length"] = $recsindb_arrXml["recsindb"];
}

if (!
class_exists("rcm_pagination")) {

class 
rcm_pagination
{
public 
$page 1;
public 
$perPage 20;
public 
$showFirstAndLast false;

public function 
generate($array$perPage 20)
{
if (!empty(
$perPage)) {
$this->perPage $perPage;
}

if (!empty(
$_GET["page"])) {
$this->page $_GET["page"];
} else {
$this->page 1;
}

if (
$_GET["user"] == "rcuser-vs-whmcsusers") {
$this->length $GLOBALS["recsindb_length"];
$this->pages ceil($this->length $this->perPage);
$this->start 0;
} else {
$this->length count($array);
$this->pages ceil($this->length $this->perPage);
$this->start ceil(($this->page 1) * $this->perPage);
}

return 
array_slice($array$this->start$this->perPage);
}

public function 
links()
{
global 
$_ADDONLANG;
$plinks = array();
$links = array();
$slinks = array();
if (
count($_GET)) {
$queryURL "";
foreach (
$_GET as $key => $value) {
if (
$key != "page") {
$queryURL .= "and" $key "=" $value;
}

}
}

if (!isset(
$queryURL)) {
$queryURL "";
}

if (
$this->pages) {
if (
$this->page != 1) {
if (
$this->showFirstAndLast) {
$plinks[] = "<a href=\"" $_SERVER["PHP_SELF"] . "?page=1" $queryURL "\">&laquo;&laquo; " $_ADDONLANG["pagefirst"] . " </a>";
}

$plinks[] = "<a href=\"" $_SERVER["PHP_SELF"] . "?page=" . ($this->page 1) . $queryURL "\">&laquo; " $_ADDONLANG["pageprev"] . " </a>";
}

for (
$j 1$j $this->pages 1$j++) {
if (
$this->page == $j) {
$links[] = "<a style=\"font-weight:bold;\">" $j "</a>";
} else {
$links[] = "<a href=\"" $_SERVER["PHP_SELF"] . "?page=" $j $queryURL "\">" $j "</a>";
}

}
if (
$this->page $this->pages) {
$slinks[] = "<a href=\"" $_SERVER["PHP_SELF"] . "?page=" . ($this->page 1) . $queryURL "\"> " $_ADDONLANG["pagenext"] . " &raquo; </a>";
if (
$this->showFirstAndLast) {
$slinks[] = "<a href=\"" $_SERVER["PHP_SELF"] . "?page=" $this->pages $queryURL "\"> " $_ADDONLANG["pagelast"] . " &raquo;&raquo; </a>";
}

}

return 
implode(" "$plinks) . implode(" "$links) . implode(" "$slinks);
}

}

}

}

$method "GET";
$apifunction "/api/resellers/details.json";
$resellerdetails_arrXml call_api($rcauth_userid$rcauth_password$rchttp_api$apifunction$data$method);
$reseller_buycurrency $resellerdetails_arrXml["parentsellingcurrencysymbol"];
$lb_sellingcurrency $resellerdetails_arrXml["sellingcurrencysymbol"];
$desglose_tblcurrencies select_query("tblcurrencies""id,code", array(
"default" => 1
));
$fila_tblcurrencies mysql_fetch_array($desglose_tblcurrencies);
$currency $fila_tblcurrencies["id"];
$currencycode $fila_tblcurrencies["code"];
$reseller_sellingcurrency $currencycode;
if (
$currencyswitch == "on") {
$desglose_tblcurrencies select_query("tblcurrencies""rate", array(
"code" => $defaultcurrency
));
$fila_tblcurrencies mysql_fetch_array($desglose_tblcurrencies);
$currencyrate $fila_tblcurrencies["rate"];
}

echo 
"<table style=\"margin-bottom:10px;\"><tr><td><img style=\"float:left;border:0\" src=\"../modules/addons/resellerclubmods_tools/img/rcmini.png\" /></td>\r\n\t\t\t\t <td style=\"padding:5px 0px 0px 5px;\"><strong>" $LANG["freetoolslike"] . "</strong> " $LANG["followus"] . ": <a href=\"https://facebook.com/resmods\" target=\"_blank\">Facebook</a> <a href=\"https://twitter.com/resmods\" target=\"_blank\">Twitter</a><br />\r\n\t\t\t\t " $LANG["freetoolslikevote1"] . " <a href=\"http://www.whmcs.com/appstore/329/FREE-ResellerClub-Tools-v2.html\" target=\"_blank\">WHMCS Appstore</a>. " $LANG["freetoolslikevote2"] . "<br />\r\n\t\t\t\t </td></tr></table>";
$selectorarray = array();
if (!empty(
$vars["first_acc_name"])) {
$selectorarray[1] = $vars["first_acc_name"] . " - " $vars["first_rcauth_userid"];
}

if (!empty(
$vars["second_acc_name"])) {
$selectorarray[2] = $vars["second_acc_name"] . " - " $vars["second_rcauth_userid"];
}

if (!empty(
$vars["third_acc_name"])) {
$selectorarray[3] = $vars["third_acc_name"] . " - " $vars["third_rcauth_userid"];
}

if (!empty(
$vars["fourth_acc_name"])) {
$selectorarray[4] = $vars["fourth_acc_name"] . " - " $vars["fourth_rcauth_userid"];
}

foreach (
$selectorarray as $key => $value) {
$selectoptions .= "<option value=\"" $key "\">" $value "</option>";
}
$tools_change_acc_dropdown "\r\n\t\t\t<form action=\"" $_SERVER["REQUEST_URI"] . "\" method=\"post\">\r\n\t\t\t<strong>" $LANG["changeto"] . "</strong>\r\n\t\t\t<select name=\"account_number\" onchange=\"submit();\">\r\n\t\t\t<option value=\"\">" $LANG["changercacc"] . "</option>\r\n\t\t\t" $selectoptions "\r\n\t\t\t</select>\r\n\t\t\t<input type=\"hidden\" name=\"changeaccount\" value=\"true\" />\r\n\t\t\t</form>";
$configuredto "\r\n\t\t\t<div style=\"float:left;padding:4px;width:auto;\"><strong>" $LANG["configuredto"] . "</strong> " $account_name " - <strong>" $LANG["lbtitle"] . "</strong> <span " $style_label ">" $logicbox_registrar "</span> - <strong>ID:</strong> " $rcauth_userid "</div>\r\n\t\t\t<div style=\"float:left;padding-left:10px\">" $tools_change_acc_dropdown "</div>\r\n\t\t\t<div></div><br />\r\n\t\t\t<div style=\"border-bottom:1px solid #cccccc;margin-top:5px;padding-top:5px;\"></div><br />";
if (
$_GET["trans"] == "showfunds") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/fundsbalance.php");
} else {
if (
$_GET["domain"] == "domain-pricing-import") {
require(
ROOTDIR "/includes/currencyfunctions.php");
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/importdompricing.php");
} else {
if (
$_GET["service"] == "hostingimport") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/importproducts.php");
} else {
if (
$_GET["domain"] == "domainimport") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/importdomains.php");
} else {
if (
$_GET["domain"] == "showpromos") {
require(
ROOTDIR "/includes/currencyfunctions.php");
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/managepromos.php");
} else {
if (
$_GET["user"] == "whmcsuser-vs-rcusers") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/exportusers.php");
} else {
if (
$_GET["user"] == "rcuser-vs-whmcsusers") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/importusers.php");
} else {
if (
$_GET["domain"] == "transfercheck") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/transfercheck.php");
} else {
if (
$_GET["domain"] == "moveservices") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/movedomain.php");
} else {
if (
$_GET["domain"] == "bulkmove") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/bulkdomainmove.php");
} else {
if (
$_GET["domain"] == "tldmanage") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/tldmanage.php");
} else {
if (
$_GET["automation"] == "cronjobs") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/automationtools.php");
} else {
if (
$_GET["domain"] == "raamanagement") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/raamanagement.php");
} else {
if (
$_GET["domain"] == "rcmwhois") {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/guiwhois.php");
} else {
include(
ROOTDIR "/modules/addons/resellerclubmods_tools/tools/home.php");
}

}

}

}

}

}

}

}

}

}

}

}

}

}

}

function 
resellerclubmods_tools_sidebar($vars)
{
$modulelink $vars["modulelink"];
$version $vars["version"];
$LANG $vars["_lang"];
$rcfree_license $vars["rcfree_license"];
if (!
function_exists("check_versions")) {
function 
check_versions($verUrl)
{
$ch curl_init();
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_HEADERtrue);
curl_setopt($chCURLOPT_FOLLOWLOCATIONfalse);
curl_setopt($chCURLOPT_URL$verUrl);
$result curl_exec($ch);
curl_close($ch);
$headers explode("\n"$result);
$redir $verUrl;
$j count($headers);
for (
$i 0$i $j$i++) {
if (
strpos($headers[$i], "Location:") !== false) {
$redir trim(str_replace("Location:"""$headers[$i]));
break;
}

}
return 
$redir;
}

}

$verUrl "http://www.rcmodules.com/versions/rcfreetools_v3.txt";
$redir check_versions($verUrl);
$stream fopen($redir"r");
$vcheck stream_get_contents($stream);
fclose($stream);
$vk str_replace("."""$vcheck);
$vn str_replace("."""$version);
if ((int) 
$vk <= (int) $vn) {
$updateavail $LANG["latestok"];
} else {
$updateavail "<strong style=\"color:#CC0000;\">" $LANG["updateavail"] . "</strong>";
}

$sidebar "\r\n\t\t\t<span class=\"header\"><img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" /> RC and LB Tools v2</span>\r\n\t\t\t<ul class=\"menu\">\r\n\t\t\t<li><a style=\"color:#cc0000;\" href=\"configaddonmods.php#resellerclubmods_tools\">" $LANG["configaddontitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "\">" $LANG["toolshome"] . "</a></li>\r\n\t\t\t<li><hr style=\\\"border: 1px solid #1A4D80; height: 1px;\\\" /></li>\r\n\t\t\t<li><a href=\"" $modulelink "&automation=cronjobs\">" $LANG["automationtools"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&user=whmcsuser-vs-rcusers\">" $LANG["whmcsvsrcusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&user=rcuser-vs-whmcsusers\">" $LANG["rcvswhmcscusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=domainimport\">" $LANG["domainimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=domain-pricing-import\">" $LANG["domainpriceimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=rsd\">" $LANG["rsdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=rmd\">" $LANG["rmdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=vps\">" $LANG["vpssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=dhs\">" $LANG["dhssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=rrd\">" $LANG["rrdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=ree\">" $LANG["reesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=ssl\">" $LANG["sslsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=rsl\">" $LANG["sitelocksidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&service=hostingimport&plantype=rcg\">" $LANG["codeguardsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=tldmanage\">" $LANG["tldmanagesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=showpromos\">" $LANG["domainpromos"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=raamanagement\">" $LANG["raamanagementtitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=moveservices\">" $LANG["movetitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=bulkmove\">" $LANG["bulkmovesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&trans=showfunds\">" $LANG["resellerclubbalance"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=transfercheck\">" $LANG["transferchecktitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" $modulelink "&domain=rcmwhois\">" $LANG["whoisaddonlinktitle"] . "</a></li>\r\n\t\t\t</ul>\r\n\t\t\t<span class=\"plain_header\">" $LANG["toolsinfotitle"] . "</span>\r\n\t\t\t<div class=\"smallfont\">" $LANG["toolsversiontitle"] . $version "<br />" $updateavail "</div><br />\r\n\t\t\t";
return 
$sidebar;
}

break;
case 
"Invalid":
echo 
"<strong style=\"color:#cc0000\">RC and LB Tools v2 License key invalid</strong>";
break;
case 
"Expired":
echo 
"<strong style=\"color:#cc0000\">RC and LB Tools v2 License key expired</strong>";
break;
case 
"Suspended":
echo 
"<strong style=\"color:#cc0000\">RC and LB Tools v2 License key suspended</strong>";
break;
default:
echo 
"<strong style=\"color:#cc0000;\">Invalid Response</strong>";
break;
}
}

function 
resellerclubmods_tools_config()
{
global 
$license_result;
if (isset(
$_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "2") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "second_acc_name",
"value" => "Second Account"
));
}

if (isset(
$_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "3") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "third_acc_name",
"value" => "Third Account"
));
}

if (isset(
$_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "4") {
insert_query("tbladdonmodules", array(
"module" => "resellerclubmods_tools",
"setting" => "fourth_acc_name",
"value" => "Fourth Account"
));
}

if (isset(
$_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "2") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'second_%'");
}

if (isset(
$_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "3") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'third_%'");
}

if (isset(
$_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "4") {
mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'fourth_%'");
}

$result select_query("tbladdonmodules""setting,value", array(
"module" => "resellerclubmods_tools"
));
while (
$data mysql_fetch_array($result)) {
$vars[$data[0]] = $data[1];
}
$conf_license $vars["rcfree_license"];
$conf_rchttp_api $vars["rchttp_api"];
$first_rcauth_userid $vars["first_rcauth_userid"];
$first_rcauth_password $vars["first_rcauth_apikey"];
$first_logicbox_registrar $vars["first_domainregistrar"];
$first_defaultcurrency $vars["first_defaultcurrency"];
$first_currencyswitch $vars["first_currencyswitch"];
$first_multiplicator $vars["first_multiplicator"];
$first_account_name $vars["first_acc_name"];
$first_account_number 1;
$default_promostyle $vars["default_promostyle"];
$default_sellingprice $vars["default_sellingprice"];
$showdefault_price $vars["showdefault_price"];
if (
$showdefault_price == "Yes") {
$showdefaultprice "7.50";
}

if (!empty(
$conf_license) and& !empty($conf_rchttp_api) and& !empty($first_rcauth_userid) and& !empty($first_rcauth_password) and& !empty($first_account_name)) {
$table "mod_resellerclubmodstools";
$fields "account_number";
$result select_query($table$fields"");
$data mysql_fetch_array($result);
$tools_account_number $data["account_number"];
if (empty(
$tools_account_number)) {
$table "mod_resellerclubmodstools";
$values = array(
"account_name" => $first_account_name,
"account_number" => $first_account_number,
"rcauth_userid" => $first_rcauth_userid,
"rcauth_password" => $first_rcauth_password,
"rchttp_api" => $conf_rchttp_api,
"logicbox_registrar" => $first_logicbox_registrar,
"defaultcurrency" => $first_defaultcurrency,
"currencyswitch" => $first_currencyswitch,
"multiplicator" => $first_multiplicator
);
insert_query($table$values);
}

}

$table "tblcurrencies";
$fields "code";
$result select_query($table$fields"");
while (
$data mysql_fetch_array($result)) {
$tblcurrencies[] = $data["code"];
}
$currency_comma_separated implode(","$tblcurrencies);
$table "tblemailtemplates";
$fields "language,name";
$where = array(
"type" => "domain"
);
$result select_query($table$fields$where);
while (
$data mysql_fetch_array($result)) {
if (empty(
$data["language"])) {
$tblmailtpls[] = $data["name"];
}

}
$tblmailtpls_comma_separated implode(","$tblmailtpls);
$tbldomtemplates "None," $tblmailtpls_comma_separated;
$table "tbladmins";
$fields "username";
$result select_query($table$fields"");
while (
$data mysql_fetch_array($result)) {
$tbladmins[] = $data["username"];
}
$tbladmins_comma_separated implode(","$tbladmins);
$table "tblregistrars";
$fields "registrar";
$result select_query($table$fields"");
while (
$data mysql_fetch_array($result)) {
$tblregistrars[] = $data["registrar"];
}
$tblregistrars array_unique($tblregistrars);
$tblregistrars array_diff($tblregistrars, array(
"resellerclub",
"resellerclubrcm",
"netearthone",
"netearthonercm",
"stargate",
"stargatercm",
"resellercamp",
"resellercamprcm"
));
$lbregistrars implode(","$tblregistrars);
if (!empty(
$lbregistrars)) {
$lbdropdown "Select Registrar,resellerclub,netearthone,stargate,resellercamp," $lbregistrars;
} else {
$lbdropdown "Select Registrar,resellerclub,netearthone,stargate,resellercamp";
}

$doconfirm_second "<script language=\"javascript\" type=\"text/javascript\">function secondDelete(){return confirm(\"You are about to delete the Account \\\"" $vars["second_acc_name"] . "\\\". Are you sure?\");}</script>";
$doconfirm_third "<script language=\"javascript\" type=\"text/javascript\">function thirdDelete(){return confirm(\"You are about to delete the Account \\\"" $vars["third_acc_name"] . "\\\". Are you sure?\");}</script>";
$doconfirm_fourth "<script language=\"javascript\" type=\"text/javascript\">function fourthDelete(){return confirm(\"You are about to delete the Account \\\"" $vars["fourth_acc_name"] . "\\\". Are you sure?\");}</script>";
if (!empty(
$vars["first_acc_name"])) {
if (empty(
$vars["second_acc_name"])) {
$doActivate_second "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Second Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=2#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_second $doconfirm_second "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act02\"></a>To disable the &quot;2# Live or Demo Account&quot; (<strong>" $vars["second_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=2#resellerclubmods_tools\" onclick=\"return secondDelete();\">here</a></div>";
$alink_second "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act02\">2# Account</a>";
}

if (empty(
$vars["third_acc_name"])) {
$doActivate_third "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Third Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=3#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_third $doconfirm_third "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act03\"></a>To disable the &quot;3# Live or Demo Account&quot; (<strong>" $vars["third_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=3#resellerclubmods_tools\" onclick=\"return thirdDelete();\">here</a></div>";
$alink_third "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act03\">3# Account</a>";
}

if (empty(
$vars["fourth_acc_name"])) {
$doActivate_fourth "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Fourth Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=4#resellerclubmods_tools\">here</a></div>";
} else {
$doActivate_fourth $doconfirm_fourth "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act04\"></a>To disable the &quot;4# Live or Demo Account&quot; (<strong>" $vars["fourth_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=4#resellerclubmods_tools\" onclick=\"return fourthDelete();\">here</a></div>";
$alink_fourth "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act04\">4# Account</a>";
}

}

$scroller "<script type=\"text/javascript\">\r\n\tjQuery(document).ready(function(){\r\n\t jQuery(\".scroll\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tvar offset = jQuery(jQuery(this).attr('href')).offset().top;\r\n\t\tjQuery('html, body').animate({scrollTop:offset}, 1000);\r\n\t });\r\n\t});\r\n\t</script>";
$base_fields = array(
"rcfree_license" => array(
"FriendlyName" => "License Key <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Description" => "Set your License Key &nbsp;&nbsp;" $license_result ""
),
"sectionlinks" => array(
"FriendlyName" => "Goto Section",
"Description" => $scroller "<div style=\"padding:3px;\"><a class=\"scroll\" href=\"#act01\">1# Account</a>" $alink_second $alink_third $alink_fourth "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dth\">Domain Transfer Handling</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#cat\">Client Area Tools</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dpp\">Domain Promo Pricelist</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#shopint\">OrderBox - Cart Integration</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#misc\">Miscellaneous</a></div>"
),
"textseparator0" => array(
"FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Funds Widget Setup</span>",
"Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />"
),
"fundsbalance" => array(
"FriendlyName" => "Funds Balance Widget",
"Type" => "yesno",
"Description" => "Tick to show the widget for your Resellerclub and LogicBoxes funds balance on the Admin Homepage"
),
"currencysymbol" => array(
"FriendlyName" => "Use Currency Symbol",
"Type" => "yesno",
"Description" => "Tick to show the currency symbol (&euro;) instead the currency code (EUR)"
),
"totalfundscolor" => array(
"FriendlyName" => "Font Color Total Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for Total Funds, default = <font color='#000000'>#000000</font>"
),
"blockedfundscolor" => array(
"FriendlyName" => "Font Color Blocked Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for blocked funds, default = <font color='#CC0000'>#CC0000</font>"
),
"availfundscolor" => array(
"FriendlyName" => "Font Color Available Funds",
"Type" => "text",
"Size" => "8",
"Description" => "Set the font color for available funds, default = <font color='#779500'>#779500</font>"
),
"fontsize" => array(
"FriendlyName" => "Font Size",
"Type" => "text",
"Size" => "3",
"Description" => "Set the font size for the ouput, default = 12"
),
"fontfamily" => array(
"FriendlyName" => "Font Family",
"Type" => "text",
"Size" => "100",
"Description" => "<br />Set the font family for the ouput, default = Lucida Grande,Lucida Sans Unicode,Verdana,Arial,sans-serif"
),
"textseparator1" => array(
"FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Reseller Accounts Setup</span>",
"Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />"
),
"rchttp_api" => array(
"FriendlyName" => "Reseller API <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Default" => "https://httpapi.com",
"Description" => "API Url: https://httpapi.com</strong>"
)
);
$first_account_fields = array(
"first_acc" => array(
"FriendlyName" => "<strong style=\"font-size:14px;\">1# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>",
"Description" => "<a id=\"act01\"></a>"
),
"first_acc_name" => array(
"FriendlyName" => "Display Name <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "30",
"Description" => "Set a Friendly Display Name"
),
"first_domainregistrar" => array(
"FriendlyName" => "Select your Registrar <span style=\"color:#cc0000\">*</span>",
"Type" => "dropdown",
"Options" => $lbdropdown,
"Description" => "Select only a valid LogicBoxes Registrar!"
),
"first_rcauth_userid" => array(
"FriendlyName" => "Reseller ID <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "8",
"Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)"
),
"first_rcauth_apikey" => array(
"FriendlyName" => "API Key <span style=\"color:#cc0000\">*</span>",
"Type" => "text",
"Size" => "50",
"Description" => "Set your unique Reseller API Key"
),
"first_show_fundsbalance" => array(
"FriendlyName" => "Disable Fundsbalance on Widget",
"Type" => "yesno",
"Description" => "Tick to Disable Fundsbalance Output on the widget"
),
"first_ns_override" => array(
"FriendlyName" => "Default Nameservers",
"Type" => "text",
"Size" => "120",
"Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com"
),
"first_transer_check" => array(
"FriendlyName" => "Disable Transfer Check Cron",
"Type" => "yesno",
"Description" => "Tick to Disable Transfer Check Cron on this account"
),
"first_hook_signup" => array(
"FriendlyName" => "Disable Auto Customer Signup",
"Type" => "yesno",
"Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS"
),
"first_pwd_signup" => array(
"FriendlyName" => "Use WHMCS Password with Signup",
"Type" => "yesno",
"Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;"
),
"first_hook_modify" => array(
"FriendlyName" => "Disable Auto Customer Modify",
"Type" => "yesno",
"Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS"
),
"first_pwd_modify" => array(
"FriendlyName" => "Apply WHMCS Password if changed",
"Type" => "yesno",
"Description" => "Tick to sync the password in the reseller customer account when the password in WHMCS got changed"
),
"first_hook_delete" => array(
"FriendlyName" => "Disable Auto Customer Delete",
"Type" => "yesno",
"Description" => "Tick to Disable Customer deletion in your reseller account when a customer has been deleted in WHMCS"
),
"first_threshold" => array(
"FriendlyName" => "Disable Funds Threshold Check",
"Type" => "yesno",
"Description" => "Tick to Disable the hook for funds threshold mail alert"
),
"first_threshold_value" => array(
"FriendlyName" => "Override Reseller Funds Threshold",
"Type" => "text",
"Size" => "6",
"Description" => "You can override the Threshold value from your reseller account settings. Leave blank to use your reseller settings"
),
"subseparator101" => array(
"FriendlyName" => "<span style=\"color:#cc0000;\">Domain Price Sync</span>"
),
"first_domainsync_check" => array(
"FriendlyName" => "Disable Domain Price Sync",
"Type" => "yesno",
"Description" => "Tick to Disable Disable Domain Price Sync Cron on this account"
),
"first_domainsync_telescope" => array(
"FriendlyName" => "Disable Telescope Pricing",
"Type" => "yesno",
"Description" => "Tick to disable Telescope Pricing for the Sync Cron on this account"
),
"first_only_baseslab" => array(
"FriendlyName" => "Sync Clientgroup Price Slabs",
"Type" => "yesno",
"Description" => "By default, only the Default Base Slab Pricing will be synced. Tick to activate sync for all Domain Price Slabs"
),
"first_domainsync_tlds" => array(
"FriendlyName" => "Sync Only this TLD's",
"Type" => "text",
"Size" => "40",
"Description" => "Leave empty to sync all active TLDs Prices<br />Example: .us,.com,.co.uk,.net"
),
"subseparator102" => array(
"FriendlyName" => "<span style=\"color:#cc0000;\">Currency Setup</span>"
),
"first_defaultcurrency" => array(
"FriendlyName" => "Reseller Selling Currencies",
"Type" => "dropdown",
"Options" => $currency_comma_separated,
"Description" => "&nbsp;Select your <strong>Reseller Selling Currency</strong> if it is <strong>not equal to the WHMCS Default Currency</strong>. For eg. you will need to do this if your Selling Currency in your Reseller Account is USD but in WHMCS Default is set to EUR!"
),
"first_multiplicator" => array(
"FriendlyName" => "Default multiplicator",
"Type" => "dropdown",
"Options" => "1,10,100,1000",
"Description" => "Change only if your Reseller Selling Currency is calculated in 10's, 100's or 1000's"
),
"first_currencyswitch" => array(
"FriendlyName" => "Activate Currency Conversion",
"Type" => "yesno",
"Description" => "<span style=\"color:#cc0000;font-weight:bold;\">Important!</span> Tick this checkbox only if the Reseller Selling Currency is not equal to the WHMCS Default Currency."
)
);
if (
$vars["first_acc_name"]) {
$first_activate = array(
"first_activate_second" => array(
"FriendlyName" => "",
"Description" => $doActivate_second
)
);
} else {
$first_activate = array();
}

if (
$vars["second_acc_name"]) {
$second_account_fields = array(
"second_acc" => array(
"FriendlyName" => "<strong style=\"font-size:14px;\">2# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>"
),
"second_acc_name" => array(
"FriendlyName" => "Display Name",
"Type" => "text",
"Size" => "30",
"Description" => "Set a Friendly Display Name"
),
"second_domainregistrar" => array(
"FriendlyName" => "Select your Registrar",
"Type" => "dropdown",
"Options" => $lbdropdown,
"Description" => "Select only a valid LogicBoxes Registrar!"
),
"second_rcauth_userid" => array(
"FriendlyName" => "Reseller ID",
"Type" => "text",
"Size" => "8",
"Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)"
),
"second_rcauth_apikey" => array( 
02-27-2015, 01:08 AM (This post was last modified: 02-27-2015 01:09 AM by JustSomeDude.)
Post: #4
RE:
[code]<?phperror_reporting(1 | 4);if (!defined("WHMCS")) { echo "File cannot be accessed directly<br />"; $whmcs_root_dir = realpath(dirname(__FILE__) . "/../../../"); include_once($whmcs_root_dir . "/dbconnect.php");}
if (!class_exists("idna_convert")) { require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php");}
$IDN = new idna_convert();$transfer_complete_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>The Domain transfer process for {\$domain_name} has been successfully completed. The details of the domain transfer are below:</p>\r\n<p>Domain: {\$domain_name}<br />\r\nRegistration Length: {\$domain_reg_period}<br />\r\nTransfer Price: {\$domain_first_payment_amount}<br />\r\nNext Due Date: {\$domain_next_due_date}</p>\r\n<p>You may login to your client area at {\$whmcs_url} to manage your domain.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_unlock_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently locked with your losing domain register. Before we can continue with your transfer this domain would need to be unlocked.</p>\r\n<p>If you need help getting the lock removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_epp_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} secret code, EPP code and also known as authorization code was not provided with the Domain Transfer approval and we sent an approval mail requesting you to provide the EPP code.</p>\r\n<p>As soon as you have provided the EPP code, the domain transfer request will be send to your losing domain register.</p>\r\n<p>If you are having trouble with this step or if you have not received the mail to provide the EPP code please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_idprotect_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently WHOIS ID protected. Before we can continue with your transfer you need to disable the ID WHOIS Protection.</p>\r\n<p>If you need help getting the ID Protection removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$table = "tbladdonmodules";$fields = "value";$where = array( "setting" => "rcfree_license");$result = select_query($table, $fields, $where);$data = mysql_fetch_array($result);$rcfree_license = $data["value"];global $softversion;global $modulename;global $mdf;global $fse;global $is_php;$subver = ioncube_loader_iversion();$is_php = substr(phpversion(), 0, 3);$mdf = sha1(file_get_contents(__FILE__));$fse = filesize(__FILE__);$releasedate = "2014-12-05";$softversion = "2.8.3";$modulename = "RCLBT";if (!function_exists("rcfree_check_license")) { function rcfree_check_license($rcfree_license, $rcfree_localkey = "") { $results = array( "status" => "Active", "description" => "Enjoy the null!", "validdomain" => $_SERVER['HTTP_HOST'], "validip" => $_SERVER['SERVER_ADDR'], "validdirectory" => $_SERVER['DOCUMENT_ROOT'] ); return $results; } }
if (!empty($rcfree_license)) { $table = "mod_resellerclubmodstools"; $fields = "localkey"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $rcfree_localkey = $data["localkey"]; if (isset($_REQUEST["dolicensecheck"])) { $rcfree_localkey = ""; update_query("mod_resellerclubmodstools", array( "localkey" => "" )); } if (substr($_SERVER["argv"][0], -8) != "cron.php") { $results = rcfree_check_license($rcfree_license, $rcfree_localkey); } else { $results["status"] = "Active"; } switch ($results["status"]) { case "Active": if ($results["localkey"]) { $localkeydata = $results["localkey"]; $datetime = date("Y-m-d H:i:s"); $table = "mod_resellerclubmodstools"; $update = array( "localkey" => $localkeydata, "lastcheck" => $datetime ); update_query($table, $update); } if (isset($results["addons"])) { $addons_array = explode(";", htmlspecialchars_decode($results["addons"])); $addondue = str_replace("nextduedate=", "", $addons_array[1]); if ($addondue < $releasedate) { exit("<p style=\"color:red;font-weight:bold;\">Your \"" . $modulename . " Support and Updates\" Addon expired prior to this release and must be renewed to run this version</p>"); } } require(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/functions.php"); require(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/clientareatools.php"); function resellerclubmods_tools_output($vars) { if (!class_exists("idna_convert")) { require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php"); } $IDN = new idna_convert(); global $customadminpath; global $CONFIG; $maileradmin = $vars["maileradmin"]; $sendconfmail = $vars["sendconfmail"]; $emailtplname = $vars["templatename"]; $templatenameunlock = $vars["templatenameunlock"]; $templatenameeppcode = $vars["templatenameeppcode"]; $templatenameidprotect = $vars["templatenameidprotect"]; $templatenamefailed = $vars["templatenamefailed"]; $brokentransfers = $vars["brokentransfers"]; $promo_update_active = $vars["promo_end_check"]; $raa_report_active = $vars["raa_domain_check"]; $transferfree_tlds = $vars["transferfree_tlds"]; if (empty($transferfree_tlds)) { $transferfree_tlds = "com.au,net.au,co.uk,me.uk,org.uk,com.ru,net.ru,org.ru,ru"; } $transferfree_tlds_array = explode(",", $transferfree_tlds); array_walk($transferfree_tlds_array, "rcm_array_trim"); if (isset($_POST["force"]) and& $_POST["force"] == "true") { $table = "mod_resellerclubmodstools"; $update = array( "localkey" => "", "lastcheck" => "" ); update_query($table, $update); header("location: addonmodules.php?module=resellerclubmods_tools"); } $table = "tblconfiguration"; $fields = "setting,value"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblconf[$data[0]] = $data[1]; } $style_label = "class=\"label terminated\""; $style_labelwarn = "class=\"label pending\""; $style_labelinfo = "class=\"label expired\""; $style_labelok = "class=\"label active\""; $style_promolabel = "class=\"label active\" style=\"cursor:pointer;\""; $nosupportedmovetlds = array( ".cn", ".com.cn", ".net.cn", "org.cn", ".org.nz", ".net.nz", ".co.nz" ); $LANG = $vars["_lang"]; if (isset($_POST["changeaccount"]) and& $_POST["changeaccount"] == "true") { $table = "mod_resellerclubmodstools"; if ($_POST["account_number"] == 1) { $rcauth_userid = $vars["first_rcauth_userid"]; $rcauth_password = $vars["first_rcauth_apikey"]; $logicbox_registrar = $vars["first_domainregistrar"]; $defaultcurrency = $vars["first_defaultcurrency"]; $currencyswitch = $vars["first_currencyswitch"]; $multiplicator = $vars["first_multiplicator"]; $account_name = $vars["first_acc_name"]; $account_number = 1; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 2) { $rcauth_userid = $vars["second_rcauth_userid"]; $rcauth_password = $vars["second_rcauth_apikey"]; $logicbox_registrar = $vars["second_domainregistrar"]; $defaultcurrency = $vars["second_defaultcurrency"]; $currencyswitch = $vars["second_currencyswitch"]; $multiplicator = $vars["second_multiplicator"]; $account_name = $vars["second_acc_name"]; $account_number = 2; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 3) { $rcauth_userid = $vars["third_rcauth_userid"]; $rcauth_password = $vars["third_rcauth_apikey"]; $logicbox_registrar = $vars["third_domainregistrar"]; $defaultcurrency = $vars["third_defaultcurrency"]; $currencyswitch = $vars["third_currencyswitch"]; $multiplicator = $vars["third_multiplicator"]; $account_name = $vars["third_acc_name"]; $account_number = 3; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 4) { $rcauth_userid = $vars["fourth_rcauth_userid"]; $rcauth_password = $vars["fourth_rcauth_apikey"]; $logicbox_registrar = $vars["fourth_domainregistrar"]; $defaultcurrency = $vars["fourth_defaultcurrency"]; $currencyswitch = $vars["fourth_currencyswitch"]; $multiplicator = $vars["fourth_multiplicator"]; $account_name = $vars["fourth_acc_name"]; $account_number = 4; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { echo "<div style=\"padding-top:10px;padding-bottom:10px;\" class=\"errorbox\">" . $LANG["changeaccountinfo"] . "</div>"; } } } } } $table = "mod_resellerclubmodstools"; $fields = "rcauth_userid,rcauth_password,rchttp_api,logicbox_registrar,defaultcurrency,curr​encyswitch,multiplicator,account_name,localkey,lastcheck,account_number"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $rcauth_userid = $data["rcauth_userid"]; $rcauth_password = $data["rcauth_password"]; $rchttp_api = $data["rchttp_api"]; $logicbox_registrar = $data["logicbox_registrar"]; $defaultcurrency = $data["defaultcurrency"]; $currencyswitch = $data["currencyswitch"]; $multiplicator = $data["multiplicator"]; $account_name = $data["account_name"]; $lockey = $data["localkey"]; $syncdate = $data["lastcheck"]; $account_number = $data["account_number"]; if ($logicbox_registrar == "resellerclub") { $registrar_label = "ResellerClub"; } if ($logicbox_registrar == "netearthone") { $registrar_label = "NetEarthOne"; } if ($logicbox_registrar == "stargate") { $registrar_label = "Resell.biz (stargate/uk2)"; } if ($logicbox_registrar == "resellercamp") { $registrar_label = "ResellerCamp"; } if ($account_number == 1) { $is_transfercheck = $vars["first_transer_check"]; $is_hooksignup = $vars["first_hook_signup"]; $is_pwdsignup = $vars["first_pwd_signup"]; $is_hookmodify = $vars["first_hook_modify"]; $is_pwdmodify = $vars["first_pwd_modify"]; $is_hookdelete = $vars["first_hook_delete"]; $is_threshold = $vars["first_threshold"]; $is_domainsync = $vars["first_domainsync_check"]; $is_domainsynctlds = $vars["first_domainsync_tlds"]; $is_onlybaseslab = $vars["first_only_baseslab"]; $is_defaultns = $vars["first_ns_override"]; $is_domaintelescope = $vars["first_domainsync_telescope"]; } else { if ($account_number == 2) { $is_transfercheck = $vars["second_transer_check"]; $is_hooksignup = $vars["second_hook_signup"]; $is_pwdsignup = $vars["second_pwd_signup"]; $is_hookmodify = $vars["second_hook_modify"]; $is_pwdmodify = $vars["second_pwd_modify"]; $is_hookdelete = $vars["second_hook_delete"]; $is_threshold = $vars["second_threshold"]; $is_domainsync = $vars["second_domainsync_check"]; $is_domainsynctlds = $vars["second_domainsync_tlds"]; $is_onlybaseslab = $vars["second_only_baseslab"]; $is_defaultns = $vars["second_ns_override"]; $is_domaintelescope = $vars["second_domainsync_telescope"]; } else { if ($account_number == 3) { $is_transfercheck = $vars["third_transer_check"]; $is_hooksignup = $vars["third_hook_signup"]; $is_pwdsignup = $vars["third_pwd_signup"]; $is_hookmodify = $vars["third_hook_modify"]; $is_pwdmodify = $vars["third_pwd_modify"]; $is_hookdelete = $vars["third_hook_delete"]; $is_threshold = $vars["third_threshold"]; $is_domainsync = $vars["third_domainsync_check"]; $is_domainsynctlds = $vars["third_domainsync_tlds"]; $is_onlybaseslab = $vars["third_only_baseslab"]; $is_defaultns = $vars["third_ns_override"]; $is_domaintelescope = $vars["third_domainsync_telescope"]; } else { if ($account_number == 4) { $is_transfercheck = $vars["fourth_transer_check"]; $is_hooksignup = $vars["fourth_hook_signup"]; $is_pwdsignup = $vars["fourth_pwd_signup"]; $is_hookmodify = $vars["fourth_hook_modify"]; $is_pwdmodify = $vars["fourth_pwd_modify"]; $is_hookdelete = $vars["fourth_hook_delete"]; $is_threshold = $vars["fourth_threshold"]; $is_domainsync = $vars["fourth_domainsync_check"]; $is_domainsynctlds = $vars["fourth_domainsync_tlds"]; $is_onlybaseslab = $vars["fourth_only_baseslab"]; $is_defaultns = $vars["fourth_ns_override"]; $is_domaintelescope = $vars["fourth_domainsync_telescope"]; } } } } $is_promocheck = $vars["promo_end_check"]; $is_raacheck = $vars["raa_domain_check"]; $is_domainlookup = $vars["use_account_whois"]; $is_recurringdomupd = $vars["update_domain_recurring"]; $modulelink = $vars["modulelink"]; $version = $vars["version"]; $currencysymbol = $vars["currencysymbol"]; $google_currency = $vars["google_currency"]; if ($vars["totalfundscolor"]) { $totalfundscolor = $vars["totalfundscolor"]; } else { $totalfundscolor = "#000000"; } if ($vars["blockedfundscolor"]) { $blockedfundscolor = $vars["blockedfundscolor"]; } else { $blockedfundscolor = "#CC0000"; } if ($vars["availfundscolor"]) { $availfundscolor = $vars["availfundscolor"]; } else { $availfundscolor = "#779500"; } if ($_GET["user"] == "rcuser-vs-whmcsusers") { $qtyrecords = 20; $qtypageno = 1; $method = "GET"; $apifunction = "/api/customers/search.json"; $data = array( "no-of-records" => $qtyrecords, "page-no" => $qtypageno ); $recsindb_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method); $GLOBALS["recsindb_length"] = $recsindb_arrXml["recsindb"]; } if (!class_exists("rcm_pagination")) { class rcm_pagination { public $page = 1; public $perPage = 20; public $showFirstAndLast = false; public function generate($array, $perPage = 20) { if (!empty($perPage)) { $this->perPage = $perPage; } if (!empty($_GET["page"])) { $this->page = $_GET["page"]; } else { $this->page = 1; } if ($_GET["user"] == "rcuser-vs-whmcsusers") { $this->length = $GLOBALS["recsindb_length"]; $this->pages = ceil($this->length / $this->perPage); $this->start = 0; } else { $this->length = count($array); $this->pages = ceil($this->length / $this->perPage); $this->start = ceil(($this->page - 1) * $this->perPage); } return array_slice($array, $this->start, $this->perPage); } public function links() { global $_ADDONLANG; $plinks = array(); $links = array(); $slinks = array(); if (count($_GET)) { $queryURL = ""; foreach ($_GET as $key => $value) { if ($key != "page") { $queryURL .= "and" . $key . "=" . $value; } } } if (!isset($queryURL)) { $queryURL = ""; } if (1 < $this->pages) { if ($this->page != 1) { if ($this->showFirstAndLast) { $plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=1" . $queryURL . "\">&laquo;&laquo; " . $_ADDONLANG["pagefirst"] . " </a>"; } $plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page - 1) . $queryURL . "\">&laquo; " . $_ADDONLANG["pageprev"] . " </a>"; } for ($j = 1; $j < $this->pages + 1; $j++) { if ($this->page == $j) { $links[] = "<a style=\"font-weight:bold;\">" . $j . "</a>"; } else { $links[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $j . $queryURL . "\">" . $j . "</a>"; } } if ($this->page < $this->pages) { $slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page + 1) . $queryURL . "\"> " . $_ADDONLANG["pagenext"] . " &raquo; </a>"; if ($this->showFirstAndLast) { $slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $this->pages . $queryURL . "\"> " . $_ADDONLANG["pagelast"] . " &raquo;&raquo; </a>"; } } return implode(" ", $plinks) . implode(" ", $links) . implode(" ", $slinks); } } } } $method = "GET"; $apifunction = "/api/resellers/details.json"; $resellerdetails_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method); $reseller_buycurrency = $resellerdetails_arrXml["parentsellingcurrencysymbol"]; $lb_sellingcurrency = $resellerdetails_arrXml["sellingcurrencysymbol"]; $desglose_tblcurrencies = select_query("tblcurrencies", "id,code", array( "default" => 1 )); $fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies); $currency = $fila_tblcurrencies["id"]; $currencycode = $fila_tblcurrencies["code"]; $reseller_sellingcurrency = $currencycode; if ($currencyswitch == "on") { $desglose_tblcurrencies = select_query("tblcurrencies", "rate", array( "code" => $defaultcurrency )); $fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies); $currencyrate = $fila_tblcurrencies["rate"]; } echo "<table style=\"margin-bottom:10px;\"><tr><td><img style=\"float:left;border:0\" src=\"../modules/addons/resellerclubmods_tools/img/rcmini.png\" /></td>\r\n\t\t\t\t <td style=\"padding:5px 0px 0px 5px;\"><strong>" . $LANG["freetoolslike"] . "</strong> " . $LANG["followus"] . ": <a href=\"https://facebook.com/resmods\" target=\"_blank\">Facebook</a> <a href=\"https://twitter.com/resmods\" target=\"_blank\">Twitter</a><br />\r\n\t\t\t\t " . $LANG["freetoolslikevote1"] . " <a href=\"http://www.whmcs.com/appstore/329/FREE-ResellerClub-Tools-v2.html\" target=\"_blank\">WHMCS Appstore</a>. " . $LANG["freetoolslikevote2"] . "<br />\r\n\t\t\t\t </td></tr></table>"; $selectorarray = array(); if (!empty($vars["first_acc_name"])) { $selectorarray[1] = $vars["first_acc_name"] . " - " . $vars["first_rcauth_userid"]; } if (!empty($vars["second_acc_name"])) { $selectorarray[2] = $vars["second_acc_name"] . " - " . $vars["second_rcauth_userid"]; } if (!empty($vars["third_acc_name"])) { $selectorarray[3] = $vars["third_acc_name"] . " - " . $vars["third_rcauth_userid"]; } if (!empty($vars["fourth_acc_name"])) { $selectorarray[4] = $vars["fourth_acc_name"] . " - " . $vars["fourth_rcauth_userid"]; } foreach ($selectorarray as $key => $value) { $selectoptions .= "<option value=\"" . $key . "\">" . $value . "</option>"; } $tools_change_acc_dropdown = "\r\n\t\t\t<form action=\"" . $_SERVER["REQUEST_URI"] . "\" method=\"post\">\r\n\t\t\t<strong>" . $LANG["changeto"] . "</strong>\r\n\t\t\t<select name=\"account_number\" onchange=\"submit();\">\r\n\t\t\t<option value=\"\">" . $LANG["changercacc"] . "</option>\r\n\t\t\t" . $selectoptions . "\r\n\t\t\t</select>\r\n\t\t\t<input type=\"hidden\" name=\"changeaccount\" value=\"true\" />\r\n\t\t\t</form>"; $configuredto = "\r\n\t\t\t<div style=\"float:left;padding:4px;width:auto;\"><strong>" . $LANG["configuredto"] . "</strong> " . $account_name . " - <strong>" . $LANG["lbtitle"] . "</strong> <span " . $style_label . ">" . $logicbox_registrar . "</span> - <strong>ID:</strong> " . $rcauth_userid . "</div>\r\n\t\t\t<div style=\"float:left;padding-left:10px\">" . $tools_change_acc_dropdown . "</div>\r\n\t\t\t<div></div><br />\r\n\t\t\t<div style=\"border-bottom:1px solid #cccccc;margin-top:5px;padding-top:5px;\"></div><br />"; if ($_GET["trans"] == "showfunds") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/fundsbalance.php"); } else { if ($_GET["domain"] == "domain-pricing-import") { require(ROOTDIR . "/includes/currencyfunctions.php"); include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdompricing.php"); } else { if ($_GET["service"] == "hostingimport") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importproducts.php"); } else { if ($_GET["domain"] == "domainimport") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdomains.php"); } else { if ($_GET["domain"] == "showpromos") { require(ROOTDIR . "/includes/currencyfunctions.php"); include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/managepromos.php"); } else { if ($_GET["user"] == "whmcsuser-vs-rcusers") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/exportusers.php"); } else { if ($_GET["user"] == "rcuser-vs-whmcsusers") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importusers.php"); } else { if ($_GET["domain"] == "transfercheck") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/transfercheck.php"); } else { if ($_GET["domain"] == "moveservices") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/movedomain.php"); } else { if ($_GET["domain"] == "bulkmove") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/bulkdomainmove.php"); } else { if ($_GET["domain"] == "tldmanage") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/tldmanage.php"); } else { if ($_GET["automation"] == "cronjobs") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/automationtools.php"); } else { if ($_GET["domain"] == "raamanagement") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/raamanagement.php"); } else { if ($_GET["domain"] == "rcmwhois") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/guiwhois.php"); } else { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/home.php"); } } } } } } } } } } } } } } } function resellerclubmods_tools_sidebar($vars) { $modulelink = $vars["modulelink"]; $version = $vars["version"]; $LANG = $vars["_lang"]; $rcfree_license = $vars["rcfree_license"]; if (!function_exists("check_versions")) { function check_versions($verUrl) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); curl_setopt($ch, CURLOPT_URL, $verUrl); $result = curl_exec($ch); curl_close($ch); $headers = explode("\n", $result); $redir = $verUrl; $j = count($headers); for ($i = 0; $i < $j; $i++) { if (strpos($headers[$i], "Location:") !== false) { $redir = trim(str_replace("Location:", "", $headers[$i])); break; } } return $redir; } } $verUrl = "http://www.rcmodules.com/versions/rcfreetools_v3.txt"; $redir = check_versions($verUrl); $stream = fopen($redir, "r"); $vcheck = stream_get_contents($stream); fclose($stream); $vk = str_replace(".", "", $vcheck); $vn = str_replace(".", "", $version); if ((int) $vk <= (int) $vn) { $updateavail = $LANG["latestok"]; } else { $updateavail = "<strong style=\"color:#CC0000;\">" . $LANG["updateavail"] . "</strong>"; } $sidebar = "\r\n\t\t\t<span class=\"header\"><img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" /> RC and LB Tools v2</span>\r\n\t\t\t<ul class=\"menu\">\r\n\t\t\t<li><a style=\"color:#cc0000;\" href=\"configaddonmods.php#resellerclubmods_tools\">" . $LANG["configaddontitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "\">" . $LANG["toolshome"] . "</a></li>\r\n\t\t\t<li><hr style=\\\"border: 1px solid #1A4D80; height: 1px;\\\" /></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&automation=cronjobs\">" . $LANG["automationtools"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=whmcsuser-vs-rcusers\">" . $LANG["whmcsvsrcusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=rcuser-vs-whmcsusers\">" . $LANG["rcvswhmcscusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domainimport\">" . $LANG["domainimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domain-pricing-import\">" . $LANG["domainpriceimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsd\">" . $LANG["rsdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rmd\">" . $LANG["rmdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=vps\">" . $LANG["vpssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=dhs\">" . $LANG["dhssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rrd\">" . $LANG["rrdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ree\">" . $LANG["reesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ssl\">" . $LANG["sslsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsl\">" . $LANG["sitelocksidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rcg\">" . $LANG["codeguardsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=tldmanage\">" . $LANG["tldmanagesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=showpromos\">" . $LANG["domainpromos"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=raamanagement\">" . $LANG["raamanagementtitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=moveservices\">" . $LANG["movetitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=bulkmove\">" . $LANG["bulkmovesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&trans=showfunds\">" . $LANG["resellerclubbalance"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=transfercheck\">" . $LANG["transferchecktitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=rcmwhois\">" . $LANG["whoisaddonlinktitle"] . "</a></li>\r\n\t\t\t</ul>\r\n\t\t\t<span class=\"plain_header\">" . $LANG["toolsinfotitle"] . "</span>\r\n\t\t\t<div class=\"smallfont\">" . $LANG["toolsversiontitle"] . $version . "<br />" . $updateavail . "</div><br />\r\n\t\t\t"; return $sidebar; } break; case "Invalid": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key invalid</strong>"; break; case "Expired": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key expired</strong>"; break; case "Suspended": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key suspended</strong>"; break; default: echo "<strong style=\"color:#cc0000;\">Invalid Response</strong>"; break; }}
function resellerclubmods_tools_config(){ global $license_result; if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "2") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "second_acc_name", "value" => "Second Account" )); } if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "3") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "third_acc_name", "value" => "Third Account" )); } if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "4") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "fourth_acc_name", "value" => "Fourth Account" )); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "2") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'second_%'"); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "3") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'third_%'"); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "4") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'fourth_%'"); } $result = select_query("tbladdonmodules", "setting,value", array( "module" => "resellerclubmods_tools" )); while ($data = mysql_fetch_array($result)) { $vars[$data[0]] = $data[1]; } $conf_license = $vars["rcfree_license"]; $conf_rchttp_api = $vars["rchttp_api"]; $first_rcauth_userid = $vars["first_rcauth_userid"]; $first_rcauth_password = $vars["first_rcauth_apikey"]; $first_logicbox_registrar = $vars["first_domainregistrar"]; $first_defaultcurrency = $vars["first_defaultcurrency"]; $first_currencyswitch = $vars["first_currencyswitch"]; $first_multiplicator = $vars["first_multiplicator"]; $first_account_name = $vars["first_acc_name"]; $first_account_number = 1; $default_promostyle = $vars["default_promostyle"]; $default_sellingprice = $vars["default_sellingprice"]; $showdefault_price = $vars["showdefault_price"]; if ($showdefault_price == "Yes") { $showdefaultprice = "7.50"; } if (!empty($conf_license) and& !empty($conf_rchttp_api) and& !empty($first_rcauth_userid) and& !empty($first_rcauth_password) and& !empty($first_account_name)) { $table = "mod_resellerclubmodstools"; $fields = "account_number"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $tools_account_number = $data["account_number"]; if (empty($tools_account_number)) { $table = "mod_resellerclubmodstools"; $values = array( "account_name" => $first_account_name, "account_number" => $first_account_number, "rcauth_userid" => $first_rcauth_userid, "rcauth_password" => $first_rcauth_password, "rchttp_api" => $conf_rchttp_api, "logicbox_registrar" => $first_logicbox_registrar, "defaultcurrency" => $first_defaultcurrency, "currencyswitch" => $first_currencyswitch, "multiplicator" => $first_multiplicator ); insert_query($table, $values); } } $table = "tblcurrencies"; $fields = "code"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblcurrencies[] = $data["code"]; } $currency_comma_separated = implode(",", $tblcurrencies); $table = "tblemailtemplates"; $fields = "language,name"; $where = array( "type" => "domain" ); $result = select_query($table, $fields, $where); while ($data = mysql_fetch_array($result)) { if (empty($data["language"])) { $tblmailtpls[] = $data["name"]; } } $tblmailtpls_comma_separated = implode(",", $tblmailtpls); $tbldomtemplates = "None," . $tblmailtpls_comma_separated; $table = "tbladmins"; $fields = "username"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tbladmins[] = $data["username"]; } $tbladmins_comma_separated = implode(",", $tbladmins); $table = "tblregistrars"; $fields = "registrar"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblregistrars[] = $data["registrar"]; } $tblregistrars = array_unique($tblregistrars); $tblregistrars = array_diff($tblregistrars, array( "resellerclub", "resellerclubrcm", "netearthone", "netearthonercm", "stargate", "stargatercm", "resellercamp", "resellercamprcm" )); $lbregistrars = implode(",", $tblregistrars); if (!empty($lbregistrars)) { $lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp," . $lbregistrars; } else { $lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp"; } $doconfirm_second = "<script language=\"javascript\" type=\"text/javascript\">function secondDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["second_acc_name"] . "\\\". Are you sure?\");}</script>"; $doconfirm_third = "<script language=\"javascript\" type=\"text/javascript\">function thirdDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["third_acc_name"] . "\\\". Are you sure?\");}</script>"; $doconfirm_fourth = "<script language=\"javascript\" type=\"text/javascript\">function fourthDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["fourth_acc_name"] . "\\\". Are you sure?\");}</script>"; if (!empty($vars["first_acc_name"])) { if (empty($vars["second_acc_name"])) { $doActivate_second = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Second Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=2#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_second = $doconfirm_second . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act02\"></a>To disable the &quot;2# Live or Demo Account&quot; (<strong>" . $vars["second_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=2#resellerclubmods_tools\" onclick=\"return secondDelete();\">here</a></div>"; $alink_second = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act02\">2# Account</a>"; } if (empty($vars["third_acc_name"])) { $doActivate_third = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Third Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=3#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_third = $doconfirm_third . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act03\"></a>To disable the &quot;3# Live or Demo Account&quot; (<strong>" . $vars["third_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=3#resellerclubmods_tools\" onclick=\"return thirdDelete();\">here</a></div>"; $alink_third = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act03\">3# Account</a>"; } if (empty($vars["fourth_acc_name"])) { $doActivate_fourth = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Fourth Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=4#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_fourth = $doconfirm_fourth . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act04\"></a>To disable the &quot;4# Live or Demo Account&quot; (<strong>" . $vars["fourth_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=4#resellerclubmods_tools\" onclick=\"return fourthDelete();\">here</a></div>"; $alink_fourth = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act04\">4# Account</a>"; } } $scroller = "<script type=\"text/javascript\">\r\n\tjQuery(document).ready(function(){\r\n\t jQuery(\".scroll\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tvar offset = jQuery(jQuery(this).attr('href')).offset().top;\r\n\t\tjQuery('html, body').animate({scrollTop:offset}, 1000);\r\n\t });\r\n\t});\r\n\t</script>"; $base_fields = array( "rcfree_license" => array( "FriendlyName" => "License Key <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Description" => "Set your License Key &nbsp;&nbsp;" . $license_result . "" ), "sectionlinks" => array( "FriendlyName" => "Goto Section", "Description" => $scroller . "<div style=\"padding:3px;\"><a class=\"scroll\" href=\"#act01\">1# Account</a>" . $alink_second . $alink_third . $alink_fourth . "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dth\">Domain Transfer Handling</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#cat\">Client Area Tools</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dpp\">Domain Promo Pricelist</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#shopint\">OrderBox - Cart Integration</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#misc\">Miscellaneous</a></div>" ), "textseparator0" => array( "FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Funds Widget Setup</span>", "Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />" ), "fundsbalance" => array( "FriendlyName" => "Funds Balance Widget", "Type" => "yesno", "Description" => "Tick to show the widget for your Resellerclub and LogicBoxes funds balance on the Admin Homepage" ), "currencysymbol" => array( "FriendlyName" => "Use Currency Symbol", "Type" => "yesno", "Description" => "Tick to show the currency symbol (&euro;) instead the currency code (EUR)" ), "totalfundscolor" => array( "FriendlyName" => "Font Color Total Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for Total Funds, default = <font color='#000000'>#000000</font>" ), "blockedfundscolor" => array( "FriendlyName" => "Font Color Blocked Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for blocked funds, default = <font color='#CC0000'>#CC0000</font>" ), "availfundscolor" => array( "FriendlyName" => "Font Color Available Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for available funds, default = <font color='#779500'>#779500</font>" ), "fontsize" => array( "FriendlyName" => "Font Size", "Type" => "text", "Size" => "3", "Description" => "Set the font size for the ouput, default = 12" ), "fontfamily" => array( "FriendlyName" => "Font Family", "Type" => "text", "Size" => "100", "Description" => "<br />Set the font family for the ouput, default = Lucida Grande,Lucida Sans Unicode,Verdana,Arial,sans-serif" ), "textseparator1" => array( "FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Reseller Accounts Setup</span>", "Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />" ), "rchttp_api" => array( "FriendlyName" => "Reseller API <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Default" => "https://httpapi.com", "Description" => "API Url: https://httpapi.com</strong>" ) ); $first_account_fields = array( "first_acc" => array( "FriendlyName" => "<strong style=\"font-size:14px;\">1# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>", "Description" => "<a id=\"act01\"></a>" ), "first_acc_name" => array( "FriendlyName" => "Display Name <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Description" => "Set a Friendly Display Name" ), "first_domainregistrar" => array( "FriendlyName" => "Select your Registrar <span style=\"color:#cc0000\">*</span>", "Type" => "dropdown", "Options" => $lbdropdown, "Description" => "Select only a valid LogicBoxes Registrar!" ), "first_rcauth_userid" => array( "FriendlyName" => "Reseller ID <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "8", "Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)" ), "first_rcauth_apikey" => array( "FriendlyName" => "API Key <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "50", "Description" => "Set your unique Reseller API Key" ), "first_show_fundsbalance" => array( "FriendlyName" => "Disable Fundsbalance on Widget", "Type" => "yesno", "Description" => "Tick to Disable Fundsbalance Output on the widget" ), "first_ns_override" => array( "FriendlyName" => "Default Nameservers", "Type" => "text", "Size" => "120", "Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com" ), "first_transer_check" => array( "FriendlyName" => "Disable Transfer Check Cron", "Type" => "yesno", "Description" => "Tick to Disable Transfer Check Cron on this account" ), "first_hook_signup" => array( "FriendlyName" => "Disable Auto Customer Signup", "Type" => "yesno", "Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS" ), "first_pwd_signup" => array( "FriendlyName" => "Use WHMCS Password with Signup", "Type" => "yesno", "Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;" ), "first_hook_modify" => array( "FriendlyName" => "Disable Auto Customer Modify", "Type" => "yesno", "Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS" ), "first_pwd_modify" => array( "FriendlyName" => "Apply WHMCS Password if changed", "Type" => "yesno", "Description" => "Tick to sync the password in the reseller customer account when the password in WHMCS got changed" ), "first_hook_delete" => array( "FriendlyName" => "Disable Auto Customer Delete", "Type" => "yesno", "Description" => "Tick to Disable Customer deletion in your reseller account when a customer has been deleted in WHMCS" ), "first_threshold" => array( "FriendlyName" => "Disable Funds Threshold Check", "Type" => "yesno", "Description" => "Tick to Disable the hook for funds threshold mail alert" ), "first_threshold_value" => array( "FriendlyName" => "Override Reseller Funds Threshold", "Type" => "text", "Size" => "6", "Description" => "You can override the Threshold value from your reseller account settings. Leave blank to use your reseller settings" ), "subseparator101" => array( "FriendlyName" => "<span style=\"color:#cc0000;\">Domain Price Sync</span>" ), "first_domainsync_check" => array( "FriendlyName" => "Disable Domain Price Sync", "Type" => "yesno", "Description" => "Tick to Disable Disable Domain Price Sync Cron on this account" ), "first_domainsync_telescope" => array( "FriendlyName" => "Disable Telescope Pricing", "Type" => "yesno", "Description" => "Tick to disable Telescope Pricing for the Sync Cron on this account" ), "first_only_baseslab" => array( "FriendlyName" => "Sync Clientgroup Price Slabs", "Type" => "yesno", "Description" => "By default, only the Default Base Slab Pricing will be synced. Tick to activate sync for all Domain Price Slabs" ), "first_domainsync_tlds" => array( "FriendlyName" => "Sync Only this TLD's", "Type" => "text", "Size" => "40", "Description" => "Leave empty to sync all active TLDs Prices<br />Example: .us,.com,.co.uk,.net" ), "subseparator102" => array( "FriendlyName" => "<span style=\"color:#cc0000;\">Currency Setup</span>" ), "first_defaultcurrency" => array( "FriendlyName" => "Reseller Selling Currencies", "Type" => "dropdown", "Options" => $currency_comma_separated, "Description" => "&nbsp;Select your <strong>Reseller Selling Currency</strong> if it is <strong>not equal to the WHMCS Default Currency</strong>. For eg. you will need to do this if your Selling Currency in your Reseller Account is USD but in WHMCS Default is set to EUR!" ), "first_multiplicator" => array( "FriendlyName" => "Default multiplicator", "Type" => "dropdown", "Options" => "1,10,100,1000", "Description" => "Change only if your Reseller Selling Currency is calculated in 10's, 100's or 1000's" ), "first_currencyswitch" => array( "FriendlyName" => "Activate Currency Conversion", "Type" => "yesno", "Description" => "<span style=\"color:#cc0000;font-weight:bold;\">Important!</span> Tick this checkbox only if the Reseller Selling Currency is not equal to the WHMCS Default Currency." ) ); if ($vars["first_acc_name"]) { $first_activate = array( "first_activate_second" => array( "FriendlyName" => "", "Description" => $doActivate_second ) ); } else { $first_activate = array(); } if ($vars["second_acc_name"]) { $second_account_fields = array( "second_acc" => array( "FriendlyName" => "<strong style=\"font-size:14px;\">2# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>" ), "second_acc_name" => array( "FriendlyName" => "Display Name", "Type" => "text", "Size" => "30", "Description" => "Set a Friendly Display Name" ), "second_domainregistrar" => array( "FriendlyName" => "Select your Registrar", "Type" => "dropdown", "Options" => $lbdropdown, "Description" => "Select only a valid LogicBoxes Registrar!" ), "second_rcauth_userid" => array( "FriendlyName" => "Reseller ID", "Type" => "text", "Size" => "8", "Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)" ), "second_rcauth_apikey" => array( "FriendlyName" => "API Key", "Type" => "text", "Size" => "50", "Description" => "Set your unique Reseller API Key" ), "second_show_fundsbalance" => array( "FriendlyName" => "Disable Fundsbalance on Widget", "Type" => "yesno", "Description" => "Tick to Disable Fundsbalance Output on the widget" ), "second_ns_override" => array( "FriendlyName" => "Default Nameservers", "Type" => "text", "Size" => "120", "Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com" ), "second_transer_check" => array( "FriendlyName" => "Disable Transfer Check Cron", "Type" => "yesno", "Description" => "Tick to Disable Transfer Check Cron on this account" ), "second_hook_signup" => array( "FriendlyName" => "Disable Auto Customer Signup", "Type" => "yesno", "Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS" ), "second_pwd_signup" => array( "FriendlyName" => "Use WHMCS Password with Signup", "Type" => "yesno", "Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;" ), "second_hook_modify" => array( "FriendlyName" => "Disable Auto Customer Modify", "Type" => "yesno", "Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS" ), "second_pwd_modify" => array( "Frie
If it can be encoded, it can be decoded. If it can be decoded, it can be encoded. The circle of cryptography... Cool
02-27-2015, 01:18 AM
Post: #5
RE:
Code:
<?phperror_reporting(1 | 4);if (!defined("WHMCS")) { echo "File cannot be accessed directly<br />"; $whmcs_root_dir = realpath(dirname(__FILE__) . "/../../../"); include_once($whmcs_root_dir . "/dbconnect.php");}
if (!class_exists("idna_convert")) { require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php");}
$IDN = new idna_convert();$transfer_complete_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>The Domain transfer process for {\$domain_name} has been successfully completed. The details of the domain transfer are below:</p>\r\n<p>Domain: {\$domain_name}<br />\r\nRegistration Length: {\$domain_reg_period}<br />\r\nTransfer Price: {\$domain_first_payment_amount}<br />\r\nNext Due Date: {\$domain_next_due_date}</p>\r\n<p>You may login to your client area at {\$whmcs_url} to manage your domain.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_unlock_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently locked with your losing domain register. Before we can continue with your transfer this domain would need to be unlocked.</p>\r\n<p>If you need help getting the hide removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_epp_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} secret code, EPP code and also known as authorization code was not provided with the Domain Transfer approval and we sent an approval mail requesting you to provide the EPP code.</p>\r\n<p>As soon as you have provided the EPP code, the domain transfer request will be send to your losing domain register.</p>\r\n<p>If you are having trouble with this step or if you have not received the mail to provide the EPP code please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$transfer_idprotect_message = "\r\n<p>Dear {\$client_name},</p>\r\n<p>We show your domain {\$domain_name} is currently WHOIS ID protected. Before we can continue with your transfer you need to disable the ID WHOIS Protection.</p>\r\n<p>If you need help getting the ID Protection removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{\$signature}</p>\r\n";$table = "tbladdonmodules";$fields = "value";$where = array( "setting" => "rcfree_license");$result = select_query($table, $fields, $where);$data = mysql_fetch_array($result);$rcfree_license = $data["value"];global $softversion;global $modulename;global $mdf;global $fse;global $is_php;$subver = ioncube_loader_iversion();$is_php = substr(phpversion(), 0, 3);$mdf = sha1(file_get_contents(__FILE__));$fse = filesize(__FILE__);$releasedate = "2014-12-05";$softversion = "2.8.3";$modulename = "RCLBT";if (!function_exists("rcfree_check_license")) { function rcfree_check_license($rcfree_license, $rcfree_localkey = "") { $results = array( "status" => "Active", "description" => "Enjoy the null!", "validdomain" => $_SERVER['HTTP_HOST'], "validip" => $_SERVER['SERVER_ADDR'], "validdirectory" => $_SERVER['DOCUMENT_ROOT'] ); return $results; } }
if (!empty($rcfree_license)) { $table = "mod_resellerclubmodstools"; $fields = "localkey"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $rcfree_localkey = $data["localkey"]; if (isset($_REQUEST["dolicensecheck"])) { $rcfree_localkey = ""; update_query("mod_resellerclubmodstools", array( "localkey" => "" )); } if (substr($_SERVER["argv"][0], -8) != "cron.php") { $results = rcfree_check_license($rcfree_license, $rcfree_localkey); } else { $results["status"] = "Active"; } switch ($results["status"]) { case "Active": if ($results["localkey"]) { $localkeydata = $results["localkey"]; $datetime = date("Y-m-d H:i:s"); $table = "mod_resellerclubmodstools"; $update = array( "localkey" => $localkeydata, "lastcheck" => $datetime ); update_query($table, $update); } if (isset($results["addons"])) { $addons_array = explode(";", htmlspecialchars_decode($results["addons"])); $addondue = str_replace("nextduedate=", "", $addons_array[1]); if ($addondue < $releasedate) { exit("<p style=\"color:red;font-weight:bold;\">Your \"" . $modulename . " Support and Updates\" Addon expired prior to this release and must be renewed to run this version</p>"); } } require(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/functions.php"); require(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/clientareatools.php"); function resellerclubmods_tools_output($vars) { if (!class_exists("idna_convert")) { require_once(ROOTDIR . "/modules/addons/resellerclubmods_tools/incs/idnclass.php"); } $IDN = new idna_convert(); global $customadminpath; global $CONFIG; $maileradmin = $vars["maileradmin"]; $sendconfmail = $vars["sendconfmail"]; $emailtplname = $vars["templatename"]; $templatenameunlock = $vars["templatenameunlock"]; $templatenameeppcode = $vars["templatenameeppcode"]; $templatenameidprotect = $vars["templatenameidprotect"]; $templatenamefailed = $vars["templatenamefailed"]; $brokentransfers = $vars["brokentransfers"]; $promo_update_active = $vars["promo_end_check"]; $raa_report_active = $vars["raa_domain_check"]; $transferfree_tlds = $vars["transferfree_tlds"]; if (empty($transferfree_tlds)) { $transferfree_tlds = "com.au,net.au,co.uk,me.uk,org.uk,com.ru,net.ru,org.ru,ru"; } $transferfree_tlds_array = explode(",", $transferfree_tlds); array_walk($transferfree_tlds_array, "rcm_array_trim"); if (isset($_POST["force"]) and& $_POST["force"] == "true") { $table = "mod_resellerclubmodstools"; $update = array( "localkey" => "", "lastcheck" => "" ); update_query($table, $update); header("location: addonmodules.php?module=resellerclubmods_tools"); } $table = "tblconfiguration"; $fields = "setting,value"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblconf[$data[0]] = $data[1]; } $style_label = "class=\"label terminated\""; $style_labelwarn = "class=\"label pending\""; $style_labelinfo = "class=\"label expired\""; $style_labelok = "class=\"label active\""; $style_promolabel = "class=\"label active\" style=\"cursor:pointer;\""; $nosupportedmovetlds = array( ".cn", ".com.cn", ".net.cn", "org.cn", ".org.nz", ".net.nz", ".co.nz" ); $LANG = $vars["_lang"]; if (isset($_POST["changeaccount"]) and& $_POST["changeaccount"] == "true") { $table = "mod_resellerclubmodstools"; if ($_POST["account_number"] == 1) { $rcauth_userid = $vars["first_rcauth_userid"]; $rcauth_password = $vars["first_rcauth_apikey"]; $logicbox_registrar = $vars["first_domainregistrar"]; $defaultcurrency = $vars["first_defaultcurrency"]; $currencyswitch = $vars["first_currencyswitch"]; $multiplicator = $vars["first_multiplicator"]; $account_name = $vars["first_acc_name"]; $account_number = 1; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 2) { $rcauth_userid = $vars["second_rcauth_userid"]; $rcauth_password = $vars["second_rcauth_apikey"]; $logicbox_registrar = $vars["second_domainregistrar"]; $defaultcurrency = $vars["second_defaultcurrency"]; $currencyswitch = $vars["second_currencyswitch"]; $multiplicator = $vars["second_multiplicator"]; $account_name = $vars["second_acc_name"]; $account_number = 2; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 3) { $rcauth_userid = $vars["third_rcauth_userid"]; $rcauth_password = $vars["third_rcauth_apikey"]; $logicbox_registrar = $vars["third_domainregistrar"]; $defaultcurrency = $vars["third_defaultcurrency"]; $currencyswitch = $vars["third_currencyswitch"]; $multiplicator = $vars["third_multiplicator"]; $account_name = $vars["third_acc_name"]; $account_number = 3; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { if ($_POST["account_number"] == 4) { $rcauth_userid = $vars["fourth_rcauth_userid"]; $rcauth_password = $vars["fourth_rcauth_apikey"]; $logicbox_registrar = $vars["fourth_domainregistrar"]; $defaultcurrency = $vars["fourth_defaultcurrency"]; $currencyswitch = $vars["fourth_currencyswitch"]; $multiplicator = $vars["fourth_multiplicator"]; $account_name = $vars["fourth_acc_name"]; $account_number = 4; $update = array( "account_name" => $account_name, "account_number" => $account_number, "rcauth_userid" => $rcauth_userid, "rcauth_password" => $rcauth_password, "logicbox_registrar" => $logicbox_registrar, "defaultcurrency" => $defaultcurrency, "currencyswitch" => $currencyswitch, "multiplicator" => $multiplicator ); update_query($table, $update); echo "<div style=\"padding-top:10px;padding-bottom:10px\" class=\"successbox\">" . $LANG["changeaccountsuccess"] . " <strong>" . $account_name . "</strong></div>"; } else { echo "<div style=\"padding-top:10px;padding-bottom:10px;\" class=\"errorbox\">" . $LANG["changeaccountinfo"] . "</div>"; } } } } } $table = "mod_resellerclubmodstools"; $fields = "rcauth_userid,rcauth_password,rchttp_api,logicbox_registrar,defaultcurrency,curr​​encyswitch,multiplicator,account_name,localkey,lastcheck,account_number"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $rcauth_userid = $data["rcauth_userid"]; $rcauth_password = $data["rcauth_password"]; $rchttp_api = $data["rchttp_api"]; $logicbox_registrar = $data["logicbox_registrar"]; $defaultcurrency = $data["defaultcurrency"]; $currencyswitch = $data["currencyswitch"]; $multiplicator = $data["multiplicator"]; $account_name = $data["account_name"]; $lockey = $data["localkey"]; $syncdate = $data["lastcheck"]; $account_number = $data["account_number"]; if ($logicbox_registrar == "resellerclub") { $registrar_label = "ResellerClub"; } if ($logicbox_registrar == "netearthone") { $registrar_label = "NetEarthOne"; } if ($logicbox_registrar == "stargate") { $registrar_label = "Resell.biz (stargate/uk2)"; } if ($logicbox_registrar == "resellercamp") { $registrar_label = "ResellerCamp"; } if ($account_number == 1) { $is_transfercheck = $vars["first_transer_check"]; $is_hooksignup = $vars["first_hook_signup"]; $is_pwdsignup = $vars["first_pwd_signup"]; $is_hookmodify = $vars["first_hook_modify"]; $is_pwdmodify = $vars["first_pwd_modify"]; $is_hookdelete = $vars["first_hook_delete"]; $is_threshold = $vars["first_threshold"]; $is_domainsync = $vars["first_domainsync_check"]; $is_domainsynctlds = $vars["first_domainsync_tlds"]; $is_onlybaseslab = $vars["first_only_baseslab"]; $is_defaultns = $vars["first_ns_override"]; $is_domaintelescope = $vars["first_domainsync_telescope"]; } else { if ($account_number == 2) { $is_transfercheck = $vars["second_transer_check"]; $is_hooksignup = $vars["second_hook_signup"]; $is_pwdsignup = $vars["second_pwd_signup"]; $is_hookmodify = $vars["second_hook_modify"]; $is_pwdmodify = $vars["second_pwd_modify"]; $is_hookdelete = $vars["second_hook_delete"]; $is_threshold = $vars["second_threshold"]; $is_domainsync = $vars["second_domainsync_check"]; $is_domainsynctlds = $vars["second_domainsync_tlds"]; $is_onlybaseslab = $vars["second_only_baseslab"]; $is_defaultns = $vars["second_ns_override"]; $is_domaintelescope = $vars["second_domainsync_telescope"]; } else { if ($account_number == 3) { $is_transfercheck = $vars["third_transer_check"]; $is_hooksignup = $vars["third_hook_signup"]; $is_pwdsignup = $vars["third_pwd_signup"]; $is_hookmodify = $vars["third_hook_modify"]; $is_pwdmodify = $vars["third_pwd_modify"]; $is_hookdelete = $vars["third_hook_delete"]; $is_threshold = $vars["third_threshold"]; $is_domainsync = $vars["third_domainsync_check"]; $is_domainsynctlds = $vars["third_domainsync_tlds"]; $is_onlybaseslab = $vars["third_only_baseslab"]; $is_defaultns = $vars["third_ns_override"]; $is_domaintelescope = $vars["third_domainsync_telescope"]; } else { if ($account_number == 4) { $is_transfercheck = $vars["fourth_transer_check"]; $is_hooksignup = $vars["fourth_hook_signup"]; $is_pwdsignup = $vars["fourth_pwd_signup"]; $is_hookmodify = $vars["fourth_hook_modify"]; $is_pwdmodify = $vars["fourth_pwd_modify"]; $is_hookdelete = $vars["fourth_hook_delete"]; $is_threshold = $vars["fourth_threshold"]; $is_domainsync = $vars["fourth_domainsync_check"]; $is_domainsynctlds = $vars["fourth_domainsync_tlds"]; $is_onlybaseslab = $vars["fourth_only_baseslab"]; $is_defaultns = $vars["fourth_ns_override"]; $is_domaintelescope = $vars["fourth_domainsync_telescope"]; } } } } $is_promocheck = $vars["promo_end_check"]; $is_raacheck = $vars["raa_domain_check"]; $is_domainlookup = $vars["use_account_whois"]; $is_recurringdomupd = $vars["update_domain_recurring"]; $modulelink = $vars["modulelink"]; $version = $vars["version"]; $currencysymbol = $vars["currencysymbol"]; $google_currency = $vars["google_currency"]; if ($vars["totalfundscolor"]) { $totalfundscolor = $vars["totalfundscolor"]; } else { $totalfundscolor = "#000000"; } if ($vars["blockedfundscolor"]) { $blockedfundscolor = $vars["blockedfundscolor"]; } else { $blockedfundscolor = "#CC0000"; } if ($vars["availfundscolor"]) { $availfundscolor = $vars["availfundscolor"]; } else { $availfundscolor = "#779500"; } if ($_GET["user"] == "rcuser-vs-whmcsusers") { $qtyrecords = 20; $qtypageno = 1; $method = "GET"; $apifunction = "/api/customers/search.json"; $data = array( "no-of-records" => $qtyrecords, "page-no" => $qtypageno ); $recsindb_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method); $GLOBALS["recsindb_length"] = $recsindb_arrXml["recsindb"]; } if (!class_exists("rcm_pagination")) { class rcm_pagination { public $page = 1; public $perPage = 20; public $showFirstAndLast = false; public function generate($array, $perPage = 20) { if (!empty($perPage)) { $this->perPage = $perPage; } if (!empty($_GET["page"])) { $this->page = $_GET["page"]; } else { $this->page = 1; } if ($_GET["user"] == "rcuser-vs-whmcsusers") { $this->length = $GLOBALS["recsindb_length"]; $this->pages = ceil($this->length / $this->perPage); $this->start = 0; } else { $this->length = count($array); $this->pages = ceil($this->length / $this->perPage); $this->start = ceil(($this->page - 1) * $this->perPage); } return array_slice($array, $this->start, $this->perPage); } public function links() { global $_ADDONLANG; $plinks = array(); $links = array(); $slinks = array(); if (count($_GET)) { $queryURL = ""; foreach ($_GET as $key => $value) { if ($key != "page") { $queryURL .= "and" . $key . "=" . $value; } } } if (!isset($queryURL)) { $queryURL = ""; } if (1 < $this->pages) { if ($this->page != 1) { if ($this->showFirstAndLast) { $plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=1" . $queryURL . "\">&laquo;&laquo; " . $_ADDONLANG["pagefirst"] . " </a>"; } $plinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page - 1) . $queryURL . "\">&laquo; " . $_ADDONLANG["pageprev"] . " </a>"; } for ($j = 1; $j < $this->pages + 1; $j++) { if ($this->page == $j) { $links[] = "<a style=\"font-weight:bold;\">" . $j . "</a>"; } else { $links[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $j . $queryURL . "\">" . $j . "</a>"; } } if ($this->page < $this->pages) { $slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . ($this->page + 1) . $queryURL . "\"> " . $_ADDONLANG["pagenext"] . " &raquo; </a>"; if ($this->showFirstAndLast) { $slinks[] = "<a href=\"" . $_SERVER["PHP_SELF"] . "?page=" . $this->pages . $queryURL . "\"> " . $_ADDONLANG["pagelast"] . " &raquo;&raquo; </a>"; } } return implode(" ", $plinks) . implode(" ", $links) . implode(" ", $slinks); } } } } $method = "GET"; $apifunction = "/api/resellers/details.json"; $resellerdetails_arrXml = call_api($rcauth_userid, $rcauth_password, $rchttp_api, $apifunction, $data, $method); $reseller_buycurrency = $resellerdetails_arrXml["parentsellingcurrencysymbol"]; $lb_sellingcurrency = $resellerdetails_arrXml["sellingcurrencysymbol"]; $desglose_tblcurrencies = select_query("tblcurrencies", "id,code", array( "default" => 1 )); $fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies); $currency = $fila_tblcurrencies["id"]; $currencycode = $fila_tblcurrencies["code"]; $reseller_sellingcurrency = $currencycode; if ($currencyswitch == "on") { $desglose_tblcurrencies = select_query("tblcurrencies", "rate", array( "code" => $defaultcurrency )); $fila_tblcurrencies = mysql_fetch_array($desglose_tblcurrencies); $currencyrate = $fila_tblcurrencies["rate"]; } echo "<table style=\"margin-bottom:10px;\"><tr><td><img style=\"float:left;border:0\" src=\"../modules/addons/resellerclubmods_tools/img/rcmini.png\" /></td>\r\n\t\t\t\t <td style=\"padding:5px 0px 0px 5px;\"><strong>" . $LANG["freetoolslike"] . "</strong> " . $LANG["followus"] . ": <a href=\"https://facebook.com/resmods\" target=\"_blank\">Facebook</a> <a href=\"https://twitter.com/resmods\" target=\"_blank\">Twitter</a><br />\r\n\t\t\t\t " . $LANG["freetoolslikevote1"] . " <a href=\"http://www.whmcs.com/appstore/329/FREE-ResellerClub-Tools-v2.html\" target=\"_blank\">WHMCS Appstore</a>. " . $LANG["freetoolslikevote2"] . "<br />\r\n\t\t\t\t </td></tr></table>"; $selectorarray = array(); if (!empty($vars["first_acc_name"])) { $selectorarray[1] = $vars["first_acc_name"] . " - " . $vars["first_rcauth_userid"]; } if (!empty($vars["second_acc_name"])) { $selectorarray[2] = $vars["second_acc_name"] . " - " . $vars["second_rcauth_userid"]; } if (!empty($vars["third_acc_name"])) { $selectorarray[3] = $vars["third_acc_name"] . " - " . $vars["third_rcauth_userid"]; } if (!empty($vars["fourth_acc_name"])) { $selectorarray[4] = $vars["fourth_acc_name"] . " - " . $vars["fourth_rcauth_userid"]; } foreach ($selectorarray as $key => $value) { $selectoptions .= "<option value=\"" . $key . "\">" . $value . "</option>"; } $tools_change_acc_dropdown = "\r\n\t\t\t<form action=\"" . $_SERVER["REQUEST_URI"] . "\" method=\"post\">\r\n\t\t\t<strong>" . $LANG["changeto"] . "</strong>\r\n\t\t\t<select name=\"account_number\" onchange=\"submit();\">\r\n\t\t\t<option value=\"\">" . $LANG["changercacc"] . "</option>\r\n\t\t\t" . $selectoptions . "\r\n\t\t\t</select>\r\n\t\t\t<input type=\"hidden\" name=\"changeaccount\" value=\"true\" />\r\n\t\t\t</form>"; $configuredto = "\r\n\t\t\t<div style=\"float:left;padding:4px;width:auto;\"><strong>" . $LANG["configuredto"] . "</strong> " . $account_name . " - <strong>" . $LANG["lbtitle"] . "</strong> <span " . $style_label . ">" . $logicbox_registrar . "</span> - <strong>ID:</strong> " . $rcauth_userid . "</div>\r\n\t\t\t<div style=\"float:left;padding-left:10px\">" . $tools_change_acc_dropdown . "</div>\r\n\t\t\t<div></div><br />\r\n\t\t\t<div style=\"border-bottom:1px solid #cccccc;margin-top:5px;padding-top:5px;\"></div><br />"; if ($_GET["trans"] == "showfunds") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/fundsbalance.php"); } else { if ($_GET["domain"] == "domain-pricing-import") { require(ROOTDIR . "/includes/currencyfunctions.php"); include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdompricing.php"); } else { if ($_GET["service"] == "hostingimport") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importproducts.php"); } else { if ($_GET["domain"] == "domainimport") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importdomains.php"); } else { if ($_GET["domain"] == "showpromos") { require(ROOTDIR . "/includes/currencyfunctions.php"); include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/managepromos.php"); } else { if ($_GET["user"] == "whmcsuser-vs-rcusers") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/exportusers.php"); } else { if ($_GET["user"] == "rcuser-vs-whmcsusers") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/importusers.php"); } else { if ($_GET["domain"] == "transfercheck") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/transfercheck.php"); } else { if ($_GET["domain"] == "moveservices") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/movedomain.php"); } else { if ($_GET["domain"] == "bulkmove") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/bulkdomainmove.php"); } else { if ($_GET["domain"] == "tldmanage") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/tldmanage.php"); } else { if ($_GET["automation"] == "cronjobs") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/automationtools.php"); } else { if ($_GET["domain"] == "raamanagement") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/raamanagement.php"); } else { if ($_GET["domain"] == "rcmwhois") { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/guiwhois.php"); } else { include(ROOTDIR . "/modules/addons/resellerclubmods_tools/tools/home.php"); } } } } } } } } } } } } } } } function resellerclubmods_tools_sidebar($vars) { $modulelink = $vars["modulelink"]; $version = $vars["version"]; $LANG = $vars["_lang"]; $rcfree_license = $vars["rcfree_license"]; if (!function_exists("check_versions")) { function check_versions($verUrl) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); curl_setopt($ch, CURLOPT_URL, $verUrl); $result = curl_exec($ch); curl_close($ch); $headers = explode("\n", $result); $redir = $verUrl; $j = count($headers); for ($i = 0; $i < $j; $i++) { if (strpos($headers[$i], "Location:") !== false) { $redir = trim(str_replace("Location:", "", $headers[$i])); break; } } return $redir; } } $verUrl = "http://www.rcmodules.com/versions/rcfreetools_v3.txt"; $redir = check_versions($verUrl); $stream = fopen($redir, "r"); $vcheck = stream_get_contents($stream); fclose($stream); $vk = str_replace(".", "", $vcheck); $vn = str_replace(".", "", $version); if ((int) $vk <= (int) $vn) { $updateavail = $LANG["latestok"]; } else { $updateavail = "<strong style=\"color:#CC0000;\">" . $LANG["updateavail"] . "</strong>"; } $sidebar = "\r\n\t\t\t<span class=\"header\"><img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" /> RC and LB Tools v2</span>\r\n\t\t\t<ul class=\"menu\">\r\n\t\t\t<li><a style=\"color:#cc0000;\" href=\"configaddonmods.php#resellerclubmods_tools\">" . $LANG["configaddontitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "\">" . $LANG["toolshome"] . "</a></li>\r\n\t\t\t<li><hr style=\\\"border: 1px solid #1A4D80; height: 1px;\\\" /></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&automation=cronjobs\">" . $LANG["automationtools"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=whmcsuser-vs-rcusers\">" . $LANG["whmcsvsrcusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&user=rcuser-vs-whmcsusers\">" . $LANG["rcvswhmcscusers"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domainimport\">" . $LANG["domainimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=domain-pricing-import\">" . $LANG["domainpriceimporttitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsd\">" . $LANG["rsdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rmd\">" . $LANG["rmdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=vps\">" . $LANG["vpssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=dhs\">" . $LANG["dhssidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rrd\">" . $LANG["rrdsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ree\">" . $LANG["reesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=ssl\">" . $LANG["sslsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rsl\">" . $LANG["sitelocksidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&service=hostingimport&plantype=rcg\">" . $LANG["codeguardsidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=tldmanage\">" . $LANG["tldmanagesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=showpromos\">" . $LANG["domainpromos"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=raamanagement\">" . $LANG["raamanagementtitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=moveservices\">" . $LANG["movetitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=bulkmove\">" . $LANG["bulkmovesidebarlink"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&trans=showfunds\">" . $LANG["resellerclubbalance"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=transfercheck\">" . $LANG["transferchecktitle"] . "</a></li>\r\n\t\t\t<li><a href=\"" . $modulelink . "&domain=rcmwhois\">" . $LANG["whoisaddonlinktitle"] . "</a></li>\r\n\t\t\t</ul>\r\n\t\t\t<span class=\"plain_header\">" . $LANG["toolsinfotitle"] . "</span>\r\n\t\t\t<div class=\"smallfont\">" . $LANG["toolsversiontitle"] . $version . "<br />" . $updateavail . "</div><br />\r\n\t\t\t"; return $sidebar; } break; case "Invalid": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key invalid</strong>"; break; case "Expired": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key expired</strong>"; break; case "Suspended": echo "<strong style=\"color:#cc0000\">RC and LB Tools v2 License key suspended</strong>"; break; default: echo "<strong style=\"color:#cc0000;\">Invalid Response</strong>"; break; }}
function resellerclubmods_tools_config(){ global $license_result; if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "2") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "second_acc_name", "value" => "Second Account" )); } if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "3") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "third_acc_name", "value" => "Third Account" )); } if (isset($_REQUEST["doaccactivate"]) and& $_REQUEST["doaccactivate"] == "4") { insert_query("tbladdonmodules", array( "module" => "resellerclubmods_tools", "setting" => "fourth_acc_name", "value" => "Fourth Account" )); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "2") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'second_%'"); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "3") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'third_%'"); } if (isset($_REQUEST["doaccdeactivate"]) and& $_REQUEST["doaccdeactivate"] == "4") { mysql_query("DELETE FROM `tbladdonmodules` WHERE `module` = 'resellerclubmods_tools' AND `setting` LIKE 'fourth_%'"); } $result = select_query("tbladdonmodules", "setting,value", array( "module" => "resellerclubmods_tools" )); while ($data = mysql_fetch_array($result)) { $vars[$data[0]] = $data[1]; } $conf_license = $vars["rcfree_license"]; $conf_rchttp_api = $vars["rchttp_api"]; $first_rcauth_userid = $vars["first_rcauth_userid"]; $first_rcauth_password = $vars["first_rcauth_apikey"]; $first_logicbox_registrar = $vars["first_domainregistrar"]; $first_defaultcurrency = $vars["first_defaultcurrency"]; $first_currencyswitch = $vars["first_currencyswitch"]; $first_multiplicator = $vars["first_multiplicator"]; $first_account_name = $vars["first_acc_name"]; $first_account_number = 1; $default_promostyle = $vars["default_promostyle"]; $default_sellingprice = $vars["default_sellingprice"]; $showdefault_price = $vars["showdefault_price"]; if ($showdefault_price == "Yes") { $showdefaultprice = "7.50"; } if (!empty($conf_license) and& !empty($conf_rchttp_api) and& !empty($first_rcauth_userid) and& !empty($first_rcauth_password) and& !empty($first_account_name)) { $table = "mod_resellerclubmodstools"; $fields = "account_number"; $result = select_query($table, $fields, ""); $data = mysql_fetch_array($result); $tools_account_number = $data["account_number"]; if (empty($tools_account_number)) { $table = "mod_resellerclubmodstools"; $values = array( "account_name" => $first_account_name, "account_number" => $first_account_number, "rcauth_userid" => $first_rcauth_userid, "rcauth_password" => $first_rcauth_password, "rchttp_api" => $conf_rchttp_api, "logicbox_registrar" => $first_logicbox_registrar, "defaultcurrency" => $first_defaultcurrency, "currencyswitch" => $first_currencyswitch, "multiplicator" => $first_multiplicator ); insert_query($table, $values); } } $table = "tblcurrencies"; $fields = "code"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblcurrencies[] = $data["code"]; } $currency_comma_separated = implode(",", $tblcurrencies); $table = "tblemailtemplates"; $fields = "language,name"; $where = array( "type" => "domain" ); $result = select_query($table, $fields, $where); while ($data = mysql_fetch_array($result)) { if (empty($data["language"])) { $tblmailtpls[] = $data["name"]; } } $tblmailtpls_comma_separated = implode(",", $tblmailtpls); $tbldomtemplates = "None," . $tblmailtpls_comma_separated; $table = "tbladmins"; $fields = "username"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tbladmins[] = $data["username"]; } $tbladmins_comma_separated = implode(",", $tbladmins); $table = "tblregistrars"; $fields = "registrar"; $result = select_query($table, $fields, ""); while ($data = mysql_fetch_array($result)) { $tblregistrars[] = $data["registrar"]; } $tblregistrars = array_unique($tblregistrars); $tblregistrars = array_diff($tblregistrars, array( "resellerclub", "resellerclubrcm", "netearthone", "netearthonercm", "stargate", "stargatercm", "resellercamp", "resellercamprcm" )); $lbregistrars = implode(",", $tblregistrars); if (!empty($lbregistrars)) { $lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp," . $lbregistrars; } else { $lbdropdown = "Select Registrar,resellerclub,netearthone,stargate,resellercamp"; } $doconfirm_second = "<script language=\"javascript\" type=\"text/javascript\">function secondDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["second_acc_name"] . "\\\". Are you sure?\");}</script>"; $doconfirm_third = "<script language=\"javascript\" type=\"text/javascript\">function thirdDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["third_acc_name"] . "\\\". Are you sure?\");}</script>"; $doconfirm_fourth = "<script language=\"javascript\" type=\"text/javascript\">function fourthDelete(){return confirm(\"You are about to delete the Account \\\"" . $vars["fourth_acc_name"] . "\\\". Are you sure?\");}</script>"; if (!empty($vars["first_acc_name"])) { if (empty($vars["second_acc_name"])) { $doActivate_second = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Second Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=2#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_second = $doconfirm_second . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act02\"></a>To disable the &quot;2# Live or Demo Account&quot; (<strong>" . $vars["second_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=2#resellerclubmods_tools\" onclick=\"return secondDelete();\">here</a></div>"; $alink_second = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act02\">2# Account</a>"; } if (empty($vars["third_acc_name"])) { $doActivate_third = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Third Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=3#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_third = $doconfirm_third . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act03\"></a>To disable the &quot;3# Live or Demo Account&quot; (<strong>" . $vars["third_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=3#resellerclubmods_tools\" onclick=\"return thirdDelete();\">here</a></div>"; $alink_third = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act03\">3# Account</a>"; } if (empty($vars["fourth_acc_name"])) { $doActivate_fourth = "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#EAF9E3;padding:4px;\">To enable a &quot;<strong>Fourth Account</strong>&quot;, click <a href =\"configaddonmods.php?doaccactivate=4#resellerclubmods_tools\">here</a></div>"; } else { $doActivate_fourth = $doconfirm_fourth . "<div align=\"center\" style=\"border:1px solid #cccccc;background-color:#F9E3E3;padding:4px;\"><a id=\"act04\"></a>To disable the &quot;4# Live or Demo Account&quot; (<strong>" . $vars["fourth_acc_name"] . "</strong>), click <a href =\"configaddonmods.php?doaccdeactivate=4#resellerclubmods_tools\" onclick=\"return fourthDelete();\">here</a></div>"; $alink_fourth = "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#act04\">4# Account</a>"; } } $scroller = "<script type=\"text/javascript\">\r\n\tjQuery(document).ready(function(){\r\n\t jQuery(\".scroll\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tvar offset = jQuery(jQuery(this).attr('href')).offset().top;\r\n\t\tjQuery('html, body').animate({scrollTop:offset}, 1000);\r\n\t });\r\n\t});\r\n\t</script>"; $base_fields = array( "rcfree_license" => array( "FriendlyName" => "License Key <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Description" => "Set your License Key &nbsp;&nbsp;" . $license_result . "" ), "sectionlinks" => array( "FriendlyName" => "Goto Section", "Description" => $scroller . "<div style=\"padding:3px;\"><a class=\"scroll\" href=\"#act01\">1# Account</a>" . $alink_second . $alink_third . $alink_fourth . "&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dth\">Domain Transfer Handling</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#cat\">Client Area Tools</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#dpp\">Domain Promo Pricelist</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#shopint\">OrderBox - Cart Integration</a>&nbsp;|&nbsp;<a class=\"scroll\" href=\"#misc\">Miscellaneous</a></div>" ), "textseparator0" => array( "FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Funds Widget Setup</span>", "Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />" ), "fundsbalance" => array( "FriendlyName" => "Funds Balance Widget", "Type" => "yesno", "Description" => "Tick to show the widget for your Resellerclub and LogicBoxes funds balance on the Admin Homepage" ), "currencysymbol" => array( "FriendlyName" => "Use Currency Symbol", "Type" => "yesno", "Description" => "Tick to show the currency symbol (&euro;) instead the currency code (EUR)" ), "totalfundscolor" => array( "FriendlyName" => "Font Color Total Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for Total Funds, default = <font color='#000000'>#000000</font>" ), "blockedfundscolor" => array( "FriendlyName" => "Font Color Blocked Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for blocked funds, default = <font color='#CC0000'>#CC0000</font>" ), "availfundscolor" => array( "FriendlyName" => "Font Color Available Funds", "Type" => "text", "Size" => "8", "Description" => "Set the font color for available funds, default = <font color='#779500'>#779500</font>" ), "fontsize" => array( "FriendlyName" => "Font Size", "Type" => "text", "Size" => "3", "Description" => "Set the font size for the ouput, default = 12" ), "fontfamily" => array( "FriendlyName" => "Font Family", "Type" => "text", "Size" => "100", "Description" => "<br />Set the font family for the ouput, default = Lucida Grande,Lucida Sans Unicode,Verdana,Arial,sans-serif" ), "textseparator1" => array( "FriendlyName" => "<span style=\"color:#cc0000;font-weight:bold;\">Reseller Accounts Setup</span>", "Description" => "<hr style=\"border: 1px solid #cc0000; height: 2px;\" />" ), "rchttp_api" => array( "FriendlyName" => "Reseller API <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Default" => "https://httpapi.com", "Description" => "API Url: https://httpapi.com</strong>" ) ); $first_account_fields = array( "first_acc" => array( "FriendlyName" => "<strong style=\"font-size:14px;\">1# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>", "Description" => "<a id=\"act01\"></a>" ), "first_acc_name" => array( "FriendlyName" => "Display Name <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "30", "Description" => "Set a Friendly Display Name" ), "first_domainregistrar" => array( "FriendlyName" => "Select your Registrar <span style=\"color:#cc0000\">*</span>", "Type" => "dropdown", "Options" => $lbdropdown, "Description" => "Select only a valid LogicBoxes Registrar!" ), "first_rcauth_userid" => array( "FriendlyName" => "Reseller ID <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "8", "Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)" ), "first_rcauth_apikey" => array( "FriendlyName" => "API Key <span style=\"color:#cc0000\">*</span>", "Type" => "text", "Size" => "50", "Description" => "Set your unique Reseller API Key" ), "first_show_fundsbalance" => array( "FriendlyName" => "Disable Fundsbalance on Widget", "Type" => "yesno", "Description" => "Tick to Disable Fundsbalance Output on the widget" ), "first_ns_override" => array( "FriendlyName" => "Default Nameservers", "Type" => "text", "Size" => "120", "Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com" ), "first_transer_check" => array( "FriendlyName" => "Disable Transfer Check Cron", "Type" => "yesno", "Description" => "Tick to Disable Transfer Check Cron on this account" ), "first_hook_signup" => array( "FriendlyName" => "Disable Auto Customer Signup", "Type" => "yesno", "Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS" ), "first_pwd_signup" => array( "FriendlyName" => "Use WHMCS Password with Signup", "Type" => "yesno", "Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;" ), "first_hook_modify" => array( "FriendlyName" => "Disable Auto Customer Modify", "Type" => "yesno", "Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS" ), "first_pwd_modify" => array( "FriendlyName" => "Apply WHMCS Password if changed", "Type" => "yesno", "Description" => "Tick to sync the password in the reseller customer account when the password in WHMCS got changed" ), "first_hook_delete" => array( "FriendlyName" => "Disable Auto Customer Delete", "Type" => "yesno", "Description" => "Tick to Disable Customer deletion in your reseller account when a customer has been deleted in WHMCS" ), "first_threshold" => array( "FriendlyName" => "Disable Funds Threshold Check", "Type" => "yesno", "Description" => "Tick to Disable the hook for funds threshold mail alert" ), "first_threshold_value" => array( "FriendlyName" => "Override Reseller Funds Threshold", "Type" => "text", "Size" => "6", "Description" => "You can override the Threshold value from your reseller account settings. Leave blank to use your reseller settings" ), "subseparator101" => array( "FriendlyName" => "<span style=\"color:#cc0000;\">Domain Price Sync</span>" ), "first_domainsync_check" => array( "FriendlyName" => "Disable Domain Price Sync", "Type" => "yesno", "Description" => "Tick to Disable Disable Domain Price Sync Cron on this account" ), "first_domainsync_telescope" => array( "FriendlyName" => "Disable Telescope Pricing", "Type" => "yesno", "Description" => "Tick to disable Telescope Pricing for the Sync Cron on this account" ), "first_only_baseslab" => array( "FriendlyName" => "Sync Clientgroup Price Slabs", "Type" => "yesno", "Description" => "By default, only the Default Base Slab Pricing will be synced. Tick to activate sync for all Domain Price Slabs" ), "first_domainsync_tlds" => array( "FriendlyName" => "Sync Only this TLD's", "Type" => "text", "Size" => "40", "Description" => "Leave empty to sync all active TLDs Prices<br />Example: .us,.com,.co.uk,.net" ), "subseparator102" => array( "FriendlyName" => "<span style=\"color:#cc0000;\">Currency Setup</span>" ), "first_defaultcurrency" => array( "FriendlyName" => "Reseller Selling Currencies", "Type" => "dropdown", "Options" => $currency_comma_separated, "Description" => "&nbsp;Select your <strong>Reseller Selling Currency</strong> if it is <strong>not equal to the WHMCS Default Currency</strong>. For eg. you will need to do this if your Selling Currency in your Reseller Account is USD but in WHMCS Default is set to EUR!" ), "first_multiplicator" => array( "FriendlyName" => "Default multiplicator", "Type" => "dropdown", "Options" => "1,10,100,1000", "Description" => "Change only if your Reseller Selling Currency is calculated in 10's, 100's or 1000's" ), "first_currencyswitch" => array( "FriendlyName" => "Activate Currency Conversion", "Type" => "yesno", "Description" => "<span style=\"color:#cc0000;font-weight:bold;\">Important!</span> Tick this checkbox only if the Reseller Selling Currency is not equal to the WHMCS Default Currency." ) ); if ($vars["first_acc_name"]) { $first_activate = array( "first_activate_second" => array( "FriendlyName" => "", "Description" => $doActivate_second ) ); } else { $first_activate = array(); } if ($vars["second_acc_name"]) { $second_account_fields = array( "second_acc" => array( "FriendlyName" => "<strong style=\"font-size:14px;\">2# Live or Demo Account</strong> <a class=\"scroll\" style=\"text-decoration:none;\" href=\"#top\">(Top)</a>" ), "second_acc_name" => array( "FriendlyName" => "Display Name", "Type" => "text", "Size" => "30", "Description" => "Set a Friendly Display Name" ), "second_domainregistrar" => array( "FriendlyName" => "Select your Registrar", "Type" => "dropdown", "Options" => $lbdropdown, "Description" => "Select only a valid LogicBoxes Registrar!" ), "second_rcauth_userid" => array( "FriendlyName" => "Reseller ID", "Type" => "text", "Size" => "8", "Description" => "Set your <strong>Reseller ID</strong> (Not the Parent ID nor the Reseller Username!)" ), "second_rcauth_apikey" => array( "FriendlyName" => "API Key", "Type" => "text", "Size" => "50", "Description" => "Set your unique Reseller API Key" ), "second_show_fundsbalance" => array( "FriendlyName" => "Disable Fundsbalance on Widget", "Type" => "yesno", "Description" => "Tick to Disable Fundsbalance Output on the widget" ), "second_ns_override" => array( "FriendlyName" => "Default Nameservers", "Type" => "text", "Size" => "120", "Description" => "<br />You can specify here upto 5 Default Nameservers, comma separated, to be used for domain register and transfer for the selected Registrar. Leave empty to use the WHMCS Default Nameserver settings.<br /><strong>Example</strong>: ns1.domain.com,ns2.domain.com,ns3.domain.com,ns4.domain.com" ), "second_transer_check" => array( "FriendlyName" => "Disable Transfer Check Cron", "Type" => "yesno", "Description" => "Tick to Disable Transfer Check Cron on this account" ), "second_hook_signup" => array( "FriendlyName" => "Disable Auto Customer Signup", "Type" => "yesno", "Description" => "Tick to Disable Customer sign up in your reseller account when register a new customer in WHMCS" ), "second_pwd_signup" => array( "FriendlyName" => "Use WHMCS Password with Signup", "Type" => "yesno", "Description" => "Tick to use the WHMCS customer password instead of a randomly generated password with the &quot;Auto Customer Signup&quot;" ), "second_hook_modify" => array( "FriendlyName" => "Disable Auto Customer Modify", "Type" => "yesno", "Description" => "Tick to Disable Customer modification in your reseller account when modify a customer in WHMCS" ), "second_pwd_modify" => array( "Frie

Thanks you,
10.gif
02-27-2015, 01:21 AM
Post: #6
RE:
Also not complete. This forum irritates the F*** out of me. I just used pastee in desperation...
https://pastee.org/r4efs
If it can be encoded, it can be decoded. If it can be decoded, it can be encoded. The circle of cryptography... Cool
02-27-2015, 01:23 AM
Post: #7
RE:
okay thanks you, rep added, check your inbox.
02-27-2015, 01:25 AM
Post: #8
RE:
:) Someone probably needs to test it as I have not done that. Was a 2 second quick look over :P
If it can be encoded, it can be decoded. If it can be decoded, it can be encoded. The circle of cryptography... Cool
02-27-2015, 01:28 AM
Post: #9
RE:
Okay dude :P
02-27-2015, 01:32 AM
Post: #10
RE:
Can you share the nulled tools of of above as even I need them
77.gif




50.gif