- removed redundant spaces

3-00
Dries Buytaert 2001-01-26 13:38:46 +00:00
parent 34a927e6e3
commit d386c110f4
50 changed files with 248 additions and 246 deletions

View File

@ -5,4 +5,4 @@
* http://drop.org/module.php?mod=drupal
- drupal project page

View File

@ -5,8 +5,8 @@ include "includes/common.inc";
// validate user permission:
if (!($user->permissions == 1 || $user->id == 1)) exit();
function admin_page($mod) {
global $repository, $menu, $modules;
function admin_page($mod) {
global $repository, $site_name, $menu, $modules;
function module($name, $module) {
global $menu, $modules;
@ -17,7 +17,7 @@ function admin_page($mod) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>Administration</TITLE></HEAD>
<HEAD><TITLE><? echo $site_name; ?> administration</TITLE></HEAD>
<STYLE>
body { font-family: helvetica, arial; }
h1 { font-size: 18pt; font-weight: bold; color: #990000; }
@ -30,10 +30,10 @@ function admin_page($mod) {
<H1>Administration</H1>
<?
ksort($repository);
ksort($repository);
module_iterate("module");
?>
?>
<HR><? echo $menu; ?><A HREF="">home</A><HR>
<?

View File

@ -6,12 +6,12 @@ function cron_run() {
global $repository;
$time = time();
$result = db_query("SELECT * FROM crons WHERE $time - timestamp > scheduled");
while ($task = db_fetch_object($result)) {
if ($repository[$task->module]["cron"]) {
watchdog("message", "cron: executed '". $task->module ."_cron()'");
watchdog("message", "cron: executed '". $task->module ."_cron()'");
$repository[$task->module]["cron"]();
}
}

View File

@ -4,7 +4,7 @@ function error_flood() {
global $site_email;
print "WARNING: submission rate exceeded. We detected too much data or events from your IP. Please wait a few minutes and try again. If you think this is not justified, please contact us at <A HREF=\"mailto:$site_email\">$site_email</A>.";
}
}
function error_httpd() {
global $REDIRECT_STATUS, $REDIRECT_URL, $HTTP_REFERER, $HTTP_USER_AGENT;
@ -30,7 +30,7 @@ function error_httpd() {
}
watchdog("error", "message: `$message' - requested url: $REDIRECT_URL - referring url: $HTTP_REFERER - user agent: $HTTP_USER_AGENT");
print "<PRE>\n";
print "<H1>Oops, an error occured!</H1>\n";
print "<B>Processed output:</B><BR>\n";
@ -43,7 +43,7 @@ include "includes/common.inc";
switch ($op) {
case "flood":
error_flood();
error_flood();
break;
default:
error_httpd();

View File

@ -1,11 +1,11 @@
<?
$type2index = array("addresses" => 0x01,
"profanity" => 0x02,
$type2index = array("addresses" => 0x01,
"profanity" => 0x02,
"hostnames" => 0x03,
"usernames" => 0x04);
$index2type = array(0x01 => "addresses",
$index2type = array(0x01 => "addresses",
0x02 => "profanity",
0x03 => "hostnames",
0x04 => "usernames");
@ -14,7 +14,7 @@ $index2type = array(0x01 => "addresses",
function ban_match($mask, $category) {
// Perform query:
$result = db_query("SELECT * FROM bans WHERE type = $category AND LOWER('$mask') LIKE LOWER(mask)");
// Return result:
return db_fetch_object($result);
}
@ -36,7 +36,7 @@ function ban_add($mask, $category, $reason, $message = "") {
watchdog("message", "added new ban `$mask' to category `". $index2type[$category] ."' with reason `$reason'.");
}
}
function ban_delete($id) {
global $index2type;

View File

@ -20,8 +20,8 @@ function db_query($query, $debug = false) {
// debug output (if required):
if ($debug) print "<PRE>query: ". htmlspecialchars($query) ."<BR>error message: ". mysql_error() ."</PRE>";
if (!$qid) watchdog("error", "database: ". mysql_error() ."<BR>query: ". htmlspecialchars($query) ."");
// return result from query:
// return result from query:
return $qid;
}

View File

@ -19,21 +19,21 @@ $site_email = "info@yourdomain.com";
#
# Comment votes:
# the keys of this associative array are displayed in each
# comment's selection box whereas the corresponding values
# represent the mathematical calculation to be performed
# the keys of this associative array are displayed in each
# comment's selection box whereas the corresponding values
# represent the mathematical calculation to be performed
# to update a comment's value.
#
$comment_votes = array("none" => "none",
"-1" => "- 1",
$comment_votes = array("none" => "none",
"-1" => "- 1",
"0" => "+ 0",
"+1" => "+ 1",
"+2" => "+ 2",
"+3" => "+ 3",
"+4" => "+ 4",
"+3" => "+ 3",
"+4" => "+ 4",
"+5" => "+ 5");
#
#
# Allowed HTML tags:
#
$allowed_html = "<A><B><BLOCKQUOTE><BR><DD><DL><DT><EM><HR><I><LI><SMALL><OL><U><UL>";
@ -52,18 +52,18 @@ $themes = array("UnConeD" => array(
"themes/unconed/unconed.theme",
"modern theme, gray and blue, high coolness factor"),
"Marvin" => array(
"themes/marvin/marvin.theme",
"themes/marvin/marvin.theme",
"classic theme, white, basic design with a fresh look"));
#
# Submission moderation votes:
# the keys of this associative array are displayed in each
# submission's selection box whereas the corresponding values
# represent the mathematical calculation to be performed to
# the keys of this associative array are displayed in each
# submission's selection box whereas the corresponding values
# represent the mathematical calculation to be performed to
# update a comment's value.
# Warning: changing $submission_votes will affect the integrity
# of all pending stories in the open submission queue. Do not
# change this setting unless there are no pending stories in the
# of all pending stories in the open submission queue. Do not
# change this setting unless there are no pending stories in the
# submission queue or unless you know what you are doing.
$submission_votes = array("neutral (+0)" => "+ 0",
"post it (+1)" => "+ 1",
@ -75,7 +75,7 @@ $submission_votes = array("neutral (+0)" => "+ 0",
# submission. It is supposed to stop malicious attempts to screw
# with the database and to stop denial of service attacks.
# Example:
# '"comment" => 60' means that there is only one new comment
# '"comment" => 60' means that there is only one new comment
# allowed from the same IP-address every 60 seconds.
#
$submission_rate = array("comment" => "60", // 60 seconds = 1 minute
@ -83,7 +83,7 @@ $submission_rate = array("comment" => "60", // 60 seconds = 1 minute
"story" => "300"); // 300 seconds = 5 minutes
#
# Submission size:
# the maximum length (i.e. the maximum number of characters) a
# the maximum length (i.e. the maximum number of characters) a
# story, a diary entry, or a comment is allowed to be.
#
$submission_size = 12000; // 12.000 characters is more or less 300 lines

View File

@ -16,7 +16,7 @@ function module_rehash_crons($name, $module) {
if ($module["cron"]) {
if (!db_fetch_object(db_query("SELECT * FROM crons WHERE module = '$name'"))) {
db_query("INSERT INTO crons (module, scheduled, timestamp) VALUES ('". check_input($name) ."', '172800', '0')");
}
}
}
else {
db_query("DELETE FROM crons WHERE module = '$name'");
@ -24,7 +24,7 @@ function module_rehash_crons($name, $module) {
}
function module_rehash_blocks($name, $module) {
db_query("DELETE FROM blocks WHERE module = '$name'");
db_query("DELETE FROM blocks WHERE module = '$name'");
if ($module["block"] && $blocks = $module["block"]()) {
foreach ($blocks as $offset=>$block) {
db_query("INSERT INTO blocks (name, module, offset) VALUES ('". check_input($block["info"]) ."', '". check_input($name) ."', '". check_input($offset) ."')");
@ -34,7 +34,7 @@ function module_rehash_blocks($name, $module) {
function module_rehash($name) {
global $repository;
if ($module = $repository[$name]) {
$result = db_query("SELECT * FROM modules WHERE name = '$name'");

View File

@ -12,7 +12,7 @@ function submission_score($id) {
function submission_vote($id, $vote, $comment) {
global $user;
if (!user_getHistory($user->history, "s$id")) {
// Update submission's score- and votes-field:
db_query("UPDATE stories SET score = score $vote, votes = votes + 1 WHERE id = $id");
@ -25,9 +25,9 @@ function submission_vote($id, $vote, $comment) {
// Update user's history record:
user_setHistory($user, "s$id", $vote);
// Update story table (if required):
$result = db_query("SELECT * FROM stories WHERE id = $id");
$result = db_query("SELECT * FROM stories WHERE id = $id");
if ($submission = db_fetch_object($result)) {
if (section_post_threshold($submission->section) <= $submission->score) {
db_query("UPDATE stories SET status = 2, timestamp = '". time() ."' WHERE id = $id");

View File

@ -4,7 +4,7 @@ function theme_load() {
global $user, $themes;
if ($user->theme && file_exists($themes[$user->theme][0])) {
include_once $themes[$user->theme][0];
include_once $themes[$user->theme][0];
}
else {
include_once $themes[key($themes)][0];
@ -14,8 +14,8 @@ function theme_load() {
function theme_account($theme) {
global $user, $site_name, $links, $menu;
if ($user->id) {
if ($user->id) {
function submission_number() {
$result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1");
@ -72,7 +72,7 @@ function theme_account($theme) {
function theme_blocks($region, $theme) {
global $id, $PHP_SELF, $user;
switch (strrchr($PHP_SELF, "/")) {
case "/story.php":
if ($user->id) $story = db_fetch_object(db_query("SELECT * FROM stories WHERE id = '$id'"));
@ -84,7 +84,7 @@ function theme_blocks($region, $theme) {
else $result = db_query("SELECT * FROM blocks WHERE status = 2 ORDER BY weight");
while ($block = db_fetch_object($result)) {
$blocks = module_execute($block->module, "block");
$theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]);
$theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]);
}
break;
}
@ -102,7 +102,7 @@ function theme_moderation_results($theme, $story) {
while ($account = db_fetch_object($result)) {
$output .= format_username($account->userid) ." voted `". user_getHistory($account->history, "s$story->id") ."'.<BR>";
}
$theme->box("Moderation results", ($output ? $output : "This story has not been moderated yet."));
}
}
@ -116,7 +116,7 @@ function theme_related_links($theme, $story) {
if (!stristr($link, "mailto:")) $content .= "<LI>$link</LI>";
}
// Stories in the same section:
// Stories in the same section:
$content .= " <LI>More about <A HREF=\"index.php?section=". urlencode($story->section) ."\">$story->section</A>.</LI>";
// Stories from the same author:
@ -137,11 +137,11 @@ function theme_new_headlines($theme, $num = 10) {
function theme_old_headlines($theme, $num = 10) {
global $user;
if ($user->stories) $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $user->stories, $num");
else $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $num, $num");
while ($story = db_fetch_object($result)) {
while ($story = db_fetch_object($result)) {
if ($time != date("F jS", $story->timestamp)) {
$content .= "<P><B>". date("l, M jS", $story->timestamp) ."</B></P>\n";
$time = date("F jS", $story->timestamp);

View File

@ -12,12 +12,12 @@ class User {
function user_save($data, $id = 0) {
global $user;
foreach ($data as $key=>$value) {
if ($key == "passwd") $query .= "$key = PASSWORD('". addslashes($value) ."'), ";
else $query .= "$key = '". addslashes($value) ."', ";
}
if (empty($id)) {
db_query("INSERT INTO users SET $query last_access = '". time() ."', last_host = '$GLOBALS[REMOTE_HOST]'");
}
@ -36,7 +36,7 @@ function user_getHistory($history, $field) {
if (reset($entry) == $field) $rval = end($entry);
}
return $rval;
}
}
function user_setHistory(&$user, $field, $value) {
@ -56,7 +56,7 @@ function user_setHistory(&$user, $field, $value) {
$entry = explode(":", current($data));
if ($entry[0] == $field) $entry[1] = $value;
$rval .= "$entry[0]:$entry[1];";
}
}
}
else {
// not found: add new entry:

View File

@ -12,8 +12,8 @@ function watchdog($id, $message) {
if ($watchdog[$id][1] && !($user->permissions == 1 || $user->id == 1)) {
if ($log = db_fetch_object(db_query("SELECT * FROM watchdog WHERE hostname = '". getenv("REMOTE_ADDR") ."' AND level = '". $watchdog[$id][0] ."'"))) {
if (time() - $log->timestamp < $watchdog[$id][1]) {
watchdog("warning", "'". getenv("REMOTE_ADDR") ."' exceeded '$id' submission rate");
if (time() - $log->timestamp < $watchdog[$id][1]) {
watchdog("warning", "'". getenv("REMOTE_ADDR") ."' exceeded '$id' submission rate");
header("Location: error.php?op=flood");
exit();
}
@ -28,5 +28,5 @@ function watchdog_clean($history = 302400) {
$timestamp = time() - $history;
db_query("DELETE FROM watchdog WHERE timestamp < $timestamp");
}
?>

View File

@ -24,7 +24,7 @@ function account_display($order = "username") {
// Perform query:
$result = db_query("SELECT u.id, u.userid, u.". strtok($sort[$order], " ") .", u.url FROM users u ORDER BY $sort[$order]");
// Generate output:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";
@ -57,7 +57,7 @@ function account_display($order = "username") {
case "last_access":
$output .= " <TD>". format_interval(time() - $account[$value]) ." ago</TD>\n";
break;
case "status":
case "status":
$output .= " <TD ALIGN=\"center\">". $stat[$account[$value]] ."</TD>\n";
break;
case "permissions":
@ -117,12 +117,12 @@ function account_edit($name) {
if ($account = db_fetch_object($result)) {
foreach ($status as $key=>$value) {
$stat .= " <OPTION VALUE=\"$key\"". (($account->status == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
$stat .= " <OPTION VALUE=\"$key\"". (($account->status == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
}
$stat = "<SELECT NAME=\"edit[status]\">\n$stat</SELECT>\n";
foreach ($permissions as $key=>$value) {
$perm .= " <OPTION VALUE=\"$key\"". (($account->permissions == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
$perm .= " <OPTION VALUE=\"$key\"". (($account->permissions == $key) ? " SELECTED" : "") .">$value</OPTION>\n";
}
$perm = "<SELECT NAME=\"edit[permissions]\">\n$perm</SELECT>\n";
@ -202,7 +202,7 @@ function account_admin() {
account_display($order);
break;
default:
account_display();
account_display();
}
}

View File

@ -36,7 +36,7 @@ function affiliate_block() {
$content .= " </SELECT>\n";
$content .= "</FORM>\n";
$content .= "</CENTER>\n";
$blocks[0]["subject"] = "Affiliate sites";
$blocks[0]["content"] = $content;
$blocks[0]["info"] = "Affiliate sites (selection)";
@ -51,7 +51,7 @@ function affiliate_block() {
$blocks[1]["subject"] = "Affiliate sites";
$blocks[1]["content"] = $content;
$blocks[1]["info"] = "Affiliate sites (sequential)";
return $blocks;
}

View File

@ -48,27 +48,29 @@ class backend {
}
function rdf2sql($timout = 10) {
global $site_name;
if ($this->file) {
// Decode URL:
$url = parse_url($this->file);
$host = $url[host];
$port = $url[port] ? $url[port] : 80;
$path = $url[path];
// print "<PRE><B>Debug:</B> $url - $host - $port - $path</PRE>";
// Retrieve data from website:
$fp = fsockopen($host, $port, &$errno, &$errstr, $timout);
if ($fp) {
// Get data from URL:
fputs($fp, "GET $path HTTP/1.0\n");
fputs($fp, "User-Agent: headline grabber\n");
fputs($fp, "User-Agent: $site_name\n");
fputs($fp, "Host: ". $host ."\n");
fputs($fp, "Accept: */*\n\n");
while(!feof($fp)) $data .= fgets($fp, 128);
// print "<PRE>$data</PRE><HR>";
if (strstr($data, "200 OK")) {
@ -80,7 +82,7 @@ class backend {
$data = ereg_replace("<?xml.*/image>", "", $data);
$data = ereg_replace("</rdf.*", "", $data);
$data = chop($data);
// Iterating through our data processing each entry/item:
$items = explode("</item>", $data);
$number = 0;
@ -90,18 +92,18 @@ class backend {
$link = ereg_replace(".*<link>", "", $item);
$link = ereg_replace("</link>.*", "", $link);
$title = ereg_replace(".*<title>", "", $item);
$title = ereg_replace("</title>.*", "", $title);
$title = ereg_replace("</title>.*", "", $title);
// Clean headlines:
$title = stripslashes($title);
// Count the number of stories:
$number += 1;
// Insert item in database:
$result = db_query("INSERT INTO headlines (id, title, link, number) VALUES('". check_input($this->id) ."', '". check_input($title) ."', '". check_input($link) ."', '". check_input($number) ."')");
}
// Mark channels as being updated:
$result = db_query("UPDATE channel SET timestamp = '". time() ."' WHERE id = $this->id");
$this->timestamp = time();
@ -143,8 +145,8 @@ class backend {
}
// Add timestamp:
$update = round((time() - $this->timestamp) / 60);
$content .= "<P ALIGN=\"right\">[ <A HREF=\"backend.php?op=reset&site=$this->site\"><FONT COLOR=\"$theme->hlcolor2\">reset</FONT></A> | updated $update min. ago ]</P>";
$content .= "<P ALIGN=\"right\">[ <A HREF=\"backend.php?op=reset&site=$this->site\"><FONT COLOR=\"$theme->hlcolor2\">reset</FONT></A> | updated $update min. ago ]</P>";
// Display box:
$theme->box("$this->site", $content);
}
@ -152,24 +154,24 @@ class backend {
}
function add() {
// Add channel:
// Add channel:
$result = db_query("INSERT INTO channel (site, file, url, contact, timestamp) VALUES ('". check_input($this->site) ."', '". check_input($this->file) ."', '". check_input($this->url) ."', '". check_input($this->contact) ."', 1)");
}
function delete() {
// Delete channel:
// Delete channel:
$result = db_query("DELETE FROM channel WHERE id = $this->id");
// Delete headlines:
$result = db_query("DELETE FROM headlines WHERE id = $this->id");
$result = db_query("DELETE FROM headlines WHERE id = $this->id");
}
function refresh() {
// Delete headlines:
$result = db_query("DELETE FROM headlines WHERE id = $this->id");
$result = db_query("DELETE FROM headlines WHERE id = $this->id");
// Mark channel as invalid to enforce an update:
$result = db_query("UPDATE channel SET timestamp = 1 WHERE id = $this->id");
$result = db_query("UPDATE channel SET timestamp = 1 WHERE id = $this->id");
}
function dump() {

View File

@ -37,12 +37,12 @@ function ban_admin_new($mask, $category, $reason) {
function ban_display($category = "") {
global $type2index;
// initialize variable:
// initialize variable:
$category = $category ? $category : 1;
// Perform query:
$result = db_query("SELECT * FROM bans WHERE type = $category ORDER BY mask");
// Generate output:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";
@ -67,7 +67,7 @@ function ban_display($category = "") {
}
$output .= " <TR><TD COLSPAN=\"3\"><SMALL>%: matches any number of characters, even zero characters.<BR>_: matches exactly one character.</SMALL></TD></TR>\n";
$output .= "</TABLE>\n";
print $output;
}
@ -88,7 +88,7 @@ function ban_admin_add() {
$output .= "<TEXTAREA NAME=\"reason\" COLS=\"50\" ROWS=\"5\"></TEXTAREA><P>\n";
$output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add ban\"><BR>\n";
$output .= "</FORM>\n";
print $output;
}

View File

@ -17,18 +17,18 @@ function block_page() {
global $theme;
$result = db_query("SELECT * FROM blocks WHERE status = 1 ORDER BY module");
$theme->header();
print "<TABLE BORDER=\"0\">\n";
while ($block = db_fetch_object($result)) {
if ($state % 3 == 0) print " <TR>\n";
print " <TD ALIGN=\"center\" VALIGN=\"top\" WIDTH=\"33%\">\n";
print " <TD ALIGN=\"center\" VALIGN=\"top\" WIDTH=\"33%\">\n";
$blocks = module_execute($block->module, "block");
$theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]);
print " </TD>\n";
if ($state % 3 == 2) print " </TR>\n";
$state += 1;
}
}
print "</TABLE>\n";
$theme->footer();
}
@ -43,12 +43,12 @@ function block_admin_display() {
global $repository;
$result = db_query("SELECT * FROM blocks ORDER BY module");
// Generate output:
$output .= "<FORM ACTION=\"admin.php?mod=block\" METHOD=\"post\">\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>block</TH><TH>module</TH><TH>status</TH><TH>weight</TH><TH>region</TH></TR>\n";
while ($block = db_fetch_object($result)) {
$module = ($repository[$block->module]["admin"]) ? "<A HREF=\"admin.php?mod=$block->module\">$block->module</A>" : $block->module;
@ -70,12 +70,12 @@ function block_admin_display() {
$region .= "</SELECT>\n";
$output .= " <TR><TD>". $block->name ."</TD><TD ALIGN=\"center\">$module</TD><TD>$status</TD><TD>$weight</TD><TD>$region</TD></TR>\n";
unset($status);
unset($weight);
unset($region);
}
$output .= "</TABLE>\n";
$output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Save blocks\">\n";
$output .= "</FORM>\n";
@ -95,7 +95,7 @@ function block_admin_overview() {
$rblocks .= "<TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
while ($block = db_fetch_object($result)) $rblocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$rblocks .= "</TABLE>\n";
$output .= "<P><B>layout 1:</B></P>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"3\">$site_name header</TD></TR>\n";
@ -127,7 +127,7 @@ function block_admin_overview() {
function block_admin() {
global $op, $edit;
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=overview\">overview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
switch ($op) {
@ -143,7 +143,7 @@ function block_admin() {
default:
block_admin_display();
}
}
?>

View File

@ -17,18 +17,18 @@ function block_page() {
global $theme;
$result = db_query("SELECT * FROM blocks WHERE status = 1 ORDER BY module");
$theme->header();
print "<TABLE BORDER=\"0\">\n";
while ($block = db_fetch_object($result)) {
if ($state % 3 == 0) print " <TR>\n";
print " <TD ALIGN=\"center\" VALIGN=\"top\" WIDTH=\"33%\">\n";
print " <TD ALIGN=\"center\" VALIGN=\"top\" WIDTH=\"33%\">\n";
$blocks = module_execute($block->module, "block");
$theme->box($blocks[$block->offset]["subject"], $blocks[$block->offset]["content"]);
print " </TD>\n";
if ($state % 3 == 2) print " </TR>\n";
$state += 1;
}
}
print "</TABLE>\n";
$theme->footer();
}
@ -43,12 +43,12 @@ function block_admin_display() {
global $repository;
$result = db_query("SELECT * FROM blocks ORDER BY module");
// Generate output:
$output .= "<FORM ACTION=\"admin.php?mod=block\" METHOD=\"post\">\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>block</TH><TH>module</TH><TH>status</TH><TH>weight</TH><TH>region</TH></TR>\n";
while ($block = db_fetch_object($result)) {
$module = ($repository[$block->module]["admin"]) ? "<A HREF=\"admin.php?mod=$block->module\">$block->module</A>" : $block->module;
@ -70,12 +70,12 @@ function block_admin_display() {
$region .= "</SELECT>\n";
$output .= " <TR><TD>". $block->name ."</TD><TD ALIGN=\"center\">$module</TD><TD>$status</TD><TD>$weight</TD><TD>$region</TD></TR>\n";
unset($status);
unset($weight);
unset($region);
}
$output .= "</TABLE>\n";
$output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Save blocks\">\n";
$output .= "</FORM>\n";
@ -95,7 +95,7 @@ function block_admin_overview() {
$rblocks .= "<TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
while ($block = db_fetch_object($result)) $rblocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$rblocks .= "</TABLE>\n";
$output .= "<P><B>layout 1:</B></P>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"3\">$site_name header</TD></TR>\n";
@ -127,7 +127,7 @@ function block_admin_overview() {
function block_admin() {
global $op, $edit;
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=overview\">overview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
switch ($op) {
@ -143,7 +143,7 @@ function block_admin() {
default:
block_admin_display();
}
}
?>

View File

@ -50,9 +50,9 @@ function box_block() {
function box_admin_display() {
$type = array(0 => "ASCII", 1 => "HTML", 2 => "PHP");
$result = db_query("SELECT * FROM boxes");
while ($block = db_fetch_object($result)) {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR><TH>Subject:</TH><TD>". format_data($block->subject) ."</TD></TR>\n";
@ -89,7 +89,7 @@ function box_admin_new() {
}
function box_admin_add($subject, $content, $info, $link, $type) {
db_query("INSERT INTO boxes (subject, content, info, link, type) VALUES ('". check_input($subject) ."', '". check_code($content) ."', '". check_input($info) ."', '". check_input($link) ."', '". check_input($type) ."')");
db_query("INSERT INTO boxes (subject, content, info, link, type) VALUES ('". check_input($subject) ."', '". check_code($content) ."', '". check_input($info) ."', '". check_input($link) ."', '". check_input($type) ."')");
}
function box_admin_delete($id) {
@ -108,7 +108,7 @@ function box_admin_edit($id) {
if ($block = db_fetch_object($result)) {
$output .= "<FORM ACTION=\"admin.php?mod=box\" METHOD=\"post\">\n";
$output .= "<P>\n";
$output .= " <B>Subject:</B><BR>\n";
$output .= " <INPUT TYPE=\"text\" NAME=\"subject\" VALUE=\"". check_textfield($block->subject) ."\">\n";

View File

@ -17,7 +17,7 @@ class Calendar {
// Extract first day of the month:
$first = date("w", mktime(0, 0, 0, $month, 1, $year));
// Extract last day of the month:
$last = date("t", mktime(0, 0, 0, $month, 1, $year));
@ -30,11 +30,11 @@ class Calendar {
$output .= "<TABLE WIDTH=\"100%\" BORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"1\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"7\"><SMALL><A HREF=\"index.php?date=$prev\">&lt;</A> &nbsp; ". date("F Y", $this->date) ." &nbsp; <A HREF=\"index.php?date=$next\">&gt;</A></SMALL></TD></TR>\n";
$output .= " <TR><TD ALIGN=\"center\"><SMALL>S</SMALL></TD><TD ALIGN=\"center\"><SMALL>M</SMALL></TD><TD ALIGN=\"center\"><SMALL>T</SMALL></TD><TD ALIGN=\"center\"><SMALL>W</SMALL></TD><TD ALIGN=\"center\"><SMALL>T</SMALL></TD><TD ALIGN=\"center\"><SMALL>F</SMALL></TD><TD ALIGN=\"center\"><SMALL>S</SMALL></TD></TR>\n";
// Initialize temporary variables:
$nday = 1;
$sday = $first;
// Loop through all the days of the month:
while ($nday <= $last) {
// Set up blank days for first week of the month:
@ -42,25 +42,25 @@ class Calendar {
$output .= " <TR><TD COLSPAN=\"$first\">&nbsp</TD>\n";
$first = 0;
}
// Start every week on a new line:
if ($sday == 0) $output .= " <TR>\n";
// Print one cell:
$date = mktime(23, 59, 59, $month, $nday, $year);
if ($nday == $day) $output .= " <TD ALIGN=\"center\"><SMALL><B>$nday</B></SMALL></TD>\n";
else if ($date > time()) $output .= " <TD ALIGN=\"center\"><SMALL>$nday</SMALL></TD>\n";
else $output .= " <TD ALIGN=\"center\"><SMALL><A HREF=\"index.php?date=$date\" STYLE=\"text-decoration: none;\">$nday</A></SMALL></TD>\n";
// Start every week on a new line:
if ($sday == 6) $output .= " </TR>\n";
// Update temporary variables:
$sday++;
$sday = $sday % 7;
$nday++;
}
// Complete the calendar:
if ($sday) {
$end = 7 - $sday;

View File

@ -12,7 +12,7 @@ function calendar_block() {
$block[0]["subject"] = "Browse archives";
$block[0]["content"] = $calendar->display();
$block[0]["info"] = "Calendar to browse archives";
return $block;
}

View File

@ -28,7 +28,7 @@ function comment_edit($id) {
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
$output .= "</P>\n";
$output .= "</FORM>\n";
print $output;
}
@ -43,7 +43,7 @@ function comment_display($order = "date") {
// Perform SQL query:
$result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY c.$fields[$order] LIMIT 50");
// Display comments:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";
@ -70,7 +70,7 @@ function comment_display($order = "date") {
}
$output .= "</TABLE>\n";
print $output;
}

View File

@ -28,7 +28,7 @@ function comment_edit($id) {
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
$output .= "</P>\n";
$output .= "</FORM>\n";
print $output;
}
@ -43,7 +43,7 @@ function comment_display($order = "date") {
// Perform SQL query:
$result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY c.$fields[$order] LIMIT 50");
// Display comments:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";
@ -70,7 +70,7 @@ function comment_display($order = "date") {
}
$output .= "</TABLE>\n";
print $output;
}

View File

@ -22,7 +22,7 @@ function cron_display() {
// Perform query:
$result = db_query("SELECT * FROM crons");
// Generate output:
$output .= "<FORM ACTION=\"admin.php?mod=cron\" METHOD=\"post\">\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";

View File

@ -56,7 +56,7 @@ function diary_page_display($username) {
global $theme, $user;
$username = empty($username) ? $user->userid : $username;
$result = db_query("SELECT d.*, u.userid FROM diaries d LEFT JOIN users u ON d.author = u.id WHERE u.userid = '$username' ORDER BY timestamp DESC");
if ($username == $user->userid) {
@ -75,10 +75,10 @@ function diary_page_display($username) {
function diary_page_add() {
global $theme, $user, $allowed_html;
$output .= "<FORM ACTION=\"module.php?mod=diary\" METHOD=\"post\">\n";
$output .= "<P>\n";
$output .= "<P>\n";
$output .= " <B>Enter new diary entry:</B><BR>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\" MAXLENGTH=\"20\"></TEXTAREA><BR>\n";
$output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
@ -89,7 +89,7 @@ function diary_page_add() {
$output .= "</P>\n";
$output .= "</FORM>\n";
$theme->header();
$theme->box("Edit you diary", $output);
$theme->footer();
@ -118,7 +118,7 @@ function diary_page_edit($id) {
$output .= "</P>\n";
$output .= "</FORM>\n";
$theme->header();
$theme->box("Edit your diary", $output);
$theme->footer();
@ -263,7 +263,7 @@ function diary_admin_edit($id) {
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save diary entry\">\n";
$output .= "</P>\n";
$output .= "</FORM>\n";
print $output;
}
@ -278,7 +278,7 @@ function diary_admin_display($order = "date") {
// Perform SQL query:
$result = db_query("SELECT d.*, u.userid FROM diaries d LEFT JOIN users u ON u.id = d.author ORDER BY d.$fields[$order] LIMIT 50");
// Display stories:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";
@ -305,14 +305,14 @@ function diary_admin_display($order = "date") {
}
$output .= "</TABLE>\n";
print $output;
}
function diary_admin() {
global $op, $id, $text, $order;
switch ($op) {
case "edit":
diary_admin_edit($id);

View File

@ -12,7 +12,7 @@ function documentation_module($name, $module) {
function documentation() {
?>
<SMALL><I>$Id$</I></SMALL>
<H1>Chapter 1: introduction</H1>
<P>Drupal is the English pronunciation for the Dutch word 'druppel' which means 'drop'. Drupal is a fully-featured content management/discussion engine suitable to setup a news-driven community or portal site. Drupal aims to provide easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design, drupal is flexible and easy to adapt or extend.</P>
@ -88,10 +88,10 @@ function documentation() {
<H1>Chapter 3: drupal engine</H1>
<P>While we in no way consider the design and implementation of the drupal engine to be finished, we feel that our own accompanying intensive experience has given us a fairly stable and well-proven design. The following provides a brief over-view of the different aspects of drupal's core engine and features.</P>
<P>While we in no way consider the design and implementation of the drupal engine to be finished, we feel that our own accompanying intensive experience has given us a fairly stable and well-proven design. The following provides a brief over-view of the different aspects of drupal's core engine and features.</P>
<H2>Cron</H2>
<P>Cron (which stands for chronograph) is a periodic command scheduler: it executes commands at intervals specified in seconds. It can be used to control the execution of daily, weekly and monthly jobs (or anything with a period of n seconds). Automating tasks is one of the best ways to keep a system running smoothly, and if most of your administration does not require your direct involvement, cron is an ideal solution.</P>
<P>Note that cron does not guarantee that the commands will be executed at the specified interval. However, the engine will make sure that the commands are run at the specified intervals as closely as possible.</P>
<P>Whenever <CODE>http://yourdomain.com/cron.php</CODE> is accessed, cron will run: it queries the database for the jobs cron controls, and their periods in seconds. If a certain task wasn't executed in the last n seconds, where n is the period of that job, it will be executed. It then records the date in the database so it can know when to run it again. When all the executed commands terminate, cron is done.</P>
@ -108,18 +108,18 @@ function documentation() {
<P>The maintenance of all databases is handled by surprisingly simple code. Access to to the database is done by facilities of drupal's database abstraction layer. The purpose of drupal's database abstraction layer is to make it possible to run a drupal site on top of different databases like MySQL, Oracle, Postgres and so on.</P>
<P>However, currently the only supported database is MySQL. In fact, we haven't even bothered or tried to migrate to another database so our database abstraction layer might even contain undiscovered flaws. Nevertless, moving to another database shouldn't be much of a problem.</P>
<P>Take a look at <CODE>includes/database.inc</CODE> to see what database functions are supported.</P>
<H2>Moderation, collaborative rating</H2>
<P>We like to experiment with moderation, trust metrics and collaborative filtering. Why? To help individuals and communities address the challenges of information overload.</P>
<P>As each new piece of information competes for attention, people quickly tend to become overwhelmed and seek assistance in identifying the most interesting, worthwhile, valuable or entertaining items. Not to mention the fact that reader-contributed content and other levels of interactivity tend to become chaotic, bloated and disreputable.</P>
<P>Therefor, we decided to develop a public system powered by a community that aims to bring quality content to everyone's attention and to filter out all junk: to <I>sort the wheat from the chaff</I>. The output should be something clean and homogenized featuring quality content, and should slide down the gullet far more easily.</P>
<H3>Open submission queue</H3>
<P>Anyone who visits and has some news or some thoughts they'd like to share, can submit new content for consideration. After someone has submitted something, their story is added to a queue. All registered users can access this list of pending stories, that is, stories that have been submitted, but do not yet appear on the public front page. Those registered users can vote whether they think the story should be posted or not. When enough people vote to post a story, the story is pushed over the threshold and up it goes on the public page. On the other hand, when too many people voted to drop a story, the story will get trashed.</P>
<H3>Comment rating</H3>
<P>Anyone with a user account will be able to moderate comments. This lets people assign a score to a comment on how good they think the comment is or how visible they think it should be. When more than one person rates a comment, the overall rating is just a simple average of all ratings. Comments with high ratings are more visible than comments with a lower rating. That way, comments that gain the approval of participants will gradually move up through statistical effects and pointless comments will sink into oblivion.</P>
<P>Hence, the purpose of comment moderation is two-fold:</P>
<UL>
@ -129,7 +129,7 @@ function documentation() {
<P>In the latter, comment moderation provides a technical solution to a social problem.</P>
<H2>Modules</H2>
<P>When developing drupal it became clear that we wanted to have a system which is as modular as possible. A modular design will provide flexibility, adaptability, and continuity which in turn allows people to customize the site to their needs and likings.</P>
<P>A drupal module is simply a file containing a set of routines written in PHP. When used, the module code executes entirely within the context of the site. Hence it can use all the functions and access all variables and structures of the main engine. In fact, a module is not any different from a regular PHP file: it is more of a notion that automatically leads to good design principles and a good development model. Modularity better suits the open-source development model, because otherwise you can't easily have people working in parallel without risk of interference.</P>
<P>The idea is to be able to run random code at given places in the engine. This random code should then be able to do whatever needed to enhance the functionality. The places where code can be executed are called "hooks" and are defined by a fixed interface.</P>
@ -138,7 +138,7 @@ function documentation() {
<P>In our above example, our associative array <CODE>$module</CODE> would look like:</P>
<PRE>
$module = array("bar" => "foo_bar");
</PRE>
</PRE>
<TABLE BORDER="1">
<TR>
<TH>Hook name</TH>
@ -176,19 +176,19 @@ function documentation() {
<P>Even though we aim towards modularity, a basic rule is to avoid defined interfaces. We are exceptionally careful when it comes down to adding hooks because once you give a hook to developers they will start coding to it and once somebody's using it, you are stuck with it.</P>
<H2>Theme system</H2>
<P>Drupal's theme system is simple, elegant, flexible and powerful. You can accommodate rather major changes in overall appearance and significant structural changes. Moreover, you control all aspects of your drupal site in terms of colors, mark-up, layout and even the position of most blocks (or boxes). You can leave blocks out, move them from right to left, up and down until it fits your needs.</P>
<P>In order to accomplish this, drupal uses a theme class that has a handful of functions. The drupal engine dynamically loads the correct theme class, instantiates it and then calls this class' functions where appropriate.</P>
<P>Let's illustrate this with an easy example. Say, to generate the main page, the drupal engine would use something like:</P>
<PRE>
$theme = new Theme();
$theme->header();
$theme = new Theme();
$theme->header();
// displays the header of a page
for each $article to be displayed {
$theme->article($article);
for each $article to be displayed {
$theme->article($article);
// displays a themed article or story
}
$theme->footer();
}
$theme->footer();
// displays the footer of a page
</PRE>
<P>We have similar functions for things like comments (i.e. <CODE>$theme->comment($comment)</CODE>), generic boxes (i.e. <CODE>$theme->box($topic, $body)</CODE>) and so on. To create your own theme, you simply need to provide a new implementation of these functions.</P>
@ -203,8 +203,8 @@ function documentation() {
<P>Once a user authenticated a session is started and until that session is over they won't have to re-authenticate. To keep track of the individual sessions, drupal relies on PHP's session support. A visitor accessing your web site is assigned an unique ID, the so-called session ID, which is stored in a cookie. For security's sake, the cookie does not contain personal information but acts as a key to retrieve the information stored on your server's side. When a visitor accesses your site, drupal will check whether a specific session ID has been sent with the request. If this is the case, the prior saved environment is recreated.</P>
<P>Drupal allows you to control who is allowed to get authenticated and who is not. To accomplish this, you can ban certain hostnames, IPs, IP-ranges, e-mail address and usernames. Any user that matches any of the given ban criteria will not be able to authenticate or to register as a new user.</P>
<P>Authenticated users can themselves select entirely different appearances for the site, utilizing their own preferences for how the pages are structured, how navigation lists and other page components are presented and much more.</P>
<P>An important feature of drupal is that any user can be granted administrator rights. The ability to share maintenance responsibility with volunteers from across the globe can be considered valuable for most community-based projects.</P>
<P>An important feature of drupal is that any user can be granted administrator rights. The ability to share maintenance responsibility with volunteers from across the globe can be considered valuable for most community-based projects.</P>
<H1>Chapter 4: drupal modules</H1>
<?
@ -219,7 +219,7 @@ function documentation() {
<H2>CVS</H2>
<H3>Introduction</H3>
<P>CVS is a tool to manage software revisions and release control in a multi-developer, multi-directory, multi-group environment. It comes in very handy to maintain local modifications.</P>
<P>Thus, CVS helps you if you are part of a group of people working on the same project. In large software development projects, it's usually necessary for more then one software developer to be modifying modules of the code at the same time. Without CVS, it is all too easy to overwrite each others' changes unless you are extremely careful.</P>
<P>In addition, CVS helps to keep track of all changes. Therefor, the CVS server has been setup to mail all CVS commits to all maintainers. Thus, it does not require any effort to inform the other people about the work you have done, and by reading the mails everyone is kept up to date.</P>

View File

@ -29,7 +29,7 @@ function drupal_block() {
$content .= " </SELECT>\n";
$content .= "</FORM>\n";
$content .= "</CENTER>\n";
$blocks[0]["subject"] = "Drupal sites";
$blocks[0]["content"] = $content;
$blocks[0]["info"] = "Drupal sites (selection)";
@ -44,7 +44,7 @@ function drupal_block() {
$blocks[1]["subject"] = "Drupal sites";
$blocks[1]["content"] = $content;
$blocks[1]["info"] = "Drupal sites (sequential)";
return $blocks;
}

View File

@ -11,8 +11,8 @@ function drupal_render($id, $cid) {
$output = " <P>Drupal is the English pronunciation for the Dutch word 'druppel' which stands for 'drop'. Drupal is a full-featured content management/discussion engine suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design drupal is flexible and easy to adapt or extend.</P>\n";
$output .= " <P>Drupal is primarily written by Dries Buytaert (dries_at_drop.org) and build after Slash (<A HREF=\"http://slashcode.com/\">http://slashcode.com/</A>) and Scoop (<A HREF=\"http://scoop.kuro5hin.org/\">http://scoop.kuro5hin.org/</A>). The source code is available under terms of GNU General Public License (GPL).</P>\n";
$output .= " <P>We don't have a real demo site yet but drupal is used by (and created for) <A HREF=\"http://drop.org/\">http://drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"module.php?mod=documentation\">documentation</A> and spend some time getting used to it.</P>\n";
$theme->box("Introduction", $output);
$theme->box("Introduction", $output);
$output = "<LI><A HREF=\"drupal/drupal-1.00.tgz\">drupal 1.00</A> (2000/01/15 - latest version)</LI>\n";
$output .= "<LI><A HREF=\"drupal/drupal-1.00-rc2.tgz\">drupal 1.00-rc2</A> (2000/01/08)</LI>\n";
$output .= "<LI><A HREF=\"drupal/drupal-1.00-rc1.tgz\">drupal 1.00-rc1</A> (2000/01/01)</LI>\n";
@ -23,7 +23,7 @@ function drupal_render($id, $cid) {
while ($file = readdir($handle)) if (ereg(".jpg", $file) || ereg(".gif", $file)) $output .= " <LI><SMALL><A HREF=\"drupal/$file\">$file</A></SMALL></LI>\n";
closedir($handle);
$theme->box("Screenshots", $output);
$output = "<H2>Documentation</H2>\n";
$output .= " <LI><A HREF=\"module.php?mod=documentation\">documentation</A></LI>\n";
$output .= " <LI><A HREF=\"module.php?mod=wishlist\">wishlist</A></LI>\n";
@ -42,7 +42,7 @@ function drupal_render($id, $cid) {
function drupal_page() {
global $cid, $comment, $id, $op, $pid, $lid, $link, $mode, $order, $subject, $theme, $threshold;
switch($op) {
switch($op) {
case "Preview comment":
$theme->header();
comment_preview($pid, $id, $subject, $comment);

View File

@ -11,8 +11,8 @@ function drupal_render($id, $cid) {
$output = " <P>Drupal is the English pronunciation for the Dutch word 'druppel' which stands for 'drop'. Drupal is a full-featured content management/discussion engine suitable to setup a news-driven community or portal site. Drupal aims towards easy installation, excessive configuration and fine-grained maintenance capabilities. Due to its modular design drupal is flexible and easy to adapt or extend.</P>\n";
$output .= " <P>Drupal is primarily written by Dries Buytaert (dries_at_drop.org) and build after Slash (<A HREF=\"http://slashcode.com/\">http://slashcode.com/</A>) and Scoop (<A HREF=\"http://scoop.kuro5hin.org/\">http://scoop.kuro5hin.org/</A>). The source code is available under terms of GNU General Public License (GPL).</P>\n";
$output .= " <P>We don't have a real demo site yet but drupal is used by (and created for) <A HREF=\"http://drop.org/\">http://drop.org/</A>. Create an account, play with it for a bit, read the <A HREF=\"module.php?mod=documentation\">documentation</A> and spend some time getting used to it.</P>\n";
$theme->box("Introduction", $output);
$theme->box("Introduction", $output);
$output = "<LI><A HREF=\"drupal/drupal-1.00.tgz\">drupal 1.00</A> (2000/01/15 - latest version)</LI>\n";
$output .= "<LI><A HREF=\"drupal/drupal-1.00-rc2.tgz\">drupal 1.00-rc2</A> (2000/01/08)</LI>\n";
$output .= "<LI><A HREF=\"drupal/drupal-1.00-rc1.tgz\">drupal 1.00-rc1</A> (2000/01/01)</LI>\n";
@ -23,7 +23,7 @@ function drupal_render($id, $cid) {
while ($file = readdir($handle)) if (ereg(".jpg", $file) || ereg(".gif", $file)) $output .= " <LI><SMALL><A HREF=\"drupal/$file\">$file</A></SMALL></LI>\n";
closedir($handle);
$theme->box("Screenshots", $output);
$output = "<H2>Documentation</H2>\n";
$output .= " <LI><A HREF=\"module.php?mod=documentation\">documentation</A></LI>\n";
$output .= " <LI><A HREF=\"module.php?mod=wishlist\">wishlist</A></LI>\n";
@ -42,7 +42,7 @@ function drupal_render($id, $cid) {
function drupal_page() {
global $cid, $comment, $id, $op, $pid, $lid, $link, $mode, $order, $subject, $theme, $threshold;
switch($op) {
switch($op) {
case "Preview comment":
$theme->header();
comment_preview($pid, $id, $subject, $comment);

View File

@ -29,7 +29,7 @@ function faq_page() {
<DT><B><A NAME=\"moderation\">Why moderation, trust metrics and collaborative filtering?</A></B></DT>
<DD>To help individuals and communities address the challenges of information overload.<P>As each new piece of information competes for attention, people quickly tend to become overwhelmed and seek assistance in identifying the most interesting, worthwhile, valuable or entertaining items. Not to mention the fact, reader-contributed content and other levels of interactivity tend to become chaotic, bloated and disreputable.<P>Therefor, we decided to develop a public system powered by a community that aims to bring quality content to everyone's attention and to filter out all junk: to <I>sort the wheat from the chaff</I>. The output should be something clean and homogenized featuring quality content, and should slide down the gullet far more easily. Another objective is to provide a customized service according to public and individual preferences, whether expressed or inferred.<P>Yes, you are right: it all sounds a bit idealistic, not to mention hypothetical. However, don't get this wrong: this isn't a new concept, various such systems exist nowadays (like <A HREF=\"http://slashdot.org/\">slashdot.org</A> or <A HREF=\"http://www.kuro5hin.org/\">kuro5hin.org</A>). We just happen to want our own system.<P>Last but not least we, the $site_name team, don't want the responsibility to manually review each post and to select the ones worthy. Systematic editing by individual editors is nice and dandy if they get paid for it or if you they some time to kill. After all, we are not writers, critics nor reviewers for that matter; we are programmers, designers and technicians.<P></DD>
<DT><B>How does submission moderation work?</B></DT>
<DD>Anyone who drops in and has some news or some thoughts they'd like to share, can submit new content for consideration. After someone has submitted something, their story is added to a queue. All registered users can access this list of pending stories, that is, stories that have been submitted, but do not yet appear on the public front page. Those registered users can vote whether they think the story should be posted or not. When enough people vote to post a story, the story is pushed over the threshold and up it goes on the public page. On the other hand, when too many people voted to drop a story, the story will get trashed.<P></DD>
@ -73,7 +73,7 @@ function faq_page() {
<DT><B>What is your disclaimer?</B></DT>
<DD>All messages made available (including any discussion groups and bulletin boards) and any opinions, advice, statements or other information contained in any messages posted or transmitted by any third party are the responsibility of the author of that message and not of $site_name. The fact that a particular message is posted on or transmitted using this website does not mean that $site_name has endorsed that message in any way or verified the accuracy, completeness or usefulness of any message.<P>Furthermore, all persons who use $site_name are advised not to use them for solicitation or any other commercial purposes. We make no representation regarding the merchantability or fitness for any particular purpose of any message posted by any third party. Users are encouraged to seek the advice of their appropriate professional advisors, when evaluating the information contained in any message. $site_name is not responsible for any defamatory, offensive or illegal conduct of any user.<P></DD>
<DT><B>What are your terms and conditions?</B></DT>
<DD>
This website includes threaded discussion groups and discussion forums which allow feedback to $site_name and real-time interaction between the persons who use this service. The responsibility for any opinions, advice, statements or other information contained in any messages posted or transmitted by any third party on this website resides solely with the author.<P>

View File

@ -13,7 +13,7 @@ include "modules/backend.class";
function headline_blocks() {
global $theme;
// Get channel info:
$result = db_query("SELECT * FROM channel ORDER BY id");
@ -24,12 +24,12 @@ function headline_blocks() {
if ($state % 3 == 0) print " <TR>\n";
print " <TD ALIGN=\"center\" VALIGN=\"top\" WIDTH=\"33%\">\n";
// Load backend from database:
$backend = new backend($channel->id);
if ($backend->headlines) {
unset($content);
unset($content);
foreach ($backend->headlines as $headline) $content .= "<LI>$headline</LI>\n";
}
else {
@ -43,7 +43,7 @@ function headline_blocks() {
if ($state % 3 == 2) print " </TR>\n";
$state += 1;
}
}
print "</TABLE>\n";
$theme->footer();
@ -81,7 +81,7 @@ function headline_block() {
$result = db_query("SELECT * FROM channel");
while ($channel = db_fetch_object($result)) {
$backend = new Backend($channel->id);
if ($backend->headlines) {
unset($content);
foreach ($backend->headlines as $headline) {
@ -91,7 +91,7 @@ function headline_block() {
else {
$content = "no headlines available";
}
$blocks[$channel->id]["subject"] = $backend->site;
$blocks[$channel->id]["content"] = $content;
$blocks[$channel->id]["info"] = "$backend->site headlines";
@ -112,7 +112,7 @@ function headline_admin_display() {
while ($channel = db_fetch_object($result)) {
// Load backend from database:
$backend = new backend($channel->id);
$output .= "<TR>\n";
$output .= " <TD><A HREF=\"$backend->url\">$backend->site</A></TD>\n";
$output .= " <TD><A HREF=\"mailto:$backend->contact\">$backend->contact</A></TD>\n";
@ -120,10 +120,10 @@ function headline_admin_display() {
$output .= " <TD ALIGN=\"center\"><A HREF=\"admin.php?mod=headline&op=refresh&id=$backend->id\">refresh</A></TD>\n";
$output .= " <TD ALIGN=\"center\"><A HREF=\"admin.php?mod=headline&op=delete&id=$backend->id\">delete</A></TD>\n";
$output .= "</TR>\n";
}
}
$output .= "</TABLE>\n";
print $output;
}
@ -147,13 +147,13 @@ function headline_admin_add() {
$output .= " </P>\n";
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add backend\">\n";
$output .= " </FORM>\n";
print $output;
}
function headline_admin() {
global $op, $id, $site, $url, $backend, $contact;
print "<SMALL><A HREF=\"admin.php?mod=headline&op=add\">add new channel</A> | <A HREF=\"admin.php?mod=headline\">overview</A> | <A HREF=\"admin.php?mod=headline&op=help\">help</A></SMALL><HR>";
switch($op) {
@ -184,7 +184,7 @@ function headline_admin() {
function headline_export($uri) {
global $site_name, $site_url, $HTTP_REFERER, $HTTP_USER_AGENT;
if ($uri[2] == "headlines.rdf") {
watchdog("message", "grabbed 'headlines.rdf' - referring url: $HTTP_REFERER - user agent: $HTTP_USER_AGENT");
@ -203,7 +203,7 @@ function headline_export($uri) {
print "</channel>\n";
$result = db_query("SELECT * FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT 10");
while ($story = db_fetch_object($result)) {
print "<item>\n";
print " <title>$story->subject</title>\n";

View File

@ -25,13 +25,13 @@ function module_admin_display() {
$admin = ($module["admin"]) ? "<A HREF=\"admin.php?mod=$name\">admin</A>" : "&nbsp;";
$output .= " <TR><TD>$name</TD><TD>$view</TD><TD>$admin</TD><TD><A HREF=\"admin.php?mod=module&op=rehash&name=$name\">rehash</A></TD></TR>\n";
}
$output .= "<FORM ACTION=\"admin.php?mod=module\" METHOD=\"post\">\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TH>module</TH><TH COLSPAN=\"3\">operations</TH></TR>\n";
module_iterate("module_row");
$output .= "</TABLE>\n";
$output .= "<INPUT NAME=\"op\" TYPE=\"submit\" VALUE=\"Rehash modules\">\n";
$output .= "</FORM>\n";
@ -40,7 +40,7 @@ function module_admin_display() {
function module_admin() {
global $op, $name;
switch ($op) {
case "Rehash modules":
module_admin_rehash();

View File

@ -58,7 +58,7 @@ function section_add() {
$output .= " </P>\n";
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add section\">\n";
$output .= " </FORM>\n";
print $output;
}
@ -80,7 +80,7 @@ function section_display() {
// Perform query:
$result = db_query("SELECT * FROM sections ORDER BY name");
// Generate output:
$output .= "<FORM ACTION=\"admin.php?mod=section\" METHOD=\"post\">\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";

View File

@ -1,6 +1,6 @@
<?
$module = array("cron" => "watchdog_cron",
$module = array("cron" => "watchdog_cron",
"admin" => "watchdog_admin");
function watchdog_cron() {
@ -13,7 +13,7 @@ function watchdog_display($order = "date") {
// Perform query:
$result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id ORDER BY l.$fields[$order]");
// Generate output:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";

View File

@ -1,6 +1,6 @@
<?
$module = array("cron" => "watchdog_cron",
$module = array("cron" => "watchdog_cron",
"admin" => "watchdog_admin");
function watchdog_cron() {
@ -13,7 +13,7 @@ function watchdog_display($order = "date") {
// Perform query:
$result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id ORDER BY l.$fields[$order]");
// Generate output:
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR>\n";

View File

@ -17,7 +17,7 @@ function wishlist_page() {
<LI>advanced search so people can search stories, comments, diaries, users, and so on by date</LI>
<LI><I>see section "Modules" for more user oriented features</I></LI>
</UL>
<H3>Adminstration</H3>
<UL>
<LI>auto-backup functionality</LI>
@ -37,7 +37,7 @@ function wishlist_page() {
<LI>enable/disable comments - pending comments</LI>
</UL>
</UL>
<H3>Modules</H3>
<UL>
<LI>messaging between administrators/users</LI>
@ -53,7 +53,7 @@ function wishlist_page() {
<LI>automatically post scheduled stories</LI>
<LI>review system</LI>
</UL>
<H3>Themes</H3>
<UL>
<LI>create a theme with topic icons - graphical theme</LI>

View File

@ -1,4 +1,4 @@
#!/bin/sh
find . -name "*~" | xargs rm -f
find . -name "*~" | xargs rm -f
find . -name "DEADJOE" | xargs rm -f
find . -name "*" -type f | xargs perl -wi -pe 's/\s+$/\n/'

View File

@ -16,7 +16,7 @@ function story_render($id, $cid) {
}
}
switch($op) {
switch($op) {
case "Preview comment":
$theme->header();
comment_preview($pid, $id, $subject, $comment);

View File

@ -35,7 +35,7 @@ function submission_display_item($id) {
else {
$theme->header();
$theme->article($submission, "[ <A HREF=\"submission.php\"><FONT COLOR=\"$theme->hlcolor2\">back</FONT></A> ]");
print "<FORM ACTION=\"submission.php\" METHOD=\"post\">\n";
print "<P>\n";
@ -52,7 +52,7 @@ function submission_display_item($id) {
print "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Vote\">\n";
print "</FORM>\n";
$theme->footer();
$theme->footer();
}
}

View File

@ -2,11 +2,11 @@
function submit_enter() {
global $anonymous, $allowed_html, $theme, $user;
// Guidlines:
$output .= "<P>Got some news or some thoughts you would like to share? Fill out this form and they will automatically get whisked away to our submission queue where our moderators will frown at it, poke at it and hopefully post it. Every registered user is automatically a moderator and can vote whether or not your sumbission should be carried to the front page for discussion.</P>\n";
$output .= "<P>Got some news or some thoughts you would like to share? Fill out this form and they will automatically get whisked away to our submission queue where our moderators will frown at it, poke at it and hopefully post it. Every registered user is automatically a moderator and can vote whether or not your sumbission should be carried to the front page for discussion.</P>\n";
$output .= "<P>Note that we do not revamp or extend your submission so it is up to you to make sure your submission is well-written: if you don't care enough to be clear and complete, your submission is likely to be moderated down by our army of moderators. Try to be complete, aim for clarity, organize and structure your text, and try to carry out your statements with examples. It is also encouraged to extend your submission with arguments that flow from your unique intellectual capability and experience: offer some insight or explanation as to why you think your submission is interesting. Make sure your submission has some meat on it!</P>\n";
$output .= "<P>However, if you have bugs to report, complaints, personal questions or anything besides a public submission, we would prefer you to mail us instead, or your message is likely to get lost.</P><BR>\n";
$output .= "<P>However, if you have bugs to report, complaints, personal questions or anything besides a public submission, we would prefer you to mail us instead, or your message is likely to get lost.</P><BR>\n";
// Submission form:
$output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
@ -14,7 +14,7 @@ function submit_enter() {
$output .= "<P>\n <B>Your name:</B><BR>\n";
$output .= format_username($user->userid);
$output .= "</P>\n";
$output .= "<P>\n";
$output .= " <B>Subject:</B><BR>\n";
$output .= " <INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" MAXLENGTH=\"60\"><BR>\n";
@ -22,30 +22,30 @@ function submit_enter() {
$output .= "</P>\n";
$output .= "<P><B>Section:</B><BR>\n";
$output .= " <SELECT NAME=\"section\">\n";
$output .= " <SELECT NAME=\"section\">\n";
foreach ($sections = section_get() as $value) $output .= " <OPTION VALUE=\"$value\">$value</OPTION>\n";
$output .= " </SELECT>\n";
$output .= "</P>\n";
$output .= "<P>\n";
$output .= "<P>\n";
$output .= " <B>Abstract:</B><BR>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"abstract\" MAXLENGTH=\"20\"></TEXTAREA><BR>\n";
$output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
$output .= "</P>\n";
$output .= "<P>\n";
$output .= "<P>\n";
$output .= " <B>Extended story:</B><BR>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"article\"></TEXTAREA><BR>\n";
$output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
$output .= "</P>\n";
$output .= "<P>\n";
$output .= " <SMALL><I>You must preview at least once before you can submit:</I></SMALL><BR>\n";
$output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Preview submission\">\n";
$output .= "</P>\n";
$output .= "</FORM>\n";
$theme->header();
$theme->box("Submit a story", $output);
$theme->footer();
@ -110,7 +110,7 @@ function submit_preview($subject, $abstract, $article, $section) {
$output .= "</P>\n";
}
$output .= "</FORM>\n";
$theme->header();
$theme->article(new Story($user->userid, $subject, $abstract, $article, $section, time()));
$theme->box("Submit a story", $output);
@ -122,12 +122,12 @@ function submit_submit($subject, $abstract, $article, $section) {
// Add log entry:
watchdog("story", "story: added '$subject'");
// Add submission to SQL table:
db_query("INSERT INTO stories (author, subject, abstract, article, section, timestamp) VALUES ('$user->id', '". check_input($subject) ."', '". check_input($abstract) ."', '". check_input($article) ."', '". check_input($section) ."', '". time() ."')");
// Display confirmation message:
$theme->header();
$theme->header();
$theme->box("Thank you for your submission.", "Thank you for your submission. Your submission has been whisked away to our submission queue where our registered users will frown at it, poke at it and hopefully carry it to the front page for discussion.");
$theme->footer();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,11 +1,11 @@
<?
class Theme {
// color set #1:
var $bgc1 = "#6C6C6C"; // header color
var $fgc1 = "#000000"; // link color
var $hlc1 = "#"; // ? color
// color set #2:
var $bgc2 = "#E7E7E7"; // color
var $fgc2 = "#FEFEFE"; // header-text color
@ -18,19 +18,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE><? echo $site_name; ?> - Tears of technology</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">
<STYLE type="text/css">
<STYLE type="text/css">
<!--
BODY,P,DIV,LI,UL,TD,EM,FONT,BLOCKQUOTE,FORM{font-size: 10pt; font-family:Helvetica,Lucida,sans-serif;}
SMALL {font-size: 8pt;}
-->
</STYLE>
</HEAD>
<BODY TEXT="#202020" BGCOLOR="#FEFEFE" BACKGROUND="themes/jeroen/images/background.gif" ALINK="#000000" LINK="#000000" VLINK="#000000">
<TABLE WIDTH="770" ALIGN="left" BORDER="0" CELLPADDING="0" CELLSPACING="6">
<TR>
@ -114,16 +114,16 @@
<TABLE WIDTH="100%">
<TR>
<TD>
<?
<?
if ($story->updates) {
echo "<P><FONT COLOR=\"$this->hlc1\">Editor's note:</FONT> ". check_output($story->updates, 1) ."</P>";
}
if ($story->abstract) {
echo "<P>". check_output($story->abstract, 1) ."</P>";
}
?>
?>
</TD>
</TR>
</TR>
<TR>
<TD ALIGN="right">
<FONT COLOR="<? echo $this->hlc2;?>"><? echo theme_morelink($this, $story);?></FONT>
@ -141,14 +141,14 @@
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE>
<?
<?
}
function article($story, $reply) {
$timestamp = format_date($story->timestamp);
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
@ -192,7 +192,7 @@
</TD>
<TD ALIGN=\"center\" WIDTH=\"80\" BGOLOR=\"6C6C6C\" BACKGROUND=\"themes/jeroen/images/menutitle.gif\">
<A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$story->category</FONT></A>";
}
}
?>
</FONT>
</TD>
@ -215,7 +215,7 @@
else {
echo $story->abstract;
}
if ($story->article)
if ($story->article)
echo "<P>". check_output($story->article) ."</P>";
?>
</TD>
@ -238,9 +238,9 @@
</TR>
</TABLE>
<?
<?
}
function control() {
print comment_controls();
}
@ -263,7 +263,7 @@
// Moderation:
echo " <TD ALIGN=\"right\" ROWSPAN=\"3\" VALIGN=\"middle\" WIDTH=\"15%\">";
print comment_moderation($comment);
echo " </TD>";
echo " </TD>";
echo " </TR>";
// Author:
@ -295,7 +295,7 @@
echo " </TABLE>";
}
function box($subject, $content, $options = "") {
function box($subject, $content, $options = "") {
if (rand(0,50) == 25) $img = "boxbottomright2.gif";
else $img = "boxbottomright1.gif";
$width = rand(10,200);
@ -353,12 +353,12 @@
</TD>
<TD WIDTH="180" VALIGN="top" ALIGN="right">
<?
global $PHP_SELF;
global $PHP_SELF;
$this->box("Drop where?", "<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\">your account</A></TD>");
theme_account($this);
?>
?>
</TD>
</TR>
<TR>
@ -373,7 +373,7 @@
</TD>
</TR>
</TABLE>
</BODY>
</BODY>
</HTML>
<?
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 860 B

View File

@ -1,5 +1,5 @@
<?
class Theme {
// color set #1:
var $bgcolor1 = "#EAEAEA"; // background color
@ -19,14 +19,14 @@
function header() {
global $site_name;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE><? print $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">
<STYLE type="text/css">
<!--
BODY,TD,P,UL,LI,DIV,FORM,EM,BLOCKQUOTE { font-size: 10pt; font-family: Lucida,Verdana,Helvetica,Arial; }
TH { font-size: 10pt; font-family: Lucida,Verdana,Helvetica,Arial; }
@ -48,7 +48,7 @@
}
function abstract($story) {
print "\n<!-- story: \"$story->subject\" -->\n";
print "\n<!-- story: \"$story->subject\" -->\n";
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">\n";
print " <TR><TD COLSPAN=\"2\"><IMG SRC=\"themes/marvin/images/drop.gif\" ALT=\"\"> &nbsp; <B>". check_output($story->subject) ."</B></TD></TR>\n";
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
@ -77,7 +77,7 @@
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR>\n";
print " <TD>\n";
print " <FONT COLOR=\"#7C7C7C\"><SMALL>Submitted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large") .""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL>\n";
print " <FONT COLOR=\"#7C7C7C\"><SMALL>Submitted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large") .""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
@ -155,7 +155,7 @@
print "<BR>\n\n";
}
function box($subject, $content, $options = "") {
function box($subject, $content, $options = "") {
print "\n<!-- box: \"$subject\" -->\n";
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" BGCOLOR=\"#000000\" WIDTH=\"100%\">\n";
print " <TR>\n";
@ -186,7 +186,7 @@
</TD>
</TR>
</TABLE>
</BODY>
</BODY>
</HTML>
<?
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -6,7 +6,7 @@
var $cl80 = "#8B8E95";
var $clc0 = "#c8c8d0";
var $cl00 = "#000000";
// color set #1:
var $brcolor1 = "#000000"; // border color
var $bgcolor1 = "#B5BECE";
@ -34,8 +34,8 @@
<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">
<!--
<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; }
@ -73,7 +73,7 @@
function abstract($story) {
$timestamp = format_date($story->timestamp);
print "\n<!-- story: \"$story->subject\" -->\n";
print "\n<!-- story: \"$story->subject\" -->\n";
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
@ -103,7 +103,7 @@
</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 = "") {
@ -128,7 +128,7 @@
</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";
@ -137,7 +137,7 @@
</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 controls() {
@ -205,7 +205,7 @@
?></TD></TR></TABLE><BR><?
}
function box($subject, $content) {
function box($subject, $content) {
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<? echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
@ -220,7 +220,7 @@
</TD></TR>
</TABLE><BR>
<?
}
function footer() {
@ -249,7 +249,7 @@
</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>
</BODY>
</HTML>
<?
}