 |
 | Księga Gości(gbook) |  |
Bartek
Billie Joe Armstrong

Dołączył: 12 Mar 2006 |
Posty: 516 |
Przeczytał: 0 tematów
|
Ostrzeżeń: 1/5
|
Skąd: Radlin |
|
 |
Wysłany: Sob 21:30, 15 Kwi 2006 |
|
 |
|
 |
 |
Bardzo prosta księga gości, nie potrzebuje MySQL, a wpisy są oparte na plikach tekstowych. Idealnie nadaje się na małe strony.
guestbook.php3
<script language="php">
/*
This script was originally created by Daniel Williams [link widoczny dla zalogowanych]
This version has been modified by Mark Donchek (webmaster@markdonline.com)to include the following functionality:
- A checkbox for the users' choice in format (HTML or No HTML).
- The ability for a user to preview their changes before submitting.
- A check box for a user to decide whether or not to see a preview.
- Blank submissions are blocked from submission.
- An error message has been added when trying to insert a blank submission into the submit page.
- The primary submit form has been separated from guestbook.php3 in order to help prevent against multiple submissions (more aesthetic than practical).
- Various aesthetic changes (for consistency with [link widoczny dla zalogowanych]'s look and feel,
including a single pixel gif (black.gif) in place of the HTML line rule.
*/
$PostPage = "post.htm";
$gbPage = "index.php3";
if (($name == "") AND ($email == "") AND ($comments == "")):
$error1 = "<font size='3' class='s4' color='red' face='Arial, Helvetica'><STRONG>It appears as if you've tried to submit a blank form:</STRONG></font><br>";
echo $error1;
include($PostPage);
elseif ($form == preview):
echo("
<html>
<head>
<title>Untitled</title>
</head>
<style type='text/css'>
<!--//
.s5 {font-size: 20px; font-family: arial,helvetica}
.s4 {font-size: 18px; font-family: arial,helvetica}
.s3 {font-size: 13px; font-family: arial,helvetica; letter-spacing: 1px}
//-->
</style>
<BODY>
<P><font size='3' class='s4' face='Arial, Helvetica'>Confirm your comment and submit, or <a href='index.php3'>view the guestbook</a> without making an entry</FONT></P>
<P>
<font size='3' class='s4' face='Arial, Helvetica'>Add a message to my guest book:</FONT>
<FORM ACTION='guestbook.php3' METHOD=POST>
<P>
<font size='3' class='s4' face='Arial, Helvetica'>
Name:<BR>
<INPUT TYPE=text NAME=name SIZE=30 maxlength=80 value=$name><BR>
Email:<BR>
<INPUT TYPE=text NAME=email SIZE=30 maxlength=80 value=$email><BR>
Notes:
<BR>
<TEXTAREA NAME=comments ROWS=10 COLS=30 WRAP=virtual>$comments</TEXTAREA>
<BR><BR>
Check here if you used HTML tags in any field: <INPUT TYPE=checkbox NAME=html value='1'");if ($html == 1):$xbox = CHECKED; echo $xbox; else:'';endif;echo("><BR>
</FONT>
</P>
<P><font size='2' class='s3' face='Arial, Helvetica'><INPUT TYPE=submit NAME=gb VALUE='Add Message'> Please press only once: this may take a moment (or two).</FONT>
</FORM></P>
</BODY>
</HTML>
");
else:
$gbFile = "messages.txt"; // Location of link database file
$gbPage = "index.php3"; // Link page file
if ($html == 1):
$allowHTML = 1; // To allow HTML in site description 1 = Yes, 0 = No
else:
$allowHTML = 0; // To allow HTML in site description 1 = Yes, 0 = No
endif;
$notify = 0; // Would you like to be notified when a link is added? 1 = yes, 0 = No
$my_email = "you@youremailaddress.com"; // Enter your email address
$subject = "New Guestbook Entry" ; // Enter the subject of the notification email
/*
Code Follows Below
*/
$page = $gbFile;
if ($allowHTML == 0):
$name = ereg_replace("<","<",$name);
$name = ereg_replace(">",">",$name);
$email = ereg_replace("<","<",$email);
$email = ereg_replace(">",">",$email);
$url = ereg_replace("<","<",$url);
$url = ereg_replace(">",">",$url);
$urltitle = ereg_replace("<","<",$urltitle);
$urltitle = ereg_replace(">",">",$urltitle);
$referral = ereg_replace("<","<",$referral);
$referral = ereg_replace(">",">",$referral);
$comments = ereg_replace("<","<",$comments);
$comments = ereg_replace(">",">",$comments);
endif;
$filename = "messages.txt";
$fd = fopen( $filename, "r" );
$current = fread( $fd, filesize( $filename ) );
fclose( $fd );
$comments = ereg_replace("\n","<BR>",$comments);
$fileMessage = "<P><b><font size='2' color='#000000' class='s3' face='Arial, Helvetica'>Name: </b></font><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>$name</font>\n";
$fileMessage .= "<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Date: </b></font>";
$fileMessage .= ("<font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>\n");
$fileMessage .= (date("l dS of F Y h:i:s A"));
$fileMessage .= ("</font>\n");
$fileMessage .= "</font><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><br><b>E-mail:</b></font>\n";
$fileMessage .= "<font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>$email</font>\n";
// $fileMessage .= "<br><b>Email: </b><a href=\"mailto:$email\">$email</a>\n";
//$fileMessage .= "<br><b>Reference: </b><a href=\"$url\">$url</a>\n";
// $fileMessage .= "<br><b>How did you hear about this site? : </b>$referral\n";
$fileMessage .= "<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Comments:</b></font>\n";
$fileMessage .= "<br><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>$comments</font>\n";
$fileMessage .= "<br><br><br><center><img src='black.gif' width=100% height=1 border=0></center>\n";
$fileMessage .= "$current\n";
if (file_exists("$page")):
$cartFile = fopen("$page","w+");
fputs($cartFile,$fileMessage);
fclose($cartFile);
else:
$cartFile = fopen("$page","w");
fputs($cartFile,$fileMessage);
fclose($cartFile);
endif;
// EMAIL THE NEW POST
if ($notify == 1):
$comments = ereg_replace("<BR>","\n",$comments);
mail
(
"$my_email",
"Example Issues List Entry",
"Name : $name
Email : $email
Note:
$comments\n
",
"From: $email\n"
);
endif;
//set vars for help checking against double entries
$name_chk = $name;
$email_chk = $email;
$comments_chk = $comments;
include($gbPage);
//endif from very top where checking if form is empty
endif;
</script>
|
index.php3
<html>
<head>
<title>Untitled</title>
</head>
<BODY>
<font size="3" color="#000000" class="s4" face="Arial, Helvetica"><a href="post.htm">Post a message to this guestbook</a></font>
<?php
if (file_exists("messages.txt")):
include("messages.txt");
endif;
?>
<br><br>
<font size="3" color="#000000" class="s4" face="Arial, Helvetica"><a href="post.htm">Post a message to this guestbook</a></font>
</font>
</BODY>
</HTML>
|
messages.txt
<P><b><font size='2' color='#000000' class='s3' face='Arial, Helvetica'>Name: </b></font><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'><h1>saf</h1></font>
<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Date: </b></font><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>
Thursday 23rd of December 1999 12:39:07 PM</font>
</font><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><br><b>E-mail:</b></font>
<font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>fsaafs</font>
<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Comments:</b></font>
<br><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>asfasfasf</font>
<br><br><br><center><img src='black.gif' width=100% height=1 border=0></center>
<P><b><font size='2' color='#000000' class='s3' face='Arial, Helvetica'>Name: </b></font><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>Mark Donchek</font>
<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Date: </b></font><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>
Thursday 23rd of December 1999 11:05:18 AM</font>
</font><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><br><b>E-mail:</b></font>
<font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'><a href="/contact.htm" target="main">mail me from here</a></font>
<br><font size='2' color='#000000' class='s3' face='Arial, Helvetica'><b>Comments:</b></font>
<br><font size='2' color='#ffffff' class='s3' face='Arial, Helvetica'>I hope you all enjoy the site. I am sorry that I had to password protect the image directory, but (strange as it sounds) this is for everyones protection. E-mail me using the link above if you need a password, and Feel free to add a comment to this guest book. I will have a "post a link page" coming soon, and some other things as well.
<BR>
<BR>Thanks for visiting.</font>
<br><br><br><center><img src='black.gif' width=100% height=1 border=0></center>
|
post.htm
<html>
<head>
<title>Untitled</title>
</head>
<style type="text/css">
<!--//
.s5 {font-size: 20px; font-family: arial,helvetica}
.s4 {font-size: 18px; font-family: arial,helvetica}
.s3 {font-size: 13px; font-family: arial,helvetica; letter-spacing: 1px}
//-->
</style>
<BODY>
<P><font size="3" class="s4" face="Arial, Helvetica">Submit a comment, or <a href="index.php3">view the guestbook</a> without making an entry</FONT></P>
<P><!-- This is where the message database is loaded -->
<!-- End messages -->
<!-- This is the form to add messages -->
<P><font size="3" class="s4" face="Arial, Helvetica">Add a message to my guest book:</FONT>
<FORM ACTION="guestbook.php3" METHOD=POST>
<P>
<font size="3" class="s4" face="Arial, Helvetica">
Name:<BR>
<INPUT TYPE=text NAME=name SIZE=30 maxlength=80><BR>
Email:<BR>
<INPUT TYPE=text NAME=email SIZE=30 maxlength=80><BR>
Notes:
<BR>
<TEXTAREA NAME=comments ROWS=10 COLS=30 WRAP=virtual></TEXTAREA>
<BR><BR>
</FONT>
<table>
<tr>
<td><font size="3" class="s4" face="Arial, Helvetica">Check here if you've used HTML tags in any field:</FONT></td>
<td><INPUT TYPE=checkbox NAME=html value="1"><BR></td>
</tr>
<tr>
<td><font size="3" class="s4" face="Arial, Helvetica">Check to preview your comments before posting:</FONT></td>
<td><INPUT TYPE=checkbox NAME=form value="preview"><BR></td>
</tr>
</table>
</P>
<BR>
<P><font size="2" class="s3" face="Arial, Helvetica"><INPUT TYPE=submit NAME=gb VALUE="Add Message"> Please press only once: this may take a moment (or two).</FONT>
</FORM></P>
</BODY>
</HTML>
|
|
Post został pochwalony 0 razy
|
 |
|
 |
 | uuuuUUUU ALE PISANIA |  |
Enlee
Nowy
Dołączył: 12 Mar 2007 |
Posty: 12 |
Przeczytał: 0 tematów
|
Ostrzeżeń: 0/5
|
|
|
 |
Wysłany: Pon 9:02, 12 Mar 2007 |
|
 |
|
 |
 |
Hardcore anal action! Free video download!
[link widoczny dla zalogowanych]
|
Post został pochwalony 0 razy
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach
|
Wszystkie czasy w strefie EET (Europa)
Strona 1 z 1
|
|
|
|  |