$datadir = "data"; function comment($icq,$aim,$email,$name,$url,$comment) { $thetag = "
\n"; return $thetag; } $file = fopen("$datadir/$filename.txt", "aw"); fclose($file); if($addcomment == "submit") { if ( $commentfr == "" ) { echo "Please enter a comment
"; } else { $datadir = "data"; $file = fopen("$datadir/$filename.txt", "aw"); $tag = comment($icqfr,$aimfr,$emailfr,$namefr,$urlfr,$commentfr); $tag = stripcslashes($tag); fputs($file, $tag); fclose($file); setcookie ("dticomments_name", $namefr, 604800); setcookie ("dticomments_email", $emailfr, 604800); setcookie ("dticomments_url", $urlfr, 604800); setcookie ("dticomments_aim", $aimfr, 604800); setcookie ("dticomments_icq", $icqfr, 604800); header("Location: $PHP_SELF?filename=$filename"); } } else { if ($dticomments_name == "") {$dticomments_name = "";} if ($dticomments_email == "") {$dticomments_email = "";} if ($dticomments_url == "") {$dticomments_url = "https://www.angelfire.com/emo/themisfits/ehh.html";} } ?> Comments: -->
"> function getfile($open) { $get = fopen($open, "r"); while(!(feof($get))) $text .= fgets($get, 1024); fclose($get); return $text; } $datadir = "data"; $file = fopen("$datadir/$filename.txt", "r"); for($a = 0; !feof($file); $a++) $text = fgets($file, 2048); fclose($file); $comments = getfile("$datadir/$filename.txt"); //echo "[ $filename ]
"; echo "Comments: ("; $a = ($a - 1); echo $a; echo " )
Earliest records first
"; echo $comments; $file = fopen("$datadir/$filename.txt", "r"); for($a = 0; !feof($file); $a++) $text = fgets($file, 2048); fclose($file); ?>