From 0077cb99704fe863cf731fc5cab792af2ede96c2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 17 Apr 2011 20:13:07 -0400 Subject: Backporting retarded amount of changes outside of version control --- modules/admin/admin_functions.php | 302 ++++----- modules/admin/blocks/functions.php | 346 +++++----- modules/admin/blocks/index.php | 116 ++-- modules/admin/index.php | 144 ++--- modules/admin/operation.php | 104 +-- modules/admin/pages/functions.php | 454 ++++++------- modules/admin/pages/index.php | 136 ++-- modules/cu3er/config.xml | 86 +++ modules/cu3er/config2.xml | 80 +++ modules/cu3er/cu3er.swf | Bin 0 -> 127487 bytes modules/cu3er/cuber.html | 25 + modules/cu3er/demo.htm | 35 + modules/cu3er/images/agwc3.png | Bin 0 -> 125318 bytes modules/cu3er/images/arma2.png | Bin 0 -> 390955 bytes modules/cu3er/images/arma2move.png | Bin 0 -> 409863 bytes modules/cu3er/images/holidays.png | Bin 0 -> 476292 bytes modules/cu3er/images/newsite.png | Bin 0 -> 251441 bytes modules/cu3er/images/recruitmentGT.png | Bin 0 -> 277092 bytes modules/cu3er/images/slide_1.jpg | Bin 0 -> 7729 bytes modules/cu3er/images/slide_2.jpg | Bin 0 -> 7374 bytes modules/cu3er/images/slide_3.jpg | Bin 0 -> 8544 bytes modules/cu3er/images/slide_4.jpg | Bin 0 -> 7930 bytes modules/cu3er/images/slide_5.jpg | Bin 0 -> 6966 bytes modules/cu3er/images/team.png | Bin 0 -> 369306 bytes modules/cu3er/images/team2.png | Bin 0 -> 370251 bytes modules/cu3er/images/teamwork.png | Bin 0 -> 83906 bytes modules/cu3er/index.php | 35 + modules/cu3er/js/swfobject/expressInstall.swf | Bin 0 -> 732 bytes modules/cu3er/js/swfobject/swfobject.js | 777 +++++++++++++++++++++++ modules/cu3er/license.txt | 53 ++ modules/download/files/MILPACS_RC1_b.zip | Bin 0 -> 703837 bytes modules/download/files/MarneMessenger_1-1.pdf | Bin 0 -> 956575 bytes modules/download/files/MarneMessenger_1-2.pdf | Bin 0 -> 1608153 bytes modules/download/files/MarneMessenger_2-1.pdf | Bin 0 -> 568232 bytes modules/download/files/MarneMessenger_2-2.pdf | Bin 0 -> 5640610 bytes modules/download/files/Milpacs_RC2.zip | Bin 0 -> 781652 bytes modules/download/index.php | 268 ++++---- modules/index/index.php | 2 +- modules/news/functions.php | 23 +- modules/news/index.php | 28 +- modules/newsreel/index.php | 9 +- modules/newsreel/slides/agwc3.png | Bin 0 -> 125318 bytes modules/newsreel/slides/arma2.png | Bin 0 -> 390955 bytes modules/newsreel/slides/decade.png | Bin 0 -> 218935 bytes modules/newsreel/slides/drilltimes.png | Bin 0 -> 297915 bytes modules/newsreel/slides/holidays.png | Bin 0 -> 476292 bytes modules/newsreel/slides/joinus.png | Bin 0 -> 376759 bytes modules/newsreel/slides/leadership.png | Bin 0 -> 545745 bytes modules/newsreel/slides/team.png | Bin 0 -> 369306 bytes modules/newsreel/slides/team2.png | Bin 0 -> 370251 bytes modules/page/index.php | 1 + modules/rudi/header.php | 16 +- modules/rudi/images/medals/CIB_1st.gif | Bin 0 -> 2952 bytes modules/rudi/images/medals/CIB_2nd.gif | Bin 0 -> 3017 bytes modules/rudi/images/medals/CIB_3rd.gif | Bin 0 -> 2966 bytes modules/rudi/images/medals/CoD2.gif | Bin 0 -> 3810 bytes modules/rudi/images/medals/CoD2.jpg | Bin 0 -> 17220 bytes modules/rudi/images/medals/DUC.jpg | Bin 0 -> 26590 bytes modules/rudi/images/medals/SM.gif | Bin 0 -> 2275 bytes modules/rudi/images/medals/SS.gif | Bin 0 -> 1728 bytes modules/rudi/images/medals/afem.jpg | Bin 0 -> 15397 bytes modules/rudi/images/medals/arma2duc.jpg | Bin 0 -> 19957 bytes modules/rudi/images/medals/cib1.png | Bin 0 -> 13451 bytes modules/rudi/images/medals/cib2.png | Bin 0 -> 14463 bytes modules/rudi/images/medals/cib3.png | Bin 0 -> 14610 bytes modules/rudi/images/medals/cib4.png | Bin 0 -> 15201 bytes modules/rudi/images/medals/cod4unitcit.jpg | Bin 0 -> 18868 bytes modules/rudi/images/medals/dsm.jpg | Bin 18088 -> 14066 bytes modules/rudi/images/medals/eib.jpg | Bin 0 -> 12895 bytes modules/rudi/images/medals/eib.png | Bin 0 -> 4664 bytes modules/rudi/images/medals/expert.gif | Bin 0 -> 8271 bytes modules/rudi/images/medals/oak_leaf_clusters.gif | Bin 0 -> 2527 bytes modules/rudi/images/medals/pass.gif | Bin 0 -> 6413 bytes modules/rudi/images/medals/sniper_qual.gif | Bin 0 -> 8502 bytes modules/rudi/images/medals/sniper_qual.jpg | Bin 0 -> 31834 bytes modules/rudi/images/medals/success.gif | Bin 0 -> 6402 bytes modules/rudi/images/medals/valor_device.gif | Bin 0 -> 1676 bytes modules/rudi/images/medals/valor_device.jpg | Bin 0 -> 10855 bytes modules/rudi/images/ranks/tiny/1LT.png | Bin 0 -> 3239 bytes modules/rudi/images/ranks/tiny/1SG.png | Bin 0 -> 3620 bytes modules/rudi/images/ranks/tiny/2LT.png | Bin 0 -> 3351 bytes modules/rudi/images/ranks/tiny/CPL.png | Bin 0 -> 3242 bytes modules/rudi/images/ranks/tiny/CPT.png | Bin 0 -> 3641 bytes modules/rudi/images/ranks/tiny/CW2.png | Bin 0 -> 3364 bytes modules/rudi/images/ranks/tiny/CW3.png | Bin 0 -> 3263 bytes modules/rudi/images/ranks/tiny/CW4.png | Bin 0 -> 3319 bytes modules/rudi/images/ranks/tiny/LTC.png | Bin 0 -> 3921 bytes modules/rudi/images/ranks/tiny/MSG.png | Bin 0 -> 3609 bytes modules/rudi/images/ranks/tiny/PFC.png | Bin 0 -> 3272 bytes modules/rudi/images/ranks/tiny/PV2.png | Bin 0 -> 3248 bytes modules/rudi/images/ranks/tiny/SFC.png | Bin 0 -> 3775 bytes modules/rudi/images/ranks/tiny/SGT.png | Bin 0 -> 3302 bytes modules/rudi/images/ranks/tiny/SPC.png | Bin 0 -> 3175 bytes modules/rudi/images/ranks/tiny/SSG.png | Bin 0 -> 3698 bytes modules/rudi/images/ranks/tiny/WO1.png | Bin 0 -> 3222 bytes modules/rudi/images/uniform/ACoia.png | Bin 287047 -> 304441 bytes modules/rudi/images/uniform/ACourter.png | Bin 0 -> 329375 bytes modules/rudi/images/uniform/ADodge.png | Bin 0 -> 292604 bytes modules/rudi/images/uniform/AHernandez.png | Bin 0 -> 289382 bytes modules/rudi/images/uniform/AKlassen.png | Bin 0 -> 291212 bytes modules/rudi/images/uniform/ASherman.png | Bin 0 -> 303127 bytes modules/rudi/images/uniform/AZanesco.png | Bin 0 -> 289215 bytes modules/rudi/images/uniform/BMorgan.png | Bin 0 -> 288752 bytes modules/rudi/images/uniform/BSegal.png | Bin 303105 -> 296393 bytes modules/rudi/images/uniform/BWhiting.png | Bin 0 -> 309101 bytes modules/rudi/images/uniform/DHolson.png | Bin 291465 -> 307160 bytes modules/rudi/images/uniform/DKillian.png | Bin 0 -> 294978 bytes modules/rudi/images/uniform/EOConnell.png | Bin 304203 -> 305521 bytes modules/rudi/images/uniform/GTownsend.png | Bin 305424 -> 301622 bytes modules/rudi/images/uniform/INewton.png | Bin 0 -> 289010 bytes modules/rudi/images/uniform/JCiciotti.png | Bin 0 -> 289503 bytes modules/rudi/images/uniform/JHiggins.jpg | Bin 0 -> 172237 bytes modules/rudi/images/uniform/JHiggins.png | Bin 0 -> 261094 bytes modules/rudi/images/uniform/JMagers.png | Bin 0 -> 289275 bytes modules/rudi/images/uniform/JMelnyk.png | Bin 287114 -> 291327 bytes modules/rudi/images/uniform/JMervau.png | Bin 0 -> 289068 bytes modules/rudi/images/uniform/JSchroeder.png | Bin 0 -> 289372 bytes modules/rudi/images/uniform/KGrimes.png | Bin 301461 -> 309873 bytes modules/rudi/images/uniform/KOlson.png | Bin 0 -> 291381 bytes modules/rudi/images/uniform/LTrimble.png | Bin 302003 -> 300908 bytes modules/rudi/images/uniform/MAbballe.png | Bin 0 -> 292696 bytes modules/rudi/images/uniform/MCampeau.png | Bin 0 -> 294217 bytes modules/rudi/images/uniform/MLula.png | Bin 311178 -> 303705 bytes modules/rudi/images/uniform/MMark.png | Bin 301887 -> 298883 bytes modules/rudi/images/uniform/PBurris.png | Bin 303770 -> 304446 bytes modules/rudi/images/uniform/PPederson.png | Bin 289002 -> 293178 bytes modules/rudi/images/uniform/PRadziwonowicz.png | Bin 0 -> 294630 bytes modules/rudi/images/uniform/RECRUIT.png | Bin 0 -> 289726 bytes modules/rudi/images/uniform/RLeahy.png | Bin 308970 -> 303280 bytes modules/rudi/images/uniform/RStewart.png | Bin 0 -> 295927 bytes modules/rudi/images/uniform/SCorsaro.png | Bin 300741 -> 296160 bytes modules/rudi/images/uniform/SDayton.png | Bin 0 -> 299134 bytes modules/rudi/images/uniform/TKleiber.png | Bin 0 -> 292763 bytes modules/rudi/images/uniform/TMichaels.png | Bin 0 -> 293742 bytes modules/rudi/images/uniform/TMoore.png | Bin 0 -> 292788 bytes modules/rudi/images/uniform/ZBarrett.png | Bin 304753 -> 310121 bytes modules/rudi/includes/common.class.php | 303 ++++++++- modules/rudi/includes/information.class.php | 66 +- modules/rudi/includes/rudi.css | 76 ++- modules/rudi/index.php | 14 +- modules/rudi/views/view.awards.php | 2 +- modules/rudi/views/view.information.php | 38 +- modules/rudi/views/view.platoon.php | 42 +- modules/rudi/views/view.points.php | 35 + modules/rudi/views/view.profile.php | 64 +- modules/rudi/views/view.roster.php | 82 ++- modules/rudi/views/view.unit.php | 42 +- modules/rudi/views/view.weapons.php | 70 ++ 148 files changed, 2742 insertions(+), 1132 deletions(-) create mode 100644 modules/cu3er/config.xml create mode 100644 modules/cu3er/config2.xml create mode 100644 modules/cu3er/cu3er.swf create mode 100644 modules/cu3er/cuber.html create mode 100644 modules/cu3er/demo.htm create mode 100644 modules/cu3er/images/agwc3.png create mode 100644 modules/cu3er/images/arma2.png create mode 100644 modules/cu3er/images/arma2move.png create mode 100644 modules/cu3er/images/holidays.png create mode 100644 modules/cu3er/images/newsite.png create mode 100644 modules/cu3er/images/recruitmentGT.png create mode 100644 modules/cu3er/images/slide_1.jpg create mode 100644 modules/cu3er/images/slide_2.jpg create mode 100644 modules/cu3er/images/slide_3.jpg create mode 100644 modules/cu3er/images/slide_4.jpg create mode 100644 modules/cu3er/images/slide_5.jpg create mode 100644 modules/cu3er/images/team.png create mode 100644 modules/cu3er/images/team2.png create mode 100644 modules/cu3er/images/teamwork.png create mode 100644 modules/cu3er/index.php create mode 100644 modules/cu3er/js/swfobject/expressInstall.swf create mode 100644 modules/cu3er/js/swfobject/swfobject.js create mode 100644 modules/cu3er/license.txt create mode 100644 modules/download/files/MILPACS_RC1_b.zip create mode 100644 modules/download/files/MarneMessenger_1-1.pdf create mode 100644 modules/download/files/MarneMessenger_1-2.pdf create mode 100644 modules/download/files/MarneMessenger_2-1.pdf create mode 100644 modules/download/files/MarneMessenger_2-2.pdf create mode 100644 modules/download/files/Milpacs_RC2.zip create mode 100644 modules/newsreel/slides/agwc3.png create mode 100644 modules/newsreel/slides/arma2.png create mode 100644 modules/newsreel/slides/decade.png create mode 100644 modules/newsreel/slides/drilltimes.png create mode 100644 modules/newsreel/slides/holidays.png create mode 100644 modules/newsreel/slides/joinus.png create mode 100644 modules/newsreel/slides/leadership.png create mode 100644 modules/newsreel/slides/team.png create mode 100644 modules/newsreel/slides/team2.png create mode 100644 modules/rudi/images/medals/CIB_1st.gif create mode 100644 modules/rudi/images/medals/CIB_2nd.gif create mode 100644 modules/rudi/images/medals/CIB_3rd.gif create mode 100644 modules/rudi/images/medals/CoD2.gif create mode 100644 modules/rudi/images/medals/CoD2.jpg create mode 100644 modules/rudi/images/medals/DUC.jpg create mode 100644 modules/rudi/images/medals/SM.gif create mode 100644 modules/rudi/images/medals/SS.gif create mode 100644 modules/rudi/images/medals/afem.jpg create mode 100644 modules/rudi/images/medals/arma2duc.jpg create mode 100644 modules/rudi/images/medals/cib1.png create mode 100644 modules/rudi/images/medals/cib2.png create mode 100644 modules/rudi/images/medals/cib3.png create mode 100644 modules/rudi/images/medals/cib4.png create mode 100644 modules/rudi/images/medals/cod4unitcit.jpg create mode 100644 modules/rudi/images/medals/eib.jpg create mode 100644 modules/rudi/images/medals/eib.png create mode 100644 modules/rudi/images/medals/expert.gif create mode 100644 modules/rudi/images/medals/oak_leaf_clusters.gif create mode 100644 modules/rudi/images/medals/pass.gif create mode 100644 modules/rudi/images/medals/sniper_qual.gif create mode 100644 modules/rudi/images/medals/sniper_qual.jpg create mode 100644 modules/rudi/images/medals/success.gif create mode 100644 modules/rudi/images/medals/valor_device.gif create mode 100644 modules/rudi/images/medals/valor_device.jpg create mode 100644 modules/rudi/images/ranks/tiny/1LT.png create mode 100644 modules/rudi/images/ranks/tiny/1SG.png create mode 100644 modules/rudi/images/ranks/tiny/2LT.png create mode 100644 modules/rudi/images/ranks/tiny/CPL.png create mode 100644 modules/rudi/images/ranks/tiny/CPT.png create mode 100644 modules/rudi/images/ranks/tiny/CW2.png create mode 100644 modules/rudi/images/ranks/tiny/CW3.png create mode 100644 modules/rudi/images/ranks/tiny/CW4.png create mode 100644 modules/rudi/images/ranks/tiny/LTC.png create mode 100644 modules/rudi/images/ranks/tiny/MSG.png create mode 100644 modules/rudi/images/ranks/tiny/PFC.png create mode 100644 modules/rudi/images/ranks/tiny/PV2.png create mode 100644 modules/rudi/images/ranks/tiny/SFC.png create mode 100644 modules/rudi/images/ranks/tiny/SGT.png create mode 100644 modules/rudi/images/ranks/tiny/SPC.png create mode 100644 modules/rudi/images/ranks/tiny/SSG.png create mode 100644 modules/rudi/images/ranks/tiny/WO1.png create mode 100644 modules/rudi/images/uniform/ACourter.png create mode 100644 modules/rudi/images/uniform/ADodge.png create mode 100644 modules/rudi/images/uniform/AHernandez.png create mode 100644 modules/rudi/images/uniform/AKlassen.png create mode 100644 modules/rudi/images/uniform/ASherman.png create mode 100644 modules/rudi/images/uniform/AZanesco.png create mode 100644 modules/rudi/images/uniform/BMorgan.png create mode 100644 modules/rudi/images/uniform/BWhiting.png create mode 100644 modules/rudi/images/uniform/DKillian.png create mode 100644 modules/rudi/images/uniform/INewton.png create mode 100644 modules/rudi/images/uniform/JCiciotti.png create mode 100644 modules/rudi/images/uniform/JHiggins.jpg create mode 100644 modules/rudi/images/uniform/JHiggins.png create mode 100644 modules/rudi/images/uniform/JMagers.png create mode 100644 modules/rudi/images/uniform/JMervau.png create mode 100644 modules/rudi/images/uniform/JSchroeder.png create mode 100644 modules/rudi/images/uniform/KOlson.png create mode 100644 modules/rudi/images/uniform/MAbballe.png create mode 100644 modules/rudi/images/uniform/MCampeau.png create mode 100644 modules/rudi/images/uniform/PRadziwonowicz.png create mode 100644 modules/rudi/images/uniform/RECRUIT.png create mode 100644 modules/rudi/images/uniform/RStewart.png create mode 100644 modules/rudi/images/uniform/SDayton.png create mode 100644 modules/rudi/images/uniform/TKleiber.png create mode 100644 modules/rudi/images/uniform/TMichaels.png create mode 100644 modules/rudi/images/uniform/TMoore.png create mode 100644 modules/rudi/views/view.points.php create mode 100644 modules/rudi/views/view.weapons.php (limited to 'modules') diff --git a/modules/admin/admin_functions.php b/modules/admin/admin_functions.php index 6c2b394..d0d54a8 100644 --- a/modules/admin/admin_functions.php +++ b/modules/admin/admin_functions.php @@ -1,152 +1,152 @@ -. - */ - /* -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 "
\n"; - OpenTable(); - echo "Administrative Login\n"; - - echo "\n - \n - \n - \n -
Username
Password
\n"; - CloseTable(); - echo "
\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 ""; - echo ""; - - $num = 1; - foreach($body as $td) - { - echo "\n"; - if($num%4 == 0){ - echo ""; - } - $num++; - } - echo "
$td
\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 "
{$title}
"; -} - - - * CloseTable() - * - * @return - -function CloseTable_Ex() -{ - echo "
"; -} - */ +. + */ + /* +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 "
\n"; + OpenTable(); + echo "Administrative Login\n"; + + echo "\n + \n + \n + \n +
Username
Password
\n"; + CloseTable(); + echo "
\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 ""; + echo ""; + + $num = 1; + foreach($body as $td) + { + echo "\n"; + if($num%4 == 0){ + echo ""; + } + $num++; + } + echo "
$td
\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 "
{$title}
"; +} + + + * CloseTable() + * + * @return + +function CloseTable_Ex() +{ + echo "
"; +} + */ ?> \ No newline at end of file diff --git a/modules/admin/blocks/functions.php b/modules/admin/blocks/functions.php index 0138839..2c7b166 100644 --- a/modules/admin/blocks/functions.php +++ b/modules/admin/blocks/functions.php @@ -1,173 +1,173 @@ -. - */ - -function ListBlocks() -{ - global $db; - $result = $db->Query("SELECT * FROM bayonet_blocks"); - $blocks = $db->Fetch(); - - echo ""; - foreach($blocks as $block) - { - echo ""; - } - echo "
Existing Blocks
{$block['weight']} : {$block['dir_name']}EditDelete
"; -} - -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; - } - - ?> -
- - - - - - -
Weight
Position
Directory Name
Active -
-
- 'Yes',0 => 'No'); - foreach($options as $option => $value) - { - $selected = NULL; - if($active == $option) - { - $selected = "selected"; - } - echo "\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. - // {{{ XXX: FIXME -- Re-write this - /* - $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; - } - */ - // }}} - ?> -
- - - - - - - -
Weight
Position
Directory Name
Active - -
-
- 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; - } - - ?> -
- - - -
Are you SURE you want to delete the block titled: ''?
   
