mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
#18532365 : remove storing ftp_password.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7156 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ddfa2f6df1
commit
c43d52da74
27 changed files with 373 additions and 291 deletions
|
|
@ -1,5 +1,42 @@
|
|||
function getFTPList(pwd)
|
||||
{
|
||||
var form = jQuery("#ftp_form").get(0);
|
||||
if(typeof(pwd) != 'undefined')
|
||||
{
|
||||
form.ftp_root_path.value = pwd;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!form.ftp_root_path.value)
|
||||
{
|
||||
if(typeof(form.sftp) != 'undefined' && form.sftp.checked) {
|
||||
form.ftp_root_path.value = xe_root;
|
||||
}
|
||||
else
|
||||
{
|
||||
form.ftp_root_path.value = "/";
|
||||
}
|
||||
}
|
||||
}
|
||||
var params={}, data=jQuery("#ftp_form").serializeArray();
|
||||
jQuery.each(data, function(i, field){ params[field.name] = field.value });
|
||||
exec_xml('admin', 'getAdminFTPList', params, completeGetFtpInfo, ['list', 'error', 'message'], params, form);
|
||||
}
|
||||
|
||||
function removeFTPInfo()
|
||||
{
|
||||
var params = {};
|
||||
exec_xml('install', 'procInstallAdminRemoveFTPInfo', params, filterAlertMessage, ['error', 'message'], params);
|
||||
}
|
||||
|
||||
function completeGetFtpInfo(ret_obj)
|
||||
{
|
||||
if(ret_obj['error'] != 0)
|
||||
{
|
||||
alert(ret_obj['error']);
|
||||
alert(ret_obj['message']);
|
||||
return;
|
||||
}
|
||||
var e = jQuery("#ftplist").empty();
|
||||
var list = "";
|
||||
if(!jQuery.isArray(ret_obj['list']['item']))
|
||||
|
|
@ -7,6 +44,7 @@ function completeGetFtpInfo(ret_obj)
|
|||
ret_obj['list']['item'] = [ret_obj['list']['item']];
|
||||
}
|
||||
|
||||
pwd = jQuery("#ftp_form").get(0).ftp_root_path.value;
|
||||
if(pwd != "/")
|
||||
{
|
||||
arr = pwd.split("/");
|
||||
|
|
@ -14,7 +52,7 @@ function completeGetFtpInfo(ret_obj)
|
|||
arr.pop();
|
||||
arr.push("");
|
||||
target = arr.join("/");
|
||||
list = list + "<li><a href='"+current_url.setQuery('pwd',target)+"#ftpSetup'>../</a></li>";
|
||||
list = list + "<li><a href='#ftpSetup' onclick=\"getFTPList('"+target+"')\">../</a></li>";
|
||||
}
|
||||
|
||||
for(var i=0;i<ret_obj['list']['item'].length;i++)
|
||||
|
|
@ -30,10 +68,10 @@ function completeGetFtpInfo(ret_obj)
|
|||
}
|
||||
else
|
||||
{
|
||||
list = list + "<li><a href='"+current_url.setQuery('pwd',pwd+v)+"#ftpSetup'>"+v+"</a></li>";
|
||||
list = list + "<li><a href='#ftpSetup' onclick=\"getFTPList('"+pwd+v+"')\">"+v+"</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
list = "<td><ul>"+list+"</ul></td>";
|
||||
e.append(jQuery(list));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue