if(!isset($id)) { Header ("Location: index.php"); exit; } $news_per_page = 30; $shell = $id; $id2 = $id; $id = ereg_replace("_", " ", $id); include("common_db.include"); ?>
![]() |
Bulletin Board |
$quote_file = "./include/quote.inc"; //name of file quotes are held in
$fpread = fopen($quote_file, 'r'); //opens the quotes file, read only ('r')
$quote_temp = fread($fpread, filesize($quote_file)); //reads the contents of the file into the variable $quote_temp, so $quote_temp now jolds "quote1\nquote2\nquote3\n etc etc"
fclose($fpread); //closes the quotes file
$quote = explode("\n", $quote_temp); //explodes the $quote_temp variable into an array by /n (line break). So $quote[0] = "quote1", $quote[1]="quote2", $quote[2]="quote3" etc etc
echo " " . $quote[date("j")] . "
Department:include("functions.include"); if(!$from)($from = "0"); $mysql_access = mysql_connect($localhost, $user, $pw); $query = "SELECT * FROM sf_news"; $result = mysql_db_query ($db, $query); $news_total = mysql_num_rows ($result); $query = "SELECT * FROM sf_news WHERE shell_id='$shell' ORDER BY timestamp DESC LIMIT $from, $news_per_page"; $result = mysql_db_query ($db, $query); while ($row = mysql_fetch_array ($result)){ $tag = $row['ID']; $title = stripslashes($row['title']); $body = stripslashes($row['body']); $source = stripslashes($row['source']); $url = stripslashes($row['url']); $timestamp = $row['timestamp']; $author = $row['admin_id']; $comments = $row['comments']; $shell = ereg_replace("_", " ", $row['shell_id']); $query2 = "SELECT * FROM admin WHERE admin_id='$author'"; $result2 = mysql_db_query ($db, $query2); $row2 = mysql_fetch_array ($result2); $author = "".$row2['admin_name'].""; render_news_story($title, $body, $source, $url, $author, $timestamp, $tag, $comments, $shell); echo "
|
|