-
- +. + */ + +function ListBlocks() +{ + global $db; + $result = $db->Query("SELECT * FROM bayonet_blocks"); + $blocks = $db->Fetch(); + + echo ""; + foreach($blocks as $block) + { + echo ""; + } + echo "
Existing Blocks
{$block['weight']} : {$block['dir_name']}EditDelete
"; +} + +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; + } + + ?> +
+ + + + + + +
Weight
Position
Directory Name
Active +
+
+ 'Yes',0 => 'No'); + foreach($options as $option => $value) + { + $selected = NULL; + if($active == $option) + { + $selected = "selected"; + } + echo "\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. + // {{{ XXX: FIXME -- Re-write this + /* + $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; + } + */ + // }}} + ?> +
+ + + + + + + +
Weight
Position
Directory Name
Active + +
+
+ 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; + } + + ?> +
+ + + +
Are you SURE you want to delete the block titled: ''?
   
+
+ diff --git a/modules/admin/blocks/index.php b/modules/admin/blocks/index.php index 6dac3d2..8d63b6d 100644 --- a/modules/admin/blocks/index.php +++ b/modules/admin/blocks/index.php @@ -1,59 +1,59 @@ -. - */ - -/** - * 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 "
".LinkInternal('Create a Block','?load=admin&op=blocks&create=true')."
"; - -ListBlocks(); - +. + */ + +/** + * 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 "
".LinkInternal('Create a Block','?load=admin&op=blocks&create=true')."
"; + +ListBlocks(); + ?> \ No newline at end of file diff --git a/modules/admin/index.php b/modules/admin/index.php index fc379ea..667dc6e 100644 --- a/modules/admin/index.php +++ b/modules/admin/index.php @@ -1,73 +1,73 @@ -. - */ - /* - 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()) - { - ?> - - - - - - -
- -
-
- Administrative Tools: -
Manage Pages','?load=admin&op=pages'), - LinkInternal('
Edit Navigation','?load=admin'), - LinkInternal('
Edit Announcements','?load=admin'), - LinkInternal('
Manage Events','?load=admin'), - LinkInternal('
Manage Galleries', '?load=admin') - - ); - - //render administration table - CompileAdmin($th,$td); - ?> -
- -
- - . + */ + /* + 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()) + { + ?> + + + + + + +
+ +
+
+ Administrative Tools: +
Manage Pages','?load=admin&op=pages'), + LinkInternal('
Edit Navigation','?load=admin'), + LinkInternal('
Edit Announcements','?load=admin'), + LinkInternal('
Manage Events','?load=admin'), + LinkInternal('
Manage Galleries', '?load=admin') + + ); + + //render administration table + CompileAdmin($th,$td); + ?> +
+ +
+ + \ No newline at end of file diff --git a/modules/admin/operation.php b/modules/admin/operation.php index 2c66ff4..4fb687b 100644 --- a/modules/admin/operation.php +++ b/modules/admin/operation.php @@ -1,53 +1,53 @@ -. - */ - /* -if(!defined("ADMIN_FILE")) -{ - die("Access denied."); - return; -} - -if(!isset($_GET['op'])) -{ - echo "
No operation selected
\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."); -} - - -*/ +. + */ + /* +if(!defined("ADMIN_FILE")) +{ + die("Access denied."); + return; +} + +if(!isset($_GET['op'])) +{ + echo "
No operation selected
\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 index fc97ffc..f71f90f 100644 --- a/modules/admin/pages/functions.php +++ b/modules/admin/pages/functions.php @@ -1,227 +1,227 @@ -. - */ - -/** - * 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`"); - $articles = $db->Fetch($result); - - echo ""; - - if(count($articles)==0){ - echo "
There are no articles posted on this page.
"; - return; - } - foreach($articles as $article) - { - if($_GET['aid'] == $article['article_id']) - echo ''; - else - echo ''; - ?> - - ^ - - - - v - - - "; - - - -} - -function EditArticle($article_id){ - - global $db; - //Grab the page from the database according to the $article_id passed to the function. - // {{{ XXX: FIXME -- Needs to be re-written - /* - $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; - } - */ - // }}} - ?> -
- - - -
- - -
-
- Query("SELECT page_id,title FROM bayonet_pages"); - - echo 'Select page: '; - // echo ""; -} - -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; - } - - ?> -

Add New Page

-
- - - - -
Title
Text
-
- 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']; -?> - - - - - - -
 View this Page','?load=page&id='.$page_id); ?> Delete this Page','?load=admin&op=pages&delete='.$page_id); ?>
-
- - - - - -
- - - 0){ - EditArticle($aid); - } - ?> -
- 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; - } - - ?> -
- - - -
Are you SURE you want to delete the page titled: ''?
   
-
- +. + */ + +/** + * 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`"); + $articles = $db->Fetch($result); + + echo ""; + + if(count($articles)==0){ + echo "
There are no articles posted on this page.
"; + return; + } + foreach($articles as $article) + { + if($_GET['aid'] == $article['article_id']) + echo ''; + else + echo ''; + ?> + + ^ + + + + v + + + "; + + + +} + +function EditArticle($article_id){ + + global $db; + //Grab the page from the database according to the $article_id passed to the function. + // {{{ XXX: FIXME -- Needs to be re-written + /* + $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; + } + */ + // }}} + ?> +
+ + + +
+ + +
+
+ Query("SELECT page_id,title FROM bayonet_pages"); + + echo 'Select page: '; + // echo ""; +} + +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; + } + + ?> +

Add New Page

+
+ + + + +
Title
Text
+
+ 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']; +?> + + + + + + +
 View this Page','?load=page&id='.$page_id); ?> Delete this Page','?load=admin&op=pages&delete='.$page_id); ?>
+
+ + + + + +
+ + + 0){ + EditArticle($aid); + } + ?> +
+ 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; + } + + ?> +
+ + + +
Are you SURE you want to delete the page titled: ''?
   
