From a0701d581dfa39113c1af68637118d99d5a0822a Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Wed, 27 Jan 2010 02:52:17 +0000 Subject: commit just prior to some pure insanity. implementing theme system git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@463 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- admin/adjutant/functions.php | 21 +++++++++----- admin/index.php | 1 + admin/navigation/functions.php | 56 ++++++++++++++++++++++++++++++++++++-- admin/style.css | 8 ++++++ blocks/mini_calendar/style.css | 36 ++++++++++++------------ blocks/rss_agw/index.php | 2 +- footer.php | 15 +++++----- includes/classes.php | 4 +-- includes/functions.php | 9 +++--- index.php | 14 ++-------- modules/admin/admin_functions.php | 17 ++++++------ modules/admin/index.php | 8 +++--- modules/admin/operation.php | 4 +-- modules/rudi/views/view.drills.php | 29 +++++++++++++++++--- style.css | 22 +++++++++------ 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); ?> - +
+
+
RankSoldierStatus
- radioButton('status', 1, true); ?>Active
- radioButton('status', 2); ?>On Leave
- radioButton('status', 3); ?>On Extended Leave + radioButton('status', 1, $row['status_id'] == 1 ? true : false); ?>Active
+ radioButton('status', 2, $row['status_id'] == 2 ? true : false); ?>On Leave
+ radioButton('status', 3, $row['status_id'] == 3 ? true : false); ?>On Extended Leave
submitButton('processed'); ?>
+ __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 @@ + + + Query("SELECT `nav_id`, `title`, `weight` FROM `bayonet_navigation` ORDER BY `weight`"); $data = $db->Fetch($result); - echo "|0|Home|0|
"; + ?> +
+ + + + + +
News Reel Order
+ + Click and drag on a slide to change the order. Wait for confirmation indicating the changes have been saved. +
+ \ 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); ?> - - + + - \ No newline at end of file + + \ 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 "\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 "\n"; + echo "\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) '$2', '', '$1', - '$2' + '$2', + '
  • $1
  • ' ); - $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 "\n"; + echo "
    \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';
    - - - + -
    +
    - - - - - - 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 . */ - + /* 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 "
    - -
    \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 "
    {$title}
    "; } -/** + * CloseTable() * * @return - */ + function CloseTable_Ex() { echo "
    "; } - + */ ?> \ 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 . */ - + /* if(!defined("MODULE_FILE")) { die("Access denied."); @@ -30,12 +30,12 @@ logout(); } -/* if(login()) + if(login()) { //this is so dirty... sigh. if(is_loggedin()) { - */ ?> + ?> @@ -66,7 +66,7 @@
    - . */ - + /* 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(); ?> - +
    Drills
    +
    + @@ -53,7 +58,7 @@ function Rating($val) - + manifest->members as $member): ?> @@ -67,7 +72,7 @@ function Rating($val) - +
    NewsSoldier Performance Rating Initiative RatingEarly ExcusalExcusal Excusal Reason
        excusal ? "Yes" : "No"); ?> excusal_reason; ?> evalData($member->excusal_reason); ?> 
    @@ -93,9 +98,25 @@ function Rating($val) - +
    + +
    Statistics
    +
    +getMemberAttendanceFull()); +require_once 'view.drills.statistics.php'; +?> +
    + + + +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; -- cgit