1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
|
<?
class Theme {
var $themename = "unconed";
var $cl80 = "#8B8E95";
var $clc0 = "#c8c8d0";
var $cl00 = "#000000";
// color set #1:
var $brcolor1 = "#000000"; // border color
var $bgcolor1 = "#B5BECE";
var $fgcolor1 = "#000000"; // table body color
var $hlcolor1 = "#000000"; // high-light color
var $categorycolor = "#202020";
// color set #2:
var $bgcolor2 = "#EEEEEE";
var $fgcolor2 = "#000000";
var $hlcolor2 = "#000000";
// color set #3:
var $bgcolor3 = "#D7D7D7";
var $fgcolor3 = "#000000";
var $hlcolor3 = "yellow";
function header() {
global $site_name;
srand((double)microtime()*1000000);
?>
<HTML>
<HEAD>
<TITLE><? echo $site_name; ?></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">
<!--
TABLE { border-width: 0; }
TD { border-width: 0; font-size: 9pt; font-family: verdana,helvetica,arial; }
P,UL,LI,DIV,FORM,EM,BLOCKQUOTE { font-size: 9pt; font-family: verdana,helvetica,arial; }
BODY { margin: 10px; font-size: 9pt; font-family: verdana,helvetica,arial; }
SMALL { font-size: 8pt; }
BIG { font-size: 10pt; }
-->
</STYLE>
<BODY TEXT="#000000" BGCOLOR="<? print $this->clc0; ?>" ALINK="#000000" LINK="#404040" VLINK="#404040" MARGINHEIGHT="10" MARGINWIDTH="10">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" ALIGN=CENTER>
<TR><TD BGCOLOR="<? print $this->cl00; ?>"><IMG SRC="themes/<? print $this->themename; ?>/images/null.gif" WIDTH="10"></TD><TD BGCOLOR="<? print $this->clc0; ?>"><IMG SRC="themes/<? print $this->themename; ?>/images/null.gif" WIDTH="4"></TD>
<TD BGCOLOR="<? print $this->cl80; ?>">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="9" BGCOLOR="<? print $this->cl80; ?>">
<TR>
<TD COLSPAN="2"><IMG SRC="themes/<? print $this->themename; ?>/images/logo.gif" ALT="drop.org logo"></TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="CENTER">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<? echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<? echo $this->bgcolor2; ?>"><BIG><A HREF="index.php">home</A> | <A HREF="module.php?mod=faq">faq</A> | <A HREF="module.php?mod=diary">diary</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">user account</A></BIG></TD></TR></TABLE></TD></TR></TABLE>
</TD>
</TR>
<TR><TD COLSPAN="2"><?
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" BGCOLOR=\"$this->brcolor1;\" WIDTH=\"100%\">";
print "<TR><TD>";
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"themes/" . $this->themename . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
print "</TABLE>";
print "</TR></TD></TABLE>";
?></TD></TR>
<TR>
<TD VALIGN="top" WIDTH="640">
<?
}
function abstract($story) {
$timestamp = format_date($story->timestamp);
print "\n<!-- story: \"$story->subject\" -->\n";
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
<TR><TD BGCOLOR="<? echo $this->bgcolor1; ?>" COLSPAN="2"><FONT COLOR="<? echo $this->fgcolor1; ?>"><B><? echo "". check_output($story->subject, 1) .""; ?></B></FONT></TD></TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>">
<?
if ($story->category) { print "<TD BGCOLOR=\"$this->bgcolor2\">"; }
else { print "<TD COLSPAN=\"2\" BGCOLOR=\"$this->bgcolor2\">"; }
if ($story->userid) { print "<SMALL>Posted by " . format_username($story->userid) . " on $timestamp"; }
else { print "<SMALL>Posted by $anonymous on $timestamp"; }
if ($story->department) { print " - from the $story->department dept."; }
print "</SMALL>";
if ($story->category) { print "</TD><TD BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\"><B><A HREF=\"search.php?category=" . urlencode($story->category) . "\"><FONT COLOR=\"$this->categorycolor\">$story->category</FONT></A></B>"; }
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>">
<TD BGCOLOR="<? echo $this->bgcolor2 ?>" COLSPAN="2">
<?
echo "<P>" . check_output($story->abstract, 1) ."</P>";
if ($story->updates) {
echo "<P><FONT COLOR=\"$this->fgcolor3\">Editor's note by " . format_username($editor) . ":</FONT> ". check_output($story->updates, 1) ."</P>";
}
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor3; ?>"><TD BGCOLOR="<? echo $this->bgcolor3 ?>" ALIGN="right" COLSPAN="2"><? echo theme_morelink($this, $story) ?></TD></TR>
</TABLE></TD></TR></TABLE><BR>
<?
}
function article($story, $reply) {
$timestamp = format_date($story->timestamp);
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
<TR><TD COLSPAN="2" BGCOLOR="<? echo $this->bgcolor1; ?>"><FONT COLOR="<? echo $this->fgcolor1; ?>"><B><? echo $story->subject; ?></B></FONT></TD></TR>
<TR BGCOLOR="<? echo $this->bgcolor3; ?>">
<?
if ($story->category) { print "<TD BGCOLOR=\"$this->bgcolor3\">"; }
else { print "<TD COLSPAN=\"2\" BGCOLOR=\"$this->bgcolor3\">"; }
if ($story->userid) { print "<SMALL>Posted by " . format_username($story->userid) . " on $timestamp"; }
else { print "<SMALL>Posted by $anonymous on $timestamp"; }
if ($story->department) { print " - from the $story->department dept."; }
print "</SMALL>";
if ($story->category) { print "</TD><TD BGCOLOR=\"$this->bgcolor3\" ALIGN=\"center\"><B><A HREF=\"search.php?category=" . urlencode($story->category) . "\"><FONT COLOR=\"$this->categorycolor\">$story->category</FONT></A></B>"; }
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor2; ?>">
<TD COLSPAN="2" BGCOLOR="<? echo $this->bgcolor2 ?>" >
<?
if ($story->abstract) print "<P>". check_output($story->abstract, 1) ."</P>\n";
if ($story->updates) print "<P><FONT COLOR=\"$this->bgcolor2\">Editor's note:</FONT> ". check_output($story->updates, 1) ."</P>\n";
if ($story->article) print "<P>". check_output($story->article, 1) ."</P>\n";
?>
</TD>
</TR>
<TR BGCOLOR="<? echo $this->bgcolor3; ?>"><TD COLSPAN="2" BGCOLOR="<? echo $this->bgcolor3 ?>" ALIGN="right"><? echo "$reply"; ?></TD></TR>
</TABLE></TD></TR></TABLE><BR>
<?
}
function commentControl($sid, $title, $threshold, $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($threshold)) $threshold = 0;
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<?
print "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" WIDTH=\"100%\">";
print " <TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor1\"><FONT COLOR=\"$this->fgcolor1\"><B>Comment Control</B></FONT></TD></TR>";
print " <TR><TD BGCOLOR=\"$this->bgcolor2\">";
?>
<FORM METHOD="post" ACTION="discussion.php">
<FONT SIZE="2">
<SELECT NAME="threshold">
<OPTION VALUE="-1" <? if ($threshold == -1) { echo "SELECTED"; } ?>>Threshold: -1</OPTION>
<OPTION VALUE="0" <? if ($threshold == 0) { echo "SELECTED"; } ?>>Threshold: 0</OPTION>
<OPTION VALUE="1" <? if ($threshold == 1) { echo "SELECTED"; } ?>>Threshold: 1</OPTION>
<OPTION VALUE="2" <? if ($threshold == 2) { echo "SELECTED"; } ?>>Threshold: 2</OPTION>
<OPTION VALUE="3" <? if ($threshold == 3) { echo "SELECTED"; } ?>>Threshold: 3</OPTION>
<OPTION VALUE="4" <? if ($threshold == 4) { echo "SELECTED"; } ?>>Threshold: 4</OPTION>
<OPTION VALUE="5" <? if ($threshold == 5) { echo "SELECTED"; } ?>>Threshold: 5</OPTION>
</SELECT>
<SELECT NAME="mode">
<OPTION VALUE="nested" <? if ($mode == 'nested') { echo "SELECTED"; } ?>>Nested</OPTION>
<OPTION VALUE="flat" <? if ($mode == 'flat') { echo "SELECTED"; } ?>>Flat</OPTION>
<OPTION VALUE="threaded" <? if (!isset($mode) || $mode=='threaded' || $mode=="") { echo "SELECTED"; } ?>>Threaded</OPTION>
</SELECT>
<SELECT NAME="order">
<OPTION VALUE="0" <? if (!$order) { echo "SELECTED"; } ?>>Oldest first</OPTION>
<OPTION VALUE="1" <? if ($order == 1) { echo "SELECTED"; } ?>>Newest first</OPTION>
<OPTION VALUE="2" <? if ($order == 2) { echo "SELECTED"; } ?>>Highest scoring first</OPTION>
</SELECT>
<INPUT TYPE="hidden" NAME="id" VALUE="<? echo "$sid"; ?>">
<INPUT TYPE="submit" NAME="op" VALUE="Save">
</FONT>
<?
$number=discussion_num_filtered($sid, $pid);
if ($number>0)
{
?>
<BR><SMALL>There are at least <? echo format_plural($number, "comment", "comments"); ?> below your threshold.</SMALL>
<?
}
print "</TD></TR>";
print "</TABLE>";
?>
</TD></TR>
</TABLE><BR>
<?
}
function comment($comment, $link, $thread = "") {
print "<A NAME=\"$comment->cid\"></A>\n";
print "\n<!-- Comment: \"$comment->subject\" by $comment->userid -->\n";
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<?
// Create comment header:
echo "<TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"1\" WIDTH=\"100%\">";
echo " <TR BGCOLOR=\"$this->bgcolor1\">";
echo " <TD BGCOLOR=\"$this->bgcolor1\">";
echo " <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\"WIDTH=\"100%\">";
// Subject:
echo " <TR>";
echo " <TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"5%\"><FONT COLOR=\"$this->hlcolor1\"><B>Subject:</B></FONT></TD><TD WIDTH=\"80%\">";
echo " <B><FONT COLOR=\"$this->fgcolor1\">" . check_output($comment->subject) . "</FONT></B>";
echo " </TD>";
// Moderation:
echo " <TD ALIGN=\"right\" ROWSPAN=\"3\" VALIGN=\"middle\" WIDTH=\"15%\">";
print theme_comment_moderation($comment);
echo " </TD>";
echo " </TR>";
// Author:
echo " <TR>";
echo " <TD ALIGN=\"right\" VALIGN=\"top\">Author:</TD><TD><B>" . format_username($comment->userid) . "</B> ";
if ($comment->userid != $anonymous) {
// Display extra information line:
if ($comment->fake_email) $info .= format_email($comment->fake_email);
if (eregi("http://",$comment->url)) $info .= " | " . format_url($comment->url);
if ($info) echo "<BR>[ $info ]";
}
echo " </TD>";
echo " </TR>";
// Date
echo " <TR><TD ALIGN=\"right\">Date:</TD><TD>". format_date($comment->timestamp) ."</TD></TR>";
echo " </TABLE>";
echo " </TD>";
echo " </TR>";
// Print body of comment:
if ($comment) echo " <TR><TD BGCOLOR=\"$this->bgcolor2\">". check_output($comment->comment, 1) ."</TD></TR>";
// Print thread (if any):
if ($thread) echo " <TR><TD BGCOLOR=\"$this->bgcolor3\">$thread</TD></TR>";
// Print bottom link(s):
echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor3\">[ $link ]</TD></TR>";
echo " </TABLE>";
?></TD></TR></TABLE><BR><?
}
function box($subject, $content) {
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<?
print "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" WIDTH=\"100%\">";
print " <TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor1\" NOWRAP><FONT COLOR=\"$this->fgcolor1\"><B>$subject</B></FONT></TD></TR>";
print " <TR><TD BGCOLOR=\"$this->bgcolor2\">$content</TD></TR>";
print "</TABLE>";
?>
</TD></TR>
</TABLE><BR>
<?
}
function footer() {
?>
</TD>
<TD VALIGN="top" WIDTH="185">
<?
// Display main blocks:
theme_main_blocks($this);
// Display user-defined blocks:
theme_user_blocks($this);
?>
</TD>
</TR>
<TR><TD COLSPAN="2"><?
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" BGCOLOR=\"$this->brcolor1;\" WIDTH=\"100%\">";
print "<TR><TD>";
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"themes/" . $this->themename . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
print "</TABLE>";
print "</TR></TD></TABLE>";
?></TD></TR>
<TR>
<TD COLSPAN="2">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<? echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<? echo $this->bgcolor2; ?>"><BIG><A HREF="index.php">home</A> | <A HREF="module.php?mod=faq">faq</A> | <A HREF="module.php?mod=diary">diary</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">user account</A></BIG></TD></TR></TABLE></TD></TR></TABLE>
</TD>
</TR>
</TABLE>
</TD><TD BGCOLOR="<? print $this->clc0; ?>"><IMG SRC="themes/<? print $this->themename; ?>/images/null.gif" WIDTH="4"></TD><TD BGCOLOR="<? print $this->cl00; ?>"><IMG SRC="themes/<? print $this->themename; ?>/images/null.gif" WIDTH="10"></TD></TR>
</TABLE>
</BODY>
</HTML>
<?
}
}
?>
|