+
+ diff --git a/modules/admin/pages/index.php b/modules/admin/pages/index.php index 0fb6cff..cb36250 100644 --- a/modules/admin/pages/index.php +++ b/modules/admin/pages/index.php @@ -1,68 +1,68 @@ -. - */ - ?> - -
-
- Manage Pages: - - - - - - - - -
-  Create a Page','?load=admin&op=pages&create=true'); ?> -
-
-
+. + */ + ?> + +
+
+ Manage Pages: + + + + + + + + +
+  Create a Page','?load=admin&op=pages&create=true'); ?> +
+
+
diff --git a/modules/cu3er/config.xml b/modules/cu3er/config.xml new file mode 100644 index 0000000..6cfef6e --- /dev/null +++ b/modules/cu3er/config.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/team2.png + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/arma2.png + http://www.3rd-infantry-division.org/forums/index.php?board=13.0 + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/agwc3.png + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/recruitmentGT.png + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/arma2move.png + + + + \ No newline at end of file diff --git a/modules/cu3er/config2.xml b/modules/cu3er/config2.xml new file mode 100644 index 0000000..90db48a --- /dev/null +++ b/modules/cu3er/config2.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/team2.png + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/arma2.png + http://www.3rd-infantry-division.org/forums/index.php?board=13.0 + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/agwc3.png + http://www.armedglobalwarfare.com + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/recruitmentGT.png + + + + + + http://www.3rd-infantry-division.org/modules/cu3er/images/arma2move.png + + + + + diff --git a/modules/cu3er/cu3er.swf b/modules/cu3er/cu3er.swf new file mode 100644 index 0000000..eac3a9e Binary files /dev/null and b/modules/cu3er/cu3er.swf differ diff --git a/modules/cu3er/cuber.html b/modules/cu3er/cuber.html new file mode 100644 index 0000000..c7eee14 --- /dev/null +++ b/modules/cu3er/cuber.html @@ -0,0 +1,25 @@ + + + + + + + + +
+ + Get Adobe Flash player + +
\ No newline at end of file diff --git a/modules/cu3er/demo.htm b/modules/cu3er/demo.htm new file mode 100644 index 0000000..8ff0064 --- /dev/null +++ b/modules/cu3er/demo.htm @@ -0,0 +1,35 @@ + + + + +CU3ER - demo! + + + + + + + + + + +
+ + Get Adobe Flash player + +
+ + diff --git a/modules/cu3er/images/agwc3.png b/modules/cu3er/images/agwc3.png new file mode 100644 index 0000000..7b6f9a7 Binary files /dev/null and b/modules/cu3er/images/agwc3.png differ diff --git a/modules/cu3er/images/arma2.png b/modules/cu3er/images/arma2.png new file mode 100644 index 0000000..94fab4a Binary files /dev/null and b/modules/cu3er/images/arma2.png differ diff --git a/modules/cu3er/images/arma2move.png b/modules/cu3er/images/arma2move.png new file mode 100644 index 0000000..6bffbae Binary files /dev/null and b/modules/cu3er/images/arma2move.png differ diff --git a/modules/cu3er/images/holidays.png b/modules/cu3er/images/holidays.png new file mode 100644 index 0000000..48a1c72 Binary files /dev/null and b/modules/cu3er/images/holidays.png differ diff --git a/modules/cu3er/images/newsite.png b/modules/cu3er/images/newsite.png new file mode 100644 index 0000000..b2d2b69 Binary files /dev/null and b/modules/cu3er/images/newsite.png differ diff --git a/modules/cu3er/images/recruitmentGT.png b/modules/cu3er/images/recruitmentGT.png new file mode 100644 index 0000000..c74ae8c Binary files /dev/null and b/modules/cu3er/images/recruitmentGT.png differ diff --git a/modules/cu3er/images/slide_1.jpg b/modules/cu3er/images/slide_1.jpg new file mode 100644 index 0000000..77706a2 Binary files /dev/null and b/modules/cu3er/images/slide_1.jpg differ diff --git a/modules/cu3er/images/slide_2.jpg b/modules/cu3er/images/slide_2.jpg new file mode 100644 index 0000000..3707266 Binary files /dev/null and b/modules/cu3er/images/slide_2.jpg differ diff --git a/modules/cu3er/images/slide_3.jpg b/modules/cu3er/images/slide_3.jpg new file mode 100644 index 0000000..c633d52 Binary files /dev/null and b/modules/cu3er/images/slide_3.jpg differ diff --git a/modules/cu3er/images/slide_4.jpg b/modules/cu3er/images/slide_4.jpg new file mode 100644 index 0000000..08bc870 Binary files /dev/null and b/modules/cu3er/images/slide_4.jpg differ diff --git a/modules/cu3er/images/slide_5.jpg b/modules/cu3er/images/slide_5.jpg new file mode 100644 index 0000000..2564999 Binary files /dev/null and b/modules/cu3er/images/slide_5.jpg differ diff --git a/modules/cu3er/images/team.png b/modules/cu3er/images/team.png new file mode 100644 index 0000000..fe307c1 Binary files /dev/null and b/modules/cu3er/images/team.png differ diff --git a/modules/cu3er/images/team2.png b/modules/cu3er/images/team2.png new file mode 100644 index 0000000..889a266 Binary files /dev/null and b/modules/cu3er/images/team2.png differ diff --git a/modules/cu3er/images/teamwork.png b/modules/cu3er/images/teamwork.png new file mode 100644 index 0000000..99f760b Binary files /dev/null and b/modules/cu3er/images/teamwork.png differ diff --git a/modules/cu3er/index.php b/modules/cu3er/index.php new file mode 100644 index 0000000..0e5202d --- /dev/null +++ b/modules/cu3er/index.php @@ -0,0 +1,35 @@ + + + + + + + + + +
+ + Get Adobe Flash player + +
+ + + + http://www.3rd-infantry-division.org/forums/index.php?board=13.0 + Enlist Today! + Some text. + */ \ No newline at end of file diff --git a/modules/cu3er/js/swfobject/expressInstall.swf b/modules/cu3er/js/swfobject/expressInstall.swf new file mode 100644 index 0000000..e972996 Binary files /dev/null and b/modules/cu3er/js/swfobject/expressInstall.swf differ diff --git a/modules/cu3er/js/swfobject/swfobject.js b/modules/cu3er/js/swfobject/swfobject.js new file mode 100644 index 0000000..9378c8f --- /dev/null +++ b/modules/cu3er/js/swfobject/swfobject.js @@ -0,0 +1,777 @@ +/*! SWFObject v2.2 + is released under the MIT License +*/ + +var swfobject = function() { + + var UNDEF = "undefined", + OBJECT = "object", + SHOCKWAVE_FLASH = "Shockwave Flash", + SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash", + FLASH_MIME_TYPE = "application/x-shockwave-flash", + EXPRESS_INSTALL_ID = "SWFObjectExprInst", + ON_READY_STATE_CHANGE = "onreadystatechange", + + win = window, + doc = document, + nav = navigator, + + plugin = false, + domLoadFnArr = [main], + regObjArr = [], + objIdArr = [], + listenersArr = [], + storedAltContent, + storedAltContentId, + storedCallbackFn, + storedCallbackObj, + isDomLoaded = false, + isExpressInstallActive = false, + dynamicStylesheet, + dynamicStylesheetMedia, + autoHideShow = true, + + /* Centralized function for browser feature detection + - User agent string detection is only used when no good alternative is possible + - Is executed directly for optimal performance + */ + ua = function() { + var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, + u = nav.userAgent.toLowerCase(), + p = nav.platform.toLowerCase(), + windows = p ? /win/.test(p) : /win/.test(u), + mac = p ? /mac/.test(p) : /mac/.test(u), + webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit + ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html + playerVersion = [0,0,0], + d = null; + if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) { + d = nav.plugins[SHOCKWAVE_FLASH].description; + if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+ + plugin = true; + ie = false; // cascaded feature detection for Internet Explorer + d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); + playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10); + playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10); + playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0; + } + } + else if (typeof win.ActiveXObject != UNDEF) { + try { + var a = new ActiveXObject(SHOCKWAVE_FLASH_AX); + if (a) { // a will return null when ActiveX is disabled + d = a.GetVariable("$version"); + if (d) { + ie = true; // cascaded feature detection for Internet Explorer + d = d.split(" ")[1].split(","); + playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + } + catch(e) {} + } + return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac }; + }(), + + /* Cross-browser onDomLoad + - Will fire an event as soon as the DOM of a web page is loaded + - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/ + - Regular onload serves as fallback + */ + onDomLoad = function() { + if (!ua.w3) { return; } + if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically + callDomLoadFunctions(); + } + if (!isDomLoaded) { + if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false); + } + if (ua.ie && ua.win) { + doc.attachEvent(ON_READY_STATE_CHANGE, function() { + if (doc.readyState == "complete") { + doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee); + callDomLoadFunctions(); + } + }); + if (win == top) { // if not inside an iframe + (function(){ + if (isDomLoaded) { return; } + try { + doc.documentElement.doScroll("left"); + } + catch(e) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + } + if (ua.wk) { + (function(){ + if (isDomLoaded) { return; } + if (!/loaded|complete/.test(doc.readyState)) { + setTimeout(arguments.callee, 0); + return; + } + callDomLoadFunctions(); + })(); + } + addLoadEvent(callDomLoadFunctions); + } + }(); + + function callDomLoadFunctions() { + if (isDomLoaded) { return; } + try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early + var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span")); + t.parentNode.removeChild(t); + } + catch (e) { return; } + isDomLoaded = true; + var dl = domLoadFnArr.length; + for (var i = 0; i < dl; i++) { + domLoadFnArr[i](); + } + } + + function addDomLoadEvent(fn) { + if (isDomLoaded) { + fn(); + } + else { + domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+ + } + } + + /* Cross-browser onload + - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/ + - Will fire an event as soon as a web page including all of its assets are loaded + */ + function addLoadEvent(fn) { + if (typeof win.addEventListener != UNDEF) { + win.addEventListener("load", fn, false); + } + else if (typeof doc.addEventListener != UNDEF) { + doc.addEventListener("load", fn, false); + } + else if (typeof win.attachEvent != UNDEF) { + addListener(win, "onload", fn); + } + else if (typeof win.onload == "function") { + var fnOld = win.onload; + win.onload = function() { + fnOld(); + fn(); + }; + } + else { + win.onload = fn; + } + } + + /* Main function + - Will preferably execute onDomLoad, otherwise onload (as a fallback) + */ + function main() { + if (plugin) { + testPlayerVersion(); + } + else { + matchVersions(); + } + } + + /* Detect the Flash Player version for non-Internet Explorer browsers + - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description: + a. Both release and build numbers can be detected + b. Avoid wrong descriptions by corrupt installers provided by Adobe + c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports + - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available + */ + function testPlayerVersion() { + var b = doc.getElementsByTagName("body")[0]; + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + var t = b.appendChild(o); + if (t) { + var counter = 0; + (function(){ + if (typeof t.GetVariable != UNDEF) { + var d = t.GetVariable("$version"); + if (d) { + d = d.split(" ")[1].split(","); + ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; + } + } + else if (counter < 10) { + counter++; + setTimeout(arguments.callee, 10); + return; + } + b.removeChild(o); + t = null; + matchVersions(); + })(); + } + else { + matchVersions(); + } + } + + /* Perform Flash Player and SWF version matching; static publishing only + */ + function matchVersions() { + var rl = regObjArr.length; + if (rl > 0) { + for (var i = 0; i < rl; i++) { // for each registered object element + var id = regObjArr[i].id; + var cb = regObjArr[i].callbackFn; + var cbObj = {success:false, id:id}; + if (ua.pv[0] > 0) { + var obj = getElementById(id); + if (obj) { + if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match! + setVisibility(id, true); + if (cb) { + cbObj.success = true; + cbObj.ref = getObjectById(id); + cb(cbObj); + } + } + else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported + var att = {}; + att.data = regObjArr[i].expressInstall; + att.width = obj.getAttribute("width") || "0"; + att.height = obj.getAttribute("height") || "0"; + if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); } + if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); } + // parse HTML object param element's name-value pairs + var par = {}; + var p = obj.getElementsByTagName("param"); + var pl = p.length; + for (var j = 0; j < pl; j++) { + if (p[j].getAttribute("name").toLowerCase() != "movie") { + par[p[j].getAttribute("name")] = p[j].getAttribute("value"); + } + } + showExpressInstall(att, par, id, cb); + } + else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF + displayAltContent(obj); + if (cb) { cb(cbObj); } + } + } + } + else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content) + setVisibility(id, true); + if (cb) { + var o = getObjectById(id); // test whether there is an HTML object element or not + if (o && typeof o.SetVariable != UNDEF) { + cbObj.success = true; + cbObj.ref = o; + } + cb(cbObj); + } + } + } + } + } + + function getObjectById(objectIdStr) { + var r = null; + var o = getElementById(objectIdStr); + if (o && o.nodeName == "OBJECT") { + if (typeof o.SetVariable != UNDEF) { + r = o; + } + else { + var n = o.getElementsByTagName(OBJECT)[0]; + if (n) { + r = n; + } + } + } + return r; + } + + /* Requirements for Adobe Express Install + - only one instance can be active at a time + - fp 6.0.65 or higher + - Win/Mac OS only + - no Webkit engines older than version 312 + */ + function canExpressInstall() { + return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312); + } + + /* Show the Adobe Express Install dialog + - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75 + */ + function showExpressInstall(att, par, replaceElemIdStr, callbackFn) { + isExpressInstallActive = true; + storedCallbackFn = callbackFn || null; + storedCallbackObj = {success:false, id:replaceElemIdStr}; + var obj = getElementById(replaceElemIdStr); + if (obj) { + if (obj.nodeName == "OBJECT") { // static publishing + storedAltContent = abstractAltContent(obj); + storedAltContentId = null; + } + else { // dynamic publishing + storedAltContent = obj; + storedAltContentId = replaceElemIdStr; + } + att.id = EXPRESS_INSTALL_ID; + if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } + if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } + doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; + var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", + fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + fv; + } + else { + par.flashvars = fv; + } + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + if (ua.ie && ua.win && obj.readyState != 4) { + var newObj = createElement("div"); + replaceElemIdStr += "SWFObjectNew"; + newObj.setAttribute("id", replaceElemIdStr); + obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + createSWF(att, par, replaceElemIdStr); + } + } + + /* Functions to abstract and display alternative content + */ + function displayAltContent(obj) { + if (ua.ie && ua.win && obj.readyState != 4) { + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it, + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work + var el = createElement("div"); + obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content + el.parentNode.replaceChild(abstractAltContent(obj), el); + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + obj.parentNode.removeChild(obj); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.replaceChild(abstractAltContent(obj), obj); + } + } + + function abstractAltContent(obj) { + var ac = createElement("div"); + if (ua.win && ua.ie) { + ac.innerHTML = obj.innerHTML; + } + else { + var nestedObj = obj.getElementsByTagName(OBJECT)[0]; + if (nestedObj) { + var c = nestedObj.childNodes; + if (c) { + var cl = c.length; + for (var i = 0; i < cl; i++) { + if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) { + ac.appendChild(c[i].cloneNode(true)); + } + } + } + } + } + return ac; + } + + /* Cross-browser dynamic SWF creation + */ + function createSWF(attObj, parObj, id) { + var r, el = getElementById(id); + if (ua.wk && ua.wk < 312) { return r; } + if (el) { + if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content + attObj.id = id; + } + if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML + var att = ""; + for (var i in attObj) { + if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries + if (i.toLowerCase() == "data") { + parObj.movie = attObj[i]; + } + else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + att += ' class="' + attObj[i] + '"'; + } + else if (i.toLowerCase() != "classid") { + att += ' ' + i + '="' + attObj[i] + '"'; + } + } + } + var par = ""; + for (var j in parObj) { + if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries + par += ''; + } + } + el.outerHTML = '' + par + ''; + objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only) + r = getElementById(attObj.id); + } + else { // well-behaving browsers + var o = createElement(OBJECT); + o.setAttribute("type", FLASH_MIME_TYPE); + for (var m in attObj) { + if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries + if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword + o.setAttribute("class", attObj[m]); + } + else if (m.toLowerCase() != "classid") { // filter out IE specific attribute + o.setAttribute(m, attObj[m]); + } + } + } + for (var n in parObj) { + if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element + createObjParam(o, n, parObj[n]); + } + } + el.parentNode.replaceChild(o, el); + r = o; + } + } + return r; + } + + function createObjParam(el, pName, pValue) { + var p = createElement("param"); + p.setAttribute("name", pName); + p.setAttribute("value", pValue); + el.appendChild(p); + } + + /* Cross-browser SWF removal + - Especially needed to safely and completely remove a SWF in Internet Explorer + */ + function removeSWF(id) { + var obj = getElementById(id); + if (obj && obj.nodeName == "OBJECT") { + if (ua.ie && ua.win) { + obj.style.display = "none"; + (function(){ + if (obj.readyState == 4) { + removeObjectInIE(id); + } + else { + setTimeout(arguments.callee, 10); + } + })(); + } + else { + obj.parentNode.removeChild(obj); + } + } + } + + function removeObjectInIE(id) { + var obj = getElementById(id); + if (obj) { + for (var i in obj) { + if (typeof obj[i] == "function") { + obj[i] = null; + } + } + obj.parentNode.removeChild(obj); + } + } + + /* Functions to optimize JavaScript compression + */ + function getElementById(id) { + var el = null; + try { + el = doc.getElementById(id); + } + catch (e) {} + return el; + } + + function createElement(el) { + return doc.createElement(el); + } + + /* Updated attachEvent function for Internet Explorer + - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks + */ + function addListener(target, eventType, fn) { + target.attachEvent(eventType, fn); + listenersArr[listenersArr.length] = [target, eventType, fn]; + } + + /* Flash Player and SWF content version matching + */ + function hasPlayerVersion(rv) { + var pv = ua.pv, v = rv.split("."); + v[0] = parseInt(v[0], 10); + v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0" + v[2] = parseInt(v[2], 10) || 0; + return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false; + } + + /* Cross-browser dynamic CSS creation + - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php + */ + function createCSS(sel, decl, media, newStyle) { + if (ua.ie && ua.mac) { return; } + var h = doc.getElementsByTagName("head")[0]; + if (!h) { return; } // to also support badly authored HTML pages that lack a head element + var m = (media && typeof media == "string") ? media : "screen"; + if (newStyle) { + dynamicStylesheet = null; + dynamicStylesheetMedia = null; + } + if (!dynamicStylesheet || dynamicStylesheetMedia != m) { + // create dynamic stylesheet + get a global reference to it + var s = createElement("style"); + s.setAttribute("type", "text/css"); + s.setAttribute("media", m); + dynamicStylesheet = h.appendChild(s); + if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) { + dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1]; + } + dynamicStylesheetMedia = m; + } + // add style rule + if (ua.ie && ua.win) { + if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) { + dynamicStylesheet.addRule(sel, decl); + } + } + else { + if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) { + dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}")); + } + } + } + + function setVisibility(id, isVisible) { + if (!autoHideShow) { return; } + var v = isVisible ? "visible" : "hidden"; + if (isDomLoaded && getElementById(id)) { + getElementById(id).style.visibility = v; + } + else { + createCSS("#" + id, "visibility:" + v); + } + } + + /* Filter to avoid XSS attacks + */ + function urlEncodeIfNecessary(s) { + var regex = /[\\\"<>\.;]/; + var hasBadChars = regex.exec(s) != null; + return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s; + } + + /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only) + */ + var cleanup = function() { + if (ua.ie && ua.win) { + window.attachEvent("onunload", function() { + // remove listeners to avoid memory leaks + var ll = listenersArr.length; + for (var i = 0; i < ll; i++) { + listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]); + } + // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect + var il = objIdArr.length; + for (var j = 0; j < il; j++) { + removeSWF(objIdArr[j]); + } + // cleanup library's main closures to avoid memory leaks + for (var k in ua) { + ua[k] = null; + } + ua = null; + for (var l in swfobject) { + swfobject[l] = null; + } + swfobject = null; + }); + } + }(); + + return { + /* Public API + - Reference: http://code.google.com/p/swfobject/wiki/documentation + */ + registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) { + if (ua.w3 && objectIdStr && swfVersionStr) { + var regObj = {}; + regObj.id = objectIdStr; + regObj.swfVersion = swfVersionStr; + regObj.expressInstall = xiSwfUrlStr; + regObj.callbackFn = callbackFn; + regObjArr[regObjArr.length] = regObj; + setVisibility(objectIdStr, false); + } + else if (callbackFn) { + callbackFn({success:false, id:objectIdStr}); + } + }, + + getObjectById: function(objectIdStr) { + if (ua.w3) { + return getObjectById(objectIdStr); + } + }, + + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) { + var callbackObj = {success:false, id:replaceElemIdStr}; + if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) { + setVisibility(replaceElemIdStr, false); + addDomLoadEvent(function() { + widthStr += ""; // auto-convert to string + heightStr += ""; + var att = {}; + if (attObj && typeof attObj === OBJECT) { + for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs + att[i] = attObj[i]; + } + } + att.data = swfUrlStr; + att.width = widthStr; + att.height = heightStr; + var par = {}; + if (parObj && typeof parObj === OBJECT) { + for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs + par[j] = parObj[j]; + } + } + if (flashvarsObj && typeof flashvarsObj === OBJECT) { + for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs + if (typeof par.flashvars != UNDEF) { + par.flashvars += "&" + k + "=" + flashvarsObj[k]; + } + else { + par.flashvars = k + "=" + flashvarsObj[k]; + } + } + } + if (hasPlayerVersion(swfVersionStr)) { // create SWF + var obj = createSWF(att, par, replaceElemIdStr); + if (att.id == replaceElemIdStr) { + setVisibility(replaceElemIdStr, true); + } + callbackObj.success = true; + callbackObj.ref = obj; + } + else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install + att.data = xiSwfUrlStr; + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + return; + } + else { // show alternative content + setVisibility(replaceElemIdStr, true); + } + if (callbackFn) { callbackFn(callbackObj); } + }); + } + else if (callbackFn) { callbackFn(callbackObj); } + }, + + switchOffAutoHideShow: function() { + autoHideShow = false; + }, + + ua: ua, + + getFlashPlayerVersion: function() { + return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] }; + }, + + hasFlashPlayerVersion: hasPlayerVersion, + + createSWF: function(attObj, parObj, replaceElemIdStr) { + if (ua.w3) { + return createSWF(attObj, parObj, replaceElemIdStr); + } + else { + return undefined; + } + }, + + showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) { + if (ua.w3 && canExpressInstall()) { + showExpressInstall(att, par, replaceElemIdStr, callbackFn); + } + }, + + removeSWF: function(objElemIdStr) { + if (ua.w3) { + removeSWF(objElemIdStr); + } + }, + + createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) { + if (ua.w3) { + createCSS(selStr, declStr, mediaStr, newStyleBoolean); + } + }, + + addDomLoadEvent: addDomLoadEvent, + + addLoadEvent: addLoadEvent, + + getQueryParamValue: function(param) { + var q = doc.location.search || doc.location.hash; + if (q) { + if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark + if (param == null) { + return urlEncodeIfNecessary(q); + } + var pairs = q.split("&"); + for (var i = 0; i < pairs.length; i++) { + if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) { + return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1))); + } + } + } + return ""; + }, + + // For internal usage only + expressInstallCallback: function() { + if (isExpressInstallActive) { + var obj = getElementById(EXPRESS_INSTALL_ID); + if (obj && storedAltContent) { + obj.parentNode.replaceChild(storedAltContent, obj); + if (storedAltContentId) { + setVisibility(storedAltContentId, true); + if (ua.ie && ua.win) { storedAltContent.style.display = "block"; } + } + if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); } + } + isExpressInstallActive = false; + } + } + }; +}(); diff --git a/modules/cu3er/license.txt b/modules/cu3er/license.txt new file mode 100644 index 0000000..24f51bb --- /dev/null +++ b/modules/cu3er/license.txt @@ -0,0 +1,53 @@ +Copyright (c) 2010, Stefan Kovac +All rights reserved. + +By downloading CU3ER v0.9.2 - flash 3D slider, you agree to the following: + +Stefan Kovac grants you the non-exclusive, non-transferable license +to use CU3ER subject to the restrictions defined below. + + * You may use CU3ER in personal and / or commercial projects. + + * You may implement CU3ER in an unlimited number of websites and + offline presentations, as long as you are acting as the administrator + and / or developer for those websites and / or presentations. + + * You may deploy SWFs containing CU3ER as part of hired work for + a third party as long as the SWF is unique to said party and not + replicated / resold / redistributed as part of a template, + application or service to additional parties. + + * SWF containing CU3ER may not be embedded as part of a template, + application, and / or web site where stated template, application, + and/or web site is re-sold and / or re-distributed for independent + use by third parties, without specific prior written permission. + + * SWFs containing CU3ER may not be embedded in a template, content + management system, and / or online web service in a manner where the + SWF is replicated and used as a slideshow viewer for photos contributed + by more than one party. + + * CU3ER may not be sub-licensed or resold. + + * You agree not to decompile, reverse engineer, disassemble, or otherwise + determine or attempt to determine source code for the executable code + of CU3ER, and agrees not to permit or authorize anyone else to do so. + + * CU3ER redistribution must reproduce the above copyright notice, this + list of conditions and the disclaimer in the documentation and/or + other materials provided with the distribution. + + * Neither the name of CU3ER nor the name of it contributor (Stefan Kovac) + may be used to endorse or promote products associated with CU3ER without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY STEFAN KOVAC ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL STEFAN KOVAC BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/modules/download/files/MILPACS_RC1_b.zip b/modules/download/files/MILPACS_RC1_b.zip new file mode 100644 index 0000000..24b7dab Binary files /dev/null and b/modules/download/files/MILPACS_RC1_b.zip differ diff --git a/modules/download/files/MarneMessenger_1-1.pdf b/modules/download/files/MarneMessenger_1-1.pdf new file mode 100644 index 0000000..12bead4 Binary files /dev/null and b/modules/download/files/MarneMessenger_1-1.pdf differ diff --git a/modules/download/files/MarneMessenger_1-2.pdf b/modules/download/files/MarneMessenger_1-2.pdf new file mode 100644 index 0000000..0090c30 Binary files /dev/null and b/modules/download/files/MarneMessenger_1-2.pdf differ diff --git a/modules/download/files/MarneMessenger_2-1.pdf b/modules/download/files/MarneMessenger_2-1.pdf new file mode 100644 index 0000000..614e329 Binary files /dev/null and b/modules/download/files/MarneMessenger_2-1.pdf differ diff --git a/modules/download/files/MarneMessenger_2-2.pdf b/modules/download/files/MarneMessenger_2-2.pdf new file mode 100644 index 0000000..016ccf9 Binary files /dev/null and b/modules/download/files/MarneMessenger_2-2.pdf differ diff --git a/modules/download/files/Milpacs_RC2.zip b/modules/download/files/Milpacs_RC2.zip new file mode 100644 index 0000000..7546eda Binary files /dev/null and b/modules/download/files/Milpacs_RC2.zip differ diff --git a/modules/download/index.php b/modules/download/index.php index b819e8d..8cd1d99 100644 --- a/modules/download/index.php +++ b/modules/download/index.php @@ -1,134 +1,134 @@ -. - */ - -if(!defined("MODULE_FILE")) -{ - die("Access denied..."); -} - -function getCategoryList() -{ - global $db; - $query = sprintf("SELECT category_id, title FROM bayonet_downloads_categories"); - $result = $db->Query($query); - $categories = $db->Fetch($result); - - return $categories; -} - -function getCategoryName($category) -{ - global $db; - if(!filter_var($category, FILTER_VALIDATE_INT)) - return array(); - - $query = sprintf("SELECT category_id, title FROM bayonet_downloads_categories WHERE category_id = %d", (int)$category); - $result = $db->Query($query); - $data = $db->FetchRow($result); - - return $data['title']; - //return is_array($data) ? $data : array(); -} - -function getCategoryFiles($category) -{ - global $db; - $query = sprintf("SELECT ca.category_id, ca.title AS category, dl.name, dl.filename, dl.description FROM bayonet_downloads_categories AS ca LEFT OUTER JOIN bayonet_downloads AS dl ON dl.category_id = ca.category_id WHERE ca.category_id = %d", (int)$category); - - $result = $db->Query($query); - $downloads = $db->FetchArray($result); - decho('downloads data'); - decho($downloads); - decho('downloads data done'); - - return $downloads; -} - -global $db; -$downloads = NULL; -$download_relative_path = "modules/" . basename(dirname(__FILE__)) . "/files/"; -$download_absolute_path = dirname(__FILE__) . "/files/"; - -$category = $_GET['category']; -if(isset($category) && !filter_var($category, FILTER_VALIDATE_INT)) -{ - ReportHack("Purposely invalid category entry."); - return; -} - -$downloads = getCategoryFiles($category); -decho($downloads); - -OpenContent(); -echo "
Categories
\n"; -echo "
\n"; - -$categoryList = getCategoryList(); - - foreach($categoryList as $categoryListItem) - { - echo "

