- fixed potential quote problem: wrapped $story->section in a check_output

- removed all $story->update related logic - the update field is redundant
3-00
Dries Buytaert 2001-03-24 16:26:56 +00:00
parent 7afe387d9a
commit de7e1fb66a
4 changed files with 24 additions and 32 deletions

View File

@ -8,11 +8,11 @@
?> ?>
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE><? echo $site_name; ?></TITLE> <TITLE><? echo $site_name; ?></TITLE>
</HEAD> </HEAD>
<BODY> <BODY>
<TABLE BORDER="1"> <TABLE BORDER="1">
<TR> <TR>
@ -20,7 +20,7 @@
</TD> </TD>
Logo? <!-- I left a TD to add a logo of some kind --> Logo? <!-- I left a TD to add a logo of some kind -->
<TD> <TD>
</TD> </TD>
</TR> </TR>
<TR> <TR>
<TD VALIGN="top"> <TD VALIGN="top">
@ -43,7 +43,7 @@
<TABLE BORDER="1"> <TABLE BORDER="1">
<TR> <TR>
<TD COLSPAN="2"> <TD COLSPAN="2">
<?php echo check_output($story->subject); ?> <?php echo check_output($story->title); ?>
</TD> </TD>
</TR> </TR>
<TR> <TR>
@ -58,7 +58,7 @@
<TD> <TD>
<?php <?php
echo "<A HREF=\"search.php?category=". urlencode($story->section) ."\">$story->section</A>"; echo "<A HREF=\"search.php?category=". urlencode($story->section) ."\">". check_output($story->section) ."</A>";
?> ?>
@ -68,12 +68,10 @@
<TD COLSPAN="2"> <TD COLSPAN="2">
<?php <?php
echo "<P>". check_output($story->abstract, 1) ."</P>"; echo "<P>". check_output($story->abstract, 1) ."</P>";
if ($story->updates)
echo "<P>". t("Editor's note by <A HREF=\"account.php?op=userinfo&uname=$story->editor\">$story->editor</A>") .":". check_output($story->updates, 1) ."</P>";
if ($reply) if ($reply)
echo "<P>". check_output($story->article, 1) ."</P>"; echo "<P>". check_output($story->article, 1) ."</P>";
?> ?>
</TD> </TD>
@ -118,7 +116,7 @@
echo " <TR>"; echo " <TR>";
echo " <TD>"; echo " <TD>";
echo " <TABLE BORDER=\"1\">"; echo " <TABLE BORDER=\"1\">";
// Subject: // Subject:
echo " <TR>"; echo " <TR>";
echo " <TD>"; echo " <TD>";
@ -127,13 +125,13 @@
echo " <TD >"; echo " <TD >";
echo " ". check_output($comment->subject); echo " ". check_output($comment->subject);
echo " </TD>"; echo " </TD>";
// Moderation: // Moderation:
echo " <TD>"; echo " <TD>";
echo comment_moderation($comment); echo comment_moderation($comment);
echo " </TD>"; echo " </TD>";
echo " </TR>"; echo " </TR>";
// Author: // Author:
echo " <TR>"; echo " <TR>";
echo " <TD>". t("Author") .":</FONT></TD><TD>". format_username($comment->userid); echo " <TD>". t("Author") .":</FONT></TD><TD>". format_username($comment->userid);
@ -142,14 +140,14 @@
echo " on ". format_date($comment->timestamp); echo " on ". format_date($comment->timestamp);
echo " </TD>"; echo " </TD>";
echo " </TR>"; echo " </TR>";
echo " </TABLE>"; echo " </TABLE>";
echo " </TD>"; echo " </TD>";
echo " </TR>"; echo " </TR>";
// Print body of comment: // Print body of comment:
if ($comment) echo " <TR><TD>" . check_output($comment->comment, 1) ."</TD></TR>"; if ($comment) echo " <TR><TD>" . check_output($comment->comment, 1) ."</TD></TR>";
// Print bottom link(s): // Print bottom link(s):
echo " <TR><TD>$link</TD></TR>"; echo " <TR><TD>$link</TD></TR>";
echo " </TABLE>"; echo " </TABLE>";
@ -160,7 +158,7 @@
echo " </TR>"; echo " </TR>";
echo " </TABLE>"; echo " </TABLE>";
echo " <BR>"; echo " <BR>";
} // close comment function } // close comment function
function box($subject, $content, $options = "") { function box($subject, $content, $options = "") {

View File

@ -91,7 +91,7 @@
function story($story, $reply = 0) { function story($story, $reply = 0) {
echo "\n<!-- story: \"$story->subject\" -->\n"; echo "\n<!-- story: \"$story->title\" -->\n";
?> ?>
<table border="0" cellspacing="0" cellpadding="0" width="100%"> <table border="0" cellspacing="0" cellpadding="0" width="100%">
@ -102,7 +102,7 @@
</tr> </tr>
<tr> <tr>
<td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td> <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
<td class="orcnt" width="100%" valign="top" colspan="2"><?php echo check_output($story->subject); ?></td> <td class="orcnt" width="100%" valign="top" colspan="2"><?php echo check_output($story->title); ?></td>
<td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td> <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
</tr> </tr>
<tr> <tr>
@ -118,7 +118,7 @@
<tr> <tr>
<td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td> <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
<td class="lgcnt"><small><?php echo strtr(t("$how by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?></small></td> <td class="lgcnt"><small><?php echo strtr(t("$how by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?></small></td>
<td class="lgcnt" nowrap><div align="right"><?php echo "<A HREF=\"search.php?category=". urlencode($story->section) ."\">$story->section</A>"; ?></div></td> <td class="lgcnt" nowrap><div align="right"><?php echo "<A HREF=\"search.php?category=". urlencode($story->section) ."\">". check_output($story->section) ."</A>"; ?></div></td>
<td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td> <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
</tr> </tr>
<tr> <tr>
@ -126,8 +126,6 @@
<td class="lgcnt" width="100%" colspan="2"><hr color="#404040" size="1"> <td class="lgcnt" width="100%" colspan="2"><hr color="#404040" size="1">
<?php <?php
echo check_output($story->abstract, 1) ."<br><br>"; echo check_output($story->abstract, 1) ."<br><br>";
if ($story->updates)
echo t("Editor's note by <A HREF=\"account.php?op=userinfo&uname=$story->editor\">$story->editor</A>") .":". check_output($story->updates, 1) ."<br><br>";
if ($reply) if ($reply)
echo check_output($story->article, 1); echo check_output($story->article, 1);
?> ?>

View File

@ -85,7 +85,7 @@
<tr> <tr>
<td align="left" valign="bottom" width="20" height="20" background="themes/jeroen/images/<?php echo (rand(0, 1) ? "news1.gif" : "news3.gif"); ?>" nowrap>&nbsp;</td> <td align="left" valign="bottom" width="20" height="20" background="themes/jeroen/images/<?php echo (rand(0, 1) ? "news1.gif" : "news3.gif"); ?>" nowrap>&nbsp;</td>
<td align="center" valign="top" width="100%" background="themes/jeroen/images/newsmiddle.gif" nowrap> <td align="center" valign="top" width="100%" background="themes/jeroen/images/newsmiddle.gif" nowrap>
<B><?php echo "". check_output($story->subject) .""; ?></B> <B><?php echo "". check_output($story->title) .""; ?></B>
</td> </td>
<td align="right" valign="bottom" width="20" background="themes/jeroen/images/<?php echo (rand(0, 1) == 0) ? "news2.gif" : "news4.gif"; if (rand(0,100) == 50) "news5.gif"; ?>" nowrap>&nbsp;</td> <td align="right" valign="bottom" width="20" background="themes/jeroen/images/<?php echo (rand(0, 1) == 0) ? "news2.gif" : "news4.gif"; if (rand(0,100) == 50) "news5.gif"; ?>" nowrap>&nbsp;</td>
</tr> </tr>
@ -116,7 +116,7 @@
</FONT> </FONT>
</td> </td>
<td align=\"right\" background=\"themes/jeroen/images/menutitle.gif\" nowrap> <td align=\"right\" background=\"themes/jeroen/images/menutitle.gif\" nowrap>
<B><a href=\"search.php?category=". urlencode($story->section) ."\"><FONT COLOR=\"#000000\">$story->section</FONT></A></B>"; <B><a href=\"search.php?category=". urlencode($story->section) ."\"><FONT COLOR=\"#000000\">". check_output($story->section) ."</FONT></A></B>";
?> ?>
@ -128,8 +128,6 @@
<?php <?php
echo "<br />". check_output($story->abstract, 1) ."<br />"; echo "<br />". check_output($story->abstract, 1) ."<br />";
if ($story->updates)
echo "<P><FONT COLOR=\"#E09226\">". t("Editor's note by <a href=\"account.php?op=userinfo&uname=$story->editor\">$story->editor</A>") .":</FONT>". check_output($story->updates, 1) ."</P>";
if ($reply) if ($reply)
echo "<br />". check_output($story->article, 1) ."<br />"; echo "<br />". check_output($story->article, 1) ."<br />";

View File

@ -1,14 +1,14 @@
<?php <?php
/********************************************************************* /*********************************************************************
Theme: UnConeD Theme: UnConeD
Author: UnConeD Author: UnConeD
Email: unconed@drop.org Email: unconed@drop.org
Description: Modern theme, gray and blue, high coolness factor. Description: Modern theme, gray and blue, high coolness factor.
*********************************************************************/ *********************************************************************/
class Theme { class Theme {
var $link = "#000000"; var $link = "#000000";
var $themename = "unconed"; var $themename = "unconed";
@ -86,7 +86,7 @@
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%"> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD> <TR><TD>
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%"> <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
<TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($story->subject, 1) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="themes/<?php print $this->themename; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR> <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($story->title) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="themes/<?php print $this->themename; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR>
<TR BGCOLOR="<?php echo $this->bgcolor2; ?>"> <TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
<?php <?php
if ($story->section) { print "<TD WIDTH=\"70%\" BGCOLOR=\"$this->bgcolor2\">"; } if ($story->section) { print "<TD WIDTH=\"70%\" BGCOLOR=\"$this->bgcolor2\">"; }
@ -94,7 +94,7 @@
if ($story->userid) { print "<SMALL>Posted by " . format_username($story->userid) . " on $timestamp"; } if ($story->userid) { print "<SMALL>Posted by " . format_username($story->userid) . " on $timestamp"; }
else { print "<SMALL>Posted by $anonymous on $timestamp"; } else { print "<SMALL>Posted by $anonymous on $timestamp"; }
if ($story->section) { print "</TD><TD WIDTH=\"30%\" BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\"><B><A HREF=\"index.php?section=" . urlencode($story->section) . "\"><FONT COLOR=\"$this->sectioncolor\">$story->section</FONT></A></B>"; } if ($story->section) { print "</TD><TD WIDTH=\"30%\" BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\"><B><A HREF=\"index.php?section=" . urlencode($story->section) . "\"><FONT COLOR=\"$this->sectioncolor\">". check_output($story->section) ."</FONT></A></B>"; }
?> ?>
</TD> </TD>
</TR> </TR>
@ -102,8 +102,6 @@
<TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2"> <TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2">
<?php <?php
echo "<P>". check_output($story->abstract, 1) ."</P>"; echo "<P>". check_output($story->abstract, 1) ."</P>";
if ($story->updates)
echo "<P><FONT COLOR=\"$this->fgcolor3\">Editor's note by " . format_username($editor) . ":</FONT> ". check_output($story->updates, 1) ."</P>";
if ($reply) if ($reply)
if ($story->article) print "<P>". check_output($story->article, 1) ."</P>\n"; if ($story->article) print "<P>". check_output($story->article, 1) ."</P>\n";
?> ?>