mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
#18896651 : better handling for safemode=on case
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7466 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
78933e2e0d
commit
45dba7b1fd
15 changed files with 225 additions and 23 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<h2 class="xeAdmin">{$lang->ftp_form_title}</h2>
|
||||
|
||||
<blockquote>{$lang->about_ftp_info}</blockquote>
|
||||
<blockquote>{$lang->msg_safe_mode_ftp_needed}</blockquote>
|
||||
|
||||
<table cellspacing="0" class="tableType7">
|
||||
<col width="100" />
|
||||
|
|
@ -14,17 +14,34 @@
|
|||
|
||||
<!-- FTP 정보 -->
|
||||
<tr>
|
||||
<th rowspan="3" scope="row" class="hr"><label for="radio2">{$lang->ftp}</label></th>
|
||||
<th rowspan="6" scope="row" class="hr"><label for="radio2">{$lang->ftp}</label></th>
|
||||
<th class="second" scope="row"><label for="textfield20">{$lang->ftp_host}</label></th>
|
||||
<td><input type="text" id="textfield20" name="ftp_host" value="127.0.0.1" class="inputTypeText" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="second" scope="row"><label for="textfield21">{$lang->user_id}</label></th>
|
||||
<td><input type="text" id="textfield21" name="ftp_user" value="" class="inputTypeText" /></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="second" scope="row"><label for="textfield22">{$lang->password}</label></th>
|
||||
<td><input id="textfield22" type="password" name="ftp_password" class="inputTypeText" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="second hr" scope="row"><label for="textfield24">{$lang->ftp_port}</label></th>
|
||||
<td class="hr"><input id="textfield24" type="text" name="ftp_port" value="21" class="inputTypeText" /></td>
|
||||
<th class="second" scope="row"><label for="textfield24">{$lang->ftp_port}</label></th>
|
||||
<td><input id="textfield24" type="text" name="ftp_port" value="21" class="inputTypeText" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="second hr" scope="row" rowspan="2"><div>{$lang->msg_ftp_installed_ftp_realpath}<br /><br/>{$lang->msg_ftp_installed_realpath}:<br/> {_XE_PATH_}</div></th>
|
||||
<td>
|
||||
<input type="text" name="ftp_root_path" value="{$ftp_info->ftp_root_path}" class="inputTypeText w400" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="ftplist">
|
||||
<td class="hr">
|
||||
<div>
|
||||
<span class="button blue strong"><input type="button" onclick="getFTPList(); return false;" value="{$lang->ftp_get_list}"></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,3 +36,75 @@ function completeInstallCheckFtpInfo(ret_obj) {
|
|||
function completeFtpPath(ret_obj){
|
||||
location.reload();
|
||||
}
|
||||
|
||||
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('install', 'getInstallFTPList', params, completeGetFtpInfo, ['list', 'error', 'message'], params, form);
|
||||
}
|
||||
|
||||
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']))
|
||||
{
|
||||
ret_obj['list']['item'] = [ret_obj['list']['item']];
|
||||
}
|
||||
|
||||
pwd = jQuery("#ftp_form").get(0).ftp_root_path.value;
|
||||
if(pwd != "/")
|
||||
{
|
||||
arr = pwd.split("/");
|
||||
arr.pop();
|
||||
arr.pop();
|
||||
arr.push("");
|
||||
target = arr.join("/");
|
||||
list = list + "<li><a href='#ftpSetup' onclick=\"getFTPList('"+target+"')\">../</a></li>";
|
||||
}
|
||||
|
||||
for(var i=0;i<ret_obj['list']['item'].length;i++)
|
||||
{
|
||||
var v = ret_obj['list']['item'][i];
|
||||
if(v == "../")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if( v == "./")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
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