Exemplo n.º 1
0
 $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';
             } else {
                 if (!$ftp->chdir($temp['ftp_path']) || !$ftp->file_exists('data/config.inc.php')) {
                     $ftp->quit();
                     $lang->assign('ftp_path', $temp['ftp_path']);
                     $error = 'admin_ftp_directory_does_not_exist';
                 }
             }
         }
     }
     $log = ob_get_contents();
     ob_end_clean();
 }
 echo head();
 if ($error === false) {
     $c->getdata();
     $c->updateconfig('ftp_server', str, $temp['ftp_server']);
     $c->updateconfig('ftp_user', str, $temp['ftp_user']);
Exemplo n.º 2
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')) {
    ?>