"; - echo LinkModule("download", "&category={$categoryListItem['category_id']}",$categoryListItem['title']); - echo "

\n"; - } - - -echo "
\n\n"; -CloseContent(); - -echo "
"; //spacer between div tags - -if(isset($category)) -{ - OpenContent(); - echo "
" . getCategoryName($category) . "
\n"; - echo "
\n"; - - OpenContent(); - echo "
Files
\n"; - echo "
\n"; - - if(empty($downloads)) - { - echo "No downloads available.\n"; - return; - } - - foreach($downloads as $file) - { - $download_full_path = $download_absolute_path . $file['filename']; - - if(!file_exists($download_full_path)) $broken = "(Broken link detected)"; - echo "

"; - echo LinkInternal($file['name'], $file['filename'], $download_relative_path) . " $broken
\n"; - echo "Filename: {$file['filename']}
\n"; - printf("Size: %.2fKB
\n", filesize($download_full_path) / 1024); - echo "MD5 Hash: " . md5_file($download_full_path) . "
\n"; - echo "Description: {$file['description']}
\n"; - echo "

"; - - } - //logQueueFlush(FORCE); - - echo "
\n
"; - echo "\n"; -} - CloseContent(); -CloseContent(); -?> +. + */ + +if(!defined("MODULE_FILE")) +{ + die("Access denied..."); +} + +function getCategoryList() +{ + global $db; + $query = sprintf("SELECT category_id, title FROM bayonet_downloads_categories"); + $result = $db->Query($query); + $categories = $db->Fetch($result); + + return $categories; +} + +function getCategoryName($category) +{ + global $db; + if(!filter_var($category, FILTER_VALIDATE_INT)) + return array(); + + $query = sprintf("SELECT category_id, title FROM bayonet_downloads_categories WHERE category_id = %d", (int)$category); + $result = $db->Query($query); + $data = $db->FetchRow($result); + + return $data['title']; + //return is_array($data) ? $data : array(); +} + +function getCategoryFiles($category) +{ + global $db; + $query = sprintf("SELECT ca.category_id, ca.title AS category, dl.name, dl.filename, dl.description FROM bayonet_downloads_categories AS ca LEFT OUTER JOIN bayonet_downloads AS dl ON dl.category_id = ca.category_id WHERE ca.category_id = %d", (int)$category); + + $result = $db->Query($query); + $downloads = $db->FetchArray($result); + decho('downloads data'); + decho($downloads); + decho('downloads data done'); + + return $downloads; +} + +global $db; +$downloads = NULL; +$download_relative_path = "modules/" . basename(dirname(__FILE__)) . "/files/"; +$download_absolute_path = dirname(__FILE__) . "/files/"; + +$category = $_GET['category']; +if(isset($category) && !filter_var($category, FILTER_VALIDATE_INT)) +{ + ReportHack("Purposely invalid category entry."); + return; +} + +$downloads = getCategoryFiles($category); +decho($downloads); + +OpenContent(); +echo "
Categories
\n"; +echo "
\n"; + +$categoryList = getCategoryList(); + + foreach($categoryList as $categoryListItem) + { + echo "

