![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 4.02.2004 Ostrzeżenie: (0%) ![]() ![]() |
Witam, mój pierwszy post na forum z takim nietypowym zadaniem dla was
![]() Otóż mam sobie taki prosty skrypt ksiegi: [php:1:9daf29c476] <? $txt=fopen("guestbook.gb","r"); $gbfile=""; while($line=fgets($txt,3000)) $gbfile.=$line; //name if(isset($name)) if($name==""){ $errorfarbe_1 = "red"; $error = "fehler"; } else{ $errorfarbe_1 = "black"; } //comment if(isset($comment)) if($comment==""){ $errorfarbe_2 = "red"; $error = "fehler"; } else{ $errorfarbe_2 = "black"; } if(!$aktion){ $aktion = "eingabe"; } if($error=="fehler"||$aktion=="eingabe"){ ?> <p align="center"><strong>Spis </strong></p> <form method="post" action="<? echo $PHP_SELF;?>"> <div align="left"><strong>Nick</strong><br /> <input type="text" name="name" size="30" <? if(isset($name)) echo "value='$name'";?> class="eingabe"> <br /> <strong>Mail</strong><br /> <input type="text" name="mail" size="30" class="eingabe"> <br /> <strong>Linkstrong><br /> <input type="text" name="site" size="100" value="http://" class="eingabe"> <br /> <font color="#FFCCCC"><br> </font><strong>Wpisz:</strong>:<br /> <textarea name="comment" cols="100" rows="10" class="eingabe"><? if(isset($comment)) echo "$comment";?></textarea> <br /> <br /> <input type="submit" name="Button" value="Wyslij" class="eingabe"> <input type="Hidden" name="aktion" value="senden" class="eingabe"> <br> </div> </form> <p align="center"><strong>Wpisy:</strong></p> <p> </p> <? echo "<p>$gbfile</p>" ?> <? }else{ if(isset($name)&&isset($comment)&&isset($mail)&&isset($site)) { $name=stripslashes(strip_tags($name)); $comment=stripslashes(strip_tags($comment)); $mail=stripslashes(strip_tags($mail)); $site=stripslashes(strip_tags($site)); $gbfile="<b>$name</b> - ".date("m/d/Y")."<br>n<a href='mailto:$mail'>$mail</a>n"."<br>n<a href='$site' target='blank'>$site</a>n"."<br>n $comment <br><br>n".$gbfile; fclose($txt); $txt=fopen("guestbook.gb","w"); fputs($txt,$gbfile); } echo "<p><a href='wpisy.php'>Wpisy</a><br><br> " . $gbfile . "</p>"; fclose($txt); } ?> [/php:1:9daf29c476] 1. Chcem aby każdego dnia była tworzona nowa strona dla wpisów(nie zależne od ilości wpisów) 2. Chcem w to wkomponować najprostrzą wyszukiwarke, dzięki której będę mógł po dużej ilości wpisów odnaleźć jakiś starszy wpis. Dodam tylko że to nie będzie służyć jako księga gości, ale ma podobne zastosowanie. Z góry dziękuje za każdą pomoc :wink: |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 05:07 |