Nie wiem próbowałem już na kilka sposobów ale nie otrrafie zrobić żeby to tak wyglądało:
28 luty 2008 o 10:32:43
Napisał:Darkowski
beleleleleeleele
Gdzie zmienić kod
dodawacz.php
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style2 {
color: #FF0000;
font-weight: bold;
font-size: 18px;
}
#Layer1 {
position:absolute;
left:204px;
top:69px;
width:81px;
height:22px;
z-index:1;
}
#Layer2 {
position:absolute;
left:98px;
top:54px;
width:82px;
height:20px;
z-index:2;
}
.style3 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<form action="zapis.php" method="POST">
<table width="100%">
<tr>
<td width="1%"><div align="center"></div></td>
<td width="99%">
<div align="center"><span class="style2">Treść</span>
<textarea name="tresc" cols="20" rows="0" style="width: 252; height: 70;"></textarea>
</div></td></tr>
<tr>
<td width="1%"><div align="center"></div></td>
<td width="99%">
<div align="center">
<span class="style2">
Autor</span><span class="style2">
<input name="autor" type="text" value="" size="38" />
</span></div></td>
</tr>
<tr>
<td > </td>
<td>
<div align="center">
<input type="submit" value="Dodaj" />
</div></td></tr>
</table>
<div align="center"><span class="style3">Komentarze sa własnoscia ich autorów. <br />
Autor strony nie ponosi odpowiedzialności za ich tresć!</span>
</div>
</form>
<table class="all" border="0" width="100%">
<tr>
<td><?php include "wiadomosc.php"; ?></td>
</tr>
</table>
<meta http-equiv="Pragma" content="no-cache" />
<div align="center"></div>
zapis.php
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #FF0000;
}
.style2 {font-weight: bold; font-size: 36px; color: #000000;}
-->
</style>
<p align="center" class="style2"> </p>
<p align="center" class="style2">Właśnie dodałeś komentarz</p>
<p align="center"><a href="http://niedojeby.lua.pl/dodawacz2.php"><strong>wróć</strong></a></p>
<?php
$fp=fopen("dane.php","a+"); fwrite($fp,$_POST["autor"]."|".$_POST["tresc"]."|".strftime('%e %B %G o %H:%M:%S')."\n");
?>
wiadomosc.php
<style type="text/css">
<!--
<meta http-equiv="Pragma" content="no-cache" />
body {
background-color: #000000;
}
body,td,th {
color: #FFFFFF;
}
-->
</style><?php
$linia=explode("\n",file_get_contents("dane.php")); // kolejne linie sa zapisywane jako kolejne elementy tablicy "linia"
$ilosc=count($linia); // ilosc linii/newsów
for($c=$ilosc-1;$c>=0;$c--)
{
$element=explode("|",$linia[$c]); // kolejne czesci linii sa rozdzielane jako elementy tablicy "element" echo "<table><tr><tr><tr><tr><tr><tr><tr><td>".$element[2]."</td></tr><tr><td><u><b>" .$element[0]."</u></b></td></tr></table>" .$element[1]."</td></tr></table>"; }
?>