$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 "\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);
}
}
}
?>