<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>::RVGlobalsoft Manager::</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- CSS
================================================== -->
<link rel="stylesheet" href="./themes/css/style.css">
<link rel="stylesheet" href="./themes/css/jquery-ui.css">
<script type="text/javascript" src="themes/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="themes/js/jquery-ui-1.10.4.js"></script>
<script type="text/javascript" src="./themes/js/rvglobalsoftmanager.js"></script>
<script>
jQuery(document).ready(function(){
jQuery( document ).tooltip();
jQuery("#displayApiInfo").click(function(){
jQuery("#brdboxinfo").toggle(200);
});
jQuery("#close_brdboxinfo").click(function(){
jQuery("#brdboxinfo").toggle(200);
});
jQuery("#displayResellerAccessInfo").click(function(){
jQuery("#brdboxinfoResellerAccess").toggle(200);
});
jQuery("#close_brdboxinfoResellerAccess").click(function(){
jQuery("#brdboxinfoResellerAccess").toggle(200);
});
});
</script>
</head>
<body>
<!-- Start Header -->
<div class="toplink" align="right">
<ul>
<li><b>Server OS:</b> [% Config.ServerInfo.Os %]</li>
<li><b>Server Type:</b> [% Config.ServerInfo.serverType %]</li>
<li><b>Control Panel:</b> [% Config.ServerInfo.ControlPanelName %]</li>
<li><b>IP:</b> [% Config.ServerInfo.IpAddress %]</li>
<li><b>Perl Version:</b> [% Config.ServerInfo.perlVersion %]</li>
<li><b>PHP Version:</b> [% Config.ServerInfo.phpVersion %]</li>
</ul>
</div>
<div class="bgtop">
<span>RVGlobalSoft Manager</span>
</div>
<div class="pathwaylink">
<a href="index.cgi?" class="linkgray">Home</a> | <a href="#" class="linkgray_cur">API Manager</a>
</div>
<div align="right" class="pad10 txttop">
<div><strong>Billing Type:</strong> <span id="status_billingtype">-</span> <strong>Billing URL:</strong> <span id="status_billingurl">-</span> <strong>Billing API Allow IP:</strong> <span id="status_billingapickeck">-</span></div>
</div>
<!-- End Header -->
<div class="pad10">
<!-- Start Warning Msg -->
<div class="warningbox" id="brdboxwarning" style="display: none;">
<div class="validation_warning" id="boxwarning"> </div>
<div class="infodata" id="warningmessage"></div>
</div>
<div class="rvclear"> </div>
<!-- End Warning Msg -->
<div class="errorbox" id="errorboxBilling" style="display: none;">
<div class="validation_error"> </div>
<div class="infodata" id="errorMessage"></div>
</div>
<div class="rvclear"> </div>
</div>
<div class="pad10">
<h4 class="txttitle">API Key Setup <a href="#" id="displayApiInfo" title="Click here for display information"><img src="./themes/images/icon_info.jpg" width="20" height="21" /></a></h4>
<!-- Start Warning Msg -->
<div class="infobox" id="brdboxinfo" style="display: block;">
<span class="close_info" id="close_brdboxinfo"> </span>
<div class="validation_info"> </div>
<div class="infodata">
In order to connect with RVGlobalSoft Reseller Platform and start a transparent reselling between your clients and you,
we suggest you to connect via our APi below. There is APi for your client control panel (WHM/cPanel).
Please be noted that your email should be valid and the same as on registered with RVGlobalSoft.com.
You can find your <a href="https://rvglobalsoft.com/knowledgebase/article/7/how-to-set-api-config-on-cpanel-whm/" target="_blank">Control Panel API Key</a> in your account at RVGlobalSoft.com.
</div>
</div>
<div class="rvclear"> </div>
<!-- End Warning Msg -->
<form id="frm_form" name="frm_form" method="post" action="">
<input type="hidden" id="action" name="action" value="add" />
<div>Registered Email</div>
<div><input type="text" id="username" name="username" value="[% Api.username%]" class="inputtxt" /></div>
<div>Control Panel API Key </div>
<div><textarea id="whmpublickey" name="whmpublickey" class="boxarea"
style="width: 550px; height: 170px; padding:5px 10px;">[% Api.whmPublicKey %]</textarea></div>
</form>
[%IF Api.isRoot == 1%]
<h4 class="txttitle">Restrict Reseller Access <a href="#" id="displayResellerAccessInfo" title="Click here for display information"><img src="./themes/images/icon_info.jpg" width="20" height="21" /></a></h4>
<!-- Start Warning Msg -->
<div class="infobox" id="brdboxinfoResellerAccess" style="display: none;">
<span class="close_info" id="close_brdboxinfoResellerAccess"> </span>
<div class="validation_info"> </div>
<div class="infodata">
With your resold accounts, you can opt to either allow or restrict their access to RVGlobalSoft's Reseller Platform.
If allowed, their will resell the products via your accounts and you get commission payback while being transparent in the transaction process. </div>
</div>
<div class="rvclear"> </div>
<!-- End Warning Msg -->
<div>Allow your reseller to whether access RVGlobalSoft's billing system?</div>
<div style="margin:10px 0;">
<select name="res_accres" id="res_accres">
<option value="1" [%IF Api.restrictReseller == 1%]selected[%END%]>Yes</option>
<option value="0" [%IF Api.restrictReseller != 1%]selected[%END%]>No</option>
</select>
</div>
[%END%]
<p><input type="button" name="but_save" id="but_save" value="Update setting" class="btnlink" /></p>
</div><!-- pad10 -->
<div id="dialog" style="display: none;">
<div class="errorbox" id="ajaxApiError" style="display: none;">
<div class="validation_error"> </div>
<div class="infodata"><div class="message" id="messageError"></div></div>
</div>
<div class="rvclear"> </div>
<div class="successbox" id="ajaxApiSuccess" style="display: none;">
<div class="validation_success"> </div>
<div class="infodata"><div class="message" id="ajaxApiSuccess"></div></div>
</div>
<div class="rvclear"> </div>
<ul>
<li>Verifying API Key <span id="status_verifywhmapikey"></span></li>
<li>Testing access API <span id="status_testwhmapikey"></span></li>
<li>Registering Server <span id="status_registyhost"></span></li>
<li>Finishing<span id="status_finish"></span></li>
</ul>
<button id="dialog-close" type="button">Close</button>
</div>
<script type="text/javascript">
//===================== Menu Bar ========================//
[%IF Api.isSetupApiKey%]
displayStayusBar('billingtype', 'loading');
displayStayusBar('billingurl', 'loading');
displayStayusBar('billingapickeck', 'loading');
call_ajaxCallback({action: 'testwhmapikey'}, 'ajax_processBar');
call_ajaxCallback({action: 'getbillinginfo'}, 'billing_info');
[%END%]
function call_ajaxCallback(data, callback)
{
displayStayusBar(data['action'], 'loading');
currentAction = data['action'];
jQuery.ajax({
type: 'POST',
url: "[% Config.baseUrl %]/cgi/rvglobalsoft/index.cgi?/rvglobalsoft/apikeysetup",
data: data,
success: function(data) {
eval(callback + '(data);');
},
error: function(jqXHR, textStatus, errorThrown){
jQuery( '#brdboxwarning' ).hide();
jQuery( '#errorboxBilling' ).show();
jQuery( '#errorMessage' ).html("Error : " + jqXHR.status + " " + jqXHR.statusText);
}
});
}
function billing_info(data)
{
if (data.status == 'success') {
if (data.data.billing_version != undefined) {
jQuery( '#status_billingtype').html(data.data.billing_type + ' v.' + data.data.billing_version);
} else {
displayStayusBar('billingtype', 'error');
}
if (data.data.billing_url != undefined) {
jQuery( '#status_billingurl').html(data.data.billing_url);
} else {
displayStayusBar('billingurl', 'error');
}
if (data.data.billing_allow_ip_status != undefined ) {
if (data.data.billing_allow_ip_status == '1') {
jQuery( '#status_billingapickeck').html('Yes, allow IP ' + data.data.remote_ip);
} else {
displayStayusBar('billingapickeck', 'error');
jQuery( '#brdboxwarning' ).show();
jQuery( '#warningmessage').html( 'Your billing <font color="red">NOT</font> allow IP "' + data.data.remote_ip
+ '". Please goto your admin billing "General Settings > Security".');
}
} else {
displayStayusBar('billingapickeck', 'error');
}
} else {
displayStayusBar('billingtype', 'error');
displayStayusBar('billingurl', 'error');
displayStayusBar('billingapickeck', 'error');
}
}
function ajax_processBar(data)
{
if (data['ON_ERROR'] == "true") {
raiseErrorDisplay(data["ERROR"]);
} else {
if (data["status"] == "error") {
displayStayusBar(data['action'], 'error');
raiseErrorDisplay(data["message"]);
} else if (data["status"] == "callnext") {
displayStayusBar(data["action"], 'complete');
}
}
}
function displayStayusBar(id, status) {
if (status == 'loading') {
img = '<img src="./themes/images/loading.gif" />';
} else if (status == 'error') {
img = '<font color="red">Inactive</font>';
} else {
img = '<font color="green">Active</font>';
}
jQuery( '#status_' + id).html(img);
}
function raiseErrorDisplay(msg)
{
jQuery( '#ajaxApiSuccess' ).hide();
jQuery( '#ajaxApiError' ).show();
jQuery( '#messageError' ).html('<p class=\"message-error">' + msg + '</p>');
jQuery(".ui-dialog-titlebar-close").show();
}
//===================== Form Update ========================//
jQuery( '#dialog-close' ).click(function(){
clearDialog();
jQuery( '#dialog' ).dialog('close');
location = '[%O.makeUrl("","rvglobalsoft","")%]';
});
jQuery( '#but_save' ).click(function() {
if(jQuery('#username').val() == ''){
alert('Please input Registered Email.');
}else if (jQuery('#whmpublickey').val() == '') {
alert('Please input Control Panel API Key.');
} else {
clearDialog();
doSaveRestrictReseller();
//return true;
jQuery( '#dialog' ).dialog({
title: "Processing...",
width: '600px',
closeOnEscape: true
}).parent().find(".ui-dialog-titlebar-close").hide().end().end();
call_ajax({ action : 'verifywhmapikey',username: jQuery('#username').val(),whmpublickey: jQuery('#whmpublickey').val(),resAccress: jQuery('#res_accres').val()});
}
});
function call_ajax(data)
{
displayStayus(data['action'], 'loading');
currentAction = data['action']
jQuery.ajax({
type: 'POST',
url: "[% Config.baseUrl %]/cgi/rvglobalsoft/index.cgi?/rvglobalsoft/apikeysetup",
data: data,
success: function(data) {
if(typeof data == "string"){
data = JSON.parse(data);
}
ajax_process(data);
},
error: function(jqXHR, textStatus, errorThrown){
displayStayus(currentAction,'error');
raiseErrorDisplay("Error : " + jqXHR.status + " " + jqXHR.statusText);
}
});
}
function objToString (obj) {
var str = '';
for (var p in obj) {
if (obj.hasOwnProperty(p)) {
str += p + '::' + obj[p] + '\n';
}
}
return str;
}
function reseller_Access ()
{
}
function ajax_process(data)
{
if (data['ON_ERROR'] == "true") {
raiseError(data["ERROR"]);
} else {
if (data["status"] == "error") {
displayStayus(data['action'], 'error');
raiseError(data["message"]);
} else if (data["status"] == "callnext") {
displayStayus(data["action"], 'complete');
if (data["nextaction"] == 'end') {
displayStayus('finish', 'complete');
jQuery( '#ajaxApiSuccess' ).css('display','inline');
jQuery( '#dialog .message' ).html('<p class=\"message-success">API key successfully updated</p>');
jQuery( '#dialog-close' ).show();
//clearDialog();
//jQuery( '#dialog' ).dialog('close');
} else {
call_ajax({action: data["nextaction"]});
}
}
}
}
function displayStayus(id, status) {
if (status == 'loading') {
img = '<img src="./themes/images/loading.gif" />';
} else if (status == 'error') {
img = '<img src="./themes/images/disable.gif" />';
} else {
img = '<img src="./themes/images/enabled.gif" />';
}
jQuery( '#dialog #status_' + id).html(img);
}
clearDialog();
function clearDialog()
{
jQuery( '#dialog #status_verifywhmapikey' ).html('');
jQuery( '#dialog #status_testwhmapikey' ).html('');
jQuery( '#dialog #status_registyhost' ).html('');
jQuery( '#dialog #status_finish' ).html('');
jQuery( '#dialog .message' ).html('');
jQuery( '#dialog-close' ).hide();
jQuery( '#ajaxApiSuccess' ).hide();
jQuery( '#ajaxApiError' ).hide();
}
function raiseError(msg)
{
//jQuery( '#dialog .message' ).html('<p class=\"message-error">' + msg + ' <br /> How to get api key <a href="https://rvglobalsoft.com/index.php?cmd=clientarea&rvaction=apikey">Click..</a>' + '</p>');
jQuery( '#dialog .message' ).html('<p class=\"message-error">API Key is incorrect or missing. <br />Please get your API Key <a href="https://rvglobalsoft.com/index.php?cmd=clientarea&rvaction=apikey">Here</a> , and paste it in this page again.</p>');
jQuery( '#dialog-close' ).show();
jQuery(".ui-dialog-titlebar-close").show();
}
</script>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez