<?php
if(empty($_SESSION["zalogowany"]))$_SESSION["zalogowany"]=0;
mysql_connect("cos", "Aras785", "aras")or
die("Nie można nawiązać połączenia z bazą"); //połączenie z bazą danych
function ShowLogin($komunikat=""){
include("oknaLiR.php");
}
?>
<?php include("menu.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="author" content="Wink Hosting (www.winkhosting.com)" />
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<link rel="Stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" charset="iso-8859-2" src="skin.js" />
<title>Aras</title>
</head>
<body>
<?php
if($_GET["wyloguj"]=="tak"){$_SESSION["zalogowany"]=0;echo "<center><div id='komunikat'>Zostałeś Wylogowany!</div></center>";}
if($_SESSION["zalogowany"]!=1){
if(!empty($_POST["login"]) && !empty($_POST["haslo"])){ <script language="JavaScript">
<!--
window. location ="index.php";
//-->
</script ><?php
$_SESSION["zalogowany"]=1;
}
else echo ShowLogin
("<div id='blad'>Złe Dane!</div>"); }
else ShowLogin();
}
else{
?>
<div id="page" align="center">
<div id="toppage" align="center">
<div id="date">
<div class="smalltext" style="padding:13px;"><strong>
<?php echo date("d/m/y"); ?></strong></div>
</div>
<div id="topbar">
<div align="right" style="padding:12px;" class="smallwhitetext">
<?php echo $menu_gorne; ?> </div>
</div>
</div>
<div id="header" align="center">
<div class="titletext" id="logo">
<div class="logotext" style="margin:30px">M<span class="orangelogotext">e</span>N<span class="orangelogotext">u</span></div>
</div>
<div id="pagetitle">
<div id="title" class="titletext" align="right"><a href='index.php?wyloguj=tak'><img src="obrazki/wyloguj.png"></div>
</div>
</div>
<div id="content" align="center">
<div id="menu" align="right">
<div id="linksmenu" align="center">
<?php echo $menu_boczne; ?>
<br/>
</div><br/>
<div align="right" style="width:189px; height:8px;"><img src="obrazki/mnu_bott.gif" width="189" height="8" alt="mnubottomshadow" /></div>
</div>
<div id="contenttext">
<div class="bodytext" style="padding:12px;" align="justify">
</div><div align="left"><span class="orangetitle">Nagłówek Podstrony</span></div>
<div class="panel" align="justify">
<span class="bodytext">
<br /><?php include("podstrony.php"); ?>
</span></div>
<div align="center">
</div>
</div>
<div id="footer" class="smallgraytext" align="center">
Copyright 2009 by LuCeK
</div>
</div><br><center></center>
<?php
}
?>
</body>
</html>
Chciałbym sie dowiedzieć jak z tego skryptu php wyświetlic nazwe uzytkownika ktory sie zalogował.
Np. login: Aras haslo: Aras
i jak sie taka osoba zaloguje to pisze "Witaj Aras"
Prosze o pomoc bo ja już nie wiem
Ten post edytował aras785 1.11.2009, 01:21:52