"; $comment = str_replace($search, $replace, $comment); $post = $_POST['post']; $post = "entries/".$post."comments.txt"; $posted = $_POST['posted']; $pagefrom = $_POST['pagefrom']."?p=".$post; $pagefromerror = $_POST['pagefrom']."?p=".$post."&error=1"; if ($_POST['author']!= "") { $your_data = "

\n".$author." says:

".$comment."
".$posted; $fp = fopen($post, "a"); fwrite($fp, $your_data); fclose($fp); $error = "no"; } } ?> <?php echo "$title"; $i ++ ; ?> /style.css" type="text/css" media="screen" >

'; include ("nav.php"); echo "
"; include ("footer.php"); exit; } else { echo "

Error:


This is not allowed.

< Back"; echo ' "; include ("footer.php"); exit; } } // if cat page params are set (and set correctly) $i ++; if (isset($_GET["cat"])) { $page = 'entries/'.strip_tags(htmlspecialchars($_GET["cat"])).'.txt'; if (file_exists($page)) { echo "
< Back"; $post = file_get_contents("$page"); $post = str_replace('{main}', '', $post); $post = str_replace('{headline}', '', $post); $post = str_replace('{link}', '', $post); $post = str_replace('{endlink}', '', $post); $post = str_replace('{endheadline}', '', $post); echo $post; otherwise(); } else { echo "
< Back

Error:


There is no such category.

Available Categories:

< Back"; otherwise(); } } $i ++; // if link params are set (and set correctly) if (isset($_GET["p"])) { echo '
'; $page = 'entries/'.strip_tags(htmlspecialchars($_GET["p"])).'.txt'; $pagecomments = 'entries/'.strip_tags(htmlspecialchars($_GET["p"])).'comments.txt'; if (file_exists($page)) { echo "
< Back"; $post = file_get_contents("$page"); $post = str_replace('{main}', '', $post); $post = str_replace('{endmain}', '', $post); $post = str_replace('{headline}', '', $post); echo $post; $email = $post; $small = file($page); $minus = count($small); $posted = $minus -2; $posted = $small[$posted]; $posted = str_replace('

', '', $posted); $posted = str_replace('

', '', $posted); echo '
This entry was posted on '.$small[3].' and is '.$posted.'. You can Leave a response, or Email this.
'; $comments = intval(count(file($pagecomments))); $comments = $comments -1; if($comments <= -1){ $comments = 0; } if($comments == 0){ $comments = "No"; } function comment_style() { static $comment_count; $comment_count++; if ($comment_count % 2) { $GLOBALS['colour'] = "#FFFFFF"; //Gotta stick to your homeland :) $GLOBALS['onoff'] = "off"; } else { $GLOBALS['colour'] = "#EEEEEE"; $GLOBALS['onoff'] = "on"; } } $headline = $small[2]; $headline= str_replace('

', '', $headline); $headline = str_replace('

', '', $headline); echo "

$comments Responses to “".$headline."”

"; $lines = file($pagecomments); foreach ($lines as $line) { comment_style(); echo '
'; echo $line; echo '
'; } include ("pages/comment.php"); echo "
"; include ("footer.php"); exit; } else { echo "

Error:


There is no such link.

< Back"; otherwise(); } } $i ++; // if archive params are set (and set correctly) if (isset($_GET["archive"])) { $page = 'entries/'.strip_tags(htmlspecialchars($_GET["archive"])).'.txt'; if (file_exists($page)) { echo "
< Back"; archive($page); otherwise(); exit; } else { echo "

Error:


There is no such archive.

< Back"; otherwise(); } } // if search params are set (and set correctly) if (isset($_GET["q"])) { echo "
< Back"; $string = htmlspecialchars($_GET['q']); $string = strip_tags($_GET['q']); $ref = 1; $number = 0; $fin = file_get_contents("entries/p.txt"); echo "

Search Results for '".$string."' :


"; while ($ref <= $fin) { $contents = file_get_contents("entries/".$ref.".txt"); if(strpos($contents,$string)==true) { $result = file("entries/".$ref.".txt"); $result[2] = str_replace("

", "", $result[2]); $result[2] = str_replace("

", "

", $result[2]); echo $result[2]; $number++; } $ref++; } echo $number." results"; otherwise(); } $i ++; // if no params are set. echo '

Recent

'; one(); // Include the four recent files two(); three(); four(); otherwise(); //navigation and footer ?>