Ejemplo n.º 1
0
    ?>
" size="50"></td>
	 </tr>
	 </tr>
	  <td class="ubox" colspan="2" align="center"><input type="submit" value="<?php 
    echo $lang->phrase('admin_test_ftp_connection');
    ?>
" /></td>
	 </tr>
	</table>
	</form>
	<?php 
    echo foot();
} elseif ($job == 'ftp2') {
    require_once "classes/ftp/class.ftp.php";
    require_once "classes/ftp/class.ftp_" . pemftp_class_module() . ".php";
    $temp = array('ftp_server' => $gpc->get('ftp_server', none), 'ftp_port' => $gpc->get('ftp_port', int), 'ftp_user' => $gpc->get('ftp_user', none), 'ftp_pw' => $gpc->get('ftp_pw', none), 'ftp_path' => $gpc->get('ftp_path', none, DIRECTORY_SEPARATOR));
    $error = false;
    $dataGiven = count(array_unique($temp)) == 5;
    if ($dataGiven) {
        ob_start();
        $ftp = new ftp(true, true);
        if (!$ftp->SetServer($temp['ftp_server'], $temp['ftp_port'])) {
            $error = 'admin_server_port_invalid';
        } else {
            if (!$ftp->connect()) {
                $error = 'admin_cannot_connect_to_ftp_server';
            } else {
                if (!$ftp->login($temp['ftp_user'], $temp['ftp_pw'])) {
                    $ftp->quit();
                    $error = 'admin_cannot_authenticate_at_ftp_server';
<?php

if (!class_exists('ftp')) {
    require_once realpath(dirname(__FILE__)) . "/ftp/class.ftp.php";
    require_once realpath(dirname(__FILE__)) . "/ftp/class.ftp_" . pemftp_class_module() . ".php";
}
class filesystem
{
    var $server;
    var $port;
    var $user;
    var $pw;
    var $ftp;
    var $connected;
    var $installed_path;
    function filesystem($server, $user, $pw, $port = 21)
    {
        $this->server = $server;
        $this->port = $port;
        $this->user = $user;
        $this->pw = $pw;
        $this->installed_path = '/';
        $this->connected = false;
    }
    function set_wd($path)
    {
        $this->installed_path = $path;
    }
    function init()
    {
        if ($this->connected) {
Ejemplo n.º 3
0
<?php

$dataGiven = false;
include 'data/config.inc.php';
if (!empty($config['ftp_server'])) {
    require_once "install/classes/ftp/class.ftp.php";
    $pemftp_class = pemftp_class_module();
    if ($pemftp_class !== null) {
        require_once "install/classes/ftp/class.ftp_{$pemftp_class}.php";
        $ftp = new ftp(false, false);
        if ($ftp->SetServer($config['ftp_server'], $config['ftp_port'])) {
            if ($ftp->connect()) {
                if ($ftp->login($config['ftp_user'], $config['ftp_pw'])) {
                    if ($ftp->chdir($config['ftp_path']) && $ftp->file_exists('data/config.inc.php')) {
                        $dataGiven = true;
                    }
                }
            }
            $ftp->quit();
        }
    }
}
?>
<div class="bbody">
<p>
Before we start the automatic update (file updates, updating CHMODs), you have to read the manual update instructions.
Please follow the steps and do the tasks.
More Information:
<?php 
if (file_exists('_docs/readme.txt')) {
    ?>
<?php

if (!class_exists('ftp')) {
    if (is_dir("classes/ftp/")) {
        require_once "classes/ftp/class.ftp.php";
        require_once "classes/ftp/class.ftp_" . pemftp_class_module() . ".php";
    } else {
        $path = realpath(dirname(__FILE__));
        require_once "{$path}/ftp/class.ftp.php";
        require_once "{$path}/ftp/class.ftp_" . pemftp_class_module() . ".php";
    }
}
class filesystem
{
    var $server;
    var $port;
    var $user;
    var $pw;
    var $ftp;
    var $connected;
    var $installed_path;
    function filesystem($server, $user, $pw, $port = 21)
    {
        $this->server = $server;
        $this->port = $port;
        $this->user = $user;
        $this->pw = $pw;
        $this->installed_path = '/';
        $this->connected = false;
    }
    function set_wd($path)