+
+
+ ### Display admin blocks:
+ # displayAdminblock($this);
+ ?>
+
+
+
+
+ }
+
+ function abstract($story) {
+ $timestamp = format_date($story->timestamp);
+ ?>
+
+
+
+ if (rand(0,1) == 0) $img = "news1.gif"; else $img = "news3.gif"; ?>
+
+ echo "". check_output($story->subject) .""; ?>
+
+
+ if (rand(0,1) == 0) $img = "news2.gif"; else $img = "news4.gif"; if (rand(0,100) == 50) $img = "news5.gif"; ?>
+
+
+
+
+
+
+
+
+ switch (rand(0,12)) {
+ case 0: $how = "Yelled at us"; break;
+ case 1: $how = "Whispered"; break;
+ case 2: $how = "Reported"; break;
+ case 3: $how = "Posted"; break;
+ case 4: $how = "Beamed through"; break;
+ case 5: $how = "Faxed"; break;
+ case 6: $how = "Tossed at us"; break;
+ case 7: $how = "Morsed"; break;
+ case 8: $how = "Flagged"; break;
+ case 9: $how = "Written to us"; break;
+ case 10: $how = "Made up"; break;
+ case 11: $how = "Uploaded"; break;
+ default: $how = "Sneaked through";
+ }
+
+ if ($story->userid) {
+ print "$how by userid\">$story->userid on $timestamp"; ?> print "
+
+
+ category\">fgcolor3; ?>\">$story->category ";
+ }
+ else {
+ print "Reported to us by $anonymous on $timestamp"; ?> print "
+
+ category\">fgcolor3; ?>\">$story->category ";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if ($story->updates) {
+ echo "$story->abstract
hlcolor1\">Editor's note by editor\">$story->editor : $story->updates
";
+ }
+ else {
+ echo $story->abstract;
+ }
+ ?>
+
+
+ echo $link; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+ function article($story, $reply) {
+ $timestamp = format_date($story->timestamp);
+
+ ?>
+
+
+ }
+
+ function commentControl($sid, $title, $thold, $mode, $order) {
+ global $user;
+ $query = mysql_query("SELECT sid FROM comments WHERE sid = $sid");
+
+ if (!$query) $count = 0; else $count = mysql_num_rows($query);
+ if (!isset($thold)) $thold = 0;
+
+ ?>
+
+
+
+
+
+ Comment control
+
+
+
+
+
+
+
+
+
+ $result = mysql_query("SELECT COUNT(cid) FROM comments WHERE sid = $sid AND score < $thold");
+ if ($result && $number = mysql_result($result, 0)) {
+ ?>
+
+ bgcolor2"; ?>">
+ fgcolor2"; ?>">There are at least echo $number; ?> comments below your threshold.
+
+
+
+ }
+ ?>
+
+
+ }
+
+ ######
+ # Syntax.......: comment(...);
+ # Description..: this function is used to theme user comments.
+ function comment($poster, $subject, $cid, $date, $url, $email, $score, $reason, $comment, $link, $thread = "") {
+
+ if (!eregi("[a-z0-9]",$poster)) $poster = $anonymous;
+ if (!eregi("[a-z0-9]",$subject)) $subject = "[no subject]";
+ echo "";
+
+ ### Create comment header:
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+
+ ### Subject:
+ echo " ";
+ echo " Subject: ";
+ echo " $subject ";
+ echo " [Score: $score";
+ if (isset($reason)) echo ", $comments_meta_reasons[$reason]";
+ echo "] ";
+ echo " ";
+
+ ### Moderation:
+ echo " ";
+ echo " ";
+ echo " Moderate \n";
+ for ($i = 0; $i < sizeof($comments_meta_reasons); $i++) {
+ echo " $comments_meta_reasons[$i] \n";
+ }
+ echo " ";
+ echo " ";
+ echo " ";
+
+ ### Author:
+ echo " ";
+ echo " Author: $poster ";
+ if ($poster != $anonymous) {
+ ### Display extra information line:
+ $info .= "user info ";
+ if ($email) $info .= " | $email ";
+ if (eregi("http://",$url)) $info .= " | $url ";
+ echo "[ $info ] ";
+ }
+ echo " ";
+ echo " ";
+
+ ### Date
+ echo " Date: ". formatTimestamp($date) ." ";
+
+ echo "
";
+ echo " ";
+ echo " ";
+
+ ### Print body of comment:
+ if ($comment) echo " $comment ";
+
+ ### Print thread (if any):
+ if ($thread) echo " $thread ";
+
+ ### Print bottom link(s):
+ echo " [ $link ] ";
+ echo "
";
+ }
+
+ ######
+ # Syntax.......: preview(...);
+ # Description..: this function is used to preview a story and is used at
+ # different parts of the homepage: when a visitors sumbits
+ # news, when an editor wants to post news, when people
+ # check the entries in the sumbission queue, etc.
+ function preview($editor, $informant, $timestamp, $subject, $department, $abstract, $comments, $article) {
+ include "config.inc";
+ ?>
+
+
+
+ echo $subject; ?>
+
+
+
+
+
+ if ($informant) {
+ print "Posted by $informant on $timestamp"; ?> if ($department) echo " from the $department dept."; ?> print " ";
+ }
+ else {
+ print "Posted by $anonymous on $timestamp"; ?> if ($department) echo " from the $department dept."; ?> print " ";
+ }
+ ?>
+
+
+
+
+
+ if ($abstract) echo "$abstract
";
+ if ($comments) echo "
bgcolor1\">Editor's note by $editor : $comments
";
+ if ($article) echo "$article
";
+ ?>
+
+
+
+
+
+ }
+
+ ######
+ # Syntax.......: box($title, $body);
+ # Description..: a function to draw a box/block.
+ function box($subject, $content) {
+ if (rand(0,50) == 25) $img = "boxbottomright2.gif";
+ else $img = "boxbottomright1.gif";
+ $width = rand(10,200);
+ if (rand(0,100) == 50) $img2 = "boxtopleftside2.gif";
+ else $img2 ="boxtopleftside1.gif";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo $subject; ?>
+
+
+
+
+
+
+
+
+
+
+
+ echo $content; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+ ######
+ # Syntax.......: footer();
+ # Description..: a function to draw the page footer.
+ function footer() {
+ ?>
+
+
+
+ global $PHP_SELF;
+
+ $this->box("Drop where?", " home faq search submit news your account ");
+
+ if (strstr($PHP_SELF, "index.php")) {
+ global $user, $date;
+
+ ### Display account:
+ displayAccount($this);
+
+ ### Display calendar:
+ displayCalendar($this, $date);
+
+ ### Display calendar:
+ displayOldHeadlines($this);
+
+ ### Display voting poll:
+ displayPoll($this);
+ }
+ elseif (strstr($PHP_SELF, "account.php")) {
+ ### Display account settings:
+ displayAccountSettings($this);
+
+ ### Display account:
+ displayAccount($this);
+ }
+ elseif (strstr($PHP_SELF, "submit.php")) {
+ ### Display account:
+ displayAccount($this);
+
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+ elseif (strstr($PHP_SELF, "discussion.php")) {
+ global $id;
+
+ if ($id && $story = id2story($id)) {
+ if ($story->status == 2) {
+ ### Display account:
+ displayAccount($this);
+
+ ### Display related links:
+ displayRelatedLinks($this, $story);
+
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+ else {
+ ### Display results of moderation:
+ displayModerationResults($this, $story);
+ }
+ }
+ else {
+ ### Display account:
+ displayAccount($this);
+
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+ }
+ else {
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+
+ ?>
+
+
+