"; + echo LinkModule("download", "&category={$categoryListItem['category_id']}",$categoryListItem['title']); + echo "

\n"; + } + + +echo "
\n\n"; +CloseContent(); + +echo "
"; //spacer between div tags + +if(isset($category)) +{ + OpenContent(); + echo "
" . getCategoryName($category) . "
\n"; + echo "
\n"; + + OpenContent(); + echo "
Files
\n"; + echo "
\n"; + + if(empty($downloads)) + { + echo "No downloads available.\n"; + return; + } + + foreach($downloads as $file) + { + $download_full_path = $download_absolute_path . $file['filename']; + + if(!file_exists($download_full_path)) $broken = "(Broken link detected)"; + echo "

"; + echo LinkInternal($file['name'], $file['filename'], $download_relative_path) . " $broken
\n"; + echo "Filename: {$file['filename']}
\n"; + printf("Size: %.2fKB
\n", filesize($download_full_path) / 1024); + echo "MD5 Hash: " . md5_file($download_full_path) . "
\n"; + echo "Description: {$file['description']}
\n"; + echo "

"; + + } + //logQueueFlush(FORCE); + + echo "
\n
"; + echo "\n"; +} + CloseContent(); +CloseContent(); +?> diff --git a/modules/index/index.php b/modules/index/index.php index 54c8dbd..83b542c 100644 --- a/modules/index/index.php +++ b/modules/index/index.php @@ -10,7 +10,7 @@ define('INDEX_MODULE', true); -$result = $db->Query("SELECT `dir_name` FROM `bayonet_modules` ORDER BY `weight` ASC"); +$result = $db->Query("SELECT `dir_name` FROM `bayonet_modules` WHERE `status` = 'Active' ORDER BY `weight` ASC"); $modules = $db->Fetch($result); foreach($modules as $module) { diff --git a/modules/news/functions.php b/modules/news/functions.php index f3505df..67e9b43 100644 --- a/modules/news/functions.php +++ b/modules/news/functions.php @@ -130,10 +130,11 @@ function getNumOfComments($id){ function getNews($id = NULL, $limit = NULL, $index = 0){ 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 ". + $query = "SELECT n.news_id, n.title, n.message, n.date, n.edited, n.category_id, u.username AS author, e.username AS eauthor, 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 "; + "LEFT OUTER JOIN `bayonet_users` AS u ON u.user_id = n.author_id ". + "LEFT OUTER JOIN `bayonet_users` AS e ON e.user_id = n.edited_id "; if(isset($id)){ $query = $query."WHERE n.news_id = '$id' "; }else{ @@ -155,7 +156,7 @@ function getNews($id = NULL, $limit = NULL, $index = 0){ * Function that takes an array of news and displays it as html * @param data - associative array of news from the database */ -function displayNews($data){ +function displayNews($data, $short = false){ date_default_timezone_set("America/New_York"); @@ -182,7 +183,19 @@ function displayNews($data){
<?php echo $news['catname']; ?> - +
Continue reading.'; + } else { + echo bbcode_format($news['message']); + } + ?> +
Last edit: ".date('F j, Y, g:i a T', strtotime($news['edited']))." by ".$news['eauthor']."
"; + } +?>
diff --git a/modules/news/index.php b/modules/news/index.php index 1dfd98a..47688be 100644 --- a/modules/news/index.php +++ b/modules/news/index.php @@ -28,6 +28,7 @@ include 'modules/news/functions.php'; $logged_id = 2; if(!defined('INDEX_MODULE')){ + define('BLOCK_RIGHT_DISABLE', true); $page_num = 1; $page_num = $_GET['page']; //get variable for page number @@ -50,10 +51,11 @@ if(isset($_GET['id'])) } else { - $news = getNews(null, $limit, $index); - displayNews($news); - OpenContent(); + if(defined('INDEX_MODULE')){ + $news = getNews(null, $limit, $index); + displayNews($news, true); + OpenContent(); ?>
Read All  @@ -61,6 +63,26 @@ else 0) + echo " More Recent News"; + if(count($news) == $limit){ +?> +
+ Older News  +
+
+"; + displayNews($news); + OpenContent(); + if($page_num > 0) echo " More Recent News"; diff --git a/modules/newsreel/index.php b/modules/newsreel/index.php index f45f2f5..3caa86b 100644 --- a/modules/newsreel/index.php +++ b/modules/newsreel/index.php @@ -1,6 +1,7 @@ +
-
- newsreel + + newsreel + +
-
+ \ No newline at end of file diff --git a/modules/newsreel/slides/agwc3.png b/modules/newsreel/slides/agwc3.png new file mode 100644 index 0000000..7b6f9a7 Binary files /dev/null and b/modules/newsreel/slides/agwc3.png differ diff --git a/modules/newsreel/slides/arma2.png b/modules/newsreel/slides/arma2.png new file mode 100644 index 0000000..94fab4a Binary files /dev/null and b/modules/newsreel/slides/arma2.png differ diff --git a/modules/newsreel/slides/decade.png b/modules/newsreel/slides/decade.png new file mode 100644 index 0000000..0ba39aa Binary files /dev/null and b/modules/newsreel/slides/decade.png differ diff --git a/modules/newsreel/slides/drilltimes.png b/modules/newsreel/slides/drilltimes.png new file mode 100644 index 0000000..497b406 Binary files /dev/null and b/modules/newsreel/slides/drilltimes.png differ diff --git a/modules/newsreel/slides/holidays.png b/modules/newsreel/slides/holidays.png new file mode 100644 index 0000000..48a1c72 Binary files /dev/null and b/modules/newsreel/slides/holidays.png differ diff --git a/modules/newsreel/slides/joinus.png b/modules/newsreel/slides/joinus.png new file mode 100644 index 0000000..950a2bc Binary files /dev/null and b/modules/newsreel/slides/joinus.png differ diff --git a/modules/newsreel/slides/leadership.png b/modules/newsreel/slides/leadership.png new file mode 100644 index 0000000..52730a4 Binary files /dev/null and b/modules/newsreel/slides/leadership.png differ diff --git a/modules/newsreel/slides/team.png b/modules/newsreel/slides/team.png new file mode 100644 index 0000000..fe307c1 Binary files /dev/null and b/modules/newsreel/slides/team.png differ diff --git a/modules/newsreel/slides/team2.png b/modules/newsreel/slides/team2.png new file mode 100644 index 0000000..889a266 Binary files /dev/null and b/modules/newsreel/slides/team2.png differ diff --git a/modules/page/index.php b/modules/page/index.php index 5b943ce..aeba18a 100644 --- a/modules/page/index.php +++ b/modules/page/index.php @@ -18,6 +18,7 @@ */ define("MODULE_FAIL", "You cannot access this module directly.
\n",true); +define('BLOCK_RIGHT_DISABLE', true); if(!defined("MODULE_FILE")) { diff --git a/modules/rudi/header.php b/modules/rudi/header.php index 47c5ffa..7ea6723 100644 --- a/modules/rudi/header.php +++ b/modules/rudi/header.php @@ -1,6 +1,10 @@ - - -RUDI - - - + +
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/modules/rudi/images/medals/CIB_1st.gif b/modules/rudi/images/medals/CIB_1st.gif new file mode 100644 index 0000000..eb218ec Binary files /dev/null and b/modules/rudi/images/medals/CIB_1st.gif differ diff --git a/modules/rudi/images/medals/CIB_2nd.gif b/modules/rudi/images/medals/CIB_2nd.gif new file mode 100644 index 0000000..d4fd78e Binary files /dev/null and b/modules/rudi/images/medals/CIB_2nd.gif differ diff --git a/modules/rudi/images/medals/CIB_3rd.gif b/modules/rudi/images/medals/CIB_3rd.gif new file mode 100644 index 0000000..2ddf96a Binary files /dev/null and b/modules/rudi/images/medals/CIB_3rd.gif differ diff --git a/modules/rudi/images/medals/CoD2.gif b/modules/rudi/images/medals/CoD2.gif new file mode 100644 index 0000000..8e936a0 Binary files /dev/null and b/modules/rudi/images/medals/CoD2.gif differ diff --git a/modules/rudi/images/medals/CoD2.jpg b/modules/rudi/images/medals/CoD2.jpg new file mode 100644 index 0000000..099ca27 Binary files /dev/null and b/modules/rudi/images/medals/CoD2.jpg differ diff --git a/modules/rudi/images/medals/DUC.jpg b/modules/rudi/images/medals/DUC.jpg new file mode 100644 index 0000000..566f81b Binary files /dev/null and b/modules/rudi/images/medals/DUC.jpg differ diff --git a/modules/rudi/images/medals/SM.gif b/modules/rudi/images/medals/SM.gif new file mode 100644 index 0000000..ac59604 Binary files /dev/null and b/modules/rudi/images/medals/SM.gif differ diff --git a/modules/rudi/images/medals/SS.gif b/modules/rudi/images/medals/SS.gif new file mode 100644 index 0000000..a488adc Binary files /dev/null and b/modules/rudi/images/medals/SS.gif differ diff --git a/modules/rudi/images/medals/afem.jpg b/modules/rudi/images/medals/afem.jpg new file mode 100644 index 0000000..6b0324c Binary files /dev/null and b/modules/rudi/images/medals/afem.jpg differ diff --git a/modules/rudi/images/medals/arma2duc.jpg b/modules/rudi/images/medals/arma2duc.jpg new file mode 100644 index 0000000..bf4bfcc Binary files /dev/null and b/modules/rudi/images/medals/arma2duc.jpg differ diff --git a/modules/rudi/images/medals/cib1.png b/modules/rudi/images/medals/cib1.png new file mode 100644 index 0000000..d96bf80 Binary files /dev/null and b/modules/rudi/images/medals/cib1.png differ diff --git a/modules/rudi/images/medals/cib2.png b/modules/rudi/images/medals/cib2.png new file mode 100644 index 0000000..ba6f8dd Binary files /dev/null and b/modules/rudi/images/medals/cib2.png differ diff --git a/modules/rudi/images/medals/cib3.png b/modules/rudi/images/medals/cib3.png new file mode 100644 index 0000000..abc2215 Binary files /dev/null and b/modules/rudi/images/medals/cib3.png differ diff --git a/modules/rudi/images/medals/cib4.png b/modules/rudi/images/medals/cib4.png new file mode 100644 index 0000000..d511343 Binary files /dev/null and b/modules/rudi/images/medals/cib4.png differ diff --git a/modules/rudi/images/medals/cod4unitcit.jpg b/modules/rudi/images/medals/cod4unitcit.jpg new file mode 100644 index 0000000..aad4498 Binary files /dev/null and b/modules/rudi/images/medals/cod4unitcit.jpg differ diff --git a/modules/rudi/images/medals/dsm.jpg b/modules/rudi/images/medals/dsm.jpg index b90e927..7cf0978 100644 Binary files a/modules/rudi/images/medals/dsm.jpg and b/modules/rudi/images/medals/dsm.jpg differ diff --git a/modules/rudi/images/medals/eib.jpg b/modules/rudi/images/medals/eib.jpg new file mode 100644 index 0000000..e8b5f59 Binary files /dev/null and b/modules/rudi/images/medals/eib.jpg differ diff --git a/modules/rudi/images/medals/eib.png b/modules/rudi/images/medals/eib.png new file mode 100644 index 0000000..909f057 Binary files /dev/null and b/modules/rudi/images/medals/eib.png differ diff --git a/modules/rudi/images/medals/expert.gif b/modules/rudi/images/medals/expert.gif new file mode 100644 index 0000000..b00bc76 Binary files /dev/null and b/modules/rudi/images/medals/expert.gif differ diff --git a/modules/rudi/images/medals/oak_leaf_clusters.gif b/modules/rudi/images/medals/oak_leaf_clusters.gif new file mode 100644 index 0000000..376ef8c Binary files /dev/null and b/modules/rudi/images/medals/oak_leaf_clusters.gif differ diff --git a/modules/rudi/images/medals/pass.gif b/modules/rudi/images/medals/pass.gif new file mode 100644 index 0000000..58d305f Binary files /dev/null and b/modules/rudi/images/medals/pass.gif differ diff --git a/modules/rudi/images/medals/sniper_qual.gif b/modules/rudi/images/medals/sniper_qual.gif new file mode 100644 index 0000000..9d51310 Binary files /dev/null and b/modules/rudi/images/medals/sniper_qual.gif differ diff --git a/modules/rudi/images/medals/sniper_qual.jpg b/modules/rudi/images/medals/sniper_qual.jpg new file mode 100644 index 0000000..1e19720 Binary files /dev/null and b/modules/rudi/images/medals/sniper_qual.jpg differ diff --git a/modules/rudi/images/medals/success.gif b/modules/rudi/images/medals/success.gif new file mode 100644 index 0000000..d3fca80 Binary files /dev/null and b/modules/rudi/images/medals/success.gif differ diff --git a/modules/rudi/images/medals/valor_device.gif b/modules/rudi/images/medals/valor_device.gif new file mode 100644 index 0000000..3a68d96 Binary files /dev/null and b/modules/rudi/images/medals/valor_device.gif differ diff --git a/modules/rudi/images/medals/valor_device.jpg b/modules/rudi/images/medals/valor_device.jpg new file mode 100644 index 0000000..facff6f Binary files /dev/null and b/modules/rudi/images/medals/valor_device.jpg differ diff --git a/modules/rudi/images/ranks/tiny/1LT.png b/modules/rudi/images/ranks/tiny/1LT.png new file mode 100644 index 0000000..83b6ab1 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/1LT.png differ diff --git a/modules/rudi/images/ranks/tiny/1SG.png b/modules/rudi/images/ranks/tiny/1SG.png new file mode 100644 index 0000000..4d9e872 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/1SG.png differ diff --git a/modules/rudi/images/ranks/tiny/2LT.png b/modules/rudi/images/ranks/tiny/2LT.png new file mode 100644 index 0000000..00df3a7 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/2LT.png differ diff --git a/modules/rudi/images/ranks/tiny/CPL.png b/modules/rudi/images/ranks/tiny/CPL.png new file mode 100644 index 0000000..b9dd559 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/CPL.png differ diff --git a/modules/rudi/images/ranks/tiny/CPT.png b/modules/rudi/images/ranks/tiny/CPT.png new file mode 100644 index 0000000..2c83daf Binary files /dev/null and b/modules/rudi/images/ranks/tiny/CPT.png differ diff --git a/modules/rudi/images/ranks/tiny/CW2.png b/modules/rudi/images/ranks/tiny/CW2.png new file mode 100644 index 0000000..43367ae Binary files /dev/null and b/modules/rudi/images/ranks/tiny/CW2.png differ diff --git a/modules/rudi/images/ranks/tiny/CW3.png b/modules/rudi/images/ranks/tiny/CW3.png new file mode 100644 index 0000000..7ec90e4 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/CW3.png differ diff --git a/modules/rudi/images/ranks/tiny/CW4.png b/modules/rudi/images/ranks/tiny/CW4.png new file mode 100644 index 0000000..91db1a3 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/CW4.png differ diff --git a/modules/rudi/images/ranks/tiny/LTC.png b/modules/rudi/images/ranks/tiny/LTC.png new file mode 100644 index 0000000..5a82ff1 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/LTC.png differ diff --git a/modules/rudi/images/ranks/tiny/MSG.png b/modules/rudi/images/ranks/tiny/MSG.png new file mode 100644 index 0000000..d045260 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/MSG.png differ diff --git a/modules/rudi/images/ranks/tiny/PFC.png b/modules/rudi/images/ranks/tiny/PFC.png new file mode 100644 index 0000000..cf7e41b Binary files /dev/null and b/modules/rudi/images/ranks/tiny/PFC.png differ diff --git a/modules/rudi/images/ranks/tiny/PV2.png b/modules/rudi/images/ranks/tiny/PV2.png new file mode 100644 index 0000000..6e2fa3c Binary files /dev/null and b/modules/rudi/images/ranks/tiny/PV2.png differ diff --git a/modules/rudi/images/ranks/tiny/SFC.png b/modules/rudi/images/ranks/tiny/SFC.png new file mode 100644 index 0000000..ec74e80 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/SFC.png differ diff --git a/modules/rudi/images/ranks/tiny/SGT.png b/modules/rudi/images/ranks/tiny/SGT.png new file mode 100644 index 0000000..fe5e441 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/SGT.png differ diff --git a/modules/rudi/images/ranks/tiny/SPC.png b/modules/rudi/images/ranks/tiny/SPC.png new file mode 100644 index 0000000..1d991f3 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/SPC.png differ diff --git a/modules/rudi/images/ranks/tiny/SSG.png b/modules/rudi/images/ranks/tiny/SSG.png new file mode 100644 index 0000000..956951e Binary files /dev/null and b/modules/rudi/images/ranks/tiny/SSG.png differ diff --git a/modules/rudi/images/ranks/tiny/WO1.png b/modules/rudi/images/ranks/tiny/WO1.png new file mode 100644 index 0000000..eb6f347 Binary files /dev/null and b/modules/rudi/images/ranks/tiny/WO1.png differ diff --git a/modules/rudi/images/uniform/ACoia.png b/modules/rudi/images/uniform/ACoia.png index 0e70357..e22cdd2 100644 Binary files a/modules/rudi/images/uniform/ACoia.png and b/modules/rudi/images/uniform/ACoia.png differ diff --git a/modules/rudi/images/uniform/ACourter.png b/modules/rudi/images/uniform/ACourter.png new file mode 100644 index 0000000..c422930 Binary files /dev/null and b/modules/rudi/images/uniform/ACourter.png differ diff --git a/modules/rudi/images/uniform/ADodge.png b/modules/rudi/images/uniform/ADodge.png new file mode 100644 index 0000000..77c9526 Binary files /dev/null and b/modules/rudi/images/uniform/ADodge.png differ diff --git a/modules/rudi/images/uniform/AHernandez.png b/modules/rudi/images/uniform/AHernandez.png new file mode 100644 index 0000000..c118b76 Binary files /dev/null and b/modules/rudi/images/uniform/AHernandez.png differ diff --git a/modules/rudi/images/uniform/AKlassen.png b/modules/rudi/images/uniform/AKlassen.png new file mode 100644 index 0000000..7051ae2 Binary files /dev/null and b/modules/rudi/images/uniform/AKlassen.png differ diff --git a/modules/rudi/images/uniform/ASherman.png b/modules/rudi/images/uniform/ASherman.png new file mode 100644 index 0000000..57facd0 Binary files /dev/null and b/modules/rudi/images/uniform/ASherman.png differ diff --git a/modules/rudi/images/uniform/AZanesco.png b/modules/rudi/images/uniform/AZanesco.png new file mode 100644 index 0000000..e38c659 Binary files /dev/null and b/modules/rudi/images/uniform/AZanesco.png differ diff --git a/modules/rudi/images/uniform/BMorgan.png b/modules/rudi/images/uniform/BMorgan.png new file mode 100644 index 0000000..010bac0 Binary files /dev/null and b/modules/rudi/images/uniform/BMorgan.png differ diff --git a/modules/rudi/images/uniform/BSegal.png b/modules/rudi/images/uniform/BSegal.png index 1c9c0f2..0428ed2 100644 Binary files a/modules/rudi/images/uniform/BSegal.png and b/modules/rudi/images/uniform/BSegal.png differ diff --git a/modules/rudi/images/uniform/BWhiting.png b/modules/rudi/images/uniform/BWhiting.png new file mode 100644 index 0000000..f9e754e Binary files /dev/null and b/modules/rudi/images/uniform/BWhiting.png differ diff --git a/modules/rudi/images/uniform/DHolson.png b/modules/rudi/images/uniform/DHolson.png index b372cf5..91b5e9e 100644 Binary files a/modules/rudi/images/uniform/DHolson.png and b/modules/rudi/images/uniform/DHolson.png differ diff --git a/modules/rudi/images/uniform/DKillian.png b/modules/rudi/images/uniform/DKillian.png new file mode 100644 index 0000000..eb6cb67 Binary files /dev/null and b/modules/rudi/images/uniform/DKillian.png differ diff --git a/modules/rudi/images/uniform/EOConnell.png b/modules/rudi/images/uniform/EOConnell.png index 9e46bfd..f9fd55d 100644 Binary files a/modules/rudi/images/uniform/EOConnell.png and b/modules/rudi/images/uniform/EOConnell.png differ diff --git a/modules/rudi/images/uniform/GTownsend.png b/modules/rudi/images/uniform/GTownsend.png index 6d6f314..b3e6c0b 100644 Binary files a/modules/rudi/images/uniform/GTownsend.png and b/modules/rudi/images/uniform/GTownsend.png differ diff --git a/modules/rudi/images/uniform/INewton.png b/modules/rudi/images/uniform/INewton.png new file mode 100644 index 0000000..02aa620 Binary files /dev/null and b/modules/rudi/images/uniform/INewton.png differ diff --git a/modules/rudi/images/uniform/JCiciotti.png b/modules/rudi/images/uniform/JCiciotti.png new file mode 100644 index 0000000..29b5722 Binary files /dev/null and b/modules/rudi/images/uniform/JCiciotti.png differ diff --git a/modules/rudi/images/uniform/JHiggins.jpg b/modules/rudi/images/uniform/JHiggins.jpg new file mode 100644 index 0000000..122bd3c Binary files /dev/null and b/modules/rudi/images/uniform/JHiggins.jpg differ diff --git a/modules/rudi/images/uniform/JHiggins.png b/modules/rudi/images/uniform/JHiggins.png new file mode 100644 index 0000000..c468434 Binary files /dev/null and b/modules/rudi/images/uniform/JHiggins.png differ diff --git a/modules/rudi/images/uniform/JMagers.png b/modules/rudi/images/uniform/JMagers.png new file mode 100644 index 0000000..aaeeb0e Binary files /dev/null and b/modules/rudi/images/uniform/JMagers.png differ diff --git a/modules/rudi/images/uniform/JMelnyk.png b/modules/rudi/images/uniform/JMelnyk.png index 111291c..8f7178f 100644 Binary files a/modules/rudi/images/uniform/JMelnyk.png and b/modules/rudi/images/uniform/JMelnyk.png differ diff --git a/modules/rudi/images/uniform/JMervau.png b/modules/rudi/images/uniform/JMervau.png new file mode 100644 index 0000000..d7d80bc Binary files /dev/null and b/modules/rudi/images/uniform/JMervau.png differ diff --git a/modules/rudi/images/uniform/JSchroeder.png b/modules/rudi/images/uniform/JSchroeder.png new file mode 100644 index 0000000..7556027 Binary files /dev/null and b/modules/rudi/images/uniform/JSchroeder.png differ diff --git a/modules/rudi/images/uniform/KGrimes.png b/modules/rudi/images/uniform/KGrimes.png index db03b87..35aa4cb 100644 Binary files a/modules/rudi/images/uniform/KGrimes.png and b/modules/rudi/images/uniform/KGrimes.png differ diff --git a/modules/rudi/images/uniform/KOlson.png b/modules/rudi/images/uniform/KOlson.png new file mode 100644 index 0000000..89e7f00 Binary files /dev/null and b/modules/rudi/images/uniform/KOlson.png differ diff --git a/modules/rudi/images/uniform/LTrimble.png b/modules/rudi/images/uniform/LTrimble.png index 3d8f2b6..3ec56da 100644 Binary files a/modules/rudi/images/uniform/LTrimble.png and b/modules/rudi/images/uniform/LTrimble.png differ diff --git a/modules/rudi/images/uniform/MAbballe.png b/modules/rudi/images/uniform/MAbballe.png new file mode 100644 index 0000000..596d551 Binary files /dev/null and b/modules/rudi/images/uniform/MAbballe.png differ diff --git a/modules/rudi/images/uniform/MCampeau.png b/modules/rudi/images/uniform/MCampeau.png new file mode 100644 index 0000000..c5711b7 Binary files /dev/null and b/modules/rudi/images/uniform/MCampeau.png differ diff --git a/modules/rudi/images/uniform/MLula.png b/modules/rudi/images/uniform/MLula.png index a674bc2..2b7feb0 100644 Binary files a/modules/rudi/images/uniform/MLula.png and b/modules/rudi/images/uniform/MLula.png differ diff --git a/modules/rudi/images/uniform/MMark.png b/modules/rudi/images/uniform/MMark.png index ed5ae93..063d1f8 100644 Binary files a/modules/rudi/images/uniform/MMark.png and b/modules/rudi/images/uniform/MMark.png differ diff --git a/modules/rudi/images/uniform/PBurris.png b/modules/rudi/images/uniform/PBurris.png index f64736d..c3546fd 100644 Binary files a/modules/rudi/images/uniform/PBurris.png and b/modules/rudi/images/uniform/PBurris.png differ diff --git a/modules/rudi/images/uniform/PPederson.png b/modules/rudi/images/uniform/PPederson.png index c5743f9..33b98be 100644 Binary files a/modules/rudi/images/uniform/PPederson.png and b/modules/rudi/images/uniform/PPederson.png differ diff --git a/modules/rudi/images/uniform/PRadziwonowicz.png b/modules/rudi/images/uniform/PRadziwonowicz.png new file mode 100644 index 0000000..46e60f4 Binary files /dev/null and b/modules/rudi/images/uniform/PRadziwonowicz.png differ diff --git a/modules/rudi/images/uniform/RECRUIT.png b/modules/rudi/images/uniform/RECRUIT.png new file mode 100644 index 0000000..3f9a97b Binary files /dev/null and b/modules/rudi/images/uniform/RECRUIT.png differ diff --git a/modules/rudi/images/uniform/RLeahy.png b/modules/rudi/images/uniform/RLeahy.png index 1c36abf..99d0c0d 100644 Binary files a/modules/rudi/images/uniform/RLeahy.png and b/modules/rudi/images/uniform/RLeahy.png differ diff --git a/modules/rudi/images/uniform/RStewart.png b/modules/rudi/images/uniform/RStewart.png new file mode 100644 index 0000000..a1c4e8a Binary files /dev/null and b/modules/rudi/images/uniform/RStewart.png differ diff --git a/modules/rudi/images/uniform/SCorsaro.png b/modules/rudi/images/uniform/SCorsaro.png index 1895adf..33373cf 100644 Binary files a/modules/rudi/images/uniform/SCorsaro.png and b/modules/rudi/images/uniform/SCorsaro.png differ diff --git a/modules/rudi/images/uniform/SDayton.png b/modules/rudi/images/uniform/SDayton.png new file mode 100644 index 0000000..8638b96 Binary files /dev/null and b/modules/rudi/images/uniform/SDayton.png differ diff --git a/modules/rudi/images/uniform/TKleiber.png b/modules/rudi/images/uniform/TKleiber.png new file mode 100644 index 0000000..27ed4b5 Binary files /dev/null and b/modules/rudi/images/uniform/TKleiber.png differ diff --git a/modules/rudi/images/uniform/TMichaels.png b/modules/rudi/images/uniform/TMichaels.png new file mode 100644 index 0000000..4935871 Binary files /dev/null and b/modules/rudi/images/uniform/TMichaels.png differ diff --git a/modules/rudi/images/uniform/TMoore.png b/modules/rudi/images/uniform/TMoore.png new file mode 100644 index 0000000..eceda1e Binary files /dev/null and b/modules/rudi/images/uniform/TMoore.png differ diff --git a/modules/rudi/images/uniform/ZBarrett.png b/modules/rudi/images/uniform/ZBarrett.png index c9d106b..1954d8f 100644 Binary files a/modules/rudi/images/uniform/ZBarrett.png and b/modules/rudi/images/uniform/ZBarrett.png differ diff --git a/modules/rudi/includes/common.class.php b/modules/rudi/includes/common.class.php index 2112853..0d5e63e 100644 --- a/modules/rudi/includes/common.class.php +++ b/modules/rudi/includes/common.class.php @@ -2,6 +2,7 @@ define('RUDI_PROFILE_SMALL', true); define('RUDI_PROFILE_BIG', false); +define('RUDI_ROSTER_RESERVES', 12); class Soldier { @@ -444,21 +445,61 @@ class RUDI_Common */ protected function getCombatRecord($member_id) { + $data = NULL; $query = sprintf( - "SELECT c.date, c.status, u1.name, u1.website, u.war_id " + "SELECT s.title, s.date, s.status, u1.name, u1.website, s.war_id, s.home_score, s.visit_score " ."FROM rudi_combat_record AS c " - ."RIGHT OUTER JOIN rudi_war_stats AS u ON u.visit_unit_id = c.visitor_id " - ."RIGHT OUTER JOIN rudi_war_units AS u1 ON u1.name " - ."LEFT OUTER JOIN rudi_unit_members AS m ON m.member_id = c.member_id " - ."WHERE c.member_id = %d ORDER BY c.date DESC ", + ."RIGHT OUTER JOIN rudi_war_stats AS s ON s.war_id = c.war_id " + ."RIGHT OUTER JOIN rudi_war_units AS u1 ON u1.visitor_id = s.visit_unit_id " + ."WHERE c.member_id = %d ORDER BY s.date DESC ", (int)$member_id); $result = $this->db->Query($query); + $data = $this->db->FetchObject($result,'CombatRecord'); return $data; } + + /** + * RUDI_Common::getUnitArr() + * + * @param member_id $mID + * @return an array of the member's units orders from Team - Unit with name, id, & leader + */ + function getUnitArr($mID){ + $unitArr = array(); + + $result = $this->db->Query("SELECT * FROM `rudi_unit_members` WHERE `member_id` = $mID LIMIT 1"); + $member = $this->db->FetchRow($result); + $curUnit = $member['cunit_id']; + + $i = 0; + + $subOf = $curUnit; + while($subOf != 0){ + $unitID = $subOf; + $result = $this->db->Query("SELECT * FROM `rudi_combat_units` WHERE `unit_id` = $subOf LIMIT 1"); + $data = $this->db->fetch($result); + foreach($data as $units){ + $subOf = $units['detachment']; + $leader = $units['leader_id']; + $name = $units['name']; + } + + $unitArr[$i]['unit_id'] = $unitID; + $unitArr[$i]['leader_id'] = $leader; + $unitArr[$i]['name'] = $name; + + + // echo "Unit ID: ".$unitArr[$i]['unit_id']."
Name: ".$unitArr[$i]['name']."
Leader ID: ".$unitArr[$i]['leader_id']."

"; + + $i++; + } + + return array_reverse($unitArr); + } /** * RUDI_Core::getSuperiorUnit() @@ -557,6 +598,7 @@ class RUDI_Common protected function getSuperiorTrue($id) { $superior =& $this->data[$id]->superior; //Reference only the data we need to use + $name =& $this->data[$id]->name; $leader = NULL; //Set the return value to null @@ -577,6 +619,48 @@ class RUDI_Common return $leader; } + /** + * RUDI_Core::getSuperior($unit_id) + * + * @param mixed $unit_id + * @return + */ + protected function getSuperior($id) + { + $leader = NULL; + $unit_id = $this->data[$id]->unit_id; + + $result = $this->db->Query("SELECT `leader_id`, `detachment` FROM `rudi_combat_units` WHERE `unit_id` = '$unit_id' LIMIT 1"); + $row = $this->db->FetchRow($result); + + $detachment = $row['detachment']; + $leader_id = $row['leader_id']; + if($leader_id == $id){ + $leader_id = 0; + } + while($leader_id == 0){ + if($detachment == 0){ + break; + } + $result = $this->db->Query("SELECT `leader_id`, `detachment` FROM `rudi_combat_units` WHERE `unit_id` = '$detachment' LIMIT 1"); + $row = $this->db->FetchRow($result); + $detachment = $row['detachment']; + $leader_id = $row['leader_id']; + } + + if($leader_id != 0){ + $result = $this->db->Query("SELECT CONCAT(r.shortname, ' ', m.last_name) AS name FROM rudi_unit_members AS m LEFT OUTER JOIN rudi_ranks AS r ON r.rank_id = m.rank_id WHERE m.member_id = '$leader_id' LIMIT 1"); + $row = $this->db->FetchRow($result); + + $leader->name = $row['name']; + $leader->leader_id = $leader_id; + } + + return $leader; + } + + + /** * RUDI_Core::getUnit() * @@ -667,17 +751,34 @@ class RUDI_Common * @param int $leader_id */ public function printRoster($unit_id, $leader_id){ + $num = 0; foreach($this->data as $member){ - if($member->unit_id == $unit_id && $member->status_id < 4){ -?> - + if($member->unit_id == $unit_id && $member->status_id < 3){ + decho($member); + if($num%2==0){ + echo ""; + } + else { + echo ''; + } + ?> - rank_short}.png"; ?>" alt="rank_short; ?>" /> + + rank_short}.png")){ + echo "rank_short}.png\" alt=\"{$member->rank_short}\" />"; + }else{ + //echo $member->rank_short; + } + ?> + - last_name . ', ' . $member->first_name; ?> + rank_long . ' ' . $member->first_name . ' ' . $member->last_name; ?> + role_name; ?> Roles) . ' roles attached to: ' . $member->last_name); for($role = 0; $role < count($member->Roles); ++$role) { @@ -688,9 +789,9 @@ class RUDI_Common echo $member->Roles[$role]->role_name; if($role < count($member->Roles) - 1) echo ', '; - echo ' '; + //echo ' '; } - } + } */ ?> @@ -698,10 +799,135 @@ class RUDI_Common status; ?> -data as $member){ + if($member->status_id == 3 || $member->unit_id == RUDI_ROSTER_RESERVES){ + decho($member); + + if($num == 0) + echo "Reserves"; + + if($num%2==0){ + echo ""; + } + else { + echo ''; + } + ?> + + + rank_short}.png")){ + echo "rank_short}.png\" alt=\"{$member->rank_short}\" />"; + }else{ + //echo $member->rank_short; + } + ?> + + + rank_long . ' ' . $member->first_name . ' ' . $member->last_name; ?> + + + role_name; ?> + Roles) . ' roles attached to: ' . $member->last_name); + for($role = 0; $role < count($member->Roles); ++$role) + { + if($member->Roles[$role]->role_name) + { + //decho($role . " = (" . $member->Roles[$role]->role_name . ")"); + + echo $member->Roles[$role]->role_name; + if($role < count($member->Roles) - 1) echo ', '; + + //echo ' '; + } + } */ + ?> + + + weapon_model; ?> + + status; ?> + +data); + $num=0; + foreach($this->data as $member){ + if($member->status_id >= 4){ + decho($member); +?> +"; + } + else { + echo ''; + } + ?> + + +rank_short}.png")){ + echo "rank_short}.png\" alt=\"{$member->rank_short}\" />"; + }else{ + //echo $member->rank_short; + } +?> + + + rank_long . ' ' . $member->first_name . ' ' . $member->last_name; ?> + + + role_name; ?> +Roles) . ' roles attached to: ' . $member->last_name); + for($role = 0; $role < count($member->Roles); ++$role) + { + if($member->Roles[$role]->role_name) + { + //decho($role . " = (" . $member->Roles[$role]->role_name . ")"); + + echo $member->Roles[$role]->role_name; + if($role < count($member->Roles) - 1) echo ', '; + + //echo ' '; + } + } */ +?> + + + getDiffTime($member->date_enlisted, $member->date_discharged); ?> + + status; ?> + +db->Query("SELECT * FROM `rudi_combat_units` WHERE `detachment` = '$unit_id' ORDER BY `weight`"); $row = $this->db->FetchObject($result,'UnitInfo'); foreach($row as $unit){ - echo "{$unit->name} : {$unit->callsign}"; - $this->printRoster($unit->unit_id, $unit->leader_id); + $num = 0; + $check = $this->db->Query("SELECT `member_id` FROM `rudi_unit_members` WHERE `cunit_id` = '$unit->unit_id' AND `date_discharged` IS NULL LIMIT 1"); + $num = $this->db->Rows($check); + if($num >= 1 && $unit->unit_id != RUDI_ROSTER_RESERVES){ + echo "{$unit->name} : {$unit->callsign}"; + $this->printRoster($unit->unit_id, $unit->leader_id); + } $this->displayUnitsRec($unit->unit_id); } } @@ -742,6 +973,9 @@ class RUDI_Common ."m.location_city, " ."m.location_province, " ."m.primary_mos, " + ."m.points, " + ."m.drillcount, " + ."m.attendcount, " ."r.rank_id, " ."r.image AS rank_image, " ."r.longname AS rank_long, " @@ -759,9 +993,14 @@ class RUDI_Common ."t.team_id, " ."t.name AS team_name, " ."t.leader_id AS team_leader_id, " + ."ro.role_id, " + ."ro.name AS role_name, " ."w.weapon_id, " ."w.manufacturer AS weapon_manufacturer, " ."w.model AS weapon_model, " + ."w2.weapon_id, " + ."w2.manufacturer AS weapon2_manufacturer, " + ."w2.model AS weapon2_model, " ."co.country_id, " ."co.name AS country_name, " ."co.image AS country_image, " @@ -780,7 +1019,9 @@ class RUDI_Common ."FROM rudi_unit_members AS m " ."LEFT OUTER JOIN rudi_weapons AS w ON w.weapon_id = m.weapon_id " - ."LEFT OUTER JOIN rudi_units AS u ON u.unit_id = m.unit_id " + ."LEFT OUTER JOIN rudi_weapons AS w2 ON w2.weapon_id = m.weapon2_id " + ."LEFT OUTER JOIN rudi_roles AS ro ON ro.role_id = m.role_id " + ."LEFT OUTER JOIN rudi_combat_units AS u ON u.unit_id = m.cunit_id " ."LEFT OUTER JOIN rudi_squads AS s ON s.squad_id = m.squad_id " ."LEFT OUTER JOIN rudi_teams AS t ON t.team_id = m.team_id " ."LEFT OUTER JOIN rudi_platoons AS p ON p.platoon_id = m.platoon_id " @@ -799,6 +1040,7 @@ class RUDI_Common ."m.status_id, " ."m.date_promotion, " ."m.date_enlisted, " + ."m.date_discharged, " ."m.primary_mos, " ."r.rank_id, " ."r.image AS rank_image, " @@ -816,6 +1058,8 @@ class RUDI_Common ."st.status_id, " ."t.team_id, " ."t.name AS team_name, " + ."ro.role_id, " + ."ro.name AS role_name, " ."w.weapon_id, " ."w.manufacturer AS weapon_manufacturer, " ."w.model AS weapon_model, " @@ -825,6 +1069,7 @@ class RUDI_Common ."FROM rudi_unit_members AS m " ."LEFT OUTER JOIN rudi_weapons AS w ON w.weapon_id = m.weapon_id " + ."LEFT OUTER JOIN rudi_roles AS ro ON ro.role_id = m.role_id " ."LEFT OUTER JOIN rudi_combat_units AS u ON u.unit_id = m.cunit_id " ."LEFT OUTER JOIN rudi_squads AS s ON s.squad_id = m.squad_id " ."LEFT OUTER JOIN rudi_teams AS t ON t.team_id = m.team_id " @@ -848,22 +1093,24 @@ class RUDI_Common { $count = $member->member_id; $this->data[$member->member_id] = $member; - $this->data[$count]->Roles = $this->getRoles($member->member_id,$member->rank_id); + /* $this->data[$count]->Roles = $this->getRoles($member->member_id,$member->rank_id); if(is_object($this->data[$count]->Roles)) { $this->data[$count]->Roles = array((object)$nothing); - } + } */ if($query_t != RUDI_PROFILE_SMALL) { $this->data[$count]->service_record = $this->getServiceRecord($member->member_id); $this->data[$count]->award_record = $this->getAwardRecord($member->member_id); $this->data[$count]->combat_record = $this->getCombatRecord($member->member_id); - $this->data[$count]->superior->unit = $this->getSuperiorUnit($member->unit_id); + //$this->data[$count]->superior_next = $this->getSuperiorTrue($member->member_id); + $this->data[$count]->superior = $this->getSuperior($member->member_id); + $this->data[$count]->superior->unit = $this->getSuperiorUnit($member->unit_id); $this->data[$count]->superior->platoon = $this->getSuperiorPlatoon($member->platoon_id); $this->data[$count]->superior->squad = $this->getSuperiorSquad($member->squad_id); $this->data[$count]->superior->team = $this->getSuperiorTeam($member->team_id); - $this->data[$count]->superior_next = $this->getSuperiorTrue($member->member_id); + $this->data[$count]->superior_next = $this->getSuperiorTrue($member->member_id); } $count++; } @@ -876,7 +1123,7 @@ class RUDI_Common $query = "SELECT a.award_id, a.image, a.name, a.description, a.class_id, c.name AS class_name " ."FROM rudi_awards AS a " ."LEFT OUTER JOIN rudi_award_classes AS c ON c.class_id = a.class_id " - ."ORDER BY c.class_id, a.award_id ASC"; + ."ORDER BY a.weight, c.class_id, a.award_id ASC"; $result = $this->db->Query($query); $row = $this->db->FetchObject($result,'Award'); return $row; @@ -890,6 +1137,16 @@ class RUDI_Common return $row; } + protected function getWeapons($order = "") + { + $query = "SELECT weapon_id, manufacturer, model, role, caliber FROM rudi_weapons"; + $query = $query ." ". $order; + $result = $this->db->Query($query); + $row = $this->db->Fetch($result); + return $row; + } + + protected function getRanks() { $query = "SELECT rank_id, shortname, longname, image FROM rudi_ranks WHERE active = 1 ORDER BY weight DESC"; diff --git a/modules/rudi/includes/information.class.php b/modules/rudi/includes/information.class.php index 2632675..d34c4aa 100644 --- a/modules/rudi/includes/information.class.php +++ b/modules/rudi/includes/information.class.php @@ -1,34 +1,34 @@ -db = $db; - } - - public function Unit($unit_id) - { - $query = sprintf("SELECT leader_id, name, logo, url, creed, bio - FROM rudi_units - WHERE unit_id = %d", (int)$unit_id); - $result = $this->db->Query($query); - $unit = $this->db->FetchObject($result, 'UnitInfo', true); - return $unit; - } - - public function Platoon($unit_id, $platoon_id) - { - $query = sprintf("SELECT leader_id, name, logo, creed, bio - FROM rudi_platoons - WHERE unit_id = %d AND platoon_id = %d", (int)$unit_id, (int)$platoon_id); - $result = $this->db->Query($query); - $platoon = $this->db->FetchObject($result, 'UnitInfo', true); - decho($platoon); - - return $platoon; - } -} - +db = $db; + } + + public function Unit($unit_id) + { + $query = sprintf("SELECT leader_id, name, logo, url, creed, bio + FROM rudi_units + WHERE unit_id = %d", (int)$unit_id); + $result = $this->db->Query($query); + $unit = $this->db->FetchObject($result, 'UnitInfo', true); + return $unit; + } + + public function Platoon($unit_id, $platoon_id) + { + $query = sprintf("SELECT leader_id, name, logo, creed, bio + FROM rudi_platoons + WHERE unit_id = %d AND platoon_id = %d", (int)$unit_id, (int)$platoon_id); + $result = $this->db->Query($query); + $platoon = $this->db->FetchObject($result, 'UnitInfo', true); + decho($platoon); + + return $platoon; + } +} + ?> \ No newline at end of file diff --git a/modules/rudi/includes/rudi.css b/modules/rudi/includes/rudi.css index 8c4ebf2..1eececd 100644 --- a/modules/rudi/includes/rudi.css +++ b/modules/rudi/includes/rudi.css @@ -1,25 +1,22 @@ -table.rudi { - /* background: green; */ -} /* -table{ +table.rudi{ border:1px solid #000; } -tr{ +table.rudi tr{ border:1px solid #000; } -th{ +table.rudi th{ padding:5px; border:1px solid #000; -} +} -td{ +table.rudi td{ text-align:center; padding:2px; border:1px solid #000; -} */ +}*/ table.rudi td.data{ text-align:left; @@ -36,17 +33,19 @@ table.rudi th { table.rudi td { text-align:center; vertical-align: middle; - /* border: 1px solid #a1a1a1; */ + /*border: 1px solid #a1a1a1;*/ } -table.rudi td.roster { + +/*table.rudi td.roster { text-align:center; vertical-align: middle; border: 1px solid #a1a1a1; -} + height: 40px; +}*/ table.rudi th.header { - /* table has a 5px padding so everything is 10px bigger than these values */ + /*table has a 5px padding so everything is 10px bigger than these values*/ width:100px; height:19px; color: #FFF; @@ -54,7 +53,8 @@ table.rudi th.header { border: 1px solid #666; font-family: arial, helvetica, sans-serif; font-size:12px; -} +} + table.rudi td.info { color: #333; @@ -64,8 +64,54 @@ table.rudi td.info { border: 1px solid #666; font-family: arial, helvetica, sans-serif; font-size:12px; -} +} #thin { border:1px outset #333; } + + table.rudiroster { + font-family: verdana; + font-size: 10px; + width: 850px; + text-align: center; + color: #2c2921; + /*background-color: #b0aea2;*/ + background-color: #6b675c; + } + + .rudiroster th { + background-color: #575551; + color: white; + } + .rudiroster td { + font-size: 10px; + height: 25px; + } + .rudiroster tr { + height: 25px; + /*background-color: #78756c;*/ + background-color: #d6d6d6; + } + .rudiroster tr.unfilled { + background-color: #7e7e7e; + color: #9d9d9d; + } + table.rudiroster td img { + padding:0px; + } + + tr.null { + height: 10px; + } + + .rudiroster tr.high { + /* background-color: #898577; */ + background-color: #e4e6e8; + } + + a.rosterlink, a.rosterlink:hover, a.rosterlink:visited { + font-size: 10px; + color: #2c2921; + text-decoration: none; + } \ No newline at end of file diff --git a/modules/rudi/index.php b/modules/rudi/index.php index 995c90d..4550ad7 100644 --- a/modules/rudi/index.php +++ b/modules/rudi/index.php @@ -1,11 +1,14 @@ RUDI: Realism Unit Data Interface
"; @@ -66,7 +69,14 @@ class RUDI_Gateway extends RUDI_Common //$this->drills = $this->getDrills($_GET['id']); $drills = new RUDI_Drills($_GET['id']); include 'views/view.drills.php'; - break; + break; + case 'points': + $this->Update(); + include 'views/view.points.php'; + break; + case 'weapons': + include 'views/view.weapons.php'; + break; } echo ""; CloseTable(); diff --git a/modules/rudi/views/view.awards.php b/modules/rudi/views/view.awards.php index 5039e56..0a17005 100644 --- a/modules/rudi/views/view.awards.php +++ b/modules/rudi/views/view.awards.php @@ -1,4 +1,4 @@ - + images_path . "/medals/"; ?> diff --git a/modules/rudi/views/view.information.php b/modules/rudi/views/view.information.php index a62ba8a..d017564 100644 --- a/modules/rudi/views/view.information.php +++ b/modules/rudi/views/view.information.php @@ -1,20 +1,20 @@ - \ No newline at end of file diff --git a/modules/rudi/views/view.platoon.php b/modules/rudi/views/view.platoon.php index dbbb455..4ee60dc 100644 --- a/modules/rudi/views/view.platoon.php +++ b/modules/rudi/views/view.platoon.php @@ -1,22 +1,22 @@ -Platoon($unit_id, $platoon_id); ?> - - - - - - - - - - - - - - - - - - -
 <?php echo $data->logo; ?>
Platoonname; ?>
Creedcreed; ?>
Biographybio; ?>
- +Platoon($unit_id, $platoon_id); ?> + + + + + + + + + + + + + + + + + + +
 <?php echo $data->logo; ?>
Platoonname; ?>
Creedcreed; ?>
Biographybio; ?>
+ \ No newline at end of file diff --git a/modules/rudi/views/view.points.php b/modules/rudi/views/view.points.php new file mode 100644 index 0000000..bf6c2b6 --- /dev/null +++ b/modules/rudi/views/view.points.php @@ -0,0 +1,35 @@ +

Points Ticker:

+ + + + + + + + + + +data as $member){ + if($member->status_id < 4){ + if($num %2 == 0){ + echo ''; + }else{ + echo ''; + } +?> + + + + + + + + +
RankNamePointsMissed CountAttended Count
rank_short; ?>first_name." ".$member->last_name; ?>points; ?>drillcount; ?>attendcount; ?>
\ No newline at end of file diff --git a/modules/rudi/views/view.profile.php b/modules/rudi/views/view.profile.php index 6135ea4..97adead 100644 --- a/modules/rudi/views/view.profile.php +++ b/modules/rudi/views/view.profile.php @@ -1,10 +1,14 @@ data[$_GET['profile']]; -$uniform_image = $member->first_name[0].str_replace(array("'", "\""), "", $member->last_name).".png"; +$uniform_image = "modules/rudi/images/uniform/".$member->first_name[0].str_replace(array("'", "\""), "", $member->last_name).".png"; decho($member); define('BLOCK_RIGHT_DISABLE', true); + +$arrUnits = $this->getUnitArr($_GET['profile']); +decho($arrUnits); ?> + + + + + +getWeapons("ORDER BY role ASC, caliber ASC, model ASC"); ?> +
+ + + '; + } + if($num%2==0) + echo ''; + else + echo ""; + echo ""; + $role = $weapon['role']; + $num++; + } + + ?> + +
ModelCaliberRole
".$weapon['model']."".$weapon['caliber']."".$weapon['role']."
+
+ + + \ No newline at end of file -- cgit