ja, tut mir leid. das login formular von dem $_SESSION['csl'] stammt:
<?php
if (isset($_POST['submit']) && isset($_POST['csl'])){
$conn = ldap_connect("xxxxxxx");
var_dump($conn);
if ($conn) {
$result = ldap_search($conn, " ", "log=".$_POST['csl']);
$entry = ldap_first_entry($conn, $result);
$dn = ldap_get_dn($conn,$entry);
If ($dn) {
if ($_POST['pswd'] == "") {
echo "Insert password.";
}else{
$bind = ldap_bind($conn, $dn, $_POST['pswd']);
If ($bind) {
//login succesfull
session_start();
$_SESSION['csl'] = $_POST['csl'];
$_SESSION['dn'] = $dn;
$profiles = file("users/user.rights");
foreach($profiles as $user_profile) {
If(strstr($user_profile, $_POST['csl'])){
$rights = substr($user_profile, strlen($_POST['csl']."#;#"), strlen($user_profile));
$rights = explode(";", trim($rights));
foreach($rights as $right) {
$_SESSION[$right] = TRUE;
};
};
};
header("Location: index.php");
}else{
echo "Password incorrect.";
};
};
}else{
echo "User ".$_POST['csl']." does not exist.";
};
}else{
echo "<h4>Connection to LDAP Server failed.</h4>";
};
};
?>
<html>
<head>
<TITLE>Login</TITLE>
<LINK rel="stylesheet" type="text/css" href="../JavaScripts/style.css">
</head>
<body>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'];?>">
<table align="center" border="1" rules="none">
<tr>
<td>CSL:</td>
<td><input type="text" name="csl"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="pswd"></td>
</tr>
<td>
<td align="center" colspan="2"><input type="submit" name="submit" value="Login"></td>
</td>
</form>
</body>
</html>
-----------------
das formular (html quellcode) das schwierigkeiten macht (gekürzt):
<html>
<head>
<TITLE>Upload</TITLE>
<LINK rel="stylesheet" type="text/css" href="../../JavaScripts/style.css">
<script language="JavaScript1.2" src="../../JavaScripts/tree.js" type="text/javascript"></script>
</head>
<BODY>
<form enctype="multipart/form-data" action="upload/index.php" method="post" name="Upload">
<fieldset>
<legend><b>Upload File to:</b></legend>
<ul style="list-style-type:none">
<li><input type="radio" name="dir" value="Processes">Processes
<legend><b>File:</b></legend>
File: <input name="file" type="file">
<input type="submit" name="submit" value="Upload">
</fieldset>
</form>
</body>
</html>
den php code dazu sieht man ja oben, zur formular verarbeitung kommt der code garnicht, eben weil $_SESSION['csl'] leer ist.