tagwall.php3:
---start her---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Tagwall</title>
<style type="text/css">
<!--
td, input { font-family:verdana; color:black; vertical-align:top; font-size:10pt; }
p, body { font-family:verdana; font-size:10pt; }
h1 { font-family:verdana; text-align:center; letter-spacing: 10pt; }
input, textarea { font-family:verdana; }
a { color:blue;text-decoration:none; }
a:hover { color:black; text-decoration:underline; }
table { width:100%; }
td.title { font-weight:bold; width:15%; }
th { font-family:verdana; text-align:left; }
.title { font-size: x-large; font-family: Verdana; font-weight: bold; margin-bottom: 15; }
-->
</style>
</head>
<body>
<div class="title">Tagwall</div>
<?php
if ($action == "write") {
?>
<table>
<form action="tagwall.php3" method="post">
<tr valign="top"><td>Name:</td><td><input name="name" size="30"></td></tr>
<tr valign="top"><td>Email:</td><td><input name="email" size="30"></td></tr>
<tr valign="top"><td>URL:</td><td><input name="url" size="30" value="
http://"></td></tr> <tr valign="top"><td>Message:</td><td><textarea cols="40" rows="7" name="message"></textarea></td></tr>
<tr valign="top"><td> </td><td><input type="Hidden" name="action" value="insert"><input type="Submit" value=" Send " style="font-size: x-small; font-family: Verdana; font-weight: bold; color: White; background-color: Black;"></td></tr>
</form>
</table>
</body>
</html>
<?php
exit;
}
if ($action == "insert") {
$name = htmlentities($name);
$email = htmlentities($email);
$url = htmlentities($url);
$message = htmlentities($message);
$message = ereg_replace( "
", "<br>", $message);
$fp = fopen("tagwall.txt", "a");
fputs($fp,"\n".$name."|".$email."|".$url."|".$message."|".date("d-m-Y: H:i:s"));
fclose($fp);
?>
Done...<br><br>
<a href="tagwall.php3?action=read">Read</a> | <a href="tagwall.php3?action=write">Write</a>
</body>
</html>
<?php
exit;
}
if ($action == "read") {
$splitted=array();
$filarr = file("tagwall.txt");
$i = sizeof($filarr);
$i = $i - 1;
while ($i > 0) {
$splitted = explode( "|", $filarr[$i]);
echo($splitted[4]." : By ".$splitted[0]."<br><a href=\"mailto:".$splitted[1]."\">".$splitted[1]."</a><br><a href=\"".$splitted[2]."\">".$splitted[2]."</a><br><br>");
echo("<i>".$splitted[3]."</i><hr>");
$i = $i - 1;
}
?>
<a href="tagwall.php3?action=read">Read</a> | <a href="tagwall.php3?action=write">Write</a>
</body>
</html>
<?php
exit;
}
?>
<a href="tagwall.php3?action=read">Read</a> | <a href="tagwall.php3?action=write">Write</a>
</body>
</html>
---slut her---
tagwall.txt:
---start her---
-------------------------------------------------------
---slut her---
værsgo!
kan ses i funktion på
http://wiktor.dk/~razor/eks/tagwall.php3undskyld.... :´-(