gaim/www

(21:23:17) SimGuy: LSchiere: why is it that gaim-ssl.txt is not a web page?
(21:23:36) LSchiere: SimGuy: because i don't know how to use the includes
and engines ChipX86|Coding wrote
(21:23:47) LSchiere: and so i just committed the file nosnilmot gave me
(21:24:10) nosnilmot: SimGuy: http://gaim.nosnilmot.com/faq-ssl.php
(21:24:21) nosnilmot: LSchiere: do you want that?
(21:24:40) nosnilmot: SimGuy: because I was a lazy sod originally
(21:25:01) SimGuy: nosnilmot: haha, that's exactly the sort of thing i
meant
(21:25:12) ***LSchiere blinks
(21:25:18) LSchiere: nosnilmot: yes i would
(21:26:18) nosnilmot: LSchiere:
(21:26:45) nosnilmot: LSchiere: it fixinates a couple of too for goodness


Christian, if this isn't correct, just revert it and we'll have nosnilmot
fix it ;-)
<?php
require "base.inc.php";
start_html("News");
if (!isset($start)) { $start = 0; }
if (!isset($limit)) { $limit = 5; }
/* Parse the news. */
$filename = "news.txt";
$fcontents = file($filename);
$index = 0;
$pos = 0;
print "<br />\n";
while (list($linenum, $line) = each($fcontents)) {
if ($pos < $start) {
if (chop($line) == "#") {
$pos++;
}
continue;
}
elseif ($pos < ($start + $limit)) {
if (chop($line) == "#") {
end_section();
print "<br />\n";
$index = 0;
$pos++;
continue;
}
elseif ($index == 0) { $cur_title = $line; }
elseif ($index == 1) {
start_section($cur_title, $line);
$cur_title = "";
}
else {
print "<p>" . $line . "</p>\n";
}
}
else {
break;
}
$index++;
}
if ($index > 0) {
end_section();
print "<br />\n";
}
if ($index == 0 || $start > 0) {
print "<table border=\"0\" width=\"100%\">\n";
print " <tr>\n";
print " <td nowrap=\"nowrap\">";
if ($start > 0) {
print "<font face=\"Verdana, Tahoma, Arial, Helvetica\"";
print " size=\"-1\">";
print "<a href=\"$PHP_SELF?start=";
print (($start - $limit > 0) ? ($start - $limit) : 0);
print "&limit=$limit\">&lt;- Previous</a>";
print "</font>";
}
else {
print "&nbsp;";
}
print "</td>\n";
print " <td align=\"right\" nowrap=\"nowrap\">";
if ($index == 0) {
print "<font face=\"Verdana, Tahoma, Arial, Helvetica\"";
print " size=\"-1\">";
print "<a href=\"$PHP_SELF?start=$pos&limit=$limit\">";
print "Next -&gt;</a>";
print "</font>";
}
else {
print "&nbsp;";
}
print "</td>\n";
print " </tr>\n";
print "</table>\n";
}
end_html();
?>