aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/admin/admin_functions.php151
-rw-r--r--modules/admin/blocks/functions.php173
-rw-r--r--modules/admin/blocks/index.php59
-rw-r--r--modules/admin/images/addnewarticle.pngbin0 -> 6420 bytes
-rw-r--r--modules/admin/images/addnewpage.pngbin0 -> 7511 bytes
-rw-r--r--modules/admin/images/announcement.pngbin0 -> 9409 bytes
-rw-r--r--modules/admin/images/calendar.pngbin0 -> 10174 bytes
-rw-r--r--modules/admin/images/editfiles.pngbin0 -> 7336 bytes
-rw-r--r--modules/admin/images/editpage.pngbin0 -> 7775 bytes
-rw-r--r--modules/admin/images/file_doc.pngbin0 -> 6993 bytes
-rw-r--r--modules/admin/images/file_pdf.pngbin0 -> 7336 bytes
-rw-r--r--modules/admin/images/file_rtf.pngbin0 -> 6958 bytes
-rw-r--r--modules/admin/images/file_word.pngbin0 -> 9196 bytes
-rw-r--r--modules/admin/images/photogallery.pngbin0 -> 9687 bytes
-rw-r--r--modules/admin/index.php73
-rw-r--r--modules/admin/operation.php53
-rw-r--r--modules/admin/pages/functions.php230
-rw-r--r--modules/admin/pages/index.php68
-rw-r--r--modules/gallery/dynamitelax/100_2867.JPGbin0 -> 151469 bytes
-rw-r--r--modules/gallery/dynamitelax/100_2889.JPGbin0 -> 127396 bytes
-rw-r--r--modules/gallery/dynamitelax/100_2901.JPGbin0 -> 162137 bytes
-rw-r--r--modules/gallery/dynamitelax/100_3042.JPGbin0 -> 167177 bytes
-rw-r--r--modules/gallery/dynamitelax/100_3047.JPGbin0 -> 197658 bytes
-rw-r--r--modules/gallery/dynamitelax/100_3050.JPGbin0 -> 216410 bytes
-rw-r--r--modules/gallery/dynamitelax/100_3051.JPGbin0 -> 120926 bytes
-rw-r--r--modules/gallery/dynamitelax/100_3883.jpgbin0 -> 254283 bytes
-rw-r--r--modules/gallery/index.php0
-rw-r--r--modules/gallery/testphotos/dlogo.pngbin0 -> 64089 bytes
-rw-r--r--modules/gallery/testphotos/logo.pngbin0 -> 30041 bytes
-rw-r--r--modules/gallery/testphotos/player.jpgbin0 -> 68566 bytes
-rw-r--r--modules/gallery/testphotos/team.jpgbin0 -> 1201503 bytes
-rw-r--r--modules/index/index.php36
-rw-r--r--modules/news/categories/3rdIDnews.pngbin0 -> 50631 bytes
-rw-r--r--modules/news/categories/marnemessenger.pngbin0 -> 20793 bytes
-rw-r--r--modules/news/functions.php260
-rw-r--r--modules/news/images/avatar.pngbin0 -> 6617 bytes
-rw-r--r--modules/news/images/comment_arrow.pngbin0 -> 264 bytes
-rw-r--r--modules/news/index.php44
-rw-r--r--modules/news/style.css234
-rw-r--r--modules/newsreel/images/slidenavbg.pngbin0 -> 3152 bytes
-rw-r--r--modules/newsreel/images/slidenavbg2.pngbin0 -> 2898 bytes
-rw-r--r--modules/newsreel/images/slidenavbg3.pngbin0 -> 2885 bytes
-rw-r--r--modules/newsreel/index.php113
-rw-r--r--modules/newsreel/slides/arma2move.pngbin0 -> 409510 bytes
-rw-r--r--modules/newsreel/slides/newsite.pngbin0 -> 251196 bytes
-rw-r--r--modules/newsreel/slides/recruitmentGT.pngbin0 -> 277092 bytes
-rw-r--r--modules/newsreel/slides/teamwork.pngbin0 -> 83906 bytes
-rw-r--r--modules/page/index.php71
-rw-r--r--modules/tsviewer/index.php43
49 files changed, 1608 insertions, 0 deletions
diff --git a/modules/admin/admin_functions.php b/modules/admin/admin_functions.php
new file mode 100644
index 0000000..30a40d0
--- /dev/null
+++ b/modules/admin/admin_functions.php
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+ return;
+}
+
+function is_loggedin()
+{
+ $id = session_id();
+ if($id == "")
+ {
+ header("location: index.php");
+ return false;
+ }
+ return true;
+}
+
+function login()
+{
+ global $db;
+
+ if(isset($_SESSION['username']) || isset($_SESSION['password']))
+ {
+ return true;
+ }
+
+ if(isset($_POST['processed']))
+ {
+ $username = addslashes($_POST['username']);
+ $password = addslashes($_POST['password']);
+ $password = crypt(md5($password),'iamnotadirtywhorebitch');
+ $result = $db->Query("SELECT * FROM bayonet_users WHERE username = '$username' AND password = '$password'");
+ $rows = $db->Rows($result);
+
+ if($rows > 0)
+ {
+ $_SESSION['username'] = stripslashes($username);
+ $_SESSION['password'] = stripslashes($password);
+ return true;
+ }
+ else
+ {
+ ReportError("Login incorrect.");
+ return false;
+ }
+
+ }
+ else
+ {
+ echo "<form action=\"\" method=\"post\">\n";
+ OpenTable();
+ echo "<tr><th colspan=\"2\">Administrative Login</th></tr>\n";
+
+ echo "<tr><td><table width=\"5\" align=\"center\">\n
+ <tr><th style=\"text-align:right;\">Username</th><td><input size=\"20\" type=\"text\" name=\"username\"></td></tr>\n
+ <tr><th style=\"text-align:right;\">Password</th><td><input size=\"20\" type=\"password\" name=\"password\"></td></tr>\n
+ <tr><th colspan=\"2\" align=\"right\"><input type=\"Submit\" name=\"processed\" value=\"Submit\"></th></tr></td></tr>\n
+ </table>\n";
+ CloseTable();
+ echo "</form>\n";
+ return false;
+ }
+}
+
+function logout()
+{
+ session_unset();
+ session_destroy();
+}
+
+/**
+ * CompileAdmin()
+ *
+ * because we want to have a horizontal display of options, we need to have
+ * the data separated by arrays. the data is processed into single tables, and is
+ * echoed in realtime. we checked to make sure they were arrays, but there is no
+ * checking to make sure the data passed is not malicious in nature.
+ *
+ * @param mixed $head
+ * @param mixed $body
+ * @return
+ */
+function CompileAdmin($head,$body)
+{
+ /*if we were not passed arrays, then say goodbye*/
+ if(!is_array($head) || !is_array($body))
+ {
+ echo "must be array\n";
+ return;
+ }
+
+ echo "<table class=\"cleartable\" width=\"100%\">";
+ echo "<tr style=\"text-align:center; height:90px;\">";
+
+ $num = 1;
+ foreach($body as $td)
+ {
+ echo "<td class=\"center\" style=\"width:25%;\">$td</td>\n";
+ if($num%4 == 0){
+ echo "</tr><tr style=\"text-align:center; height:90px;\">";
+ }
+ $num++;
+ }
+ echo "</tr></table>\n";
+}
+
+/**
+ * OpenTable()
+ *
+ * The administration OpenTable() function requires an argument to define
+ * the header title. It may be wise to replace the standard OpenTable() function
+ * with this one... that's alot of code to unfuck though.
+ *
+ * @param mixed $title
+ * @return
+ */
+function OpenTable_Ex($title)
+{
+ echo "<table align=\"center\"><tr><th>{$title}</th></tr><tr><td>";
+}
+
+/**
+ * CloseTable()
+ *
+ * @return
+ */
+function CloseTable_Ex()
+{
+ echo "</td></tr></table>";
+}
+
+?> \ No newline at end of file
diff --git a/modules/admin/blocks/functions.php b/modules/admin/blocks/functions.php
new file mode 100644
index 0000000..660b8e7
--- /dev/null
+++ b/modules/admin/blocks/functions.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+function ListBlocks()
+{
+ global $db;
+ $result = $db->Query("SELECT * FROM bayonet_blocks");
+ while(($rows = $db->fetch($result))!=false)
+ {
+ $blocks[] = $rows;
+ }
+
+ echo "<table align=\"center\"><tr><th colspan=\"3\">Existing Blocks</th></tr>";
+ foreach($blocks as $block)
+ {
+ echo "<tr><td>{$block['weight']} : {$block['dir_name']}</td><td><a href=\"?load=admin&op=blocks&edit={$block['block_id']}\">Edit</a></td><td><a href=\"?load=admin&op=blocks&delete={$block['block_id']}\">Delete</a></td></tr>";
+ }
+ echo "</table>";
+}
+
+function NewBlock()
+{
+ global $db;
+ if(isset($_POST['processed']))
+ {
+ //Secure our data to prevent injection attacks.
+ $weight = addslashes($_POST['weight']);
+ $dir_name = addslashes($_POST['dir_name']);
+ $position = addslashes($_POST['position']);
+ $active = addslashes($_POST['active']);
+
+ if(empty($weight) || empty($dir_name) || empty($position))
+ {
+ echo "You must fill everything out before proceeding.";
+ return;
+ }
+ //Update the database with the new data.
+ $db->Query("INSERT INTO bayonet_blocks SET weight = '$weight', dir_name = '$dir_name', position = '$position', active = '$active'");
+ //die, because we have completed what we wanted to do.
+ echo "New block, '$dir_name', at position '$weight' added.\n";
+ return;
+ }
+
+ ?>
+ <form action="<?php $_SERVER['PHP_SELF']?>" method="post">
+ <table align="center">
+ <tr><th>Weight</th><td><input type="text" name="weight" value="<?php echo $block['weight'] ?>"></td></tr>
+ <tr><th>Position</th><td><input type="text" name="position" value="<?php echo $block['position'] ?>"></td></tr>
+ <tr><th>Directory Name</th><td><input type="text" name="dir_name" value="<?php echo $block['dir_name'] ?>"></td>
+ <tr><th>Active</th><td>
+ <select name="active">
+ <option value="1">Yes</option>
+ <option value="0">No</option>
+ </select></td>
+ <tr><th colspan="2"><input type="submit" name="processed" value="Submit"></th></tr>
+ </table>
+ </form>
+ <?php
+}
+
+function GetActive($block_id, &$active)
+{
+ $options = array(1 => 'Yes',0 => 'No');
+ foreach($options as $option => $value)
+ {
+ $selected = NULL;
+ if($active == $option)
+ {
+ $selected = "selected";
+ }
+ echo "<option " . $selected . " value=\"". $option ."\">" . $value . "</option>\n";
+ }
+
+
+}
+
+function EditBlock($block_id)
+{
+ global $db;
+ if(isset($_POST['processed']))
+ {
+ //Secure our data to prevent injection attacks.
+ $weight = addslashes($_POST['weight']);
+ $dir_name = addslashes($_POST['dir_name']);
+ $position = addslashes($_POST['position']);
+ $active = addslashes($_POST['active']);
+
+ if(empty($weight) || empty($dir_name) || empty($position))
+ {
+ echo "You must fill everything out before proceeding.";
+ return;
+ }
+
+ //Update the database with the new data.
+ $db->Query("UPDATE bayonet_blocks SET weight = '$weight', dir_name = '$dir_name', position = '$position', active = '$active' WHERE block_id = '$block_id'");
+ //$isActive = $active ? "IS" : "IS NOT";
+ echo "Block, '$dir_name', at position '$weight' has been edited.\n";
+ //die, because we have completed what we wanted to do.
+ return;
+ }
+
+ //Grab the page from the database according to the $page_id passed to the function.
+ $result = $db->Query("SELECT weight,dir_name,position,active FROM bayonet_blocks WHERE block_id = '$block_id'");
+ while(($row = $db->Fetch($result))!=false)
+ {
+ //We only want one row, so we don't have to $block[]... No foreach necessary.
+ $block = $row;
+ }
+
+ ?>
+ <form action="<?php $_SERVER['PHP_SELF']?>" method="post">
+ <table align="center">
+ <tr><th>Weight</th><td><input type="text" name="weight" value="<?php echo $block['weight'] ?>"></td></tr>
+ <tr><th>Position</th><td><input type="text" name="position" value="<?php echo $block['position'] ?>"></td></tr>
+ <tr><th>Directory Name</th><td><input type="text" name="dir_name" value="<?php echo $block['dir_name'] ?>"></td>
+ <tr><th>Active</th><td>
+ <select name="active">
+ <?php GetActive($block_id, $block['active']) ?>
+ </select>
+ </td>
+
+ <tr><th colspan="2"><input type="submit" name="processed" value="Submit"></th></tr>
+ </table>
+ </form>
+ <?php
+}
+
+function DeleteBlock($block_id)
+{
+ global $db;
+
+ $result = $db->Query("SELECT dir_name FROM bayonet_blocks WHERE block_id = '$block_id'");
+ $block = $db->Fetch($result);
+
+ if(isset($_POST['proceed']))
+ {
+ echo "Block '{$block['dir_name']}', was deleted.";
+ $db->Query("DELETE FROM bayonet_blocks WHERE block_id = '$block_id' LIMIT 1");
+ return;
+ }
+ if(isset($_POST['cancel']))
+ {
+ echo "User cancelled deletion of page: '{$block['dir_name']}'";
+ return;
+ }
+
+ ?>
+ <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <table align="center">
+ <th>Are you SURE you want to delete the block titled: '<?php echo $block['dir_name']?>'?</th>
+ <tr><th><button name="proceed">Yes</button>&nbsp;&nbsp;&nbsp;<button name="cancel">No</button></th></tr>
+ </table>
+ </form>
+ <?php
+}
+
+?> \ No newline at end of file
diff --git a/modules/admin/blocks/index.php b/modules/admin/blocks/index.php
new file mode 100644
index 0000000..6dac3d2
--- /dev/null
+++ b/modules/admin/blocks/index.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * This file administers the site blocks.
+ *
+ * -weight
+ * -directory name
+ */
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+}
+
+
+include $basedir.'blocks/functions.php';
+
+if(isset($_GET['edit']))
+{
+ $block_id = $_GET['edit'];
+ EditBlock($block_id);
+ return;
+}
+
+if(isset($_GET['delete']))
+{
+ $block_id = $_GET['delete'];
+ DeleteBlock($block_id);
+ return;
+}
+
+if(isset($_GET['create']))
+{
+ NewBlock();
+ return;
+}
+
+echo "<table align=\"center\" width=\"200px\"><tr><th>".LinkInternal('Create a Block','?load=admin&op=blocks&create=true')."</th></tr></table>";
+
+ListBlocks();
+
+?> \ No newline at end of file
diff --git a/modules/admin/images/addnewarticle.png b/modules/admin/images/addnewarticle.png
new file mode 100644
index 0000000..0e29960
--- /dev/null
+++ b/modules/admin/images/addnewarticle.png
Binary files differ
diff --git a/modules/admin/images/addnewpage.png b/modules/admin/images/addnewpage.png
new file mode 100644
index 0000000..c60c68c
--- /dev/null
+++ b/modules/admin/images/addnewpage.png
Binary files differ
diff --git a/modules/admin/images/announcement.png b/modules/admin/images/announcement.png
new file mode 100644
index 0000000..c70591d
--- /dev/null
+++ b/modules/admin/images/announcement.png
Binary files differ
diff --git a/modules/admin/images/calendar.png b/modules/admin/images/calendar.png
new file mode 100644
index 0000000..86b9861
--- /dev/null
+++ b/modules/admin/images/calendar.png
Binary files differ
diff --git a/modules/admin/images/editfiles.png b/modules/admin/images/editfiles.png
new file mode 100644
index 0000000..500e206
--- /dev/null
+++ b/modules/admin/images/editfiles.png
Binary files differ
diff --git a/modules/admin/images/editpage.png b/modules/admin/images/editpage.png
new file mode 100644
index 0000000..ab3fd58
--- /dev/null
+++ b/modules/admin/images/editpage.png
Binary files differ
diff --git a/modules/admin/images/file_doc.png b/modules/admin/images/file_doc.png
new file mode 100644
index 0000000..b1da1ef
--- /dev/null
+++ b/modules/admin/images/file_doc.png
Binary files differ
diff --git a/modules/admin/images/file_pdf.png b/modules/admin/images/file_pdf.png
new file mode 100644
index 0000000..500e206
--- /dev/null
+++ b/modules/admin/images/file_pdf.png
Binary files differ
diff --git a/modules/admin/images/file_rtf.png b/modules/admin/images/file_rtf.png
new file mode 100644
index 0000000..39304c1
--- /dev/null
+++ b/modules/admin/images/file_rtf.png
Binary files differ
diff --git a/modules/admin/images/file_word.png b/modules/admin/images/file_word.png
new file mode 100644
index 0000000..3011f00
--- /dev/null
+++ b/modules/admin/images/file_word.png
Binary files differ
diff --git a/modules/admin/images/photogallery.png b/modules/admin/images/photogallery.png
new file mode 100644
index 0000000..a161a55
--- /dev/null
+++ b/modules/admin/images/photogallery.png
Binary files differ
diff --git a/modules/admin/index.php b/modules/admin/index.php
new file mode 100644
index 0000000..4dd4539
--- /dev/null
+++ b/modules/admin/index.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ if(!defined("MODULE_FILE"))
+ {
+ die("Access denied.");
+ }
+
+ define("ADMIN_FILE",'admin_file');
+ include 'admin_functions.php';
+
+ if($_GET['op'] == 'logout')
+ {
+ logout();
+ }
+
+/* if(login())
+ {
+ //this is so dirty... sigh.
+ if(is_loggedin())
+ {
+ */ ?>
+ <!-- Add id="wrapper" for full height -->
+ <table align="center" width="90%" >
+ <tr><td><div style="text-align:right"><a href="?load=admin&op=logout">Logout, <?php echo $_SESSION['username']?></a></div></td></tr>
+ <tr><td>
+
+ <div class="maincontent">
+ <fieldset>
+ <legend>Administrative Tools:</legend>
+ <?php
+ $th = array('Blocks','Pages');
+ $td = array(
+ //LinkInternal('Blocks','?load=admin&op=blocks'),
+ LinkInternal('<img src="images/editpage.png" /><br />Manage Pages','?load=admin&op=pages'),
+ LinkInternal('<img src="images/navigation.png" /><br />Edit Navigation','?load=admin'),
+ LinkInternal('<img src="images/announcement.png" /><br />Edit Announcements','?load=admin'),
+ LinkInternal('<img src="images/calendar.png" /><br />Manage Events','?load=admin'),
+ LinkInternal('<img src="images/photogallery.png" /><br />Manage Galleries', '?load=admin')
+
+ );
+
+ //render administration table
+ CompileAdmin($th,$td);
+ ?>
+ </fieldset>
+
+ </td></tr>
+ <tr><td><div style="text-align:center"><?php include 'operation.php' ?></div></td></tr>
+
+ </table>
+ </div>
+ <?php /*)
+ }
+ } */
+
+?> \ No newline at end of file
diff --git a/modules/admin/operation.php b/modules/admin/operation.php
new file mode 100644
index 0000000..0ac2a9b
--- /dev/null
+++ b/modules/admin/operation.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+ return;
+}
+
+if(!isset($_GET['op']))
+{
+ echo "<center>No operation selected</center>\n";
+ return;
+}
+
+$op = $_GET['op'];
+$basedir = 'modules/admin/';
+
+if(file_exists($basedir))
+{
+ if(file_exists($basedir . $op))
+ {
+ include $basedir . $op . '/index.php';
+ }
+ else
+ {
+ ReportError("Administrative operation '$op' does not exist.");
+ }
+}
+else
+{
+ ReportError("Administrative base directory path does not exist.");
+}
+
+
+
+?> \ No newline at end of file
diff --git a/modules/admin/pages/functions.php b/modules/admin/pages/functions.php
new file mode 100644
index 0000000..104a19a
--- /dev/null
+++ b/modules/admin/pages/functions.php
@@ -0,0 +1,230 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * Note to anyone feeling the need to edit this file...
+ * You MUST declare $db as global inside your functions in order access MySQL from here.
+ */
+
+function ListArticles($pageid){
+
+ global $db;
+ $result = $db->Query("SELECT article_id,title FROM bayonet_articles WHERE `page_id` = $pageid ORDER BY `weight`");
+ while(($row = $db->Fetch($result))!=false)
+ {
+ $articles[] = $row;
+ }
+
+ echo "<table class=\"cleartable\" width=\"100%\" cellspacing=\"0\">";
+
+ if(count($articles)==0){
+ echo "<tr><td>There are no articles posted on this page.<br /></td></tr></table>";
+ return;
+ }
+ foreach($articles as $article)
+ {
+ if($_GET['aid'] == $article['article_id'])
+ echo '<tr style="background-color:#c1c1c1; height:30px;">';
+ else
+ echo '<tr style="height:30px;">';
+ ?>
+
+ <td>^</td>
+ <td style="text-align:center; text-overflow:ellipsis; overflow:hidden;">
+ <a href="?load=admin&op=pages&edit=<?php echo $pageid; ?>&aid=<?php echo $article['article_id']?>"><?php echo $article['title']; ?></a>
+ </td>
+ <td>v</td>
+ </tr>
+
+ <?php
+ }
+
+ echo "</table>";
+
+
+
+}
+
+function EditArticle($article_id){
+
+ global $db;
+ //Grab the page from the database according to the $article_id passed to the function.
+ $result = $db->Query("SELECT title,text FROM bayonet_articles WHERE article_id = '$article_id'");
+ while(($row = $db->Fetch($result))!=false)
+ {
+ //We only want one row, so we don't have to $article[]... No foreach necessary.
+ $article = $row;
+ }
+ ?>
+ <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <table class="cleartable">
+ <tr><td>
+ <input type="text" name="title" value="<?php echo $article['title'] ?>" maxlength="50" size="30" />
+ <input type="submit" name="processed" value="Submit Changes" />
+ </td></tr>
+ <tr><td><textarea id="markItUp" rows="30" cols="80" name="text"><?php echo $article['text'] ?></textarea></td></tr>
+ </table>
+ </form>
+ <?php
+}
+
+function ListPages($pid = NULL)
+{
+ global $db;
+ $result = $db->Query("SELECT page_id,title FROM bayonet_pages");
+ while(($row = $db->Fetch($result))!=false)
+ {
+ $pages[] = $row;
+ }
+
+ echo 'Select page: <select id="pagenames" onchange="gotoEditPage(this.id)">';
+ echo '<option value="0">-&nbsp;-&nbsp;-&nbsp;-&nbsp;-&nbsp;-&nbsp;-&nbsp;-</option>';
+ //echo "<table align=\"center\"><tr><th colspan=\"3\">Existing Pages</th></tr>";
+
+
+ foreach($pages as $page)
+ {
+ if($pid == $page['page_id'])
+ echo "<option value=\"{$page['page_id']}\" selected>{$page['title']}</option>";
+ else
+ echo "<option value=\"{$page['page_id']}\">{$page['title']}</option>";
+ }
+ echo '</select>';
+ // echo "</table>";
+}
+
+function NewPage()
+{
+ global $db;
+ if(isset($_POST['processed']))
+ {
+ //Secure our data to prevent injection attacks.
+ $title = addslashes($_POST['title']);
+ $text = addslashes($_POST['text']);
+ if(empty($title) || empty($text))
+ {
+ echo "You must fill everything out before proceeding.";
+ return;
+ }
+
+ //Update the database with the new data.
+ $db->Query("INSERT INTO bayonet_pages SET title = '$title', text = '$text'");
+ echo "New page, '$title', has been added.\n";
+ //die, because we have completed what we wanted to do.
+ return;
+ }
+
+ ?>
+ <h3>Add New Page</h3>
+ <form action="<?php $_SERVER['PHP_SELF']?>" method="post">
+ <table>
+ <tr><th>Title</th><td><input type="text" name="title" value="<?php echo $page['title'] ?>" /></td></tr>
+ <tr><th>Text</th><td><textarea id="markItUp" rows="30" cols="80" name="text"><?php echo $page['text'] ?></textarea></td>
+ <tr><th colspan="2"><input type="submit" name="processed" value="Submit" /></th></tr>
+ </table>
+ </form>
+ <?php
+}
+
+function EditPage($page_id)
+{
+ global $db;
+ $page_id = addslashes($page_id);
+
+ // If the user has submitted, then process their request.
+ if(isset($_POST['processed']))
+ {
+ //Secure our data to prevent injection attacks.
+ $title = addslashes($_POST['title']);
+ $text = addslashes($_POST['text']);
+ if(empty($title) || empty($text))
+ {
+ echo "You must fill everything out before proceeding.";
+ return;
+ }
+
+ //Update the database with the new data.
+ $db->Query("UPDATE bayonet_pages SET title = '$title', text = '$text' WHERE page_id = '$page_id'");
+ echo "Page, '$title', has been edited.\n";
+ //die, because we have completed what we wanted to do.
+ return;
+ }
+
+ $aid = $_GET['aid'];
+?>
+ <table width="100%">
+ <tr>
+ <td><?php ListPages($page_id); ?></td>
+ <td><?php echo LinkInternal('<img src="images/view.gif" />&nbsp;View this Page','?load=page&id='.$page_id); ?></td>
+ <td class="right"><?php echo LinkInternal('<img src="images/delete.gif" />&nbsp;Delete this Page','?load=admin&op=pages&delete='.$page_id); ?></td>
+ </tr>
+ </table>
+ <hr />
+ <table class="cleartable" width="100%" style="height:95%;" cellspacing="0">
+ <tr>
+ <td style="vertical-align:top;">
+ <?php ListArticles($page_id); ?>
+ </td>
+ <td style="width:589px; vertical-align:top; border-left:1px solid #848484;">
+ <?php
+ //if article is set then EditArticle();
+ if($aid > 0){
+ EditArticle($aid);
+ }
+ ?>
+ </td>
+ </tr>
+ </table>
+ <?php
+}
+
+function DeletePage($page_id)
+{
+ global $db;
+
+ $result = $db->Query("SELECT title FROM bayonet_pages WHERE page_id = '$page_id'");
+ $page = $db->Fetch($result);
+
+ if(isset($_POST['proceed']))
+ {
+ echo "Page '{$page['title']}', was deleted.";
+ $db->Query("DELETE FROM bayonet_pages WHERE page_id = '$page_id' LIMIT 1");
+ return;
+ }
+ if(isset($_POST['cancel']))
+ {
+ echo "User cancelled deletion of page: '{$page['title']}'";
+ return;
+ }
+ if($page_id == 1){
+ echo "You can not delete the home page.";
+ return;
+ }
+
+ ?>
+ <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <table>
+ <th>Are you SURE you want to delete the page titled: '<?php echo $page['title']?>'?</th>
+ <tr><th><button name="proceed">Yes</button>&nbsp;&nbsp;&nbsp;<button name="cancel">No</button></th></tr>
+ </table>
+ </form>
+ <?php
+}
+
+?> \ No newline at end of file
diff --git a/modules/admin/pages/index.php b/modules/admin/pages/index.php
new file mode 100644
index 0000000..0fb6cff
--- /dev/null
+++ b/modules/admin/pages/index.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+ ?>
+
+ <div class="maincontent">
+ <fieldset style="height:500px">
+ <legend>Manage Pages:</legend>
+<?php
+
+if(!defined("ADMIN_FILE"))
+{
+ die("Access denied.");
+}
+
+include $basedir.'pages/functions.php';
+
+if(isset($_GET['edit']))
+{
+ $page_id = $_GET['edit'];
+ EditPage($page_id);
+ return;
+}
+
+if(isset($_GET['delete']))
+{
+ $page_id = $_GET['delete'];
+ DeletePage($page_id);
+ return;
+}
+
+if(isset($_GET['create']))
+{
+ $create = $_GET['create'];
+ if($create)
+ {
+ NewPage();
+ return;
+ }
+}
+?>
+
+ <table width="100%">
+ <tr>
+ <td><?php ListPages(); ?></td>
+ <td class="right">
+ <?php echo LinkInternal('<img src="images/add.gif" />&nbsp;Create a Page','?load=admin&op=pages&create=true'); ?>
+ </td>
+
+ <tr>
+ </table>
+ </fieldset>
+</div>
diff --git a/modules/gallery/dynamitelax/100_2867.JPG b/modules/gallery/dynamitelax/100_2867.JPG
new file mode 100644
index 0000000..92a423d
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_2867.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_2889.JPG b/modules/gallery/dynamitelax/100_2889.JPG
new file mode 100644
index 0000000..c216acf
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_2889.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_2901.JPG b/modules/gallery/dynamitelax/100_2901.JPG
new file mode 100644
index 0000000..48a68e5
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_2901.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_3042.JPG b/modules/gallery/dynamitelax/100_3042.JPG
new file mode 100644
index 0000000..cabdf59
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_3042.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_3047.JPG b/modules/gallery/dynamitelax/100_3047.JPG
new file mode 100644
index 0000000..1d8966d
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_3047.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_3050.JPG b/modules/gallery/dynamitelax/100_3050.JPG
new file mode 100644
index 0000000..1f201eb
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_3050.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_3051.JPG b/modules/gallery/dynamitelax/100_3051.JPG
new file mode 100644
index 0000000..c8e30a1
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_3051.JPG
Binary files differ
diff --git a/modules/gallery/dynamitelax/100_3883.jpg b/modules/gallery/dynamitelax/100_3883.jpg
new file mode 100644
index 0000000..95d43f1
--- /dev/null
+++ b/modules/gallery/dynamitelax/100_3883.jpg
Binary files differ
diff --git a/modules/gallery/index.php b/modules/gallery/index.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/modules/gallery/index.php
diff --git a/modules/gallery/testphotos/dlogo.png b/modules/gallery/testphotos/dlogo.png
new file mode 100644
index 0000000..68d3aa8
--- /dev/null
+++ b/modules/gallery/testphotos/dlogo.png
Binary files differ
diff --git a/modules/gallery/testphotos/logo.png b/modules/gallery/testphotos/logo.png
new file mode 100644
index 0000000..2c62008
--- /dev/null
+++ b/modules/gallery/testphotos/logo.png
Binary files differ
diff --git a/modules/gallery/testphotos/player.jpg b/modules/gallery/testphotos/player.jpg
new file mode 100644
index 0000000..434f6c2
--- /dev/null
+++ b/modules/gallery/testphotos/player.jpg
Binary files differ
diff --git a/modules/gallery/testphotos/team.jpg b/modules/gallery/testphotos/team.jpg
new file mode 100644
index 0000000..8e5c6eb
--- /dev/null
+++ b/modules/gallery/testphotos/team.jpg
Binary files differ
diff --git a/modules/index/index.php b/modules/index/index.php
new file mode 100644
index 0000000..fd1eef1
--- /dev/null
+++ b/modules/index/index.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * MODULE - INDEX >>
+ * This page is a module that displays multiple modules
+ * Database should store a list of module names in the order they are to be displayed
+ * This should be fairly simple to produce -- Dont forget to set this as the default
+ * in the config.php array
+ *
+ */
+?>
+
+<?php
+
+ $result = $db->Query("SELECT `index_modules` FROM `bayonet_settings` WHERE `title` = 'Default'");
+ while(($row = $db->Fetch($result))!==false)
+ {
+ $indexModules = $row['index_modules'];
+ }
+
+ $indexModules = explode(',',$indexModules);
+
+ foreach($indexModules as $module)
+ {
+ if(file_exists("modules/" . $module))
+ {
+ include 'modules/' . $module . '/index.php';
+ }
+ else
+ {
+ OpenTable();
+ ReportError("Cannot load module '{$module}' directory.<br>\n");
+ CloseTable();
+ }
+ echo "<br />";
+ }
+?> \ No newline at end of file
diff --git a/modules/news/categories/3rdIDnews.png b/modules/news/categories/3rdIDnews.png
new file mode 100644
index 0000000..e31a7f5
--- /dev/null
+++ b/modules/news/categories/3rdIDnews.png
Binary files differ
diff --git a/modules/news/categories/marnemessenger.png b/modules/news/categories/marnemessenger.png
new file mode 100644
index 0000000..691129e
--- /dev/null
+++ b/modules/news/categories/marnemessenger.png
Binary files differ
diff --git a/modules/news/functions.php b/modules/news/functions.php
new file mode 100644
index 0000000..66c8b68
--- /dev/null
+++ b/modules/news/functions.php
@@ -0,0 +1,260 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * getNewsComments($id)
+ * Function getting an array of comments for posted news
+ * @param id - news_id cooresponding to `bayonet_news`
+ * @return - associative array of comments
+ */
+function getNewsComments($id){
+
+ global $db;
+ $result = $db->Query("SELECT c.comment_id, c.news_id, c.author_id, c.message, c.date, u.username AS author, u.avatar as avatar ".
+ "FROM `bayonet_news_comments` AS c ".
+ "LEFT OUTER JOIN `mybb_users` AS u ON u.uid = c.author_id ".
+ "WHERE c.news_id = '$id' ".
+ "ORDER BY date ASC");
+ while(($row = $db->Fetch($result)) != false)
+ {
+ $comments[] = $row;
+ }
+
+ $db->Free($result);
+
+ return $comments;
+}
+
+ /**
+ * displayComments($data)
+ * Function that takes an array of comments and displays them in html
+ * @param data - associative array of comments from the database
+ */
+function displayComments($data){
+
+ date_default_timezone_set("America/New_York");
+ OpenTable();
+ ?>
+
+ <div id="comments">
+ <table width="100%">
+ <tr>
+ <td><h2>User Comments</h2></td>
+ <td style="text-align:right"><a href="#add">Add Yours</a></td>
+ </tr>
+ </table>
+ <ol class="comment_list parent">
+
+ <?php
+ foreach($data as $comment)
+ {
+ ?>
+ <li id="comment-<?php echo $comment['comment_id']; ?>">
+ <div class="comment_wrap">
+
+ <div class="comment_author">
+ <?php
+ if(!empty($comment['avatar'])){
+ echo "<img src=\"{$comment['avatar']}\" height=\"80px\" />";
+ }else{
+ echo "<img src=\"modules/news/images/avatar.png\" />";
+ }
+ ?>
+ <p>
+ <?php
+ if($comment['author_id']>0){
+ echo "<a href=\"{$comment['author_id']}\">{$comment['author']}</a>";
+ }else{
+ echo "Guest";
+ }
+ ?>
+
+ <span><?php echo date('F jS', strtotime($comment['date'])); ?></span>
+ </p>
+ </div>
+
+ <div class="single_comment">
+ <img src="modules/news/images/comment_arrow.png" class="comment_arrow" />
+ <p> <?php echo BBCode($comment['message']); ?></p>
+
+ </div>
+
+ </div>
+ </li>
+
+ <?php
+ }
+ echo "</ol>";
+
+ commentForm();
+
+ CloseTable();
+}
+
+ /**
+ * getNumOfComments($id)
+ * Function that gets the number of comments a news post has
+ * @param id - news_id cooresponding to `bayonet_news`
+ */
+function getNumOfComments($id){
+
+ global $db;
+ $result = $db->Query("SELECT `comment_id` FROM `bayonet_news_comments` WHERE `news_id` = '$id'");
+
+ return $db->Rows($result);;
+}
+
+ /**
+ * getNumOfComments($id)
+ * Function that gets the desired news from the database and returns it as an array
+ * @param id - (optional) news_id cooresponding to `bayonet_news`
+ */
+function getNews($id = NULL){
+
+ global $db;
+ $query = "SELECT n.news_id, n.title, n.message, n.date, n.category_id, u.username AS author, c.name AS catname, c.image AS catimage ".
+ "FROM `bayonet_news` AS n ".
+ "INNER JOIN `bayonet_news_categories` AS c ON c.category_id = n.category_id ".
+ "LEFT OUTER JOIN `mybb_users` AS u ON u.uid = n.author_id ";
+ if(isset($id)){
+ $query = $query."WHERE n.news_id = '$id' ";
+ }else{
+ $query = $query."ORDER BY date DESC";
+ if($limit !=NULL){
+ $query = $query." LIMIT '$limit'";
+ }
+ }
+
+ $result = $db->Query($query);
+ while(($row = $db->Fetch($result)) != false)
+ {
+ $data[] = $row;
+ }
+
+ $db->Free($result);
+
+ return $data;
+}
+
+ /**
+ * displayNews($data)
+ * Function that takes an array of news and displays it as html
+ * @param data - associative array of news from the database
+ */
+function displayNews($data){
+
+ date_default_timezone_set("America/New_York");
+ foreach($data as $news)
+ {
+ $numComments = getNumOfComments($news['news_id']);
+
+ OpenTable(); ?>
+
+ <div class="contentHeading">
+ <table width="100%">
+ <tr>
+ <td style="text-align:left;"><?php echo $news['title']; ?></td>
+ <td style="text-align:right;">Posted by: <?php echo $news['author']; ?></td>
+ </tr>
+ </table>
+ </div>
+ <div class="content">
+ <img src="modules/news/categories/<?php echo $news['catimage']; ?>" alt="<?php echo $news['catname']; ?>" align="right" />
+ <?php echo BBCode($news['message']); ?>
+ </div>
+ <div class="contentFooter">
+ <table width="100%">
+ <tr>
+ <td style="text-align:left;">
+ View Comments: <a href="?load=news&id=<?php echo $news['news_id']; ?>"><?php echo $numComments;?> Comments</a>
+ </td>
+ <td style="text-align:right;">Posted on: <?php echo date('D M j, Y H:i a T', strtotime($news['date'])); ?></td>
+ </tr>
+ </table>
+ </div>
+
+ <?php
+ CloseTable();
+ echo "<br />";
+ }
+}
+
+/** This was coded on Coda with a MacBook Pro **/
+function commentForm(){
+
+ global $db;
+
+ if(isset($_POST['processed']))
+ {
+ $comment = stripslashes($_POST['comment']);
+ $author_id = stripslashes($_POST['author']);
+
+ echo "Author: {$author_id}<br />Comment: {$comment}<br />";
+ echo "Your comment has been processed. Please wait.<br />";
+ }
+
+ $cur_user_id = 0; //testing variable, until i get the login system working for this
+
+ $logged_in = false;
+ $result = $db->Query("SELECT `username`, `avatar` FROM `mybb_users` WHERE `uid` = '$cur_user_id' LIMIT 1");
+ while(($row = $db->Fetch($result)) != false)
+ {
+ $username = $row['username'];
+ $avatar = $row['avatar'];
+ $logged_in = true;
+ }
+
+?>
+<a name="add"></a>
+<h2>Add Your Comment</h2>
+
+ <ol class="comment_form_wrap">
+ <li>
+ <img src="modules/news/images/comment_arrow.png" class="textarea_arrow" />
+ <div class="comment_author">
+ <?php
+ if($avatar!=""){
+ echo "<img src=\"{$avatar}\" height=\"80px\" />";
+ }else{
+ echo "<img src=\"modules/news/images/avatar.png\" />";
+ }
+ ?>
+ <p>
+ <?php
+ if($logged_in){
+ echo $username;
+ }else{
+ echo "Guest";
+ }
+ ?>
+ <br><span><?php echo date('F jS', time()); ?></span></p>
+ </div>
+ <form action="<?php $_SERVER['PHP_SELF']?>" method="POST" id="comment_form">
+ <!-- <fieldset> -->
+ <textarea name="comment" id="comment" rows="8" cols="10" tabindex="1" class="input textarea required"></textarea>
+ <input type="hidden" value="<?php echo $cur_user_id; ?>" name="author" />
+ <input type="submit" value="Add Comment" name="processed" />
+ <!-- </fieldset> -->
+ </form>
+ </li>
+ </ol>
+
+<?php
+}
+?> \ No newline at end of file
diff --git a/modules/news/images/avatar.png b/modules/news/images/avatar.png
new file mode 100644
index 0000000..825197a
--- /dev/null
+++ b/modules/news/images/avatar.png
Binary files differ
diff --git a/modules/news/images/comment_arrow.png b/modules/news/images/comment_arrow.png
new file mode 100644
index 0000000..0962f4f
--- /dev/null
+++ b/modules/news/images/comment_arrow.png
Binary files differ
diff --git a/modules/news/index.php b/modules/news/index.php
new file mode 100644
index 0000000..6aaec2d
--- /dev/null
+++ b/modules/news/index.php
@@ -0,0 +1,44 @@
+<link rel="stylesheet" type="text/css" href="modules/news/style.css" media="screen"/>
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if(!defined("MODULE_FILE"))
+{
+ die('Access Denied.');
+}
+
+include 'modules/news/functions.php';
+
+$logged_id = 2;
+
+if(isset($_GET['id']))
+{
+ $news_id = $_GET['id'];
+ displayNews(getNews($news_id));
+ displayComments(getNewsComments($news_id));
+ return;
+}
+else
+{
+ displayNews(getNews());
+ return;
+}
+
+
+?> \ No newline at end of file
diff --git a/modules/news/style.css b/modules/news/style.css
new file mode 100644
index 0000000..fe98982
--- /dev/null
+++ b/modules/news/style.css
@@ -0,0 +1,234 @@
+ /*********************************
+ ** Comment Styles **
+ *********************************/
+
+ div.comment_author a, div.comment_author a:visited {
+ font-size: 10px;
+ font-family: verdana;
+ color:#3666ba;
+ }
+
+ div.comment_author a:hover, div.comment_author a:visited:hover {
+ font-size: 10px;
+ font-family: verdana;
+ color:#42423d;
+ }
+
+/* Comments */
+#comments {
+ background: #ededed;
+ padding: 25px 25px;
+ padding-top:0px;
+ border: 1px solid #dcdddd;
+ color: #42423d;
+}
+#comments a {
+ text-decoration: none;
+}
+#comments_wrap h3 {
+ font-size: 22px;
+ font-weight: normal;
+ margin: 0px;
+ padding-bottom: 20px;
+ margin-top: 10px;
+}
+#comments_wrap h3 a, #comments_wrap h3 a:hover {
+ color: #242323;
+ text-decoration: none;
+}
+#comments_wrap .get_avatar {
+ color: #a7a7a7;
+ font-size: 10px;
+ letter-spacing: -1px;
+ padding-top: 10px;
+}
+#comments ol.parent {
+ padding-bottom: 25px
+}
+#comments ol {
+ margin: 0px;
+ padding: 0px;
+ padding-left: 120px;
+}
+#comments ol li {
+ list-style: none;
+ padding: 0px;
+ margin: 10px 0px;
+ padding-top: 1px;
+}
+#comments span.comment-reply {
+ position: absolute;
+ bottom: 10px;
+ left: 20px;
+ font-size: 10px;
+ text-transform: uppercase;
+}
+#comments .comment_wrap {
+ position: relative;
+ background: #fff;
+ border: 1px solid #dcdddd;
+}
+#comments .single_comment {
+ padding: 20px;
+ padding-bottom: 60px;
+ color: #42423d;
+}
+#comments .comment_arrow {
+ position: absolute;
+ top: 20px;
+ left: -32px;
+}
+#comments .comment_author {
+ position: absolute;
+ left: -120px;
+ width: 100px;
+ color: #8d8d8d;
+ font-size: 10px;
+ line-height: 14px;
+}
+#comments .comment_author span {
+ display: block;
+}
+#comments .children {
+ padding-left: 0px;
+ border-left: 1px solid #ced0d0;
+}
+#comments .children li {
+ padding-left: 25px;
+ background: url(images/comment_li_bg.gif) no-repeat 0px 25px;
+}
+#comments .children .comment_wrap {
+ background: #f8f8f8;
+ border: 1px solid #d3d5d5;
+}
+#comments .children .comment_arrow {
+ display: none;
+}
+#comments .children .comment_author {
+ position: absolute;
+ left: auto;
+ right: 20px;
+ bottom: 10px;
+ width: 200px;
+ height: 40px;
+}
+#comments .children .comment_author p {
+ position: absolute;
+ right: 50px;
+ bottom: -20px;
+ text-align: right;
+}
+#comments .children .comment_author span {
+ display: block;
+}
+#comments .children .comment_author img {
+ width: 40px;
+ height: 40px;
+ float: right;
+}
+/* Comments Form */
+#respond {
+ position: relative;
+}
+#comments .comment_form_wrap {
+ position: relative;
+ padding-left: 120px;
+}
+#comments .parent .comment_form_wrap {
+ position: relative;
+ padding-left: 0px;
+}
+#comments .textarea_arrow {
+ position: absolute;
+ top: 25px;
+ left: 89px;
+}
+#comments .children .textarea_arrow,
+#comments .parent .textarea_arrow {
+ display: none;
+}
+#comments .comment_form_wrap .comment_author {
+ position: absolute;
+ left: 0px;
+}
+#comments .children .comment_form_wrap {
+ position: relative;
+ padding-left: 0px;
+}
+#comments .children .comment_form_wrap .comment_author,
+#comments .parent .comment_form_wrap .comment_author,
+#comments .children .form_header,
+#comments .parent .form_header {
+ display: none;
+}
+#comments .input {
+ width: 456px;
+ padding: 4px 5px;
+ background: #fff;
+ border: 1px solid #ced0d0;
+ color: #5f6565;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ display: block;
+ margin-bottom: 10px;
+}
+#comments .children .input {
+ width: 431px;
+}
+#comments .textarea {
+ padding-top: 20px;
+ padding-left: 20px;
+ width: 448px;
+ max-width: 468px;
+ height: 135px;
+ font-size: 12px;
+ color: #5f6565;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+}
+#comments .children .textarea {
+ width: 423px;
+}
+#comments #submit_comment {
+ width: 12.0em;
+ height: 3.0em;
+ float: right;
+ margin-right: 7px;
+ margin-top: 10px;
+}
+#wpUserLinks_form #submit_comment {
+ width: 12.0em;
+ height: 3.0em;
+ margin-top: 10px;
+}
+#comments .inputerror {
+ border-color: #555;
+}
+#cancel-comment-reply {
+ float: left;
+ width: 120px;
+ height: 30px;
+ margin-top: 8px;
+}
+#cancel-comment-reply-link {
+ background: #fdfdfd url(images/button_bg.png) repeat-x 0 100%;
+ border: 1px solid #bbbbbb;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-transform: uppercase;
+ height: 22px;
+ width: 70px;
+ text-align: center;
+ padding-bottom: 2px;
+ letter-spacing: -0.05em;
+ cursor: pointer;
+ display: block;
+ line-height: 22px;
+}
+*+html #cancel-comment-reply-link {
+ height: 22px;
+ padding-bottom: 0px;
+}
+#cancel-comment-reply-link:hover {
+ color: #232323;
+ background: #eeeeee url(images/button_bg_hover.png) repeat-x 0 100%;
+ text-decoration: none;
+}
diff --git a/modules/newsreel/images/slidenavbg.png b/modules/newsreel/images/slidenavbg.png
new file mode 100644
index 0000000..6e3a726
--- /dev/null
+++ b/modules/newsreel/images/slidenavbg.png
Binary files differ
diff --git a/modules/newsreel/images/slidenavbg2.png b/modules/newsreel/images/slidenavbg2.png
new file mode 100644
index 0000000..8b9f612
--- /dev/null
+++ b/modules/newsreel/images/slidenavbg2.png
Binary files differ
diff --git a/modules/newsreel/images/slidenavbg3.png b/modules/newsreel/images/slidenavbg3.png
new file mode 100644
index 0000000..a027d26
--- /dev/null
+++ b/modules/newsreel/images/slidenavbg3.png
Binary files differ
diff --git a/modules/newsreel/index.php b/modules/newsreel/index.php
new file mode 100644
index 0000000..5aaf9ba
--- /dev/null
+++ b/modules/newsreel/index.php
@@ -0,0 +1,113 @@
+<!-- START News Reel -->
+<?php OpenTable(); ?>
+<script type="text/javascript">
+
+var current = "0";
+var stop = false;
+var slide=new Array(); //declares a new array called banner
+var x=0; //loop control and array counting variable
+var timing=7000; //value is in milliseconds, used for 3 seconds on each image
+<?php
+ $x=0;
+
+ $get_slides = mysql_query("SELECT * FROM `news_slideshow` WHERE `visable`=1 ORDER BY `order` DESC LIMIT 0,6");
+ //$get_slides = mysql_query("SELECT * FROM `news_slideshow` WHERE `visable`=1");
+
+ while($echo_slides = mysql_fetch_array($get_slides)){
+
+ echo 'slide['.$x.']=new Image();';
+ echo 'slide['.$x.'].src="modules/newsreel/slides/'.$echo_slides['src'].'";';
+ if($x==0){
+ $startSRC=$echo_slides['src'];
+ }
+ $x++;
+
+ }
+
+ $width = 100/$x;
+?>
+
+ function changeStart()
+ {
+ document.getElementById(0).style.backgroundImage="url(modules/newsreel/images/slidenavbg2.png)";
+
+ }
+
+ function mouseOverBG(id, image)
+ {
+ if(id!=current){
+ document.getElementById(id).style.backgroundImage="url(modules/newsreel/images/slidenavbg3.png)";
+ document.getElementById(id).style.color="#3666ba";
+ document.body.style.cursor = 'pointer';
+ }
+ }
+
+ function mouseOutBG(id, image)
+ {
+ if(id!=current){
+ document.getElementById(id).style.backgroundImage="url(modules/newsreel/images/slidenavbg.png)";
+ document.getElementById(id).style.color="white";
+ document.body.style.cursor = 'default';
+ }
+ }
+ function nextSlide(num, clicked)
+ {
+ if(num!=current){
+ document.myBanner.src=slide[num].src;
+ document.getElementById(num).style.backgroundImage="url(modules/newsreel/images/slidenavbg2.png)";
+ document.getElementById(current).style.backgroundImage="url(modules/newsreel/images/slidenavbg.png)";
+ document.getElementById(num).style.color="white";
+ document.body.style.cursor = 'default';
+ current=num;
+ if(clicked){
+ stop=true;
+ }
+ }
+
+ }
+ function playBanner()
+ {
+ if(!stop){
+ if(document.images)
+ {
+ if(document.myBanner.complete)
+ {
+ nextSlide(x,false)
+ x++;
+ }
+ <?php
+ echo' if(x=='.$x.'){
+ x=0;}';
+ ?>
+ var timerId=setTimeout("playBanner()", timing);
+ }
+ }
+ }
+ function init_Slides(){
+ changeStart();
+ playBanner();
+ }
+
+window.onload = init_Slides; //starts the reels movement
+
+
+</script>
+
+<div class="content1"><div class="content2">
+ <img src="modules/newsreel/slides/<?php echo $startSRC; ?>" name="myBanner" alt="newsreel" />
+ <table border="0" cellspacing="0" cellpadding="0" height="21px" width="100%">
+ <tr>
+<?php
+$y=0;
+ $get_slidenav = mysql_query("SELECT * FROM `news_slideshow` WHERE `visable`=1 ORDER BY `order` DESC LIMIT 0, 6");
+ while($echo_slidenav = mysql_fetch_array($get_slidenav)){
+
+ echo '<td id="'.$y.'" width="'.$width.'%" class="slidenav" onClick="nextSlide(this.id,true)" onmouseover="mouseOverBG(this.id)" onmouseout="mouseOutBG(this.id)">'.$echo_slidenav['title'].'</td>';
+ $y++;
+ }
+?>
+ </tr>
+ </table>
+</div></div>
+<?php CloseTable(); ?>
+<!-- END News Reel --> \ No newline at end of file
diff --git a/modules/newsreel/slides/arma2move.png b/modules/newsreel/slides/arma2move.png
new file mode 100644
index 0000000..7c7c419
--- /dev/null
+++ b/modules/newsreel/slides/arma2move.png
Binary files differ
diff --git a/modules/newsreel/slides/newsite.png b/modules/newsreel/slides/newsite.png
new file mode 100644
index 0000000..88a28e8
--- /dev/null
+++ b/modules/newsreel/slides/newsite.png
Binary files differ
diff --git a/modules/newsreel/slides/recruitmentGT.png b/modules/newsreel/slides/recruitmentGT.png
new file mode 100644
index 0000000..c74ae8c
--- /dev/null
+++ b/modules/newsreel/slides/recruitmentGT.png
Binary files differ
diff --git a/modules/newsreel/slides/teamwork.png b/modules/newsreel/slides/teamwork.png
new file mode 100644
index 0000000..99f760b
--- /dev/null
+++ b/modules/newsreel/slides/teamwork.png
Binary files differ
diff --git a/modules/page/index.php b/modules/page/index.php
new file mode 100644
index 0000000..e5ac25e
--- /dev/null
+++ b/modules/page/index.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+define("MODULE_FAIL", "You cannot access this module directly.<br/>\n",true);
+
+if(!defined("MODULE_FILE"))
+{
+ die(MODULE_FAIL);
+}
+
+global $db;
+
+
+if(!isset($_GET['id']))
+{
+ //ReportError("No page has been requested.<br>\n");
+ // return 1;
+ $id = 1; //makes it so that the default page is the home page
+}else{
+ $id = $_GET['id'];
+}
+
+$result = $db->Query("SELECT u.username AS author, p.page_created, p.title, p.text FROM `bayonet_pages` AS p LEFT OUTER JOIN `bayonet_users` AS u ON u.user_id = p.author_id WHERE p.page_id = '$id'");
+$proceed = mysql_num_rows($result);
+
+if($proceed > 0)
+{
+ while(($row = $db->Fetch($result))!==false)
+ {
+ $page = $row;
+ OpenTable();
+ echo "<div class=\"content\">";
+ $aresult = $db->Query("SELECT * FROM `bayonet_articles` WHERE `page_id` = $id ORDER BY `weight` ASC");
+ while(($article = $db->Fetch($aresult))!==false)
+ {
+ $articleTitle = $article['title'];
+ echo '<h2>'.$articleTitle.'</h2>';
+ //echo "<h3>".$article['title']."</h3>";
+ echo BBCode($article['text']);
+ }
+ echo "</div>";
+ CloseTable();
+
+ }
+ ?>
+ <?php // echo bbcode_format($page['text']) ?>
+ <!-- <tr><th><?php echo $page['author'] ?></th></tr> -->
+ <?php
+}
+else
+{
+ ReportError("Page does not exist.<br>\n");
+}
+
+?> \ No newline at end of file
diff --git a/modules/tsviewer/index.php b/modules/tsviewer/index.php
new file mode 100644
index 0000000..18ee7c5
--- /dev/null
+++ b/modules/tsviewer/index.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Bayonet Content Management System
+ * Copyright (C) 2008 Joseph Hunkeler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if(!defined("MODULE_FILE"))
+{
+ echo "Access denied...";
+ return;
+}
+
+OpenTable();
+echo "<tr><th>How to Connect</th></tr><tr><td style=\"text-align:center;\"><p>IP: 64.214.185.50:9004</p><p>Password: Garand</p></td></tr>";
+CloseTable();
+
+
+OpenTable();
+echo "<tr><th>Teamspeak Server</th></tr><tr><td>";
+/*echo "<div style=\"vertical-align:middle; margin-left:40%; margin-right:auto;\">\n";*/
+echo "<div style=\"width: 30%; margin-left: auto; margin-right: auto;\">\n";
+?>
+<script language="javascript" type="text/javascript" src="http://www.tsviewer.com/ts_viewer_pur.php?ID=58659&bg=transparent&type=eee&type_size=11&type_family=1&info=1&channels=1&users=1&js=1&type_s_weight=normal&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_weight_h=normal&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=none&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=none&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=none&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none"></script><NOSCRIPT>Enable JavaScript to see TeamSpeak Viewer or click <a href="http://www.tsviewer.com/index.php?page=ts_viewer&ID=58659">here</a>.</NOSCRIPT>
+<?php
+echo "</div>\n";
+echo "</td></tr>";
+CloseTable();
+
+
+?>