| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Benutzer Registriert seit: 17.02.2005
Beiträge: 57
![]() | Code: <?php
session_start();
$include_dat = $_GET['nummer'];
if ($include_dat == ""){
$include_dat = "1";
}
$title_der_file = file($include_dat);
echo $title_der_file[0];
if($_GET["logout"] == 1)
{
$_SESSION["login_erfolgreich"] = 0;
}
?>
</h2>
</div>
<div id="navBarL">
<div align="center">
<?php
$include_dat = $_GET['nummer'];
if ($include_dat == ""){
$include_dat = "1";
}
$file_links = file($include_dat);
$links_zahl = $file_links[1];
settype($links_zahl,"integer");
echo "<div id=\"sectionLinks\">";
if ($links_zahl > 0)
{
echo "<h3>Unterseiten</h3>";
}
echo "<ul>";
for ($temp = 2; $temp < ($links_zahl * 2) + 2; $temp += 2)
{
echo "<a href=\"index.php?site=".$file_links[$temp+1]."&nummer=".$include_dat."\">".$file_links[$temp]."</a>";
}
echo "[/list]";
echo "</div>";
/*for ($temp = 1; $temp <= $links_zahl; $temp += 2)
{
echo $file_links[$temp];
echo $file_links[$temp + 1];
}*/
?>
</p>
<hr />
<?php
if($_SESSION["login_erfolgreich"] == 0)
{
echo "<form action=\"\" method=\"post\" name=\"form1\" class=\"Stil10\" id=\"form1\">";
echo "<div align=\"center\">";
echo "<table width=\"100%\" border=\"0\">";
echo "<tr>";
echo "<td width=\"45%\">Name:</td>";
echo "<td width=\"55%\"><input name=\"benutzername\" type=\"text\" id=\"benutzername\" value=\"Name\" size=\"10\" maxlength=\"200\" /></td>";
echo "</tr>";
echo "<tr>";
echo "<td>Passwort:</td>";
echo "<td><input name=\"passwort\" type=\"password\" id=\"passwort\" onblur=\"Passwort\" value=\"Passwort\" size=\"10\" maxlength=\"200\" /></td>";
echo "</tr>";
echo "</table>";
echo "<input name=\"login\" type=\"submit\" id=\"login\" value=\"Einloggen\" />";
echo "
";
echo "<a href=\"index.php?site=registrieren.php&nummer=1 \">Registrieren</a> | <a href=\"index.php?site=pwvergessen.php&nummer=1\ ">PW vergessen</a> </div>";
echo "</form>";
}
else
{
echo "Hallo ".$_SESSION["log_benutzer_name"];
echo "
";
echo "<a href=\"index.php?site=".$_GET['site']."&nummer=".$_GET['nummer']."&logout=1\">Ausloggen</a>";
}
/*<form action="" method="post" name="form1" class="Stil10" id="form1">
<div align="center">
<table width="100%" border="0">
<tr>
<td width="45%">Name:</td>
<td width="55%"><input name="benutzername" type="text" id="benutzername" value="Benutzername" size="15" maxlength="200" /></td>
</tr>
<tr>
<td>Passwort:</td>
<td><input name="passwort" type="password" id="passwort" onblur="Passwort" value="Passwort" size="15" maxlength="200" /></td>
</tr>
</table>
<input name="login" type="submit" id="login" value="Einloggen" />
Registrieren | P W vergessen </div>
</form> */
?>
<?php
if($login)
{
$file_users = file("fd_users");
$users_zahl = $file_users[0];
settype($users_zahl,"integer");
for($log_temp = 1; $log_temp <= $users_zahl*3; $log_temp = $log_temp + 3)
{
if($file_users[$log_temp] == $benutzername && $file_users[$log_temp+1] == $passwort)
{
$goodlog = 1;
}
}
if($goodlog == 1)
{
$_SESSION["log_benutzer_name"] = $benutzername;
$_SESSION["login_erfolgreich"] = 1;
echo $_SESSION["login_erfolgreich"];
}
}
?>
<hr />
<div align="left"><span class="Stil10">D</span><span class="Stil15"></span><span class="Stil10">atum:
<hr />
<span class="Stil10">UMFRAGE
</span>
</p>
</div>
</div>
<div id="navBarR">
<div align="center" class="Stil1">
<span class="Stil11"> Aktuelle Ausgabe:</span>[img]images/cover/124.JPG[/img]
<span class="Stil3">Ausgabe 124
</span> </p>
<p align="left"><span class="Stil3">-SchoolWars
-Lehrercharts
-Kanalkatastrophe
-uvm.</span></p>
<span class="Stil11">Covershow:</span>
<?php
$bildnummer1 = rand(121,123);
echo "<a href=\"images/cover/".$bildnummer1.".JPG\" target=\"_blank\"><img src=\"images/cover/".$bildnummer1.".JPG\" width=\"140\" alt=\"Titelbild der Ausgabe ".$bildnummer1." \"/></a>
";
?>
</p>
</div>
</div>
<div id="content">
<div align="center">
<?php
echo "..." . $_SESSION["login_erfolgreich"];
echo $_SESSION["log_benutzer_name"];
$include_dat = $_GET['site'];
if($login)
{
if($_SESSION["login_erfolgreich"] == 1)
{
$include_dat = "good_login.php";
}
else
{
$include_dat = "bad_login.php";
}
}
if ($include_dat == ""){
$include_dat = "home.php";
}
include($include_dat);
?>
|
| |
| | |
| Benutzer Registriert seit: 17.02.2005
Beiträge: 57
![]() | Also $login ist true und goodlog ist auch 1.. das stimmt alles. Habe ich durch mehrere Echos überprüft... mit der session "log_benutzer_name" funktioneiert auch alles, aba eben mit "login_erfolgreich" nicht Das ist ja das komische... |
| |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Sicherheitsfrage mit Sessions - Problem mit Intellitamper | Leibi | PHP-Fortgeschrittene | 26 | 03.07.2008 12:38 |
| Sessions Problem | StephenKing | PHP Tipps 2008 | 3 | 16.10.2007 08:30 |
| Komisches Problem | Stefajo | PHP Tipps 2006 | 6 | 25.09.2006 13:49 |
| sessions problem | 022.9 | PHP Tipps 2006 | 5 | 19.06.2006 18:13 |
| Problem mit Login Bereich (Sessions, MySQL) | nicobischof | PHP Tipps 2005-2 | 6 | 19.10.2005 09:54 |
| Problem mit Sessions unter PHP 4.4.0 | betrazivis | PHP-Fortgeschrittene | 1 | 12.10.2005 19:21 |
| Problem mit Sessions | Drago | PHP Tipps 2005-2 | 11 | 04.10.2005 20:23 |
| Komisches ODBC Problem... | solitaer | PHP-Fortgeschrittene | 0 | 17.09.2005 18:21 |
| Problem mit Sessions unter PHP 4.3.10 | PHP Tipps 2005 | 2 | 22.02.2005 23:14 | |
| Problem mit Sessions | PHP Tipps 2005 | 2 | 10.02.2005 11:57 | |
| Komisches Problem mit Eintrag in der DB | PHP Tipps 2007 | 4 | 04.01.2005 15:41 | |
| Problem mit "Keksen" bei Sessions? | PHP-Fortgeschrittene | 4 | 17.09.2004 00:05 | |
| [Erledigt] komisches problem | PHP Tipps 2004 | 42 | 26.08.2004 01:41 | |
| PHP Serverpfad Problem mit Sessions | PHP Tipps 2004 | 2 | 05.08.2004 18:56 | |
| Problem mit Sessions !! | Cytrix | PHP Tipps 2004 | 9 | 21.07.2004 23:18 |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.