more random thingies...
   comment control...
   themed webboard...
   themed comments...
3-00
Jeroen Bensch 2000-05-28 10:03:23 +00:00
parent 9bd920debd
commit 0f7000a4f8
1 changed files with 337 additions and 159 deletions

View File

@ -2,19 +2,19 @@
class Theme {
### color set #1:
var $bgcolor1 = "#7AC5CD"; // background color
var $fgcolor1 = "#FEFEFE"; // table body color
var $bgcolor1 = "#6C6C6C"; // background color
var $fgcolor1 = "#000000"; // table body color
var $hlcolor1 = "#"; // high-light color
### color set #2:
var $bgcolor2 = "#5F7F7F";
var $fgcolor2 = "#6C6C6C";
var $hlcolor2 = "#6C6C6C";
var $bgcolor2 = "#E7E7E7";
var $fgcolor2 = "#FEFEFE";
var $hlcolor2 = "#E09226";
### color set #3:
var $bgcolor3 = "#5F7F7F";
var $fgcolor3 = "#000000";
var $bgcolor3 = "#";
var $fgcolor3 = "#";
var $hlcolor3 = "#";
######
@ -23,39 +23,40 @@
function header($title) {
?>
<HTML>
<HEAD>
<TITLE><? include "config.inc"; echo $sitename; ?></TITLE>
<META NAME="description" CONTENT="drop.org">
<META NAME="keywords" CONTENT="drop, weblog, portal, community, news, article, announcements, stories, story, computer, science, space, hype, cult, geek, nerd, foo, bar">
</HEAD>
<STYLE type="text/css">
<!--
<HEAD>
<TITLE><? include "config.inc"; echo $sitename; ?></TITLE>
<META NAME="description" CONTENT="drop.org">
<META NAME="keywords" CONTENT="drop, weblog, portal, community, news, article, announcements, stories, story, computer, science, space, hype, cult, geek, nerd, foo, bar">
</HEAD>
<STYLE type="text/css">
<!--
BODY,P,DIV,LI,UL,TD,EM,FONT,BLOCKQUOTE,FORM{font-family:Helvetica,Lucida,sans-serif;}
.NO-IN{margin-left:-25;}}
-->
</STYLE>
<BODY TEXT="#202020" BGCOLOR="#FEFEFE" BACKGROUND="themes/Jeroen/images/background.gif" ALINK="#000000" LINK="#000000" VLINK="#000000">
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD COLSPAN="2"><IMG SRC="themes/Jeroen/images/logo.gif" ALT="drop.org logo"></TD>
<TD WIDTH="180" VALIGN="top" ALIGN="right">
<?
$this->box("Status", "<TABLE WIDTH=\"100%\"><TR><TD ALIGN=\"left\" VALIGN=\"top\"><FONT SIZE=\"-2\">Username: Your Name<BR>E-mail: your.name@drop.org<BR>Status: Logged in<BR>Since: The beginning of time</FONT></TD></TR></TABLE>");
-->
</STYLE>
<BODY TEXT="#202020" BGCOLOR="#FEFEFE" BACKGROUND="themes/Jeroen/images/background.gif" ALINK="#000000" LINK="#000000" VLINK="#000000">
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD COLSPAN="2"><IMG SRC="themes/Jeroen/images/logo.gif" ALT="drop.org logo"></TD>
<TD WIDTH="180" VALIGN="top" ALIGN="right">
<?
$this->box("Status", "<TABLE WIDTH=\"100%\"><TR><TD ALIGN=\"left\" VALIGN=\"top\"><FONT SIZE=\"-2\">Username: Your Name<BR>E-mail: your.name@drop.org<BR>Status: Logged in<BR>Since: The beginning of time</FONT></TD></TR></TABLE>");
?>
</TD>
</TR>
<TR>
<TD VALIGN="top" WIDTH="120">
<?
dbconnect();
### Display admin blocks:
displayAdminblock($this);
### Display referring sites:
displayReferrals($this);
?>
</TD>
<TR>
<TD VALIGN="top" WIDTH="120">
<?
dbconnect();
### Display admin blocks:
displayAdminblock($this);
### Display referring sites:
displayReferrals($this);
?>
</TD>
<TD VALIGN="top" WIDTH="440">
<TD VALIGN="top" WIDTH="440">
<?
}
@ -68,16 +69,22 @@
include "config.inc";
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20"><? if (rand(0,1) == 0) $img = "news5.gif"; else $img = "news5.gif"; ?><IMG
SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
<TD colspan="3" ALIGN="center" VALIGN="center" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsmiddle2.gif"><IMG SRC="themes/Jeroen/images/newsmiddle.gif" width="1" height="1" alt=""><B><? echo $subject; ?></B></TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20"><? if (rand(0,1) == 0) $img = "news6.gif"; else $img = "news6.gif"; ?><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
</TR>
<TR BACKGROUND="themes/Jeroen/images/menutitle.gif">
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" ><IMG SRC="themes/Jeroen/images/newsboxleft.gif" WIDTH="20" HEIGHT="20" alt=""></TD>
<TD COLSPAN="2" ALIGN="left" WIDTH="100%" BGCOLOR="#6C6C6C" HEIGHT=20 NOWRAP>&nbsp;<FONT COLOR="<? echo $this->fgcolor1; ?>"><?
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news5.gif"; else $img = "news7.gif"; ?><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
<TD colspan="3" ALIGN="center" VALIGN="center" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsmiddle2.gif">
<IMG SRC="themes/Jeroen/images/newsmiddle.gif" width="1" height="1" alt=""><B><? echo $subject; ?></B>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news6.gif"; else $img = "news8.gif"; if (rand(0,100) == 50) $img = "news9.gif"; ?><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
</TR>
<TR BACKGROUND="themes/Jeroen/images/menutitle.gif">
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" ><IMG SRC="themes/Jeroen/images/newsboxleft.gif" WIDTH="20" HEIGHT="20" alt="">
</TD>
<TD COLSPAN="2" ALIGN="left" WIDTH="100%" BGCOLOR="#6C6C6C" HEIGHT=20 NOWRAP>
&nbsp;<FONT COLOR="<? echo $this->fgcolor2; ?>">
<?
switch (rand(0,12)) {
case 0: $how = "Yelled at us"; break;
case 1: $how = "Whispered"; break;
@ -95,47 +102,58 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
}
if ($informant) {
print "<FONT SIZE=\"-1\">$how by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? print "</FONT></TD><TD ALIGN=\"right\" WIDTH=\"80\"><B><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A></B>&nbsp;";
print "<FONT SIZE=\"-1\">$how by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"right\" WIDTH=\"80\">
<B><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A></B>&nbsp;";
}
else {
print "<FONT SIZE=\"-1\">Reported to us by $anonymous on $timestamp"; ?><? print "</FONT></TD><TD ALIGN=\"center\" WIDTH=\"80\"><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A>";
print "<FONT SIZE=\"-1\">Reported to us by $anonymous on $timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"center\" WIDTH=\"80\"><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A>";
}
?></FONT>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif"><IMG SRC="themes/Jeroen/images/newsboxright.gif" width="20" height="20" alt=""></TD>
</TR>
<TR>
<TD ALIGN="right" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" WIDTH="20">&nbsp;
</TD>
<TD COLSPAN="3" VALIGN="top" width="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/Jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<?
if ($comments) {
echo "<P>$abstract</P><P><FONT COLOR=\"$this->hlcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$editor\">$editor</A>:</FONT>$comments</P>";
}
else {
echo $abstract;
}
?>
<TR>
<TD ALIGN="right">
<? echo $link; ?>
</TD>
</TR>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif"><IMG SRC="themes/Jeroen/images/newsboxright.gif" WIDTH="20" HEIGHT="20" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomleft.gif">&nbsp;</TD>
<TD COLSPAN="3" ALIGN="middle" HEIGHT="20" VALIGN="top" BACKGROUND="themes/Jeroen/images/newsboxbottom.gif">&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE><BR>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif">
<IMG SRC="themes/Jeroen/images/newsboxright.gif" width="20" height="20" alt="">
</TD>
</TR>
<TR>
<TD ALIGN="right" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" WIDTH="20">
&nbsp;
</TD>
<TD COLSPAN="3" VALIGN="top" width="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/Jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<?
if ($comments) {
echo "<P>$abstract</P><P><FONT COLOR=\"$this->hlcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$editor\">$editor</A>:</FONT>$comments</P>";
}
else {
echo $abstract;
}
?>
<TR>
<TD ALIGN="right">
<? echo $link; ?>
</TD>
</TR>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif">
<IMG SRC="themes/Jeroen/images/newsboxright.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomleft.gif">&nbsp;</TD>
<TD COLSPAN="3" ALIGN="middle" HEIGHT="20" VALIGN="top" BACKGROUND="themes/Jeroen/images/newsboxbottom.gif">&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE>
<BR>
<?
}
@ -148,33 +166,166 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
$timestamp = date("l, F d, Y - h:i:s A", $timestamp);
include "config.inc";
?>
<TABLE BORDER="0" CELLPADDING="4" WIDTH="100%">
<TR BGCOLOR="<? echo $this->bgcolor1; ?>"><TD><FONT COLOR="<? echo $this->bgcolor2; ?>"><B><? echo $subject; ?></B></FONT></TD></TR>
<TR BGCOLOR="<? echo $this->bgcolor1; ?>">
<TD>
<?
if ($informant) {
print "<FONT SIZE=\"-1\">Posted by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
}
else {
print "<FONT SIZE=\"-1\">Posted by $anonymous on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
}
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor3; ?>">
<TD>
<?
if ($abstract) echo "<P>$abstract<P>";
if ($comments) echo "<P><FONT COLOR=\"$this->bgcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$editor\">$editor</A>:</FONT> $comments</P>";
if ($article) echo "<P>$article</P>";
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>"><TD ALIGN="right"><? echo "$reply"; ?></TD></TR>
</TABLE><BR>
<?
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news5.gif"; else $img = "news5.gif"; ?><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD colspan="3" ALIGN="center" VALIGN="center" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsmiddle2.gif">
<IMG SRC="themes/Jeroen/images/newsmiddle.gif" width="1" height="1" alt=""><B><? echo $subject; ?></B>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news6.gif"; else $img = "news6.gif"; ?><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR BACKGROUND="themes/Jeroen/images/menutitle.gif">
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" >
<IMG SRC="themes/Jeroen/images/newsboxleft.gif" WIDTH="20" HEIGHT="20" alt="">
</TD>
<TD COLSPAN="2" ALIGN="left" WIDTH="100%" BGCOLOR="#6C6C6C" HEIGHT=20 NOWRAP>
&nbsp;<FONT COLOR="<? echo $this->fgcolor1; ?>">
<?
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"; break;
case 10: $how = "Made up"; break;
case 11: $how = "Uploaded"; break;
default: $how = "Sneaked through";
}
if ($informant) {
print "<FONT SIZE=\"-1\">$how by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"right\" WIDTH=\"80\">
<B><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A></B>&nbsp;";
}
else {
print "<FONT SIZE=\"-1\">Reported to us by $anonymous on $timestamp"; ?><? print "</FONT></TD><TD ALIGN=\"center\" WIDTH=\"80\"><A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$category</FONT></A>";
}
?></FONT>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif">
<IMG SRC="themes/Jeroen/images/newsboxright.gif" width="20" height="20" alt="">
</TD>
</TR>
<TR>
<TD ALIGN="right" BACKGROUND="themes/Jeroen/images/newsboxleft.gif" WIDTH="20">&nbsp;
</TD>
<TD COLSPAN="3" VALIGN="top" width="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/Jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<?
if ($comments) {
echo "<P>$abstract</P><P><FONT COLOR=\"$this->hlcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$editor\">$editor</A>:</FONT>$comments</P>";
}
else {
echo $abstract;
}
if ($article) echo "<P>$article</P>";
?>
<TR>
<TD ALIGN="right">
<? echo $reply; ?>
</TD>
</TR>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxright.gif">
<IMG SRC="themes/Jeroen/images/newsboxright.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomleft.gif">&nbsp;</TD>
<TD COLSPAN="3" ALIGN="middle" HEIGHT="20" VALIGN="top" BACKGROUND="themes/Jeroen/images/newsboxbottom.gif">&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE>
<BR>
<?
}
######
# Syntax.......: commentControl(...);
# Description..: this function is used to theme the comment control box.
function commentControl($sid, $title, $thold, $mode, $order) {
global $user;
dbconnect();
$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;
?>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/news5.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD ALIGN="center" VALIGN="center" WIDTH="100%" HEIGHT="20" BACKGROUND="themes/Jeroen/images/newsmiddle2.gif">
<B>Comment control</B></FONT>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/news6.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="center" BGCOLOR="#E7E7E7" BACKGROUND="themes/Jeroen/images/sketch.gif">
<FORM METHOD="get" ACTION="article.php">
<FONT SIZE="2">
<SELECT NAME="thold">
<OPTION VALUE="-1" <? if ($thold == -1) { echo "SELECTED"; } ?>>Threshold: -1
<OPTION VALUE="0" <? if ($thold == 0) { echo "SELECTED"; } ?>>Threshold: 0
<OPTION VALUE="1" <? if ($thold == 1) { echo "SELECTED"; } ?>>Threshold: 1
<OPTION VALUE="2" <? if ($thold == 2) { echo "SELECTED"; } ?>>Threshold: 2
<OPTION VALUE="3" <? if ($thold == 3) { echo "SELECTED"; } ?>>Threshold: 3
<OPTION VALUE="4" <? if ($thold == 4) { echo "SELECTED"; } ?>>Threshold: 4
<OPTION VALUE="5" <? if ($thold == 5) { echo "SELECTED"; } ?>>Threshold: 5
</SELECT>
<SELECT NAME="mode">
<OPTION VALUE="nocomments" <? if ($mode == 'nocomments') { echo "SELECTED"; } ?>>No comments
<OPTION VALUE="nested" <? if ($mode == 'nested') { echo "SELECTED"; } ?>>Nested
<OPTION VALUE="flat" <? if ($mode == 'flat') { echo "SELECTED"; } ?>>Flat
<OPTION VALUE="threaded" <? if (!isset($mode) || $mode=='threaded' || $mode=="") { echo "SELECTED"; } ?>>Threaded
</SELECT>
<SELECT NAME="order">
<OPTION VALUE="0" <? if (!$order) { echo "SELECTED"; } ?>>Oldest first
<OPTION VALUE="1" <? if ($order==1) { echo "SELECTED"; } ?>>Newest first
<OPTION VALUE="2" <? if ($order==2) { echo "SELECTED"; } ?>>Highest scoring first
</SELECT>
<INPUT TYPE="hidden" NAME="sid" VALUE="<? echo "$sid"; ?>"> <INPUT TYPE="submit" VALUE="Refresh">
<?
if (isset($user)) echo "<BR><CENTER><INPUT TYPE=\"checkbox\" NAME=\"save\"> Save preferences</CENTER>";
?>
</FONT>
</FORM>
</TD>
</TR>
<?
$result = mysql_query("SELECT COUNT(tid) FROM comments WHERE sid = $sid AND score < $thold");
if ($result && $number = mysql_result($result, 0)) {
?>
<TR>
<TD ALIGN="center" BGCOLOR="<? echo "$this->bgcolor2"; ?>">
<SMALL><FONT COLOR="<? echo "$this->fgcolor2"; ?>">There are at least <? echo $number; ?> comments below your threshold.</FONT></SMALL>
</TD>
</TR>
<?
}
?>
</TABLE>
<?
}
######
@ -189,14 +340,14 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
### Create comment header:
echo "<TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"2\" WIDTH=\"100%\">";
echo " <TR BGCOLOR=\"$this->bgcolor2\">";
echo " <TR BGCOLOR=\"#E7E7E\" BACKGROUND=\"themes/Jeroen/images/sketch.gif\">";
echo " <TD>";
echo " <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\"WIDTH=\"100%\">";
### Subject:
echo " <TR>";
echo " <TD ALIGN=\"right\" WIDTH=\"5%\"><FONT COLOR=\"$this->bgcolor1\"><B>Subject:</B></FONT></TD><TD WIDTH=\"80%\">";
echo " <B><FONT COLOR=\"$this->bgcolor1\">$subject</FONT></B>";
echo " <TD ALIGN=\"right\" WIDTH=\"5%\"><B>Subject:</B></TD><TD WIDTH=\"80%\">";
echo " <B>$subject</B>";
echo " &nbsp; <FONT SIZE=\"2\"> [Score: $score";
if (isset($reason)) echo ", $comments_meta_reasons[$reason]";
echo "]</FONT>";
@ -234,13 +385,13 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
echo " </TR>";
### Print body of comment:
if ($comment) echo " <TR><TD BGCOLOR=\"$this->bgcolor3\">$comment</TD></TR>";
if ($comment) echo " <TR><TD BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/Jeroen/images/sketch.gif\">$comment</TD></TR>";
### Print thread (if any):
if ($thread) echo " <TR><TD BGCOLOR=\"$this->bgcolor2\">$thread</TD></TR>";
if ($thread) echo " <TR><TD BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/Jeroen/images/sketch.gif\">$thread</TD></TR>";
### Print bottom link(s):
echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor2\">[ $link ]</TD></TR>";
echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/Jeroen/images/sketch.gif\">[ $link ]</TD></TR>";
echo " </TABLE>";
}
@ -254,15 +405,19 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
include "config.inc";
?>
<TABLE BORDER="0" CELLPADDING="4" WIDTH="100%">
<TR BGCOLOR="<? echo $this->bgcolor1; ?>"><TD><FONT COLOR="<? echo $this->bgcolor2; ?>"><B><? echo $subject; ?></B></FONT></TD></TR>
<TR BGCOLOR="<? echo $this->bgcolor1; ?>">
<TD><FONT COLOR="<? echo $this->bgcolor2; ?>">
<B><? echo $subject; ?></B></FONT>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>">
<TD>
<?
if ($informant) {
print "<FONT SIZE=\"-1\">Posted by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
print "<FONT SIZE=\"-1\">Posted by <A HREF=\"account.php?op=userinfo&uname=$informant\">$informant</A> on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
}
else {
print "<FONT SIZE=\"-1\">Posted by $anonymous on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
print "<FONT SIZE=\"-1\">Posted by $anonymous on $timestamp"; ?><? if ($department) echo "<BR>from the $department dept."; ?><? print "</FONT>";
}
?>
</TD>
@ -273,12 +428,12 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
if ($abstract) echo "<P>$abstract<P>";
if ($comments) echo "<P><FONT COLOR=\"$this->bgcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$editor\">$editor</A>:</FONT> $comments</P>";
if ($article) echo "<P>$article</P>";
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>"><TD ALIGN="right">&nbsp;</TD></TR>
</TABLE><BR>
<?
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>"><TD ALIGN="right">&nbsp;</TD></TR>
</TABLE><BR>
<?
}
######
@ -286,36 +441,59 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
# Description..: a function to draw a box/block.
function box($subject, $content) {
include "config.inc";
if (rand(0,40) == 20) $img = "boxbottomright6.gif";
if (rand(0,50) == 25) $img = "boxbottomright6.gif";
else $img = "boxbottomright5.gif";
$width = rand(10,200);
if (rand(0,100) == 50) $img2 = "boxtopleftside4.gif";
else $img2 ="boxtopleftside3.gif";
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20"><IMG SRC="themes/Jeroen/images/boxtopleft3.gif" width="20" height="20" alt=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" WIDTH="<? echo $width; ?>" BACKGROUND="themes/Jeroen/images/boxtop2.gif"><img src="themes/Jeroen/images/boxtop3.gif" width="1" height="1" alt=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" WIDTH="20" BACKGROUND="themes/Jeroen/images/boxtopmiddle.gif"><img src="themes/Jeroen/images/boxtop2.gif" width="1" height="1" alt=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtop2.gif"><img src="themes/Jeroen/images/boxtop2.gif" width="1" height="1" alt=""></TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20"><IMG SRC="themes/Jeroen/images/boxtopright3.gif" width="20" height="20" alt=""></TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/boxtopleft3.gif" WIDTH="20=" HEIGHT="20" ALT=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" WIDTH="<? echo $width; ?>" BACKGROUND="themes/Jeroen/images/boxtop2.gif">
<IMG SRC="themes/Jeroen/images/boxtop2.gif" WIDTH="1" HEIGHT="1" ALT=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" WIDTH="20" BACKGROUND="themes/Jeroen/images/boxtopmiddle.gif">
<IMG SRC="themes/Jeroen/images/boxtop2.gif" WIDTH="1" HEIGHT="1" ALT=""></TD>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtop2.gif">
<IMG SRC="themes/Jeroen/images/boxtop2.gif" WIDTH="1" HEIGHT="1" ALT=""></TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/boxtopright3.gif" WIDTH="20" HEIGHT="20" ALT=""></TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtopleftside3.gif"><IMG SRC="themes/Jeroen/images/boxtopleftside3.gif" WIDTH="20" HEIGHT="20" alt=""></TD>
<TD COLSPAN="3" ALIGN="center" BGCOLOR="#6C6C6C" BACKGROUND="themes/Jeroen/images/menutitle.gif" HEIGHT=20><FONT COLOR="<? echo $this->fgcolor1; ?>"><? echo $subject; ?></FONT></TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtoprightside3.gif"><IMG SRC="themes/Jeroen/images/boxtoprightside3.gif" width="20" height="20" alt=""></TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtopleftside3.gif">
<IMG SRC="themes/Jeroen/images/<? echo $img2; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD COLSPAN="3" ALIGN="center" BGCOLOR="#6C6C6C" BACKGROUND="themes/Jeroen/images/menutitle.gif" HEIGHT=20>
<FONT COLOR="<? echo $this->fgcolor2; ?>"><? echo $subject; ?></FONT>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/Jeroen/images/boxtoprightside3.gif">
<IMG SRC="themes/Jeroen/images/boxtoprightside3.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="right" BACKGROUND="themes/Jeroen/images/boxleft3.gif" WIDTH="20">&nbsp;</TD>
<TD COLSPAN="3" VALIGN="top" WIDTH="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/Jeroen/images/sketch.gif">
<TABLE WIDTH="100%"><TR><TD><? echo $content; ?></TD></TR></TABLE>
<TABLE WIDTH="100%">
<TR>
<TD>
<? echo $content; ?>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="left" BACKGROUND="themes/Jeroen/images/boxright3.gif" WIDTH="20">&nbsp;</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN=TOP WIDTH="20" HEIGHT="20"><IMG SRC="themes/Jeroen/images/boxbottomleft3.gif" width="20" height="20" alt=""></TD>
<TD COLSPAN="3" ALIGN="middle" HEIGHT="20" VALIGN="top" BACKGROUND="themes/Jeroen/images/boxbottom2.gif">&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20"><IMG SRC="themes/Jeroen/images/<? echo $img; ?>" width="20" height="20" alt=""></TD>
<TD ALIGN="right" VALIGN=TOP WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/boxbottomleft3.gif" WIDTH="20" HEIGHT="20" ALT=""></TD>
<TD COLSPAN="3" ALIGN="middle" HEIGHT="20" VALIGN="top" BACKGROUND="themes/Jeroen/images/boxbottom2.gif">
&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
</TR>
</TABLE><BR>
</TABLE>
<BR>
<?
}
@ -331,7 +509,7 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
$this->box("Drop where?", "<TABLE WIDTH=\"100%\"><TR><TD ALIGN=\"left\" VALIGN=\"top\"><A HREF=\"index.php\">home</A><BR><A HREF=\"faq.php\">faq</A><BR><A HREF=\"search.php\">search</A></TD><TD ALIGN=\"right\" VALIGN=\"top\"><A HREF=\"submit.php\">submit news</A><BR><A HREF=\"account.php\">user account</A><BR><A HREF=\"webboard.php\">webboard</A></TD></TR></TABLE>");
if (strstr($PHP_SELF, "index.php")) {
if (strstr($PHP_SELF, "index.php")) {
global $user;
### Display login box:
@ -342,12 +520,12 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
### Display old headlines:
displayOldHeadlines($this);
}
elseif (strstr($PHP_SELF, "account.php")) {
}
elseif (strstr($PHP_SELF, "account.php")) {
### Display account settings:
displayAccountSettings($this);
}
elseif (strstr($PHP_SELF, "article.php")) {
}
elseif (strstr($PHP_SELF, "article.php")) {
global $sid;
### Display related links:
@ -355,21 +533,21 @@ SRC="themes/Jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT=""></TD>
### Display new headlines:
displayNewHeadlines($this);
}
else {
### Display new headlines:
displayNewHeadlines($this);
}
?>
</TD>
</TR>
<TR>
<TD ALIGN="center" COLSPAN="3">
<FONT SIZE="2">[ <A HREF="">home</A> | <A HREF="/faq.php">faq</A> | <A HREF="/search.php">search</A> | <A HREF="/submit.php">submit news</A> | <A HREF="/account.php">user account</A> | <A HREF="/webboard.php">webboard</A> ] </FONT>
</TD>
</TR>
</TABLE>
</BODY>
}
else {
### Display new headlines:
displayNewHeadlines($this);
}
?>
</TD>
</TR>
<TR>
<TD ALIGN="center" COLSPAN="3">
<FONT SIZE="2">[ <A HREF="">home</A> | <A HREF="/faq.php">faq</A> | <A HREF="/search.php">search</A> | <A HREF="/submit.php">submit news</A> | <A HREF="/account.php">user account</A> | <A HREF="/webboard.php">webboard</A> ] </FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?
}