|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/public_html/shopsite-images/en-US/javascript/ |
Upload File : |
/*************************************************************************
*
* AJAX
*
*************************************************************************/
var xmlHttp = null;
function GetXmlHttpObject()
{
try
{
xmlHttp = new XMLHttpRequest();
}
catch(e)
{
try
{
xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
}
catch(e)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
/*************************************************************************
*
* do_action
*
*************************************************************************/
function do_action(action)
{
var storeid = document.getElementById('storeid');
var url = 'diagnose.cgi?function=' + action;
switch (action)
{
case check_status:
var pathname = document.getElementById('pathname');
url += '&pathname=' + encodeURIComponent(pathname.value);
break;
case test_email:
var to = document.getElementById('to');
var cc = document.getElementById('cc');
var from = document.getElementById('from');
var subject = document.getElementById('subject');
var message = document.getElementById('message');
var reply_to = document.getElementById('reply_to');
var errors_to = document.getElementById('errors_to');
url += '&to=' + encodeURIComponent(to.value);
url += '&cc=' + encodeURIComponent(cc.value);
url += '&from=' + encodeURIComponent(from.value);
url += '&subject=' + encodeURIComponent(subject.value);
url += '&message=' + encodeURIComponent(message.value);
url += '&reply_to=' + encodeURIComponent(reply_to.value);
url += '&errors_to=' + encodeURIComponent(errors_to.value);
break;
case ip_lookup:
var hostname = document.getElementById('hostname');
url += '&hostname=' + encodeURIComponent(hostname.value);
break;
case check_connect:
var port = document.getElementById('port');
var hostname = document.getElementById('connect_name');
url += '&hostname=' + encodeURIComponent(hostname.value);
url += '&port=' + encodeURIComponent(port.value);
break;
}
url += '&storeid=' + encodeURIComponent(storeid.value);
url += '&access_token=' + encodeURIComponent(access_token);
url += '&sid=' + Math.random();
results_id = 'results_' + action;
xmlHttp = GetXmlHttpObject();
xmlHttp.onreadystatechange = show_results;
xmlHttp.open("GET", url, false); // synchronous
xmlHttp.send(null);
return false;
}
/*************************************************************************
*
* show_results
*
*************************************************************************/
function show_results()
{
if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
{
var results_div = document.getElementById(results_id);
results_div.innerHTML = xmlHttp.responseText;
results_div.style.display = '';
}
return false;
}
/*************************************************************************
*
* clear_results
*
*************************************************************************/
function clear_results(id)
{
var results_div = document.getElementById('results_' + id);
results_div.style.display = 'none';
results_div.innerHTML = '';
return false;
}