#native_company# #native_desc#


By bitplane
on March 15, 2003

Version: 1

Type: Full Script

Category: BBS/Discussion

License: GNU General Public License

Description: A simple threaded discussion forum without use of SQL


ONBoard v1.0: by OtterNET

Most Bulletin systems are setup with statesmodes
there is usually one state for viewing, one for entering
the message and one that writes the message then refreshes
back to the viewing mode. What differes is this script is 
that one, it does not require the overhead of a database
sever and two that it is a stateless design

This forum can make Threads which can be individual replied
to or deleted. Intended for a small user base

Usage: Just changed the referenceS of C:/apache/htdocs/bb/
to where you want the messages stored; naturally one with
write permissions

//get time
$datetime = date("ymdHis");

//del post

//end del post

//write msg
if($postid && $postmsg){


if($newtest = @file($curpath)){
$postmsg = "<hr><br>".$postmsg."<br><br>";
$postmsg = "<br>".$postmsg."<br><br>";

$fp = fopen ("$curpath", "a");

}//end writemsg

//html header !! You Can Ignore This Part
echo "
<meta http-equiv="refresh" content="300;URL=index.php">
BODY {font-family : Arial, Helvetica, sans-serif;}
A:link {color: #ffffff; text-decoration: none;}
A:visited {color: #ffffff; text-decoration: none;}
A:hover {color: #ffffff; text-decoration: underline;}
A:active {color: #ffffff; font-weight: bold;}
<body bgcolor="#000000" background="img/bg.gif" text="#ffffff" vlink="#ffffff">
";//end header

//begin html form
echo "
<form name="f" method="post" action="index.php">

//read dir
if ($dir = opendir($curpath)) {
  while (($file = readdir($dir)) !== false) {


$filelist[$fi] = $file;


}//end read dir

//begin display
//Note: it is readering out the files in reverse order so that newer files go on top

$readpath = $curpath.$filelist[$fi];

echo "
<table bgcolor="#000000" width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
    <td width="100%">$filelist[$fi]</td>
    <td><a href="index.php?delid=$filelist[$fi]"><img src="close.gif" alt="Delete Thread" border="0"></a></td>
    <td colspan="2"><table width="100%" border="0" cellpadding="10" cellspacing="0"><tr><td>";
echo @stripslashes(implode("<br>",file($readpath)));
    <td colspan="2"><div align="right">Reply<input name="postid" type="CHECKBOX" value="$filelist[$fi]"></div></td>
}//end while
//end display

//begin footer
echo "

<table border="0" cellpadding="3" cellspacing="0" bordercolor="#FFFFFF">
New Thread<input name="postid" type="CHECKBOX" value="$datetime">

  <textarea name="postmsg" cols="96" rows="3"></textarea>
  <input type="submit" name="write" value="Go">

//end footer