Update of /cvsroot/php-blog/jBlog
In directory sc8-pr-cvs1:/tmp/cvs-serv15838
Modified Files:
jBlog_functions.inc.php jBlog_genpage.php jBlog_layout.php
Log Message:
Tidy up the html, so that it is almost valid HTML 4.01 transitional
Index: jBlog_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/jBlog/jBlog_functions.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- jBlog_functions.inc.php 6 Mar 2003 05:44:09 -0000 1.20
+++ jBlog_functions.inc.php 6 Mar 2003 12:12:01 -0000 1.21
@@ -90,7 +90,7 @@
?>
<TABLE CLASS='jBlog_calendar' CELLSPACING=0>
<TR>
-<TD ALIGN='left'><A HREF='<?= $jBlog['jBlogHTTPPath'] ?>index.php?jBlog[calendarZoom]=<?= $previousYear.sprintf("%02d",$previousMonth)?>'><IMG SRC='<?= $jBlog["jBlogHTTPPath"] ?>pixel/back.png' BORDER='0'></A></TD>
+<TD ALIGN='left'><A HREF='<?= $jBlog['jBlogHTTPPath'] ?>index.php?jBlog[calendarZoom]=<?= $previousYear.sprintf("%02d",$previousMonth)?>'><IMG ALT="Back" SRC='<?= $jBlog["jBlogHTTPPath"] ?>pixel/back.png' BORDER='0'></A></TD>
<TD COLSPAN='5' ALIGN='center' VALIGN='bottom' CLASS='calendarHeader'><B><nobr>
<?php
if ($jBlog["rewrite"]==true) {
@@ -104,7 +104,7 @@
</nobr></B></TD>
<TD ALIGN='right'>
<A HREF='<?= $jBlog['jBlogHTTPPath'] ?>index.php?jBlog[calendarZoom]=<?= $nextYear.sprintf("%02d",$nextMonth) ?>'>
- <IMG SRC='<?= $jBlog["jBlogHTTPPath"] ?>pixel/forward.png' BORDER='0'>
+ <IMG ALT="Forward" SRC='<?= $jBlog["jBlogHTTPPath"] ?>pixel/forward.png' BORDER='0'>
</A>
</TD>
</TR>
@@ -240,7 +240,7 @@
$bydate = array();
if (!is_array($entries)) {
- echo "jBlog error: entries to print invalid";
+ echo "<br />No entries to print.";
return;
}
@@ -256,7 +256,7 @@
foreach ($ents as $x => $entry) {
echo "<span class='jBlog_title'>";
- echo $entry['title'];
+ echo htmlentities($entry['title']);
echo "</span>";
echo "<div class='jBlog_entry'>";
@@ -279,7 +279,7 @@
. "archives/e_"
. $entry['id']
. ".html\">Posted by "
- . $entry['author']
+ . htmlentities($entry['author'])
. " at "
. date("H:i", $entry['timestamp'])
. "</a>";
@@ -1103,10 +1103,11 @@
ORDER BY total";
$cursor = mysql_db_query($jBlog['dbName'], $query);
if($num_rows = mysql_num_rows($cursor)) {
- echo "<b>Top Referrers<b><br>";
+ echo "<b>Top Referrers</b><br />";
while($row = mysql_fetch_assoc($cursor)) {
preg_match("#//([^/]+)#", $row[url], $matches);
- echo "<a href=\"$row[url]\">$matches[1] ($row[total])</a><br>";
+ $row['url'] = htmlentities($row['url']);
+ echo "<a href=\"$row[url]\">$matches[1] ($row[total])</a><br/>";
}
}
}
Index: jBlog_genpage.php
===================================================================
RCS file: /cvsroot/php-blog/jBlog/jBlog_genpage.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- jBlog_genpage.php 5 Mar 2003 21:09:41 -0000 1.3
+++ jBlog_genpage.php 6 Mar 2003 12:12:01 -0000 1.4
@@ -1,13 +1,12 @@
<?php
-?><html><head><title><?=$jBlog['blogTitle']?></title>
-<link rel="stylesheet" type="text/css" href="<?=$jBlog['jBlogHTTPPath']?>jBlog.css.php">
-<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=$jBlog['baseURL']?>feeds/index.rss" />
+?><html><head><title><?=htmlentities($jBlog['blogTitle'])?></title>
+<link rel="stylesheet" type="text/css" href="<?=$jBlog['jBlogHTTPPath']?>jBlog.css.php" >
+<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=$jBlog['baseURL']?>feeds/index.rss" >
+</head>
<body>
<?php
include ("jBlog_layout.php");
?>
-
-</pre>
</body>
</html>
Index: jBlog_layout.php
===================================================================
RCS file: /cvsroot/php-blog/jBlog/jBlog_layout.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- jBlog_layout.php 5 Mar 2003 21:09:41 -0000 1.6
+++ jBlog_layout.php 6 Mar 2003 12:12:01 -0000 1.7
@@ -87,7 +87,7 @@
}
jBlog_drawCalendar(substr($jBlog["GET"]["calendarZoom"], 4, 2),
substr($jBlog["GET"]["calendarZoom"], 0,4));
- ?><br>
+ ?><br />
</div>
<div class="jBlogQuickSearch">
@@ -99,7 +99,7 @@
</div>
<div class="jBlogArchives">
- <b>Archives:</b><br>
+ <b>Archives:</b><br />
<?php
$ts = mktime(0,0,0,(date("m")+1), 1, date("Y"));
for($x=0; $x<3; $x++) {
@@ -108,16 +108,16 @@
$link = $jBlog["jBlogHTTPPath"]."archives/d_".date("Ym", $ts).".html";
else
$link = "fixme";
- echo "<a href='$link'>".$jBlog["months"][date("n", $ts)]." ".date("Y", $ts)."</a><br>";
+ echo "<a href='$link'>".$jBlog["months"][date("n", $ts)]." ".date("Y", $ts)."</a><br />";
$ts = mktime(0,0,0,date("m", $ts), 1, date("Y", $ts));
}
?>
<a href='?jBlog[action]=archives'>Older...</a>
</div>
- <?= jBlog_displayTopReferrers() ?><p>
+ <?= jBlog_displayTopReferrers() ?>
<div class="jBlogSuperUser">
- <b>Superuser:</b><br>
+ <b>Superuser:</b><br />
<a href="<?=$jBlog['jBlogHTTPPath']?>jBlog_admin.php">$ su -</a>
<br />
<br />
|