This is the PHP source code to qii.sf.net.
It is a duplicate of the source code viewer found on my personal site, beoba.net.
To view the source to this source viewer, go here.
This code is a mix of the Wordpress default and my own stuff. Feel free to use it on your own site.
<?
//Our section name, "front" by default. Avoid haxor by removing all ".."s
$go = str_replace("..", "", $_GET["go"]);
if (!$go) $go = "front";
$gofile = "content/".$go.".txt";
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>qii - Queer IRC Interface</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Nick 'beoba' Parker" />
<meta name="generator" content="GNU Emacs" />
<meta name="keywords" content="gay.com, gay.com chat, chat, chat client, irc, chatroom, gay, lesbian, glbt, qii, queer" />
<meta name="description" content="An open source Gay.com chat client." />
<style type="text/css" media="screen">
@import url( /layout/qii.css );
</style>
<meta name="geo.country" content="US" />
<meta name="dc.language" content="en" />
<meta name="copyright" content="Creative Commons BY NC SA" />
</head>
<body>
<div id="rap">
<div id="menu1"><div id="menu2"><div id="menu3">
<a href="/go/about">About</a><br />
<a href="/go/screenshots">Screenshots</a><br />
<a href="/go/download">Download</a><br />
<a href="/go/help">Help</a><br />
<a href="/go/tasks">Tasks</a><br /> <br />
<a href="http://sf.net"><img alt="SourceForge.net" src="/layout/sflogo.png" /></a>
<div style="display: none;"><a href="http://beoba.net/hp/spatial.php"></a></div>
</div></div></div>
<div id="content1"><div id="content2"><div id="content3">
<div class="storytitle"><? if ($go != "front") echo ucwords($go); else echo "Welcome!"; ?></div>
<div class="storycontent">
<?
//tell IE users what's what
if (strstr($_SERVER["HTTP_USER_AGENT"],"MSIE") && !strstr($_SERVER["HTTP_USER_AGENT"],"Opera")) {
?><div class="iewarn">
<b>Dear Internet Explorer user,</b>
<p>You are using a browser with severe security issues. If you spend 30 seconds of your time getting a better browser, you will save yourself several hours of trying to recover your computer just because Internet Explorer let through <a href="http://www.bu.edu/pcsc/virus/alerts/ie.html">yet another virus</a>.
Why wait until your <a href="http://www.safecenter.net/UMBRELLAWEBV4/ie_unpatched/index.html">computer gets trashed</a> to improve your browsing experience?</p>
<p><a href="http://www.spreadfirefox.com/?q=affiliates&id=20509&t=53">Give Firefox a spin.</a> You’ll thank yourself.</p>
</div>
<?
}
//if content file is there, load it, otherwise error.
if (file_exists($gofile)) {
$filecontents = file($gofile);
while (list ($line_num, $line) = each ($filecontents)) {
echo " ".$line;
}
} else {
echo "Could not find content file for \"$go\".";
}
?>
</div>
</div></div><?
/*KHTML has a wierd layout bug where it cuts off the last few
inches from the bottom of the page. This makes up for that
by adding a a blank image that matches the cutoff length.
I wouldn't normally do this sort of thing for just one shitty
browser, but this is a defect serious enough to be worth working
around. (I'd rather not have large chunks of the site physically
unviewable to users.)*/
if (strstr($_SERVER["HTTP_USER_AGENT"],"Safari") || strstr($_SERVER["HTTP_USER_AGENT"],"Konqueror")) {
echo "<!-- If your browser (KHTML-based) didn't suck, I wouldn't have to add blank space to the bottom of this page so that you could read it. -->";
echo '<img src="/layout/safarisucks.png" width="515" height="251" alt="KHTML Sucks" \>';
}
?></div>
</div>
</body></html>