Subversion Repositories personal-webbase

Rev

Rev 4 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
  4.  
  5. $meldung = '';
  6.  
  7. $fehler = false;
  8.  
  9.         if ($konfiguration[$m2]['ftp-server'] == '')
  10.         {
  11.                 $meldung .= '<font color="#FF0000">Die FTP-Zugangsdaten sind falsch! Bitte korrigieren Sie diese.</font>';
  12.                 $fehler = true;
  13.                 $conn_id = null;
  14.                 $login_result = false;
  15.         } else {
  16.                 if ($konfiguration[$m2]['ftp-server'] == '') {
  17.                         $conn_id = null;
  18.                         $login_result = false;
  19.                 } else {
  20.                         $conn_id = @ftp_connect($konfiguration[$m2]['ftp-server'], $konfiguration[$m2]['ftp-port']);
  21.                         $login_result = @ftp_login ($conn_id, $konfiguration[$m2]['ftp-username'], $konfiguration[$m2]['ftp-passwort']);
  22.                 }
  23.  
  24.                 if ((!$conn_id) || (!$login_result))
  25.                 {
  26.                   $meldung .= '<font color="#FF0000">Die FTP-Zugangsdaten sind falsch! Bitte korrigieren Sie diese.</font>';
  27.                   $fehler = true;
  28.                 }
  29.         }
  30.  
  31.         if ((!$fehler) && (substr($konfiguration[$m2]['ftp-verzeichnis'], strlen($konfiguration[$m2]['ftp-verzeichnis'])-1, 1) != '/'))
  32.         {
  33.           $meldung .= '<font color="#FF0000">Das FTP-Verzeichnis muss einen abschlie&szlig;enden Slash (/) erhalten!</font>';
  34.           $fehler = true;
  35.         }
  36.  
  37.         if ((!$fehler) && (substr($konfiguration[$m2]['ftp-verzeichnis'], 0, 1) != '/'))
  38.         {
  39.           $meldung .= '<font color="#FF0000">Das FTP-Verzeichnis muss mit einem Slash (/) beginnen!</font>';
  40.           $fehler = true;
  41.         }
  42.  
  43.         if ((!$fehler) && (@ftp_size($conn_id, $konfiguration[$m2]['ftp-verzeichnis'].'modules/moddir.txt') == -1))
  44.         {
  45.           $meldung .= '<font color="#FF0000">Kann modules/moddir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</font>';
  46.           $fehler = true;
  47.         }
  48.  
  49.         if ((!$fehler) && (@ftp_size($conn_id, $konfiguration[$m2]['ftp-verzeichnis'].'design/desdir.txt') == -1))
  50.         {
  51.           $meldung .= '<font color="#FF0000">Kann design/desdir.txt nicht finden. Zeigt das FTP-Verzeichnis wirklich auf Personal WebBase?</font>';
  52.           $fehler = true;
  53.         }
  54.  
  55.         if ($fehler)
  56.         {
  57.           $meldung .= '<br><a href="'.oop_link_to_modul($m2, 'konfig', 'admin_konfig').'">Konfigurationswerte bearbeiten</a>.';
  58.         }
  59.         else
  60.         {
  61.           $meldung .= '<font color="#00BB00">Es gibt derzeit kein Problem mit den FTP-Zugangsdaten.</font>';
  62.         }
  63.  
  64.         if ($conn_id) @ftp_quit($conn_id);
  65.  
  66. ?>
  67.