- Fixed quote bug in the comment tracker.
(suggestion UnConeD) - Added anchors to comment links to easy comment navigation. (suggestion UnConeD) - Fixed duplicate `you voted' after moderating a story. (suggestion UnConeD) - Fixed quote bug in administration center. - Expanded user administration with timezone information. - Improved the theme system by eliminating the "preview" function. Let's not make the system more complex then it ought to be. - Refined watchdog administration. - ...3-00
parent
70520c7b05
commit
8a866e6d51
10
account.php
10
account.php
|
@ -204,9 +204,9 @@ function account_user($uname) {
|
|||
$result = db_query("SELECT c.cid, c.pid, c.sid, c.subject, c.timestamp, s.subject AS story FROM comments c LEFT JOIN users u ON u.id = c.author LEFT JOIN stories s ON s.id = c.sid WHERE u.userid = '$uname' AND c.timestamp > ". (time() - 1209600) ." ORDER BY cid DESC LIMIT 10");
|
||||
while ($comment = db_fetch_object($result)) {
|
||||
$box2 .= "<TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"1\">\n";
|
||||
$box2 .= " <TR><TD ALIGN=\"right\"><B>Comment:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></TD></TR>\n";
|
||||
$box2 .= " <TR><TD ALIGN=\"right\"><B>Comment:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD></TR>\n";
|
||||
$box2 .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($comment->timestamp) ."</TD></TR>\n";
|
||||
$box2 .= " <TR><TD ALIGN=\"right\"><B>Story:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid\">$comment->story</A></TD></TR>\n";
|
||||
$box2 .= " <TR><TD ALIGN=\"right\"><B>Story:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid\">". check_output($comment->story) ."</A></TD></TR>\n";
|
||||
$box2 .= "</TABLE>\n";
|
||||
$box2 .= "<BR><BR>\n";
|
||||
$comments++;
|
||||
|
@ -348,17 +348,17 @@ function account_password($min_length=6) {
|
|||
function account_comments() {
|
||||
global $theme, $user;
|
||||
|
||||
$info = "<P>This page might be helpful in case you want to keep track of your most recent comments in any of the discussions. You are given an overview of your comments in each of the stories you participates in along with the number of replies each comment got.\n<P>\n";
|
||||
$info = "<P>This page might be helpful in case you want to keep track of your recent comments in any of the current discussions. You are presented an overview of your comments in each of the stories you participated in along with the number of replies each comment got.\n<P>\n";
|
||||
|
||||
$sresult = db_query("SELECT s.id, s.subject, COUNT(s.id) as count FROM comments c LEFT JOIN stories s ON c.sid = s.id WHERE c.author = $user->id GROUP BY s.id DESC LIMIT 5");
|
||||
|
||||
while ($story = db_fetch_object($sresult)) {
|
||||
$output .= "<LI>". format_plural($story->count, comment, comments) ." in story `<A HREF=\"discussion.php?id=$story->id\">$story->subject</A>`:</LI>\n";
|
||||
$output .= "<LI>". format_plural($story->count, comment, comments) ." in story `<A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A>`:</LI>\n";
|
||||
$output .= " <UL>\n";
|
||||
|
||||
$cresult = db_query("SELECT * FROM comments WHERE author = $user->id AND sid = $story->id");
|
||||
while ($comment = db_fetch_object($cresult)) {
|
||||
$output .= " <LI><A HREF=\"discussion.php?id=$story->id&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A> (<B>". format_plural(discussion_num_replies($comment->cid), "reply", "replies") ."</B>)</LI>\n";
|
||||
$output .= " <LI><A HREF=\"discussion.php?id=$story->id&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A> (<B>". format_plural(discussion_num_replies($comment->cid), "reply", "replies") ."</B>)</LI>\n";
|
||||
}
|
||||
$output .= " </UL>\n";
|
||||
}
|
||||
|
|
69
admin.php
69
admin.php
|
@ -1,28 +1,13 @@
|
|||
<?
|
||||
|
||||
// TEMPORARY SECURITY PATCH:
|
||||
// if ($user->userid != "Dries") exit();
|
||||
if(!$PHP_AUTH_USER) {
|
||||
Header("WWW-Authenticate: Basic realm=\"Admin Area\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "The cow says: Moo! You can't come in!\n";
|
||||
exit;
|
||||
} else {
|
||||
if ($PHP_AUTH_PW != "mOo!")
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"Admin Area\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "The cow says: Moo! You can't come in!\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
// TEMPORARY SOLUTION:
|
||||
if ($user->id > 4) exit;
|
||||
|
||||
/*
|
||||
* Account administration:
|
||||
*/
|
||||
|
||||
function account_display($order = "username") {
|
||||
$sort = array("ID" => "id", "fake e-mail address" => "fake_email", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "real_email", "real name" => "name", "status" => "status", "theme" => "theme", "username" => "userid");
|
||||
$sort = array("ID" => "id", "fake e-mail address" => "fake_email", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "real_email", "real name" => "name", "status" => "status", "theme" => "theme", "timezone" => "timezone", "username" => "userid");
|
||||
$show = array("ID" => "id", "username" => "userid", "$order" => "$sort[$order]", "status" => "status");
|
||||
$stat = array(0 => "blocked", 1 => "not confirmed", 2 => "open");
|
||||
|
||||
|
@ -63,6 +48,9 @@ function account_display($order = "username") {
|
|||
case "status":
|
||||
$output .= " <TD ALIGN=\"center\">". $stat[$account[$value]] ."</TD>\n";
|
||||
break;
|
||||
case "timezone":
|
||||
$output .= " <TD ALIGN=\"center\">". format_data($account[$value] / 3600) ."</TD>\n";
|
||||
break;
|
||||
case "url":
|
||||
$output .= " <TD>". format_url($account[$value]) ."</TD>\n";
|
||||
break;
|
||||
|
@ -84,7 +72,7 @@ function account_display($order = "username") {
|
|||
function account_stories($id) {
|
||||
$result = db_query("SELECT * FROM stories WHERE author = $id ORDER BY timestamp DESC");
|
||||
while ($story = db_fetch_object($result)) {
|
||||
$output .= "<LI><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></LI>\n";
|
||||
$output .= "<LI><A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A></LI>\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
@ -92,7 +80,7 @@ function account_stories($id) {
|
|||
function account_comments($id) {
|
||||
$result = db_query("SELECT * FROM comments WHERE author = $id ORDER BY timestamp DESC");
|
||||
while ($comment = db_fetch_object($result)) {
|
||||
$output .= "<LI><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></LI>\n";
|
||||
$output .= "<LI><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></LI>\n";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
@ -115,6 +103,7 @@ function account_view($name) {
|
|||
$output .= " <TR><TD ALIGN=\"right\"><B>Bio information:</B></TD><TD>". format_data($account->bio) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Signature:</B></TD><TD>". format_data($account->signature) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Theme:</B></TD><TD>". format_data($account->theme) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Timezone:</B></TD><TD>". format_data($account->timezone / 3600) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\" VALIGN=\"top\"><B>Submitted stories:</B></TD><TD>". format_data(account_stories($account->id)) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\" VALIGN=\"top\"><B>Submitted comments:</B></TD><TD>". format_data(account_comments($account->id)) ."</TD></TR>\n";
|
||||
$output .= "</TABLE>\n";
|
||||
|
@ -123,9 +112,9 @@ function account_view($name) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Log administration:
|
||||
* Watchdog administration:
|
||||
*/
|
||||
function log_display($order = "date") {
|
||||
function watchdog_display($order = "date") {
|
||||
$colors = array("#FFFFFF", "#FFFFFF", "#90EE90", "#CD5C5C");
|
||||
$fields = array("date" => "id DESC", "username" => "user", "location" => "location", "message" => "message DESC", "level" => "level DESC");
|
||||
|
||||
|
@ -136,7 +125,7 @@ function log_display($order = "date") {
|
|||
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
|
||||
$output .= " <TR>\n";
|
||||
$output .= " <TH ALIGN=\"right\" COLSPAN=\"4\">\n";
|
||||
$output .= " <FORM ACTION=\"admin.php?section=logs\" METHOD=\"post\">\n";
|
||||
$output .= " <FORM ACTION=\"admin.php?section=watchdog\" METHOD=\"post\">\n";
|
||||
$output .= " <SELECT NAME=\"order\">\n";
|
||||
foreach ($fields as $key=>$value) {
|
||||
$output .= " <OPTION VALUE=\"$key\"". ($key == $order ? " SELECTED" : "") .">Sort by $key</OPTION>\n";
|
||||
|
@ -148,13 +137,13 @@ function log_display($order = "date") {
|
|||
$output .= " </TR>\n";
|
||||
$output .= " <TR>\n";
|
||||
$output .= " <TH>date</TH>\n";
|
||||
$output .= " <TH>user</TH>\n";
|
||||
$output .= " <TH>message</TH>\n";
|
||||
$output .= " <TH>user</TH>\n";
|
||||
$output .= " <TH>operations</TH>\n";
|
||||
$output .= " </TR>\n";
|
||||
|
||||
while ($log = db_fetch_object($result)) {
|
||||
$output .= " <TR BGCOLOR=\"". $colors[$log->level] ."\"><TD>". format_date($log->timestamp) ."</TD><TD ALIGN=\"center\">". format_username($log->userid, 1) ."</A></TD><TD>". substr($log->message, 0, 44) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=logs&op=view&id=$log->id\">more</A></TD></TR>\n";
|
||||
while ($watchdog = db_fetch_object($result)) {
|
||||
$output .= " <TR BGCOLOR=\"". $colors[$watchdog->level] ."\"><TD>". format_date($watchdog->timestamp) ."</TD><TD>". substr(check_output($watchdog->message), 0, 44) ."</TD><TD ALIGN=\"center\">". format_username($watchdog->userid, 1) ."</A></TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=watchdog&op=view&id=$watchdog->id\">more</A></TD></TR>\n";
|
||||
}
|
||||
|
||||
$output .= "</TABLE>\n";
|
||||
|
@ -162,17 +151,17 @@ function log_display($order = "date") {
|
|||
print $output;
|
||||
}
|
||||
|
||||
function log_view($id) {
|
||||
function watchdog_view($id) {
|
||||
$result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id WHERE l.id = $id");
|
||||
|
||||
if ($log = db_fetch_object($result)) {
|
||||
if ($watchdog = db_fetch_object($result)) {
|
||||
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Level:</B></TD><TD>$log->level</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($log->timestamp, "extra large") ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>User:</B></TD><TD>". format_username($log->userid, 1) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Location:</B></TD><TD>$log->location</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Message:</B></TD><TD>$log->message</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Hostname:</B></TD><TD>$log->hostname</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Level:</B></TD><TD>$watchdog->level</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($watchdog->timestamp, "extra large") ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>User:</B></TD><TD>". format_username($watchdog->userid, 1) ."</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Location:</B></TD><TD>$watchdog->location</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Message:</B></TD><TD>$watchdog->message</TD></TR>\n";
|
||||
$output .= " <TR><TD ALIGN=\"right\"><B>Hostname:</B></TD><TD>$watchdog->hostname</TD></TR>\n";
|
||||
$output .= "</TABLE>\n";
|
||||
print $output;
|
||||
}
|
||||
|
@ -331,7 +320,7 @@ function comment_display($order = "date") {
|
|||
$output .= " </TR>\n";
|
||||
|
||||
while ($comment = db_fetch_object($result)) {
|
||||
$output .= " <TR><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></TD><TD>". format_username($comment->userid, 1) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=comments&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
|
||||
$output .= " <TR><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid, 1) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=comments&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
|
||||
}
|
||||
|
||||
$output .= "</TABLE>\n";
|
||||
|
@ -562,7 +551,7 @@ function story_display($order = "date") {
|
|||
$output .= " </TR>\n";
|
||||
|
||||
while ($story = db_fetch_object($result)) {
|
||||
$output .= " <TR><TD><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></TD><TD>". format_username($story->userid, 1) ."</TD><TD>$story->category</TD><TD ALIGN=\"center\">". $status[$story->status] ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=stories&op=edit&id=$story->id\">edit</A></TD></TR>\n";
|
||||
$output .= " <TR><TD><A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A></TD><TD>". format_username($story->userid, 1) ."</TD><TD>$story->category</TD><TD ALIGN=\"center\">". $status[$story->status] ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=stories&op=edit&id=$story->id\">edit</A></TD></TR>\n";
|
||||
}
|
||||
|
||||
$output .= "</TABLE>\n";
|
||||
|
@ -675,16 +664,16 @@ switch ($section) {
|
|||
ban_display($category);
|
||||
}
|
||||
break;
|
||||
case "logs":
|
||||
case "watchdog":
|
||||
switch ($op) {
|
||||
case "view":
|
||||
log_view($id);
|
||||
watchdog_view($id);
|
||||
break;
|
||||
case "Update":
|
||||
log_display($order);
|
||||
watchdog_display($order);
|
||||
break;
|
||||
default:
|
||||
log_display();
|
||||
watchdog_display();
|
||||
}
|
||||
break;
|
||||
case "stats":
|
||||
|
|
|
@ -152,7 +152,7 @@ function discussion_display($sid, $pid, $cid, $level = 0) {
|
|||
}
|
||||
|
||||
function discussion_reply($pid, $sid) {
|
||||
global $user, $theme;
|
||||
global $user, $theme, $allowed_html;
|
||||
|
||||
### Extract parent-information/data:
|
||||
if ($pid) {
|
||||
|
@ -183,6 +183,7 @@ function discussion_reply($pid, $sid) {
|
|||
$output .= "<P>\n";
|
||||
$output .= " <B>Comment:</B><BR>\n";
|
||||
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_output(check_field($user->signature)) ."</TEXTAREA><BR>\n";
|
||||
$output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
|
||||
$output .= "</P>\n";
|
||||
|
||||
### Hidden fields:
|
||||
|
@ -197,7 +198,7 @@ function discussion_reply($pid, $sid) {
|
|||
}
|
||||
|
||||
function comment_preview($pid, $sid, $subject, $comment) {
|
||||
global $user, $theme;
|
||||
global $user, $theme, $allowed_html;
|
||||
|
||||
### Preview comment:
|
||||
$theme->comment($user->userid, check_output($subject), check_output($comment), time(), check_output($user->url), check_output($user->fake_email), "", "", "", "reply to this comment");
|
||||
|
@ -221,6 +222,7 @@ function comment_preview($pid, $sid, $subject, $comment) {
|
|||
$output .= "<P>\n";
|
||||
$output .= " <B>Comment:</B><BR>\n";
|
||||
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_output(check_field($comment)) ."</TEXTAREA><BR>\n";
|
||||
$output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
|
||||
$output .= "</P>\n";
|
||||
|
||||
### Hidden fields:
|
||||
|
|
|
@ -34,7 +34,7 @@ function admin_header() {
|
|||
admin_icon("accounts");
|
||||
admin_icon("misc");
|
||||
admin_icon("bans");
|
||||
admin_icon("logs");
|
||||
admin_icon("watchdog");
|
||||
admin_icon("stats");
|
||||
admin_icon("info");
|
||||
admin_icon("home");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?
|
||||
|
||||
class calendar {
|
||||
class Calendar {
|
||||
var $date;
|
||||
|
||||
function calendar($date) {
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
#$dbname = "droporg";
|
||||
|
||||
### http://beta.drop.org/:
|
||||
$dbhost = "zind.net";
|
||||
$dbuname = "dries";
|
||||
$dbpass = "Abc123";
|
||||
$dbname = "dries";
|
||||
#$dbhost = "zind.net";
|
||||
#$dbuname = "dries";
|
||||
#$dbpass = "Abc123";
|
||||
#$dbname = "dries";
|
||||
|
||||
### http://dione/:
|
||||
#$dbhost = "";
|
||||
#$dbuname = "dries";
|
||||
#$dbpass = "oakley";
|
||||
#$dbname = "dries";
|
||||
$dbhost = "";
|
||||
$dbuname = "dries";
|
||||
$dbpass = "oakley";
|
||||
$dbname = "dries";
|
||||
|
||||
#
|
||||
# Name of the site
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?
|
||||
|
||||
class Story {
|
||||
function story($userid, $subject, $abstract, $article, $category, $timestamp) {
|
||||
$this->userid = $userid;
|
||||
$this->subject = $subject;
|
||||
$this->abstract = $abstract;
|
||||
$this->article = $article;
|
||||
$this->category = $category;
|
||||
$this->timestamp = $timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -12,7 +12,7 @@ function display_moderation_results($theme, $story) {
|
|||
$output .= "<P>\n";
|
||||
$output .= "<B>Other people voted:</B><BR>\n";
|
||||
|
||||
$result = db_query("SELECT * FROM users WHERE history LIKE '%s$story->id%'");
|
||||
$result = db_query("SELECT * FROM users WHERE id != $user->id AND history LIKE '%s$story->id%'");
|
||||
while ($account = db_fetch_object($result)) {
|
||||
$output .= "". format_username($account->userid) ." voted `". user_getHistory($account->history, "s$story->id") ."'.<BR>";
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ function display_new_headlines($theme, $num = 10) {
|
|||
|
||||
function display_calendar($theme, $date) {
|
||||
include "includes/calendar.inc";
|
||||
$calendar = new calendar($date);
|
||||
$calendar = new Calendar($date);
|
||||
$theme->box("Browse archives", $calendar->display());
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ function submit_enter() {
|
|||
function submit_preview($subject, $abstract, $article, $category) {
|
||||
global $categories, $allowed_html, $theme, $user;
|
||||
|
||||
include "includes/story.inc";
|
||||
|
||||
$output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
|
||||
|
||||
$output .= "<P>\n";
|
||||
|
@ -118,7 +120,7 @@ function submit_preview($subject, $abstract, $article, $category) {
|
|||
$output .= "</FORM>\n";
|
||||
|
||||
$theme->header();
|
||||
$theme->preview($user->userid, check_output($subject), check_output($abstract), "", check_output($article), format_date(time(), "extra large"), check_output($category), "we-hate-typoes");
|
||||
$theme->article(new Story($user->userid, check_output($subject), check_output($abstract), check_output($article), check_output($category), time()));
|
||||
$theme->box("Submit a story", $output);
|
||||
$theme->footer();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" ALINK="#CCCCCC" LINK="#665555" VLINK="#665555">
|
||||
<TABLE BORDER="0" CELLPADDING="8" CELLSPACING="0">
|
||||
<TR>
|
||||
<TD ROWSPAN="3" WIDTH="30"> </TD>
|
||||
<TD WIDTH="30" ROWSPAN="3"> </TD>
|
||||
<TD WIDTH="470"><A HREF=""><IMG SRC="themes/marvin/images/logo.gif" ALT="drop.org" BORDER="0"></A></TD>
|
||||
<TD WIDTH="180">
|
||||
<LI>Create an <A HREF="account.php?op=register">account</A> and <A HREF="submit.php">submit</A> new stories.</LI>
|
||||
|
@ -64,7 +64,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>Posted 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=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</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=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
|
||||
print " </TD>\n";
|
||||
print " </TR>\n";
|
||||
print " <TR><TD COLSPAN=\"2\"> </TD></TR>\n";
|
||||
|
@ -86,13 +86,13 @@
|
|||
# comments). It's what you get when you followed for
|
||||
# instance one of read-more links on the main page.
|
||||
function article($story, $reply) {
|
||||
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=\"\"> <B>$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";
|
||||
print " <TR>\n";
|
||||
print " <TD>\n";
|
||||
print " <FONT COLOR=\"#7C7C7C\"><SMALL>Posted 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=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</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=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
|
||||
print " </TD>\n";
|
||||
print " </TR>\n";
|
||||
print " <TR><TD COLSPAN=\"2\"> </TD></TR>\n";
|
||||
|
@ -230,35 +230,6 @@
|
|||
print "<BR>\n\n";
|
||||
}
|
||||
|
||||
######
|
||||
# Syntax.......: preview(...);
|
||||
# Description..: this function is used to preview a story and is used at
|
||||
# different parts of the homepage: when a visitors sumbits
|
||||
# news, when an editor wants to post news, when people
|
||||
# check the entries in the sumbission queue, etc.
|
||||
function preview($author, $subject, $abstract, $updates, $article, $timestamp, $category, $department) {
|
||||
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">";
|
||||
print " <TR><TD COLSPAN=\"2\"><B>$subject</B></TD></TR>";
|
||||
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>";
|
||||
print " <TR>";
|
||||
print " <TD>";
|
||||
print " <FONT COLOR=\"#7C7C7C\"><SMALL>Posted by ". format_username($author) ." on $timestamp"; ?><? if ($department) print "<BR>from the $department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($category) ."\"><FONT COLOR=\"#83997A\">$category</FONT></A></SMALL>\n";
|
||||
print " </TD>";
|
||||
print " </TR>";
|
||||
print " <TR><TD COLSPAN=\"2\"> </TD></TR>";
|
||||
print " <TR>";
|
||||
print " <TD COLSPAN=\"2\">";
|
||||
if ($abstract) print "<P>". check_output($abstract, 1) ."</P>";
|
||||
if ($comments) print "<P><FONT COLOR=\"$this->bgcolor2\">Editor's note:</FONT> ". check_output($comments, 1) ."</P>";
|
||||
if ($article) print "<P>". check_output($article, 1) ."</P>";
|
||||
print " </TD>";
|
||||
print " </TR>";
|
||||
print " <TR><TD COLSPAN=\"2\"> </TD></TR>";
|
||||
print " <TR><TD COLSPAN=\"2\">$link</TD></TR>";
|
||||
print "</TABLE>";
|
||||
print "<BR><BR>";
|
||||
}
|
||||
|
||||
######
|
||||
# Syntax.......: box($subject, $body);
|
||||
# Description..: a function to draw a box/block.
|
||||
|
|
Loading…
Reference in New Issue