aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/adjutant/functions.php21
-rw-r--r--admin/index.php1
-rw-r--r--admin/navigation/functions.php56
-rw-r--r--admin/style.css8
-rw-r--r--blocks/mini_calendar/style.css36
-rw-r--r--blocks/rss_agw/index.php2
-rw-r--r--footer.php15
-rw-r--r--includes/classes.php4
-rw-r--r--includes/functions.php9
-rw-r--r--index.php14
-rw-r--r--modules/admin/admin_functions.php17
-rw-r--r--modules/admin/index.php8
-rw-r--r--modules/admin/operation.php4
-rw-r--r--modules/rudi/views/view.drills.php29
-rw-r--r--style.css22
15 files changed, 166 insertions, 80 deletions
diff --git a/admin/adjutant/functions.php b/admin/adjutant/functions.php
index 261c122..57e9fe8 100644
--- a/admin/adjutant/functions.php
+++ b/admin/adjutant/functions.php
@@ -66,7 +66,7 @@
}
- function editLOAs($status_id = 1){
+ function EditLOAs($status_id = 1){
global $db;
@@ -116,28 +116,35 @@ $num = 1;
function EditStatus($member_id){
global $db;
- $form = new BayonetForm($_SERVER['PHP_SELF'], "POST");
+ $form = new BayonetForm("", "POST");
if($form->VerifySubmit('processed')){
-
+ echo "Please wait while your information is being processed...";
+ $status_id = $form->request['status'];
+ $db->query("UPDATE `rudi_unit_members` SET `status_id` = '$status_id' WHERE `member_id` = '$member_id' LIMIT 1");
+ PageRedirect(1, "?op=adjutant&edit=loas&member={$member_id}");
return;
}
$result = $db->Query("SELECT * FROM `rudi_unit_members` JOIN `rudi_ranks` ON rudi_unit_members.rank_id=rudi_ranks.rank_id WHERE `member_id` = '$member_id' LIMIT 1");
$row = $db->FetchRow($result);
?>
- <table width="100%" style="text-align:center;">
+ <center>
+ <table width="50%" style="text-align:center;">
<tr><th>Rank</th><th>Soldier</th><th>Status</th></tr>
<tr>
<td><?php echo $row['shortname']; ?></td>
<td><?php echo $row['first_name']." ".$row['last_name']; ?></td>
<td style="text-align:left;">
- <?php $form->radioButton('status', 1, true); ?>Active<br />
- <?php $form->radioButton('status', 2); ?>On Leave<br />
- <?php $form->radioButton('status', 3); ?>On Extended Leave
+ <?php $form->radioButton('status', 1, $row['status_id'] == 1 ? true : false); ?>Active<br />
+ <?php $form->radioButton('status', 2, $row['status_id'] == 2 ? true : false); ?>On Leave<br />
+ <?php $form->radioButton('status', 3, $row['status_id'] == 3 ? true : false); ?>On Extended Leave
</td>
</tr>
+ <tr><td colspan="3"><?php $form->submitButton('processed'); ?></td></tr>
</table>
+ </center>
<?php
+
$form->__destruct();
}
diff --git a/admin/index.php b/admin/index.php
index 511418f..8801978 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -31,6 +31,7 @@ $db->Connect(
$config['sql']['password']
);
$db->Select_db($config['sql']['database']);
+
//$config['logs']['dir'] = "../logs/";
include 'header.php';
diff --git a/admin/navigation/functions.php b/admin/navigation/functions.php
index 2287944..68ab7c3 100644
--- a/admin/navigation/functions.php
+++ b/admin/navigation/functions.php
@@ -1,3 +1,41 @@
+<style>
+
+ul {
+ margin: 0;
+}
+
+#contentLeft {
+ width: 400px;
+}
+
+#contentLeft li {
+ list-style: none;
+ margin: 0 0 4px 0;
+ padding: 10px;
+ background-color:#a1a1a1;
+ border: #CCCCCC solid 1px;
+ color:#fff;
+ text-align:center;
+ cursor:move;
+}
+
+</style>
+<script type="text/javascript" src="scripts/jquery-ui-1.7.1.custom.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function(){
+
+ $(function() {
+ $("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
+ var order = $(this).sortable("serialize") + '&action=updateOrder';
+ $.post("navigation/updateDB.php", order, function(theResponse){
+ $("#updateStatus").html(theResponse);
+ });
+ }
+ });
+ });
+
+});
+</script>
<?php
/**
* Bayonet Content Management System
@@ -28,12 +66,26 @@ function ListNavigation(){
$result = $db->Query("SELECT `nav_id`, `title`, `weight` FROM `bayonet_navigation` ORDER BY `weight`");
$data = $db->Fetch($result);
- echo "|0|Home|0|<br />";
+ ?>
+ <div id="contentLeft">
+ <table>
+ <tr>
+ <th>News Reel Order</th>
+ <td id="updateStatus"></td>
+ </tr>
+ </table>
+ <ul>
+ <?php
foreach($data as $nav){
- echo "|{$nav['nav_id']}|{$nav['title']}|{$nav['weight']}|<br />";
+ echo "<li id=\"recordsArray_{$nav['nav_id']}\">{$nav['title']}</li>";
}
+ ?>
+ </ul>
+ Click and drag on a slide to change the order. Wait for confirmation indicating the changes have been saved.
+ </div>
+ <?php
}
?> \ No newline at end of file
diff --git a/admin/style.css b/admin/style.css
index 281e0b2..686276b 100644
--- a/admin/style.css
+++ b/admin/style.css
@@ -108,6 +108,7 @@ fieldset {
padding:0px;
border: 1px solid #a1a1a1;
}
+
/*********************************
** Content Styles **
*********************************/
@@ -132,4 +133,11 @@ fieldset {
padding:10px;
color:#333333;
}
+
+.left{
+ text-align:left;
+}
+.right{
+ text-align:right;
+}
\ No newline at end of file
diff --git a/blocks/mini_calendar/style.css b/blocks/mini_calendar/style.css
index 792ab69..d34db05 100644
--- a/blocks/mini_calendar/style.css
+++ b/blocks/mini_calendar/style.css
@@ -7,8 +7,8 @@
font-family:arial;
}
td.weekday {
- width:34px;
- height:34px;
+ width:40px;
+ height:20px;
background-color:#cb2121;
color:green;
text-align:center;
@@ -16,8 +16,8 @@
/* font-weight:bold; */
}
th.weekday {
- width:34px;
- height:20px;
+ width:40px;
+ height:29px;
background-color:white;
color:black;
text-align:center;
@@ -25,8 +25,8 @@
font-weight:normal;
}
.monthday {
- /* width:29px; */
- height:36px;
+ width:40px;
+ height:20px;
background-color:#aea2a2;
color:white;
text-align:left;
@@ -35,8 +35,8 @@
}
.monthtoday {
- /* width:25px; */
- height:32px;
+ width:38px;
+ height:38px;
/* background-color:#3666ba; */
color:#225eac;
text-align:center;
@@ -46,8 +46,8 @@
border:1px solid #333333;
}
.event {
- /* width:25px; */
- height:32px;
+ width:38px;
+ height:38px;
background-color:#225eac;
text-align:center;
border:1px solid #333333;
@@ -57,8 +57,8 @@
color:white;
}
.eventtoday {
- /* width:25px; */
- height:32px;
+ width:38px;
+ height:38px;
background-color:#225eac;
color: white;
text-align:center;
@@ -68,8 +68,8 @@
border:1px solid #333333;
}
td.cal_weekday {
- width:34px;
- height:34px;
+ width:40px;
+ height:40px;
background-color:#a1a1a1;
vertical-align:top;
color:#eeeeee;
@@ -78,8 +78,8 @@
font-size:12px;
}
td.cal_weekend {
- width:34px;
- height:34px;
+ width:40px;
+ height:40px;
background-color:#8f8f8f;
vertical-align:top;
color:#eeeeee;
@@ -88,8 +88,8 @@
font-size:12px;
}
td.cal_notmonth {
- width:34px;
- height:34px;
+ width:40px;
+ height:40px;
background-color:#6e6e6e;
vertical-align:top;
color:#d4d4d4;
diff --git a/blocks/rss_agw/index.php b/blocks/rss_agw/index.php
index 3a492ca..21506bb 100644
--- a/blocks/rss_agw/index.php
+++ b/blocks/rss_agw/index.php
@@ -57,7 +57,7 @@ if ($agwProcess === true) {
$options = array(CURLOPT_FORBID_REUSE => true,
CURLOPT_POST => false,
CURLOPT_RETURNTRANSFER => true,
- CURLOPT_TIMEOUT => 15,
+ CURLOPT_TIMEOUT => 3,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Compatible; libCURL)',
CURLOPT_VERBOSE => false);
diff --git a/footer.php b/footer.php
index 48cb061..cbbd2bd 100644
--- a/footer.php
+++ b/footer.php
@@ -24,12 +24,6 @@ $debug_output = sprintf("Page generated in %.3f seconds | Memory: real(%.3fmb) p
$totaltime, ((float)memory_get_usage()/1024/1024), ((float)memory_get_peak_usage()/1024/1024), $phpversion, $db_connections, $db_queries, $db_fetches, $db_frees);
?>
-<?php
- if($config['debug']['enabled']){
- logQueueFlush();
- }
-?>
-
<div class="footer">
<br />
@@ -47,6 +41,13 @@ $debug_output = sprintf("Page generated in %.3f seconds | Memory: real(%.3fmb) p
</div>
+<?php
+ if($config['debug']['enabled']){
+ logQueueFlush();
+ }
+?>
+
</body>
</html>
-<?php ob_flush();?> \ No newline at end of file
+<?php ob_flush();?>
+ \ No newline at end of file
diff --git a/includes/classes.php b/includes/classes.php
index 33794c2..0042c95 100644
--- a/includes/classes.php
+++ b/includes/classes.php
@@ -68,13 +68,13 @@ class BayonetForm
echo "<input type=\"reset\" value=\"{$value}\" />\n";
}
- function textField($extern_name, $value = NULL, $isPassword = false)
+ function textField($extern_name, $value = NULL, $isPassword = false, $size = NULL, $max = NULL)
{
$type = 'text';
if($isPassword) $type = 'password';
$value = filter_var($value, FILTER_SANITIZE_STRING);
- echo "<input type=\"{$type}\" name=\"{$extern_name}\" value=\"$value\" />\n";
+ echo "<input type=\"{$type}\" name=\"{$extern_name}\" value=\"$value\" size=\"{$size}\" maxLength=\"{$max}\" />\n";
}
function radioButton($extern_name, $value, $isChecked = false)
diff --git a/includes/functions.php b/includes/functions.php
index 09fc456..3f1c3d2 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -54,7 +54,8 @@ function bbcode_format ($str)
'/\[img\=(.*?)\](.*?)\[\/img\]/is',
'/\[img align\=(.+?)\](.+?)\[\/img\]/is',
'/\[mail\](.*?)\[\/mail\]/is',
- '/\[mail\=(.*?)\](.*?)\[\/mail\]/is'
+ '/\[mail\=(.*?)\](.*?)\[\/mail\]/is',
+ '/\[list\](.*?)\[\/list\]/is'
);
$simple_replace = array(
@@ -77,10 +78,10 @@ function bbcode_format ($str)
'<img src="$1" alt="$2"/>',
'<img src=\"$2\" align=\"$1\" />',
'<a href="mailto:$1">$1</a>',
- '<a href="mailto:$1">$2</a>'
+ '<a href="mailto:$1">$2</a>',
+ '<li style="list-style-position: inside; padding:10px">$1</li>'
);
-
$str = preg_replace ($simple_search, $simple_replace, $str);
$str = nl2br($str);
return $str;
@@ -313,7 +314,7 @@ if(!defined("CALLED_FROM_ADMIN"))
function OpenTable($width = "100%")
{
//width="100%" is important. Otherwise all of our tables will be text width.
- echo "<table width=\"{$width}\" align=\"center\" class=\"cleartable\">\n";
+ echo "<table width=\"{$width}\" align=\"center\">\n";
}
/**
diff --git a/index.php b/index.php
index 68fa637..0cc230a 100644
--- a/index.php
+++ b/index.php
@@ -35,23 +35,13 @@ include 'header.php';
<div class="container">
<!-- banner -->
-<!-- <div class="banner"><a href="index.php"><img src="images/logo.jpg" alt="3rd Infantry Division - ArmAII Unit" /></a></div> -->
-<div class="banner"><a href="index.php"><img src="images/3rdidtext.png" alt="3rd Infantry Division - ArmAII Unit" /></a></div>
-
+ <div class="banner"><a href="index.php"><img src="images/logo.jpg" alt="3rd Infantry Division - ArmAII Unit" /></a></div>
<!-- navigation -->
<div class="nav"><?php require_once 'navigation.php'; ?></div>
<!-- content -->
-<table border="0" cellspacing="10px" cellpadding="0" class="main" width="100%">
+<table border="0" cellspacing="15px" cellpadding="0" class="main" width="100%">
<tr>
-
- <!-- block area LEFT -->
- <?php //if(!defined('BLOCK_LEFT_DISABLE')): ?>
- <td class="leftcol">
- <?php GetBlocks(BLOCK_LEFT); ?>
- </td>
- <?php //endif; ?>
-
<td class="midcol">
<?php require_once 'modules.php'; ?>
</td>
diff --git a/modules/admin/admin_functions.php b/modules/admin/admin_functions.php
index 30a40d0..6c2b394 100644
--- a/modules/admin/admin_functions.php
+++ b/modules/admin/admin_functions.php
@@ -16,7 +16,7 @@
* 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.");
@@ -86,7 +86,7 @@ function logout()
session_unset();
session_destroy();
}
-
+*/
/**
* CompileAdmin()
*
@@ -99,9 +99,10 @@ function logout()
* @param mixed $body
* @return
*/
+ /*
function CompileAdmin($head,$body)
{
- /*if we were not passed arrays, then say goodbye*/
+ /*if we were not passed arrays, then say goodbye
if(!is_array($head) || !is_array($body))
{
echo "must be array\n";
@@ -123,7 +124,7 @@ function CompileAdmin($head,$body)
echo "</tr></table>\n";
}
-/**
+
* OpenTable()
*
* The administration OpenTable() function requires an argument to define
@@ -132,20 +133,20 @@ function CompileAdmin($head,$body)
*
* @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/index.php b/modules/admin/index.php
index 4dd4539..fc379ea 100644
--- a/modules/admin/index.php
+++ b/modules/admin/index.php
@@ -16,7 +16,7 @@
* 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.");
@@ -30,12 +30,12 @@
logout();
}
-/* if(login())
+ 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>
@@ -66,7 +66,7 @@
</table>
</div>
- <?php /*)
+ <?php )
}
} */
diff --git a/modules/admin/operation.php b/modules/admin/operation.php
index 0ac2a9b..2c66ff4 100644
--- a/modules/admin/operation.php
+++ b/modules/admin/operation.php
@@ -16,7 +16,7 @@
* 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.");
@@ -49,5 +49,5 @@ else
}
-
+*/
?> \ No newline at end of file
diff --git a/modules/rudi/views/view.drills.php b/modules/rudi/views/view.drills.php
index 5fcd18e..aa4b30a 100644
--- a/modules/rudi/views/view.drills.php
+++ b/modules/rudi/views/view.drills.php
@@ -25,9 +25,14 @@ function Rating($val)
return "Bad Value";
}
+//$this->getMemberAttendance();
+
+OpenContent();
?>
-<?php if(isset($_GET['id'])): ?>
+<div class="contentHeading">Drills</div>
+<div class="content">
+<?php if(isset($_GET['id'])): ?>
<table cellspacing="20" class="rudi" align="left" style="width: 100%;">
<tr>
<th class="header">News</th>
@@ -53,7 +58,7 @@ function Rating($val)
<th class="header">Soldier</th>
<th class="header">Performance Rating</th>
<th class="header">Initiative Rating</th>
- <th class="header">Early Excusal</th>
+ <th class="header">Excusal</th>
<th class="header">Excusal Reason</th>
</tr>
<?php foreach($drills->manifest->members as $member): ?>
@@ -67,7 +72,7 @@ function Rating($val)
<td class="rudi"><?php echo $pRating; ?>&nbsp;</td>
<td class="rudi"><?php echo $iRating; ?>&nbsp;</td>
<td class="rudi"><?php echo ($member->excusal ? "Yes" : "No"); ?>&nbsp;</td>
- <td class="rudi"><?php echo $member->excusal_reason; ?>&nbsp;</td>
+ <td class="rudi"><?php echo $this->evalData($member->excusal_reason); ?>&nbsp;</td>
</tr>
<?php endforeach; ?>
</table>
@@ -93,9 +98,25 @@ function Rating($val)
<?php endforeach; ?>
</table>
-
+</div>
<?php
+CloseContent();
+OpenContent();
+?>
+<?php if(isset($_GET['stats']) && $_GET['stats'] == 'true'): ?>
+<div class="contentHeading">Statistics</div>
+<div class="content">
+<?php
+//decho($drills->getMemberAttendanceFull());
+require_once 'view.drills.statistics.php';
+?>
+</div>
+</div>
+<?php endif; ?>
+
+<?php
+CloseContent();
decho('DATA FOR NO ID QUERY');
decho($drills->manifest);
?>
diff --git a/style.css b/style.css
index a24d9ff..103c21b 100644
--- a/style.css
+++ b/style.css
@@ -2,16 +2,15 @@
** Layout Styles **
*********************************/
div.container {
- /* width: 990px; */
+ width: 990px;
/* width: 1000px; */
color: #000000;
- /* margin: auto auto; */
+ margin: auto auto;
text-align: left; /* IE 5 fix */
}
div.banner {
/* width: 990px; */
text-align:center;
- background-image:url('images/3rdbanner.png')
/* margin: auto auto; */
}
div.nav {
@@ -25,26 +24,25 @@
font-size:14px;
}
table.main {
- /* background-image:url('images/sandbackground.jpg'); */
+ background-image:url('images/sandbackground.jpg');
padding: 0px;
color:#ffffff;
- /* width:990px; */
+ width:990px;
/*width: 1134px; */
/* width: 1234px; */
- /* margin: auto auto; */
- /* background-color:#a3a2a0; */
+ margin: auto auto;
+ background-color:#a3a2a0;
}
table.main td {
/* color:white; */
}
td.midcol {
- /* width: 644px; */
+ width: 644px;
background-color:transparent;
vertical-align:top;
}
td.rightcol {
- width: 275px;
vertical-align:top;
}
td.leftcol {
@@ -84,6 +82,9 @@
div.content {
padding:10px;
color:#333333;
+ /*background-color:#383838;
+ color:white; */
+ background-color:#f1f1f1;
}
div.content img {
padding:10px;
@@ -162,6 +163,9 @@
font-size:12px;
text-decoration:underline;
}
+ a.rudi_roster, a.rudi_roster:visited, a.rudi_roster:active, a.rudi_roster:hover {
+ color:#2b5bae;
+ }
body {
background-color:#091a34;
margin:0;