$f) { if ( ($i != "uname") && ($i != "pw") && ($i != "db") && ($i != "login") && ($i != "TUTOS") ) { # $this->addHidden($i,$f); if (!is_array($f)) { $this->gotourl= addUrlParameter($this->gotourl,$i."=".UrlEncode($f)); } else { foreach ($f as $i2 => $f2) { $this->gotourl = addUrlParameter($this->gotourl,$i."[]=".UrlEncode($f2)); } } } } } if ( count($_POST) ) { foreach ($_POST as $i => $f) { if ( ($i != "uname") && ($i != "pw") && ($i != "db") && ($i != "login") && ($i != "TUTOS") ) { if (!is_array($f)) { $this->addHidden($i,$f); } else { foreach ($f as $i2 => $f2) { $this->addHidden($i."[]",$f2); } } } } } #echo "\n"; #echo "\n\n"; #echo "
\n"; #echo "
gotourl ."\" method=\"post\">\n"; #DoubleTableStart(); #echo "\n"; #echo " ". $lang['PleaseLogin'] .(( $tutos[authtype] == "x509" ) ? " (".$lang['Certificate'].")" : "" )."\n"; #echo "\n"; #echo $this->showfieldc($lang['Username'],0,"uname"); if ( $tutos[authtype] == "x509") { #echo " \n"; } else { #echo " \n"; } #echo "\n"; #echo $this->showfieldc($lang['Password'],0,"pw"); if ( $tutos[authtype] == "x509") { #echo " "; } else { #echo " "; } if ( $this->db > -1 ) { #$this->addHidden("dbnr",$this->db); #echo "\n"; } else { $db = ""; if ( count($tutos[dbname]) > 1 ) { #echo "\n\n"; #echo $this->showfieldc($lang['DB'],0,"dbnr"); #echo " \n"; } else { $this->addHidden("dbnr","0"); #echo "\n"; } } #echo "\n"; #echo "\n"; #echo " \n"; #echo " "; $m = make_helplink("login"); #echo sprintf ("%s",$m,"",myentities($lang['HelpInfo'],1),myentities($lang['HelpInfo']),$lang['Help']); #echo " \n"; #echo "\n"; if ( $tutos[pwlostsupport] > 0 ) { #echo "\n"; #echo " \n"; #echo "\n"; } #DoubleTableEnd(); #echo $this->getHidden(); #hiddenFormElements(); #echo "
\n"; #echo "
\n"; echo $this->setFocus("login.uname"); # Display mesage of today if ( is_readable(getcwd()."/".$tutos['base'] ."/html/motd.html") || is_executable(getcwd()."/".$tutos['base'] ."/html/motd.html")) { echo "

\n"; echo "

\n"; DoubleTableStart(); echo "". $lang['MOTD'] ."\n"; echo "
\n";
       if ( is_executable(getcwd()."/".$tutos['base'] ."/html/motd.html") ) {
         @system ($tutos['base'] ."/html/motd.html");
       } else {
         #@readfile (getcwd()."/".$tutos['base'] ."/html/motd.html");
         if ($fd = fopen (getcwd()."/".$tutos['base'] ."/html/motd.html", "rb")) {
           fpassthru($fd);
         }
       }
       echo "
\n"; DoubleTableEnd(); echo "
\n"; } } /** * */ function navigate() { } /** * */ function prepare() { global $msg,$lang,$tutos; $this->nomenu = true; $this->name = $lang['Login']; $this->format = "html"; if ( !isset($this->gotourl) ) { $this->gotourl = $_SERVER['HTTP_REFERER']; } $x = strpos($this->gotourl,"?"); if ( $x != "" ) { $this->gotourl = substr($this->gotourl,0,$x); } if ( isset($_POST['db']) ) { $this->db = $_POST['db']; } else if ( isset($_GET['db']) ) { $this->db = $_GET['db']; } else if ( isset($_POST['dbnr']) ) { $this->db = $_POST['dbnr']; } else if ( isset($_GET['dbnr']) ) { $this->db = $_GET['dbnr']; } else { $this->db = -1; } # # Primary Check # if ( ! minimum_version(minimumversion) ) { $msg .= "
\nSorry TUTOS needs a PHP Version >= ". minimumversion ."
\n"; $msg .= "you are using ". phpversion() ."
\n"; $this->stop = true; } if ( ! ereg( "^([0-9]{4})-([0-1][0-9])-([0-9]{2}) ([0-2][0-9]):([0-5][0-9]):([0-5][0-9])$", "2001-12-13 13:21:56", $regs ) ) { $msg .= "Sorry your apache regex library does not work as it should
\n"; $msg .= "Look here for Regex Library. It should tell you \"Bundled library enabled\" or \"System library enabled\"
\n"; $msg .= "To change it you should recompile your PHP Module with the \"--with-regex=php\" flag on \"configure\"
\n"; $this->stop = true; } if ( !isset($tutos[authtype]) ) { $msg .= "no authtype set
add a line:\n"; $msg .= " $tutos[authtype] = \"db\";
\n"; $msg .= "to your config and/or read config_default.pinc\n"; $this->stop = true; } # It is useless to jump again to logout $x = strpos($this->gotourl,"logout.php"); if ( $x != "" ) { $this->gotourl = substr($this->gotourl,0,$x); } } } ?>