mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6931 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
aa55cfdae5
commit
f7cbed05d2
2 changed files with 9 additions and 37 deletions
9
modules/admin/tpl/filter/install_ftp_path.xml
Normal file
9
modules/admin/tpl/filter/install_ftp_path.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<filter name="install_ftp_path" module="install" act="procInstallAdminSaveFTPInfo" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="ftp_root_path" required="true" />
|
||||
</form>
|
||||
<response callback_func="completeFtpPath">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?
|
||||
/**
|
||||
* @class installAdminModel
|
||||
* @author sol (ngleader@gmail.com)
|
||||
* @brief install 모듈의 admin model class
|
||||
**/
|
||||
|
||||
class installAdminModel extends install{
|
||||
|
||||
function getFtpDir(){
|
||||
$pwd = Context::get('pwd');
|
||||
if(!$pwd) $pwd = '/';
|
||||
|
||||
Context::set('pwd',$pwd);
|
||||
require_once(_XE_PATH_.'libs/ftp.class.php');
|
||||
|
||||
$ftp_info = Context::getFTPInfo();
|
||||
$oFtp = new ftp();
|
||||
if(!$oFtp->ftp_connect('localhost', $ftp_info->ftp_port)) return new Object(-1,'msg_ftp_not_connected');
|
||||
if(!$oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) {
|
||||
$oFtp->ftp_quit();
|
||||
return new Object(-1,'msg_ftp_invalid_auth_info');
|
||||
}
|
||||
|
||||
$_list = $oFtp->ftp_rawlist($pwd);
|
||||
$oFtp->ftp_quit();
|
||||
$list = array();
|
||||
if($_list){
|
||||
foreach($_list as $k => $v){
|
||||
if(strpos($v,'d') === 0) $list[] = substr(strrchr($v,' '),1) . '/';
|
||||
}
|
||||
}
|
||||
|
||||
$this->add('list',$list);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue