--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r
+<html lang="en"><head>\r
+<title>The mirror ā¢ Bicycles on the Moon</title>\r
+<link rel="home" title="1190" href="http://1190.bicyclesonthemoon.dnsd.info/">\r
+<meta http-equiv="Content-type" content="text/html; charset=UTF-8"></head>\r
+<body>\r
+<a href="http://1190.bicyclesonthemoon.dnsd.info/"><img src="botmlogo2.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>\r
+<h1>You can have your own OTT mirror now!</h1>\r
+<div style="max-width: 600000px">\r
+<p>If you want to run your own copy of the <a href="http://1190.bicyclesonthemoon.dnsd.info/ott/">ŠÆOŠÆŠÆIM TTO</a>, you\r
+can, because I made it available. Follow these instructions to download and\r
+setup your own ŠÆOŠÆŠÆIM TTO.</p>\r
+\r
+<h2>Dependencies</h2>\r
+The mirror depends on some things:\r
+<ul>\r
+<li>OS:<br>\r
+The mirror was written and tested on Debian, and then Cubian. Other versions of\r
+GNU/Linux should be okay.</li>\r
+<li>a www server:<br>\r
+I use apache2. Any other server that supports CGI should be okay.</li>\r
+<li>AWK interpreter: mawk<br>\r
+gawk should be compatible, so you can use it too.</li>\r
+<li>C++ compiler: g++<br>\r
+The mirror is written in C++, but doesn't use anything C++-specific. I may\r
+convert it to C in the future.</li>\r
+<li>CGI library: cgilib<br>\r
+There is a bug in cgilib. At least the version from the Debian repository.\r
+Change line 146 of <code>cgi.h</code> from "<code>extern }</code>" to "<code>}</code>"</li>\r
+<li>wget</li>\r
+<li>Something to schedlue the bots<br>\r
+The bots aren't daemons and need something to start them in regular time\r
+intervals. I use cron.</li>\r
+</ul>\r
+\r
+<h2>Downloading</h2>\r
+<ul>\r
+<li>Create a directory where the mirror will be hosted. Download\r
+<a href="ott.zip">ott.zip</a> and put its contents there. Remember that the\r
+mirror <b>must</b> be hosted at "<code>something.example.com/<b>ott</b></code>"\r
+</li>\r
+<li>Create a directory for the source. Download <a href="pro.zip">pro.zip</a>\r
+and put its contents there. Don't build it yet.</li></ul>\r
+\r
+<h2>Preparing the enviroment</h2>\r
+<p>Go to where you downloaded the source. Open <code>re.awk</code>. At hte top of\r
+the file there are some paths defined. You'll have to change some of these. They\r
+have to be double-escaped. The directories should not end with a\r
+"<code>/</code>".</p>\r
+<ul>\r
+<li>Set <code>wgetpath</code> to point to wget. Set <code>mawkpath</code> to\r
+point to mawk.</li>\r
+<li>Create a directory where the programs will be run from. Can be the same\r
+where you downloaded the source. Set <code>propath</code> to point there.</li>\r
+<li>Create a directory for temporary files. Only you should have read access\r
+there. While someone makes a post, their password can be found in a temporary\r
+file. Set <code>tmppath</code> to point there.</li>\r
+<li>Create a directory where the bots will remember things. Set\r
+<code>mempath</code> to point there. Create a file named "<code>name</code>"\r
+there. Put your URL-encoded xkcd fora login in the first line and your\r
+URL-encoded password in the second line. Only you should have read access to the\r
+file.<br>\r
+Create the following subdirectories:\r
+<ul>\r
+ <li><code>mlist</code></li>\r
+ <li><code>mpost</code></li>\r
+ <li><code>mpost/fail</code></li>\r
+ <li><code>mpost/ok</code></li>\r
+ <li><code>mpost/pm</code></li>\r
+</ul>\r
+Only you should have read access to <code>mpost</code>. Passwords can be found\r
+there.</li>\r
+<li>Create a directory where the bots will write their reports. set\r
+<code>logpath</code> to point there. \r
+</li><li>Set <code>mirrpath</code> to point at the directory where the mirror is\r
+hosted. That's where you put the contents of <code>ott.zip</code></li>\r
+<li>Set your useragents. <code>useragent2</code> is used by bothasar_t, the\r
+mirror bot. <code>useragent3</code> is used by bothasar_p, the post bot.</li>\r
+<li>Set <code>own_image_regexp</code> to match the URL where the images are\r
+archived. The URL should be something like\r
+"<code>something.example.com/ott/image/</code>".</li>\r
+<li>Set <code>own_url_encoded</code> to your URL-encoded mirror URL.</li>\r
+<li>Now save the file and build the programs using the <code>makefile</code>.\r
+</li>\r
+<li>Copy the binaries and AWK scripts to where <code>propath</code> points to.\r
+Unless it's the same directory.</li>\r
+<li>Go to where the <code>mirrpath</code> points to. You may want to edit the\r
+following files:\r
+<ul>\r
+ <li><code>np/top </code> - the newpage top.</li>\r
+ <li><code>np/end </code> - the newpage bottom.</li>\r
+ <li><code>top </code> - the indexpage top.</li>\r
+ <li><code>end </code> - the indexpage bottom.</li>\r
+ <li><code>post.htm </code> - the post page.</li>\r
+ <li><code>info.htm </code> - the information page.</li>\r
+ <li><code>update.htm</code> - the update page.</li>\r
+</ul>\r
+so that you can set your own title image, links, etc.<br>\r
+Some lines look like <code>###this</code>. Don't change them. The programs will\r
+place their content there.</li>\r
+</ul>\r
+\r
+<h2>Setting up the server</h2>\r
+<p>You have to set up server so that some URLs will link to some CGI programs.\r
+</p><ul>\r
+<li>"<code>/ott/log</code>" should link to "<code>logpath</code>".</li>\r
+<li>"<code>/ott/view</code>" should link to "<code>propath/view</code>".</li>\r
+<li>"<code>/ott/mview</code>" should link to "<code>propath/mview</code>".</li>\r
+<li>"<code>/ott/update</code>" should link to "<code>propath/update</code>".</li>\r
+<li>"<code>/ott/index</code>" should link to "<code>propath/index</code>".</li>\r
+<li>"<code>/ott/post</code>" should link to "<code>propath/post</code>".</li>\r
+<li>"<code>/ott</code>" should link to "<code>propath/index</code>".</li>\r
+</ul>\r
+<p>That's how I did it in apache2:<br>\r
+<br>\r
+<code>\r
+Alias /ott/log /eizm/log/ottmirror<br>\r
+<Directory "/eizm/log/ottmirror"><br>\r
+āOptions Indexes<br>\r
+āOrder allow,deny<br>\r
+āAllow from all<br>\r
+</Directory><br>\r
+<br>\r
+ScriptAlias /ott/view /eizm/pro/ottmirror/view<br>\r
+ScriptAlias /ott/mview /eizm/pro/ottmirror/mview<br>\r
+ScriptAlias /ott/update /eizm/pro/ottmirror/update<br>\r
+ScriptAlias /ott/index /eizm/pro/ottmirror/index<br>\r
+ScriptAlias /ott/post /eizm/pro/ottmirror/post<br>\r
+ScriptAliasMatch ^/ott/?$ /eizm/pro/ottmirror/index<br>\r
+</code>\r
+</p>\r
+\r
+<h2>Commandline parameters for bot2</h2>\r
+<p>bot2 (bothasar_t) is the thread archiving bot.</p>\r
+<ul>\r
+<li>parameters with a numeric value:\r
+<ul>\r
+ <li><b><code>-i</code></b> - the bot ID<br>\r
+ There can be multiple copies of the bot. Each should have its own ID. They\r
+ have their own tempfiles, their own logs, and their own memory of what was\r
+ the last newpage. The bot will refuse to start when there is another bot\r
+ with the same ID still running. The default value is 0. Don't use the value\r
+ 4 because it's already used in <code>update.1.cpp</code>.</li>\r
+ <li><b><code>-o</code></b> - offset from the prievious page<br>\r
+ It determines where to start relative to the last page saved on the previous\r
+ run (of the same ID). 0 means downloading the next page, 1 the same page,\r
+ 2 the previous page, 3 the previousprevious page, and so on. If this is the\r
+ first run, it will start from the first page. The default value is 1.</li>\r
+ <li><b><code>-m</code></b> - maximal number of pages in one run<br>\r
+ The bot will not download more pages than this. The default value is 1.</li>\r
+ <li><b><code>-p</code></b> - distance from the last page<br>\r
+ The bot will always stay at least this many pages away from the latest page\r
+ on the thread. Default value is 0.</li>\r
+ <li><b><code>-s</code></b> - start position override<br>\r
+ The bot will start from this page regardless of where it stopped last time\r
+ </li>\r
+ <li><b><code>-w</code></b> - wait between pages<br>\r
+ Time in seconds to wait between downloading pages. The default value is 3.\r
+ </li>\r
+ <li><b><code>-v</code></b> - wait after download<br>\r
+ Time in seconds to wait after downloading an avatar, attachment or image.\r
+ The default value is 15.</li>\r
+</ul></li>\r
+<li>parameters without a value:\r
+<ul>\r
+ <li><b><code>-d</code></b> - download avatars<br>\r
+ If this option is set, the bot will download avatars.</li>\r
+ <li><b><code>-a</code></b> - download attachments<br>\r
+ If this option is set, the bot will download attachments.</li>\r
+ <li><b><code>-b</code></b> - download images<br>\r
+ If this option is set, the bot will download images that aren't avatars or\r
+ attachments.</li>\r
+ <li><b><code>-t</code></b> - stdout<br>\r
+ If this option is set, the bot will write to standard output instead of the\r
+ log file.</li>\r
+ <li><b><code>-n</code></b> - new log<br>\r
+ If this option is set, the bot will replace the old log. Otherwise it will add\r
+ to it.</li>\r
+ <li><b><code>-r</code></b> - stay in present<br>\r
+ If this option is set, after reaching the last page the bot will stay there\r
+ and will also download the index. Otherwise it will continue from the first\r
+ page.</li>\r
+</ul>\r
+</li>\r
+</ul>\r
+\r
+<h2>Commandline parameters for bot3</h2>\r
+<p>bot3 (bothasar_p) is the post bot.</p>\r
+<ul>\r
+<li>parameters with a numeric value:\r
+<ul>\r
+ <li><b><code>-w</code></b> - wait between posts<br>\r
+ Time in seconds to wait between sending posts. Or between a failed post and\r
+ sending a PM. The default value is 15.\r
+ </li>\r
+</ul></li>\r
+<li>parameters without a value:\r
+<ul>\r
+ <li><b><code>-t</code></b> - stdout<br>\r
+ If this option is set, the bot will write to standard output instead of the\r
+ log file.</li>\r
+ <li><b><code>-n</code></b> - new log<br>\r
+ If this option is set, the bot will replace the old log. Otherwise it will add\r
+ to it.</li>\r
+</ul>\r
+</li>\r
+</ul>\r
+\r
+<h2>Scheduling the bots</h2>\r
+<p>The bots won't run on themselves. They need something that will start them at\r
+regular time intervals. I will share my <code>crontab</code> configuration.</p>\r
+<p>\r
+<code>20,50 * * * * /eizm/pro/ottmirror/bot2 -i2 -r -o1 -m5 -w9 -v5 -d -a</code>\r
+<br>\r
+This bot runs every 30 minutes and updates the pages with new posts.<br>\r
+<br>\r
+<code>26 23 * * * /eizm/pro/ottmirror/bot2 -i3 -r -o5 -m10 -p2 -w9 -v5 -d -a -b\r
+</code><br>\r
+This bots runs every day and reloads the pages with new posts and 4 previous\r
+pages except the two last pages. Because there could be a delurker or someone\r
+could make edits which we don't want to miss.<br>\r
+<br>\r
+<code>23 * * * * /eizm/pro/ottmirror/bot2 -i1 -o0 -m3 -p2 -w9 -v5 -d -a -b\r
+</code><br>\r
+This bot runs every hour and goes slowly through the whole thread except the two\r
+latest pages. Because there can be temporal edits. (like the 1300 and 1800\r
+repositories).<br> \r
+<br>\r
+While the thread being catched up for the first time I'd recommend running only\r
+one copy of the bot at a faster rate than this.<br>\r
+<br>\r
+<code>7,27,47 * * * * /eizm/pro/ottmirror/bot3 -w15</code><br>\r
+This bot runs every\r
+20 minutes and looks for new posts to be sent to the thread.<br>\r
+<br>\r
+<code>0 0 * * 1 /bin/mv /eizm/log/ottmirror/bot2.log.1 /eizm/log/ottmirror/bot2.log.1.lastweek<br>\r
+0 0 * * 1 /bin/mv /eizm/log/ottmirror/bot2.log.2 /eizm/log/ottmirror/bot2.log.2.lastweek<br>\r
+0 0 * * 1 /bin/mv /eizm/log/ottmirror/bot2.log.3 /eizm/log/ottmirror/bot2.log.3.lastweek<br>\r
+0 0 * * 1 /bin/mv /eizm/log/ottmirror/bot3.log /eizm/log/ottmirror/bot3.log.lastweek\r
+</code><br>\r
+This moves the log files once in a week. Otherwise they would grow to infinity.\r
+</p>\r
+\r
+<h2>Bugs</h2>\r
+In line 180 of <code>bot2.1.awk</code> change "<code>if(arr3[2]==404)</code>" to\r
+"<code>if(arr3[2]>=400&&arr3[2]<500)</code>". This will be fixed\r
+in next update.\r
+<h2>Congratulations</h2>\r
+<p>If you managed to do everything described here you should have your own ŠÆOŠÆŠÆIM \r
+TTO. Now <b>wait for it</b> until it catches the whole thread.<br>\r
+</p>\r
+<p>(Unless I forgot about something important here. Let me know if I did)</p>\r
+Balthasar<br>\r
+<br>\r
+</div>\r
+<a href="http://1190.bicyclesonthemoon.dnsd.info/">1190.bicyclesonthemoon.dnsd.info</a>\r
+\r
+</body></html>
\ No newline at end of file
--- /dev/null
+</ul>
+<span class="corners-bottom" ><span></span></span></div>
+</div>
+
+
+<hr />
+<div class="topic-actions" >
+
+<div class="buttons" >
+<div class="mustardreply-icon" ><a href="/ott/post" title="Post while mustard" ><span></span>Post while mustard</a></div>
+<div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&f=7&t=101043" title="Post a reply" ><span></span>Post a reply</a></div>
+</div>
+<div class="search-box">
+<form method="get" action="/ott/view" >
+go to newpage:
+<input class="inputbox tiny np" type="text" name="np" size="6" />
+<input class="button2" type="submit" value="goto" />
+</form>
+</div>
+
+
+<div class="pagination" >
+1 topic • <a href="#" onclick="jumpto(); return false;" title="Click to jump to pageā¦" >Page <strong>1</strong> of <strong>1</strong></a> • <span><strong>1</strong></span>
+</div>
+
+</div>
+<p></p><p><a href="http://forums.xkcd.com/index.php" class="left-box left" >Return to Board index</a></p>
+<form method="post" id="jumpbox" action="http://forums.xkcd.com/viewforum.php" onsubmit="if(this.f.value == -1){return false;}" >
+
+<fieldset class="jumpbox" >
+
+<label for="f" accesskey="j" >Jump to:</label>
+<select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }" >
+
+<option value="-1" >Select a forum</option>
+<option value="-1" >------------------</option>
+<option value="26" >The Comic</option>
+
+<option value="7" selected="selected" > Individual XKCD Comic Threads</option>
+
+<option value="60" > What If?</option>
+
+<option value="27" >Sound and Fury</option>
+
+<option value="9" > News & Articles</option>
+
+<option value="8" > Serious Business</option>
+
+<option value="16" > XKCD Meetups</option>
+
+<option value="2" > General</option>
+
+<option value="29" >Numberologics, Alchemy, Linguinomics, and other Academiology</option>
+
+<option value="17" > Mathematics</option>
+
+<option value="18" > Science</option>
+
+<option value="59" > Fictional Science</option>
+
+<option value="25" > Language/Linguistics</option>
+
+<option value="44" > School</option>
+
+<option value="30" >Analytical Engines</option>
+
+<option value="20" > The Help Desk</option>
+
+<option value="11" > Coding</option>
+
+<option value="12" > Computer Science</option>
+
+<option value="36" > Hardware</option>
+
+<option value="40" > Religious Wars</option>
+
+<option value="31" >Enigmas and Diversions</option>
+
+<option value="3" > Logic Puzzles</option>
+
+<option value="14" > Forum Games</option>
+
+<option value="53" > Mafia</option>
+
+<option value="4" > Your art and links</option>
+
+<option value="43" > Fit Club</option>
+
+<option value="32" >High Culture</option>
+
+<option value="21" > Gaming</option>
+
+<option value="22" > Movies and TV Shows</option>
+
+<option value="23" > Music</option>
+
+<option value="24" > Books</option>
+
+<option value="49" > Comics/Graphic Novels</option>
+
+<option value="39" > Food</option>
+
+<option value="33" >Site Administration</option>
+
+<option value="10" > Site/Forum issues</option>
+
+<option value="5" > News</option>
+
+<option value="52" >Duat</option>
+
+<option value="47" > Free as in Destitute</option>
+
+<option value="51" > Jesse is a handsome and intelligent man who smells nice</option>
+
+<option value="55" > Azrael is pretty cool also</option>
+
+</select>
+<input type="submit" value="Go" class="button2" />
+</fieldset>
+</form>
+<h3>Who is online</h3>
+<p> Users browsing this forum: NaN registered users and NaN guests</p>
+<h3>Forum permissions</h3>
+<p>You <strong>cannot</strong> read about your forum permissions<br /></p>
+</div>
+<div>
+<p><a href="/" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.dnsd.info</a></p>
+</div>
+<div id="page-footer" >
+<div class="navbar" >
+<div class="inner" ><span class="corners-top" ><span></span></span>
+<ul class="linklist" >
+<li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
+<li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> • <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> • All times are UTC </li>
+</ul>
+<span class="corners-bottom" ><span></span></span></div>
+</div>
+<div class="copyright">
+Powered by <a href="http://www.phpbb.com/"> phpBB </a> ® Forum Software © phpBB Group<br/>
+Protected by <a href="http://www.lithiumstudios.org" target="_blank"> Anti-Spam ACP </a><br />
+(Well, only the original since this is a copy) <br />
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a>
+
+</div>
+<computery stuff>:<br/>
+<div style="margin:20px; margin-top:5px">
+ <div class="quotetitle">
+ <b>Spoiler:</b> <input value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" type="button">
+ </div>
+ <div class="quotecontent">
+ <div style="display: none;">
+ <ul>
+ <li><a href="/ott/attachment">attachment</a></li>
+ <li><a href="/ott/avatar">avatar</a></li>
+ <li><a href="/ott/image">image</a></li>
+ <li><a href="/ott/log">log</a></li>
+ <li><a href="/ott/np">np</a></li>
+ <li><a href="/ott/otterinf">otterinf</a></li>
+ <li><a href="/ott/postlist">postlist</a></li>
+ <li><a href="/ott/prosilver">prosilver</a></li>
+ <li><a href="/ott/sig">sig</a></li>
+ <li><a href="/ott/test">test</a></li>
+ <li><a href="/ott/update.htm">update</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+
+</div>
+</div>
+<div>
+<a id="bottom" name="bottom" accesskey="z" ></a>
+</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en-gb" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<title>Mustardtime posting • ŠÆOŠÆŠÆIM TTO • Bicycles on the Moon</title>
+
+<!--
+ phpBB style name: prosilver
+ Based on style: prosilver (this is the default phpBB3 style)
+ Original author: Tom Beddard ( http://www.subBlue.com/ )
+ Modified by:
+-->
+
+<script type="text/javascript">
+// <![CDATA[
+ var jump_page = 'Enter the page number you wish to go to:';
+ var on_page = '';
+ var per_page = '';
+ var base_url = '';
+ var style_cookie = 'phpBBstyle';
+ var style_cookie_settings = '; path=/';
+ var onload_functions = new Array();
+ var onunload_functions = new Array();
+
+
+
+ /**
+ * Find a member
+ */
+ function find_username(url)
+ {
+ popup(url, 760, 570, '_usersearch');
+ return false;
+ }
+
+ /**
+ * New function for handling multiple calls to window.onload and window.unload by pentapenguin
+ */
+ window.onload = function()
+ {
+ for (var i = 0; i < onload_functions.length; i++)
+ {
+ eval(onload_functions[i]);
+ }
+ };
+
+ window.onunload = function()
+ {
+ for (var i = 0; i < onunload_functions.length; i++)
+ {
+ eval(onunload_functions[i]);
+ }
+ };
+
+// ]]>
+</script>
+<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
+<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<link rel="icon" type="image/png" href="/img/favicon.png"/>
+
+
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-25700708-3']);
+ _gaq.push(['_setDomainName', 'xkcd.com']);
+ _gaq.push(['_setAllowLinker', true]);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
+</head>
+
+<body id="phpbb" class="section-posting ltr">
+<div id="wrap">
+<a id="top" name="top" accesskey="t"></a>
+<div id="page-header">
+<div class="headerbar">
+<div class="inner"><span class="corners-top"><span></span></span>
+<div id="site-description">
+<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo"> <img src="/ott/prosilver/imageset/xkcdLogo_transparent.png" alt="" title="" /> </a>
+<h1> <a href="/ott/" title="the OTT MIRROR"> the ŠÆOŠÆŠÆIM TTO </a> </h1>
+<p>Redundant copy of the needle-pulled thing</p>
+<p class="skiplink"> <a href="#start_here"> Skip to content </a> </p>
+</div>
+<div id="search-box">
+<form action="http://forums.xkcd.com/search.php" method="get" id="search">
+<fieldset>
+<input name="keywords" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search the foraā¦" onclick="if(this.value=='Search the foraā¦')this.value='';" onblur="if(this.value=='')this.value='Search the foraā¦';" />
+<input class="button2" value="Search" type="submit" /> <br />
+<a href="http://forums.xkcd.com/search.php" title="View the advanced search options"> Advanced search </a>
+</fieldset>
+</form>
+</div>
+<span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="navbar">
+<div class="inner"><span class="corners-top"><span></span></span>
+
+<ul class="linklist navlinks">
+<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> ‹ </strong> <a href="/" accesskey="h"> Time related </a> <strong> ‹ </strong> <a href="/ott/"> ŠÆOŠÆŠÆIM TTO </a> </li>
+<li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>
+</ul>
+<ul class="linklist navlinks2">
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>
+</ul>
+<span class="corners-bottom"><span></span></span></div>
+</div>
+</div>
+<a name="start_here"></a>
+<div id="page-body">
+
+<div class="panel" id="message">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <h2>Information</h2>
+ <!-- <p>This message has been posted successfully.<br /><br /><a href="./viewtopic.php?f=7&t=101043&p=3564635#p3564635">View your submitted message</a><br /><br /><a href="./viewforum.php?f=7">Return to the forum last visited</a></p> -->
+###info
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+
+</div>
+
+<div id="page-footer" >
+<div class="navbar" >
+<div class="inner" ><span class="corners-top" ><span></span></span>
+<ul class="linklist" >
+<li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
+<li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> • <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> • All times are UTC </li>
+</ul>
+<span class="corners-bottom" ><span></span></span></div>
+</div>
+<div class="copyright">
+Powered by <a href="http://www.phpbb.com/"> phpBB </a> ® Forum Software © phpBB Group<br/>
+Protected by <a href="http://www.lithiumstudios.org" target="_blank"> Anti-Spam ACP </a><br />
+(Well, only the original since this is a copy) <br />
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a>
+
+</div>
+<computery stuff>:<br/>
+<div style="margin:20px; margin-top:5px">
+ <div class="quotetitle">
+ <b>Spoiler:</b> <input value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" type="button">
+ </div>
+ <div class="quotecontent">
+ <div style="display: none;">
+ <ul>
+ <li><a href="/ott/attachment">attachment</a></li>
+ <li><a href="/ott/avatar">avatar</a></li>
+ <li><a href="/ott/image">image</a></li>
+ <li><a href="/ott/log">log</a></li>
+ <li><a href="/ott/np">np</a></li>
+ <li><a href="/ott/otterinf">otterinf</a></li>
+ <li><a href="/ott/postlist">postlist</a></li>
+ <li><a href="/ott/prosilver">prosilver</a></li>
+ <li><a href="/ott/sig">sig</a></li>
+ <li><a href="/ott/test">test</a></li>
+ <li><a href="/ott/update.htm">update</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+</div>
+
+</div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+
+</div>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<form id="viewtopic" method="post" action="http://forums.xkcd.com/viewtopic.php?f=7&t=101043" >\r
+<fieldset class="display-options" style="margin-top: 0; " >\r
+###prev\r
+###next\r
+<label>Display posts from previous: <select name="st" id="st" ><option value="0" selected="selected" >All posts</option><option value="1" >1 day</option><option value="7" >7 days</option><option value="14" >2 weeks</option><option value="30" >1 month</option><option value="90" >3 months</option><option value="180" >6 months</option><option value="365" >1 year</option></select></label>\r
+<label>Sort by <select name="sk" id="sk" ><option value="a" >Author</option><option value="t" selected="selected" >Post time</option><option value="s" >Subject</option></select></label> <label><select name="sd" id="sd" ><option value="a" selected="selected" >Ascending</option><option value="d" >Descending</option></select> <input type="submit" name="sort" value="Go" class="button2" /></label>\r
+</fieldset>\r
+</form>\r
+<hr />\r
+<div class="topic-actions" >\r
+<div class="buttons" >\r
+<div class="mustardreply-icon" ><a href="/ott/post" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
+<div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&f=7&t=101043" title="Post a reply" ><span></span>Post a reply</a></div>\r
+</div>\r
+<div class="search-box"> \r
+<form method="get" action="/ott/view" >\r
+go to newpage:\r
+<input class="inputbox tiny np" type="text" name="np" size="6" /> \r
+<input class="button2" type="submit" value="goto" /> \r
+</form>\r
+</div>\r
+###links\r
+</div>\r
+<p></p><p><a href="http://forums.xkcd.com/viewforum.php?f=7" class="left-box left" >Return to Individual XKCD Comic Threads</a></p>\r
+<form method="post" id="jumpbox" action="http://forums.xkcd.com/viewforum.php" onsubmit="if(this.f.value == -1){return false;}" >\r
+<fieldset class="jumpbox" >\r
+<label for="f" accesskey="j" >Jump to:</label>\r
+<select name="f" id="f" onchange="if(this.options[this.selectedIndex].value != -1){ document.forms['jumpbox'].submit() }" >\r
+<option value="-1" >Select a forum</option>\r
+<option value="-1" >------------------</option>\r
+<option value="26" >The Comic</option>\r
+<option value="7" selected="selected" > Individual XKCD Comic Threads</option>\r
+<option value="60" > What If?</option>\r
+<option value="27" >Sound and Fury</option>\r
+<option value="9" > News & Articles</option>\r
+<option value="8" > Serious Business</option>\r
+<option value="16" > XKCD Meetups</option>\r
+<option value="2" > General</option>\r
+<option value="29" >Numberologics, Alchemy, Linguinomics, and other Academiology</option>\r
+<option value="17" > Mathematics</option>\r
+<option value="18" > Science</option>\r
+<option value="59" > Fictional Science</option>\r
+<option value="25" > Language/Linguistics</option>\r
+<option value="44" > School</option>\r
+<option value="30" >Analytical Engines</option>\r
+<option value="20" > The Help Desk</option>\r
+<option value="11" > Coding</option>\r
+<option value="12" > Computer Science</option>\r
+<option value="36" > Hardware</option>\r
+<option value="40" > Religious Wars</option>\r
+<option value="31" >Enigmas and Diversions</option>\r
+<option value="3" > Logic Puzzles</option>\r
+<option value="14" > Forum Games</option>\r
+<option value="53" > Mafia</option>\r
+<option value="4" > Your art and links</option>\r
+<option value="43" > Fit Club</option>\r
+<option value="32" >High Culture</option>\r
+<option value="21" > Gaming</option>\r
+<option value="22" > Movies and TV Shows</option>\r
+<option value="23" > Music</option>\r
+<option value="24" > Books</option>\r
+<option value="49" > Comics/Graphic Novels</option>\r
+<option value="39" > Food</option>\r
+<option value="33" >Site Administration</option>\r
+<option value="10" > Site/Forum issues</option>\r
+<option value="5" > News</option>\r
+<option value="52" >Duat</option>\r
+<option value="47" > Free as in Destitute</option>\r
+<option value="51" > Jesse is a handsome and intelligent man who smells nice</option>\r
+<option value="55" > Azrael is pretty cool also</option>\r
+</select>\r
+<input type="submit" value="Go" class="button2" />\r
+</fieldset>\r
+</form>\r
+<h3>Who is online</h3>\r
+<p> Users browsing this forum: NaN registered users and NaN guests</p>\r
+</div>\r
+<div>\r
+<p><a href="/" class="left-box left" accesskey="r" >Return to 1190.bicyclesonthemoon.dnsd.info</a><br/></p>\r
+</div>\r
+<div id="page-footer" >\r
+<div class="navbar" >\r
+<div class="inner" ><span class="corners-top" ><span></span></span>\r
+<ul class="linklist" >\r
+<li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>\r
+<li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> • <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> • All times are UTC </li>\r
+</ul>\r
+<span class="corners-bottom" ><span></span></span></div>\r
+</div>\r
+<div class="copyright">\r
+Powered by <a href="http://www.phpbb.com/"> phpBB </a> ® Forum Software © phpBB Group<br/>\r
+Protected by <a href="http://www.lithiumstudios.org" target="_blank"> Anti-Spam ACP </a><br />\r
+(Well, only the original since this is a copy) <br />\r
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a>\r
+\r
+</div>\r
+<computery stuff>:<br/>\r
+<div style="margin:20px; margin-top:5px">\r
+ <div class="quotetitle">\r
+ <b>Spoiler:</b> <input value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" type="button">\r
+ </div>\r
+ <div class="quotecontent">\r
+ <div style="display: none;">\r
+ <ul>\r
+ <li><a href="/ott/attachment">attachment</a></li>\r
+ <li><a href="/ott/avatar">avatar</a></li>\r
+ <li><a href="/ott/image">image</a></li>\r
+ <li><a href="/ott/log">log</a></li>\r
+ <li><a href="/ott/np">np</a></li>\r
+ <li><a href="/ott/otterinf">otterinf</a></li>\r
+ <li><a href="/ott/postlist">postlist</a></li>\r
+ <li><a href="/ott/prosilver">prosilver</a></li>\r
+ <li><a href="/ott/sig">sig</a></li>\r
+ <li><a href="/ott/test">test</a></li>\r
+ <li><a href="/ott/update.htm">update</a></li>\r
+ </ul>\r
+ </div>\r
+ </div>\r
+</div> \r
+</div>\r
+</div>\r
+<div>\r
+<a id="bottom" name="bottom" accesskey="z" ></a>\r
+</div>\r
+</body>\r
+</html>\r
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >\r
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb" >\r
+<head>\r
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />\r
+<meta http-equiv="content-style-type" content="text/css" />\r
+<meta http-equiv="content-language" content="en-gb" />\r
+<meta http-equiv="imagetoolbar" content="no" />\r
+<meta name="resource-type" content="document" />\r
+<meta name="distribution" content="global" />\r
+<meta name="keywords" content="" />\r
+<meta name="description" content="" />\r
+<title>ŠÆOŠÆŠÆIM TTO • 1190: "Time" • Bicycles on the Moon</title>\r
+<!--\r
+phpBB style name: prosilver\r
+Based on style: prosilver (this is the default phpBB3 style)\r
+Original author: Tom Beddard ( http://www.subBlue.com/ )\r
+Modified by:\r
+-->\r
+<script type="text/javascript" >\r
+// <![CDATA[\r
+var jump_page = 'Go to newpage:';\r
+var on_page = '0';\r
+var per_page = '40';\r
+var base_url = '/ott/view?f=7&t=101043';\r
+var style_cookie = 'phpBBstyle';\r
+var style_cookie_settings = '; path=/';\r
+var onload_functions = new Array();\r
+var onunload_functions = new Array();\r
+/**\r
+* Find a member\r
+*/\r
+function find_username(url)\r
+{\r
+popup(url, 760, 570, '_usersearch');\r
+return false;\r
+}\r
+/**\r
+* New function for handling multiple calls to window.onload and window.unload by pentapenguin\r
+*/\r
+window.onload = function()\r
+{\r
+for (var i = 0; i < onload_functions.length; i++)\r
+{\r
+eval(onload_functions[i]);\r
+}\r
+};\r
+window.onunload = function()\r
+{\r
+for (var i = 0; i < onunload_functions.length; i++)\r
+{\r
+eval(onunload_functions[i]);\r
+}\r
+};\r
+// ]]>\r
+</script>\r
+<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>\r
+<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>\r
+<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />\r
+<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />\r
+<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />\r
+<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />\r
+<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />\r
+<link rel="icon" type="image/png" href="/img/favicon.png"/>\r
+\r
+</head>\r
+<body id="phpbb" class="section-viewtopic ltr" >\r
+<div id="wrap" >\r
+<a id="top" name="top" accesskey="t" ></a>\r
+<div id="page-header" >\r
+<div class="headerbar" >\r
+<div class="inner" ><span class="corners-top" ><span></span></span>\r
+<div id="site-description" >\r
+<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo"> <img src="/ott/prosilver/imageset/xkcdLogo_transparent.png" alt="" title="" /> </a> \r
+<h1> <a href="/ott/" title="the OTT MIRROR"> the ŠÆOŠÆŠÆIM TTO </a> </h1> \r
+<p>Redundant copy of the needle-pulled thing</p> \r
+<p class="skiplink"> <a href="#start_here"> Skip to content </a> </p> \r
+</div>\r
+<div id="search-box"> \r
+<form action="http://forums.xkcd.com/search.php" method="get" id="search"> \r
+<fieldset> \r
+<input name="keywords" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search the foraā¦" onclick="if(this.value=='Search the foraā¦')this.value='';" onblur="if(this.value=='')this.value='Search the foraā¦';" /> \r
+<input class="button2" value="Search" type="submit" /> <br /> \r
+<a href="http://forums.xkcd.com/search.php" title="View the advanced search options"> Advanced search </a> \r
+</fieldset> \r
+</form> \r
+</div> \r
+<span class="corners-bottom" ><span></span></span></div>\r
+</div>\r
+<div class="navbar"> \r
+<div class="inner"> <span class="corners-top"> <span> </span> </span> \r
+<ul class="linklist navlinks"> \r
+<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> ‹ </strong> <a href="/" accesskey="h"> Time related </a> <strong> ‹ </strong> <a href="/ott/"> ŠÆOŠÆŠÆIM TTO </a> </li> \r
+<li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li> \r
+<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li> \r
+</ul> \r
+<ul class="linklist navlinks2">\r
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li> \r
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li> \r
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li> \r
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li> \r
+</ul> \r
+<span class="corners-bottom"> <span> </span> </span> </div> \r
+</div> \r
+</div>\r
+<a name="start_here" ></a>\r
+<div id="page-body" >\r
+###title\r
+<p>Wait for it.</p>\r
+<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body --><div style="display: none !important;" >This forum is for the individual discussion thread that goes with each new comic.<br /></div>\r
+<p>\r
+<strong>Moderators:</strong> <a style="color:#006600;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=6592" >Moderators General</a>, <a style="color:#993399;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=7358" >Magistrates</a>, <a style="color:#CC6600;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=7357" >Prelates</a>\r
+</p>\r
+<div class="topic-actions" >\r
+<div class="buttons" >\r
+<div class="mustardreply-icon" ><a href="/ott/post" title="Post while mustard" ><span></span>Post while mustard</a></div>\r
+<div class="reply-icon" ><a href="http://forums.xkcd.com/posting.php?mode=reply&f=7&t=101043" title="Post a reply" ><span></span>Post a reply</a></div>\r
+</div>\r
+<div class="search-box" >\r
+<form method="get" id="topic-search" action="http://forums.xkcd.com/search.php" >\r
+<fieldset>\r
+<input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="Search the OTTā¦" onclick="if(this.value=='Search the OTTā¦')this.value='';" onblur="if(this.value=='')this.value='Search the OTTā¦';" />\r
+<input class="button2" type="submit" value="Search" />\r
+<input type="hidden" name="t" value="101043" />\r
+<input type="hidden" name="sf" value="msgonly" />\r
+</fieldset>\r
+</form>\r
+</div>\r
+<div class="search-box"> \r
+<form method="get" action="/ott/view" >\r
+go to newpage:\r
+<input class="inputbox tiny np" type="text" name="np" size="6" /> \r
+<input class="button2" type="submit" value="goto" /> \r
+</form>\r
+</div>\r
+###links\r
+</div>\r
+<div class="clear" ></div>\r
+\r
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en-gb" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<title>Mustardtime posting • ŠÆOŠÆŠÆIM TTO • Bicycles on the Moon</title>
+
+<!--
+ phpBB style name: prosilver
+ Based on style: prosilver (this is the default phpBB3 style)
+ Original author: Tom Beddard ( http://www.subBlue.com/ )
+ Modified by:
+-->
+
+<script type="text/javascript">
+// <![CDATA[
+ var jump_page = 'Enter the page number you wish to go to:';
+ var on_page = '';
+ var per_page = '';
+ var base_url = '';
+ var style_cookie = 'phpBBstyle';
+ var style_cookie_settings = '; path=/';
+ var onload_functions = new Array();
+ var onunload_functions = new Array();
+
+
+
+ /**
+ * Find a member
+ */
+ function find_username(url)
+ {
+ popup(url, 760, 570, '_usersearch');
+ return false;
+ }
+
+ /**
+ * New function for handling multiple calls to window.onload and window.unload by pentapenguin
+ */
+ window.onload = function()
+ {
+ for (var i = 0; i < onload_functions.length; i++)
+ {
+ eval(onload_functions[i]);
+ }
+ };
+
+ window.onunload = function()
+ {
+ for (var i = 0; i < onunload_functions.length; i++)
+ {
+ eval(onunload_functions[i]);
+ }
+ };
+
+// ]]>
+</script>
+<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
+<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<link rel="icon" type="image/png" href="/img/favicon.png"/>
+
+
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-25700708-3']);
+ _gaq.push(['_setDomainName', 'xkcd.com']);
+ _gaq.push(['_setAllowLinker', true]);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
+</head>
+
+<body id="phpbb" class="section-posting ltr">
+<div id="wrap">
+<a id="top" name="top" accesskey="t"></a>
+<div id="page-header">
+<div class="headerbar">
+<div class="inner"><span class="corners-top"><span></span></span>
+<div id="site-description">
+<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo"> <img src="/ott/prosilver/imageset/xkcdLogo_transparent.png" alt="" title="" /> </a>
+<h1> <a href="/ott/" title="the OTT MIRROR"> the ŠÆOŠÆŠÆIM TTO </a> </h1>
+<p>Redundant copy of the needle-pulled thing</p>
+<p class="skiplink"> <a href="#start_here"> Skip to content </a> </p>
+</div>
+<div id="search-box">
+<form action="http://forums.xkcd.com/search.php" method="get" id="search">
+<fieldset>
+<input name="keywords" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search the foraā¦" onclick="if(this.value=='Search the foraā¦')this.value='';" onblur="if(this.value=='')this.value='Search the foraā¦';" />
+<input class="button2" value="Search" type="submit" /> <br />
+<a href="http://forums.xkcd.com/search.php" title="View the advanced search options"> Advanced search </a>
+</fieldset>
+</form>
+</div>
+<span class="corners-bottom"><span></span></span></div>
+</div>
+
+<div class="navbar">
+<div class="inner"><span class="corners-top"><span></span></span>
+
+<ul class="linklist navlinks">
+<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> ‹ </strong> <a href="/" accesskey="h"> Time related </a> <strong> ‹ </strong> <a href="/ott/"> ŠÆOŠÆŠÆIM TTO </a> </li>
+<li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>
+</ul>
+<ul class="linklist navlinks2">
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>
+</ul>
+<span class="corners-bottom"><span></span></span></div>
+</div>
+</div>
+<a name="start_here"></a>
+<div id="page-body">
+
+<h2>Post during mustardtime.</h2>
+<!-- Sending posts does work but is not automated yet. If you make a post from here, it will be added to to the queue but can stay there for a long time. -->
+
+<form id="postform" method="post" action="/ott/post" >
+
+###HTML
+
+<div class="panel" id="postingbox">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <h3>Post a reply</h3>
+
+ <script type="text/javascript">
+// <![CDATA[
+ onload_functions.push('apply_onkeypress_event()');
+// ]]>
+</script>
+
+<fieldset class="fields1">
+
+###wrong
+
+ <dl style="clear: left;">
+ <dt><label for="subject">Subject:</label></dt>
+###subject
+ </dl>
+ <dl>
+ <dt><label for="username">Username:</label></dt>
+###username
+ </dl>
+ <dl>
+ <dt><label for="password">Password:</label></dt>
+ <dd><input tabindex="3" id="password" name="password" size="45" class="inputbox autowidth" type="password"></dd>
+ <dd><b>Warning</b>: The mirror can't verify your username or password.</dd>
+ </dl>
+ <script type="text/javascript">
+// <![CDATA[
+ var form_name = 'postform';
+ var text_name = 'message';
+ var load_draft = false;
+ var upload = false;
+
+ // Define the bbCode tags
+ var bbcode = new Array();
+ var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', '[bibliography]', '[/bibliography]', '[center]', '[/center]', '[cite]', '[/cite]', '[imath]', '[/imath]', '[math]', '[/math]', '[right]', '[/right]', '[s]', '[/s]', '[spoiler]', '[/spoiler]', '[sub]', '[/sub]', '[sup]', '[/sup]');
+ var imageTag = false;
+
+ // Helpline messages
+ var help_line = {
+ b: 'Bold text: [b]text[/b]',
+ i: 'Italic text: [i]text[/i]',
+ u: 'Underline text: [u]text[/u]',
+ q: 'Quote text: [quote]text[/quote]',
+ c: 'Code display: [code]code[/code]',
+ l: 'List: [list]text[/list]',
+ o: 'Ordered list: [list=]text[/list]',
+ p: 'Insert image: [img]http://image_url[/img]',
+ w: 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]',
+ a: 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]',
+ s: 'Font colour: [color=red]text[/color] Tip: you can also use color=#FF0000',
+ f: 'Font size: [size=85]small text[/size]',
+ y: 'List: Add list element',
+ d: 'Flash: [flash=width,height]http://url[/flash]'
+
+ ,cb_22: ''
+
+ ,cb_24: ''
+
+ ,cb_26: ''
+
+ ,cb_28: 'Inserts an inline block of TeX math.'
+
+ ,cb_30: 'Adds a block of TeX math (not inline)'
+
+ ,cb_32: ''
+
+ ,cb_34: 'strike through'
+
+ ,cb_36: 'hides spoilers'
+
+ ,cb_38: 'subscript'
+
+ ,cb_40: 'superscript'
+
+ }
+
+ var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
+ var show_panel = 'options-panel';
+
+
+// ]]>
+</script>
+<script type="text/javascript" src="/ott/prosilver/template/editor.js"></script>
+<div id="colour_palette" style="display: none;">
+ <dl style="clear: left;">
+ <dt><label>Font colour:</label></dt>
+ <dd>
+ <script type="text/javascript">
+ // <![CDATA[
+ function change_palette()
+ {
+ dE('colour_palette');
+ e = document.getElementById('colour_palette');
+
+ if (e.style.display == 'block')
+ {
+ document.getElementById('bbpalette').value = 'Hide font colour';
+ }
+ else
+ {
+ document.getElementById('bbpalette').value = 'Font colour';
+ }
+ }
+
+ colorPalette('h', 15, 10);
+ // ]]>
+ </script>
+ </dd>
+ </dl>
+</div>
+
+<div id="format-buttons">
+ <input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="Bold text: [b]text[/b]" />
+ <input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="Italic text: [i]text[/i]" />
+ <input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="Underline text: [u]text[/u]" />
+
+ <input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="Quote text: [quote]text[/quote]" />
+
+ <input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="Code display: [code]code[/code]" />
+ <input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="List: [list]text[/list]" />
+ <input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="Ordered list: [list=]text[/list]" />
+ <input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="List item: [*]text[/*]" />
+
+ <input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="Insert image: [img]http://image_url[/img]" />
+
+ <input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]" />
+
+ <select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="Font size: [size=85]small text[/size]">
+ <option value="50">Tiny</option>
+ <option value="85">Small</option>
+ <option value="100" selected="selected">Normal</option>
+
+ <option value="150">Large</option>
+
+ <option value="200">Huge</option>
+
+ </select>
+ <input type="button" class="button2" name="bbpalette" id="bbpalette" value="Font colour" onclick="change_palette();" title="Font colour: [color=red]text[/color] Tip: you can also use color=#FF0000" />
+
+ <input type="button" class="button2" name="addbbcode22" value="bibliography" onclick="bbstyle(22)" title="" />
+
+ <input type="button" class="button2" name="addbbcode24" value="center" onclick="bbstyle(24)" title="" />
+
+ <input type="button" class="button2" name="addbbcode26" value="cite" onclick="bbstyle(26)" title="" />
+
+ <input type="button" class="button2" name="addbbcode28" value="imath" onclick="bbstyle(28)" title="Inserts an inline block of TeX math." />
+
+ <input type="button" class="button2" name="addbbcode30" value="math" onclick="bbstyle(30)" title="Adds a block of TeX math (not inline)" />
+
+ <input type="button" class="button2" name="addbbcode32" value="right" onclick="bbstyle(32)" title="" />
+
+ <input type="button" class="button2" name="addbbcode34" value="s" onclick="bbstyle(34)" title="strike through" />
+
+ <input type="button" class="button2" name="addbbcode36" value="spoiler" onclick="bbstyle(36)" title="hides spoilers" />
+
+ <input type="button" class="button2" name="addbbcode38" value="sub" onclick="bbstyle(38)" title="subscript" />
+
+ <input type="button" class="button2" name="addbbcode40" value="sup" onclick="bbstyle(40)" title="superscript" />
+
+</div>
+
+
+ <div id="smiley-box">
+
+ <strong>Smilies</strong><br />
+
+ <a href="#" onclick="insert_text(':D', true); return false;"><img src="/ott/prosilver/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy" /></a>
+
+ <a href="#" onclick="insert_text(':)', true); return false;"><img src="/ott/prosilver/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile" /></a>
+
+ <a href="#" onclick="insert_text(':(', true); return false;"><img src="/ott/prosilver/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad" /></a>
+
+ <a href="#" onclick="insert_text(':o', true); return false;"><img src="/ott/prosilver/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised" /></a>
+
+ <a href="#" onclick="insert_text(':shock:', true); return false;"><img src="/ott/prosilver/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked" /></a>
+
+ <a href="#" onclick="insert_text(':?', true); return false;"><img src="/ott/prosilver/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused" /></a>
+
+ <a href="#" onclick="insert_text('8-)', true); return false;"><img src="/ott/prosilver/smilies/icon_cool.gif" width="15" height="15" alt="8-)" title="Cool" /></a>
+
+ <a href="#" onclick="insert_text(':lol:', true); return false;"><img src="/ott/prosilver/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing" /></a>
+
+ <a href="#" onclick="insert_text(':x', true); return false;"><img src="/ott/prosilver/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad" /></a>
+
+ <a href="#" onclick="insert_text(':P', true); return false;"><img src="/ott/prosilver/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz" /></a>
+
+ <a href="#" onclick="insert_text(':oops:', true); return false;"><img src="/ott/prosilver/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed" /></a>
+
+ <a href="#" onclick="insert_text(':cry:', true); return false;"><img src="/ott/prosilver/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad" /></a>
+
+ <a href="#" onclick="insert_text(':evil:', true); return false;"><img src="/ott/prosilver/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad" /></a>
+
+ <a href="#" onclick="insert_text(':twisted:', true); return false;"><img src="/ott/prosilver/smilies/icon_twisted.gif" width="15" height="15" alt=":twisted:" title="Twisted Evil" /></a>
+
+ <a href="#" onclick="insert_text(':roll:', true); return false;"><img src="/ott/prosilver/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes" /></a>
+
+ <a href="#" onclick="insert_text(':wink:', true); return false;"><img src="/ott/prosilver/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink" /></a>
+
+ <a href="#" onclick="insert_text(':!:', true); return false;"><img src="/ott/prosilver/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation" /></a>
+
+ <a href="#" onclick="insert_text(':?:', true); return false;"><img src="/ott/prosilver/smilies/icon_question.gif" width="15" height="15" alt=":?:" title="Question" /></a>
+
+ <a href="#" onclick="insert_text(':idea:', true); return false;"><img src="/ott/prosilver/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea" /></a>
+
+ <a href="#" onclick="insert_text(':arrow:', true); return false;"><img src="/ott/prosilver/smilies/icon_arrow.gif" width="15" height="15" alt=":arrow:" title="Arrow" /></a>
+
+ <a href="#" onclick="insert_text(':|', true); return false;"><img src="/ott/prosilver/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral" /></a>
+
+ <a href="#" onclick="insert_text(':mrgreen:', true); return false;"><img src="/ott/prosilver/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green" /></a>
+
+ <!-- <a href="./faq.php?mode=bbcode">BBCode</a> is <em>ON</em><br />
+
+ [img] is <em>ON</em><br />
+ [flash] is <em>OFF</em><br />
+ [url] is <em>ON</em><br />
+
+ Smilies are <em>ON</em>
+ --> <hr /><!-- <strong><a href="#review">Topic review</a></strong> -->
+ </div>
+
+ <div id="message-box">
+###message
+ </div>
+</fieldset>
+
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div class="panel bg2">
+ <div class="inner"><span class="corners-top"><span></span></span>
+ <fieldset class="submit-buttons">
+
+<!-- <input type="hidden" name="topic_cur_post_id" value="3558500" /><input type="hidden" name="lastclick" value="1395949001" />
+ --><input type="submit" tabindex="5" name="preview" value="Preview" class="button1" onclick="document.getElementById('postform').action += '#preview';" />
+ <input type="submit" accesskey="s" tabindex="6" name="post" value="Submit" class="button1 default-submit-action" />
+
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+ </div>
+
+ <div id="tabs">
+ <ul>
+ <li id="options-panel-tab" class="activetab"><a href="#tabs" onclick="subPanels('options-panel'); return false;"><span>Options</span></a></li>
+ </ul>
+ </div>
+
+ <div class="panel bg3" id="options-panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <fieldset class="fields1">
+
+###disable_bbcode
+
+###disable_smilies
+
+###disable_magic_url
+
+###attach_sig
+
+###notify
+
+ </fieldset>
+
+ <!-- TIME! -->
+ <!-- < input type="hidden" name="creation_time" value="0" /> -->
+ <!-- TOKEN -->
+<!-- <input type="hidden" name="form_token" value="0" /> -->
+
+ <span class="corners-bottom"><span></span></span></div>
+</div>
+
+<!-- <div class="panel bg3" id="attach-panel">
+ <div class="inner"><span class="corners-top"><span></span></span>
+
+ <p>If you wish to attach one or more files enter the details below.</p>
+
+ <fieldset class="fields2">
+ <dl>
+ <dt><label for="fileupload">Filename:</label></dt>
+ <dd>
+ <input type="file" name="fileupload" id="fileupload" maxlength="10485760" value="" class="inputbox autowidth" />
+ <input type="submit" name="add_file" value="Add the file" class="button2" onclick="upload = true;" />
+ </dd>
+ </dl>
+ <dl>
+ <dt><label for="filecomment">File comment:</label></dt>
+ <dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth"></textarea></dd>
+ </dl>
+ </fieldset>
+
+ <span class="corners-bottom"><span></span></span></div>
+</div> -->
+
+
+<hr />
+
+
+ <p><a href="#postingbox" class="top2">Top</a></p>
+
+
+</form>
+
+<script type="text/javascript">
+// <![CDATA[
+ subPanels(show_panel);
+// ]]>
+</script>
+</div>
+
+<div id="page-footer" >
+<div class="navbar" >
+<div class="inner" ><span class="corners-top" ><span></span></span>
+<ul class="linklist" >
+<li class="icon-home" ><a href="http://forums.xkcd.com/index.php" accesskey="h" >Board index</a></li>
+<li class="rightside" ><a href="http://forums.xkcd.com/memberlist.php?mode=leaders" >The team</a> • <a href="http://forums.xkcd.com/ucp.php?mode=delete_cookies" >Delete all board cookies</a> • All times are UTC </li>
+</ul>
+<span class="corners-bottom" ><span></span></span></div>
+</div>
+<div class="copyright">
+Powered by <a href="http://www.phpbb.com/"> phpBB </a> ® Forum Software © phpBB Group<br/>
+Protected by <a href="http://www.lithiumstudios.org" target="_blank"> Anti-Spam ACP </a><br />
+(Well, only the original since this is a copy) <br />
+Downloaded and archived by <a href="http://1190.bicyclesonthemoon.dnsd.info/bothasar_t/"><b>bot</b>hasar_<b>t</b></a>
+
+</div>
+<computery stuff>:<br/>
+<div style="margin:20px; margin-top:5px">
+ <div class="quotetitle">
+ <b>Spoiler:</b> <input value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" type="button">
+ </div>
+ <div class="quotecontent">
+ <div style="display: none;">
+ <ul>
+ <li><a href="/ott/attachment">attachment</a></li>
+ <li><a href="/ott/avatar">avatar</a></li>
+ <li><a href="/ott/image">image</a></li>
+ <li><a href="/ott/log">log</a></li>
+ <li><a href="/ott/np">np</a></li>
+ <li><a href="/ott/otterinf">otterinf</a></li>
+ <li><a href="/ott/postlist">postlist</a></li>
+ <li><a href="/ott/prosilver">prosilver</a></li>
+ <li><a href="/ott/sig">sig</a></li>
+ <li><a href="/ott/test">test</a></li>
+ <li><a href="/ott/update.htm">update</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+</div>
+
+</div>
+
+<div>
+ <a id="bottom" name="bottom" accesskey="z"></a>
+
+</div>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+/**
+* bbCode control by subBlue design [ www.subBlue.com ]
+* Includes unixsafe colour palette selector by SHS`
+*/
+
+// Startup variables
+var imageTag = false;
+var theSelection = false;
+
+var bbcodeEnabled = true;
+// Check for Browser & Platform for PC & IE specific bits
+// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var clientVer = parseInt(navigator.appVersion); // Get browser version
+
+var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
+var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
+var baseHeight;
+
+/**
+* Shows the help messages in the helpline window
+*/
+function helpline(help)
+{
+ document.forms[form_name].helpbox.value = help_line[help];
+}
+
+/**
+* Fix a bug involving the TextRange object. From
+* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
+*/
+function initInsertions()
+{
+ var doc;
+
+ if (document.forms[form_name])
+ {
+ doc = document;
+ }
+ else
+ {
+ doc = opener.document;
+ }
+
+ var textarea = doc.forms[form_name].elements[text_name];
+
+ if (is_ie && typeof(baseHeight) != 'number')
+ {
+ textarea.focus();
+ baseHeight = doc.selection.createRange().duplicate().boundingHeight;
+
+ if (!document.forms[form_name])
+ {
+ document.body.focus();
+ }
+ }
+}
+
+/**
+* bbstyle
+*/
+function bbstyle(bbnumber)
+{
+ if (bbnumber != -1)
+ {
+ bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
+ }
+ else
+ {
+ insert_text('[*]');
+ document.forms[form_name].elements[text_name].focus();
+ }
+}
+
+/**
+* Apply bbcodes
+*/
+function bbfontstyle(bbopen, bbclose)
+{
+ theSelection = false;
+
+ var textarea = document.forms[form_name].elements[text_name];
+
+ textarea.focus();
+
+ if ((clientVer >= 4) && is_ie && is_win)
+ {
+ // Get text selection
+ theSelection = document.selection.createRange().text;
+
+ if (theSelection)
+ {
+ // Add tags around selection
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+ }
+ else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))
+ {
+ mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);
+ document.forms[form_name].elements[text_name].focus();
+ theSelection = '';
+ return;
+ }
+
+ //The new position for the cursor after adding the bbcode
+ var caret_pos = getCaretPosition(textarea).start;
+ var new_pos = caret_pos + bbopen.length;
+
+ // Open tag
+ insert_text(bbopen + bbclose);
+
+ // Center the cursor when we don't have a selection
+ // Gecko and proper browsers
+ if (!isNaN(textarea.selectionStart))
+ {
+ textarea.selectionStart = new_pos;
+ textarea.selectionEnd = new_pos;
+ }
+ // IE
+ else if (document.selection)
+ {
+ var range = textarea.createTextRange();
+ range.move("character", new_pos);
+ range.select();
+ storeCaret(textarea);
+ }
+
+ textarea.focus();
+ return;
+}
+
+/**
+* Insert text at position
+*/
+function insert_text(text, spaces, popup)
+{
+ var textarea;
+
+ if (!popup)
+ {
+ textarea = document.forms[form_name].elements[text_name];
+ }
+ else
+ {
+ textarea = opener.document.forms[form_name].elements[text_name];
+ }
+ if (spaces)
+ {
+ text = ' ' + text + ' ';
+ }
+
+ // Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
+ // Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
+ if (!isNaN(textarea.selectionStart) && !is_ie)
+ {
+ var sel_start = textarea.selectionStart;
+ var sel_end = textarea.selectionEnd;
+
+ mozWrap(textarea, text, '');
+ textarea.selectionStart = sel_start + text.length;
+ textarea.selectionEnd = sel_end + text.length;
+ }
+ else if (textarea.createTextRange && textarea.caretPos)
+ {
+ if (baseHeight != textarea.caretPos.boundingHeight)
+ {
+ textarea.focus();
+ storeCaret(textarea);
+ }
+
+ var caret_pos = textarea.caretPos;
+ caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
+ }
+ else
+ {
+ textarea.value = textarea.value + text;
+ }
+ if (!popup)
+ {
+ textarea.focus();
+ }
+}
+
+/**
+* Add inline attachment at position
+*/
+function attach_inline(index, filename)
+{
+ insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
+ document.forms[form_name].elements[text_name].focus();
+}
+
+/**
+* Add quote text to message
+*/
+function addquote(post_id, username, l_wrote)
+{
+ var message_name = 'message_' + post_id;
+ var theSelection = '';
+ var divarea = false;
+
+ if (l_wrote === undefined)
+ {
+ // Backwards compatibility
+ l_wrote = 'wrote';
+ }
+
+ if (document.all)
+ {
+ divarea = document.all[message_name];
+ }
+ else
+ {
+ divarea = document.getElementById(message_name);
+ }
+
+ // Get text selection - not only the post content :(
+ // IE9 must use the document.selection method but has the *.getSelection so we just force no IE
+ if (window.getSelection && !is_ie && !window.opera)
+ {
+ theSelection = window.getSelection().toString();
+ }
+ else if (document.getSelection && !is_ie)
+ {
+ theSelection = document.getSelection();
+ }
+ else if (document.selection)
+ {
+ theSelection = document.selection.createRange().text;
+ }
+
+ if (theSelection == '' || typeof theSelection == 'undefined' || theSelection == null)
+ {
+ if (divarea.innerHTML)
+ {
+ theSelection = divarea.innerHTML.replace(/<br>/ig, '\n');
+ theSelection = theSelection.replace(/<br\/>/ig, '\n');
+ theSelection = theSelection.replace(/<\;/ig, '<');
+ theSelection = theSelection.replace(/>\;/ig, '>');
+ theSelection = theSelection.replace(/&\;/ig, '&');
+ theSelection = theSelection.replace(/ \;/ig, ' ');
+ }
+ else if (document.all)
+ {
+ theSelection = divarea.innerText;
+ }
+ else if (divarea.textContent)
+ {
+ theSelection = divarea.textContent;
+ }
+ else if (divarea.firstChild.nodeValue)
+ {
+ theSelection = divarea.firstChild.nodeValue;
+ }
+ }
+
+ if (theSelection)
+ {
+ if (bbcodeEnabled)
+ {
+ insert_text('[quote="' + username + '"]' + theSelection + '[/quote]');
+ }
+ else
+ {
+ insert_text(username + ' ' + l_wrote + ':' + '\n');
+ var lines = split_lines(theSelection);
+ for (i = 0; i < lines.length; i++)
+ {
+ insert_text('> ' + lines[i] + '\n');
+ }
+ }
+ }
+
+ return;
+}
+
+function split_lines(text)
+{
+ var lines = text.split('\n');
+ var splitLines = new Array();
+ var j = 0;
+ for(i = 0; i < lines.length; i++)
+ {
+ if (lines[i].length <= 80)
+ {
+ splitLines[j] = lines[i];
+ j++;
+ }
+ else
+ {
+ var line = lines[i];
+ do
+ {
+ var splitAt = line.indexOf(' ', 80);
+
+ if (splitAt == -1)
+ {
+ splitLines[j] = line;
+ j++;
+ }
+ else
+ {
+ splitLines[j] = line.substring(0, splitAt);
+ line = line.substring(splitAt);
+ j++;
+ }
+ }
+ while(splitAt != -1);
+ }
+ }
+ return splitLines;
+}
+/**
+* From http://www.massless.org/mozedit/
+*/
+function mozWrap(txtarea, open, close)
+{
+ var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
+ var selStart = txtarea.selectionStart;
+ var selEnd = txtarea.selectionEnd;
+ var scrollTop = txtarea.scrollTop;
+
+ if (selEnd == 1 || selEnd == 2)
+ {
+ selEnd = selLength;
+ }
+
+ var s1 = (txtarea.value).substring(0,selStart);
+ var s2 = (txtarea.value).substring(selStart, selEnd);
+ var s3 = (txtarea.value).substring(selEnd, selLength);
+
+ txtarea.value = s1 + open + s2 + close + s3;
+ txtarea.selectionStart = selStart + open.length;
+ txtarea.selectionEnd = selEnd + open.length;
+ txtarea.focus();
+ txtarea.scrollTop = scrollTop;
+
+ return;
+}
+
+/**
+* Insert at Caret position. Code from
+* http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
+*/
+function storeCaret(textEl)
+{
+ if (textEl.createTextRange)
+ {
+ textEl.caretPos = document.selection.createRange().duplicate();
+ }
+}
+
+/**
+* Color pallette
+*/
+function colorPalette(dir, width, height)
+{
+ var r = 0, g = 0, b = 0;
+ var numberList = new Array(6);
+ var color = '';
+
+ numberList[0] = '00';
+ numberList[1] = '40';
+ numberList[2] = '80';
+ numberList[3] = 'BF';
+ numberList[4] = 'FF';
+
+ document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
+
+ for (r = 0; r < 5; r++)
+ {
+ if (dir == 'h')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (g = 0; g < 5; g++)
+ {
+ if (dir == 'v')
+ {
+ document.writeln('<tr>');
+ }
+
+ for (b = 0; b < 5; b++)
+ {
+ color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
+ document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="/ott/prosilver/imageset/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.writeln('</td>');
+ }
+
+ if (dir == 'v')
+ {
+ document.writeln('</tr>');
+ }
+ }
+
+ if (dir == 'h')
+ {
+ document.writeln('</tr>');
+ }
+ }
+ document.writeln('</table>');
+}
+
+
+/**
+* Caret Position object
+*/
+function caretPosition()
+{
+ var start = null;
+ var end = null;
+}
+
+
+/**
+* Get the caret position in an textarea
+*/
+function getCaretPosition(txtarea)
+{
+ var caretPos = new caretPosition();
+
+ // simple Gecko/Opera way
+ if(txtarea.selectionStart || txtarea.selectionStart == 0)
+ {
+ caretPos.start = txtarea.selectionStart;
+ caretPos.end = txtarea.selectionEnd;
+ }
+ // dirty and slow IE way
+ else if(document.selection)
+ {
+
+ // get current selection
+ var range = document.selection.createRange();
+
+ // a new selection of the whole textarea
+ var range_all = document.body.createTextRange();
+ range_all.moveToElementText(txtarea);
+
+ // calculate selection start point by moving beginning of range_all to beginning of range
+ var sel_start;
+ for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
+ {
+ range_all.moveStart('character', 1);
+ }
+
+ txtarea.sel_start = sel_start;
+
+ // we ignore the end value for IE, this is already dirty enough and we don't need it
+ caretPos.start = txtarea.sel_start;
+ caretPos.end = txtarea.sel_start;
+ }
+
+ return caretPos;
+}
--- /dev/null
+/**
+* phpBB3 forum functions
+*/
+
+/**
+* Window popup
+*/
+function popup(url, width, height, name)
+{
+ if (!name)
+ {
+ name = '_popup';
+ }
+
+ window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
+ return false;
+}
+
+/**
+* Jump to page
+*/
+function jumpto()
+{
+ var page = prompt(jump_page, on_page);
+
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
+ {
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
+ }
+}
+
+/**
+* Mark/unmark checklist
+* id = ID of parent container, name = name prefix, state = state [true/false]
+*/
+function marklist(id, name, state)
+{
+ var parent = document.getElementById(id);
+ if (!parent)
+ {
+ eval('parent = document.' + id);
+ }
+
+ if (!parent)
+ {
+ return;
+ }
+
+ var rb = parent.getElementsByTagName('input');
+
+ for (var r = 0; r < rb.length; r++)
+ {
+ if (rb[r].name.substr(0, name.length) == name)
+ {
+ rb[r].checked = state;
+ }
+ }
+}
+
+/**
+* Resize viewable area for attached image or topic review panel (possibly others to come)
+* e = element
+*/
+function viewableArea(e, itself)
+{
+ if (!e) return;
+ if (!itself)
+ {
+ e = e.parentNode;
+ }
+
+ if (!e.vaHeight)
+ {
+ // Store viewable area height before changing style to auto
+ e.vaHeight = e.offsetHeight;
+ e.vaMaxHeight = e.style.maxHeight;
+ e.style.height = 'auto';
+ e.style.maxHeight = 'none';
+ e.style.overflow = 'visible';
+ }
+ else
+ {
+ // Restore viewable area height to the default
+ e.style.height = e.vaHeight + 'px';
+ e.style.overflow = 'auto';
+ e.style.maxHeight = e.vaMaxHeight;
+ e.vaHeight = false;
+ }
+}
+
+/**
+* Set display of page element
+* s[-1,0,1] = hide,toggle display,show
+* type = string: inline, block, inline-block or other CSS "display" type
+*/
+function dE(n, s, type)
+{
+ if (!type)
+ {
+ type = 'block';
+ }
+
+ var e = document.getElementById(n);
+ if (!s)
+ {
+ s = (e.style.display == '' || e.style.display == type) ? -1 : 1;
+ }
+ e.style.display = (s == 1) ? type : 'none';
+}
+
+/**
+* Alternate display of subPanels
+*/
+function subPanels(p)
+{
+ var i, e, t;
+
+ if (typeof(p) == 'string')
+ {
+ show_panel = p;
+ }
+
+ for (i = 0; i < panels.length; i++)
+ {
+ e = document.getElementById(panels[i]);
+ t = document.getElementById(panels[i] + '-tab');
+
+ if (e)
+ {
+ if (panels[i] == show_panel)
+ {
+ e.style.display = 'block';
+ if (t)
+ {
+ t.className = 'activetab';
+ }
+ }
+ else
+ {
+ e.style.display = 'none';
+ if (t)
+ {
+ t.className = '';
+ }
+ }
+ }
+ }
+}
+
+/**
+* Call print preview
+*/
+function printPage()
+{
+ if (is_ie)
+ {
+ printPreview();
+ }
+ else
+ {
+ window.print();
+ }
+}
+
+/**
+* Show/hide groups of blocks
+* c = CSS style name
+* e = checkbox element
+* t = toggle dispay state (used to show 'grip-show' image in the profile block when hiding the profiles)
+*/
+function displayBlocks(c, e, t)
+{
+ var s = (e.checked == true) ? 1 : -1;
+
+ if (t)
+ {
+ s *= -1;
+ }
+
+ var divs = document.getElementsByTagName("DIV");
+
+ for (var d = 0; d < divs.length; d++)
+ {
+ if (divs[d].className.indexOf(c) == 0)
+ {
+ divs[d].style.display = (s == 1) ? 'none' : 'block';
+ }
+ }
+}
+
+function selectCode(a)
+{
+ // Get ID of code block
+ var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
+
+ // Not IE and IE9+
+ if (window.getSelection)
+ {
+ var s = window.getSelection();
+ // Safari
+ if (s.setBaseAndExtent)
+ {
+ s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
+ }
+ // Firefox and Opera
+ else
+ {
+ // workaround for bug # 42885
+ if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
+ {
+ e.innerHTML = e.innerHTML + ' ';
+ }
+
+ var r = document.createRange();
+ r.selectNodeContents(e);
+ s.removeAllRanges();
+ s.addRange(r);
+ }
+ }
+ // Some older browsers
+ else if (document.getSelection)
+ {
+ var s = document.getSelection();
+ var r = document.createRange();
+ r.selectNodeContents(e);
+ s.removeAllRanges();
+ s.addRange(r);
+ }
+ // IE
+ else if (document.selection)
+ {
+ var r = document.body.createTextRange();
+ r.moveToElementText(e);
+ r.select();
+ }
+}
+
+/**
+* Play quicktime file by determining it's width/height
+* from the displayed rectangle area
+*/
+function play_qt_file(obj)
+{
+ var rectangle = obj.GetRectangle();
+
+ if (rectangle)
+ {
+ rectangle = rectangle.split(',');
+ var x1 = parseInt(rectangle[0]);
+ var x2 = parseInt(rectangle[2]);
+ var y1 = parseInt(rectangle[1]);
+ var y2 = parseInt(rectangle[3]);
+
+ var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
+ var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
+ }
+ else
+ {
+ var width = 200;
+ var height = 0;
+ }
+
+ obj.width = width;
+ obj.height = height + 16;
+
+ obj.SetControllerVisible(true);
+ obj.Play();
+}
+
+/**
+* Check if the nodeName of elem is name
+* @author jQuery
+*/
+function is_node_name(elem, name)
+{
+ return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
+}
+
+/**
+* Check if elem is in array, return position
+* @author jQuery
+*/
+function is_in_array(elem, array)
+{
+ for (var i = 0, length = array.length; i < length; i++)
+ // === is correct (IE)
+ if (array[i] === elem)
+ return i;
+
+ return -1;
+}
+
+/**
+* Find Element, type and class in tree
+* Not used, but may come in handy for those not using JQuery
+* @author jQuery.find, Meik Sievertsen
+*/
+function find_in_tree(node, tag, type, class_name)
+{
+ var result, element, i = 0, length = node.childNodes.length;
+
+ for (element = node.childNodes[0]; i < length; element = node.childNodes[++i])
+ {
+ if (!element || element.nodeType != 1) continue;
+
+ if ((!tag || is_node_name(element, tag)) && (!type || element.type == type) && (!class_name || is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1))
+ {
+ return element;
+ }
+
+ if (element.childNodes.length)
+ result = find_in_tree(element, tag, type, class_name);
+
+ if (result) return result;
+ }
+}
+
+var in_autocomplete = false;
+var last_key_entered = '';
+
+/**
+* Check event key
+*/
+function phpbb_check_key(event)
+{
+ // Keycode is array down or up?
+ if (event.keyCode && (event.keyCode == 40 || event.keyCode == 38))
+ in_autocomplete = true;
+
+ // Make sure we are not within an "autocompletion" field
+ if (in_autocomplete)
+ {
+ // If return pressed and key changed we reset the autocompletion
+ if (!last_key_entered || last_key_entered == event.which)
+ {
+ in_autocompletion = false;
+ return true;
+ }
+ }
+
+ // Keycode is not return, then return. ;)
+ if (event.which != 13)
+ {
+ last_key_entered = event.which;
+ return true;
+ }
+
+ return false;
+}
+
+/**
+* Usually used for onkeypress event, to submit a form on enter
+*/
+function submit_default_button(event, selector, class_name)
+{
+ // Add which for key events
+ if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
+ event.which = event.charCode || event.keyCode;
+
+ if (phpbb_check_key(event))
+ return true;
+
+ var current = selector['parentNode'];
+
+ // Search parent form element
+ while (current && (!current.nodeName || current.nodeType != 1 || !is_node_name(current, 'form')) && current != document)
+ current = current['parentNode'];
+
+ // Find the input submit button with the class name
+ //current = find_in_tree(current, 'input', 'submit', class_name);
+ var input_tags = current.getElementsByTagName('input');
+ current = false;
+
+ for (var i = 0, element = input_tags[0]; i < input_tags.length; element = input_tags[++i])
+ {
+ if (element.type == 'submit' && is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1)
+ current = element;
+ }
+
+ if (!current)
+ return true;
+
+ // Submit form
+ current.focus();
+ current.click();
+ return false;
+}
+
+/**
+* Apply onkeypress event for forcing default submit button on ENTER key press
+* The jQuery snippet used is based on http://greatwebguy.com/programming/dom/default-html-button-submit-on-enter-with-jquery/
+* The non-jQuery code is a mimick of the jQuery code ;)
+*/
+function apply_onkeypress_event()
+{
+ // jQuery code in case jQuery is used
+ if (jquery_present)
+ {
+ jQuery('form input[type=text], form input[type=password]').live('keypress', function (e)
+ {
+ var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
+
+ if (!default_button || default_button.length <= 0)
+ return true;
+
+ if (phpbb_check_key(e))
+ return true;
+
+ if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
+ {
+ default_button.click();
+ return false;
+ }
+
+ return true;
+ });
+
+ return;
+ }
+
+ var input_tags = document.getElementsByTagName('input');
+
+ for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i])
+ {
+ if (element.type == 'text' || element.type == 'password')
+ {
+ // onkeydown is possible too
+ element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
+ }
+ }
+}
+
+/**
+* Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;)
+*/
+var jquery_present = typeof jQuery == 'function';
--- /dev/null
+
+function fontsizeup(event)
+{
+ // Skip tabs; 9 being the ASCII code for a tab
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
+ var active = getActiveStyleSheet();
+
+ switch (active)
+ {
+ case 'A--':
+ setActiveStyleSheet('A-');
+ break;
+
+ case 'A-':
+ setActiveStyleSheet('A');
+ break;
+
+ case 'A':
+ setActiveStyleSheet('A+');
+ break;
+
+ case 'A+':
+ setActiveStyleSheet('A++');
+ break;
+
+ case 'A++':
+ setActiveStyleSheet('A');
+ break;
+
+ default:
+ setActiveStyleSheet('A');
+ break;
+ }
+
+ return false;
+}
+
+function fontsizedown(event)
+{
+ // Skip tabs
+ if (event && getKeyCode(event) == 9)
+ {
+ return true;
+ }
+
+ var active = getActiveStyleSheet();
+
+ switch (active)
+ {
+ case 'A++' :
+ setActiveStyleSheet('A+');
+ break;
+
+ case 'A+' :
+ setActiveStyleSheet('A');
+ break;
+
+ case 'A' :
+ setActiveStyleSheet('A-');
+ break;
+
+ case 'A-' :
+ setActiveStyleSheet('A--');
+ break;
+
+ case 'A--' :
+ break;
+
+ default :
+ setActiveStyleSheet('A--');
+ break;
+ }
+
+ return false;
+}
+
+function getKeyCode(event)
+{
+ // IE doesn't fire the onkeypress event for tabs
+ // Reference: http://www.quirksmode.org/js/keys.html
+
+ var code = (event.keyCode) ? event.keyCode : 0;
+
+ // Probably using FF
+ if (!code && event.charCode)
+ {
+ code = event.charCode;
+ }
+
+ return code;
+}
+
+function setActiveStyleSheet(title)
+{
+ var i, a, main;
+
+ for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
+ {
+ if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title'))
+ {
+ a.disabled = true;
+ if (a.getAttribute('title') == title)
+ {
+ a.disabled = false;
+ }
+ }
+ }
+}
+
+function getActiveStyleSheet()
+{
+ var i, a;
+
+ for (i = 0; (a = document.getElementsByTagName('link')[i]); i++)
+ {
+ if (a.getAttribute('rel').indexOf('style') != -1 && a.getAttribute('title') && !a.disabled)
+ {
+ return a.getAttribute('title');
+ }
+ }
+
+ return null;
+}
+
+function getPreferredStyleSheet()
+{
+ return ('A-');
+}
+
+function createCookie(name, value, days)
+{
+ if (days)
+ {
+ var date = new Date();
+ date.setTime(date.getTime() + (days*24*60*60*1000));
+ var expires = '; expires=' + date.toGMTString();
+ }
+ else
+ {
+ expires = '';
+ }
+
+ document.cookie = name + '=' + value + expires + style_cookie_settings;
+}
+
+function readCookie(name)
+{
+ var nameEQ = name + '=';
+ var ca = document.cookie.split(';');
+
+ for (var i = 0; i < ca.length; i++)
+ {
+ var c = ca[i];
+
+ while (c.charAt(0) == ' ')
+ {
+ c = c.substring(1, c.length);
+ }
+
+ if (c.indexOf(nameEQ) == 0)
+ {
+ return c.substring(nameEQ.length, c.length);
+ }
+ }
+
+ return null;
+}
+
+function load_cookie()
+{
+ var cookie = readCookie('style_cookie');
+ var title = cookie ? cookie : getPreferredStyleSheet();
+ setActiveStyleSheet(title);
+}
+
+function unload_cookie()
+{
+ var title = getActiveStyleSheet();
+ createCookie('style_cookie', title, 365);
+}
+
+onload_functions.push('load_cookie()');
+onunload_functions.push('unload_cookie()');
+
+/*
+var cookie = readCookie("style");
+var title = cookie ? cookie : getPreferredStyleSheet();
+setActiveStyleSheet(title);
+*/
--- /dev/null
+body {
+ font-size: 12px;
+}
\ No newline at end of file
--- /dev/null
+body {
+ font-size: 11px;
+}
\ No newline at end of file
--- /dev/null
+body {
+ font-size: 10px;
+}
\ No newline at end of file
--- /dev/null
+/* Print Style Sheet
+---------------------------------------- */
+
+
+/* Lots still TODO here! */
+
+/* General markup styles */
+* {
+ padding: 0;
+ margin: 0;
+}
+
+body {
+ font: 11pt Verdana, Arial, Helvetica, sans-serif;
+ color:#000000;
+}
+
+a:link { color: #000000; text-decoration: none; }
+a:visited { color: #000000; text-decoration: none; }
+a:active { color: #000000; text-decoration: none; }
+
+img, .noprint, #sub-header, #sub-footer, .navbar, .box1, .divider, .signature { display: none; }
+/* Display smilies (Bug #47265) */
+.content img {
+ display: inline;
+}
+
+/* Container for the main body */
+#wrap {
+ margin: 0 2em;
+}
+
+p { font-size: 85%; }
+.copyright { font-size: 75%; }
+.page-number { float:right; width: auto; text-align: right; font-size: 75%; }
+
+h1, h2, h3, h1 a, h2 a, h3 a {
+ font-family: "Trebuchet MS",georgia,Verdana,Sans-serif;
+ color: #000000;
+ background: none;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+h1 { font-size: 20pt; }
+h2 { font-size: 16pt; margin-top: 1em; }
+h3 { font-size: 14pt; margin-top: 1em; }
+
+.content {
+ font-size: 11pt;
+ line-height: 14pt;
+ margin-bottom: 1em;
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
+ overflow: hidden;
+}
+
+/* CSS2 Print tip from: http://www.alistapart.com/articles/goingtoprint/ */
+.postbody a:link, .postbody a:visited, .postbody a:hover, .postbody a:active {
+ text-decoration: underline;
+ padding: 0.1em 0.2em;
+ margin: -0.1em -0.2em;
+ color: #666;
+ background: none;
+ font-size: 100%;
+}
+
+html>body .postbody a:link:after, html>body .postbody a:visited:after {
+ content: " (" attr(href) ") ";
+ font-size: 90%;
+ text-decoration: none;
+}
+
+hr {
+ height: 1px;
+ background-color: #999999;
+ border-width: 0;
+}
+
+.author {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 75%;
+ margin-bottom: 0.6em;
+}
+
+.date {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ float: right;
+ position: relative;
+ text-align: right;
+ font-size: 75%;
+}
+
+/* Dont want to print url for names or titles in content area */
+.postbody .author a:link, .postbody .author a:visited,
+html>body .postbody .author a:link:after,
+html>body .postbody .author a:visited:after,
+.postquote .quote-by a:link, .postquote .quote-by a:visited,
+html>body .postquote .quote-by a:link:after,
+html>body .postquote .quote-by a:visited:after,
+html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after {
+ text-decoration: none;
+ content: "";
+}
+
+/* Poster profile */
+.postprofile { display: none; }
+.grip-show { display:none; }
+
+/* Quote */
+.postquote, blockquote {
+ font-size: 85%;
+ margin: 1em 18% 1em 4%;
+ padding: 0.5em;
+ position: relative;
+ line-height: 1.5em;
+ border: 1px #999999 solid;
+}
+
+.postquote img { display: none; }
+.postquote span { display: block; }
+.postquote span .postquote { font-size: 100%; }
+.quote-by, blockquote cite {
+ color: black;
+ display : block;
+ font-weight: bold;
+}
+
+/* List */
+ol, ul {
+ margin-left: 15pt
+}
+
+/* Misc page elements */
+div.spacer { clear: both; }
+
+/* Accessibility tweaks: Mozilla.org */
+.skip_link { display: none; }
+
+dl.codebox dt { display: none; }
--- /dev/null
+/* phpBB3 Style Sheet
+ --------------------------------------------------------------
+ Style name: prosilver (the default phpBB 3.0.x style)
+ Based on style:
+ Original author: Tom Beddard ( http://www.subblue.com/ )
+ Modified by: phpBB Group ( http://www.phpbb.com/ )
+ --------------------------------------------------------------
+*/
+
+/* General Markup Styles
+---------------------------------------- */
+
+* {
+ /* Reset browsers default margin, padding and font sizes */
+ margin: 0;
+ padding: 0;
+}
+
+html {
+ font-size: 100%;
+ /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
+ height: 101%;
+}
+
+body {
+ /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ color: #828282;
+ background-color: #FFFFFF;
+ /*font-size: 62.5%; This sets the default font size to be equivalent to 10px */
+ font-size: 10px;
+ margin: 0;
+ padding: 12px 0;
+ /* This was suggested by mrob27 (http://forums.xkcd.com/viewtopic.php?p=3594769#p3594769): */
+ -ie-text-size-adjust: 100%;
+ -moz-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+}
+
+h1 {
+ /* Forum name */
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ margin-right: 200px;
+ color: #FFFFFF;
+ margin-top: 15px;
+ font-weight: bold;
+ font-size: 2em;
+}
+
+h2 {
+ /* Forum header titles */
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ color: #3f3f3f;
+ font-size: 2em;
+ margin: 0.8em 0 0.2em 0;
+}
+
+h2.solo {
+ margin-bottom: 1em;
+}
+
+h3 {
+ /* Sub-headers (also used as post headers, but defined later) */
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ text-transform: uppercase;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ padding-bottom: 2px;
+ font-size: 1.05em;
+ color: #989898;
+ margin-top: 20px;
+}
+
+h4 {
+ /* Forum and topic list titles */
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, Sans-serif;
+ font-size: 1.3em;
+}
+
+p {
+ line-height: 1.3em;
+ font-size: 1.1em;
+ margin-bottom: 1.5em;
+}
+
+img {
+ border-width: 0;
+}
+
+hr {
+ /* Also see tweaks.css */
+ border: 0 none #FFFFFF;
+ border-top: 1px solid #CCCCCC;
+ height: 1px;
+ margin: 5px 0;
+ display: block;
+ clear: both;
+}
+
+hr.dashed {
+ border-top: 1px dashed #CCCCCC;
+ margin: 10px 0;
+}
+
+hr.divider {
+ display: none;
+}
+
+p.right {
+ text-align: right;
+}
+
+/* Main blocks
+---------------------------------------- */
+#wrap {
+ padding: 0 20px;
+ min-width: 650px;
+}
+
+#simple-wrap {
+ padding: 6px 10px;
+}
+
+#page-body {
+ margin: 4px 0;
+ clear: both;
+}
+
+#page-footer {
+ clear: both;
+}
+
+#page-footer h3 {
+ margin-top: 20px;
+}
+
+#logo {
+ float: left;
+ width: auto;
+ padding: 10px 13px 0 10px;
+}
+
+a#logo:hover {
+ text-decoration: none;
+}
+
+/* Search box
+--------------------------------------------- */
+#search-box {
+ color: #FFFFFF;
+ position: relative;
+ margin-top: 30px;
+ margin-right: 5px;
+ display: block;
+ float: right;
+ text-align: right;
+ white-space: nowrap; /* For Opera */
+}
+
+#search-box #keywords {
+ width: 95px;
+ background-color: #FFF;
+}
+
+#search-box input {
+ border: 1px solid #b0b0b0;
+}
+
+/* .button1 style defined later, just a few tweaks for the search button version */
+#search-box input.button1 {
+ padding: 1px 5px;
+}
+
+#search-box li {
+ text-align: right;
+ margin-top: 4px;
+}
+
+#search-box img {
+ vertical-align: middle;
+ margin-right: 3px;
+}
+
+/* Site description and logo */
+#site-description {
+ float: left;
+ width: 70%;
+}
+
+#site-description h1 {
+ margin-right: 0;
+}
+
+/* Round cornered boxes and backgrounds
+---------------------------------------- */
+.headerbar {
+ background: #ebebeb none repeat-x 0 0;
+ color: #FFFFFF;
+ margin-bottom: 4px;
+ padding: 0 5px;
+}
+
+.navbar {
+ background-color: #ebebeb;
+ padding: 0 10px;
+}
+
+.forabg {
+ background: #b1b1b1 none repeat-x 0 0;
+ margin-bottom: 4px;
+ padding: 0 5px;
+ clear: both;
+}
+
+.forumbg {
+ background: #ebebeb none repeat-x 0 0;
+ margin-bottom: 4px;
+ padding: 0 5px;
+ clear: both;
+}
+
+.panel {
+ margin-bottom: 4px;
+ padding: 0 10px;
+ background-color: #f3f3f3;
+ color: #3f3f3f;
+}
+
+.post {
+ padding: 0 10px;
+ margin-bottom: 4px;
+ background-repeat: no-repeat;
+ background-position: 100% 0;
+}
+
+.post:target .content {
+ color: #000000;
+}
+
+.post:target h3 a {
+ color: #000000;
+}
+
+.bg1 { background-color: #f7f7f7;}
+.bg2 { background-color: #f2f2f2; }
+.bg3 { background-color: #ebebeb; }
+
+.rowbg {
+ margin: 5px 5px 2px 5px;
+}
+
+.ucprowbg {
+ background-color: #e2e2e2;
+}
+
+.fieldsbg {
+ /*border: 1px #DBDEE2 solid;*/
+ background-color: #eaeaea;
+}
+
+span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
+ font-size: 1px;
+ line-height: 1px;
+ display: block;
+ height: 5px;
+ background-repeat: no-repeat;
+}
+
+span.corners-top {
+ background-image: none;
+ background-position: 0 0;
+ margin: 0 -5px;
+}
+
+span.corners-top span {
+ background-image: none;
+ background-position: 100% 0;
+}
+
+span.corners-bottom {
+ background-image: none;
+ background-position: 0 100%;
+ margin: 0 -5px;
+ clear: both;
+}
+
+span.corners-bottom span {
+ background-image: none;
+ background-position: 100% 100%;
+}
+
+.headbg span.corners-bottom {
+ margin-bottom: -1px;
+}
+
+.post span.corners-top, .post span.corners-bottom, .panel span.corners-top, .panel span.corners-bottom, .navbar span.corners-top, .navbar span.corners-bottom {
+ margin: 0 -10px;
+}
+
+.rules span.corners-top {
+ margin: 0 -10px 5px -10px;
+}
+
+.rules span.corners-bottom {
+ margin: 5px -10px 0 -10px;
+}
+
+/* Horizontal lists
+----------------------------------------*/
+ul.linklist {
+ display: block;
+ margin: 0;
+}
+
+ul.linklist li {
+ display: block;
+ list-style-type: none;
+ float: left;
+ width: auto;
+ margin-right: 5px;
+ font-size: 1.1em;
+ line-height: 2.2em;
+}
+
+ul.linklist li.rightside, p.rightside {
+ float: right;
+ margin-right: 0;
+ margin-left: 5px;
+ text-align: right;
+ font-weight: normal;
+}
+
+ul.navlinks {
+ padding-bottom: 1px;
+ margin-bottom: 1px;
+ border-bottom: 1px solid #FFFFFF;
+ font-weight: bold;
+}
+
+ul.navlinks2 {
+ padding-bottom: 1px;
+ margin-bottom: 1px;
+ font-weight: bold;
+}
+
+ul.leftside {
+ float: left;
+ margin-left: 0;
+ margin-right: 5px;
+ text-align: left;
+}
+
+ul.rightside {
+ float: right;
+ margin-left: 5px;
+ margin-right: -5px;
+ text-align: right;
+}
+
+/* Table styles
+----------------------------------------*/
+table.table1 {
+ /* See tweaks.css */
+}
+
+#ucp-main table.table1 {
+ padding: 2px;
+}
+
+table.table1 thead th {
+ font-weight: normal;
+ text-transform: uppercase;
+ color: #FFFFFF;
+ line-height: 1.3em;
+ font-size: 1em;
+ padding: 0 0 4px 3px;
+}
+
+table.table1 thead th span {
+ padding-left: 7px;
+}
+
+table.table1 tbody tr {
+ border: 1px solid #cfcfcf;
+}
+
+table.table1 tbody tr:hover, table.table1 tbody tr.hover {
+ background-color: #f6f6f6;
+ color: #000;
+}
+
+table.table1 td {
+ color: #6a6a6a;
+ font-size: 1.1em;
+}
+
+table.table1 tbody td {
+ padding: 5px;
+ border-top: 1px solid #FAFAFA;
+}
+
+table.table1 tbody th {
+ padding: 5px;
+ border-bottom: 1px solid #000000;
+ text-align: left;
+ color: #333333;
+ background-color: #FFFFFF;
+}
+
+/* Specific column styles */
+table.table1 .name { text-align: left; }
+table.table1 .posts { text-align: center !important; width: 7%; }
+table.table1 .joined { text-align: left; width: 15%; }
+table.table1 .active { text-align: left; width: 15%; }
+table.table1 .mark { text-align: center; width: 7%; }
+table.table1 .info { text-align: left; width: 30%; }
+table.table1 .info div { width: 100%; white-space: normal; overflow: hidden; }
+table.table1 .autocol { line-height: 2em; white-space: nowrap; }
+table.table1 thead .autocol { padding-left: 1em; }
+
+table.table1 span.rank-img {
+ float: right;
+ width: auto;
+}
+
+table.info td {
+ padding: 3px;
+}
+
+table.info tbody th {
+ padding: 3px;
+ text-align: right;
+ vertical-align: top;
+ color: #000000;
+ font-weight: normal;
+}
+
+.forumbg table.table1 {
+ margin: 0;
+}
+
+.forumbg-table > .inner {
+ margin: 0 -1px;
+}
+
+.forumbg-table > .inner > span.corners-top {
+ margin: 0 -4px -1px -4px;
+}
+
+.forumbg-table > .inner > span.corners-bottom {
+ margin: -1px -4px 0 -4px;
+}
+
+/* Misc layout styles
+---------------------------------------- */
+/* column[1-2] styles are containers for two column layouts
+ Also see tweaks.css */
+.column1 {
+ float: left;
+ clear: left;
+ width: 49%;
+}
+
+.column2 {
+ float: right;
+ clear: right;
+ width: 49%;
+}
+
+/* General classes for placing floating blocks */
+.left-box {
+ float: left;
+ width: auto;
+ text-align: left;
+}
+
+.right-box {
+ float: right;
+ width: auto;
+ text-align: right;
+}
+
+dl.details {
+ /*font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;*/
+ font-size: 1.1em;
+}
+
+dl.details dt {
+ float: left;
+ clear: left;
+ width: 30%;
+ text-align: right;
+ color: #000000;
+ display: block;
+}
+
+dl.details dd {
+ margin-left: 0;
+ padding-left: 5px;
+ margin-bottom: 5px;
+ color: #828282;
+ float: left;
+ width: 65%;
+}
+
+/* Pagination
+---------------------------------------- */
+.pagination {
+ height: 1%; /* IE tweak (holly hack) */
+ width: auto;
+ text-align: right;
+ margin-top: 5px;
+ float: right;
+}
+
+.pagination span.page-sep {
+ display: none;
+}
+
+li.pagination {
+ margin-top: 0;
+}
+
+.pagination strong, .pagination b {
+ font-weight: normal;
+}
+
+.pagination span strong {
+ padding: 0 2px;
+ margin: 0 2px;
+ font-weight: normal;
+ color: #FFFFFF;
+ background-color: #bfbfbf;
+ border: 1px solid #bfbfbf;
+ font-size: 0.9em;
+}
+
+.pagination span a, .pagination span a:link, .pagination span a:visited, .pagination span a:active {
+ font-weight: normal;
+ text-decoration: none;
+ color: #747474;
+ margin: 0 2px;
+ padding: 0 2px;
+ background-color: #eeeeee;
+ border: 1px solid #bababa;
+ font-size: 0.9em;
+ line-height: 1.5em;
+}
+
+.pagination span a:hover {
+ border-color: #d2d2d2;
+ background-color: #d2d2d2;
+ color: #FFF;
+ text-decoration: none;
+}
+
+.pagination img {
+ vertical-align: middle;
+}
+
+/* Pagination in viewforum for multipage topics */
+.row .pagination {
+ display: block;
+ float: right;
+ width: auto;
+ margin-top: 0;
+ padding: 1px 0 1px 15px;
+ font-size: 0.9em;
+ background: none 0 50% no-repeat;
+}
+
+.row .pagination span a, li.pagination span a {
+ background-color: #FFFFFF;
+}
+
+.row .pagination span a:hover, li.pagination span a:hover {
+ background-color: #d2d2d2;
+}
+
+/* Miscellaneous styles
+---------------------------------------- */
+#forum-permissions {
+ float: right;
+ width: auto;
+ padding-left: 5px;
+ margin-left: 5px;
+ margin-top: 10px;
+ text-align: right;
+}
+
+.copyright {
+ padding: 5px;
+ text-align: center;
+ color: #555555;
+}
+
+.small {
+ font-size: 0.9em !important;
+}
+
+.titlespace {
+ margin-bottom: 15px;
+}
+
+.headerspace {
+ margin-top: 20px;
+}
+
+.error {
+ color: #bcbcbc;
+ font-weight: bold;
+ font-size: 1em;
+}
+
+.reported {
+ background-color: #f7f7f7;
+}
+
+li.reported:hover {
+ background-color: #ececec;
+}
+
+div.rules {
+ background-color: #ececec;
+ color: #bcbcbc;
+ padding: 0 10px;
+ margin: 10px 0;
+ font-size: 1.1em;
+}
+
+div.rules ul, div.rules ol {
+ margin-left: 20px;
+}
+
+p.rules {
+ background-color: #ececec;
+ background-image: none;
+ padding: 5px;
+}
+
+p.rules img {
+ vertical-align: middle;
+ padding-top: 5px;
+}
+
+p.rules a {
+ vertical-align: middle;
+ clear: both;
+}
+
+#top {
+ position: absolute;
+ top: -20px;
+}
+
+.clear {
+ display: block;
+ clear: both;
+ font-size: 1px;
+ line-height: 1px;
+ background: transparent;
+}
+/* Link Styles
+---------------------------------------- */
+
+/* Links adjustment to correctly display an order of rtl/ltr mixed content */
+a {
+ direction: ltr;
+ unicode-bidi: embed;
+}
+
+a:link { color: #898989; text-decoration: none; }
+a:visited { color: #898989; text-decoration: none; }
+a:hover { color: #d3d3d3; text-decoration: underline; }
+a:active { color: #d2d2d2; text-decoration: none; }
+
+/* Coloured usernames */
+.username-coloured {
+ font-weight: bold;
+ display: inline !important;
+ padding: 0 !important;
+}
+
+/* Links on gradient backgrounds */
+#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+ color: #FFFFFF;
+ text-decoration: none;
+}
+
+#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover {
+ color: #ffffff;
+ text-decoration: underline;
+}
+
+#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
+ color: #ffffff;
+ text-decoration: none;
+}
+
+/* Links for forum/topic lists */
+a.forumtitle {
+ font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+/* a.forumtitle:visited { color: #898989; } */
+
+a.forumtitle:hover {
+ color: #bcbcbc;
+ text-decoration: underline;
+}
+
+a.forumtitle:active {
+ color: #898989;
+}
+
+a.topictitle {
+ font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+/* a.topictitle:visited { color: #d2d2d2; } */
+
+a.topictitle:hover {
+ color: #bcbcbc;
+ text-decoration: underline;
+}
+
+a.topictitle:active {
+ color: #898989;
+}
+
+/* Post body links */
+.postlink {
+ text-decoration: none;
+ color: #d2d2d2;
+ border-bottom: 1px solid #d2d2d2;
+ padding-bottom: 0;
+}
+
+/* .postlink:visited { color: #bdbdbd; } */
+
+.postlink:active {
+ color: #d2d2d2;
+}
+
+.postlink:hover {
+ background-color: #f6f6f6;
+ text-decoration: none;
+ color: #404040;
+}
+
+.signature a, .signature a:visited, .signature a:hover, .signature a:active {
+ border: none;
+ text-decoration: underline;
+ background-color: transparent;
+}
+
+/* Profile links */
+.postprofile a:link, .postprofile a:visited, .postprofile dt.author a {
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+.postprofile a:hover, .postprofile dt.author a:hover {
+ text-decoration: underline;
+ color: #d3d3d3;
+}
+
+/* CSS spec requires a:link, a:visited, a:hover and a:active rules to be specified in this order. */
+/* See http://www.phpbb.com/bugs/phpbb3/59685 */
+.postprofile a:active {
+ font-weight: bold;
+ color: #898989;
+ text-decoration: none;
+}
+
+
+/* Profile searchresults */
+.search .postprofile a {
+ color: #898989;
+ text-decoration: none;
+ font-weight: normal;
+}
+
+.search .postprofile a:hover {
+ color: #d3d3d3;
+ text-decoration: underline;
+}
+
+/* Back to top of page */
+.back2top {
+ clear: both;
+ height: 11px;
+ text-align: right;
+}
+
+a.top {
+ background: none no-repeat top left;
+ text-decoration: none;
+ width: 11px;
+ height: 11px;
+ display: block;
+ float: right;
+ overflow: hidden;
+ letter-spacing: 1000px;
+ text-indent: 11px;
+}
+
+a.top2 {
+ background: none no-repeat 0 50%;
+ text-decoration: none;
+ padding-left: 15px;
+}
+
+/* Arrow links */
+a.up { background: none no-repeat left center; }
+a.down { background: none no-repeat right center; }
+a.left { background: none no-repeat 3px 60%; }
+a.right { background: none no-repeat 95% 60%; }
+
+a.up, a.up:link, a.up:active, a.up:visited {
+ padding-left: 10px;
+ text-decoration: none;
+ border-bottom-width: 0;
+}
+
+a.up:hover {
+ background-position: left top;
+ background-color: transparent;
+}
+
+a.down, a.down:link, a.down:active, a.down:visited {
+ padding-right: 10px;
+}
+
+a.down:hover {
+ background-position: right bottom;
+ text-decoration: none;
+}
+
+a.left, a.left:active, a.left:visited {
+ padding-left: 12px;
+}
+
+a.left:hover {
+ color: #d2d2d2;
+ text-decoration: none;
+ background-position: 0 60%;
+}
+
+a.right, a.right:active, a.right:visited {
+ padding-right: 12px;
+}
+
+a.right:hover {
+ color: #d2d2d2;
+ text-decoration: none;
+ background-position: 100% 60%;
+}
+
+/* invisible skip link, used for accessibility */
+.skiplink {
+ position: absolute;
+ left: -999px;
+ width: 990px;
+}
+
+/* Feed icon in forumlist_body.html */
+a.feed-icon-forum {
+ float: right;
+ margin: 3px;
+}
+/* Content Styles
+---------------------------------------- */
+
+ul.topiclist {
+ display: block;
+ list-style-type: none;
+ margin: 0;
+}
+
+ul.forums {
+ background: #f9f9f9 none repeat-x 0 0;
+}
+
+ul.topiclist li {
+ display: block;
+ list-style-type: none;
+ color: #777777;
+ margin: 0;
+}
+
+ul.topiclist dl {
+ position: relative;
+}
+
+ul.topiclist li.row dl {
+ padding: 2px 0;
+}
+
+ul.topiclist dt {
+ display: block;
+ float: left;
+ width: 50%;
+ font-size: 1.1em;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+ul.topiclist dd {
+ display: block;
+ float: left;
+ border-left: 1px solid #FFFFFF;
+ padding: 4px 0;
+}
+
+ul.topiclist dfn {
+ /* Labels for post/view counts */
+ position: absolute;
+ left: -999px;
+ width: 990px;
+}
+
+ul.topiclist li.row dt a.subforum {
+ background-image: none;
+ background-position: 0 50%;
+ background-repeat: no-repeat;
+ position: relative;
+ white-space: nowrap;
+ padding: 0 0 0 12px;
+}
+
+.forum-image {
+ float: left;
+ padding-top: 5px;
+ margin-right: 5px;
+}
+
+li.row {
+ border-top: 1px solid #FFFFFF;
+ border-bottom: 1px solid #8f8f8f;
+}
+
+li.row strong {
+ font-weight: normal;
+ color: #000000;
+}
+
+li.row:hover {
+ background-color: #f6f6f6;
+}
+
+li.row:hover dd {
+ border-left-color: #CCCCCC;
+}
+
+li.header dt, li.header dd {
+ line-height: 1em;
+ border-left-width: 0;
+ margin: 2px 0 4px 0;
+ color: #FFFFFF;
+ padding-top: 2px;
+ padding-bottom: 2px;
+ font-size: 1em;
+ font-family: Arial, Helvetica, sans-serif;
+ text-transform: uppercase;
+}
+
+li.header dt {
+ font-weight: bold;
+}
+
+li.header dd {
+ margin-left: 1px;
+}
+
+li.header dl.icon {
+ min-height: 0;
+}
+
+li.header dl.icon dt {
+ /* Tweak for headers alignment when folder icon used */
+ padding-left: 0;
+ padding-right: 50px;
+}
+
+/* Forum list column styles */
+dl.icon {
+ min-height: 35px;
+ background-position: 10px 50%; /* Position of folder icon */
+ background-repeat: no-repeat;
+}
+
+dl.icon dt {
+ padding-left: 45px; /* Space for folder icon */
+ background-repeat: no-repeat;
+ background-position: 5px 95%; /* Position of topic icon */
+}
+
+dd.posts, dd.topics, dd.views {
+ width: 8%;
+ text-align: center;
+ line-height: 2.2em;
+ font-size: 1.2em;
+}
+
+/* List in forum description */
+dl.icon dt ol,
+dl.icon dt ul {
+ list-style-position: inside;
+ margin-left: 1em;
+}
+
+dl.icon dt li {
+ display: list-item;
+ list-style-type: inherit;
+}
+
+dd.lastpost {
+ width: 25%;
+ font-size: 1.1em;
+}
+
+dd.redirect {
+ font-size: 1.1em;
+ line-height: 2.5em;
+}
+
+dd.moderation {
+ font-size: 1.1em;
+}
+
+dd.lastpost span, ul.topiclist dd.searchby span, ul.topiclist dd.info span, ul.topiclist dd.time span, dd.redirect span, dd.moderation span {
+ display: block;
+ padding-left: 5px;
+}
+
+dd.time {
+ width: auto;
+ line-height: 200%;
+ font-size: 1.1em;
+}
+
+dd.extra {
+ width: 12%;
+ line-height: 200%;
+ text-align: center;
+ font-size: 1.1em;
+}
+
+dd.mark {
+ float: right !important;
+ width: 9%;
+ text-align: center;
+ line-height: 200%;
+ font-size: 1.2em;
+}
+
+dd.info {
+ width: 30%;
+}
+
+dd.option {
+ width: 15%;
+ line-height: 200%;
+ text-align: center;
+ font-size: 1.1em;
+}
+
+dd.searchby {
+ width: 47%;
+ font-size: 1.1em;
+ line-height: 1em;
+}
+
+ul.topiclist dd.searchextra {
+ margin-left: 5px;
+ padding: 0.2em 0;
+ font-size: 1.1em;
+ color: #333333;
+ border-left: none;
+ clear: both;
+ width: 98%;
+ overflow: hidden;
+}
+
+/* Container for post/reply buttons and pagination */
+.topic-actions {
+ margin-bottom: 3px;
+ font-size: 1.1em;
+ height: 28px;
+ min-height: 28px;
+}
+div[class].topic-actions {
+ height: auto;
+}
+
+/* Post body styles
+----------------------------------------*/
+.postbody {
+ padding: 0;
+ line-height: 1.48em;
+ color: #333333;
+ width: 76%;
+ float: left;
+ clear: both;
+}
+
+.postbody .ignore {
+ font-size: 1.1em;
+}
+
+.postbody h3.first {
+ /* The first post on the page uses this */
+ font-size: 1.7em;
+}
+
+.postbody h3 {
+ /* Postbody requires a different h3 format - so change it here */
+ font-size: 1.5em;
+ padding: 2px 0 0 0;
+ margin: 0 0 0.3em 0 !important;
+ text-transform: none;
+ border: none;
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ line-height: 125%;
+}
+
+.postbody h3 img {
+ /* Also see tweaks.css */
+ vertical-align: bottom;
+}
+
+.postbody .content {
+ font-size: 1.3em;
+}
+
+.search .postbody {
+ width: 68%
+}
+
+/* Topic review panel
+----------------------------------------*/
+#review {
+ margin-top: 2em;
+}
+
+#topicreview {
+ padding-right: 5px;
+ overflow: auto;
+ height: 300px;
+}
+
+#topicreview .postbody {
+ width: auto;
+ float: none;
+ margin: 0;
+ height: auto;
+}
+
+#topicreview .post {
+ height: auto;
+}
+
+#topicreview h2 {
+ border-bottom-width: 0;
+}
+
+.post-ignore .postbody {
+ display: none;
+}
+
+/* MCP Post details
+----------------------------------------*/
+#post_details
+{
+ /* This will only work in IE7+, plus the others */
+ overflow: auto;
+ max-height: 300px;
+}
+
+#expand
+{
+ clear: both;
+}
+
+/* Content container styles
+----------------------------------------*/
+.content {
+ min-height: 3em;
+ overflow: hidden;
+ line-height: 1.4em;
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1em;
+ color: #333333;
+ padding-bottom: 1px;
+}
+
+.content h2, .panel h2 {
+ font-weight: normal;
+ color: #989898;
+ border-bottom: 1px solid #CCCCCC;
+ font-size: 1.6em;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ padding-bottom: 0.5em;
+}
+
+.panel h3 {
+ margin: 0.5em 0;
+}
+
+.panel p {
+ font-size: 1.2em;
+ margin-bottom: 1em;
+ line-height: 1.4em;
+}
+
+.content p {
+ font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.2em;
+ margin-bottom: 1em;
+ line-height: 1.4em;
+}
+
+dl.faq {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.1em;
+ margin-top: 1em;
+ margin-bottom: 2em;
+ line-height: 1.4em;
+}
+
+dl.faq dt {
+ font-weight: bold;
+ color: #333333;
+}
+
+.content dl.faq {
+ font-size: 1.2em;
+ margin-bottom: 0.5em;
+}
+
+.content li {
+ list-style-type: inherit;
+}
+
+.content ul, .content ol {
+ margin-bottom: 1em;
+ margin-left: 3em;
+}
+
+.posthilit {
+ background-color: #f3f3f3;
+ color: #BCBCBC;
+ padding: 0 2px 1px 2px;
+}
+
+.announce, .unreadpost {
+ /* Highlight the announcements & unread posts box */
+ border-left-color: #BCBCBC;
+ border-right-color: #BCBCBC;
+}
+
+/* Post author */
+p.author {
+ margin: 0 15em 0.6em 0;
+ padding: 0 0 5px 0;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1em;
+ line-height: 1.2em;
+}
+
+/* Post signature */
+.signature {
+ margin-top: 1.5em;
+ padding-top: 0.2em;
+ font-size: 1.1em;
+ border-top: 1px solid #CCCCCC;
+ clear: left;
+ line-height: 140%;
+ overflow: hidden;
+ width: 100%;
+}
+
+dd .signature {
+ margin: 0;
+ padding: 0;
+ clear: none;
+ border: none;
+}
+
+.signature li {
+ list-style-type: inherit;
+}
+
+.signature ul, .signature ol {
+ margin-bottom: 1em;
+ margin-left: 3em;
+}
+
+/* Post noticies */
+.notice {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ width: auto;
+ margin-top: 1.5em;
+ padding-top: 0.2em;
+ font-size: 1em;
+ border-top: 1px dashed #CCCCCC;
+ clear: left;
+ line-height: 130%;
+}
+
+/* Jump to post link for now */
+ul.searchresults {
+ list-style: none;
+ text-align: right;
+ clear: both;
+}
+
+/* BB Code styles
+----------------------------------------*/
+/* Quote block */
+blockquote {
+ background: #ebebeb none 6px 8px no-repeat;
+ border: 1px solid #dbdbdb;
+ font-size: 0.95em;
+ margin: 0.5em 1px 0 25px;
+ overflow: hidden;
+ padding: 5px;
+}
+
+blockquote blockquote {
+ /* Nested quotes */
+ background-color: #bababa;
+ font-size: 1em;
+ margin: 0.5em 1px 0 15px;
+}
+
+blockquote blockquote blockquote {
+ /* Nested quotes */
+ background-color: #e4e4e4;
+}
+
+blockquote cite {
+ /* Username/source of quoter */
+ font-style: normal;
+ font-weight: bold;
+ margin-left: 20px;
+ display: block;
+ font-size: 0.9em;
+}
+
+blockquote cite cite {
+ font-size: 1em;
+}
+
+blockquote.uncited {
+ padding-top: 25px;
+}
+
+/* Code block */
+dl.codebox {
+ padding: 3px;
+ background-color: #FFFFFF;
+ border: 1px solid #d8d8d8;
+ font-size: 1em;
+}
+
+dl.codebox dt {
+ text-transform: uppercase;
+ border-bottom: 1px solid #CCCCCC;
+ margin-bottom: 3px;
+ font-size: 0.8em;
+ font-weight: bold;
+ display: block;
+}
+
+blockquote dl.codebox {
+ margin-left: 0;
+}
+
+dl.codebox code {
+ /* Also see tweaks.css */
+ overflow: auto;
+ display: block;
+ height: auto;
+ max-height: 200px;
+ white-space: normal;
+ padding-top: 5px;
+ font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
+ line-height: 1.3em;
+ color: #8b8b8b;
+ margin: 2px 0;
+}
+
+.syntaxbg { color: #FFFFFF; }
+.syntaxcomment { color: #000000; }
+.syntaxdefault { color: #bcbcbc; }
+.syntaxhtml { color: #000000; }
+.syntaxkeyword { color: #585858; }
+.syntaxstring { color: #a7a7a7; }
+
+/* Attachments
+----------------------------------------*/
+.attachbox {
+ float: left;
+ width: auto;
+ margin: 5px 5px 5px 0;
+ padding: 6px;
+ background-color: #FFFFFF;
+ border: 1px dashed #d8d8d8;
+ clear: left;
+}
+
+.pm-message .attachbox {
+ background-color: #f3f3f3;
+}
+
+.attachbox dt {
+ font-family: Arial, Helvetica, sans-serif;
+ text-transform: uppercase;
+}
+
+.attachbox dd {
+ margin-top: 4px;
+ padding-top: 4px;
+ clear: left;
+ border-top: 1px solid #d8d8d8;
+}
+
+.attachbox dd dd {
+ border: none;
+}
+
+.attachbox p {
+ line-height: 110%;
+ color: #666666;
+ font-weight: normal;
+ clear: left;
+}
+
+.attachbox p.stats
+{
+ line-height: 110%;
+ color: #666666;
+ font-weight: normal;
+ clear: left;
+}
+
+.attach-image {
+ margin: 3px 0;
+ width: 100%;
+ max-height: 350px;
+ overflow: auto;
+}
+
+.attach-image img {
+ border: 1px solid #999999;
+/* cursor: move; */
+ cursor: default;
+}
+
+/* Inline image thumbnails */
+div.inline-attachment dl.thumbnail, div.inline-attachment dl.file {
+ display: block;
+ margin-bottom: 4px;
+}
+
+div.inline-attachment p {
+ font-size: 100%;
+}
+
+dl.file {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ display: block;
+}
+
+dl.file dt {
+ text-transform: none;
+ margin: 0;
+ padding: 0;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+dl.file dd {
+ color: #666666;
+ margin: 0;
+ padding: 0;
+}
+
+dl.thumbnail img {
+ padding: 3px;
+ border: 1px solid #666666;
+ background-color: #FFF;
+}
+
+dl.thumbnail dd {
+ color: #666666;
+ font-style: italic;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+.attachbox dl.thumbnail dd {
+ font-size: 100%;
+}
+
+dl.thumbnail dt a:hover {
+ background-color: #EEEEEE;
+}
+
+dl.thumbnail dt a:hover img {
+ border: 1px solid #d2d2d2;
+}
+
+/* Post poll styles
+----------------------------------------*/
+fieldset.polls {
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+}
+
+fieldset.polls dl {
+ margin-top: 5px;
+ border-top: 1px solid #e2e2e2;
+ padding: 5px 0 0 0;
+ line-height: 120%;
+ color: #666666;
+}
+
+fieldset.polls dl.voted {
+ font-weight: bold;
+ color: #000000;
+}
+
+fieldset.polls dt {
+ text-align: left;
+ float: left;
+ display: block;
+ width: 30%;
+ border-right: none;
+ padding: 0;
+ margin: 0;
+ font-size: 1.1em;
+}
+
+fieldset.polls dd {
+ float: left;
+ width: 10%;
+ border-left: none;
+ padding: 0 5px;
+ margin-left: 0;
+ font-size: 1.1em;
+}
+
+fieldset.polls dd.resultbar {
+ width: 50%;
+}
+
+fieldset.polls dd input {
+ margin: 2px 0;
+}
+
+fieldset.polls dd div {
+ text-align: right;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #FFFFFF;
+ font-weight: bold;
+ padding: 0 2px;
+ overflow: visible;
+ min-width: 2%;
+}
+
+.pollbar1 {
+ background-color: #aaaaaa;
+ border-bottom: 1px solid #747474;
+ border-right: 1px solid #747474;
+}
+
+.pollbar2 {
+ background-color: #bebebe;
+ border-bottom: 1px solid #8c8c8c;
+ border-right: 1px solid #8c8c8c;
+}
+
+.pollbar3 {
+ background-color: #D1D1D1;
+ border-bottom: 1px solid #aaaaaa;
+ border-right: 1px solid #aaaaaa;
+}
+
+.pollbar4 {
+ background-color: #e4e4e4;
+ border-bottom: 1px solid #bebebe;
+ border-right: 1px solid #bebebe;
+}
+
+.pollbar5 {
+ background-color: #f8f8f8;
+ border-bottom: 1px solid #D1D1D1;
+ border-right: 1px solid #D1D1D1;
+}
+
+/* Poster profile block
+----------------------------------------*/
+.postprofile {
+ /* Also see tweaks.css */
+ margin: 5px 0 10px 0;
+ min-height: 80px;
+ color: #666666;
+ border-left: 1px solid #FFFFFF;
+ width: 22%;
+ float: right;
+ display: inline;
+}
+.pm .postprofile {
+ border-left: 1px solid #DDDDDD;
+}
+
+.postprofile dd, .postprofile dt {
+ line-height: 1.2em;
+ margin-left: 8px;
+}
+
+.postprofile strong {
+ font-weight: normal;
+ color: #000000;
+}
+
+.avatar {
+ border: none;
+ margin-bottom: 3px;
+}
+
+.online {
+ background-image: none;
+ background-position: 100% 0;
+ background-repeat: no-repeat;
+}
+
+/* Poster profile used by search*/
+.search .postprofile {
+ width: 30%;
+}
+
+/* pm list in compose message if mass pm is enabled */
+dl.pmlist dt {
+ width: 60% !important;
+}
+
+dl.pmlist dt textarea {
+ width: 95%;
+}
+
+dl.pmlist dd {
+ margin-left: 61% !important;
+ margin-bottom: 2px;
+}
+/* Button Styles
+---------------------------------------- */
+
+/* Rollover buttons
+ Based on: http://wellstyled.com/css-nopreload-rollovers.html
+----------------------------------------*/
+.buttons {
+ float: left;
+ width: auto;
+ height: auto;
+}
+
+/* Rollover state */
+.buttons div {
+ float: left;
+ margin: 0 5px 0 0;
+ background-position: 0 100%;
+}
+
+/* Rolloff state */
+.buttons div a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-position: 0 0;
+ position: relative;
+ overflow: hidden;
+}
+
+/* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */
+/*.buttons div span { display: none; }*/
+/*.buttons div a:hover { background-image: none; }*/
+.buttons div span { position: absolute; width: 100%; height: 100%; cursor: pointer;}
+.buttons div a:hover span { background-position: 0 100%; }
+
+/* Big button images */
+.reply-icon span { background: transparent none 0 0 no-repeat; }
+.post-icon span { background: transparent none 0 0 no-repeat; }
+.locked-icon span { background: transparent none 0 0 no-repeat; }
+.pmreply-icon span { background: none 0 0 no-repeat; }
+.newpm-icon span { background: none 0 0 no-repeat; }
+.forwardpm-icon span { background: none 0 0 no-repeat; }
+
+/* Set big button dimensions */
+.buttons div.reply-icon { width: 96px; height: 25px; }
+.buttons div.mustardreply-icon { width: 96px; height: 25px; }
+.buttons div.post-icon { width: 96px; height: 25px; }
+.buttons div.locked-icon { width: 88px; height: 25px; }
+.buttons div.pmreply-icon { width: 96px; height: 25px; }
+.buttons div.newpm-icon { width: 84px; height: 25px; }
+.buttons div.forwardpm-icon { width: 96px; height: 25px; }
+
+/* Sub-header (navigation bar)
+--------------------------------------------- */
+a.print, a.sendemail, a.fontsize {
+ display: block;
+ overflow: hidden;
+ height: 18px;
+ text-indent: -5000px;
+ text-align: left;
+ background-repeat: no-repeat;
+}
+
+a.print {
+ background-image: none;
+ width: 22px;
+}
+
+a.sendemail {
+ background-image: none;
+ width: 22px;
+}
+
+a.fontsize {
+ background-image: none;
+ background-position: 0 -1px;
+ width: 29px;
+}
+
+a.fontsize:hover {
+ background-position: 0 -20px;
+ text-decoration: none;
+}
+
+/* Icon images
+---------------------------------------- */
+.sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout,
+.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search {
+ background-position: 0 50%;
+ background-repeat: no-repeat;
+ background-image: none;
+ padding: 1px 0 0 17px;
+}
+
+/* Poster profile icons
+----------------------------------------*/
+ul.profile-icons {
+ padding-top: 10px;
+ list-style: none;
+}
+
+/* Rollover state */
+ul.profile-icons li {
+ float: left;
+ margin: 0 6px 3px 0;
+ background-position: 0 100%;
+}
+
+/* Rolloff state */
+ul.profile-icons li a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-position: 0 0;
+}
+
+/* Hide <a> text and hide off-state image when rolling over (prevents flicker in IE) */
+ul.profile-icons li span { display:none; }
+ul.profile-icons li a:hover { background: none; }
+
+/* Positioning of moderator icons */
+.postbody ul.profile-icons {
+ float: right;
+ width: auto;
+ padding: 0;
+}
+
+.postbody ul.profile-icons li {
+ margin: 0 3px;
+}
+
+/* Profile & navigation icons */
+.email-icon, .email-icon a { background: none top left no-repeat; }
+.aim-icon, .aim-icon a { background: none top left no-repeat; }
+.yahoo-icon, .yahoo-icon a { background: none top left no-repeat; }
+.web-icon, .web-icon a { background: none top left no-repeat; }
+.msnm-icon, .msnm-icon a { background: none top left no-repeat; }
+.icq-icon, .icq-icon a { background: none top left no-repeat; }
+.jabber-icon, .jabber-icon a { background: none top left no-repeat; }
+.pm-icon, .pm-icon a { background: none top left no-repeat; }
+.quote-icon, .quote-icon a { background: none top left no-repeat; }
+
+/* Moderator icons */
+.report-icon, .report-icon a { background: none top left no-repeat; }
+.warn-icon, .warn-icon a { background: none top left no-repeat; }
+.edit-icon, .edit-icon a { background: none top left no-repeat; }
+.delete-icon, .delete-icon a { background: none top left no-repeat; }
+.info-icon, .info-icon a { background: none top left no-repeat; }
+
+/* Set profile icon dimensions */
+ul.profile-icons li.email-icon { width: 20px; height: 20px; }
+ul.profile-icons li.aim-icon { width: 20px; height: 20px; }
+ul.profile-icons li.yahoo-icon { width: 20px; height: 20px; }
+ul.profile-icons li.web-icon { width: 20px; height: 20px; }
+ul.profile-icons li.msnm-icon { width: 20px; height: 20px; }
+ul.profile-icons li.icq-icon { width: 20px; height: 20px; }
+ul.profile-icons li.jabber-icon { width: 20px; height: 20px; }
+ul.profile-icons li.pm-icon { width: 28px; height: 20px; }
+ul.profile-icons li.quote-icon { width: 54px; height: 20px; }
+ul.profile-icons li.report-icon { width: 20px; height: 20px; }
+ul.profile-icons li.edit-icon { width: 42px; height: 20px; }
+ul.profile-icons li.delete-icon { width: 20px; height: 20px; }
+ul.profile-icons li.info-icon { width: 20px; height: 20px; }
+ul.profile-icons li.warn-icon { width: 20px; height: 20px; }
+
+/* Fix profile icon default margins */
+ul.profile-icons li.edit-icon { margin: 0 0 0 3px; }
+ul.profile-icons li.quote-icon { margin: 0 0 0 10px; }
+ul.profile-icons li.info-icon, ul.profile-icons li.report-icon { margin: 0 3px 0 0; }
+/* Control Panel Styles
+---------------------------------------- */
+
+
+/* Main CP box
+----------------------------------------*/
+#cp-menu {
+ float:left;
+ width: 19%;
+ margin-top: 1em;
+ margin-bottom: 5px;
+}
+
+#cp-main {
+ float: left;
+ width: 81%;
+}
+
+#cp-main .content {
+ padding: 0;
+}
+
+#cp-main h3, #cp-main hr, #cp-menu hr {
+ border-color: #bfbfbf;
+}
+
+#cp-main .panel p {
+ font-size: 1.1em;
+}
+
+#cp-main .panel ol {
+ margin-left: 2em;
+ font-size: 1.1em;
+}
+
+#cp-main .panel li.row {
+ border-bottom: 1px solid #cbcbcb;
+ border-top: 1px solid #F9F9F9;
+}
+
+ul.cplist {
+ margin-bottom: 5px;
+ border-top: 1px solid #cbcbcb;
+}
+
+#cp-main .panel li.header dd, #cp-main .panel li.header dt {
+ color: #000000;
+ margin-bottom: 2px;
+}
+
+#cp-main table.table1 {
+ margin-bottom: 1em;
+}
+
+#cp-main table.table1 thead th {
+ color: #333333;
+ font-weight: bold;
+ border-bottom: 1px solid #333333;
+ padding: 5px;
+}
+
+#cp-main table.table1 tbody th {
+ font-style: italic;
+ background-color: transparent !important;
+ border-bottom: none;
+}
+
+#cp-main .pagination {
+ float: right;
+ width: auto;
+ padding-top: 1px;
+}
+
+#cp-main .postbody p {
+ font-size: 1.1em;
+}
+
+#cp-main .pm-message {
+ border: 1px solid #e2e2e2;
+ margin: 10px 0;
+ background-color: #FFFFFF;
+ width: auto;
+ float: none;
+}
+
+.pm-message h2 {
+ padding-bottom: 5px;
+}
+
+#cp-main .postbody h3, #cp-main .box2 h3 {
+ margin-top: 0;
+}
+
+#cp-main .buttons {
+ margin-left: 0;
+}
+
+#cp-main ul.linklist {
+ margin: 0;
+}
+
+/* MCP Specific tweaks */
+.mcp-main .postbody {
+ width: 100%;
+}
+
+.tabs-container h2 {
+ float: left;
+ margin-bottom: 0px;
+}
+
+.tabs-container #minitabs {
+ float: right;
+ margin-top: 19px;
+}
+
+.tabs-container:after {
+ display: block;
+ clear: both;
+ content: '';
+}
+
+/* CP tabbed menu
+----------------------------------------*/
+#tabs {
+ line-height: normal;
+ margin: 20px 0 -1px 7px;
+ min-width: 570px;
+}
+
+#tabs ul {
+ margin:0;
+ padding: 0;
+ list-style: none;
+}
+
+#tabs li {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+#tabs a {
+ float: left;
+ background: none no-repeat 0% -35px;
+ margin: 0 1px 0 0;
+ padding: 0 0 0 5px;
+ text-decoration: none;
+ position: relative;
+ cursor: pointer;
+}
+
+#tabs a span {
+ float: left;
+ display: block;
+ background: none no-repeat 100% -35px;
+ padding: 6px 10px 6px 5px;
+ color: #828282;
+ white-space: nowrap;
+}
+
+#tabs a:hover span {
+ color: #bcbcbc;
+}
+
+#tabs .activetab a {
+ background-position: 0 0;
+ border-bottom: 1px solid #ebebeb;
+}
+
+#tabs .activetab a span {
+ background-position: 100% 0;
+ padding-bottom: 7px;
+ color: #333333;
+}
+
+#tabs a:hover {
+ background-position: 0 -70px;
+}
+
+#tabs a:hover span {
+ background-position:100% -70px;
+}
+
+#tabs .activetab a:hover {
+ background-position: 0 0;
+}
+
+#tabs .activetab a:hover span {
+ color: #000000;
+ background-position: 100% 0;
+}
+
+/* Mini tabbed menu used in MCP
+----------------------------------------*/
+#minitabs {
+ line-height: normal;
+ margin: -20px 7px 0 0;
+}
+
+#minitabs ul {
+ margin:0;
+ padding: 0;
+ list-style: none;
+}
+
+#minitabs li {
+ display: block;
+ float: right;
+ padding: 0 10px 4px 10px;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: #f2f2f2;
+ margin-left: 2px;
+}
+
+#minitabs a {
+}
+
+#minitabs a:hover {
+ text-decoration: none;
+}
+
+#minitabs li.activetab {
+ background-color: #F9F9F9;
+}
+
+#minitabs li.activetab a, #minitabs li.activetab a:hover {
+ color: #333333;
+}
+
+/* UCP navigation menu
+----------------------------------------*/
+/* Container for sub-navigation list */
+#navigation {
+ width: 100%;
+ padding-top: 36px;
+}
+
+#navigation ul {
+ list-style:none;
+}
+
+/* Default list state */
+#navigation li {
+ margin: 1px 0;
+ padding: 0;
+ font-weight: bold;
+ display: inline;
+}
+
+/* Link styles for the sub-section links */
+#navigation a {
+ display: block;
+ padding: 5px;
+ margin: 1px 0;
+ text-decoration: none;
+ font-weight: bold;
+ color: #333;
+ background: #cfcfcf none repeat-y 100% 0;
+}
+
+#navigation a:hover {
+ text-decoration: none;
+ background-color: #c6c6c6;
+ color: #bcbcbc;
+ background-image: none;
+}
+
+#navigation #active-subsection a {
+ display: block;
+ color: #d3d3d3;
+ background-color: #F9F9F9;
+ background-image: none;
+}
+
+#navigation #active-subsection a:hover {
+ color: #d3d3d3;
+}
+
+/* Preferences pane layout
+----------------------------------------*/
+#cp-main h2 {
+ border-bottom: none;
+ padding: 0;
+ margin-left: 10px;
+ color: #333333;
+}
+
+#cp-main .panel {
+ background-color: #F9F9F9;
+}
+
+#cp-main .pm {
+ background-color: #FFFFFF;
+}
+
+#cp-main span.corners-top, #cp-menu span.corners-top {
+ background-image: none;
+}
+
+#cp-main span.corners-top span, #cp-menu span.corners-top span {
+ background-image: none;
+}
+
+#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
+ background-image: none;
+}
+
+#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
+ background-image: none;
+}
+
+/* Topicreview */
+#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
+ background-image: none;
+}
+
+#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
+ background-image: none;
+}
+
+/* Friends list */
+.cp-mini {
+ background-color: #f9f9f9;
+ padding: 0 5px;
+ margin: 10px 15px 10px 5px;
+}
+
+.cp-mini span.corners-top, .cp-mini span.corners-bottom {
+ margin: 0 -5px;
+}
+
+dl.mini dt {
+ font-weight: bold;
+ color: #676767;
+}
+
+dl.mini dd {
+ padding-top: 4px;
+}
+
+.friend-online {
+ font-weight: bold;
+}
+
+.friend-offline {
+ font-style: italic;
+}
+
+/* PM Styles
+----------------------------------------*/
+#pm-menu {
+ line-height: 2.5em;
+}
+
+/* PM panel adjustments */
+.reply-all a.left {
+ background-position: 3px 60%;
+}
+
+.reply-all a.left:hover {
+ background-position: 0px 60%;
+}
+
+.reply-all {
+ font-size: 11px;
+ padding-top: 5px;
+}
+
+/* PM Message history */
+.current {
+ color: #999999;
+}
+
+/* Defined rules list for PM options */
+ol.def-rules {
+ padding-left: 0;
+}
+
+ol.def-rules li {
+ line-height: 180%;
+ padding: 1px;
+}
+
+/* PM marking colours */
+.pmlist li.bg1 {
+ padding: 0 3px;
+}
+
+.pmlist li.bg2 {
+ padding: 0 3px;
+}
+
+.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
+ border-left-color: #bcbcbc;
+ border-right-color: #bcbcbc;
+}
+
+.pmlist li.pm_marked_colour, .pm_marked_colour {
+ padding: 0;
+ border: solid 3px #ffffff;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_replied_colour, .pm_replied_colour {
+ padding: 0;
+ border: solid 3px #c2c2c2;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_friend_colour, .pm_friend_colour {
+ padding: 0;
+ border: solid 3px #bdbdbd;
+ border-width: 0 3px;
+}
+
+.pmlist li.pm_foe_colour, .pm_foe_colour {
+ padding: 0;
+ border: solid 3px #000000;
+ border-width: 0 3px;
+}
+
+.pm-legend {
+ border-left-width: 10px;
+ border-left-style: solid;
+ border-right-width: 0;
+ margin-bottom: 3px;
+ padding-left: 3px;
+}
+
+/* Avatar gallery */
+#gallery label {
+ position: relative;
+ float: left;
+ margin: 10px;
+ padding: 5px;
+ width: auto;
+ background: #FFFFFF;
+ border: 1px solid #CCC;
+ text-align: center;
+}
+
+#gallery label:hover {
+ background-color: #EEE;
+}
+/* Form Styles
+---------------------------------------- */
+
+/* General form styles
+----------------------------------------*/
+fieldset {
+ border-width: 0;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-size: 1.1em;
+}
+
+input {
+ font-weight: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ padding: 0 3px;
+ font-size: 1em;
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+}
+
+select {
+ font-family: Verdana, Helvetica, Arial, sans-serif;
+ font-weight: normal;
+ cursor: pointer;
+ vertical-align: middle;
+ border: 1px solid #666666;
+ padding: 1px;
+ background-color: #FAFAFA;
+ font-size: 1em;
+}
+
+option {
+ padding-right: 1em;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+textarea {
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ width: 60%;
+ padding: 2px;
+ font-size: 1em;
+ line-height: 1.4em;
+}
+
+label {
+ cursor: default;
+ padding-right: 5px;
+ color: #676767;
+}
+
+label input {
+ vertical-align: middle;
+}
+
+label img {
+ vertical-align: middle;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+fieldset dl {
+ padding: 4px 0;
+}
+
+fieldset dt {
+ float: left;
+ width: 40%;
+ text-align: left;
+ display: block;
+}
+
+fieldset dd {
+ margin-left: 41%;
+ vertical-align: top;
+ margin-bottom: 3px;
+}
+
+/* Specific layout 1 */
+fieldset.fields1 dt {
+ width: 15em;
+ border-right-width: 0;
+}
+
+fieldset.fields1 dd {
+ margin-left: 15em;
+ border-left-width: 0;
+}
+
+fieldset.fields1 {
+ background-color: transparent;
+}
+
+fieldset.fields1 div {
+ margin-bottom: 3px;
+}
+
+/* Set it back to 0px for the reCaptcha divs: PHPBB3-9587 */
+fieldset.fields1 #recaptcha_widget_div div {
+ margin-bottom: 0;
+}
+
+/* Specific layout 2 */
+fieldset.fields2 dt {
+ width: 15em;
+ border-right-width: 0;
+}
+
+fieldset.fields2 dd {
+ margin-left: 16em;
+ border-left-width: 0;
+}
+
+/* Form elements */
+dt label {
+ font-weight: bold;
+ text-align: left;
+}
+
+dd label {
+ white-space: nowrap;
+ color: #333;
+}
+
+dd input, dd textarea {
+ margin-right: 3px;
+}
+
+dd select {
+ width: auto;
+}
+
+dd textarea {
+ width: 85%;
+}
+
+/* Hover effects */
+fieldset dl:hover dt label {
+ color: #000000;
+}
+
+fieldset.fields2 dl:hover dt label {
+ color: inherit;
+}
+
+#timezone {
+ width: 95%;
+}
+
+* html #timezone {
+ width: 50%;
+}
+
+/* Quick-login on index page */
+fieldset.quick-login {
+ margin-top: 5px;
+}
+
+fieldset.quick-login input {
+ width: auto;
+}
+
+fieldset.quick-login input.inputbox {
+ width: 15%;
+ vertical-align: middle;
+ margin-right: 5px;
+ background-color: #f3f3f3;
+}
+
+fieldset.quick-login label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+/* Display options on viewtopic/viewforum pages */
+fieldset.display-options {
+ text-align: center;
+ margin: 3px 0 5px 0;
+}
+
+fieldset.display-options label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+fieldset.display-options a {
+ margin-top: 3px;
+}
+
+/* Display actions for ucp and mcp pages */
+fieldset.display-actions {
+ text-align: right;
+ line-height: 2em;
+ white-space: nowrap;
+ padding-right: 1em;
+}
+
+fieldset.display-actions label {
+ white-space: nowrap;
+ padding-right: 2px;
+}
+
+fieldset.sort-options {
+ line-height: 2em;
+}
+
+/* MCP forum selection*/
+fieldset.forum-selection {
+ margin: 5px 0 3px 0;
+ float: right;
+}
+
+fieldset.forum-selection2 {
+ margin: 13px 0 3px 0;
+ float: right;
+}
+
+/* Jumpbox */
+fieldset.jumpbox {
+ text-align: right;
+ margin-top: 15px;
+ height: 2.5em;
+}
+
+fieldset.quickmod {
+ width: 50%;
+ float: right;
+ text-align: right;
+ height: 2.5em;
+}
+
+/* Submit button fieldset */
+fieldset.submit-buttons {
+ text-align: center;
+ vertical-align: middle;
+ margin: 5px 0;
+}
+
+fieldset.submit-buttons input {
+ vertical-align: middle;
+ padding-top: 3px;
+ padding-bottom: 3px;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+/* Buttons used in the editor */
+#format-buttons {
+ margin: 15px 0 2px 0;
+}
+
+#format-buttons input, #format-buttons select {
+ vertical-align: middle;
+}
+
+/* Main message box */
+#message-box {
+ width: 80%;
+}
+
+#message-box textarea {
+ font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
+ width: 450px;
+ height: 270px;
+ min-width: 100%;
+ max-width: 100%;
+ font-size: 1.2em;
+ color: #333333;
+}
+
+/* Emoticons panel */
+#smiley-box {
+ width: 18%;
+ float: right;
+}
+
+#smiley-box img {
+ margin: 3px;
+}
+
+/* Input field styles
+---------------------------------------- */
+.inputbox {
+ background-color: #FFFFFF;
+ border: 1px solid #c0c0c0;
+ color: #333333;
+ padding: 2px;
+ cursor: text;
+}
+
+.inputbox:hover {
+ border: 1px solid #eaeaea;
+}
+
+.inputbox:focus {
+ border: 1px solid #eaeaea;
+ color: #4b4b4b;
+}
+
+input.inputbox { width: 85%; }
+input.medium { width: 50%; }
+input.narrow { width: 25%; }
+input.tiny { width: 125px; }
+input.np { width: 37px; }
+
+textarea.inputbox {
+ width: 85%;
+}
+
+.autowidth {
+ width: auto !important;
+}
+
+/* Form button styles
+---------------------------------------- */
+input.button1, input.button2 {
+ font-size: 1em;
+}
+
+a.button1, input.button1, input.button3, a.button2, input.button2 {
+ width: auto !important;
+ padding-top: 1px;
+ padding-bottom: 1px;
+ font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
+ color: #000;
+ background: #FAFAFA none repeat-x top left;
+}
+
+a.button1, input.button1 {
+ font-weight: bold;
+ border: 1px solid #666666;
+}
+
+input.button3 {
+ padding: 0;
+ margin: 0;
+ line-height: 5px;
+ height: 12px;
+ background-image: none;
+ font-variant: small-caps;
+}
+
+/* Alternative button */
+a.button2, input.button2, input.button3 {
+ border: 1px solid #666666;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+ text-decoration: none;
+ color: #000000;
+ padding: 2px 8px;
+ line-height: 250%;
+ vertical-align: text-bottom;
+ background-position: 0 1px;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
+ border: 1px solid #BCBCBC;
+ background-position: 0 100%;
+ color: #BCBCBC;
+}
+
+input.disabled {
+ font-weight: normal;
+ color: #666666;
+}
+
+/* Topic and forum Search */
+.search-box {
+ margin-top: 3px;
+ margin-left: 5px;
+ float: left;
+}
+
+.search-box input {
+}
+
+input.search {
+ background-image: none;
+ background-repeat: no-repeat;
+ background-position: left 1px;
+ padding-left: 17px;
+}
+
+.full { width: 95%; }
+.medium { width: 50%;}
+.narrow { width: 25%;}
+.tiny { width: 10%;}
+/* Style Sheet Tweaks
+
+These style definitions are mainly IE specific
+tweaks required due to its poor CSS support.
+-------------------------------------------------*/
+
+* html table, * html select, * html input { font-size: 100%; }
+* html hr { margin: 0; }
+* html span.corners-top, * html span.corners-bottom { background-image: url("/ott/prosilver/theme/images/corners_left.gif"); }
+* html span.corners-top span, * html span.corners-bottom span { background-image: url("/ott/prosilver/theme/images/corners_right.gif"); }
+
+table.table1 {
+ width: 99%; /* IE < 6 browsers */
+ /* Tantek hack */
+ voice-family: "\"}\"";
+ voice-family: inherit;
+ width: 100%;
+}
+html>body table.table1 { width: 100%; } /* Reset 100% for opera */
+
+* html ul.topiclist li { position: relative; }
+* html .postbody h3 img { vertical-align: middle; }
+
+/* Form styles */
+html>body dd label input { vertical-align: text-bottom; } /* Align checkboxes/radio buttons nicely */
+
+* html input.button1, * html input.button2 {
+ padding-bottom: 0;
+ margin-bottom: 1px;
+}
+
+/* Misc layout styles */
+* html .column1, * html .column2 { width: 45%; }
+
+/* Nice method for clearing floated blocks without having to insert any extra markup (like spacer above)
+ From http://www.positioniseverything.net/easyclearing.html
+#tabs:after, #minitabs:after, .post:after, .navbar:after, fieldset dl:after, ul.topiclist dl:after, ul.linklist:after, dl.polls:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}*/
+
+.clearfix, #tabs, #minitabs, fieldset dl, ul.topiclist dl, dl.polls {
+ height: 1%;
+ overflow: hidden;
+}
+
+/* viewtopic fix */
+* html .post {
+ height: 25%;
+ overflow: hidden;
+}
+
+/* navbar fix */
+* html .clearfix, * html .navbar, ul.linklist {
+ height: 4%;
+ overflow: hidden;
+}
+
+/* Simple fix so forum and topic lists always have a min-height set, even in IE6
+ From http://www.dustindiaz.com/min-height-fast-hack */
+dl.icon {
+ min-height: 35px;
+ height: auto !important;
+ height: 35px;
+}
+
+* html li.row dl.icon dt {
+ height: 35px;
+ overflow: visible;
+}
+
+* html #search-box {
+ width: 25%;
+}
+
+/* Correctly clear floating for details on profile view */
+*:first-child+html dl.details dd {
+ margin-left: 30%;
+ float: none;
+}
+
+* html dl.details dd {
+ margin-left: 30%;
+ float: none;
+}
+
+/* Headerbar height fix for IE7 and below */
+* html #site-description p {
+ margin-bottom: 1.0em;
+}
+
+*:first-child+html #site-description p {
+ margin-bottom: 1.0em;
+}
+
+/* #minitabs fix for IE */
+.tabs-container {
+ zoom: 1;
+}
+
+#minitabs {
+ white-space: nowrap;
+ *min-width: 50%;
+}
+/*
+--------------------------------------------------------------
+Colours and backgrounds for common.css
+-------------------------------------------------------------- */
+
+html, body {
+ color: #536482;
+ background-color: #FFFFFF;
+}
+
+h1 {
+ color: #FFFFFF;
+}
+
+h2 {
+ color: #28313F;
+}
+
+h3 {
+ border-bottom-color: #CCCCCC;
+ color: #115098;
+}
+
+hr {
+ border-color: #FFFFFF;
+ border-top-color: #CCCCCC;
+}
+
+hr.dashed {
+ border-top-color: #CCCCCC;
+}
+
+/* Search box
+--------------------------------------------- */
+
+#search-box {
+ color: #FFFFFF;
+}
+
+#search-box #keywords {
+ background-color: #FFF;
+}
+
+#search-box input {
+ border-color: #0075B0;
+}
+
+/* Round cornered boxes and backgrounds
+---------------------------------------- */
+.headerbar {
+ background-color: #12A3EB;
+ background-image: url("/ott/prosilver/theme/images/bg_header.gif");
+ color: #FFFFFF;
+}
+
+.navbar {
+ background-color: #cadceb;
+}
+
+.forabg {
+ background-color: #0076b1;
+ background-image: url("/ott/prosilver/theme/images/bg_list.gif");
+}
+
+.forumbg {
+ background-color: #12A3EB;
+ background-image: url("/ott/prosilver/theme/images/bg_header.gif");
+}
+
+.panel {
+ background-color: #ECF1F3;
+ color: #28313F;
+}
+
+.post:target .content {
+ color: #000000;
+}
+
+.post:target h3 a {
+ color: #000000;
+}
+
+.bg1 { background-color: #ECF3F7; }
+.bg2 { background-color: #e1ebf2; }
+.bg3 { background-color: #cadceb; }
+
+.ucprowbg {
+ background-color: #DCDEE2;
+}
+
+.fieldsbg {
+ background-color: #E7E8EA;
+}
+
+span.corners-top {
+ background-image: url("/ott/prosilver/theme/images/corners_left.png");
+}
+
+span.corners-top span {
+ background-image: url("/ott/prosilver/theme/images/corners_right.png");
+}
+
+span.corners-bottom {
+ background-image: url("/ott/prosilver/theme/images/corners_left.png");
+}
+
+span.corners-bottom span {
+ background-image: url("/ott/prosilver/theme/images/corners_right.png");
+}
+
+/* Horizontal lists
+----------------------------------------*/
+
+ul.navlinks {
+ border-bottom-color: #FFFFFF;
+}
+
+/* Table styles
+----------------------------------------*/
+table.table1 thead th {
+ color: #FFFFFF;
+}
+
+table.table1 tbody tr {
+ border-color: #BFC1CF;
+}
+
+table.table1 tbody tr:hover, table.table1 tbody tr.hover {
+ background-color: #CFE1F6;
+ color: #000;
+}
+
+table.table1 td {
+ color: #536482;
+}
+
+table.table1 tbody td {
+ border-top-color: #FAFAFA;
+}
+
+table.table1 tbody th {
+ border-bottom-color: #000000;
+ color: #333333;
+ background-color: #FFFFFF;
+}
+
+table.info tbody th {
+ color: #000000;
+}
+
+/* Misc layout styles
+---------------------------------------- */
+dl.details dt {
+ color: #000000;
+}
+
+dl.details dd {
+ color: #536482;
+}
+
+.sep {
+ color: #1198D9;
+}
+
+/* Pagination
+---------------------------------------- */
+
+.pagination span strong {
+ color: #FFFFFF;
+ background-color: #4692BF;
+ border-color: #4692BF;
+}
+
+.pagination span a, .pagination span a:link, .pagination span a:visited {
+ color: #5C758C;
+ background-color: #ECEDEE;
+ border-color: #B4BAC0;
+}
+
+.pagination span a:hover {
+ border-color: #368AD2;
+ background-color: #368AD2;
+ color: #FFF;
+}
+
+.pagination span a:active {
+ color: #5C758C;
+ background-color: #ECEDEE;
+ border-color: #B4BAC0;
+}
+
+/* Pagination in viewforum for multipage topics */
+.row .pagination {
+ background-image: url("/ott/prosilver/theme/images/icon_pages.gif");
+}
+
+.row .pagination span a, li.pagination span a {
+ background-color: #FFFFFF;
+}
+
+.row .pagination span a:hover, li.pagination span a:hover {
+ background-color: #368AD2;
+}
+
+/* Miscellaneous styles
+---------------------------------------- */
+
+.copyright {
+ color: #555555;
+}
+
+.error {
+ color: #BC2A4D;
+}
+
+.reported {
+ background-color: #F7ECEF;
+}
+
+li.reported:hover {
+ background-color: #ECD5D8 !important;
+}
+.sticky, .announce {
+ /* you can add a background for stickies and announcements*/
+}
+
+div.rules {
+ background-color: #ECD5D8;
+ color: #BC2A4D;
+}
+
+p.rules {
+ background-color: #ECD5D8;
+ background-image: none;
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for links.css
+-------------------------------------------------------------- */
+
+a:link { color: #105289; }
+a:visited { color: #105289; }
+a:hover { color: #D31141; }
+a:active { color: #368AD2; }
+
+/* Links on gradient backgrounds */
+#search-box a:link, .navbg a:link, .forumbg .header a:link, .forabg .header a:link, th a:link {
+ color: #FFFFFF;
+}
+
+#search-box a:visited, .navbg a:visited, .forumbg .header a:visited, .forabg .header a:visited, th a:visited {
+ color: #FFFFFF;
+}
+
+#search-box a:hover, .navbg a:hover, .forumbg .header a:hover, .forabg .header a:hover, th a:hover {
+ color: #A8D8FF;
+}
+
+#search-box a:active, .navbg a:active, .forumbg .header a:active, .forabg .header a:active, th a:active {
+ color: #C8E6FF;
+}
+
+/* Links for forum/topic lists */
+a.forumtitle {
+ color: #105289;
+}
+
+/* a.forumtitle:visited { color: #105289; } */
+
+a.forumtitle:hover {
+ color: #BC2A4D;
+}
+
+a.forumtitle:active {
+ color: #105289;
+}
+
+a.topictitle {
+ color: #105289;
+}
+
+/* a.topictitle:visited { color: #368AD2; } */
+
+a.topictitle:hover {
+ color: #BC2A4D;
+}
+
+a.topictitle:active {
+ color: #105289;
+}
+
+/* Post body links */
+.postlink {
+ color: #368AD2;
+ border-bottom-color: #368AD2;
+}
+
+.postlink:visited {
+ color: #5D8FBD;
+ border-bottom-color: #5D8FBD;
+}
+
+.postlink:active {
+ color: #368AD2;
+}
+
+.postlink:hover {
+ background-color: #D0E4F6;
+ color: #0D4473;
+}
+
+.signature a, .signature a:visited, .signature a:hover, .signature a:active {
+ background-color: transparent;
+}
+
+/* Profile links */
+.postprofile a:link, .postprofile a:visited, .postprofile dt.author a {
+ color: #105289;
+}
+
+.postprofile a:hover, .postprofile dt.author a:hover {
+ color: #D31141;
+}
+
+.postprofile a:active {
+ color: #105289;
+}
+
+/* Profile searchresults */
+.search .postprofile a {
+ color: #105289;
+}
+
+.search .postprofile a:hover {
+ color: #D31141;
+}
+
+/* Back to top of page */
+a.top {
+ background-image: url("/ott/prosilver/imageset/icon_back_top.gif");
+}
+
+a.top2 {
+ background-image: url("/ott/prosilver/imageset/icon_back_top.gif");
+}
+
+/* Arrow links */
+a.up { background-image: url("/ott/prosilver/theme/images/arrow_up.gif") }
+a.down { background-image: url("/ott/prosilver/theme/images/arrow_down.gif") }
+a.left { background-image: url("/ott/prosilver/theme/images/arrow_left.gif") }
+a.right { background-image: url("/ott/prosilver/theme/images/arrow_right.gif") }
+
+a.up:hover {
+ background-color: transparent;
+}
+
+a.left:hover {
+ color: #368AD2;
+}
+
+a.right:hover {
+ color: #368AD2;
+}
+
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for content.css
+-------------------------------------------------------------- */
+
+ul.forums {
+ background-color: #eef5f9;
+ background-image: url("/ott/prosilver/theme/images/gradient.gif");
+}
+
+ul.topiclist li {
+ color: #4C5D77;
+}
+
+ul.topiclist dd {
+ border-left-color: #FFFFFF;
+}
+
+.rtl ul.topiclist dd {
+ border-right-color: #fff;
+ border-left-color: transparent;
+}
+
+ul.topiclist li.row dt a.subforum.read {
+ background-image: url("/ott/prosilver/imageset/subforum_read.gif");
+}
+
+ul.topiclist li.row dt a.subforum.unread {
+ background-image: url("/ott/prosilver/imageset/subforum_unread.gif");
+}
+
+li.row {
+ border-top-color: #FFFFFF;
+ border-bottom-color: #00608F;
+}
+
+li.row strong {
+ color: #000000;
+}
+
+li.row:hover {
+ background-color: #F6F4D0;
+}
+
+li.row:hover dd {
+ border-left-color: #CCCCCC;
+}
+
+.rtl li.row:hover dd {
+ border-right-color: #CCCCCC;
+ border-left-color: transparent;
+}
+
+li.header dt, li.header dd {
+ color: #FFFFFF;
+}
+
+/* Forum list column styles */
+ul.topiclist dd.searchextra {
+ color: #333333;
+}
+
+/* Post body styles
+----------------------------------------*/
+.postbody {
+ color: #333333;
+}
+
+/* Content container styles
+----------------------------------------*/
+.content {
+ color: #333333;
+}
+
+.content h2, .panel h2 {
+ color: #115098;
+ border-bottom-color: #CCCCCC;
+}
+
+dl.faq dt {
+ color: #333333;
+}
+
+.posthilit {
+ background-color: #F3BFCC;
+ color: #BC2A4D;
+}
+
+/* Post signature */
+.signature {
+ border-top-color: #CCCCCC;
+}
+
+/* Post noticies */
+.notice {
+ border-top-color: #CCCCCC;
+}
+
+/* BB Code styles
+----------------------------------------*/
+/* Quote block */
+blockquote {
+ background-color: #EBEADD;
+ background-image: url("/ott/prosilver/theme/images/quote.gif");
+ border-color:#DBDBCE;
+}
+
+.rtl blockquote {
+ background-image: url("/ott/prosilver/theme/images/quote_rtl.gif");
+}
+
+blockquote blockquote {
+ /* Nested quotes */
+ background-color:#EFEED9;
+}
+
+blockquote blockquote blockquote {
+ /* Nested quotes */
+ background-color: #EBEADD;
+}
+
+/* Code block */
+dl.codebox {
+ background-color: #FFFFFF;
+ border-color: #C9D2D8;
+}
+
+dl.codebox dt {
+ border-bottom-color: #CCCCCC;
+}
+
+dl.codebox code {
+ color: #2E8B57;
+}
+
+.syntaxbg { color: #FFFFFF; }
+.syntaxcomment { color: #FF8000; }
+.syntaxdefault { color: #0000BB; }
+.syntaxhtml { color: #000000; }
+.syntaxkeyword { color: #007700; }
+.syntaxstring { color: #DD0000; }
+
+/* Attachments
+----------------------------------------*/
+.attachbox {
+ background-color: #FFFFFF;
+ border-color: #C9D2D8;
+}
+
+.pm-message .attachbox {
+ background-color: #F2F3F3;
+}
+
+.attachbox dd {
+ border-top-color: #C9D2D8;
+}
+
+.attachbox p {
+ color: #666666;
+}
+
+.attachbox p.stats {
+ color: #666666;
+}
+
+.attach-image img {
+ border-color: #999999;
+}
+
+/* Inline image thumbnails */
+
+dl.file dd {
+ color: #666666;
+}
+
+dl.thumbnail img {
+ border-color: #666666;
+ background-color: #FFFFFF;
+}
+
+dl.thumbnail dd {
+ color: #666666;
+}
+
+dl.thumbnail dt a:hover {
+ background-color: #EEEEEE;
+}
+
+dl.thumbnail dt a:hover img {
+ border-color: #368AD2;
+}
+
+/* Post poll styles
+----------------------------------------*/
+
+fieldset.polls dl {
+ border-top-color: #DCDEE2;
+ color: #666666;
+}
+
+fieldset.polls dl.voted {
+ color: #000000;
+}
+
+fieldset.polls dd div {
+ color: #FFFFFF;
+}
+
+.rtl .pollbar1, .rtl .pollbar2, .rtl .pollbar3, .rtl .pollbar4, .rtl .pollbar5 {
+ border-right-color: transparent;
+}
+
+.pollbar1 {
+ background-color: #AA2346;
+ border-bottom-color: #74162C;
+ border-right-color: #74162C;
+}
+
+.rtl .pollbar1 {
+ border-left-color: #74162C;
+}
+
+.pollbar2 {
+ background-color: #BE1E4A;
+ border-bottom-color: #8C1C38;
+ border-right-color: #8C1C38;
+}
+
+.rtl .pollbar2 {
+ border-left-color: #8C1C38;
+}
+
+.pollbar3 {
+ background-color: #D11A4E;
+ border-bottom-color: #AA2346;
+ border-right-color: #AA2346;
+}
+
+.rtl .pollbar3 {
+ border-left-color: #AA2346;
+}
+
+.pollbar4 {
+ background-color: #E41653;
+ border-bottom-color: #BE1E4A;
+ border-right-color: #BE1E4A;
+}
+
+.rtl .pollbar4 {
+ border-left-color: #BE1E4A;
+}
+
+.pollbar5 {
+ background-color: #F81157;
+ border-bottom-color: #D11A4E;
+ border-right-color: #D11A4E;
+}
+
+.rtl .pollbar5 {
+ border-left-color: #D11A4E;
+}
+
+/* Poster profile block
+----------------------------------------*/
+.postprofile {
+ color: #666666;
+ border-left-color: #FFFFFF;
+}
+
+.rtl .postprofile {
+ border-right-color: #FFFFFF;
+ border-left-color: transparent;
+}
+
+.pm .postprofile {
+ border-left-color: #DDDDDD;
+}
+
+.rtl .pm .postprofile {
+ border-right-color: #DDDDDD;
+ border-left-color: transparent;
+}
+
+.postprofile strong {
+ color: #000000;
+}
+
+.online {
+ background-image: url("/ott/prosilver/imageset/en/icon_user_online.gif");
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for buttons.css
+-------------------------------------------------------------- */
+
+/* Big button images */
+.reply-icon span { background-image: url("/ott/prosilver/imageset/en/button_topic_reply.gif"); }
+.mustardreply-icon span { background-image: url("/ott/prosilver/imageset/en/button_topic_reply_mustard.gif"); }
+.post-icon span { background-image: url("/ott/prosilver/imageset/en/button_topic_new.gif"); }
+.locked-icon span { background-image: url("/ott/prosilver/imageset/en/button_topic_locked.gif"); }
+.pmreply-icon span { background-image: url("/ott/prosilver/imageset/en/button_pm_reply.gif") ;}
+.newpm-icon span { background-image: url("/ott/prosilver/imageset/en/button_pm_new.gif") ;}
+.forwardpm-icon span { background-image: url("/ott/prosilver/imageset/en/button_pm_forward.gif") ;}
+
+a.print {
+ background-image: url("/ott/prosilver/theme/images/icon_print.gif");
+}
+
+a.sendemail {
+ background-image: url("/ott/prosilver/theme/images/icon_sendemail.gif");
+}
+
+a.fontsize {
+ background-image: url("/ott/prosilver/theme/images/icon_fontsize.gif");
+}
+
+/* Icon images
+---------------------------------------- */
+.sitehome { background-image: url("/ott/prosilver/theme/images/icon_home.gif"); }
+.icon-faq { background-image: url("/ott/prosilver/theme/images/icon_faq.gif"); }
+.icon-members { background-image: url("/ott/prosilver/theme/images/icon_members.gif"); }
+.icon-home { background-image: url("/ott/prosilver/theme/images/icon_home.gif"); }
+.icon-ucp { background-image: url("/ott/prosilver/theme/images/icon_ucp.gif"); }
+.icon-register { background-image: url("/ott/prosilver/theme/images/icon_register.gif"); }
+.icon-logout { background-image: url("/ott/prosilver/theme/images/icon_logout.gif"); }
+.icon-bookmark { background-image: url("/ott/prosilver/theme/images/icon_bookmark.gif"); }
+.icon-bump { background-image: url("/ott/prosilver/theme/images/icon_bump.gif"); }
+.icon-subscribe { background-image: url("/ott/prosilver/theme/images/icon_subscribe.gif"); }
+.icon-unsubscribe { background-image: url("/ott/prosilver/theme/images/icon_unsubscribe.gif"); }
+.icon-pages { background-image: url("/ott/prosilver/theme/images/icon_pages.gif"); }
+.icon-search { background-image: url("/ott/prosilver/theme/images/icon_search.gif"); }
+
+/* Profile & navigation icons */
+.email-icon, .email-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_email.gif"); }
+.aim-icon, .aim-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_aim.gif"); }
+.yahoo-icon, .yahoo-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_yahoo.gif"); }
+.web-icon, .web-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_www.gif"); }
+.msnm-icon, .msnm-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_msnm.gif"); }
+.icq-icon, .icq-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_icq.gif"); }
+.jabber-icon, .jabber-icon a { background-image: url("/ott/prosilver/imageset/icon_contact_jabber.gif"); }
+.pm-icon, .pm-icon a { background-image: url("/ott/prosilver/imageset/en/icon_contact_pm.gif"); }
+.quote-icon, .quote-icon a { background-image: url("/ott/prosilver/imageset/en/icon_post_quote.gif"); }
+
+/* Moderator icons */
+.report-icon, .report-icon a { background-image: url("/ott/prosilver/imageset/icon_post_report.gif"); }
+.edit-icon, .edit-icon a { background-image: url("/ott/prosilver/imageset/en/icon_post_edit.gif"); }
+.delete-icon, .delete-icon a { background-image: url("/ott/prosilver/imageset/icon_post_delete.gif"); }
+.info-icon, .info-icon a { background-image: url("/ott/prosilver/imageset/icon_post_info.gif"); }
+.warn-icon, .warn-icon a { background-image: url("/ott/prosilver/imageset/icon_user_warn.gif"); } /* Need updated warn icon */
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for cp.css
+-------------------------------------------------------------- */
+
+/* Main CP box
+----------------------------------------*/
+
+#cp-main h3, #cp-main hr, #cp-menu hr {
+ border-color: #A4B3BF;
+}
+
+#cp-main .panel li.row {
+ border-bottom-color: #B5C1CB;
+ border-top-color: #F9F9F9;
+}
+
+ul.cplist {
+ border-top-color: #B5C1CB;
+}
+
+#cp-main .panel li.header dd, #cp-main .panel li.header dt {
+ color: #000000;
+}
+
+#cp-main table.table1 thead th {
+ color: #333333;
+ border-bottom-color: #333333;
+}
+
+#cp-main .pm-message {
+ border-color: #DBDEE2;
+ background-color: #FFFFFF;
+}
+
+/* CP tabbed menu
+----------------------------------------*/
+#tabs a {
+ background-image: url("/ott/prosilver/theme/images/bg_tabs1.gif");
+}
+
+#tabs a span {
+ background-image: url("/ott/prosilver/theme/images/bg_tabs2.gif");
+ color: #536482;
+}
+
+#tabs a:hover span {
+ color: #BC2A4D;
+}
+
+#tabs .activetab a {
+ border-bottom-color: #CADCEB;
+}
+
+#tabs .activetab a span {
+ color: #333333;
+}
+
+#tabs .activetab a:hover span {
+ color: #000000;
+}
+
+/* Mini tabbed menu used in MCP
+----------------------------------------*/
+#minitabs li {
+ background-color: #E1EBF2;
+}
+
+#minitabs li.activetab {
+ background-color: #F9F9F9;
+}
+
+#minitabs li.activetab a, #minitabs li.activetab a:hover {
+ color: #333333;
+}
+
+/* UCP navigation menu
+----------------------------------------*/
+
+/* Link styles for the sub-section links */
+#navigation a {
+ color: #333;
+ background-color: #B2C2CF;
+ background-image: url("/ott/prosilver/theme/images/bg_menu.gif");
+}
+
+.rtl #navigation a {
+ background-image: url("/ott/prosilver/theme/images/bg_menu_rtl.gif");
+ background-position: 0 100%;
+}
+
+#navigation a:hover {
+ background-image: none;
+ background-color: #aabac6;
+ color: #BC2A4D;
+}
+
+#navigation #active-subsection a {
+ color: #D31141;
+ background-color: #F9F9F9;
+ background-image: none;
+}
+
+#navigation #active-subsection a:hover {
+ color: #D31141;
+}
+
+/* Preferences pane layout
+----------------------------------------*/
+#cp-main h2 {
+ color: #333333;
+}
+
+#cp-main .panel {
+ background-color: #F9F9F9;
+}
+
+#cp-main .pm {
+ background-color: #FFFFFF;
+}
+
+#cp-main span.corners-top, #cp-menu span.corners-top {
+ background-image: url("/ott/prosilver/theme/images/corners_left2.gif");
+}
+
+#cp-main span.corners-top span, #cp-menu span.corners-top span {
+ background-image: url("/ott/prosilver/theme/images/corners_right2.gif");
+}
+
+#cp-main span.corners-bottom, #cp-menu span.corners-bottom {
+ background-image: url("/ott/prosilver/theme/images/corners_left2.gif");
+}
+
+#cp-main span.corners-bottom span, #cp-menu span.corners-bottom span {
+ background-image: url("/ott/prosilver/theme/images/corners_right2.gif");
+}
+
+/* Topicreview */
+#cp-main .panel #topicreview span.corners-top, #cp-menu .panel #topicreview span.corners-top {
+ background-image: url("/ott/prosilver/theme/images/corners_left.gif");
+}
+
+#cp-main .panel #topicreview span.corners-top span, #cp-menu .panel #topicreview span.corners-top span {
+ background-image: url("/ott/prosilver/theme/images/corners_right.gif");
+}
+
+#cp-main .panel #topicreview span.corners-bottom, #cp-menu .panel #topicreview span.corners-bottom {
+ background-image: url("/ott/prosilver/theme/images/corners_left.gif");
+}
+
+#cp-main .panel #topicreview span.corners-bottom span, #cp-menu .panel #topicreview span.corners-bottom span {
+ background-image: url("/ott/prosilver/theme/images/corners_right.gif");
+}
+
+/* Friends list */
+.cp-mini {
+ background-color: #eef5f9;
+}
+
+dl.mini dt {
+ color: #425067;
+}
+
+/* PM Styles
+----------------------------------------*/
+/* PM Message history */
+.current {
+ color: #000000 !important;
+}
+
+/* PM marking colours */
+.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
+ border-left-color: #BC2A4D;
+ border-right-color: #BC2A4D;
+}
+
+.pmlist li.pm_marked_colour, .pm_marked_colour {
+ border-color: #FF6600;
+}
+
+.pmlist li.pm_replied_colour, .pm_replied_colour {
+ border-color: #A9B8C2;
+}
+
+.pmlist li.pm_friend_colour, .pm_friend_colour {
+ border-color: #5D8FBD;
+}
+
+.pmlist li.pm_foe_colour, .pm_foe_colour {
+ border-color: #000000;
+}
+
+/* Avatar gallery */
+#gallery label {
+ background-color: #FFFFFF;
+ border-color: #CCC;
+}
+
+#gallery label:hover {
+ background-color: #EEE;
+}
+
+/*
+--------------------------------------------------------------
+Colours and backgrounds for forms.css
+-------------------------------------------------------------- */
+
+/* General form styles
+----------------------------------------*/
+select {
+ border-color: #666666;
+ background-color: #FAFAFA;
+ color: #000;
+}
+
+label {
+ color: #425067;
+}
+
+option.disabled-option {
+ color: graytext;
+}
+
+/* Definition list layout for forms
+---------------------------------------- */
+dd label {
+ color: #333;
+}
+
+/* Hover effects */
+fieldset dl:hover dt label {
+ color: #000000;
+}
+
+fieldset.fields2 dl:hover dt label {
+ color: inherit;
+}
+
+/* Quick-login on index page */
+fieldset.quick-login input.inputbox {
+ background-color: #F2F3F3;
+}
+
+/* Posting page styles
+----------------------------------------*/
+
+#message-box textarea {
+ color: #333333;
+}
+
+/* Input field styles
+---------------------------------------- */
+.inputbox {
+ background-color: #FFFFFF;
+ border-color: #B4BAC0;
+ color: #333333;
+}
+
+.inputbox:hover {
+ border-color: #11A3EA;
+}
+
+.inputbox:focus {
+ border-color: #11A3EA;
+ color: #0F4987;
+}
+
+/* Form button styles
+---------------------------------------- */
+
+a.button1, input.button1, input.button3, a.button2, input.button2 {
+ color: #000;
+ background-color: #FAFAFA;
+ background-image: url("/ott/prosilver/theme/images/bg_button.gif");
+}
+
+a.button1, input.button1 {
+ border-color: #666666;
+}
+
+input.button3 {
+ background-image: none;
+}
+
+/* Alternative button */
+a.button2, input.button2, input.button3 {
+ border-color: #666666;
+}
+
+/* <a> button in the style of the form buttons */
+a.button1, a.button1:link, a.button1:visited, a.button1:active, a.button2, a.button2:link, a.button2:visited, a.button2:active {
+ color: #000000;
+}
+
+/* Hover states */
+a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
+ border-color: #BC2A4D;
+ color: #BC2A4D;
+}
+
+input.search {
+ background-image: url("/ott/prosilver/theme/images/icon_textbox_search.gif");
+}
+
+input.disabled {
+ color: #666666;
+}
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb" >
+<head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<meta http-equiv="content-style-type" content="text/css" />
+<meta http-equiv="content-language" content="en-gb" />
+<meta http-equiv="imagetoolbar" content="no" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="keywords" content="" />
+<meta name="description" content="" />
+<title>ŠÆOŠÆŠÆIM TTO • Bicycles on the Moon</title>
+<!--
+phpBB style name: prosilver
+Based on style: prosilver (this is the default phpBB3 style)
+Original author: Tom Beddard ( http://www.subBlue.com/ )
+Modified by:
+-->
+<script type="text/javascript" >
+// <![CDATA[
+var jump_page = 'Enter the page number you wish to go to:';
+var on_page = '1';
+var per_page = '40';
+var base_url = '/ott/view?f=7&t=101043';
+var style_cookie = 'phpBBstyle';
+var style_cookie_settings = '; path=/';
+var onload_functions = new Array();
+var onunload_functions = new Array();
+
+/**
+* Find a member
+*/
+function find_username(url)
+{
+popup(url, 760, 570, '_usersearch');
+return false;
+}
+/**
+* New function for handling multiple calls to window.onload and window.unload by pentapenguin
+*/
+window.onload = function()
+{
+for (var i = 0; i < onload_functions.length; i++)
+{
+eval(onload_functions[i]);
+}
+};
+window.onunload = function()
+{
+for (var i = 0; i < onunload_functions.length; i++)
+{
+eval(onunload_functions[i]);
+}
+};
+// ]]>
+</script>
+<script type="text/javascript" src="/ott/prosilver/template/styleswitcher.js" ></script>
+<script type="text/javascript" src="/ott/prosilver/template/forum_fn.js" ></script>
+<link href="/ott/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
+<link href="/ott/prosilver/theme/style.php.css" rel="stylesheet" type="text/css" media="screen, projection" />
+<link href="/ott/prosilver/theme/normal.css" rel="stylesheet" type="text/css" title="A" />
+<link href="/ott/prosilver/theme/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
+<link href="/ott/prosilver/theme/large.css" rel="alternate stylesheet" type="text/css" title="A++" />
+<link rel="icon" type="image/png" href="/img/favicon.png"/>
+
+</head>
+<body id="phpbb" class="section-viewforum ltr" >
+<div id="wrap" >
+<a id="top" name="top" accesskey="t" ></a>
+<div id="page-header" >
+<div class="headerbar" >
+<div class="inner" ><span class="corners-top" ><span></span></span>
+<div id="site-description" >
+<a href="http://1190.bicyclesonthemoon.dnsd.info" title="index" id="logo"> <img src="/ott/prosilver/imageset/xkcdLogo_transparent.png" alt="" title="" /> </a>
+<h1> <a href="/ott/" title="the OTT MIRROR"> the ŠÆOŠÆŠÆIM TTO </a> </h1>
+<p>Redundant copy of the needle-pulled thing</p>
+<p class="skiplink"> <a href="#start_here"> Skip to content </a> </p>
+</div>
+
+
+<div id="search-box">
+<form action="http://forums.xkcd.com/search.php" method="get" id="search">
+<fieldset>
+<input name="keywords" id="keywords" type="text" maxlength="128" title="Search for keywords" class="inputbox search" value="Search the foraā¦" onclick="if(this.value=='Search the foraā¦')this.value='';" onblur="if(this.value=='')this.value='Search the foraā¦';" />
+<input class="button2" value="Search" type="submit" /> <br />
+<a href="http://forums.xkcd.com/search.php" title="View the advanced search options"> Advanced search </a>
+</fieldset>
+</form>
+</div>
+
+<span class="corners-bottom" ><span></span></span></div>
+</div>
+<div class="navbar">
+<div class="inner"> <span class="corners-top"> <span> </span> </span>
+<ul class="linklist navlinks">
+<li class="icon-home"> <a href="http://bicyclesonthemoon.dnsd.info/" accesskey="h"> Bicycles on the Moon </a> <strong> ‹ </strong> <a href="/" accesskey="h"> Time related </a> <strong> ‹ </strong> <a href="/ott/"> ŠÆOŠÆŠÆIM TTO </a> </li>
+<li class="rightside"> <a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="Change font size"> Change font size </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start=67120&view=print" title="Print view" accesskey="p" class="print"> Print view </a> </li>
+</ul>
+<ul class="linklist navlinks2">
+<li class="icon-home"> <a href="http://forums.xkcd.com/index.php"> Board index </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=26"> The Comic </a> <strong> ‹ </strong> <a href="http://forums.xkcd.com/viewforum.php?f=7"> Individual XKCD Comic Threads </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=login" title="Login" accesskey="x" class="icon-logout"> Login </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/ucp.php?mode=register" class="icon-register"> Register </a> </li>
+<li class="rightside"> <a href="http://forums.xkcd.com/faq.php" title="Frequently Asked Questions" class="icon-faq"> FAQ </a> </li>
+</ul>
+<span class="corners-bottom"> <span> </span> </span> </div>
+</div>
+</div>
+<a name="start_here" ></a>
+<div id="page-body" >
+
+<h2><a href="/ott/" >The ŠÆOŠÆŠÆIM TTO</a></h2>
+<div>
+<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body --><div style="display: none !important;" >This forum is for the individual discussion thread that goes with each new comic.<br /></div><p><strong>Moderators:</strong> <a style="color:#006600;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=6592" >Moderators General</a>, <a style="color:#993399;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=7358" >Magistrates</a>, <a style="color:#CC6600;" href="http://forums.xkcd.com/memberlist.php?mode=group&g=7357" >Prelates</a></p>
+</div>
+<div class="topic-actions" >
+
+<div class="buttons" >
+<!-- <div class="post-icon" title="Post a new topic" ><a href="http://forums.xkcd.com/posting.php?mode=post&f=7" ><span></span>Post a new topic</a></div> -->
+</div>
+
+<div class="search-box" >
+<form method="get" id="forum-search" action="http://forums.xkcd.com/search.php" >
+<fieldset>
+<input class="inputbox search tiny" type="text" name="keywords" id="search_keywords" size="20" value="Search the ICTā¦" onclick="if (this.value == 'Search the ICTā¦') this.value = '';" onblur="if (this.value == '') this.value = 'Search the ICTā¦';" />
+<input class="button2" type="submit" value="Search" />
+<input type="hidden" name="fid[0]" value="7" />
+</fieldset>
+</form>
+</div>
+
+
+
+<div class="pagination" >
+1 topic • <a href="#" onclick="jumpto(); return false;" title="Click to jump to pageā¦" >Page <strong>1</strong> of <strong>1</strong></a> • <span><strong>1</strong></span>
+</div>
+
+</div>
+
+
+<div class="forumbg" >
+<div class="inner" ><span class="corners-top" ><span></span></span>
+<ul class="topiclist" >
+<li class="header" >
+<dl class="icon" >
+<dt>Topics</dt>
+<dd class="posts" >Replies</dd>
+<dd class="views" >Views</dd>
+<dd class="lastpost" ><span>Last post</span></dd>
+</dl>
+</li>
+</ul>
+<ul class="topiclist topics" >
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
+<html lang="en">
+ <head>
+ <title>Update • ŠÆOŠÆŠÆIM TTO • Bicycles on the Moon</title>
+ <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
+ <link rel="icon" type="image/png" href="/img/favicon.png">
+ </head>
+ <body>
+ <a href="/"><img src="/ott/prosilver/imageset/xkcdLogo_transparent.png" alt="1190.bicyclesonthemoon.dnsd.info" border="0"></a>
+ <h1><a href="/ott">The ŠÆOŠÆŠÆIM TTO</a></h1>
+ <form method="get" action="/ott/update">
+ Update a Newpage<br>
+ NP = <input type="text" name="np">
+ <input type="submit" value="Update">
+ </form>
+ </body>
+</html>
--- /dev/null
+# bothasar_t
+# relinking, archiving avatars, attachments, images
+
+BEGIN {
+# print download
+ related=0
+ related2=0
+ related3=0
+ related4=0
+ related5=0
+ related6=0
+ np=0
+ p=0
+###USERAGENT2a
+ arr[0]=0
+ arr2[0]=0
+###findpost_path
+###imgformat_path
+###wayback
+###fora
+
+ if (wait=="")
+ {
+ wait=15
+ }
+ printf("")>outfile
+
+ # So many facepalms for this part, why is there no better solution?
+ for(i=0;i<256;++i)
+ {
+ ch=sprintf("%c",i)
+ hex=sprintf("%02X",i);
+ ch2hex[ch]=hex
+ }
+};
+{
+ gsub(/href=\"\./, "href=\"" fora, $0)
+ gsub(/src=\"\./, "src=\"" fora, $0)
+ gsub(/action=\"\./, "action=\"" fora, $0)
+ gsub(/(&|\?)sid=................................/, "", $0)
+ gsub(/\">/, "\" >", $0)
+ gsub(/\" \/>/, "\" />", $0)
+ # print $0
+
+ for (i=1;i<=NF;++i)
+ {
+ related=0
+ related2=0
+ related3=0
+ related4=0
+ related5=0
+ related6=0
+ np=0
+ p=0
+
+ if ($i ~ /^id=.p[0-9]/)
+ {
+ split($i, arr, "\"p?")
+ id=arr[2]
+ }
+
+ # relink OTT links to mirror links
+ if($i ~ /###links_regexp;/)
+ {
+ split($i, arr, "#|\?|&|\"|\"")
+ for(j=1;j in arr;++j)
+ {
+ split(arr[j], arr2, "=")
+ if(arr2[1]=="t")
+ {
+ if(arr2[2]==###threadID;)
+ related=1
+ else
+ {
+ related=0
+ break
+ }
+ }
+ else if(arr2[1]=="start")
+ {
+ np=(arr2[2]/40)+1
+ }
+ else if(arr2[1]=="p")
+ {
+ p=arr2[2]
+ if((related==0)||(np==0))
+ {
+ printf("%s %s > %s\n",findpost_path,p,tempfile)|"sh"
+ close("sh")
+ getline np<tempfile
+ close(tempfile)
+ if (np!=0)
+ related=1
+ else
+ {
+ related=0
+ break
+ }
+ }
+ }
+ }
+ }
+
+ # relink prosilver(default) to mirror
+ else if($i ~ /###prosilver_regexp;/)
+ {
+ split($i, arr, "###prosilver_regexp2;")
+ related2=1
+ }
+
+ # relink smileys to mirror
+ else if($i ~ /###smiley_regexp;/)
+ {
+ split($i, arr, "###smiley_regexp2;")
+ related5=1
+ }
+
+ # download and relink avatars
+ else if($i ~ /###avatar_regexp;/)
+ {
+ split($i, arr, "\"")
+ split(arr[2],arr2,"=")
+ arr2[1]=avatarpath arr2[2]
+ if (system("[ -f " arr2[1] " ]")==0)
+ {
+ related3=1
+ }
+ else if (tolower(download)=="yes")
+ {
+ if (system("wget -q -t 3 -U " useragent " -O " tempfile " " arr[2])==0)
+ {
+ if ((system ("mv " tempfile " " arr2[1]))==0)
+ {
+ printf ("\nsaved avatar %s", arr2[2])
+ related3==1
+ }
+ else
+ {
+ printf ("\nCOPY FAIL %s", arr2[2])
+ }
+ system("sleep " wait)
+ }
+ else
+ {
+ printf ("\nDOWNLOAD FAIL %s", arr2[2])
+ }
+ }
+ }
+
+ # download and relink attachments
+ else if($i ~ /###attachment_regexp;/)
+ {
+ split($i, arr, "(\")|(%)")
+ split(arr[2],arr2,"(\?id=)|((\?mode=view)?&(id=)?)");
+ sub(/([^0123456789])+/,"",arr2[2])
+ if (arr2[3] ~ /^t/)
+ {
+ arr2[2] = arr2[2] "_r"
+ arr[2] = arr[2] "&t=1"
+ }
+ arr2[1] = attachmentpath arr2[2]
+
+ if (system("[ -f " arr2[1] ".* ]")==0)
+ {
+ related4=1
+ }
+ else if (tolower(download2)=="yes")
+ {
+ r=system ("wget -q -t 3 -S -U " useragent " -O " tempfile " \"" arr[2] "\" 2> " tempfile2)
+ d=""
+ h404=""
+ ext=""
+ cdf=""
+ ctf=""
+ while((getline hline < tempfile2)>0)
+ {
+ if (tolower(hline) ~ /^ *http/)
+ {
+ split(hline, arr3, " ")
+ if(arr3[2]==404)
+ {
+ h404=1
+ break
+ }
+ else if((arr3[2]!=200)||(r!=0))
+ {
+ printf ("\nHTTP %s %s", arr3[2], arr2[2])
+ exit 1
+ }
+ else
+ {
+ d=1
+ }
+ }
+ else if(tolower(hline) ~ /^ *content-disposition/)
+ {
+ split(hline, arr3, " ")
+ for(k=1;k in arr3;++k)
+ {
+ if(arr3[k] ~ /filename/)
+ {
+ split(arr3[k],arr4,"\.")
+ for(l=1;l in arr4;++l)
+ ext=("." tolower(arr4[l]))
+ cdf=1
+ }
+ }
+ }
+ # only if content-disposition fails:
+ else if((cdf=="")&&(tolower(hline) ~ /^ *content-type/))
+ {
+ split(hline, arr3, " ")
+ if (arr3[2] ~ /image\/png/)
+ ext=".png"
+ else if (arr3[2] ~ /image\/jpeg/)
+ ext=".jpg"
+ else if (arr3[2] ~ /image\/gif/)
+ ext=".gif"
+ else
+ {
+ printf ("\nCONTENT %s %s", arr3[2], arr2[2])
+ ctf=1
+ }
+ break
+ }
+ }
+ close (tempfile2)
+ if((ctf!="")&&(cdf==""))
+ {
+ printf("\nCONTENT RECOGNITION FAIL.")
+ exit 1
+ }
+ if ((h404=="")&&(d!=""))
+ {
+ if ((system ("mv " tempfile " " arr2[1] ext))==0)
+ {
+ related4=1
+ printf ("\nsaved attachment %s%s", arr2[2],ext)
+ }
+ else
+ {
+ printf ("\nCOPY FAIL %s", arr2[2])
+ exit 1
+ }
+ system ("sleep " wait)
+ }
+ }
+ }
+
+ # download and relink images
+ else if(($i ~ /src=.https?:\/\//)&&($(i-1) ~ /<img/) && ($i !~ /###own_image_regexp;/))
+ {
+ split($i, arr,"\"");
+ gsub(/&/,"\&",arr[2]);
+ esc=escapename(arr[2])
+ esclen = length(esc)
+ imgdir = ""
+ for(j=0;esclen-j*200>240;++j)
+ {
+ imgdir = (imgdir substr(esc,1+200*j,200) "/")
+ }
+ imgname = substr(esc,1+200*j)
+
+ if (system("[ -f " imagepath imgdir imgname ".* ]")==0)
+ {
+ related6=1
+ ext=""
+ }
+ else if (tolower(download3)=="yes")
+ {
+ ext=""
+ r=system ("wget -q --no-check-certificate -t 3 -S -U " useragent " -O " tempfile " \"" arr[2] "\" 2> " tempfile2)
+ if(r)
+ r=system ("wget -q --no-check-certificate -t 3 -S -U " useragent " -O " tempfile " \"" wayback arr[2] "\" 2> " tempfile2)
+ if(r)
+ printf("\nfailed to download %s",arr[2])
+ else
+ {
+ r=system(imgformat_path " " tempfile)
+ if(r==1)
+ ext=".gif"
+ else if(r==2)
+ ext=".png"
+ else if(r==3)
+ ext=".jpg"
+ else if(r==4)
+ ext=".bmp"
+ else
+ {
+ ext=""
+ printf("\nfailed to determine format: %s", arr[2])
+ }
+ if(ext!="")
+ {
+ if ((system ("mkdir -p " imagepath imgdir))==0)
+ {
+ if ((system ("mv " tempfile " " imagepath imgdir imgname ext))==0)
+ {
+ related6=1
+ printf ("\nsaved image %s", arr[2])
+ }
+ else
+ {
+ printf ("\nCOPY FAIL %s %s",arr[2], imagepath imgdir imgname ext)
+ }
+ }
+ else
+ {
+ printf ("\nMKDIR FAIL %s %s",arr[2], imagepath imgdir)
+ }
+ }
+ system ("sleep " wait)
+ }
+ }
+ }
+
+ # apply the prepared changes
+ if (related==1)
+ {
+ printf("href=\"/ott/view") >> outfile
+ if(np>0)
+ {
+ printf("?np=%s",np) >> outfile
+ if(p>0)
+ {
+ printf("&p=%s#p%s",p,p) >> outfile
+ }
+ }
+ printf("\"")>outfile
+ }
+ else if (related2==1)
+ {
+ printf("%s/ott/prosilver%s",arr[1],arr[2]) >> outfile
+ }
+ else if (related5==1)
+ {
+ printf("%s/ott/prosilver/smilies%s",arr[1],arr[2]) >> outfile
+ }
+ else if (related3==1)
+ {
+ printf("%s\"/ott/avatar/%s\"%s", arr[1],arr2[2],arr[3]) >> outfile
+ }
+ else if (related4==1)
+ {
+ printf("%s\"/ott/attachment/%s\"\n",arr[1],arr2[2]) >> outfile
+ }
+ else if (related6==1)
+ {
+ printf("%s\"/ott/image/%s\"\n",arr[1],imgdir imgname) >>outfile
+ }
+ else
+ {
+ printf("%s", $i) >> outfile
+ }
+ if(i==NF)
+ printf("\n") >> outfile
+ else
+ printf(" ") >> outfile
+ }
+
+ # add quote button
+ if($0 ~ /<div class=.postbody/)
+ {
+ print "<ul class=\"profile-icons\" >" >> outfile
+ print "<li class=\"quote-icon\" ><a title=\"Reply with quote\" href=\"###foraaddr;/posting.php?mode=quote&f=7&p=" id "\" ></a></li>" >> outfile
+ print "</ul>" >> outfile
+ }
+};
+#END {
+# exit related
+#}
+function escapename(name)
+{
+ len=length(name)
+ escaped=""
+ for(iii=1;iii<=len;++iii)
+ {
+ ch=substr(name,iii,1);
+ if (ch ~ /[a-z]|[A-Z]|[0-9]/)
+ escaped = escaped ch
+ else
+ escaped = escaped "_" ch2hex[ch]
+ }
+ return escaped
+};
\ No newline at end of file
--- /dev/null
+ // The One True Thread mirror bot
+ // aka. bothasar_t' aka. bot2
+// ~~ bicyclesonthemoon
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/wait.h>
+
+#define DOWNLOAD_MSTD 1
+#define NP_PREP_MSTD 2
+#define LATEST_MSTD 3
+#define STOP_MSTD 4
+
+#define LINE_LIMIT 16000
+
+###USERAGENT2
+
+###ICT_ADDRESS
+###OTT_ADDRESS
+###FORA_ADDRESS
+
+###LAST_PATH
+###LOG_PATH
+###NP_PATH
+###NP_PATH_1
+###NP_PATH_2
+###NP_PATH_3
+###STOP_PATH
+###LIST_PATH
+###SIG_PATH
+###INF_PATH
+###UP_PATH
+###IND_PATH
+###TOP_PATH
+###END_PATH
+###AV_PATH
+###ATT_PATH
+###IMG_PATH
+###LAST_PAGE
+
+###WGET_PATH
+###MAWK_PATH
+###RM_PATH
+###AWK_LATEST
+###AWK_LIST
+###AWK_BOT2
+###AWK_UPLOAD
+###AWK_INDEX
+
+FILE *cwfile;
+FILE *stopfile;
+bool logopen=false;
+char stoppath[256];
+char nppath [256];
+char nppath1[256];
+char nppath2[256];
+char nppath3[256];
+pid_t sub;
+int r;
+
+int main(int argc, char *argv[]);
+int longline(const char *in,const char *out, unsigned long limit);
+void end(int m);
+
+int main(int argc, char *argv[])
+{
+ time_t t;
+
+ int yarg;
+
+ bool fi=false;
+ bool fs=false;
+ bool fm=false;
+ bool fw=false;
+ bool fv=false;
+ bool fo=false;
+ bool fp=false;
+ bool recentbot=false;
+ bool newlog=false;
+ bool text=false;
+ bool down=false;
+ bool down2=false;
+ bool down3=false;
+
+ unsigned short botID=0;
+ unsigned long start=1;
+ unsigned long max=1;
+ unsigned long posts=0xffffffff;
+ unsigned long npwait=3;
+ unsigned long await=15;
+ unsigned long offset=1;
+ unsigned long avoid=0;
+
+ unsigned long i,np,last,last2;
+
+ char argp1 [256];
+ char argp2[256];
+ char argp3[256];
+ char argp4[256];
+ char argp5[256];
+ char argp6[256];
+ char argp7[256];
+ char temp [256];
+ char URL [256];
+
+ time(&t);
+ opterr=0;
+
+ while((yarg = getopt(argc,argv,"i:s:m:o:w:v:p:rntdab")) != -1)
+ {
+ switch(yarg)
+ {
+ case 'i':
+ fi=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%hu",&botID);
+ break;
+ case 's':
+ fs=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&start);
+ break;
+ case 'm':
+ fm=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&max);
+ break;
+ case 'o':
+ fo=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&offset);
+ break;
+ case 'w':
+ fw=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&npwait);
+ break;
+ case 'v':
+ fv=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&await);
+ break;
+ case 'p':
+ fp=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&avoid);
+ break;
+ case 'r':
+ recentbot=true;
+ break;
+ case 'n':
+ newlog=true;
+ break;
+ case 't':
+ text=true;
+ break;
+ case 'd':
+ down=true;
+ break;
+ case 'a':
+ down2=true;
+ break;
+ case 'b':
+ down3=true;
+ break;
+ default:
+
+ break;
+ }
+ }
+ if(!fi)
+ botID=0;
+ if(!fo)
+ offset=1;
+ if(!fs)
+ {
+ sprintf(argp1,"%s%hu",LAST_PATH,botID);
+ if((cwfile=fopen(argp1,"rt"))!=NULL)
+ {
+ fgets(temp,255,cwfile);
+ sscanf(temp,"%lu",&start);
+ fclose(cwfile);
+ start=((start>offset)?(start+1-offset):1);
+ }
+ else
+ start=1;
+ }
+ if(!fm)
+ max=1;
+ if(!fw)
+ npwait=3;
+ if(!fv)
+ await=15;
+ if(!fp)
+ avoid=0;
+ if(!text)
+ {
+ sprintf(argp1,"%s%hu",LOG_PATH,botID);
+ if(freopen(argp1,newlog?"wt":"at",stdout)!=NULL)
+ logopen=true;
+ }
+ setvbuf(stdout, NULL, _IONBF, 0);
+ dup2(fileno(stdout),fileno(stderr));
+
+ printf("\n%s",ctime(&t));
+ printf("ID=%hu, offset=%lu, start=%lu, max=%lu, NP wait=%lus, A wait=%lus, present=%s -%lu, save_avatars=%s, save_attachments=%s, save_otherimg=%s",botID,offset,start,max,npwait,await,(recentbot?"YES":"NO"),avoid,(down?"YES":"NO"),(down2?"YES":"NO"),(down3?"YES":"NO"));
+
+
+ sprintf(nppath ,"%s%hu",NP_PATH ,botID);
+ sprintf(nppath1,"%s%hu",NP_PATH_1,botID);
+ sprintf(nppath2,"%s%hu",NP_PATH_2,botID);
+ sprintf(nppath3,"%s%hu",NP_PATH_3,botID);
+ sprintf(stoppath,"%s%hu",STOP_PATH,botID);
+
+ stopfile=fopen(stoppath,"wt");
+ if (stopfile==NULL)
+ end(STOP_MSTD);
+ if (lockf(fileno(stopfile),F_TLOCK,0)!=0)
+ end(STOP_MSTD);
+ fprintf(stopfile,"%hu.FULL STOPFULL STOP\n",botID);
+
+ for(i=0,last2=0xffffffff,np=start;(i<max)&&(np<=last2);++i,++np)
+ {
+ if(i!=0)
+ sleep(npwait);
+
+ printf("\n%lu: np%lu",i,np);
+ sprintf(URL,"%s%lu",OTT_ADDRESS,(np-1)*40);
+
+ // download the newpage
+ printf(" download");
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(WGET_PATH,WGET_PATH, "-q","-t", "3","-U", USERAGENT, "-O", nppath1,URL, (char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ {
+ printf(" %d ",r);
+ end(DOWNLOAD_MSTD);
+ }
+ printf(" OK, prepare");
+
+ // break long posts so that mawk doesn't fail
+ r=longline(nppath1,nppath,LINE_LIMIT);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(".");
+
+ // what's the last page and how many posts are there?
+ sprintf(argp1,"outfile=%s",nppath3);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_LATEST,"-v",argp1,nppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(LATEST_MSTD);
+ printf(".");
+
+ if((cwfile=fopen(nppath3,"rt"))!=NULL)
+ {
+ fscanf(cwfile,"%lu",&last);
+ fscanf(cwfile,"%lu",&posts);
+ fclose(cwfile);
+ }
+ else
+ end(LATEST_MSTD);
+ last2=(last>avoid)?(last-avoid):0;
+ printf(".");
+ if(np>last2)
+ {
+ printf("break(%lu)",last2);
+ continue;
+ }
+
+ // List of posts
+ // Yes, this could be done in the next script (It ewen was) but it has to be done BEFORE it.
+ sprintf(argp1,"outfile=%s%lu",LIST_PATH,np);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_LIST,"-v",argp1,nppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(".");
+
+ // relink, convert, download things
+ sprintf(argp1,"outfile=%s",nppath1);
+ sprintf(argp2,"tempfile=%s",nppath2);
+ sprintf(argp5,"imagepath=%s",IMG_PATH);
+ sprintf(argp3,"avatarpath=%s",AV_PATH);
+ sprintf(argp4,"attachmentpath=%s",ATT_PATH);
+ sprintf(argp6,"wait=%lu",await);
+ sprintf(argp7,"tempfile2=%s",nppath3);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_BOT2,"-v",argp1,"-v",argp2,"-v",argp3,"-v",argp4,"-v",argp5,"-v",argp6,"-v",argp7,"-v",(down?"download=YES":"download=NO"),"-v",(down2?"download2=YES":"download3=NO"),"-v",(down3?"download3=YES":"download3=NO"),nppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(".OK, upload");
+
+ // upload the newpage
+ sprintf(argp1 ,"outfile=%s%lu",UP_PATH,np);
+ sprintf(argp2,"sig=%s",SIG_PATH);
+ sprintf(argp3,"otterinf=%s",INF_PATH);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_UPLOAD,"-v",argp1,"-v",argp2,"-v",argp3,nppath1,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(" OK.");
+
+ if((np==last2)&&(!recentbot))
+ np=0L;
+
+ sprintf(argp1,"%s%hu",LAST_PATH,botID);
+ if((cwfile=fopen(argp1,"wt"))!=NULL)
+ {
+ fprintf(cwfile,"%lu\n",np);
+ fclose(cwfile);
+ }
+ else
+ end(LATEST_MSTD);
+ }
+
+ cwfile=fopen(LAST_PAGE,"wt");
+ if(cwfile==NULL)
+ end(LATEST_MSTD);
+ fprintf(cwfile,"%lu\n",last);
+ fprintf(cwfile,"%lu\n",posts);
+ fclose(cwfile);
+
+ if(recentbot)
+ {
+ // download index
+ printf("\nindex download");
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(WGET_PATH,WGET_PATH, "-q","-t", "3","-U", USERAGENT, "-O", nppath,ICT_ADDRESS, (char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ printf(" OK, prepare");
+ // cut out only what's needed
+ sprintf(argp1,"outfile=%s",nppath3);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_INDEX,"-v",argp1,nppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(".");
+
+ // relink
+ sprintf(argp1,"outfile=%s",IND_PATH);
+ sprintf(argp2,"tempfile=%s",nppath2);
+ sprintf(argp3,"avatarpath=%s",AV_PATH);
+ sprintf(argp5,"imagepath=%s",IMG_PATH);
+ sprintf(argp4,"attachmentpath=%s",ATT_PATH);
+ sprintf(argp6,"wait=%lu",await);
+ sprintf(argp7,"tempfile2=%s",nppath1);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_BOT2,"-v",argp1,"-v",argp2,"-v",argp3,"-v",argp4,"-v",argp5,"-v",argp6,"-v",argp7,"-v","download=NO","-v","download2=NO","-v","download3=NO",nppath3,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ end(NP_PREP_MSTD);
+ printf(".OK");
+
+ }
+
+ end(0);
+}
+
+//This function wouldn't be here if itt weren't for this post: http://forums.xkcd.com/viewtopic.php?p=3619766#p3619766
+int longline(const char *in,const char *out, unsigned long limit)
+{
+ FILE *infile;
+ FILE *outfile;
+ bool tag;
+ unsigned long counter=0;
+ char ch;
+
+ outfile=fopen(out,"wt");
+ if(outfile==NULL)
+ return 1;
+ infile=fopen(in,"rt");
+ if(infile==NULL)
+ {
+ fclose(outfile);
+ return 1;
+ }
+
+ while(!feof(infile))
+ {
+ ch=(char)(fgetc(infile));
+ fputc(ch,outfile);
+ ++counter;
+ switch(ch)
+ {
+ case '<':
+ tag=true;
+ break;
+ case '>':
+ tag=false;
+ if(counter>=limit)
+ {
+ fputc('\n',outfile);
+ counter=0;
+ }
+ break;
+ case ' ':
+ if((!tag) && (counter>= limit))
+ if(counter>=limit)
+ {
+ fputc('\n',outfile);
+ counter=0;
+ }
+ break;
+ case '\r':
+ case '\n':
+ counter=0;
+ break;
+ default:
+ break;
+ }
+
+ }
+ return 0;
+}
+
+void end(int m)
+{
+ switch(m)
+ {
+ case STOP_MSTD:
+ printf("\nFULL STOPFULL STOP\n");
+ break;
+ case DOWNLOAD_MSTD:
+ printf("\ndownload fail.\n");
+ break;
+ case NP_PREP_MSTD:
+ printf("\nnewpage prepare fail.\n");
+ break;
+ case LATEST_MSTD:
+ printf("\nnewestpage fail.\n");
+ break;
+ case 0:
+ printf("\nOK\n");
+ break;
+ default:
+ printf("\nCh*rping m*stard!\n");
+ }
+ if(logopen)
+ fclose(stdout);
+ if(m != STOP_MSTD)
+ {
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",nppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",nppath1,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",nppath2,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",nppath3,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+
+ lockf(fileno(stopfile),F_ULOCK,0);
+ fclose(stopfile);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",stoppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ }
+ exit(m);
+}
\ No newline at end of file
--- /dev/null
+ // The One True Thread post bot
+ // aka. bothasar_p' aka. bot3
+// ~~ bicyclesonthemoon
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <sys/wait.h>
+
+#define OK 0
+#define POST_MSTD 256
+#define INDELIVERABLE 512
+#define NOPOSTS 3
+#define STOP_MSTD 4
+#define NAME_MSTD 5
+
+###USERAGENT3
+###NAME_PATH
+###LASTTIME_PATH
+###LOG_PATH3
+###TEMPFILE_PATH
+###POSTDATA_PATH
+###COOKIE_PATH
+###STOP_PATH3
+###POST_PATH3
+###LIST_PATH3
+###LAST_PATH3
+###IND_PATH3
+###OK_PATH3
+###PM_PATH3
+###FAIL_PATH3
+
+###WGET_PATH
+###MAWK_PATH
+###RM_PATH
+###MV_PATH
+###AWK_POST
+###AWK_PM
+
+FILE *cwfile;
+FILE *stopfile;
+FILE *listfile;
+bool listopen=false;
+bool logopen=false;
+pid_t sub;
+int r;
+
+int main(int argc, char *argv[]);
+void end(int m);
+
+int main(int argc, char *argv[])
+{
+ time_t t;
+
+ int yarg;
+
+ bool fm=false;
+ bool fw=false;
+
+ bool newlog=false;
+ bool text=false;
+
+ unsigned long max=0xffffffff;
+ // unsigned long posts=0xffffffff;
+ unsigned long pwait=5;
+
+ unsigned long np, lastnp, firstnp, i;
+ unsigned short p, lastp, firstp;
+
+ char name[256];
+ char pass[256];
+ char listpath[256];
+ char postpath[256];
+ char postname[256];
+ char argp1 [256];
+ char argp2[256];
+ char argp3[256];
+ char argp4[256];
+ char argp5[256];
+
+ time(&t);
+ opterr=0;
+
+ //t -nolog
+ //n -newlog
+ //w -wait
+ //m -maxposts
+
+ while((yarg = getopt(argc,argv,"m:w:nt")) != -1)
+ {
+ switch(yarg)
+ {
+ case 'm':
+ fm=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&max);
+ break;
+ case 'w':
+ fw=true;
+ if(optarg!=NULL)
+ sscanf(optarg,"%lu",&pwait);
+ break;
+ case 'n':
+ newlog=true;
+ break;
+ case 't':
+ text=true;
+ break;
+ default:
+
+ break;
+ }
+ }
+
+ if(!fm)
+ max=0xffffffff;
+ if(!fw)
+ pwait=15;
+ if(!text)
+ {
+ if(freopen(LOG_PATH,newlog?"wt":"at",stdout)!=NULL)
+ logopen=true;
+ }
+
+ setvbuf(stdout, NULL, _IONBF, 0);
+ dup2(fileno(stdout),fileno(stderr));
+ printf("\n%s",ctime(&t));
+ printf("max=%lu, P wait=%lus",max,pwait);
+
+
+ stopfile=fopen(STOP_PATH,"wt");
+ if (stopfile==NULL)
+ end(STOP_MSTD);
+ if (lockf(fileno(stopfile),F_TLOCK,0)!=0)
+ end(STOP_MSTD);
+ fprintf(stopfile,"%hu.FULL STOPFULL STOP\n",0);
+
+ cwfile=fopen(NAME_PATH,"rt");
+ if(cwfile==NULL)
+ end(NAME_MSTD);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ sscanf(argp1,"%s",name);
+ else
+ end(NAME_MSTD);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ sscanf(argp1,"%s",pass);
+ else
+ end(NAME_MSTD);
+ fclose(cwfile);
+
+ cwfile=fopen(LAST_PATH,"rt");
+ if(cwfile==NULL)
+ end(NOPOSTS);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ sscanf(argp1,"%lu",&lastnp);
+ else
+ end(NOPOSTS);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ sscanf(argp1,"%hu",&lastp);
+ else
+ end(NOPOSTS);
+ fclose(cwfile);
+
+ printf(". Last page: %lu with last post %hu",lastnp,lastp);
+
+ cwfile=fopen(LASTTIME_PATH,"rt");
+ if(cwfile==NULL)
+ {
+ firstnp=1;
+ firstp=0;
+ }
+ else
+ {
+ if(fgets(argp1,255,cwfile)!=NULL)
+ {
+ sscanf(argp1,"%lu",&firstnp);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ sscanf(argp1,"%hu",&firstp);
+ else
+ firstp=0;
+ }
+ else
+ {
+ firstnp=1;
+ firstp=0;
+ }
+
+ fclose(cwfile);
+ }
+ printf(" Start after np %lu, post %hu.",firstnp,firstp);
+ for(i=0,np=firstnp;np<=lastnp;++np)
+ {
+ p=0;
+ printf("\nnp%lu:",np);
+
+ sprintf(listpath,"%s%lu",LIST_PATH,np);
+ listfile=fopen(listpath,"rt");
+ if(listfile==NULL)
+ {
+ printf("\nNo posts.");
+ continue;
+ }
+ listopen=true;
+
+ for(p=1;fgets(argp1,255,listfile)!=NULL;++p)
+ {
+ if((np==firstnp&&p<=firstp)||(np==lastnp&&p>lastp))
+ continue;
+ if(np!=firstnp||p!=firstp+1)
+ sleep(pwait);
+ sscanf(argp1,"%s",postname);
+ printf("\n%hu: m%s: ",p,postname);
+
+ sprintf(postpath,"%s%s",POST_PATH,postname);
+ sprintf(argp1 ,"postfile=%s",POSTDATA_PATH);
+ sprintf(argp2,"cookiefile=%s",COOKIE_PATH);
+ sprintf(argp3,"tempfile=%s",TEMPFILE_PATH);
+ sprintf(argp4,"name=%s",name);
+ sprintf(argp5,"pass=%s",pass);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_POST,"-v",argp1,"-v",argp2,"-v",argp3,postpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ switch(r)
+ {
+ case POST_MSTD:
+ end(POST_MSTD);
+ break;
+ case OK:
+ printf("Ok.");
+ cwfile=fopen(LASTTIME_PATH,"wt");
+ if(cwfile==NULL)
+ {
+ printf("\nCAN'T SAVE PROGRESS: NP%lu P%hu",np,p);
+ end(STOP_MSTD);
+ }
+ fprintf(cwfile,"%lu\n%hu\n",np,p);
+ fclose(cwfile);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MV_PATH,MV_PATH,postpath,OK_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ break;
+ case INDELIVERABLE:
+ default:
+ sleep(pwait);
+ printf("send a PM: ");
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_PM,"-v",argp1,"-v",argp2,"-v",argp3,"-v",argp4,"-v",argp5,postpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ switch(r)
+ {
+ case POST_MSTD:
+ end(POST_MSTD);
+ break;
+ case OK:
+ printf("Ok.");
+ cwfile=fopen(LASTTIME_PATH,"wt");
+ if(cwfile==NULL)
+ {
+ printf("\nCAN'T SAVE PROGRESS: NP%lu P%hu",np,p);
+ end(STOP_MSTD);
+ }
+ fprintf(cwfile,"%lu\n%hu\n",np,p);
+ fclose(cwfile);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MV_PATH,MV_PATH,postpath,PM_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ break;
+ case INDELIVERABLE:
+ default:
+ printf("Indeliverable.");
+ cwfile=fopen(LASTTIME_PATH,"wt");
+ if(cwfile==NULL)
+ {
+ printf("\nCAN'T SAVE PROGRESS: NP%lu P%hu",np,p);
+ end(STOP_MSTD);
+ }
+ fprintf(cwfile,"%lu\n%hu\n",np,p);
+ fclose(cwfile);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(MV_PATH,MV_PATH,postpath,FAIL_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ break;
+ }
+ break;
+ }
+
+ }
+ listopen=false;
+ fclose(listfile);
+ if(np<lastnp)
+ {
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",listpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ }
+ }
+
+ cwfile=fopen(LAST_PATH,"rt");
+ if(cwfile!=NULL)
+ {
+ if(fgets(argp1,255,cwfile)!=NULL)
+ {
+ sscanf(argp1,"%lu",&np);
+ if(fgets(argp1,255,cwfile)!=NULL)
+ {
+ sscanf(argp1,"%hu",&p);
+ fclose(cwfile);
+ if(np==lastnp&&p==lastp)
+ {
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",LAST_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",LASTTIME_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",listpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",IND_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ printf("\nEverything posted");
+ end(OK);
+ }
+ }
+ else
+ fclose(cwfile);
+ }
+ else
+ fclose(cwfile);
+ }
+ printf("\nNew posts appeared, left for next time.");
+ end(OK);
+}
+
+void end(int m)
+{
+ switch(m)
+ {
+ case NAME_MSTD:
+ printf("\nName and password fail.\n");
+ break;
+ case STOP_MSTD:
+ printf("\nFULL STOPFULL STOP\n");
+ break;
+ case POST_MSTD:
+ printf("\nMustard.\n");
+ break;
+ case NOPOSTS:
+ printf("\nNo posts.\n");
+ break;
+
+ case OK:
+ printf("\nOK\n");
+ break;
+ default:
+ printf("\nCh*rping m*stard!\n");
+ }
+ if(logopen)
+ fclose(stdout);
+ if(listopen)
+ fclose(listfile);
+ if(m != STOP_MSTD)
+ {
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",COOKIE_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",POSTDATA_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",TEMPFILE_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ lockf(fileno(stopfile),F_ULOCK,0);
+ fclose(stopfile);
+
+ sub=fork();
+ if(!sub)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",STOP_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ }
+ exit(m);
+}
\ No newline at end of file
--- /dev/null
+BEGIN {
+ a=1;
+};
+{
+ if (posts== "")
+ {
+ for(i=1;i<=NF;i++)
+ {
+ if(tolower($i) ~ /posts/)
+ posts=$(i-1)
+ }
+ }
+ else if (tolower($0) ~ /page/)
+ {
+ gsub(/<[^>]*>/," ",$0)
+ for(i=1;i<=NF;i++)
+ {
+ if((tolower($i) ~ /page/) && (tolower($(i+2)) ~ /of/))
+ {
+ print $(i+3) >outfile
+ print posts >> outfile
+ a=0;
+ exit a;
+ }
+ }
+ }
+};
+END {
+ exit a
+}
--- /dev/null
+###POSTLIST_PATH
+
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ unsigned long to_find;
+ unsigned long postnumber;
+ unsigned long pagenumber=0;
+ unsigned long pagenumber2;
+ char path[256];
+ char text[256];
+ FILE *file;
+
+ if (argc<2)
+ {
+ printf("0\n");
+ return 0;
+ }
+ sscanf(argv[1],"%lu",&to_find);
+
+ for(short i=31;i>=0;--i)
+ {
+ pagenumber2 = pagenumber + (1L << i);
+ sprintf(path,"%s%lu",POSTLIST_PATH,pagenumber2);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ continue;
+ fgets(text,255,file);
+ fclose(file);
+ sscanf(text,"%lu",&postnumber);
+ if(postnumber==to_find)
+ {
+ printf("%lu\n",pagenumber2);
+ return pagenumber2;
+ }
+ else if(postnumber<to_find)
+ pagenumber=pagenumber2;
+ }
+ if(pagenumber==0)
+ {
+ printf("0\n");
+ return 0;
+ }
+ sprintf(path,"%s%lu",POSTLIST_PATH,pagenumber);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ {
+ printf("0\n");
+ return 0;
+ }
+ while(fgets(text,255,file)!=NULL )
+ {
+ sscanf(text,"%lu",&postnumber);
+ if(postnumber==to_find)
+ {
+ fclose(file);
+ printf("%lu\n",pagenumber);
+ return pagenumber;
+ }
+ }
+ fclose(file);
+ sprintf(path,"%s%lu",POSTLIST_PATH,pagenumber-1);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ {
+ printf("0\n");
+ return 0;
+ }
+ while(fgets(text,255,file)!=NULL )
+ {
+ sscanf(text,"%lu",&postnumber);
+ if(postnumber==to_find)
+ {
+ fclose(file);
+ printf("%lu\n",pagenumber-1);
+ return pagenumber-1;
+ }
+ // else if(postnumber>to_find)
+ // {
+ // fclose(file);
+ // printf("0\n");
+ // return 0;
+ // }
+ }
+ printf("0\n");
+ fclose(file);
+ return 0;
+}
\ No newline at end of file
--- /dev/null
+#define NO_IDEA 0
+#define GIF 1
+#define PNG 2
+#define JPG 3
+#define BMP 4
+
+#define MAGIC_BMP "\x42\x4d"
+#define MAGIC_JPG "\xff\xd8\xff"
+#define MAGIC_PNG "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a"
+#define MAGIC_GIF7 "\x47\x49\x46\x38\x37\x61"
+#define MAGIC_GIF9 "\x47\x49\x46\x38\x39\x61"
+
+#include <stdio.h>
+#include <string.h>
+
+int main (int argc, char **argv)
+{
+ FILE *file;
+ char test[9];
+ if (argc<2)
+ return NO_IDEA;
+
+ file=fopen(argv[1],"rb");
+ if(file==NULL)
+ return NO_IDEA;
+
+ fread(test,1,8,file);
+ fclose(file);
+
+ test[8]='\0';
+ if(strcmp(test,MAGIC_PNG)==0)
+ return PNG;
+ test[6]='\0';
+ if(strcmp(test,MAGIC_GIF7)==0)
+ return GIF;
+ if(strcmp(test,MAGIC_GIF9)==0)
+ return GIF;
+ test[3]='\0';
+ if(strcmp(test,MAGIC_JPG)==0)
+ return JPG;
+ test[2]='\0';
+ if(strcmp(test,MAGIC_BMP)==0)
+ return BMP;
+ return NO_IDEA;
+}
\ No newline at end of file
--- /dev/null
+BEGIN{
+ related=1
+#1=no 0=yes
+ where=0
+ printf("%s","") > outfile
+};
+{
+ if((related!=0)&& ($0 ~ /<li class=.row/))
+ {
+ where=1
+ printf("%s","") > outfile
+ }
+
+ if ($0 ~ /t=###threadID;/)
+ {
+ related=0
+ }
+
+ if(where==1)
+ {
+ print $0 >> outfile
+ }
+
+ if($0 ~ /<\/li>/)
+ {
+ where=0
+ close(outfile)
+ }
+};
+END{
+ exit related
+}
\ No newline at end of file
--- /dev/null
+ // The One True Thread mirror
+ // display the index
+// ~~ bicyclesonthemoon
+
+#include <cgi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+###RM_PATH
+###CAT_PATH
+
+###TOP_PATH
+###OTTFRONT_PATH
+###MFRONT_PATH
+###END_PATH
+
+int main()
+{
+ s_cgi *cgi;
+ pid_t sub;
+ int r;
+ cgi=cgiInit();
+
+ printf("Content-type: text/html\n\n");
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(CAT_PATH,CAT_PATH,TOP_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<html><body><div><div><br/>Ch*rpin* M*stard<br/>");
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(CAT_PATH,CAT_PATH,OTTFRONT_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<li class=\"row bg1\" ><dl>Ch*rpin* M*stard</dl></li>");
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(CAT_PATH,CAT_PATH,MFRONT_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(CAT_PATH,CAT_PATH,END_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<br>Ch*rpin* M*stard<br/></div></div></body></html>");
+ return 0;
+}
--- /dev/null
+BEGIN{
+ printf("%s","") > outfile
+};
+{
+ for (i=1;i<=NF;++i)
+ {
+ if ($i ~ /^id=\"p[0-9]/)
+ #"#
+ {
+ split($i, arr, "\"p?")
+ print arr[2] >> outfile
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+CC=g++
+CF=-g -Wall
+LF1=-lcgi
+AI=mawk -f
+
+
+
+all: bot2 bot3 findpost image view mview index update post enable
+
+bot2: bot2.cpp bot2.awk findlatest.awk list.awk upload.awk index.awk makefile
+ $(CC) $(CF) -o bot2 bot2.cpp
+
+bot3: bot3.cpp post.awk pm.awk makefile
+ $(CC) $(CF) -o bot3 bot3.cpp
+
+findpost: findpost.cpp makefile
+ $(CC) $(CF) -o findpost findpost.cpp
+
+image: image.cpp makefile
+ $(CC) $(CF) -o image image.cpp
+
+view: view.cpp view.awk makefile
+ $(CC) $(CF) -o view view.cpp $(LF1)
+
+mview: mview.cpp view.awk mview.awk makefile
+ $(CC) $(CF) -o mview mview.cpp $(LF1)
+
+update: update.cpp bot2 makefile
+ $(CC) $(CF) -o update update.cpp $(LF1)
+
+index: index.cpp makefile
+ $(CC) $(CF) -o index index.cpp $(LF1)
+
+post: post.cpp preview.awk view.awk makefile
+ $(CC) $(CF) -o post post.cpp $(LF1)
+
+enable: post update view mview
+ chmod u+s post update view mview
+
+
+
+bot2.cpp: bot2.1.cpp re.awk makefile
+ $(AI) re.awk bot2.1.cpp > bot2.cpp
+
+bot3.cpp: bot3.1.cpp re.awk makefile
+ $(AI) re.awk bot3.1.cpp > bot3.cpp
+
+findpost.cpp: findpost.1.cpp re.awk makefile
+ $(AI) re.awk findpost.1.cpp > findpost.cpp
+
+index.cpp: index.1.cpp re.awk makefile
+ $(AI) re.awk index.1.cpp > index.cpp
+
+mview.cpp: mview.1.cpp re.awk makefile
+ $(AI) re.awk mview.1.cpp > mview.cpp
+
+post.cpp: post.1.cpp re.awk makefile
+ $(AI) re.awk post.1.cpp > post.cpp
+
+update.cpp: update.1.cpp re.awk makefile
+ $(AI) re.awk update.1.cpp > update.cpp
+
+view.cpp: view.1.cpp re.awk makefile
+ $(AI) re.awk view.1.cpp > view.cpp
+
+bot2.awk: bot2.1.awk re.awk makefile
+ $(AI) re.awk bot2.1.awk > bot2.awk
+
+index.awk: index.1.awk re.awk makefile
+ $(AI) re.awk index.1.awk > index.awk
+
+pm.awk: pm.1.awk re.awk makefile
+ $(AI) re.awk pm.1.awk > pm.awk
+
+post.awk: post.1.awk re.awk makefile
+ $(AI) re.awk post.1.awk > post.awk
+
+preview.awk: preview.1.awk re.awk makefile
+ $(AI) re.awk preview.1.awk > preview.awk
--- /dev/null
+ // The One True Thread mirror
+ // Send a newpage.
+// ~~ bicyclesonthemoon
+
+#include <cgi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+###RM_PATH
+###CAT_PATH
+###MAWK_PATH
+
+###NP_TOP_PATH
+###NP_END_PATH
+###INFO_PATH
+###POST_PATH3
+###POSTLIST_PATH3
+###LAST_PATH3
+
+###AWK_VIEW
+###AWK_MVIEW
+###TEMP_PATH3v
+
+unsigned long p2np(unsigned long p)
+{
+ FILE *file;
+ char path[256];
+ char text[256];
+ unsigned long np=0;
+ unsigned long np2;
+ unsigned long pp;
+
+ for(short i=31;i>=0;--i)
+ {
+ np2 = np + (1L << i);
+ sprintf(path,"%s%lu",POSTLIST_PATH,np2);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ continue;
+ fgets(text,255,file);
+ fclose(file);
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np2;
+ else if(pp<p)
+ np=np2;
+ }
+ if(np==0)
+ return 1L;
+ sprintf(path,"%s%lu",POSTLIST_PATH,np);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ return 1L;
+ while(fgets(text,255,file)!=NULL)
+ {
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np;
+ }
+ fclose(file);
+ --np;
+ sprintf(path,"%s%lu",POSTLIST_PATH,np);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ return 1L;
+ while(fgets(text,255,file)!=NULL)
+ {
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np;
+ }
+ return 1L;
+}
+int main()
+{
+ s_cgi *cgi;
+ pid_t sub;
+ int r;
+
+ char *arg;
+ char path[256];
+ char bg[16];
+ char page[16];
+ char path2[256];
+ char left[256];
+ char right[256];
+ char links[256];
+ FILE *file;
+ unsigned long np=1L;
+ unsigned long start=0L;
+ unsigned long p=0L;
+ unsigned long last=0xffffffff;
+ unsigned long ps=0xffffffff;
+
+ cgi=cgiInit();
+
+ printf("Content-type: text/html\n\n");
+ file = fopen(LAST_PATH,"rt");
+ if(file!=NULL)
+ {
+ fscanf(file,"%lu",&last);
+ fscanf(file,"%lu",&ps);
+ fclose(file);
+ ps=(last-1)*40+ps;
+ }
+ else
+ {
+ sprintf(path,"info=<p>There are no posts in this Otherthread.<br /><br /><a href=\"/ott/\">Return to the ŠÆOŠÆŠÆIM TTO</a></p>");
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",path,INFO_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<HTML><body>%s</body></html>",path);
+ return 0;
+ }
+
+ arg=cgiGetValue(cgi,"np");
+ if(arg!=NULL)
+ sscanf(arg,"%lu",&np);
+ else
+ {
+ arg=cgiGetValue(cgi,"start");
+ if(arg!=NULL)
+ {
+ sscanf(arg,"%lu",&start);
+ np=start/40L+1L;
+ }
+ else
+ {
+ arg=cgiGetValue(cgi,"p");
+ if(arg!=NULL)
+ {
+ sscanf(arg,"%lu",&p);
+ np=p2np(p);//not really
+ }
+ else
+ np=1L;
+ }
+ }
+ if(np>last)
+ np=last;
+ if(np<last)
+ sprintf(right,"right=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+ else
+ sprintf(right,"%s","right=<!-- -->");
+ if(np>1)
+ sprintf(left,"left=<a href=\\\"/ott/mview?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+ else
+ sprintf(left,"%s","left=<!-- -->");
+
+ sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+ sprintf(links,"links=%s",path2);
+ file=fopen(path2,"wt");
+ if(file!=NULL)
+ {
+ fprintf(file,"<div class=\"pagination\" >\n");
+ fprintf(file,"%lu posts\n",ps);
+ fprintf(file,"• <a href=\"#\" onclick=\"jumpto(); return false;\" title=\"Click to jump to pageā¦\" >");
+ fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a> • <span>",np,last);
+ if(np>1)
+ {
+ fprintf(file,"<a href=\"/ott/mview?np=1\" >1</a>");
+ fprintf(file,(np>6)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
+ }
+ for(unsigned long i=((np>6)?((np<last)?(np-3):(np-4)):2);i<np;++i)
+ fprintf(file,"<a href=\"/ott/mview?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+ fprintf(file,"<strong>%lu</strong>",np);
+ for(unsigned long i=np+1;i<=((np+6<=last)?((np==1)?(np+4):(np+3)):(last-1));++i)
+ fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/mview?np=%lu\" >%lu</a>",i,i);
+ if(np<last)
+ {
+ fprintf(file,(np+6<=last)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
+ fprintf(file,"<a href=\"/ott/mview?np=%lu\" >%lu</a>",last,last);
+ }
+ fprintf(file,"</span>\n</div>\n");
+ fclose(file);
+ }
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\"/ott/mview?np=1\" >Mustardtime Otherthread</a></h2>",NP_TOP_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard</p>");
+
+ sprintf(path2,"%s%lu",POSTLIST_PATH,np);
+ file=fopen(path2,"rt");
+ if(file!=NULL)
+ {
+ for(unsigned short i=0;fgets(path,255,file)!=NULL;++i)
+ {
+ sscanf(path,"%s",path2);
+ sprintf(path,"%s%s",POST_PATH,path2);
+ sprintf(bg,"bg=%hu",2-(i&1));
+ sprintf(page,"np=%lu",np);
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_MVIEW,"-v",bg,"-v",page,path,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ {
+ printf("<div id=\"m%s\" class=\"post bg%hu\">\n",path2,2-(i&1));
+ printf("<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n");
+ printf("%hu: POST NOT FOUND.\n",i);
+ printf("<span class=\"corners-bottom\"><span></span></span>\n</div></div>\n");
+ printf("<hr class=\"divider\"></hr>\n");
+ }
+ }
+ fclose(file);
+ }
+ else
+ {
+ printf("<div id=\"m%lu\" class=\"post bg2\">\n",np);
+ printf("<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n");
+ printf("PAGE NOT FOUND.\n");
+ printf("<span class=\"corners-bottom\"><span></span></span>\n</div></div>\n");
+ printf("<hr class=\"divider\"></hr>\n");
+ }
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",left,"-v",right,"-v",links,NP_END_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard</p>");
+
+ sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",path2,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard! file not deleted!</p>");
+
+ return 0;
+}
--- /dev/null
+BEGIN{
+ FS="="
+};
+{
+ argtab[$1]=$2
+};
+END{
+ printf("<div id=\"m%s\" class=\"post bg%s\">\n",argtab["timenumber"],bg);
+ printf("<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n");
+ printf("<div class=\"postbody\">\n");
+ printf("<h3><a href=\"#m%s\">%s</a></h3>\n",argtab["timenumber"],argtab["subject_h"])
+ printf("<p class=\"author\"><a href=\"/ott/mview?np=%s&p=%s#m%s\"><img src=\"/ott/prosilver/imageset/icon_post_target.gif\" alt=\"Post\" title=\"Post\" width=\"11\" height=\"9\"></a>by <strong><a href=\"#\">%s</a></strong> Ā» %s </p>\n",np,argtab["timenumber"],argtab["timenumber"],argtab["username_h"],argtab["timetext"])
+ printf("<div class=\"content\">%s</div>\n</div>\n",argtab["HTML"])
+ printf("<dl class=\"postprofile\" id=\"profile%s\"><dt><a href=\"#\">%s</a></dt></dl>\n",argtab["timenumber"],argtab["username_h"])
+ printf("<div class=\"back2top\"><a href=\"#wrap\" class=\"top\" title=\"Top\">Top</a></div>\n<span class=\"corners-bottom\"><span></span></span></div>\n</div>\n")
+ printf("<hr class=\"divider\"></hr>\n")
+}
--- /dev/null
+BEGIN{\r
+ FS="="\r
+###fora\r
+###USERAGENT3a\r
+ prefix1="This%20is%20an%20automaticly%20generated%20message%20from%20the%20%5Burl%3D###own_url_encoded;%5D%D0%AFO%D0%AF%D0%AFIM%20TTO%5B%2Furl%5D.%0AYour%20post%20couldn%27t%20be%20posted.%0AThe%20%5Burl%3D###own_url_encoded;%2Flog%2Fbot3.log%5Dlog%5B%2Furl%5D%20may%20help%20you%20determine%20the%20reasons%20for%20this.%5Bquote%3D%22%5Bcolor%3D%230000FF%5D"\r
+ prefix2="%5B%2Fcolor%5D%22%5D"\r
+ postfix="%5B%2Fquote%5D%5Bright%5D%5Bsize%3D85%5D--%20posted%20by%20###bot3name_encoded;%5B%2Fsize%5D%5B%2Fright%5D"\r
+ OK=0\r
+ MUSTARD=1\r
+ INDELIVERABLE=2\r
+};\r
+{\r
+ argtab[$1]=$2\r
+};\r
+END{\r
+ if(system("wget -q -t 3 --save-cookies=" cookiefile " -U " useragent " -O " tempfile " " fora "/ucp.php?mode=login"))\r
+ {\r
+ print "Pre-login fail."\r
+ exit MUSTARD\r
+ }\r
+ while((getline cookie < cookiefile)>0)\r
+ {\r
+ if(cookie ~ /_sid/)\r
+ {\r
+ split(cookie,arr,"_sid[ \t]*")\r
+ SID=arr[2]\r
+ }\r
+ }\r
+ close(cookiefile)\r
+ print "username=" name "&password=" pass "&sid=" SID "&login=Login" > postfile\r
+ close(postfile)\r
+ if(system("wget -q -t 3 --save-cookies=" cookiefile " --post-file=" postfile " -U " useragent " -O " tempfile " \"" fora "/ucp.php?mode=login\""))\r
+ {\r
+ print "Login fail."\r
+ exit MUSTARD\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if (temp ~ /<div class=.error/)\r
+ {\r
+ print temp\r
+ print "LOGIN IMPOSSIBLE!"\r
+ exit INDELIVERABLE\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ if(system("wget -q -t 3 --load-cookies=" cookiefile " --save-cookies=" cookiefile " -U " useragent " -O " tempfile " \"" fora "/ucp.php?i=pm&mode=compose&action=post&username_list=" argtab["username"] "&add_to=Add\""))\r
+ {\r
+ print "NewPM fail."\r
+ exit MUSTARD\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if(temp ~ /name=.form_token/)\r
+ {\r
+ split(temp,arr,"(value=\")|(\" ?/>)")\r
+ argtab["form_token"]=arr[2]\r
+ }\r
+ if(temp ~ /name=.creation_time/)\r
+ {\r
+ split(temp,arr,"(value=\")|(\" ?/>)")\r
+ argtab["creation_time"]=arr[2]\r
+ }\r
+ if(temp ~ /name=.address_list/)\r
+ {\r
+ split(temp,arr,"(address_list\[u\]\[)|(\]\")")\r
+ argtab["address_list"]=arr[2]\r
+ }\r
+ if (temp ~ /<p class=.error/)\r
+ {\r
+ print temp\r
+ print "NOBODY WITH THAT NAME"\r
+ exit INDELIVERABLE\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ printf ("icon=10")>postfile\r
+ printf ("&subject=Mirrorpost%%20failed")>postfile\r
+ if("&addbbcode20" in argtab)\r
+ printf ("&addbbcode20=%s",argtab["addbbcode20"])>>postfile\r
+ printf ("&message=%s%s%%3A%%20%s%s%s%s",prefix1,argtab["timenumber"],argtab["subject"],prefix2,argtab["message"],postfix)>>postfile\r
+ printf ("&address_list%%5Bu%%5D%%5B%s%%5D=to",argtab["address_list"])>>postfile\r
+ printf ("&post=Submit")>postfile\r
+ if("disable_smilies" in argtab)\r
+ printf ("&disable_smilies=%s",argtab["disable_smilies"])>>postfile\r
+ if("disable_magic_url" in argtab)\r
+ printf ("&disable_magic_url=%s",argtab["disable_magic_url"])>>postfile\r
+ printf ("&creation_time=%s",argtab["creation_time"])>>postfile\r
+ printf ("&form_token=%s",argtab["form_token"])>>postfile\r
+ close(postfile)\r
+ \r
+ if(system("wget -q -t 3 --load-cookies=" cookiefile " --save-cookies=" cookiefile " --post-file=" postfile " -U " useragent " -O " tempfile " \""fora "/ucp.php?i=pm&mode=compose&action=post\""))\r
+ {\r
+ print "Submit fail."\r
+ exit MUSTARD\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if (temp ~ /<p class=.error/)\r
+ {\r
+ print temp\r
+ print "POST IMPOSSIBLE!"\r
+ exit INDELIVERABLE\r
+ }\r
+ if (tolower(temp) ~ /<h2>information/)\r
+ {\r
+ success=1\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ if (success!=1)\r
+ {\r
+ print "Sent back to preview!"\r
+ exit INDELIVERABLE\r
+ }\r
+ \r
+ while((getline cookie < cookiefile)>0)\r
+ {\r
+ if(cookie ~ /_sid/)\r
+ {\r
+ split(cookie,arr,"_sid[ \t]*")\r
+ SID=arr[2]\r
+ break\r
+ }\r
+ }\r
+ close(cookiefile)\r
+ if(system("wget -q -t 3 -U " useragent " -O " cookiefile " \"" fora "/ucp.php?mode=logout&sid=" SID"\""))\r
+ {\r
+ print "Logout fail."\r
+ } \r
+}\r
--- /dev/null
+BEGIN{\r
+ FS="="\r
+###fora\r
+###USERAGENT3a\r
+};\r
+{\r
+ argtab[$1]=$2\r
+};\r
+END{\r
+ if(system("wget -q -t 3 --save-cookies=" cookiefile " -U " useragent " -O " tempfile " " fora "/ucp.php?mode=login"))\r
+ {\r
+ print "Pre-login fail."\r
+ exit 1\r
+ }\r
+ while((getline cookie < cookiefile)>0)\r
+ {\r
+ if(cookie ~ /_sid/)\r
+ {\r
+ split(cookie,arr,"_sid[ \t]*")\r
+ SID=arr[2]\r
+ }\r
+ }\r
+ close(cookiefile)\r
+ print "username=" argtab["username"] "&password=" argtab["password"] "&sid=" SID "&login=Login" > postfile\r
+ close(postfile)\r
+ if(system("wget -q -t 3 --save-cookies=" cookiefile " --post-file=" postfile " -U " useragent " -O " tempfile " \"" fora "/ucp.php?mode=login\""))\r
+ {\r
+ print "Login fail."\r
+ exit 1\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if (temp ~ /<div class=.error/)\r
+ {\r
+ print temp\r
+ print "LOGIN IMPOSSIBLE!"\r
+ exit 2\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ if(system("wget -q -t 3 --load-cookies=" cookiefile " --save-cookies=" cookiefile " -U " useragent " -O " tempfile " \"" fora "/posting.php?mode=reply&f=7&t=101043\""))\r
+ {\r
+ print "Postreply fail."\r
+ exit 1\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if(temp ~ /name=.form_token/)\r
+ {\r
+ split(temp,arr,"(value=\")|(\" ?/>)")\r
+ argtab["form_token"]=arr[2]\r
+ }\r
+ if(temp ~ /name=.creation_time/)\r
+ {\r
+ split(temp,arr,"(value=\")|(\" ?/>)")\r
+ argtab["creation_time"]=arr[2]\r
+ }\r
+ if (tolower(temp) ~ /<h2>information/)\r
+ {\r
+ print "Unexpected h2: information\n"\r
+ getline temp < tempfile\r
+ print temp\r
+ exit 1\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ printf ("subject=%s",argtab["subject"])>postfile\r
+ if("&addbbcode20" in argtab)\r
+ printf ("&addbbcode20=%s",argtab["addbbcode20"])>>postfile\r
+ printf ("&message=%s",argtab["message"])>>postfile\r
+ printf ("&post=%s","Submit")>>postfile\r
+ if("disable_bbcode" in argtab)\r
+ printf ("&disable_bbcode=%s",argtab["disable_bbcode"])>>postfile\r
+ if("disable_smilies" in argtab)\r
+ printf ("&disable_smilies=%s",argtab["disable_smilies"])>>postfile\r
+ if("disable_magic_url" in argtab)\r
+ printf ("&disable_magic_url=%s",argtab["disable_magic_url"])>>postfile\r
+ if("attach_sig" in argtab)\r
+ printf ("&attach_sig=%s",argtab["attach_sig"])>>postfile\r
+ if("notify" in argtab)\r
+ printf ("¬ify=%s",argtab["notify"])>>postfile\r
+ printf ("&creation_time=%s",argtab["creation_time"])>>postfile\r
+ printf ("&form_token=%s",argtab["form_token"])>>postfile\r
+ close(postfile)\r
+ \r
+ if(system("wget -q -t 3 --load-cookies=" cookiefile " --save-cookies=" cookiefile " --post-file=" postfile " -U " useragent " -O " tempfile " \""fora "/posting.php?mode=reply&f=7&t=101043\""))\r
+ {\r
+ print "Submit fail."\r
+ exit 1\r
+ }\r
+ \r
+ while((getline temp < tempfile)>0)\r
+ {\r
+ if (temp ~ /<p class=.error/)\r
+ {\r
+ print temp\r
+ print "POST IMPOSSIBLE!"\r
+ exit 2\r
+ }\r
+ if (tolower(temp) ~ /<h2>information/)\r
+ {\r
+ success=1\r
+ }\r
+ }\r
+ close(tempfile)\r
+ \r
+ if (success!=1)\r
+ {\r
+ print "Sent back to preview!"\r
+ exit INDELIVERABLE\r
+ }\r
+ \r
+ while((getline cookie < cookiefile)>0)\r
+ {\r
+ if(cookie ~ /_sid/)\r
+ {\r
+ split(cookie,arr,"_sid[ \t]*")\r
+ SID=arr[2]\r
+ break\r
+ }\r
+ }\r
+ close(cookiefile)\r
+ if(system("wget -q -t 3 -U " useragent " -O " tempfile " \"" fora "/ucp.php?mode=logout&sid=" SID"\""))\r
+ {\r
+ print "Logout fail."\r
+ }\r
+ \r
+ \r
+}\r
--- /dev/null
+ // The One True Thread mirror
+ // make a post.
+// ~~ bicyclesonthemoon
+
+#include <cgi.h>
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/wait.h>
+
+###RM_PATH
+###MV_PATH
+###CAT_PATH
+###MAWK_PATH
+
+###POST_PATH
+###INFO_PATH
+###MPOST_PATH
+###MLIST_PATH
+###MLAST_PATH
+###MFRONT_PATH
+
+###AWK_PREVIEW
+###AWK_VIEW
+###TEMP_PATHp
+
+s_cgi *cgi;
+pid_t sub;
+int r;
+FILE *tempfile;
+FILE *postfile;
+bool tf=false;
+bool pf=false;
+char temppath[256]="";
+char postpath[256]="";
+
+char zero='\0';
+char *username = &zero;
+char *password = &zero;
+char *subject = &zero;
+char *message = &zero;
+char *addbbcode20 = &zero;
+char *disable_bbcode = &zero;
+char *disable_smilies = &zero;
+char *disable_magic_url = &zero;
+char *attach_sig = &zero;
+char *notify = &zero;
+char *Preview = &zero;
+char *post =&zero;
+char wrong[256];
+
+void submit();
+void preview (const char *text);
+void writeArg(FILE *file,const char *name,const char *value, bool all);
+void writeArg(FILE *file,const char *name,const char *value, char *insert);
+void writeArgH(FILE *file,const char *name,const char *value, bool br);
+void writeArgH(FILE *file,const char *value);
+void end(int m);
+
+void end(int m)
+{
+ if(tf)
+ fclose(tempfile);
+ if(pf)
+ fclose(postfile);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",temppath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(pf)
+ {
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",postpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ }
+ exit(m);
+}
+
+void writeArg(FILE *file,const char *name,const char *value, bool all=false)
+{
+ unsigned short length, i, v;
+ fprintf(file,"%s=",name);
+ for(i=0, length=strlen(value);i<length;++i)
+ {
+ v=((unsigned short)value[i])&0x00ff;
+ if(((value[i]>='0'&&value[i]<='9')||(value[i]>='A'&&value[i]<='Z')||(value[i]>='a'&&value[i]<='z')
+ ||value[i]=='.'||value[i]=='~'||value[i]=='-'||value[i]=='_')&&(!all))
+ fputc(v,file);
+ else
+ fprintf(file,"%%%02X",v);
+ }
+ fputc('\n',file);
+}
+
+void writeArg(FILE *file,const char *name,const char *value, char *insert)
+{
+ unsigned short length, i, v;
+ fprintf(file,"%s=",name);
+ for(i=0, length=strlen(insert);i<length;++i)
+ {
+ v=((unsigned short)insert[i])&0x00ff;
+ if((insert[i]>='0'&&insert[i]<='9')||(insert[i]>='A'&&insert[i]<='Z')||(insert[i]>='a'&&insert[i]<='z')
+ ||insert[i]=='.'||insert[i]=='~'||insert[i]=='-'||insert[i]=='_')
+ fputc(v,file);
+ else
+ fprintf(file,"%%%02X",v);
+ }
+ for(i=0, length=strlen(value);i<length;++i)
+ {
+ v=((unsigned short)value[i])&0x00ff;
+ if((value[i]>='0'&&value[i]<='9')||(value[i]>='A'&&value[i]<='Z')||(value[i]>='a'&&value[i]<='z')
+ ||value[i]=='.'||value[i]=='~'||value[i]=='-'||value[i]=='_')
+ fputc(v,file);
+ else
+ fprintf(file,"%%%02X",v);
+ }
+ fputc('\n',file);
+}
+
+void writeArgH(FILE *file,const char *name,const char *value, bool br=false)
+{
+ unsigned short length, i, v;
+ fprintf(file,"%s=",name);
+ for(i=0, length=strlen(value);i<length;++i)
+ {
+ v=((unsigned short)value[i])&0x00ff;
+ switch (value[i])
+ {
+ case '\n':
+ if(br)
+ fprintf(file,"<br/>");
+ case '\"':
+ case '&':
+ case '<':
+ case '>':
+ case ' ':
+ case '\r':
+ case '=':
+ fprintf(file,"&#%hu;",v);
+ break;
+ default:
+ fputc(v,file);
+ }
+ }
+ fputc('\n',file);
+}
+
+void writeArgH(FILE *file,const char *value)
+{
+ unsigned short length, i, v;
+ for(i=0, length=strlen(value);i<length;++i)
+ {
+ v=((unsigned short)value[i])&0x00ff;
+ switch (value[i])
+ {
+ case '\"':
+ case '&':
+ case '<':
+ case '>':
+ case ' ':
+ case '\r':
+ case '\n':
+ case '=':
+ fprintf(file,"&#%hu;",v);
+ break;
+ default:
+ fputc(v,file);
+ }
+ }
+}
+
+void submit()
+{
+ time_t posttime;
+ char timetext[32];
+ char timenumber[32];
+ char botinfo[256];
+ char arg1[256];
+
+ unsigned long lastpage;
+ unsigned short postslast;
+ char listpath[256];
+
+ posttime=time(NULL);
+ sprintf(timenumber,"%llu",(unsigned long long)posttime);
+
+ strftime(timetext,31,"%a %b %d, %Y %I:%M %p %Z",gmtime(&posttime));
+ sprintf(botinfo,"[size=80][Posted from the Mirror at %s][/size]\r\n",timetext);
+ sprintf(postpath,"%s%s",MPOST_PATH,timenumber);
+
+ tempfile=fopen(temppath,"wt");
+ if(tempfile==NULL)
+ preview("Couldn't create file.");
+ tf=true;
+ writeArgH(tempfile,"timenumber",timenumber);
+ writeArgH(tempfile,"timetext",timetext);
+ writeArgH(tempfile,"HTML",message,true);
+ writeArgH(tempfile,"username_h",username);
+ writeArgH(tempfile,"subject_h",subject);
+ writeArg (tempfile,"username",username);
+ writeArg (tempfile,"password",password,true);
+ writeArg (tempfile,"subject",subject);
+ writeArg (tempfile,"addbbcode20",addbbcode20);
+ writeArg (tempfile,"message",message,botinfo);
+ if(disable_bbcode[0]!='\0')
+ writeArg(tempfile,"disable_bbcode",disable_bbcode);
+ if(disable_smilies[0]!='\0')
+ writeArg(tempfile,"disable_smilies",disable_smilies);
+ if(disable_magic_url[0]!='\0')
+ writeArg(tempfile,"disable_magic_url",disable_magic_url);
+ if(attach_sig[0]!='\0')
+ writeArg(tempfile,"attach_sig",attach_sig);
+ if(notify[0]!='\0')
+ writeArg(tempfile,"notify",notify);
+ fclose(tempfile);
+ tf=false;
+
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MV_PATH,MV_PATH,temppath,postpath,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("Couldn't add post to queue.");
+
+ tempfile=fopen(MLAST_PATH,"rt");
+ if(tempfile==NULL)
+ {
+ lastpage=1;
+ postslast=1;
+ }
+ else
+ {
+ tf=true;
+ if(fgets(listpath,255,tempfile))
+ sscanf(listpath,"%lu",&lastpage);
+ if(fgets(listpath,255,tempfile))
+ sscanf(listpath,"%hu",&postslast);
+ if(postslast>=40)
+ {
+ ++lastpage;
+ postslast=0;
+ }
+ else
+ ++postslast;
+ fclose(tempfile);
+ tf=false;
+ }
+ tempfile=fopen(MLAST_PATH,"wt");
+ if(tempfile==NULL)
+ {
+ pf=true;
+ preview("Couldn't update list.");
+ }
+ fprintf(tempfile,"%lu\n%hu\n%s\n",lastpage,postslast,timenumber);
+ fclose(tempfile);
+
+ sprintf(listpath,"%s%lu",MLIST_PATH,lastpage);
+ tempfile=fopen(listpath,"at");
+ if(tempfile==NULL)
+ {
+ pf=true;
+ preview("Couldn't update list.");
+ }
+ fprintf(tempfile,"%s\n",timenumber);
+
+ tempfile=fopen(MFRONT_PATH,"wt");
+ if(tempfile!=NULL)
+ {
+ fprintf(tempfile,"<li class=\"row bg2\" >\n");
+ fprintf(tempfile,"<dl class=\"icon\" style=\"background-image: url(/ott/prosilver/imageset/topic_mustard.gif); background-repeat: no-repeat;\" >\n");
+ fprintf(tempfile,"<dt title=\"No unread posts\" ><a href=\"/ott/mview\" class=\"topictitle\" >Mustardtime Otherthread</a>\n");
+ fprintf(tempfile,"<br />\nMustardtime posts will be shown here, before they are posted to the OTT.<br />\nIt's not ready yet. Wait for it.\n<br />\n");
+ fprintf(tempfile,"<strong class=\"pagination\" ><span>");
+ if(lastpage>5)
+ fprintf(tempfile,"<a href=\"/ott/mview\" >1</a><span class=\"page-dots\" > ... </span>");
+ for(unsigned long i=((lastpage>5)?(lastpage-2):1);i<lastpage;++i)
+ fprintf(tempfile,"<a href=\"/ott/mview?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+ fprintf(tempfile,"<a href=\"/ott/mview?np=%lu\" >%lu</a>",lastpage,lastpage);
+ fprintf(tempfile,"</span></strong><img src=\"/ott/prosilver/imageset/icon_topic_attach.gif\" width=\"7\" height=\"10\" alt=\"Attachment(s)\" title=\"Attachment(s)\" /> by <a href=\"/bothasar_p/\" >bothasar_p</a> » Sat Apr 05, 2014 9:40 pm UTC</dt>\n");
+ fprintf(tempfile,"<dd class=\"posts\" >%lu <dfn>Replies</dfn></dd>\n",(unsigned long)((lastpage-1)*40+postslast));
+ fprintf(tempfile,"<dd class=\"views\" >NaN <dfn>Views</dfn></dd>\n");
+ fprintf(tempfile,"<dd class=\"lastpost\" ><span><dfn>Last post </dfn>by <a href=\"#\" >");
+ writeArgH(tempfile,username);
+ fprintf(tempfile,"</a>\n<a href=\"/ott/mview?np=%lu&p=%s#m%s\" ><img src=\"/ott/prosilver/imageset/icon_topic_latest.gif\" width=\"11\" height=\"9\" alt=\"View the latest post\" title=\"View the latest post\" /></a> <br />%s</span>\n",lastpage,timenumber,timenumber,timetext);
+ fprintf(tempfile,"</dd>\n</dl>\n</li>\n");
+ }
+ fclose(tempfile);
+ sprintf(arg1,"info=<p>This message has been posted successfully.<br /><br /><a href=\"/ott/mview?np=%lu&p=%s#m%s\">View your submitted message</a><br /><br /><a href=\"/ott/\">Return to the ŠÆOŠÆŠÆIM TTO</a></p>",lastpage,timenumber,timenumber);
+
+ printf("Content-type: text/html\n\n");
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",arg1,INFO_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<HTML><body>%s</body></html>",arg1);
+ end(0);
+}
+void preview (const char *text)
+{
+ char arg1[256];
+ tempfile=fopen(temppath,"wt");
+ if(tempfile==NULL)
+ end(1);
+ tf=true;
+
+ writeArgH(tempfile,"HTML",((strlen(message)>0)?("Sorry, no preview."):("")));
+ writeArgH(tempfile,"wrong",text);
+ writeArgH(tempfile,"username",username);
+ writeArgH(tempfile,"subject",subject);
+ writeArgH(tempfile,"message",message);
+ // writeArgH(tempfile,"addbbcode20",addbbcode20);
+ writeArgH(tempfile,"disable_bbcode",disable_bbcode);
+ writeArgH(tempfile,"disable_smilies",disable_smilies);
+ writeArgH(tempfile,"disable_magic_url",disable_magic_url);
+ writeArgH(tempfile,"attach_sig",attach_sig);
+ writeArgH(tempfile,"notify",notify);
+ // writeArgH(tempfile,"Preview",Preview);
+ // writeArgH(tempfile,"post",post);
+
+ fclose(tempfile);
+ tf=false;
+
+ printf("Content-type: text/html\n\n");
+ sprintf(arg1,"argfile=%s",temppath);
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_PREVIEW,"-v",arg1,POST_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<HTML><body><p>Ch*rpin* M*stard</p></body></html>");
+ end(0);
+}
+
+int main()
+{
+ bool missing=false;
+
+
+ char *arg;
+
+ cgi=cgiInit();
+
+ sprintf(temppath,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+
+ arg=cgiGetValue(cgi,"password");
+ if(arg!=NULL)
+ password=arg;
+ else
+ {
+ missing=true;
+ strcpy(wrong,"Password is missing.");
+ }
+
+ arg=cgiGetValue(cgi,"username");
+ if(arg!=NULL)
+ username=arg;
+ else
+ {
+ missing=true;
+ strcpy(wrong,"Username is missing.");
+ }
+
+ arg=cgiGetValue(cgi,"subject");
+ if(arg!=NULL)
+ subject=arg;
+ else
+ {
+ missing=true;
+ strcpy(wrong,"Subject was missing. Replaced with default value.");
+ }
+
+ arg=cgiGetValue(cgi,"message");
+ if(arg!=NULL)
+ message=arg;
+ else
+ {
+ missing=true;
+ strcpy(wrong,"Post is empty.");
+ }
+
+ arg=cgiGetValue(cgi,"addbbcode20");
+ if(arg!=NULL)
+ addbbcode20=arg;
+
+ arg=cgiGetValue(cgi,"disable_bbcode");
+ if(arg!=NULL)
+ disable_bbcode=arg;
+
+ arg=cgiGetValue(cgi,"disable_smilies");
+ if(arg!=NULL)
+ disable_smilies=arg;
+
+ arg=cgiGetValue(cgi,"disable_magic_url");
+ if(arg!=NULL)
+ disable_magic_url=arg;
+
+ arg=cgiGetValue(cgi,"attach_sig");
+ if(arg!=NULL)
+ attach_sig=arg;
+
+ arg=cgiGetValue(cgi,"notify");
+ if(arg!=NULL)
+ notify=arg;
+
+ arg=cgiGetValue(cgi,"Preview");
+ if(arg!=NULL)
+ Preview=arg;
+
+ arg=cgiGetValue(cgi,"post");
+ if(arg!=NULL)
+ post=arg;
+
+ if(strcmp(post,"Submit")==0)
+ {
+ if(missing)
+ preview(wrong);
+ else
+ submit();
+ }
+ else
+ preview("");
+
+ return 0;
+
+}
--- /dev/null
+BEGIN{\r
+ HTML="<div class=\"post bg2\" id=\"preview\">\n<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n<div class=\"postbody\">\n<h3>Preview: %s</h3><div class=\"content\">%s</div></div><span class=\"corners-bottom\"><span></span></span></div></div>\n"\r
+ wrong="<p class=\"error\">%s</p>\n"\r
+ subject="<dd><input type=\"text\" name=\"subject\" id=\"subject\" size=\"45\" maxlength=\"64\" tabindex=\"1\" value=\"%s\" class=\"inputbox autowidth\" /></dd>\n"\r
+ username="<dd><input tabindex=\"2\" name=\"username\" id=\"username\" size=\"45\" value=\"%s\" class=\"inputbox autowidth\" type=\"text\"></dd>\n"\r
+ message="<textarea name=\"message\" id=\"message\" rows=\"15\" cols=\"76\" tabindex=\"4\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\" onfocus=\"initInsertions();\" class=\"inputbox\" >%s</textarea>\n"\r
+ disable_bbcode="<div><label for=\"disable_bbcode\"><input type=\"checkbox\" name=\"disable_bbcode\" id=\"disable_bbcode\" %s /> Disable BBCode</label></div>\n"\r
+ disable_smilies="<div><label for=\"disable_smilies\"><input type=\"checkbox\" name=\"disable_smilies\" id=\"disable_smilies\" %s /> Disable smilies</label></div>\n"\r
+ disable_magic_url="<div><label for=\"disable_magic_url\"><input type=\"checkbox\" name=\"disable_magic_url\" id=\"disable_magic_url\" %s /> Do not automatically parse URLs</label></div>\n"\r
+ attach_sig="<div><label for=\"attach_sig\"><input type=\"checkbox\" name=\"attach_sig\" id=\"attach_sig\" %s /> Attach a signature (signatures can be altered via the UCP)</label></div>\n"\r
+ notify="<div><label for=\"notify\"><input type=\"checkbox\" name=\"notify\" id=\"notify\" %s /> Notify me when a reply is posted</label></div>\n"\r
+ \r
+ print "<!--\nargfile=" argfile\r
+ while((getline argline < argfile)>0)\r
+ {\r
+ split(argline, arr, "=")\r
+ argtab[arr[1]]=arr[2]\r
+ print arr[1] "=" argtab[arr[1]]\r
+ }\r
+ print "-->"\r
+ close(argfile)\r
+};\r
+{\r
+ if ($0 ~ /^###HTML/)\r
+ {\r
+ if((argtab["HTML"]!="")&&(argtab["wrong"]==""))\r
+ printf(HTML,argtab["subject"],argtab["HTML"])\r
+ }\r
+ else if ($0 ~ /^###wrong/)\r
+ {\r
+ if(argtab["wrong"]!="")\r
+ printf(wrong,argtab["wrong"])\r
+ }\r
+ else if ($0 ~ /^###subject/)\r
+ printf(subject,((argtab["subject"]=="")?"###default_subject;":argtab["subject"]))\r
+ else if ($0 ~ /^###username/)\r
+ printf(username,argtab["username"])\r
+ else if ($0 ~ /^###message/)\r
+ printf(message,argtab["message"])\r
+ else if ($0 ~ /^###disable_bbcode/)\r
+ printf(disable_bbcode,(argtab["disable_bbcode"]=="on")?"checked=\"checked\"":"")\r
+ else if ($0 ~ /^###disable_smilies/)\r
+ printf(disable_smilies,(argtab["disable_smilies"]=="on")?"checked=\"checked\"":"")\r
+ else if ($0 ~ /^###disable_magic_url/)\r
+ printf(disable_magic_url,(argtab["disable_magic_url"]=="on")?"checked=\"checked\"":"")\r
+ else if ($0 ~ /^###attach_sig/)\r
+ printf(attach_sig,(argtab["attach_sig"]=="on")?"checked=\"checked\"":"")\r
+ else if ($0 ~ /^###notify/)\r
+ printf(notify,(argtab["notify"]=="on")?"checked=\"checked\"":"")\r
+ else\r
+ print $0\r
+};
\ No newline at end of file
--- /dev/null
+BEGIN{
+#set your paths here
+#and remember about doubleescaping!
+
+
+ tmppath= "/eizm/tmp/ottmirror"
+ propath= "/eizm/pro/ottmirror"
+ mempath= "/eizm/mem/ottmirror"
+ logpath= "/eizm/log/ottmirror"
+ mirrpath= "/eizm/www/time/ott"
+
+ wgetpath= "/usr/bin/wget"
+ mawkpath= "/usr/bin/mawk"
+ mvpath= "/bin/mv"
+ rmpath= "/bin/rm"
+ catpath= "/bin/cat"
+
+ useragent2="bothasar_t (http://1190.bicyclesonthemoon.dnsd.info/ott/; Time thread mirror bot)"
+ useragent3="bothasar_p (http://1190.bicyclesonthemoon.dnsd.info/ott/; Time thread post bot)"
+
+ ictaddr= "http://forums.xkcd.com/viewforum.php?f=7"
+ ottaddr= "http://forums.xkcd.com/viewtopic.php?f=7&t=101043&start="
+ foraaddr= "http://forums.xkcd.com"
+ waybaddr= "http://web.archive.org/web/"
+
+ threadID= "101043"
+ links_regexp= "href=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/viewtopic\\.php"
+ prosilver_regexp= "((url.\\.)|(((href)|(src))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/styles\\/prosilver"
+ prosilver_regexp2="((\\.)|(http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/styles\\/prosilver"
+ smiley_regexp= "((url.\\.)|(((href)|(src))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/images\\/smilies"
+ smiley_regexp2= "((\\.)|(http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)))\\/images\\/smilies"
+ avatar_regexp= "((src)|(href))=.http:\\/\\/((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/download\\/file.php\\?avatar="
+ attachment_regexp="((src)|(href))=.http:\\/\\/(www\\.)?((for(ums3?|a)\\.xkcd\\.com)|echochamber\\.me)\\/download\\/file.php\\?(mode=view\\&)?id="
+ own_image_regexp= "(1190.bicyclesonthemoon.dnsd.info)|(1190-botm.dnsdynamic.com)\\/ott\\/image\\/"
+ own_url_encoded= "http%3A%2F%2F1190.bicyclesonthemoon.dnsd.info%2Fott"
+ bot3name_encoded= "bothasar_p"
+ default_subject= "Re: 1190: \\"Time\\""
+
+
+ #don't touch anything below this line
+
+ USERAGENT2="#define USERAGENT \"" useragent2 "\""
+ USERAGENT3="#define USERAGENT \"" useragent3 "\""
+ USERAGENT2a="\tuseragent=\"\\\""useragent2 "\\\"\""
+ USERAGENT3a="\tuseragent=\"\\\""useragent3 "\\\"\""
+ ICT_ADDRESS="#define ICT_ADDRESS \"" ictaddr "\""
+ OTT_ADDRESS="#define OTT_ADDRESS \"" ottaddr "\""
+ FORA_ADDRESS="#define FORA_ADDRESS \"" foraaddr "\""
+ wayback ="\twayback=\"" waybaddr "\""
+ fora ="\tfora=\"" foraaddr "\""
+
+ WGET_PATH="#define WGET_PATH \"" wgetpath "\""
+ MAWK_PATH="#define MAWK_PATH \"" mawkpath "\""
+ RM_PATH="#define RM_PATH \"" rmpath "\""
+ MV_PATH="#define MV_PATH \"" mvpath "\""
+ CAT_PATH="#define CAT_PATH \"" catpath "\""
+
+ LAST_PATH="#define LAST_PATH \"" mempath "/lasttime.\""
+ NAME_PATH="#define NAME_PATH \"" mempath "/name\""
+ LASTTIME_PATH="#define LASTTIME_PATH \"" mempath "/bot3last\""
+ POST_PATH3="#define POST_PATH \"" mempath "/mpost/\""
+ LIST_PATH3="#define LIST_PATH \"" mempath "/mlist/\""
+ LAST_PATH3="#define LAST_PATH \"" mempath "/mlist/last\""
+ OK_PATH3="#define OK_PATH \"" mempath "/mpost/ok/\""
+ PM_PATH3="#define PM_PATH \"" mempath "/mpost/pm/\""
+ FAIL_PATH3="#define FAIL_PATH \"" mempath "/mpost/fail/\""
+ POSTLIST_PATH3="#define POSTLIST_PATH \"" mempath "/mlist/\""
+ MPOST_PATH="#define MPOST_PATH \"" mempath "/mpost/\""
+ MLIST_PATH="#define MLIST_PATH \"" mempath "/mlist/\""
+ MLAST_PATH="#define MLAST_PATH \"" mempath "/mlist/last\""
+ MSTD_LAST_PATH="#define MSTD_LAST_PATH \"" mempath "/mlist/last\""
+
+ LOG_PATH="#define LOG_PATH \"" logpath "/bot2.log.\""
+ LOG_PATH3="#define LOG_PATH \"" logpath "/bot3.log\""
+
+ NP_PATH="#define NP_PATH \"" tmppath "/np.p0.\""
+ NP_PATH_1="#define NP_PATH_1 \"" tmppath "/np.p1.\""
+ NP_PATH_2="#define NP_PATH_2 \"" tmppath "/np.p2.\""
+ NP_PATH_3="#define NP_PATH_3 \"" tmppath "/np.p3.\""
+ STOP_PATH="#define STOP_PATH \"" tmppath "/fullstop.\""
+ TEMPFILE_PATH="#define TEMPFILE_PATH \"" tmppath "/bot3temp\""
+ POSTDATA_PATH="#define POSTDATA_PATH \"" tmppath "/bot3post\""
+ COOKIE_PATH="#define COOKIE_PATH \"" tmppath "/bot3cook\""
+ STOP_PATH3="#define STOP_PATH \"" tmppath "/bot3stop\""
+ TEMP_PATH3v="#define TEMP_PATH \"" tmppath "/mview.\""
+ TEMP_PATHp="#define TEMP_PATH \"" tmppath "/preview.\""
+ TEMP_PATHv="#define TEMP_PATH \"" tmppath "/view.\""
+
+ LIST_PATH="#define LIST_PATH \"" mirrpath "/postlist/\""
+ SIG_PATH="#define SIG_PATH \"" mirrpath "/sig/\""
+ INF_PATH="#define INF_PATH \"" mirrpath "/otterinf/\""
+ UP_PATH="#define UP_PATH \"" mirrpath "/np/\""
+ IND_PATH="#define IND_PATH \"" mirrpath "/ottfront\""
+ TOP_PATH="#define TOP_PATH \"" mirrpath "/top\""
+ END_PATH="#define END_PATH \"" mirrpath "/end\""
+ AV_PATH="#define AV_PATH \"" mirrpath "/avatar/\""
+ ATT_PATH="#define ATT_PATH \"" mirrpath "/attachment/\""
+ IMG_PATH="#define IMG_PATH \"" mirrpath "/image/\""
+ LAST_PAGE="#define LAST_PAGE \"" mirrpath "/np/last\""
+ IND_PATH3="#define IND_PATH \"" mirrpath "/mfront\""
+ POSTLIST_PATH="#define POSTLIST_PATH \"" mirrpath "/postlist/\""
+ OTTFRONT_PATH="#define OTTFRONT_PATH \"" mirrpath "/ottfront\""
+ MFRONT_PATH="#define MFRONT_PATH \"" mirrpath "/mfront\""
+ NP_TOP_PATH="#define NP_TOP_PATH \"" mirrpath "/np/top\""
+ NP_END_PATH="#define NP_END_PATH \"" mirrpath "/np/end\""
+ INFO_PATH="#define INFO_PATH \"" mirrpath "/info.htm\""
+ POST_PATH="#define POST_PATH \"" mirrpath "/post.htm\""
+ NP_LAST_PATH="#define NP_LAST_PATH \"" mirrpath "/np/last\""
+ SIG_PATHe="#define SIG_PATH \"sig=" mirrpath "/sig/\""
+ INF_PATHe="#define INF_PATH \"otterinf=" mirrpath "/otterinf/\""
+
+ AWK_LATEST="#define AWK_LATEST \"" propath "/findlatest.awk\""
+ AWK_LIST="#define AWK_LIST \"" propath "/list.awk\""
+ AWK_BOT2="#define AWK_BOT2 \"" propath "/bot2.awk\""
+ AWK_UPLOAD="#define AWK_UPLOAD \"" propath "/upload.awk\""
+ AWK_INDEX="#define AWK_INDEX \"" propath "/index.awk\""
+ AWK_POST="#define AWK_POST \"" propath "/post.awk\""
+ AWK_PM="#define AWK_PM \"" propath "/pm.awk\""
+ AWK_VIEW="#define AWK_VIEW \"" propath "/view.awk\""
+ AWK_MVIEW="#define AWK_MVIEW \"" propath "/mview.awk\""
+ AWK_PREVIEW="#define AWK_PREVIEW \"" propath "/preview.awk\""
+ BOT_PATH="#define BOT_PATH \"" propath "/bot2\""
+ findpost_path="\tfindpost_path=\"" propath "/findpost\""
+ imgformat_path="\timgformat_path=\"" propath "/image\""
+
+};
+{
+ gsub(/\r/,"",$0)
+ if($1 ~ /^###USERAGENT2$/)
+ {
+ print USERAGENT2
+ next;
+ }
+ if($1 ~ /^###USERAGENT3$/)
+ {
+ print USERAGENT3
+ next
+ }
+ if($1 ~ /^###USERAGENT2$/)
+ {
+ print USERAGENT2
+ next;
+ }
+ if($1 ~ /^###ICT_ADDRESS$/)
+ {
+ print ICT_ADDRESS
+ next
+ }
+ if($1 ~ /^###OTT_ADDRESS$/)
+ {
+ print OTT_ADDRESS
+ next
+ }
+ if($1 ~ /^###FORA_ADDRESS$/)
+ {
+ print FORA_ADDRESS
+ next
+ }
+ if($1 ~ /^###USERAGENT2a$/)
+ {
+ print USERAGENT2a
+ next;
+ }
+ if($1 ~ /^###USERAGENT3a$/)
+ {
+ print USERAGENT3a
+ next;
+ }
+ if($1 ~ /^###wayback$/)
+ {
+ print wayback
+ next;
+ }
+ if($1 ~ /^###fora$/)
+ {
+ print fora
+ next;
+ }
+
+
+
+ if($1 ~ /^###WGET_PATH$/)
+ {
+ print WGET_PATH
+ next
+ }
+ if($1 ~ /^###MAWK_PATH$/)
+ {
+ print MAWK_PATH
+ next
+ }
+ if($1 ~ /^###RM_PATH$/)
+ {
+ print RM_PATH
+ next
+ }
+ if($1 ~ /^###MV_PATH$/)
+ {
+ print MV_PATH
+ next
+ }
+ if($1 ~ /^###CAT_PATH$/)
+ {
+ print CAT_PATH
+ next
+ }
+
+
+
+ if($1 ~ /^###LAST_PATH$/)
+ {
+ print LAST_PATH
+ next
+ }
+ if($1 ~ /^###NAME_PATH$/)
+ {
+ print NAME_PATH
+ next
+ }
+ if($1 ~ /^###LASTTIME_PATH$/)
+ {
+ print LASTTIME_PATH
+ next
+ }
+ if($1 ~ /^###POST_PATH3$/)
+ {
+ print POST_PATH3
+ next
+ }
+ if($1 ~ /^###LIST_PATH3$/)
+ {
+ print LIST_PATH3
+ next
+ }
+ if($1 ~ /^###LAST_PATH3$/)
+ {
+ print LAST_PATH3
+ next
+ }
+ if($1 ~ /^###OK_PATH3$/)
+ {
+ print OK_PATH3
+ next
+ }
+ if($1 ~ /^###PM_PATH3$/)
+ {
+ print PM_PATH3
+ next
+ }
+ if($1 ~ /^###FAIL_PATH3$/)
+ {
+ print FAIL_PATH3
+ next
+ }
+ if($1 ~ /^###POSTLIST_PATH3$/)
+ {
+ print POSTLIST_PATH3
+ next
+ }
+ if($1 ~ /^###MPOST_PATH$/)
+ {
+ print MPOST_PATH
+ next
+ }
+ if($1 ~ /^###MLIST_PATH$/)
+ {
+ print MLIST_PATH
+ next
+ }
+ if($1 ~ /^###MLAST_PATH$/)
+ {
+ print MLAST_PATH
+ next
+ }
+ if($1 ~ /^###MSTD_LAST_PATH$/)
+ {
+ print MSTD_LAST_PATH
+ next
+ }
+
+
+
+ if($1 ~ /^###LOG_PATH$/)
+ {
+ print LOG_PATH
+ next
+ }
+ if($1 ~ /^###LOG_PATH3$/)
+ {
+ print LOG_PATH3
+ next
+ }
+
+
+
+ if($1 ~ /^###NP_PATH$/)
+ {
+ print NP_PATH
+ next
+ }
+ if($1 ~ /^###NP_PATH_1$/)
+ {
+ print NP_PATH_1
+ next
+ }
+ if($1 ~ /^###NP_PATH_2$/)
+ {
+ print NP_PATH_2
+ next
+ }
+ if($1 ~ /^###NP_PATH_3$/)
+ {
+ print NP_PATH_3
+ next
+ }
+ if($1 ~ /^###STOP_PATH$/)
+ {
+ print STOP_PATH
+ next
+ }
+ if($1 ~ /^###TEMPFILE_PATH$/)
+ {
+ print TEMPFILE_PATH
+ next
+ }
+ if($1 ~ /^###POSTDATA_PATH$/)
+ {
+ print POSTDATA_PATH
+ next
+ }
+ if($1 ~ /^###COOKIE_PATH$/)
+ {
+ print COOKIE_PATH
+ next
+ }
+ if($1 ~ /^###STOP_PATH3$/)
+ {
+ print STOP_PATH3
+ next
+ }
+ if($1 ~ /^###TEMP_PATH3v$/)
+ {
+ print TEMP_PATH3v
+ next
+ }
+ if($1 ~ /^###TEMP_PATHp$/)
+ {
+ print TEMP_PATHp
+ next
+ }
+ if($1 ~ /^###TEMP_PATHv$/)
+ {
+ print TEMP_PATHv
+ next
+ }
+
+
+
+ if($1 ~ /^###LIST_PATH$/)
+ {
+ print LIST_PATH
+ next
+ }
+ if($1 ~ /^###SIG_PATH$/)
+ {
+ print SIG_PATH
+ next
+ }
+ if($1 ~ /^###INF_PATH$/)
+ {
+ print INF_PATH
+ next
+ }
+ if($1 ~ /^###UP_PATH$/)
+ {
+ print UP_PATH
+ next
+ }
+ if($1 ~ /^###IND_PATH$/)
+ {
+ print IND_PATH
+ next
+ }
+ if($1 ~ /^###TOP_PATH$/)
+ {
+ print TOP_PATH
+ next
+ }
+ if($1 ~ /^###END_PATH$/)
+ {
+ print END_PATH
+ next
+ }
+ if($1 ~ /^###AV_PATH$/)
+ {
+ print AV_PATH
+ next
+ }
+ if($1 ~ /^###ATT_PATH$/)
+ {
+ print ATT_PATH
+ next
+ }
+ if($1 ~ /^###IMG_PATH$/)
+ {
+ print IMG_PATH
+ next
+ }
+ if($1 ~ /^###LAST_PAGE$/)
+ {
+ print LAST_PAGE
+ next
+ }
+ if($1 ~ /^###IND_PATH3$/)
+ {
+ print IND_PATH3
+ next
+ }
+ if($1 ~ /^###POSTLIST_PATH$/)
+ {
+ print POSTLIST_PATH
+ next
+ }
+ if($1 ~ /^###OTTFRONT_PATH$/)
+ {
+ print OTTFRONT_PATH
+ next
+ }
+ if($1 ~ /^###MFRONT_PATH$/)
+ {
+ print MFRONT_PATH
+ next
+ }
+ if($1 ~ /^###NP_TOP_PATH$/)
+ {
+ print NP_TOP_PATH
+ next
+ }
+ if($1 ~ /^###NP_END_PATH$/)
+ {
+ print NP_END_PATH
+ next
+ }
+ if($1 ~ /^###INFO_PATH$/)
+ {
+ print INFO_PATH
+ next
+ }
+ if($1 ~ /^###POST_PATH$/)
+ {
+ print POST_PATH
+ next
+ }
+ if($1 ~ /^###NP_LAST_PATH$/)
+ {
+ print NP_LAST_PATH
+ next
+ }
+ if($1 ~ /^###SIG_PATHe$/)
+ {
+ print SIG_PATHe
+ next
+ }
+ if($1 ~ /^###INF_PATHe$/)
+ {
+ print INF_PATHe
+ next
+ }
+
+
+
+ if($1 ~ /^###AWK_LATEST$/)
+ {
+ print AWK_LATEST
+ next
+ }
+ if($1 ~ /^###AWK_LIST$/)
+ {
+ print AWK_LIST
+ next
+ }
+ if($1 ~ /^###AWK_BOT2$/)
+ {
+ print AWK_BOT2
+ next
+ }
+ if($1 ~ /^###AWK_UPLOAD$/)
+ {
+ print AWK_UPLOAD
+ next
+ }
+ if($1 ~ /^###AWK_INDEX$/)
+ {
+ print AWK_INDEX
+ next
+ }
+ if($1 ~ /^###AWK_POST$/)
+ {
+ print AWK_POST
+ next
+ }
+ if($1 ~ /^###AWK_PM$/)
+ {
+ print AWK_PM
+ next
+ }
+ if($1 ~ /^###AWK_VIEW$/)
+ {
+ print AWK_VIEW
+ next
+ }
+ if($1 ~ /^###AWK_MVIEW$/)
+ {
+ print AWK_MVIEW
+ next
+ }
+ if($1 ~ /^###AWK_PREVIEW$/)
+ {
+ print AWK_PREVIEW
+ next
+ }
+ if($1 ~ /^###BOT_PATH$/)
+ {
+ print BOT_PATH
+ next
+ }
+ if($1 ~ /^###findpost_path$/)
+ {
+ print findpost_path
+ next
+ }
+ if($1 ~ /^###imgformat_path$/)
+ {
+ print imgformat_path
+ next
+ }
+
+ if($0 ~ /###[^#;]*;/)
+ {
+ gsub(/###threadID;/,threadID,$0)
+ gsub(/###links_regexp;/,links_regexp,$0)
+ gsub(/###prosilver_regexp;/,prosilver_regexp,$0)
+ gsub(/###prosilver_regexp2;/,prosilver_regexp2,$0)
+ gsub(/###smiley_regexp;/,smiley_regexp,$0)
+ gsub(/###smiley_regexp2;/,smiley_regexp2,$0)
+ gsub(/###avatar_regexp;/,avatar_regexp,$0)
+ gsub(/###attachment_regexp;/,attachment_regexp,$0)
+ gsub(/###own_image_regexp;/,own_image_regexp,$0)
+ gsub(/###foraaddr;/,foraaddr,$0)
+ gsub(/###own_url_encoded;/,own_url_encoded,$0)
+ gsub(/###bot3name_encoded;/,bot3name_encoded,$0)
+ gsub(/###default_subject;/,default_subject,$0)
+
+ }
+
+ print $0
+};
\ No newline at end of file
--- /dev/null
+ // The One True Thread mirror
+ // Update a newpage.
+// ~~ bicyclesonthemoon
+
+#include <cgi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+###BOT_PATH
+#define UPDATE_PATH "/ott/update.htm"
+
+int main()
+{
+ s_cgi *cgi;
+ pid_t sub;
+ int r;
+
+ char *arg;
+
+ cgi=cgiInit();
+ arg=cgiGetValue(cgi,"np");
+ if(arg!=NULL)
+ {
+ printf("Content-type: text\n\n");
+ fflush(stdout);
+ dup2(fileno(stdout),fileno(stderr));
+ sub=fork();
+ if(sub==0)
+ {
+ printf("%s\n",BOT_PATH);
+ r=execl(BOT_PATH,BOT_PATH,"-i","4","-s",arg,"-m","1","-w","15","-v","15","-d","-a","-b","-t",(char *)0);
+ printf("AAA\n");
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ printf("%x\n",r);
+ }
+ else
+ {
+ cgiRedirect(UPDATE_PATH);
+ }
+ return 0;
+}
--- /dev/null
+BEGIN{\r
+#parametrse:\r
+#outfile\r
+#otterinf/\r
+#sig/\r
+ sig2=""\r
+ otterinf2=""\r
+# print(outfile " " sig " " otterinf)\r
+ printf("%s","") > outfile\r
+ where=0\r
+#0 - nphead\r
+#1 - content\r
+#2 - c(post)\r
+#3 - c(postcontent)\r
+#4 - c(sig)\r
+#5 - c(info)\r
+#6 - END\r
+\r
+};\r
+{\r
+ if((where==6) && ($0 == "</div>"))\r
+ {\r
+ exit\r
+ }\r
+ \r
+ if(($0 ~ /<div class=.pagination./)&&(where==1))\r
+ {\r
+ where=6\r
+ }\r
+ \r
+ if(($0 ~ /<div class=.pagination./)&&(where==0))\r
+ {\r
+ where=1\r
+ }\r
+ \r
+ if($0 ~ /<div id=.p[0-9]/)\r
+ {\r
+ where=2\r
+ }\r
+ \r
+ if((where==2) && ($0 ~ /<p class=.author./))\r
+ {\r
+ for (i=1;i<=NF;++i)\r
+ {\r
+ if ($i ~ /viewprofile.*u=/)\r
+ {\r
+ split($i, arr,"u=|\"")\r
+ for(j=1;j in arr;++j)\r
+ {\r
+ if (arr[j] ~ /^[0-9]*$/)\r
+ {\r
+ uid=arr[j]\r
+ sig2=(sig uid)\r
+ otterinf2=(otterinf uid)\r
+ break\r
+ }\r
+ }\r
+ \r
+ break\r
+ }\r
+ }\r
+ }\r
+ \r
+ if(($0 ~ /<div class=.content./)&&(where=2))\r
+ {\r
+ where=3\r
+ }\r
+ \r
+ if($0 ~ /<div id=.sig[0-9]/)\r
+ {\r
+ where=4\r
+ print ("###sig&" uid) >> outfile \r
+ printf ("%s","") > sig2\r
+ }\r
+ \r
+ if($0 ~ /<dl class=.postprofile/)\r
+ {\r
+ where=5\r
+ print ("###inf&" uid) >> outfile\r
+ printf ("%s","") > otterinf2\r
+ }\r
+ \r
+ if($0 ~ /<hr class=.divider/)\r
+ {\r
+ where=1\r
+ close(sig2)\r
+ close(otterinf2)\r
+ }\r
+ \r
+ if((where==2)||(where==3)||($0 ~ /<hr class=.divider/))\r
+ {\r
+ print $0 >> outfile\r
+ }\r
+ \r
+ if(where==4)\r
+ {\r
+ print $0 >> sig2\r
+ }\r
+ \r
+ if(where==5)\r
+ {\r
+ print $0 >> otterinf2\r
+ }\r
+};
\ No newline at end of file
--- /dev/null
+ // The One True Thread mirror
+ // Send a newpage.
+// ~~ bicyclesonthemoon
+
+#include <cgi.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#define RM_PATH "/bin/rm"
+#define CAT_PATH "/bin/cat"
+#define MAWK_PATH "/usr/bin/mawk"
+
+###NP_TOP_PATH
+###NP_END_PATH
+###UP_PATH
+###POSTLIST_PATH
+###SIG_PATHe
+###INF_PATHe
+###NP_LAST_PATH
+###MSTD_LAST_PATH
+
+###AWK_VIEW
+###TEMP_PATHv
+
+unsigned long p2np(unsigned long p)
+{
+ FILE *file;
+ char path[256];
+ char text[256];
+ unsigned long np=0;
+ unsigned long np2;
+ unsigned long pp;
+
+ for(short i=31;i>=0;--i)
+ {
+ np2 = np + (1L << i);
+ sprintf(path,"%s%lu",POSTLIST_PATH,np2);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ continue;
+ fgets(text,255,file);
+ fclose(file);
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np2;
+ else if(pp<p)
+ np=np2;
+ }
+ if(np==0)
+ return 1L;
+ sprintf(path,"%s%lu",POSTLIST_PATH,np);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ return 1L;
+ while(fgets(text,255,file)!=NULL)
+ {
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np;
+ }
+ fclose(file);
+ --np;
+ sprintf(path,"%s%lu",POSTLIST_PATH,np);
+ file=fopen(path,"rt");
+ if(file==NULL)
+ return 1L;
+ while(fgets(text,255,file)!=NULL)
+ {
+ sscanf(text,"%lu",&pp);
+ if(pp==p)
+ return np;
+ }
+ return 1L;
+}
+int main()
+{
+ s_cgi *cgi;
+ pid_t sub;
+ int r;
+
+ char *arg;
+ char path[256];
+ char path2[256];
+ char left[256];
+ char right[256];
+ char links[256];
+ FILE *file;
+ unsigned long np=1L;
+ unsigned long start=0L;
+ unsigned long p=0L;
+ unsigned long last=0xffffffff;
+ unsigned long ps=0xffffffff;
+ bool mustard=false;
+
+ cgi=cgiInit();
+
+ file = fopen(MSTD_LAST_PATH,"rt");
+ if(file!=NULL)
+ {
+ mustard=true;
+ fclose(file);
+ }
+
+ file = fopen(NP_LAST_PATH,"rt");
+ if(file!=NULL)
+ {
+ fscanf(file,"%lu",&last);
+ fscanf(file,"%lu",&ps);
+ fclose(file);
+ }
+
+ printf("Content-type: text/html\n\n");
+
+ arg=cgiGetValue(cgi,"np");
+ if(arg!=NULL)
+ sscanf(arg,"%lu",&np);
+ else
+ {
+ arg=cgiGetValue(cgi,"start");
+ if(arg!=NULL)
+ {
+ sscanf(arg,"%lu",&start);
+ np=start/40L+1L;
+ }
+ else
+ {
+ arg=cgiGetValue(cgi,"p");
+ if(arg!=NULL)
+ {
+ sscanf(arg,"%lu",&p);
+ np=p2np(p);//not really
+ }
+ else
+ np=1L;
+ }
+ }
+ if(np>last)
+ np=last;
+ if(np<last)
+ sprintf(right,"right=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"right-box right\\\" >Next</a>",np+1);
+ else
+ sprintf(right,"%s",mustard?"right=<a href=\\\"/ott/mview\\\" class=\\\"right-box right\\\" >Mustardtime Otherthread</a>":"right=<!-- -->");
+ if(np>1)
+ sprintf(left,"left=<a href=\\\"/ott/view?np=%lu\\\" class=\\\"left-box left\\\" >Previous</a>",np-1);
+ else
+ sprintf(left,"%s","left=<!-- -->");
+
+ sprintf(path2,"%s%lu",TEMP_PATH,(unsigned long)getpid());
+ sprintf(links,"links=%s",path2);
+ file=fopen(path2,"wt");
+ if(file!=NULL)
+ {
+ fprintf(file,"<div class=\"pagination\" >\n");
+ fprintf(file,"%lu posts\n",ps);
+ fprintf(file,"• <a href=\"#\" onclick=\"jumpto(); return false;\" title=\"Click to jump to pageā¦\" >");
+ fprintf(file,"Page <strong>%lu</strong> of <strong>%lu</strong></a> • <span>",np,last);
+ if(np>1)
+ {
+ fprintf(file,"<a href=\"/ott/view?np=1\" >1</a>");
+ fprintf(file,(np>6)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
+ }
+ for(unsigned long i=((np>6)?((np<last)?(np-3):(np-4)):2);i<np;++i)
+ fprintf(file,"<a href=\"/ott/view?np=%lu\" >%lu</a><span class=\"page-sep\" >, </span>",i,i);
+ fprintf(file,"<strong>%lu</strong>",np);
+ for(unsigned long i=np+1;i<=((np+6<=last)?((np==1)?(np+4):(np+3)):(last-1));++i)
+ fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/view?np=%lu\" >%lu</a>",i,i);
+ if(np<last)
+ {
+ fprintf(file,(np+6<=last)?"<span class=\"page-dots\" > ... </span>":"<span class=\"page-sep\" >, </span>");
+ fprintf(file,"<a href=\"/ott/view?np=%lu\" >%lu</a>",last,last);
+ }
+ if(mustard)
+ {
+ fprintf(file,"<span class=\"page-sep\" >, </span><a href=\"/ott/mview\" ><img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"Mustardtime\" /> <img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"Otherthread\" /> <img src=\"/ott/prosilver/imageset/mustard_smaller.gif\" alt=\"\" /></a>");
+ }
+ fprintf(file,"</span>\n</div>\n");
+ fclose(file);
+ }
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",SIG_PATH,"-v",INF_PATH,"-v",left,"-v",right,"-v",links,"-v","title=<h2><a href=\"/ott/view?np=1\" >1190: "Time"</a></h2>",NP_TOP_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard</p>");
+
+ sprintf(path,"%s%lu",UP_PATH,np);
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",SIG_PATH,"-v",INF_PATH,"-v",left,"-v",right,"-v",links,path,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ {
+ printf("<div id=\"m%lu\" class=\"post bg2\">\n",np);
+ printf("<div class=\"inner\"><span class=\"corners-top\"><span></span></span>\n");
+ printf("PAGE NOT FOUND.\n");
+ printf("<span class=\"corners-bottom\"><span></span></span>\n</div></div>\n");
+ printf("<hr class=\"divider\"></hr>\n");
+ }
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_VIEW,"-v",SIG_PATH,"-v",INF_PATH,"-v",left,"-v",right,"-v",links,NP_END_PATH,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard</p>");
+
+ fflush(stdout);
+ sub=fork();
+ if(sub==0)
+ {
+ r=execl(RM_PATH,RM_PATH,"-f",path2,(char *)0);
+ exit(r);
+ }
+ waitpid(sub,&r,0);
+ if(r)
+ printf("<p>Ch*rpin* M*stard! file not deleted!</p>");
+
+ return 0;
+}
--- /dev/null
+{
+ if ($0 ~ /^###sig&/)
+ {
+ split ($0 ,arr,"&")
+ system("cat " sig arr[2])
+ }
+ else if ($0 ~ /^###inf&/)
+ {
+ split ($0 ,arr,"&")
+ system("cat " otterinf arr[2])
+ }
+ else if ($0 ~ /^###prev/)
+ {
+ print left
+ }
+ else if ($0 ~ /^###next/)
+ {
+ print right
+ }
+ else if ($0 ~ /^###links/)
+ {
+ system ("cat " links);
+ }
+ else if ($0 ~ /^###info/)
+ {
+ print info;
+ }
+ else if ($0 ~ /^###title/)
+ {
+ print title;
+ }
+ else
+ {
+ print $0
+ }
+};