Hallo nochmal
Alos so:
<?
session_start();include "var.inc.php";
Also auf der ersten Seite klappts nun. Das gleiche Problem hab ich aber auf der Datei login.php und wenn ich da den "include" ans Ende zieh, läufts nimmer. Also scheint die Include-Datei gebraucht zu werden, ich seh darin aber net wirklich was, was hier an den Browser zurückgegeben wird. Oder irre ich mich da?
Das steht in der login.php
---------------------
<?
include "var.inc.php";
if ( (!empty($fuser)) and (!empty($fpswd)) and ($fuser==$adm_user) and ($fpswd==$adm_pswd) ){
$login=$adm_user."|".$adm_pswd;
session_register(login);
header("location:adm_gallery.php");
}
if ( (empty($login)) or ($login<>$adm_user."|".$adm_pswd) ){
echo "<style><!--\n";
echo "BODY {font-family:tahoma; font-size:12px}\n";
echo "TD {font-family:tahoma; font-size:12px}\n";
echo "INPUT {font-family:tahoma; font-size:12px}\n";
echo "--></style>\n";
echo "<title>r-GALLERY</title>\n";
echo "<p align=center><font style="font-size:20px">r-GALLERY ADMIN LOGIN</font></p>";
echo "<form action='$PHP_SELF' method='post'>";
echo "<p align=center>";
echo "Username:<br><input name=fuser>";
echo "<br>Password:<br><input type=password name=fpswd>";
echo "<br><input type=submit value=LOGIN>";
echo "<br>Username : $adm_user<br>Password : $adm_pswd";
echo "</p>";
echo "</form>";
}
?>
--------------------------
Und so schaut die "var.inc.php" aus:
--------------------------
<?
$fold="galimg/";
$data=$fold."data.txt"; // file data
$maxchar=750; // maximum characters for description
$allow_post="y"; // Allow posting from Gallery Page
$adm_user="demo"; // ADMIN USER
$adm_pswd="1234"; // ADMIN PASSWORD
function conv_asc2html($str,$mode){
if ($mode==1){
$str=str_replace(">",">",$str);
$str=str_replace("<","<",$str);
$str=str_replace(""",'"',$str);
}
if ($mode==2){
$str=str_replace(">",">",$str);
$str=str_replace("<","<",$str);
$str=str_replace('"',""",$str);
}
$str=ltrim($str);
$str=rtrim($str);
return $str;
}
function splitwordx(&$text,$w_max,$w_cut){
if (!strstr($text," ")){ $text=$text." "; }
$word = explode(" ", $text);
if (empty($w_max)){ $w_max=10; }
if (empty($w_cut)){ $w_cut=10; }
for ($w=0; $w<count($word); $w++){
$wordlen=strlen($word[$w]);
if ($wordlen>$w_max){
$wordnew="";
$wordpart="";
for ($l=0; $l<ceil($wordlen/$w_cut); $l++){
$wordpart[$l]=substr($word[$w],($l*$w_cut),$w_cut)." ";
}
$wordnew=implode(" ",$wordpart);
$word[$w]=$wordnew;
}
}
$text = implode(" ", $word);
return $text;
}
function disperr($str){
echo "<table border=1 cellspacing=0 cellpadding=10 style="border-collapse:collapse" bordercolor=#FFCCCC bgcolor=#FFEEEE><tr><td><font color=#FF0000 style="font-size:14px"><b>Page Error :<br>$str</td></tr></table>\n";
}
?>
--------------------------
Könnt ihr nochmal sagen, was ich da net checke?