/wiki/index.php |
---|
1,14 → 1,64 |
<?php |
require '../_taios.php'; |
$page = new Taios_Page('Wiki', '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
write('<br /><p class="bold">This page is currently under construction.</p>'); |
$page->drawFooter(); |
?> |
<?php |
function endswith($string, $test) { |
$strlen = strlen($string); |
$testlen = strlen($test); |
if ($testlen > $strlen) return false; |
return substr_compare($string, $test, -$testlen) === 0; |
} |
require '../_taios.php'; |
$pageName = $_GET['page']; |
if (empty($pageName)) |
{ |
$pageName = 'Index'; |
} |
$page = new Taios_Page('Wiki - ' . $pageName, '../'); |
if (isset($_GET['random'])) |
{ |
$results = array(); |
$handler = opendir('pages/'); |
while ($file = readdir($handler)) |
{ |
if ($file != '.' && $file != '..' && endswith($file, ".txt")) |
{ |
$results[] = substr($file, 0, count($file) - 5); |
} |
} |
$index = rand() % count($results); |
$result = $results[$index]; |
$page->redirect('index.php?page=' . $result); |
} |
$page->drawHeader(); |
write('<h3>Wiki</h3>'); |
$page->drawMenuItem('Index', 'wiki/index.php'); |
$page->drawMenuItem('Random Page', 'wiki/index.php?random'); |
$page->drawMiddle(); |
if ($page->isUserGM($page->getLoggedInUser())) |
{ |
write('<p class="bold"><a href="edit.php?page=' . $pageName . '">Edit Page</a></p><br />'); |
} |
$filename = 'pages/' . $pageName . '.txt'; |
$fp = @fopen($filename, 'r'); |
if ($fp) |
{ |
write('<p>' . $page->replaceBBCode(fread($fp, filesize($filename))) . '</p>'); |
fclose($fp); |
} |
else |
{ |
write('<p>This page is empty.</p>'); |
} |
$page->drawFooter(); |
?> |
/wiki/edit-do.php |
---|
0,0 → 1,40 |
<?php |
require '../_taios.php'; |
$pageName = $_POST['page']; |
if (empty($pageName)) |
{ |
$pageName = 'Index'; |
} |
$page = new Taios_Page('Edit Page - ' . $pageName, '../'); |
$page->checkLoggedIn(); |
if ($page->isUserGM($page->getLoggedInUser())) |
{ |
$filename = 'pages/' . $pageName . '.txt'; |
$fp = @fopen($filename, 'w'); |
if ($fp) |
{ |
fwrite($fp, $_POST['content']); |
fclose($fp); |
$page->redirect('index.php?page=' . $pageName); |
} |
else |
{ |
$page->drawError('Failed to write file.'); |
} |
} |
else |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
$page->drawFooter(); |
?> |
/wiki/edit.php |
---|
0,0 → 1,54 |
<?php |
require '../_taios.php'; |
$pageName = $_GET['page']; |
if (empty($pageName)) |
{ |
$pageName = 'Index'; |
} |
$page = new Taios_Page('Edit Page - ' . $pageName, '../'); |
$page->drawHeader(); |
$page->drawMiddle(); |
$page->checkLoggedIn(); |
if ($page->isUserGM($page->getLoggedInUser())) |
{ |
$filename = 'pages/' . $pageName . '.txt'; |
$content = ""; |
$fp = @fopen($filename, 'r'); |
if ($fp) |
{ |
$content = fread($fp, filesize($filename)); |
fclose($fp); |
} |
?> |
<form action="edit-do.php" method="POST"> |
<input type="hidden" name="page" value="<?php echo $pageName; ?>" /> |
<table> |
<tr> |
<td><textarea name="content"><?php echo $content; ?></textarea></td> |
</tr> |
<tr> |
<td><input type="submit" value="Edit" /></td> |
</tr> |
</table> |
</form> |
<?php |
} |
else |
{ |
$page->drawError('You do not have permission to access this page.'); |
} |
$page->drawFooter(); |
?> |
/wiki/pages/Index.txt |
---|
0,0 → 1,4 |
[b]Welcome to the Tim32 Wiki![/b] |
Here you can talk about pretty much anything! |
Property changes: |
Added: svn:executable |
## -0,0 +1 ## |
+* |
\ No newline at end of property |
Index: styles.css |
=================================================================== |
--- styles.css (revision 119) |
+++ styles.css (revision 432) |
@@ -1,124 +1,181 @@ |
-body { |
- background-color: #FFFFFF; |
- color: #000000; |
- |
- font-family: Droid Sans, Tahoma, sans-serif; |
- font-size: 11pt; |
-} |
- |
-h1 { |
- font-size: 28pt; |
- margin: 6px; |
- margin-top: 0px; |
- color: #000089; |
- border-bottom: 1px solid #000000; |
-} |
- |
-h2 { |
- font-size: 20pt; |
- margin: 6px; |
- margin-left: 8px; |
- color: #00004B; |
-} |
- |
-h3 { |
- font-size: 16pt; |
- margin: 6px; |
- margin-left: 10px; |
- color: #000055; |
-} |
- |
-h4 { |
- font-size: 12pt; |
- margin: 6px; |
- margin-left: 12px; |
- color: #00005F; |
-} |
- |
-h5 { |
- font-size: 10pt; |
- margin: 6px; |
- margin-left: 14px; |
- color: #000069; |
-} |
- |
-p, table, span { |
- font-size: 11pt; |
- margin: 6px; |
- margin-left: 16px; |
-} |
- |
-a { |
- text-decoration: none; |
- color: #000050; |
-} |
- |
-a:hover { |
- text-decoration: underline; |
-} |
- |
-input { |
- border: 1px solid #000000; |
- color: #000000; |
- background-color: #B5D7FF; |
-} |
- |
-table { |
- border: 1px solid #222222; |
-} |
- |
-td { |
- padding: 3px; |
- border: 1px solid #888888; |
-} |
- |
-.sidebar { |
- left: 0px; |
- top: 0px; |
- position: fixed; |
- padding: 0px; |
- padding-left: 32px; |
- border-right: 1px solid #000089; |
- background-color: #FFFF73; |
- background-image: url('data/sidebar-gradient.png'); |
- background-repeat: repeat-x; |
- background-position: center bottom; |
- |
-} |
- |
-.sidebar-header { |
- left: 0px; |
- width: 140px; |
- padding: 6px; |
- text-align: right; |
-} |
- |
-.sidebar-menu { |
- text-align: right; |
- padding: 6px; |
-} |
- |
-.sidebar-menu h3 { |
- margin: 6px; |
-} |
- |
-.sidebar-menu p { |
- font-size: 12pt; |
- margin: 4px; |
-} |
- |
-.content { |
- left: 200px; |
- top: 0px; |
- position: absolute; |
- margin-right: 32px; |
-} |
- |
-.bold { |
- font-weight: bold; |
-} |
- |
-.indent { |
- margin-left: 14px; |
- border-left: 1px solid #BBBBBB; |
-} |
+body { |
+ background-color: #FFFFFF; |
+ color: #000000; |
+ |
+ font-family: Droid Sans, Tahoma, sans-serif; |
+ font-size: 10pt; |
+ |
+ margin: 0px; |
+ padding: 0px; |
+} |
+ |
+h1 { |
+ font-size: 28pt; |
+ margin: 8px; |
+ margin-top: 0px; |
+ color: #FFFFFF; |
+ border-bottom: 1px solid #FFFFFF; |
+} |
+ |
+h2 { |
+ font-size: 20pt; |
+ margin: 8px; |
+ margin-left: 8px; |
+ color: #00004B; |
+} |
+ |
+h3 { |
+ font-size: 16pt; |
+ margin: 8px; |
+ margin-left: 10px; |
+ color: #000055; |
+} |
+ |
+h4 { |
+ font-size: 12pt; |
+ margin: 8px; |
+ margin-left: 12px; |
+ color: #00005F; |
+} |
+ |
+h5 { |
+ font-size: 10pt; |
+ margin: 8px; |
+ margin-left: 14px; |
+ color: #000069; |
+} |
+ |
+p, table, span { |
+ font-size: 10pt; |
+ margin: 8px; |
+ margin-left: 16px; |
+} |
+ |
+a { |
+ text-decoration: none; |
+ color: #000050; |
+} |
+ |
+a:hover { |
+ text-decoration: underline; |
+} |
+ |
+input { |
+ border: 1px solid #000000; |
+ color: #000000; |
+ background-color: #B5D7FF; |
+ width: 500px; |
+} |
+ |
+table { |
+ border: 1px solid #222222; |
+} |
+ |
+td { |
+ padding: 3px; |
+ border: 1px solid #888888; |
+} |
+ |
+img { |
+ border: 2px solid #333333; |
+} |
+ |
+textarea { |
+ width: 500px; |
+ height: 300px; |
+} |
+ |
+.smiley { |
+ border: 0px; |
+ vertical-align: middle; |
+} |
+ |
+.sidebar { |
+ float: left; |
+ width: 156px; |
+ padding: 0px; |
+ padding-left: 32px; |
+ border-right: 0px solid #000089; |
+ background-color: #032865; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-header { |
+ width: 140px; |
+ padding: 6px; |
+ text-align: right; |
+} |
+ |
+.sidebar-menu { |
+ text-align: right; |
+ padding: 6px; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-menu h3 { |
+ margin: 6px; |
+ color: #FFFFFF; |
+} |
+ |
+.sidebar-menu p { |
+ font-size: 12pt; |
+ margin: 4px; |
+} |
+ |
+.sidebar-menu a { |
+ color: #FFFFFF; |
+} |
+ |
+.content { |
+ top: 0px; |
+ left: 190px; |
+ position: absolute; |
+ margin-right: 32px; |
+} |
+ |
+.bold { |
+ font-weight: bold; |
+} |
+ |
+.italic { |
+ font-style: italic; |
+} |
+ |
+.indent { |
+ margin-left: 14px; |
+ border-left: 1px solid #BBBBBB; |
+} |
+ |
+.code { |
+ border-top: 2px solid #999999; |
+ border-bottom: 2px solid #999999; |
+ margin: 14px; |
+ background-color: #DDDDDD; |
+ font-family: Droid Sans Mono, Monospace, Fixed; |
+ font-size: 9px; |
+ line-height: 80%; |
+} |
+ |
+.copyright { |
+ color: #BBBBBB; |
+ text-align: left; |
+ font-size: 9pt; |
+} |
+ |
+.copyright a { |
+ color: #BBBBBB; |
+} |
+ |
+.recaptchatable .recaptcha_image_cell, #recaptcha_table { |
+ background-color: #4B9DE0 !important; //reCaptcha widget background color |
+} |
+ |
+#recaptcha_table { |
+ border-color: #3874A4 !important; //reCaptcha widget border color |
+} |
+ |
+#recaptcha_response_field { |
+ border-color: #000000 !important; //Text input field border color |
+ background-color:#FFFFFF !important; //Text input field background color |
+} |
+ |
Index: index.php |
=================================================================== |
--- index.php (revision 119) |
+++ index.php (revision 432) |
@@ -1,39 +1,42 @@ |
- |
- |
-require '_taios.php'; |
- |
-$page = new Taios_Page('Home'); |
-$page->drawHeader(); |
-write('Pages'); |
-$page->drawMenuItem('Biggles', '/~biggles/'); |
-$page->drawMenuItem('Freddie', '/~freddie/'); |
-$page->drawMenuItem('Muzer', '/~muzer/'); |
-$page->drawMenuItem('Sh4rk', '/~szabot/'); |
-$page->drawMenuItem('Tom', '/~tom/'); |
-$page->drawMiddle(); |
- |
-?> |
- |
- Welcome to Tim32! |
- Tim32 is a 10 year-old laptop running Ubuntu Server Edition 10.04. |
- |
- |
-Latest Blog Posts |
- |
- |
- |
-$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1'); |
-for ($i = 0; $i < 5 && $i < count($ids); $i++) |
-{ |
- $id = $ids[$i]; |
- $post = $page->getBlogPost($id); |
- |
- write('' . $post->title. ''); |
- write('Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')'); |
- write(' ' . $post->content . ' '); |
- write(' '); |
-} |
- |
-$page->drawFooter(); |
- |
-?> |
+ |
+ |
+require '_taios.php'; |
+ |
+$page = new Taios_Page('Home'); |
+$page->drawHeader(); |
+write('Pages'); |
+$page->drawMenuItem('Biggles', '/~biggles/'); |
+$page->drawMenuItem('Freddie (FredFace)', '/~freddie/'); |
+$page->drawMenuItem('Muzer', '/~muzer/'); |
+$page->drawMenuItem('Sh4rk', '/~szabot/'); |
+$page->drawMenuItem('Tom (TomMan)', '/~tom/'); |
+write('Downtime-o-meter'); |
+write(' No planned down. '); |
+$page->drawMiddle(); |
+ |
+?> |
+ |
+ Welcome to Tim32! |
+ Tim32 is a 10 year-old laptop running Ubuntu Server Edition 10.04. |
+ |
+ |
+Latest Blog Posts |
+ |
+ |
+ |
+ |
+$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1 ORDER BY DatePosted DESC'); |
+for ($i = 0; $i < 4 && $i < count($ids); $i++) |
+{ |
+ $id = $ids[$i]; |
+ $post = $page->getBlogPost($id); |
+ |
+ write('' . $post->title. ''); |
+ write('Posted On ' . date('l j F Y', $post->datePosted) . ' by ' . $post->user->name . ' (' . $post->user->username . ')'); |
+ write(' ' . $page->replaceBBCode($post->content) . ' '); |
+ write(' '); |
+} |
+ |
+$page->drawFooter(); |
+ |
+?> |
Index: _taios.php |
=================================================================== |
--- _taios.php (revision 119) |
+++ _taios.php (revision 432) |
@@ -88,6 +88,7 @@ |
{ |
if (!$this->drawnFooter) |
{ |
+ write(' © 2011 Tim32 · HTML5 Valid '); |
write(''); |
write(' |
');