├── LEGAL.txt ├── README.md ├── styles ├── images │ ├── Thumbs.db │ ├── DC3-Banner.jpg │ ├── ajax-loader.png │ ├── countdownLED.png │ ├── icons-18-black.png │ ├── icons-18-white.png │ ├── icons-36-black.png │ ├── icons-36-white.png │ ├── countdownGlowing.gif │ ├── icon-search-black.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_4b8e0b_256x240.png │ ├── ui-icons_a83300_256x240.png │ ├── ui-icons_cccccc_256x240.png │ ├── ui-icons_ffffff_256x240.png │ ├── ui-bg_flat_30_cccccc_40x100.png │ ├── ui-bg_flat_50_5c5c5c_40x100.png │ ├── ui-bg_glass_40_ffc73d_1x400.png │ ├── ui-bg_loop_25_000000_21x21.png │ ├── ui-bg_highlight-hard_20_0972a5_1x100.png │ ├── ui-bg_highlight-soft_33_003147_1x100.png │ ├── ui-bg_highlight-soft_35_222222_1x100.png │ ├── ui-bg_highlight-soft_44_444444_1x100.png │ └── ui-bg_highlight-soft_80_eeeeee_1x100.png ├── default-color.css ├── jquery.countdown.css ├── default.css ├── scoreboard.css ├── scorecard.css ├── TableTools_JUI.css └── dataTable_jui.css ├── scripts ├── datatables │ ├── images │ │ ├── Thumbs.db │ │ ├── favicon.ico │ │ ├── sort_asc.png │ │ ├── sort_both.png │ │ ├── sort_desc.png │ │ ├── back_enabled.jpg │ │ ├── Sorting icons.psd │ │ ├── back_disabled.jpg │ │ ├── forward_enabled.jpg │ │ ├── forward_disabled.jpg │ │ ├── sort_asc_disabled.png │ │ └── sort_desc_disabled.png │ ├── tableTools │ │ ├── images │ │ │ ├── copy.png │ │ │ ├── csv.png │ │ │ ├── pdf.png │ │ │ ├── xls.png │ │ │ ├── Thumbs.db │ │ │ ├── print.png │ │ │ ├── csv_hover.png │ │ │ ├── pdf_hover.png │ │ │ ├── xls_hover.png │ │ │ ├── background.png │ │ │ ├── collection.png │ │ │ ├── copy_hover.png │ │ │ ├── print_hover.png │ │ │ ├── psd │ │ │ │ ├── printer.psd │ │ │ │ ├── collection.psd │ │ │ │ ├── file_types.psd │ │ │ │ └── copy document.psd │ │ │ └── collection_hover.png │ │ ├── as3 │ │ │ ├── lib │ │ │ │ └── AlivePDF.swc │ │ │ ├── ZeroClipboard.as │ │ │ └── ZeroClipboardPdf.as │ │ ├── swf │ │ │ ├── copy_cvs_xls.swf │ │ │ └── copy_cvs_xls_pdf.swf │ │ ├── css │ │ │ └── TableTools.css │ │ └── ZeroClipboard.js │ ├── js │ │ └── jquery.dataTables.min.js.gz │ └── css │ │ ├── demo_page.css │ │ ├── demo_table_jui.css │ │ └── demo_table.css └── date.format.js ├── DOCS ├── DC3 Digital Crime Scene Challenge - Brief UNCLASS 2013 07 01.pdf ├── DC3 Digital Crime Scene Challenge - Admin Packet UNCLASS 2013 07 22.pdf └── DC3 Digital Crime Scene Challenge - App Tutorial UNCLASS 2013 07 02.pdf ├── inc ├── lib │ ├── lib.php │ ├── sanitize.php │ ├── functions.php │ └── jQueryFunctions.php ├── footer.php ├── global.php ├── dbGet.php ├── header.php ├── includes.php └── siteFunctions.php ├── scoreboard ├── index.php ├── score.php ├── save_score.php ├── team_score.php ├── scoreboard.php ├── daily_score.php ├── scoreboards.php └── scorecard.php ├── team ├── index.php ├── team_list.php ├── save_team.php ├── save_player.php ├── member_list.php ├── team.php └── player.php ├── index.php ├── queue └── index.php └── item └── index.php /LEGAL.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/LEGAL.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/README.md -------------------------------------------------------------------------------- /styles/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/Thumbs.db -------------------------------------------------------------------------------- /styles/default-color.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* CSS Document */ 3 | 4 | /* GENERAL CLASS STYLES */ 5 | .boxed 6 | { border: 1px solid #666; } -------------------------------------------------------------------------------- /styles/images/DC3-Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/DC3-Banner.jpg -------------------------------------------------------------------------------- /styles/images/ajax-loader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ajax-loader.png -------------------------------------------------------------------------------- /styles/images/countdownLED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/countdownLED.png -------------------------------------------------------------------------------- /styles/images/icons-18-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/icons-18-black.png -------------------------------------------------------------------------------- /styles/images/icons-18-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/icons-18-white.png -------------------------------------------------------------------------------- /styles/images/icons-36-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/icons-36-black.png -------------------------------------------------------------------------------- /styles/images/icons-36-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/icons-36-white.png -------------------------------------------------------------------------------- /scripts/datatables/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/Thumbs.db -------------------------------------------------------------------------------- /styles/images/countdownGlowing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/countdownGlowing.gif -------------------------------------------------------------------------------- /styles/images/icon-search-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/icon-search-black.png -------------------------------------------------------------------------------- /scripts/datatables/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/favicon.ico -------------------------------------------------------------------------------- /scripts/datatables/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/sort_asc.png -------------------------------------------------------------------------------- /scripts/datatables/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/sort_both.png -------------------------------------------------------------------------------- /scripts/datatables/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/sort_desc.png -------------------------------------------------------------------------------- /scripts/datatables/images/back_enabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/back_enabled.jpg -------------------------------------------------------------------------------- /styles/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /styles/images/ui-icons_4b8e0b_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-icons_4b8e0b_256x240.png -------------------------------------------------------------------------------- /styles/images/ui-icons_a83300_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-icons_a83300_256x240.png -------------------------------------------------------------------------------- /styles/images/ui-icons_cccccc_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-icons_cccccc_256x240.png -------------------------------------------------------------------------------- /styles/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /scripts/datatables/images/Sorting icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/Sorting icons.psd -------------------------------------------------------------------------------- /scripts/datatables/images/back_disabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/back_disabled.jpg -------------------------------------------------------------------------------- /scripts/datatables/images/forward_enabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/forward_enabled.jpg -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/copy.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/csv.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/pdf.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/xls.png -------------------------------------------------------------------------------- /styles/images/ui-bg_flat_30_cccccc_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_flat_30_cccccc_40x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_flat_50_5c5c5c_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_flat_50_5c5c5c_40x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_glass_40_ffc73d_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_glass_40_ffc73d_1x400.png -------------------------------------------------------------------------------- /styles/images/ui-bg_loop_25_000000_21x21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_loop_25_000000_21x21.png -------------------------------------------------------------------------------- /scripts/datatables/images/forward_disabled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/forward_disabled.jpg -------------------------------------------------------------------------------- /scripts/datatables/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/Thumbs.db -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/print.png -------------------------------------------------------------------------------- /scripts/datatables/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /scripts/datatables/js/jquery.dataTables.min.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/js/jquery.dataTables.min.js.gz -------------------------------------------------------------------------------- /scripts/datatables/tableTools/as3/lib/AlivePDF.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/as3/lib/AlivePDF.swc -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/csv_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/csv_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/pdf_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/pdf_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/xls_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/xls_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/swf/copy_cvs_xls.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/swf/copy_cvs_xls.swf -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/background.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/collection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/collection.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/copy_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/copy_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/print_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/print_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/psd/printer.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/psd/printer.psd -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/psd/collection.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/psd/collection.psd -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/psd/file_types.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/psd/file_types.psd -------------------------------------------------------------------------------- /scripts/datatables/tableTools/swf/copy_cvs_xls_pdf.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/swf/copy_cvs_xls_pdf.swf -------------------------------------------------------------------------------- /styles/images/ui-bg_highlight-hard_20_0972a5_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_highlight-hard_20_0972a5_1x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_highlight-soft_33_003147_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_highlight-soft_33_003147_1x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_highlight-soft_35_222222_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_highlight-soft_35_222222_1x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_highlight-soft_44_444444_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_highlight-soft_44_444444_1x100.png -------------------------------------------------------------------------------- /styles/images/ui-bg_highlight-soft_80_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/styles/images/ui-bg_highlight-soft_80_eeeeee_1x100.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/collection_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/collection_hover.png -------------------------------------------------------------------------------- /scripts/datatables/tableTools/images/psd/copy document.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/scripts/datatables/tableTools/images/psd/copy document.psd -------------------------------------------------------------------------------- /DOCS/DC3 Digital Crime Scene Challenge - Brief UNCLASS 2013 07 01.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/DOCS/DC3 Digital Crime Scene Challenge - Brief UNCLASS 2013 07 01.pdf -------------------------------------------------------------------------------- /DOCS/DC3 Digital Crime Scene Challenge - Admin Packet UNCLASS 2013 07 22.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/DOCS/DC3 Digital Crime Scene Challenge - Admin Packet UNCLASS 2013 07 22.pdf -------------------------------------------------------------------------------- /DOCS/DC3 Digital Crime Scene Challenge - App Tutorial UNCLASS 2013 07 02.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dod-cyber-crime-center/Digital-Crime-Scene-Challenge/HEAD/DOCS/DC3 Digital Crime Scene Challenge - App Tutorial UNCLASS 2013 07 02.pdf -------------------------------------------------------------------------------- /styles/jquery.countdown.css: -------------------------------------------------------------------------------- 1 | /* jQuery Countdown styles 1.5.9. */ 2 | .hasCountdown { 3 | border: 1px solid #ccc; 4 | background-color: #eee; 5 | } 6 | .countdown_rtl { 7 | direction: rtl; 8 | } 9 | .countdown_holding span { 10 | background-color: #ccc; 11 | } 12 | .countdown_row { 13 | clear: both; 14 | width: 100%; 15 | padding: 0px 2px; 16 | text-align: center; 17 | } 18 | .countdown_show1 .countdown_section { 19 | width: 98%; 20 | } 21 | .countdown_show2 .countdown_section { 22 | width: 48%; 23 | } 24 | .countdown_show3 .countdown_section { 25 | width: 32.5%; 26 | } 27 | .countdown_show4 .countdown_section { 28 | width: 24.5%; 29 | } 30 | .countdown_show5 .countdown_section { 31 | width: 19.5%; 32 | } 33 | .countdown_show6 .countdown_section { 34 | width: 16.25%; 35 | } 36 | .countdown_show7 .countdown_section { 37 | width: 14%; 38 | } 39 | .countdown_section { 40 | display: block; 41 | float: left; 42 | font-size: 75%; 43 | text-align: center; 44 | } 45 | .countdown_amount { 46 | font-size: 200%; 47 | } 48 | .countdown_descr { 49 | display: block; 50 | width: 100%; 51 | } 52 | -------------------------------------------------------------------------------- /styles/default.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* CSS Document */ 3 | 4 | body 5 | { font: Arial, Verdana, "Comic Sans MS"; } 6 | 7 | form label 8 | { vertical-align: top; } 9 | 10 | /* GENERAL CLASS STYLES */ 11 | .boxed 12 | { -moz-border-radius: 6px; } 13 | 14 | .center 15 | { text-align: center; } 16 | 17 | .centered 18 | { 19 | width: 98%; 20 | margin: 0 auto; 21 | } 22 | 23 | .cleared 24 | { clear: both; } 25 | 26 | .fleft 27 | { float: left; } 28 | 29 | .fright 30 | { float: right; } 31 | 32 | .header 33 | { 34 | margin: 0; 35 | } 36 | 37 | .padded 38 | { padding: 5px; } 39 | 40 | .sidePadded 41 | { padding: 5px 10px; } 42 | 43 | input[readonly] 44 | { font-style: italic; } 45 | 46 | .hasCountdown 47 | { 48 | background: none; 49 | border: 0; 50 | } 51 | 52 | .red 53 | { color: #F00; } 54 | 55 | .green 56 | { color: #090; } 57 | 58 | @media print 59 | { 60 | .print_only 61 | { display: block; } 62 | } 63 | 64 | @media screen 65 | { 66 | .print_only 67 | { display: none; } 68 | } 69 | 70 | header 71 | { text-align: center; } 72 | 73 | header h1 74 | { font-size: 1.5em; } 75 | 76 | header h3 77 | { font-size: 1em; } 78 | 79 | footer h1 80 | { font-size: 1.25em; } 81 | 82 | footer 83 | { text-align: center; } -------------------------------------------------------------------------------- /inc/lib/lib.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/footer.php: -------------------------------------------------------------------------------- 1 | 26 | 27 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /inc/global.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/datatables/css/demo_page.css: -------------------------------------------------------------------------------- 1 | 2 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3 | * General page setup 4 | */ 5 | #dt_example { 6 | font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 7 | margin: 0; 8 | padding: 0; 9 | color: #333; 10 | background-color: #fff; 11 | } 12 | 13 | 14 | #dt_example #container { 15 | width: 800px; 16 | margin: 30px auto; 17 | padding: 0; 18 | } 19 | 20 | 21 | #dt_example #footer { 22 | margin: 50px auto 0 auto; 23 | padding: 0; 24 | } 25 | 26 | #dt_example #demo { 27 | margin: 30px auto 0 auto; 28 | } 29 | 30 | #dt_example .demo_jui { 31 | margin: 30px auto 0 auto; 32 | } 33 | 34 | #dt_example .big { 35 | font-size: 1.3em; 36 | font-weight: bold; 37 | line-height: 1.6em; 38 | color: #4E6CA3; 39 | } 40 | 41 | #dt_example .spacer { 42 | height: 20px; 43 | clear: both; 44 | } 45 | 46 | #dt_example .clear { 47 | clear: both; 48 | } 49 | 50 | #dt_example pre { 51 | padding: 15px; 52 | background-color: #F5F5F5; 53 | border: 1px solid #CCCCCC; 54 | } 55 | 56 | #dt_example h1 { 57 | margin-top: 2em; 58 | font-size: 1.3em; 59 | font-weight: normal; 60 | line-height: 1.6em; 61 | color: #4E6CA3; 62 | border-bottom: 1px solid #B0BED9; 63 | clear: both; 64 | } 65 | 66 | #dt_example h2 { 67 | font-size: 1.2em; 68 | font-weight: normal; 69 | line-height: 1.6em; 70 | color: #4E6CA3; 71 | clear: both; 72 | } 73 | 74 | #dt_example a { 75 | color: #0063DC; 76 | text-decoration: none; 77 | } 78 | 79 | #dt_example a:hover { 80 | text-decoration: underline; 81 | } 82 | 83 | #dt_example ul { 84 | color: #4E6CA3; 85 | } 86 | 87 | .css_right { 88 | float: right; 89 | } 90 | 91 | .css_left { 92 | float: left; 93 | } -------------------------------------------------------------------------------- /inc/dbGet.php: -------------------------------------------------------------------------------- 1 | $teamID); 31 | $stmt = dbQuery($sql, $param); 32 | dbExecute($stmt); 33 | $result = dbResult($stmt); 34 | return $result; 35 | } 36 | 37 | 38 | //Functions used to get a single column of player data. 39 | function getPlayerName($playerID) 40 | { 41 | $sql = "SELECT CONCAT(first_name, ' ', last_name) FROM view_player_info WHERE playerID = :playerID"; 42 | $param = array(":playerID" => $playerID); 43 | $stmt = dbQuery($sql, $param); 44 | dbExecute($stmt); 45 | $result = dbResult($stmt); 46 | return $result; 47 | } 48 | ?> -------------------------------------------------------------------------------- /styles/scoreboard.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* CSS Document */ 3 | 4 | 5 | @media screen 6 | { 7 | table, 8 | td, th 9 | { 10 | padding: 10px; 11 | margin: 5px; 12 | } 13 | 14 | th 15 | { border-bottom: 1px solid #FFF; } 16 | 17 | .ui-block-a fieldset, 18 | .ui-block-b fieldset, 19 | .ui-block-c fieldset 20 | { margin: 0 5px; } 21 | 22 | .ui-grid-b center 23 | { min-height: 110px; } 24 | 25 | .center 26 | { text-align: center; } 27 | 28 | td 29 | { font-weight: bolder; } 30 | } 31 | 32 | @media print 33 | { 34 | body * 35 | { 36 | background: none; 37 | border: none; 38 | background-color: #FFF; 39 | color: #000; 40 | margin: 0 auto; 41 | padding: 0; 42 | width: 800px; 43 | } 44 | 45 | .ui-page * 46 | { 47 | width: 800px; 48 | background: #FFF; 49 | } 50 | 51 | #header, 52 | #footer 53 | { display: none; } 54 | 55 | .print_only 56 | { display: block; } 57 | 58 | .print_only h2 59 | { 60 | padding: 10px 0; 61 | text-align: center; 62 | } 63 | 64 | #scoreboard_content 65 | { 66 | display: block; 67 | color: #000; 68 | background: none; 69 | margin: 0; 70 | padding: 0; 71 | border: none; 72 | } 73 | 74 | #scoreboard_content div 75 | { clear: both; } 76 | 77 | #scoreboard_content * 78 | { border-radius: 0; } 79 | 80 | #scoreboard_content table 81 | { 82 | border: 1px solid #000; 83 | border-spacing: 0; 84 | padding: 5px; 85 | margin: 0 auto 10px auto; 86 | width: 600px; 87 | } 88 | 89 | #scoreboard_content th 90 | { 91 | border-bottom: 2px solid #000; 92 | margin: 0; 93 | } 94 | 95 | #scoreboard_content td 96 | { 97 | margin: 0; 98 | border: 1px solid #000; 99 | } 100 | } -------------------------------------------------------------------------------- /styles/scorecard.css: -------------------------------------------------------------------------------- 1 | /* CSS Document */ 2 | 3 | @media screen 4 | { 5 | .teamcard legend 6 | { 7 | margin: 20px 0 0 0; 8 | padding: 10px 10px 5px 10px; 9 | } 10 | 11 | .teamcard div 12 | { padding: 10px 0 0 15px; } 13 | } 14 | 15 | @media print 16 | { 17 | body *, 18 | body .ui-body-c 19 | { 20 | background: none; 21 | border: none; 22 | background-color: #FFF; 23 | color: #000; 24 | margin: 0 auto; 25 | padding: 0; 26 | width: 800px; 27 | } 28 | 29 | .ui-page * 30 | { 31 | width: 800px; 32 | background: #FFF; 33 | } 34 | 35 | #header, 36 | #footer 37 | { display: none; } 38 | 39 | .ui-body 40 | { 41 | border: none; 42 | margin: 0; 43 | padding: 0; 44 | border: 0; 45 | background: none; 46 | } 47 | 48 | .teamcard legend 49 | { 50 | border: none; 51 | font-size: 1.5em; 52 | } 53 | } 54 | 55 | .this .title 56 | { 57 | padding-top: 10px; 58 | background-color: #535353; 59 | color: #FFF; 60 | text-shadow: none; 61 | border-top-left-radius: 6px; 62 | border-top-right-radius: 6px; 63 | } 64 | 65 | .this th, 66 | .this td 67 | { 68 | border-bottom: 1px solid #FFF; 69 | padding: 0 10px; 70 | background-color: #F0F0F0; 71 | } 72 | 73 | .this td 74 | { text-align: right; } 75 | 76 | th:nth-child(1), 77 | td:nth-child(1), 78 | th:nth-child(2), 79 | td:nth-child(2) 80 | { background-color: #CCC; } 81 | 82 | tr:last-child td:first-child 83 | { border-bottom-left-radius: 6px; } 84 | 85 | tr:last-child td:last-child 86 | { border-bottom-right-radius: 6px; } 87 | 88 | .missed 89 | { color: #900; } 90 | 91 | .got 92 | { color: #090; } 93 | 94 | .sum td 95 | { 96 | border-top: 2px solid #000; 97 | border-bottom: none; 98 | color: #000; 99 | background: none; 100 | } -------------------------------------------------------------------------------- /scoreboard/index.php: -------------------------------------------------------------------------------- 1 | $basePath."index.php", 36 | "Overall Scoreboard" => $basePath."scoreboard/scoreboard.php", 37 | "Team Score Card" => $basePath."scoreboard/team_score.php", 38 | "Daily Scoreboard" => $basePath."scoreboard/daily_scoreboard.php" 39 | ); 40 | 41 | ?> 42 |
43 | 53 |
54 | -------------------------------------------------------------------------------- /team/index.php: -------------------------------------------------------------------------------- 1 | "team/team.php", 36 | "View/Edit Team Information" => "team/team_list.php", 37 | "Change Team Members Affilation" => "team/member_list.php", 38 | "Participating Team Queue" => "queue/index.php" 39 | ); 40 | ?> 41 |
42 | 52 |
53 | -------------------------------------------------------------------------------- /inc/header.php: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | 32 | <?=PAGETITLE?> 33 | 34 | 35 | 47 |
48 |
49 |
50 |

51 |

52 |
53 | HOME 54 | In the Queue 55 |
56 |
57 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | "", 36 | "Create Team" => "team/team.php", 37 | "Teams" => "team/index.php", 38 | "Participation Information" => "", 39 | "In the Queue" => "queue/index.php", 40 | "Score Information" => "", 41 | "Overall Scoreboard" => "scoreboard/scoreboard.php", 42 | "Scenario Scoreboards" => "scoreboard/scoreboards.php", 43 | "Review Team Score Card" => "scoreboard/team_score.php", 44 | "Daily Scoreboard" => "scoreboard/daily_score.php" 45 | ); 46 | ?> 47 |
48 |
    49 | $link) 51 | { 52 | if($link == "") 53 | { 54 | ?> 55 |
  • 56 | 61 |
  • 62 | 66 |
67 |
68 | -------------------------------------------------------------------------------- /scoreboard/score.php: -------------------------------------------------------------------------------- 1 | 40 |
41 | 42 | In the Queue 43 | Overall Scoreboard 44 |
45 | 50 |
51 | 56 | Team's Scorecard 57 | Overall Scoreboard 58 |
59 | -------------------------------------------------------------------------------- /team/team_list.php: -------------------------------------------------------------------------------- 1 | 35 |
36 |
37 |

38 | Create a new team 39 | Create Team 41 |
42 | Select the team to view full information 43 |

44 |
    45 | 57 |
  • 58 | 64 |
65 |
66 |
67 | -------------------------------------------------------------------------------- /scoreboard/save_score.php: -------------------------------------------------------------------------------- 1 | $info) 46 | { 47 | if($info["time_found"] > "") 48 | { 49 | $params[":itemID"] = $itemID; 50 | $params[":teamID"] = $teamID; 51 | $params[":time_found"] = $info["time_found"]; 52 | $params[":wrong"] = ($info["wrong"] != "" ? $info["wrong"] : 0); 53 | $stmt = dbQuery($sql, $params); 54 | dbExecute($stmt); 55 | unset($params); 56 | unset($stmt); 57 | } 58 | } 59 | 60 | $sql = "CALL sp_calc_team_score(:teamID, :start_time, :attempt_time)"; 61 | if($teamInfo["start_time"] != "" && $teamInfo["attempt_time"] != "") 62 | { 63 | $params[":teamID"] = $teamID; 64 | $params[":start_time"] = $teamInfo["start_time"]; 65 | $params[":attempt_time"] = $teamInfo["attempt_time"]; 66 | $stmt = dbQuery($sql, $params); 67 | dbExecute($stmt); 68 | unset($params); 69 | unset($stmt); 70 | } 71 | } 72 | else 73 | { $infoMsg = "Teams data cannot be saved twice."; } 74 | ?> -------------------------------------------------------------------------------- /scoreboard/team_score.php: -------------------------------------------------------------------------------- 1 | 35 | 36 |
37 | 43 |
44 | 45 |
46 | 58 |
59 |

Select Team to view Score Card

60 |
    61 | $row) 63 | { 64 | $path = $basePath."scoreboard/team_score.php?teamID=".$row["teamID"]; 65 | ?> 66 |
  • -
  • 67 | 70 |
71 |
72 |

No teams have scored yet.

78 |
79 | -------------------------------------------------------------------------------- /inc/includes.php: -------------------------------------------------------------------------------- 1 | '; } 56 | 57 | //Include a special CSS file based on the pageCSS variable. 58 | if($pageCSS) 59 | { echo " \n".''; } 60 | 61 | //Attach javascript files. 62 | foreach($jsFileName as $fileName) 63 | { echo " \n".''; } 64 | 65 | ?> 66 | -------------------------------------------------------------------------------- /scoreboard/scoreboard.php: -------------------------------------------------------------------------------- 1 | 50 | 71 |
72 |

Overall Scoreboard

73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 1) 82 | { ?> 84 | 85 | 86 | 87 | $row) 89 | { 90 | ?> 91 | 92 | 93 | 94 | 95 | 96 | 1) 98 | { ?> 100 | 101 | 104 | 105 |
RANKTEAM NAMESCOREATTEMPT TIMECATEGORY
106 |
107 | -------------------------------------------------------------------------------- /team/save_team.php: -------------------------------------------------------------------------------- 1 | 0) 69 | { $sql = "CALL sp_save_team_info(:teamID, :team_name, :disqualified, :scenario_type)"; } 70 | else 71 | { $sql = "CALL sp_create_team(:teamID, :team_name, :disqualified, :scenario_type)"; } 72 | 73 | $params[":teamID"] = (int)$teamID; 74 | 75 | if((string)$teamInfo["team_name"] != "") 76 | { $teamName = $teamInfo["team_name"]; } 77 | else 78 | { 79 | $sql = "SELECT MAX(teamID) FROM team"; 80 | $stmt = dbQuery($sql); 81 | $result = dbResult($stmt) + 1; 82 | $teamName = "Default Team Name - ".$result; 83 | } 84 | $params[":team_name"] = $teamName; 85 | 86 | if((int)$teamInfo["disqualified"]) 87 | { $disqualified = $teamInfo["disqualified"]; } 88 | else 89 | { $disqualified = 0; } 90 | $params[":disqualified"] = (int)$disqualified; 91 | 92 | if((int)$teamInfo["scenario_type"] > 0) 93 | { $scenario_type = $teamInfo["scenario_type"]; } 94 | else 95 | { $scenario_type = 1; } 96 | $params[":scenario_type"] = (int)$scenario_type; 97 | //echo "SQL: ".$sql; 98 | //echo "
"; print_r($params); echo "
"; 99 | //Execute query 100 | $stmt = dbQuery($sql, $params); 101 | dbExecute($stmt); 102 | $result = dbResult($stmt); 103 | return $result; 104 | } 105 | } 106 | ?> -------------------------------------------------------------------------------- /scoreboard/daily_score.php: -------------------------------------------------------------------------------- 1 | 44 | 45 |
46 |

Daily Scoreboard

47 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 81 | 86 | 87 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 99 |
RANKTeam NameTeam ScoreDay Played
82 |
83 | 84 |
85 |
">
100 |
101 | -------------------------------------------------------------------------------- /queue/index.php: -------------------------------------------------------------------------------- 1 | 35 |
36 | 64 | Refresh Page 65 |
66 |

Select the next playing team

67 |
    68 | $info) 70 | { 71 | $teamName = array_shift($info); 72 | $text = ""; 73 | $players = array(); 74 | $players = $info; 75 | foreach($players as $num => $playerName) 76 | { 77 | $text .= $playerName." | "; 78 | } 79 | $fulltext = $teamName."
    ".substr($text, 0, -3); 80 | ?> 81 |
  • 82 | 85 |
86 |
87 | 92 |

Nothing in queue.

93 |

Page will auto refresh every 5 seconds until a team in placed in the queue. To manually refresh the page click the button below.

94 | Refresh Page 95 | 98 | 101 |
102 | -------------------------------------------------------------------------------- /team/save_player.php: -------------------------------------------------------------------------------- 1 | 0); 42 | $i = 0; 43 | 44 | foreach($parts as $id => $value) 45 | { 46 | if($id == 0 || $id == 4 || $id == 5) 47 | { $playerInfo[$neededFields[$i++]] = $value; } 48 | } 49 | $playerInfo["active"] = 1; 50 | } 51 | 52 | if(playerExists($playerID, $playerInfo)) 53 | { 54 | $where = "dup"; 55 | } 56 | else 57 | { 58 | $playerID = savePlayer($teamID, $playerInfo); 59 | } 60 | 61 | //Where to go and what to do! 62 | switch($where) 63 | { 64 | case "dup": 65 | //Duplicate badgeID 66 | $location .= "player.php?where=dup&teamID=".$teamID; 67 | break; 68 | case "add another player": 69 | //Add New Player 70 | $location .= "player.php?where=edit&teamID=".$teamID; 71 | break; 72 | 73 | case "save player": 74 | //Save player and return 75 | $location = "player.php?where=view&teamID=".$teamID."&playerID=".$playerID; 76 | break; 77 | 78 | default: 79 | $location .= "team.php?where=view&teamID=".$teamID; 80 | break; 81 | } 82 | 83 | //Move to next page 84 | header("location:".$location); 85 | 86 | 87 | function savePlayer($teamID, $playerInfo) 88 | { 89 | if(is_array($playerInfo)) 90 | { 91 | //Set player info vars for SP 92 | foreach($playerInfo as $name => $value) 93 | { 94 | $sql .= ":".$name.", "; 95 | $params[":".$name] = $value; 96 | if(($name == "playerID") && $value) 97 | { $skip = TRUE; } 98 | } 99 | 100 | //Remove extra characters 101 | $sql = substr($sql, 0, -2); 102 | 103 | //Build and process SP to add/update player data 104 | $sql = "CALL sp_save_player(".$sql.")"; 105 | $stmt = dbQuery($sql, $params); 106 | dbExecute($stmt); 107 | $playerID = dbResult($stmt); 108 | 109 | //Clear Vars 110 | unset($sql); 111 | unset($params); 112 | unset($stmt); 113 | 114 | if(!$skip) 115 | { 116 | //Build and process SP to add player to team 117 | $sql = "CALL sp_add_team_member(:teamID, :playerID)"; 118 | $params = array( 119 | ":teamID" => $teamID, 120 | ":playerID" => $playerID 121 | ); 122 | $stmt = dbQuery($sql, $params); 123 | dbExecute($stmt); 124 | } 125 | return $playerID; 126 | } 127 | } 128 | 129 | function playerExists($playerID, $playerInfo) 130 | { 131 | global $dbh; 132 | $exists = false; 133 | $sql = "SELECT IF((IFNULL(playerID, 0) > 0), TRUE, FALSE) FROM view_player_info WHERE badgeID = :badgeID"; 134 | $param = array(":badgeID" => $playerInfo["badgeID"]); 135 | $stmt = dbQuery($sql, $param); 136 | dbExecute($stmt); 137 | $exists = (bool)dbResult($stmt); 138 | return $exists; 139 | } 140 | 141 | ?> -------------------------------------------------------------------------------- /styles/TableTools_JUI.css: -------------------------------------------------------------------------------- 1 | /* 2 | * File: TableTools.css 3 | * Description: Styles for TableTools 2 with JUI theming 4 | * Author: Allan Jardine (www.sprymedia.co.uk) 5 | * Language: Javascript 6 | * License: LGPL / 3 point BSD 7 | * Project: DataTables 8 | * 9 | * Copyright 2010 Allan Jardine, all rights reserved. 10 | * 11 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 12 | * 13 | * Notes: 14 | * Generally speaking, please refer to the TableTools.css file - this file contains basic 15 | * modifications to that 'master' stylesheet for ThemeRoller. 16 | * 17 | * CSS name space: 18 | * DTTT DataTables TableTools 19 | * 20 | * Colour dictionary: 21 | * Button border #d0d0d0 22 | * Button border hover #999999 23 | * Hover background #f0f0f0 24 | * Action blue #4b66d9 25 | * 26 | * Style sheet provides: 27 | * CONTAINER TableTools container element and styles applying to all components 28 | * SELECTING Row selection styles 29 | * COLLECTIONS Drop down list (collection) styles 30 | * PRINTING Print display styles 31 | * MISC Minor misc styles 32 | */ 33 | 34 | 35 | /* 36 | * CONTAINER 37 | * TableTools container element and styles applying to all components 38 | */ 39 | div.DTTT_container { 40 | float: left; 41 | } 42 | 43 | button.DTTT_button { 44 | position: relative; 45 | float: left; 46 | height: 24px; 47 | margin-right: 3px; 48 | padding: 3px 10px; 49 | border: 1px solid #d0d0d0; 50 | background-color: #fff; 51 | cursor: pointer; 52 | *cursor: hand; 53 | } 54 | 55 | button.DTTT_button::-moz-focus-inner { 56 | border: none !important; 57 | padding: 0; 58 | } 59 | 60 | 61 | 62 | /* 63 | * SELECTING 64 | * Row selection styles 65 | */ 66 | table.DTTT_selectable tbody tr { 67 | cursor: pointer; 68 | *cursor: hand; 69 | } 70 | 71 | tr.DTTT_selected.odd { 72 | background-color: #9FAFD1; 73 | } 74 | 75 | tr.DTTT_selected.odd td.sorting_1 { 76 | background-color: #9FAFD1; 77 | } 78 | 79 | tr.DTTT_selected.odd td.sorting_2 { 80 | background-color: #9FAFD1; 81 | } 82 | 83 | tr.DTTT_selected.odd td.sorting_3 { 84 | background-color: #9FAFD1; 85 | } 86 | 87 | 88 | tr.DTTT_selected.even { 89 | background-color: #B0BED9; 90 | } 91 | 92 | tr.DTTT_selected.even td.sorting_1 { 93 | background-color: #B0BED9; 94 | } 95 | 96 | tr.DTTT_selected.even td.sorting_2 { 97 | background-color: #B0BED9; 98 | } 99 | 100 | tr.DTTT_selected.even td.sorting_3 { 101 | background-color: #B0BED9; 102 | } 103 | 104 | 105 | /* 106 | * COLLECTIONS 107 | * Drop down list (collection) styles 108 | */ 109 | 110 | div.DTTT_collection { 111 | width: 150px; 112 | background-color: #f3f3f3; 113 | overflow: hidden; 114 | z-index: 2002; 115 | 116 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 117 | -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 118 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 119 | } 120 | 121 | div.DTTT_collection_background { 122 | background: url(../images/background.png) repeat top left; 123 | z-index: 2001; 124 | } 125 | 126 | div.DTTT_collection button.DTTT_button { 127 | float: none; 128 | width: 100%; 129 | margin-bottom: -0.1em; 130 | } 131 | 132 | 133 | /* 134 | * PRINTING 135 | * Print display styles 136 | */ 137 | 138 | .DTTT_print_info { 139 | position: absolute; 140 | top: 50%; 141 | left: 50%; 142 | width: 400px; 143 | height: 150px; 144 | margin-left: -200px; 145 | margin-top: -75px; 146 | text-align: center; 147 | background-color: #3f3f3f; 148 | color: white; 149 | padding: 10px 30px; 150 | 151 | opacity: 0.9; 152 | 153 | border-radius: 5px; 154 | -moz-border-radius: 5px; 155 | -webkit-border-radius: 5px; 156 | 157 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 158 | -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 159 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 160 | } 161 | 162 | .DTTT_print_info h6 { 163 | font-weight: normal; 164 | font-size: 28px; 165 | line-height: 28px; 166 | margin: 1em; 167 | } 168 | 169 | .DTTT_print_info p { 170 | font-size: 14px; 171 | line-height: 20px; 172 | } 173 | 174 | 175 | /* 176 | * MISC 177 | * Minor misc styles 178 | */ 179 | 180 | .DTTT_disabled { 181 | color: #999; 182 | } 183 | -------------------------------------------------------------------------------- /scripts/date.format.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Date Format 1.2.3 3 | * (c) 2007-2009 Steven Levithan 4 | * MIT license 5 | * 6 | * Includes enhancements by Scott Trenda 7 | * and Kris Kowal 8 | * 9 | * Accepts a date, a mask, or a date and a mask. 10 | * Returns a formatted version of the given date. 11 | * The date defaults to the current date/time. 12 | * The mask defaults to dateFormat.masks.default. 13 | */ 14 | 15 | var dateFormat = function () { 16 | var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, 17 | timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, 18 | timezoneClip = /[^-+\dA-Z]/g, 19 | pad = function (val, len) { 20 | val = String(val); 21 | len = len || 2; 22 | while (val.length < len) val = "0" + val; 23 | return val; 24 | }; 25 | 26 | // Regexes and supporting functions are cached through closure 27 | return function (date, mask, utc) { 28 | var dF = dateFormat; 29 | 30 | // You can't provide utc if you skip other args (use the "UTC:" mask prefix) 31 | if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { 32 | mask = date; 33 | date = undefined; 34 | } 35 | 36 | // Passing date through Date applies Date.parse, if necessary 37 | date = date ? new Date(date) : new Date; 38 | if (isNaN(date)) throw SyntaxError("invalid date"); 39 | 40 | mask = String(dF.masks[mask] || mask || dF.masks["default"]); 41 | 42 | // Allow setting the utc argument via the mask 43 | if (mask.slice(0, 4) == "UTC:") { 44 | mask = mask.slice(4); 45 | utc = true; 46 | } 47 | 48 | var _ = utc ? "getUTC" : "get", 49 | d = date[_ + "Date"](), 50 | D = date[_ + "Day"](), 51 | m = date[_ + "Month"](), 52 | y = date[_ + "FullYear"](), 53 | H = date[_ + "Hours"](), 54 | M = date[_ + "Minutes"](), 55 | s = date[_ + "Seconds"](), 56 | L = date[_ + "Milliseconds"](), 57 | o = utc ? 0 : date.getTimezoneOffset(), 58 | flags = { 59 | d: d, 60 | dd: pad(d), 61 | ddd: dF.i18n.dayNames[D], 62 | dddd: dF.i18n.dayNames[D + 7], 63 | m: m + 1, 64 | mm: pad(m + 1), 65 | mmm: dF.i18n.monthNames[m], 66 | mmmm: dF.i18n.monthNames[m + 12], 67 | yy: String(y).slice(2), 68 | yyyy: y, 69 | h: H % 12 || 12, 70 | hh: pad(H % 12 || 12), 71 | H: H, 72 | HH: pad(H), 73 | M: M, 74 | MM: pad(M), 75 | s: s, 76 | ss: pad(s), 77 | l: pad(L, 3), 78 | L: pad(L > 99 ? Math.round(L / 10) : L), 79 | t: H < 12 ? "a" : "p", 80 | tt: H < 12 ? "am" : "pm", 81 | T: H < 12 ? "A" : "P", 82 | TT: H < 12 ? "AM" : "PM", 83 | Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), 84 | o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), 85 | S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] 86 | }; 87 | 88 | return mask.replace(token, function ($0) { 89 | return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); 90 | }); 91 | }; 92 | }(); 93 | 94 | // Some common format strings 95 | dateFormat.masks = { 96 | "default": "ddd mmm dd yyyy HH:MM:ss", 97 | shortDate: "m/d/yy", 98 | mediumDate: "mmm d, yyyy", 99 | longDate: "mmmm d, yyyy", 100 | fullDate: "dddd, mmmm d, yyyy", 101 | shortTime: "h:MM TT", 102 | mediumTime: "h:MM:ss TT", 103 | longTime: "h:MM:ss TT Z", 104 | isoDate: "yyyy-mm-dd", 105 | isoTime: "HH:MM:ss", 106 | isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 107 | isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 108 | }; 109 | 110 | // Internationalization strings 111 | dateFormat.i18n = { 112 | dayNames: [ 113 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 114 | "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" 115 | ], 116 | monthNames: [ 117 | "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 118 | "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" 119 | ] 120 | }; 121 | 122 | // For convenience... 123 | Date.prototype.format = function (mask, utc) { 124 | return dateFormat(this, mask, utc); 125 | }; 126 | 127 | -------------------------------------------------------------------------------- /inc/lib/sanitize.php: -------------------------------------------------------------------------------- 1 | ",htmlentities(strip_tags(addslashes(trim($s),'

')))); } 39 | 40 | /* 41 | Strip all characters not on the US keyboard and those used for attacks 42 | */ 43 | function sanitizeData($s) 44 | { 45 | $clean = trim($s); //Take off white space endings 46 | $clean = urldecode($clean); //Decode if obstruced 47 | $clean = strip_tags($clean); //Remove the tags 48 | $clean = preg_replace("/[^A-Za-z0-9 \|\/\.\:\(\)\@\#\&\-\_]/", "", $clean); //Yes, paranoid! 49 | return trim($clean); 50 | } 51 | 52 | /* 53 | Verify a field is truely empty 54 | RETURNS: TRUE/FALSE 55 | */ 56 | function isEmpty($s) 57 | { 58 | if(strlen($s) == 0) 59 | { return true; } 60 | else 61 | { return false; } 62 | } 63 | 64 | //Create proper variable names 65 | function makeVarName($passedValue) 66 | { 67 | for($i = $start; $i < strlen($passedValue); $i++) 68 | { 69 | if($passedValue[$i] == "_") 70 | { $result .= strtoupper($passedValue[++$i]); } 71 | else 72 | { $result .= $passedValue[$i]; } 73 | } 74 | return $result; 75 | } 76 | 77 | $requestVars = array( 78 | //System values 79 | "where", "view", 80 | //Team values 81 | "teamID", "team_name", "teamInfo", "found", 82 | //Player values 83 | "playerID", "playerInfo", "badge", 84 | //Item values 85 | "itemID", "itemInfo" 86 | ); 87 | 88 | //echo '

$_REQUEST'."\n"; print_r($_REQUEST); echo "\n\nPRINT VARS\n";
 89 | 
 90 | foreach($requestVars AS $varName)
 91 | {
 92 | 	//echo "\n\nVARNAME: ".$varName."\n--------------------\n";
 93 |   switch($varName)
 94 |   {
 95 |     case "where":
 96 |       $passedValue =  strtolower($_REQUEST[$varName]);
 97 | 			$newName = makeVarName($varName);
 98 | 			$$newName = sanitizeData($passedValue);
 99 | 			//echo "WHERE: ".$newName." = ".sanitizeData($passedValue)."\n";
100 |     break;
101 | 
102 |     default:
103 | 			if(array_key_exists($varName, $_REQUEST) == TRUE)
104 | 			{
105 | 				unset($tempArray);
106 | 				$newName = makeVarName($varName);
107 | 				if(is_array($_REQUEST[$varName]))
108 | 				{
109 | 					foreach($_REQUEST[$varName] as $subName => $subValue)
110 | 					{
111 | 						if(is_array($subValue))
112 | 						{
113 | 							foreach($subValue as $name => $value)
114 | 							{  $tempArray[$subName][$name] = sanitizeData($value);
115 | 								//echo "SUB ARRAY: ".$newName."[".$i."][".$name."] = ".sanitizeData($value)."\n";
116 | 							}
117 | 						}
118 | 						else
119 | 						{
120 | 							$tempArray[$subName] = sanitizeData($subValue);
121 | 							//echo "ARRAY: ".$newName."[".$subName."] = ".sanitizeData($subValue)."\n";
122 | 						}
123 | 					}
124 | 					$$newName = $tempArray;
125 | 				}
126 | 				else
127 | 				{
128 | 					$passedValue = $_REQUEST[$varName];
129 | 					$$newName = sanitizeData($passedValue);
130 | 					//echo "SINGLE: ".$newName." = ".sanitizeData($passedValue)."\n";
131 | 				}
132 | 			}
133 | 			//else # For debug only
134 | 			//{  echo "VAR NOT FOUND: ".$varName."\n\n";  } # for debug only
135 |     break;
136 |   }
137 | }
138 | 
139 | //CLEAR VARIBALES.
140 | unset($varName);
141 | unset($passedValue);
142 | unset($tempString);
143 | unset($tempArray);
144 | unset($subValue);
145 | unset($subName);
146 | unset($value);
147 | unset($name);
148 | 
149 | //$tempVar = get_defined_vars();
150 | //print_r($tempVar);
151 | //echo "
"; 152 | //exit; 153 | ?> -------------------------------------------------------------------------------- /inc/lib/functions.php: -------------------------------------------------------------------------------- 1 | "; 31 | echo ucwords($title)."\n"; 32 | print_r($passedArray); 33 | echo ""; 34 | } 35 | 36 | 37 | #Creates a download dialog for file's data, name, and type provided. 38 | function downloadFile($fileData,$fileName,$fileType) 39 | { 40 | // Document Types 41 | $typesArray = array("doc" => "text","txt" => "text","pdf" => "pdf"); 42 | foreach($typesArray AS $matchExt => $replaceFileType) 43 | { 44 | if($matchExt == $fileType) 45 | $finalFileType = $replaceFileType; 46 | } 47 | if(empty($finalFileType)) 48 | $finalFileType = "octet-stream"; 49 | 50 | if($fileData && $fileName && $fileType) 51 | { 52 | header("Content-disposition: attachment; filename=$fileName"); 53 | header("Content-type: application/$finalFileType"); 54 | echo $fileData; 55 | } 56 | } 57 | 58 | #Creates a table using the DataTables and TableTools with jQuery styling. 59 | function dataTable($stmt, $tableName = "simple", $tableType = "simple", $url = "", $linkText = "", $linkID = "") 60 | { 61 | $output = '\n \n"; 63 | 64 | //Loop the table fields into an array and output as a table header 65 | 66 | for($i = 0; $i < dbFieldCount($stmt); $i++) 67 | { 68 | $fieldName = dbFieldName($stmt, $i); 69 | if($linkID == $linkText || $linkID != $fieldName) 70 | { 71 | $fields[$i] = $fieldName; 72 | $output .= " \n"; 73 | } 74 | } 75 | 76 | $output .= " \n \n \n"; 77 | 78 | //Loop through the rows 79 | while($row = dbRow($stmt, "names")) 80 | { 81 | $output .= ''."\n"; 82 | //Extract the data by the table field names 83 | foreach($fields as $key => $value) 84 | { 85 | if(is_numeric($row[$value])) 86 | { $align = ' align="right"'; } 87 | else 88 | { $align = ""; } 89 | 90 | if($value == $linkText) 91 | { 92 | $there = str_replace(" ", "", $linkID); 93 | $there = str_replace(substr($there, 0, 1), substr(strtolower($there), 0, 1), $there); 94 | $there = $there.'='.$row[$linkID]; 95 | //echo (strrpos($url, "?") + 1) . " | " . strlen($url); 96 | //exit; 97 | if((strrpos($url, "?") + 1) == strlen($url)) 98 | { $output .= ''.$row[$value]."\n"; } 99 | else 100 | { $output .= ''.$row[$value]."\n"; } 101 | } 102 | elseif($value != $linkID || $linkID == $linkText) 103 | { $output .= ''.$row[$value]."\n"; } 104 | } 105 | $output .= "\n"; 106 | } 107 | $output .= "\n
".properNames($fields[$i])."
\n"; 108 | $output .= dataTablesCode($tableName, $tableType, FALSE); 109 | return $output; 110 | } 111 | 112 | #Converts names to proper style. 113 | function properNames($passedValue) 114 | { 115 | for($i = $start; $i < strlen($passedValue); $i++) 116 | { 117 | if(($passedValue[$i] >= 'A') && ($passedValue[$i] <= 'Z')) 118 | { 119 | if($passedValue[$i + 1] != "") 120 | { 121 | if(($passedValue[$i + 1] >= 'A') && ($passedValue[$i + 1] <= 'Z')) 122 | { $result .= " ".$passedValue[$i]; } 123 | else 124 | { $result .= " ".$passedValue[$i]; } 125 | } 126 | else 127 | { $result .= $passedValue[$i]; } 128 | } 129 | else 130 | { $result .= $passedValue[$i]; } 131 | } 132 | 133 | return ucwords(str_replace("_", " ", $result)); 134 | } 135 | 136 | function formatDate($date) 137 | { 138 | if($date) 139 | { return date("d-M-Y", strtotime($date)); } 140 | else 141 | { return ""; } 142 | } 143 | ?> -------------------------------------------------------------------------------- /scoreboard/scoreboards.php: -------------------------------------------------------------------------------- 1 | 35 | 39 |
40 | $scenario) 51 | { 52 | $where = " AND scenario_type = :scenarioID"; 53 | $order = " ORDER BY vts.points DESC, vts.attempt_time ASC"; 54 | displayScoreboard($sqlAll.$where.$order, $scenario["scenarioID"]); 55 | } 56 | ?> 57 |
58 |
59 |
60 | 63 | '."\n".'
'; 85 | break; 86 | 87 | case 2: 88 | echo "\n
\n".'
'."\n"; 89 | break; 90 | 91 | case 3: 92 | echo "\n
\n"."\n".'

'.'
'."\n"; 93 | break; 94 | 95 | case 4: 96 | echo "\n
\n".'
'; 97 | break; 98 | 99 | default: 100 | $title = "Overall Scoreboard"; 101 | $color = "e"; 102 | break; 103 | } 104 | 105 | ?> 106 |
107 |

108 |
109 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 125 | 126 | 127 | 128 | $row) 130 | { 131 | ?> 132 | 133 | 134 | 135 | 136 | 137 | 141 | 142 | 145 | 146 |
RANKTEAM NAMESCOREATTEMPT TIMECATEGORY
147 |
No teams have scored yet.
152 |
153 | -------------------------------------------------------------------------------- /scripts/datatables/tableTools/css/TableTools.css: -------------------------------------------------------------------------------- 1 | /* 2 | * File: TableTools.css 3 | * Description: Styles for TableTools 2 4 | * Author: Allan Jardine (www.sprymedia.co.uk) 5 | * Language: Javascript 6 | * License: LGPL / 3 point BSD 7 | * Project: DataTables 8 | * 9 | * Copyright 2010 Allan Jardine, all rights reserved. 10 | * 11 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 12 | * 13 | * CSS name space: 14 | * DTTT DataTables TableTools 15 | * 16 | * Colour dictionary: 17 | * Button border #d0d0d0 18 | * Button border hover #999999 19 | * Hover background #f0f0f0 20 | * Action blue #4b66d9 21 | * 22 | * Style sheet provides: 23 | * CONTAINER TableTools container element and styles applying to all components 24 | * BUTTON_STYLES Action specific button styles 25 | * SELECTING Row selection styles 26 | * COLLECTIONS Drop down list (collection) styles 27 | * PRINTING Print display styles 28 | * MISC Minor misc styles 29 | */ 30 | 31 | 32 | /* 33 | * CONTAINER 34 | * TableTools container element and styles applying to all components 35 | */ 36 | div.DTTT_container { 37 | float: right; 38 | margin-bottom: 1em; 39 | } 40 | 41 | button.DTTT_button { 42 | position: relative; 43 | float: left; 44 | height: 30px; 45 | margin-right: 3px; 46 | padding: 3px 5px; 47 | border: 1px solid #d0d0d0; 48 | background-color: #fff; 49 | cursor: pointer; 50 | *cursor: hand; 51 | } 52 | 53 | button.DTTT_button::-moz-focus-inner { 54 | border: none !important; 55 | padding: 0; 56 | } 57 | 58 | 59 | /* 60 | * BUTTON_STYLES 61 | * Action specific button styles 62 | */ 63 | 64 | button.DTTT_button_csv { 65 | padding-right: 30px; 66 | background: url(../images/csv.png) no-repeat center right; 67 | } 68 | 69 | button.DTTT_button_csv_hover { 70 | padding-right: 30px; 71 | border: 1px solid #999; 72 | background: #f0f0f0 url(../images/csv_hover.png) no-repeat center right; 73 | } 74 | 75 | 76 | button.DTTT_button_xls { 77 | padding-right: 30px; 78 | background: url(../images/xls.png) no-repeat center right; 79 | } 80 | 81 | button.DTTT_button_xls_hover { 82 | padding-right: 30px; 83 | border: 1px solid #999; 84 | background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right; 85 | } 86 | 87 | 88 | button.DTTT_button_copy { 89 | padding-right: 30px; 90 | background: url(../images/copy.png) no-repeat center right; 91 | } 92 | 93 | button.DTTT_button_copy_hover { 94 | padding-right: 30px; 95 | border: 1px solid #999; 96 | background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right; 97 | } 98 | 99 | 100 | button.DTTT_button_pdf { 101 | padding-right: 30px; 102 | background: url(../images/pdf.png) no-repeat center right; 103 | } 104 | 105 | button.DTTT_button_pdf_hover { 106 | padding-right: 30px; 107 | border: 1px solid #999; 108 | background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right; 109 | } 110 | 111 | 112 | button.DTTT_button_print { 113 | padding-right: 30px; 114 | background: url(../images/print.png) no-repeat center right; 115 | } 116 | 117 | button.DTTT_button_print_hover { 118 | padding-right: 30px; 119 | border: 1px solid #999; 120 | background: #f0f0f0 url(../images/print_hover.png) no-repeat center right; 121 | } 122 | 123 | 124 | button.DTTT_button_text { 125 | } 126 | 127 | button.DTTT_button_text_hover { 128 | border: 1px solid #999; 129 | background-color: #f0f0f0; 130 | } 131 | 132 | 133 | button.DTTT_button_collection { 134 | padding-right: 17px; 135 | background: url(../images/collection.png) no-repeat center right; 136 | } 137 | 138 | button.DTTT_button_collection_hover { 139 | padding-right: 17px; 140 | border: 1px solid #999; 141 | background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right; 142 | } 143 | 144 | 145 | /* 146 | * SELECTING 147 | * Row selection styles 148 | */ 149 | table.DTTT_selectable tbody tr { 150 | cursor: pointer; 151 | *cursor: hand; 152 | } 153 | 154 | tr.DTTT_selected.odd { 155 | background-color: #9FAFD1; 156 | } 157 | 158 | tr.DTTT_selected.odd td.sorting_1 { 159 | background-color: #9FAFD1; 160 | } 161 | 162 | tr.DTTT_selected.odd td.sorting_2 { 163 | background-color: #9FAFD1; 164 | } 165 | 166 | tr.DTTT_selected.odd td.sorting_3 { 167 | background-color: #9FAFD1; 168 | } 169 | 170 | 171 | tr.DTTT_selected.even { 172 | background-color: #B0BED9; 173 | } 174 | 175 | tr.DTTT_selected.even td.sorting_1 { 176 | background-color: #B0BED9; 177 | } 178 | 179 | tr.DTTT_selected.even td.sorting_2 { 180 | background-color: #B0BED9; 181 | } 182 | 183 | tr.DTTT_selected.even td.sorting_3 { 184 | background-color: #B0BED9; 185 | } 186 | 187 | 188 | /* 189 | * COLLECTIONS 190 | * Drop down list (collection) styles 191 | */ 192 | 193 | div.DTTT_collection { 194 | width: 150px; 195 | padding: 3px; 196 | border: 1px solid #ccc; 197 | background-color: #f3f3f3; 198 | overflow: hidden; 199 | z-index: 2002; 200 | } 201 | 202 | div.DTTT_collection_background { 203 | background: transparent url(../images/background.png) repeat top left; 204 | z-index: 2001; 205 | } 206 | 207 | div.DTTT_collection button.DTTT_button { 208 | float: none; 209 | width: 100%; 210 | margin-bottom: 2px; 211 | background-color: white; 212 | } 213 | 214 | 215 | /* 216 | * PRINTING 217 | * Print display styles 218 | */ 219 | 220 | .DTTT_print_info { 221 | position: absolute; 222 | top: 50%; 223 | left: 50%; 224 | width: 400px; 225 | height: 150px; 226 | margin-left: -200px; 227 | margin-top: -75px; 228 | text-align: center; 229 | background-color: #3f3f3f; 230 | color: white; 231 | padding: 10px 30px; 232 | 233 | opacity: 0.9; 234 | 235 | border-radius: 5px; 236 | -moz-border-radius: 5px; 237 | -webkit-border-radius: 5px; 238 | 239 | box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 240 | -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 241 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5); 242 | } 243 | 244 | .DTTT_print_info h6 { 245 | font-weight: normal; 246 | font-size: 28px; 247 | line-height: 28px; 248 | margin: 1em; 249 | } 250 | 251 | .DTTT_print_info p { 252 | font-size: 14px; 253 | line-height: 20px; 254 | } 255 | 256 | 257 | /* 258 | * MISC 259 | * Minor misc styles 260 | */ 261 | 262 | .DTTT_disabled { 263 | color: #999; 264 | } 265 | -------------------------------------------------------------------------------- /team/member_list.php: -------------------------------------------------------------------------------- 1 | 36 |
37 |
38 | $playerID, ":teamID" => $playerInfo["teamID"]); 48 | $stmt = dbQuery($sql, $params); 49 | dbExecute($stmt); 50 | $teamID = dbResult($stmt); 51 | unset($stmt); 52 | $readonly = true; 53 | $buttonTxt = "Edit"; 54 | case "edit": 55 | if(!$readonly) 56 | { $readonly = false; } 57 | if(!$buttonTxt) 58 | { $buttonTxt = "Save"; } 59 | case "view": 60 | if($readonly || !isset($readonly)) 61 | { $readonly = " readonly "; } 62 | else 63 | { $readonly = ""; } 64 | 65 | if(!isset($buttonTxt)) 66 | { $buttonTxt = "Edit"; } 67 | 68 | $sql = "SELECT teamID, team_name FROM team "; 69 | ?> 70 |

71 |
72 | 73 | 74 | $teamID); 79 | dropdowns("team_name", "playerInfo[teamID]", "Team Association", "readonly", $teamID, $sql, $params); 80 | } 81 | else 82 | { dropdowns("team_name", "playerInfo[teamID]", "Team Association", "select", $teamID, $sql); } 83 | ?> 84 | 85 | 89 | 90 | 93 | 94 |
95 | 100 |

101 | Select the member of team to change team affiliation 102 |

103 | 130 | 134 |
135 |
136 | 137 | 143 |
144 | 145 | 146 | 150 | 151 | 152 | 153 | 159 | 160 | 163 |
164 | 171 |
172 |
173 | -------------------------------------------------------------------------------- /inc/lib/jQueryFunctions.php: -------------------------------------------------------------------------------- 1 | 30 |
31 |

32 | 33 | Alert: 34 | 35 |

36 |
37 | 44 |
45 |

46 | 47 | Important: 48 | 49 |

50 |
51 | 58 | 83 | 90 | 94 | lfrtip\''; 115 | break; 116 | 117 | case "sort": 118 | $contents = ' 119 | "bRetrieve": true, 120 | "bJQueryUI": true, 121 | "bAutoWidth": false, 122 | "bFilter": false, 123 | "bProcessing": true, 124 | "bLengthChange": true, 125 | "iDisplayLength": 10, 126 | "bPaginate": true, 127 | "sPaginationType": "full_numbers", 128 | "bSort": true, 129 | "sDom": \'T<"clear">lfrtip\', 130 | "oTableTools": { "sSwfPath": "/scripts/tableTools/swf/ZeroClipboard.swf" }'; 131 | break; 132 | 133 | case "simple": 134 | $contents = ' 135 | "bRetrieve": true, 136 | "bJQueryUI": true, 137 | "bAutoWidth": false, 138 | "bFilter": true, 139 | "bProcessing": true, 140 | "bLengthChange": true, 141 | "iDisplayLength": 10, 142 | "bPaginate": true, 143 | "sPaginationType": "full_numbers", 144 | "bSort": true'; 145 | break; 146 | 147 | default: 148 | $contents = ' 149 | "bRetrieve": true, 150 | "bJQueryUI": true, 151 | "bAutoWidth": false, 152 | "bFilter": false, 153 | "bProcessing": true, 154 | "bLengthChange": true, 155 | "iDisplayLength": 10, 156 | "bPaginate": true, 157 | "sPaginationType": "full_numbers", 158 | "bSort": false'; 159 | break; 160 | } 161 | 162 | $script = ' 163 | '."\n"; 170 | if($print) 171 | { echo $script; } 172 | else 173 | { return $script; } 174 | } 175 | 176 | #Adds the javascript code for datepicker and sets start and end date if needed. 177 | function dateCode($time = FALSE, $minDate = NULL, $maxDate = NULL) 178 | { 179 | ?> 180 | 213 | -------------------------------------------------------------------------------- /team/team.php: -------------------------------------------------------------------------------- 1 | 59 |
60 | 64 |
65 | 66 | " /> 67 |
68 | 74 |
75 | 76 | " /> 77 |
78 |
79 | 80 | " /> 81 |
82 | 91 |
92 | 93 | " readonly /> 94 |
95 |
96 | 97 | " readonly /> 98 |
99 | 117 |
118 | 119 | 123 | 124 | 131 | 132 | 138 | 139 | 142 | Back to Team List 143 |
144 |
145 |
146 | 147 | 148 | 153 |
154 |
155 | 163 |
164 |
165 | -------------------------------------------------------------------------------- /team/player.php: -------------------------------------------------------------------------------- 1 | 73 |
74 | 75 | 76 |

Add Player to Team: (#".$teamID.")"; ?>

77 | 86 |
87 |
88 |

Badge Entry

89 | 104 | 105 | 106 | 107 |
108 |
109 |
110 | 113 |

Manual Entry

114 | 125 | 126 | 127 | " /> 128 |

129 | 130 | " /> 131 |

132 | 136 | 137 | " /> 138 |
"; } 144 | ?> 145 |
146 |
147 | 152 | Edit 153 | 158 | 159 | 160 | 164 | Back to Team 165 |
166 | 167 | 170 | -------------------------------------------------------------------------------- /inc/siteFunctions.php: -------------------------------------------------------------------------------- 1 | 30 |
31 | 1, 43 | "No" => 0 44 | ); 45 | } 46 | 47 | $startGroup = ""; 48 | $endGroup = ""; 49 | 50 | switch($type) 51 | { 52 | case "select": 53 | ?> 54 | 55 | 71 | 78 |
> 79 | Choose a 80 | $option) 82 | { 83 | $optionName = $option[1]; 84 | $optionValue = $option[0]; 85 | if($passedValue == $optionValue) 86 | { $checked = 'checked="checked"'; } 87 | else 88 | { $checked = ""; } 89 | echo "\n".''; 90 | echo "\n".''; 91 | } 92 | ?> 93 |
94 | 99 | 100 | 112 | 122 | 123 | 124 | 128 |
129 | $teamID)); 157 | dbExecute($stmt); 158 | $attemptTime = dbResult($stmt); 159 | return sec2hms($attemptTime); 160 | } 161 | 162 | //Returns the name of the scenario the team belongs to 163 | function getScenarioType($teamID) 164 | { 165 | $sql = "SELECT vs.scenario_name 166 | FROM view_team_info vti 167 | LEFT JOIN view_scenario vs ON vs.scenarioID = vti.scenario_type 168 | WHERE vti.teamID = :teamID"; 169 | $stmt = dbQuery($sql, array(":teamID" => $teamID)); 170 | dbExecute($stmt); 171 | return dbResult($stmt); 172 | } 173 | 174 | //Returns the name of the scenario 175 | function getScenarioName($scenarioID) 176 | { 177 | $sql = "SELECT scenario_name FROM view_scenario WHERE scenarioID = :scenarioID"; 178 | $stmt = dbQuery($sql, array(":scenarioID" => $scenarioID)); 179 | dbExecute($stmt); 180 | return dbResult($stmt); 181 | } 182 | 183 | //Returns the time in hours, minutes, seconds formatted to a minimal time format 184 | function sec2hms($time) 185 | { 186 | $hms = ""; 187 | $end = ""; 188 | //Find Hours 189 | $hrs = intval(intval($time) / 3600); 190 | //Find Minutes 191 | $mins = intval(($time / 60) % 60); 192 | //Find Seconds 193 | $secs = intval($time % 60); 194 | 195 | if($hrs) 196 | { $hms .= str_pad($hrs, 2, "0", STR_PAD_LEFT).":"; } 197 | if($mins) 198 | { $hms .= str_pad($mins, 2, "0", STR_PAD_LEFT).":"; } 199 | $hms .= str_pad($secs, 2, "0", STR_PAD_LEFT); 200 | 201 | if($secs) 202 | { $end = " seconds"; } 203 | 204 | if($mins) 205 | { $end = " minutes"; } 206 | 207 | if($hrs) 208 | { $end = " hours"; } 209 | 210 | return $hms.$end; 211 | } 212 | 213 | function getItemTypeName($itemTypeID) 214 | { 215 | $sql = "SELECT item_type_name FROM view_item_type WHERE item_typeID = :item_typeID"; 216 | $stmt = dbQuery($sql, array(":item_typeID" => $itemTypeID)); 217 | dbExecute($stmt); 218 | return dbResult($stmt); 219 | } 220 | ?> -------------------------------------------------------------------------------- /scripts/datatables/tableTools/as3/ZeroClipboard.as: -------------------------------------------------------------------------------- 1 | /* Compile using: mxmlc --target-player=10.0.0 ZeroClipboard.as */ 2 | package { 3 | import flash.display.Stage; 4 | import flash.display.Sprite; 5 | import flash.display.LoaderInfo; 6 | import flash.display.StageScaleMode; 7 | import flash.events.*; 8 | import flash.display.StageAlign; 9 | import flash.display.StageScaleMode; 10 | import flash.external.ExternalInterface; 11 | import flash.system.Security; 12 | import flash.utils.*; 13 | import flash.system.System; 14 | import flash.net.FileReference; 15 | import flash.net.FileFilter; 16 | 17 | public class ZeroClipboard extends Sprite { 18 | 19 | private var domId:String = ''; 20 | private var button:Sprite; 21 | private var clipText:String = 'blank'; 22 | private var fileName:String = ''; 23 | private var action:String = 'copy'; 24 | private var incBom:Boolean = true; 25 | private var charSet:String = 'utf8'; 26 | 27 | 28 | public function ZeroClipboard() { 29 | // constructor, setup event listeners and external interfaces 30 | stage.scaleMode = StageScaleMode.EXACT_FIT; 31 | flash.system.Security.allowDomain("*"); 32 | 33 | // import flashvars 34 | var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; 35 | domId = flashvars.id; 36 | 37 | // invisible button covers entire stage 38 | button = new Sprite(); 39 | button.buttonMode = true; 40 | button.useHandCursor = true; 41 | button.graphics.beginFill(0x00FF00); 42 | button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); 43 | button.alpha = 0.0; 44 | addChild(button); 45 | 46 | button.addEventListener(MouseEvent.CLICK, clickHandler); 47 | button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { 48 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOver', null ); 49 | } ); 50 | button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { 51 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOut', null ); 52 | } ); 53 | button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { 54 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseDown', null ); 55 | } ); 56 | button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { 57 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseUp', null ); 58 | } ); 59 | 60 | /* External functions 61 | * See the PDF version for why this is done this way :-( 62 | */ 63 | addCallbacks(); 64 | setInterval( addCallbacks, 1000 ); 65 | 66 | // signal to the browser that we are ready 67 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'load', null ); 68 | } 69 | 70 | public function addCallbacks ():void { 71 | ExternalInterface.addCallback("setHandCursor", setHandCursor); 72 | ExternalInterface.addCallback("clearText", clearText); 73 | ExternalInterface.addCallback("setText", setText); 74 | ExternalInterface.addCallback("appendText", appendText); 75 | ExternalInterface.addCallback("setFileName", setFileName); 76 | ExternalInterface.addCallback("setAction", setAction); 77 | ExternalInterface.addCallback("setCharSet", setCharSet); 78 | ExternalInterface.addCallback("setBomInc", setBomInc); 79 | } 80 | 81 | 82 | public function setCharSet(newCharSet:String):void { 83 | if ( newCharSet == 'UTF16LE' ) { 84 | charSet = newCharSet; 85 | } else { 86 | charSet = 'UTF8'; 87 | } 88 | } 89 | 90 | public function setBomInc(newBomInc:Boolean):void { 91 | incBom = newBomInc; 92 | } 93 | 94 | public function clearText():void { 95 | clipText = ''; 96 | } 97 | 98 | public function appendText(newText:String):void { 99 | clipText += newText; 100 | } 101 | 102 | public function setText(newText:String):void { 103 | clipText = newText; 104 | } 105 | 106 | public function setFileName(newFileName:String):void { 107 | fileName = newFileName; 108 | } 109 | 110 | public function setAction(newAction:String):void { 111 | action = newAction; 112 | } 113 | 114 | public function setHandCursor(enabled:Boolean):void { 115 | // control whether the hand cursor is shown on rollover (true) 116 | // or the default arrow cursor (false) 117 | button.useHandCursor = enabled; 118 | } 119 | 120 | 121 | private function clickHandler(event:Event):void { 122 | var fileRef:FileReference = new FileReference(); 123 | fileRef.addEventListener(Event.COMPLETE, saveComplete); 124 | 125 | if ( action == "save" ) { 126 | /* Save as a file */ 127 | if ( charSet == 'UTF16LE' ) { 128 | fileRef.save( strToUTF16LE(clipText), fileName ); 129 | } else { 130 | fileRef.save( strToUTF8(clipText), fileName ); 131 | } 132 | } else if ( action == "pdf" ) { 133 | fileRef.save( "This instance of ZeroClipboard is not configured for PDF export. "+ 134 | "Please use the PDF export version.", fileName+".txt" ); 135 | } else { 136 | /* Copy the text to the clipboard. Note charset and BOM have no effect here */ 137 | System.setClipboard( clipText ); 138 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); 139 | } 140 | } 141 | 142 | 143 | private function saveComplete(event:Event):void { 144 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); 145 | } 146 | 147 | 148 | private function getProp( prop:String, opts:Array ):String 149 | { 150 | var i:int, iLen:int; 151 | for ( i=0, iLen=opts.length ; i> 8 ); 215 | } 216 | 217 | i++; 218 | } 219 | 220 | return utf16; 221 | } 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /scoreboard/scorecard.php: -------------------------------------------------------------------------------- 1 | 64 |
65 | 66 | () 67 | 68 |
69 | 73 | 74 | 0 && is_array($allFound)) 76 | { 77 | $lastItemTypeName = ""; 78 | foreach($allFound as $item => $itemData) 79 | { 80 | ## Variables for columns 81 | $itemTypeName = $itemData["item_type_name"]; 82 | $itemName = $itemData["item_name"]; 83 | $point = $itemData["point_value"]; 84 | $correct = $itemData["correct_value"] ; 85 | $incorrect = $itemData["incorrect_value"]; 86 | $lineTotal = $correct + $incorrect; 87 | 88 | ## Variables for summary of columns 89 | $score += $lineTotal; 90 | switch(strtolower($itemTypeName)) 91 | { 92 | case 'attempt bonus': 93 | case 'evidence': 94 | $sum += $point; 95 | case 'improper behavior': 96 | if($lineTotal <= 0) 97 | { $class = 'class="missed"'; } 98 | else 99 | { $class = 'class="got"'; } 100 | 101 | if($correct > 0) 102 | { $correct = "Yes"; } 103 | else 104 | { $correct = " - "; } 105 | 106 | if($incorrect > 0) 107 | { $incorrect = " - "; } 108 | else 109 | { $incorrect = " - "; } 110 | break; 111 | 112 | default: 113 | { 114 | $sum += $point; 115 | if($lineTotal <= 0) 116 | { $class = 'class="missed"'; } 117 | else 118 | { $class = 'class="got"'; } 119 | 120 | if($correct > 0) 121 | { $correct = "YES"; } 122 | else 123 | { $correct = "NO"; } 124 | 125 | if($correct == "YES") 126 | { 127 | if($incorrect > 0) 128 | { $incorrect = "YES"; } 129 | else 130 | { $incorrect = "NO"; } 131 | } 132 | else 133 | { $incorrect = "-"; } 134 | } 135 | break; 136 | } 137 | 138 | if(empty($lastItemTypeName) || $lastItemTypeName != $itemTypeName) 139 | { 140 | $lastItemTypeName = $itemTypeName; 141 | ?> 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 158 | 159 | 160 | 161 | 162 | 163 | "; 164 | } 165 | } 166 | echo ' 167 | 168 | 169 | 170 | '; 171 | ?> 172 |
NAMEVALUEFOUNDTRIEDEARNED
'.$itemName.': '.$point."".$correct."".$incorrect."".$lineTotal."
TOTAL: '.$sum.''.$score.'
173 |

Completed investigation in () for a Total Score:

174 | $itemData) 179 | { $sum += $itemData["correct_value"] + $itemData["incorrect_value"]; } 180 | echo "Completed investigation in (".getTimeTaken($teamID).") for a Total Score: ".$sum.""; 181 | } 182 | ?> 183 |
184 |
185 |
186 | 191 |

192 |

Team has not participated at this time.

193 | Back to Team List 194 | Play Now 195 | 201 |

202 |

Team has been disqualified.

203 | Back to Team List 204 | View Team 205 | 72 |
73 | 74 | Add Item 75 | 76 |
77 |

Select an item to edit

78 |
    79 | $info) 82 | { 83 | $itemID = $info["itemID"]; 84 | $itemName = $info["item_name"]; 85 | $itemTypeName = $info["item_type_name"]; 86 | if($lastItemTypeName != $itemTypeName) 87 | { 88 | $lastItemTypeName = $info["item_type_name"]; 89 | ?> 90 |
  • 91 | 94 |
  • 95 | 98 |
99 |
100 |
101 | 106 |

No items in list.

107 | Add Item 108 | 113 |
114 | $value) 135 | { 136 | $newName = makeVarName($key); 137 | $$newName = $value; 138 | } 139 | } 140 | } 141 | 142 | ?> 143 |
144 |

145 | 146 |
147 | 148 | /> 149 |
150 |
151 | 152 | /> 153 |
154 |
155 | 159 | 160 | /> 161 | 169 |
170 |
171 | 172 | /> 173 |
174 |
175 | 183 | 184 | /> 185 | 190 |
191 |

192 | 193 | 194 |
195 | $itemValue) 202 | { 203 | $fieldName = ":".$itemName; 204 | $params[$fieldName] = $itemValue; 205 | $fields .= $fieldName.", "; 206 | } 207 | $fields = substr($fields, 0, -2); 208 | $sql = "CALL sp_save_item_info(:itemID, ".$fields.")"; 209 | $stmt = dbQuery($sql, $params); 210 | dbExecute($stmt); 211 | return dbResult($stmt); 212 | } 213 | 214 | function insertItem($itemInfo) 215 | { 216 | $fields = ""; 217 | foreach($itemInfo as $itemName => $itemValue) 218 | { 219 | $fieldName = ":".$itemName; 220 | $params[$fieldName] = $itemValue; 221 | $fields .= $fieldName.", "; 222 | } 223 | $fields = substr($fields, 0, -2); 224 | $sql = "CALL sp_insert_item(".$fields.")"; 225 | $stmt = dbQuery($sql, $params); 226 | dbExecute($stmt); 227 | return dbResult($stmt); 228 | } 229 | ?> -------------------------------------------------------------------------------- /scripts/datatables/css/demo_table_jui.css: -------------------------------------------------------------------------------- 1 | /* 2 | * File: demo_table_jui.css 3 | * CVS: $Id$ 4 | * Description: CSS descriptions for DataTables demo pages 5 | * Author: Allan Jardine 6 | * Created: Tue May 12 06:47:22 BST 2009 7 | * Modified: $Date$ by $Author$ 8 | * Language: CSS 9 | * Project: DataTables 10 | * 11 | * Copyright 2009 Allan Jardine. All Rights Reserved. 12 | * 13 | * *************************************************************************** 14 | * DESCRIPTION 15 | * 16 | * The styles given here are suitable for the demos that are used with the standard DataTables 17 | * distribution (see www.datatables.net). You will most likely wish to modify these styles to 18 | * meet the layout requirements of your site. 19 | * 20 | * Common issues: 21 | * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is 22 | * no conflict between the two pagination types. If you want to use full_numbers pagination 23 | * ensure that you either have "example_alt_pagination" as a body class name, or better yet, 24 | * modify that selector. 25 | * Note that the path used for Images is relative. All images are by default located in 26 | * ../images/ - relative to this CSS file. 27 | */ 28 | 29 | 30 | /* 31 | * jQuery UI specific styling 32 | */ 33 | 34 | .paging_two_button .ui-button { 35 | float: left; 36 | cursor: pointer; 37 | * cursor: hand; 38 | } 39 | 40 | .paging_full_numbers .ui-button { 41 | padding: 2px 6px; 42 | margin: 0; 43 | cursor: pointer; 44 | * cursor: hand; 45 | } 46 | 47 | .ui-buttonset .ui-button { 48 | margin-right: -0.1em !important; 49 | } 50 | 51 | .paging_full_numbers { 52 | width: 350px !important; 53 | } 54 | 55 | .ui-toolbar { 56 | padding: 5px; 57 | } 58 | 59 | .dataTables_paginate { 60 | width: auto; 61 | } 62 | 63 | .dataTables_info { 64 | padding-top: 3px; 65 | } 66 | 67 | table.display thead th { 68 | padding: 3px 0px 3px 10px; 69 | cursor: pointer; 70 | * cursor: hand; 71 | } 72 | 73 | 74 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 75 | * 76 | * Everything below this line is the same as demo_table.css. This file is 77 | * required for 'cleanliness' of the markup 78 | * 79 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 80 | 81 | 82 | 83 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 84 | * DataTables features 85 | */ 86 | 87 | .dataTables_wrapper { 88 | position: relative; 89 | min-height: 302px; 90 | _height: 302px; 91 | clear: both; 92 | } 93 | 94 | .dataTables_processing { 95 | position: absolute; 96 | top: 0px; 97 | left: 50%; 98 | width: 250px; 99 | margin-left: -125px; 100 | border: 1px solid #ddd; 101 | text-align: center; 102 | color: #999; 103 | font-size: 11px; 104 | padding: 2px 0; 105 | } 106 | 107 | .dataTables_length { 108 | width: 40%; 109 | float: left; 110 | } 111 | 112 | .dataTables_filter { 113 | width: 50%; 114 | float: right; 115 | text-align: right; 116 | } 117 | 118 | .dataTables_info { 119 | width: 50%; 120 | float: left; 121 | } 122 | 123 | .dataTables_paginate { 124 | float: right; 125 | text-align: right; 126 | } 127 | 128 | /* Pagination nested */ 129 | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { 130 | height: 19px; 131 | width: 19px; 132 | margin-left: 3px; 133 | float: left; 134 | } 135 | 136 | .paginate_disabled_previous { 137 | background-image: url('../images/back_disabled.jpg'); 138 | } 139 | 140 | .paginate_enabled_previous { 141 | background-image: url('../images/back_enabled.jpg'); 142 | } 143 | 144 | .paginate_disabled_next { 145 | background-image: url('../images/forward_disabled.jpg'); 146 | } 147 | 148 | .paginate_enabled_next { 149 | background-image: url('../images/forward_enabled.jpg'); 150 | } 151 | 152 | 153 | 154 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 155 | * DataTables display 156 | */ 157 | table.display { 158 | margin: 0 auto; 159 | width: 100%; 160 | clear: both; 161 | border-collapse: collapse; 162 | } 163 | 164 | table.display tfoot th { 165 | padding: 3px 0px 3px 10px; 166 | font-weight: bold; 167 | font-weight: normal; 168 | } 169 | 170 | table.display tr.heading2 td { 171 | border-bottom: 1px solid #aaa; 172 | } 173 | 174 | table.display td { 175 | padding: 3px 10px; 176 | } 177 | 178 | table.display td.center { 179 | text-align: center; 180 | } 181 | 182 | 183 | 184 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 185 | * DataTables sorting 186 | */ 187 | 188 | .sorting_asc { 189 | background: url('../images/sort_asc.jpg') no-repeat center right; 190 | } 191 | 192 | .sorting_desc { 193 | background: url('../images/sort_desc.jpg') no-repeat center right; 194 | } 195 | 196 | .sorting { 197 | background: url('../images/sort_both.jpg') no-repeat center right; 198 | } 199 | 200 | 201 | 202 | 203 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 204 | * DataTables row classes 205 | */ 206 | table.display tr.odd.gradeA { 207 | background-color: #ddffdd; 208 | } 209 | 210 | table.display tr.even.gradeA { 211 | background-color: #eeffee; 212 | } 213 | 214 | 215 | 216 | 217 | table.display tr.odd.gradeA { 218 | background-color: #ddffdd; 219 | } 220 | 221 | table.display tr.even.gradeA { 222 | background-color: #eeffee; 223 | } 224 | 225 | table.display tr.odd.gradeC { 226 | background-color: #ddddff; 227 | } 228 | 229 | table.display tr.even.gradeC { 230 | background-color: #eeeeff; 231 | } 232 | 233 | table.display tr.odd.gradeX { 234 | background-color: #ffdddd; 235 | } 236 | 237 | table.display tr.even.gradeX { 238 | background-color: #ffeeee; 239 | } 240 | 241 | table.display tr.odd.gradeU { 242 | background-color: #ddd; 243 | } 244 | 245 | table.display tr.even.gradeU { 246 | background-color: #eee; 247 | } 248 | 249 | 250 | tr.odd { 251 | background-color: #E2E4FF; 252 | } 253 | 254 | tr.even { 255 | background-color: white; 256 | } 257 | 258 | 259 | 260 | 261 | 262 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 263 | * Misc 264 | */ 265 | .dataTables_scroll { 266 | clear: both; 267 | } 268 | 269 | .top, .bottom { 270 | padding: 15px; 271 | background-color: #F5F5F5; 272 | border: 1px solid #CCCCCC; 273 | } 274 | 275 | .top .dataTables_info { 276 | float: none; 277 | } 278 | 279 | .clear { 280 | clear: both; 281 | } 282 | 283 | .dataTables_empty { 284 | text-align: center; 285 | } 286 | 287 | tfoot input { 288 | margin: 0.5em 0; 289 | width: 100%; 290 | color: #444; 291 | } 292 | 293 | tfoot input.search_init { 294 | color: #999; 295 | } 296 | 297 | td.group { 298 | background-color: #d1cfd0; 299 | border-bottom: 2px solid #A19B9E; 300 | border-top: 2px solid #A19B9E; 301 | } 302 | 303 | td.details { 304 | background-color: #d1cfd0; 305 | border: 2px solid #A19B9E; 306 | } 307 | 308 | 309 | .example_alt_pagination div.dataTables_info { 310 | width: 40%; 311 | } 312 | 313 | .paging_full_numbers span.paginate_button, 314 | .paging_full_numbers span.paginate_active { 315 | border: 1px solid #aaa; 316 | -webkit-border-radius: 5px; 317 | -moz-border-radius: 5px; 318 | padding: 2px 5px; 319 | margin: 0 3px; 320 | cursor: pointer; 321 | *cursor: hand; 322 | } 323 | 324 | .paging_full_numbers span.paginate_button { 325 | background-color: #ddd; 326 | } 327 | 328 | .paging_full_numbers span.paginate_button:hover { 329 | background-color: #ccc; 330 | } 331 | 332 | .paging_full_numbers span.paginate_active { 333 | background-color: #99B3FF; 334 | } 335 | 336 | table.display tr.even.row_selected td { 337 | background-color: #B0BED9; 338 | } 339 | 340 | table.display tr.odd.row_selected td { 341 | background-color: #9FAFD1; 342 | } 343 | 344 | 345 | /* 346 | * Sorting classes for columns 347 | */ 348 | /* For the standard odd/even */ 349 | tr.odd td.sorting_1 { 350 | background-color: #D3D6FF; 351 | } 352 | 353 | tr.odd td.sorting_2 { 354 | background-color: #DADCFF; 355 | } 356 | 357 | tr.odd td.sorting_3 { 358 | background-color: #E0E2FF; 359 | } 360 | 361 | tr.even td.sorting_1 { 362 | background-color: #EAEBFF; 363 | } 364 | 365 | tr.even td.sorting_2 { 366 | background-color: #F2F3FF; 367 | } 368 | 369 | tr.even td.sorting_3 { 370 | background-color: #F9F9FF; 371 | } 372 | 373 | 374 | /* For the Conditional-CSS grading rows */ 375 | /* 376 | Colour calculations (based off the main row colours) 377 | Level 1: 378 | dd > c4 379 | ee > d5 380 | Level 2: 381 | dd > d1 382 | ee > e2 383 | */ 384 | tr.odd.gradeA td.sorting_1 { 385 | background-color: #c4ffc4; 386 | } 387 | 388 | tr.odd.gradeA td.sorting_2 { 389 | background-color: #d1ffd1; 390 | } 391 | 392 | tr.odd.gradeA td.sorting_3 { 393 | background-color: #d1ffd1; 394 | } 395 | 396 | tr.even.gradeA td.sorting_1 { 397 | background-color: #d5ffd5; 398 | } 399 | 400 | tr.even.gradeA td.sorting_2 { 401 | background-color: #e2ffe2; 402 | } 403 | 404 | tr.even.gradeA td.sorting_3 { 405 | background-color: #e2ffe2; 406 | } 407 | 408 | tr.odd.gradeC td.sorting_1 { 409 | background-color: #c4c4ff; 410 | } 411 | 412 | tr.odd.gradeC td.sorting_2 { 413 | background-color: #d1d1ff; 414 | } 415 | 416 | tr.odd.gradeC td.sorting_3 { 417 | background-color: #d1d1ff; 418 | } 419 | 420 | tr.even.gradeC td.sorting_1 { 421 | background-color: #d5d5ff; 422 | } 423 | 424 | tr.even.gradeC td.sorting_2 { 425 | background-color: #e2e2ff; 426 | } 427 | 428 | tr.even.gradeC td.sorting_3 { 429 | background-color: #e2e2ff; 430 | } 431 | 432 | tr.odd.gradeX td.sorting_1 { 433 | background-color: #ffc4c4; 434 | } 435 | 436 | tr.odd.gradeX td.sorting_2 { 437 | background-color: #ffd1d1; 438 | } 439 | 440 | tr.odd.gradeX td.sorting_3 { 441 | background-color: #ffd1d1; 442 | } 443 | 444 | tr.even.gradeX td.sorting_1 { 445 | background-color: #ffd5d5; 446 | } 447 | 448 | tr.even.gradeX td.sorting_2 { 449 | background-color: #ffe2e2; 450 | } 451 | 452 | tr.even.gradeX td.sorting_3 { 453 | background-color: #ffe2e2; 454 | } 455 | 456 | tr.odd.gradeU td.sorting_1 { 457 | background-color: #c4c4c4; 458 | } 459 | 460 | tr.odd.gradeU td.sorting_2 { 461 | background-color: #d1d1d1; 462 | } 463 | 464 | tr.odd.gradeU td.sorting_3 { 465 | background-color: #d1d1d1; 466 | } 467 | 468 | tr.even.gradeU td.sorting_1 { 469 | background-color: #d5d5d5; 470 | } 471 | 472 | tr.even.gradeU td.sorting_2 { 473 | background-color: #e2e2e2; 474 | } 475 | 476 | tr.even.gradeU td.sorting_3 { 477 | background-color: #e2e2e2; 478 | } 479 | 480 | 481 | /* 482 | * Row highlighting example 483 | */ 484 | .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { 485 | background-color: #ECFFB3; 486 | } 487 | 488 | .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { 489 | background-color: #E6FF99; 490 | } -------------------------------------------------------------------------------- /scripts/datatables/tableTools/as3/ZeroClipboardPdf.as: -------------------------------------------------------------------------------- 1 | /* Compile using: mxmlc --target-player=10.0.0 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as */ 2 | package { 3 | import flash.display.Stage; 4 | import flash.display.Sprite; 5 | import flash.display.LoaderInfo; 6 | import flash.display.StageScaleMode; 7 | import flash.events.*; 8 | import flash.display.StageAlign; 9 | import flash.display.StageScaleMode; 10 | import flash.external.ExternalInterface; 11 | import flash.system.Security; 12 | import flash.utils.*; 13 | import flash.system.System; 14 | import flash.net.FileReference; 15 | import flash.net.FileFilter; 16 | 17 | /* PDF imports */ 18 | import org.alivepdf.pdf.PDF; 19 | import org.alivepdf.data.Grid; 20 | import org.alivepdf.data.GridColumn; 21 | import org.alivepdf.layout.Orientation; 22 | import org.alivepdf.layout.Size; 23 | import org.alivepdf.layout.Unit; 24 | import org.alivepdf.display.Display; 25 | import org.alivepdf.saving.Method; 26 | import org.alivepdf.fonts.FontFamily; 27 | import org.alivepdf.fonts.Style; 28 | import org.alivepdf.fonts.CoreFont; 29 | import org.alivepdf.colors.RGBColor; 30 | 31 | public class ZeroClipboard extends Sprite { 32 | 33 | private var domId:String = ''; 34 | private var button:Sprite; 35 | private var clipText:String = 'blank'; 36 | private var fileName:String = ''; 37 | private var action:String = 'copy'; 38 | private var incBom:Boolean = true; 39 | private var charSet:String = 'utf8'; 40 | 41 | 42 | public function ZeroClipboard() { 43 | // constructor, setup event listeners and external interfaces 44 | stage.scaleMode = StageScaleMode.EXACT_FIT; 45 | flash.system.Security.allowDomain("*"); 46 | 47 | // import flashvars 48 | var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters; 49 | domId = flashvars.id; 50 | 51 | // invisible button covers entire stage 52 | button = new Sprite(); 53 | button.buttonMode = true; 54 | button.useHandCursor = true; 55 | button.graphics.beginFill(0x00FF00); 56 | button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); 57 | button.alpha = 0.0; 58 | addChild(button); 59 | 60 | button.addEventListener(MouseEvent.CLICK, function(event:Event):void { 61 | clickHandler(event); 62 | } ); 63 | button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void { 64 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOver', null ); 65 | } ); 66 | button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void { 67 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOut', null ); 68 | } ); 69 | button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void { 70 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseDown', null ); 71 | } ); 72 | button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void { 73 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseUp', null ); 74 | } ); 75 | 76 | /* External functions 77 | * This is extremely nasty, and I'm far from proud of this, however, when a Flash 78 | * movie is hidden in IE (i.e. display:none) then all callbacks are removed, and there 79 | * is no way to tell that this has happened! Javascript can't tell us since there are 80 | * no callbacks - so we need to add them again and again... Fortunatly Flash doesn't 81 | * allow multiple callback functions to be used with each callback name, it just uses 82 | * the provided function, so the only thing we use for this workaround is a couple of 83 | * clock cycles. 84 | */ 85 | addCallbacks(); 86 | setInterval( addCallbacks, 1000 ); 87 | 88 | // signal to the browser that we are ready 89 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'load', null ); 90 | } 91 | 92 | public function addCallbacks ():void { 93 | ExternalInterface.addCallback("setHandCursor", setHandCursor); 94 | ExternalInterface.addCallback("clearText", clearText); 95 | ExternalInterface.addCallback("setText", setText); 96 | ExternalInterface.addCallback("appendText", appendText); 97 | ExternalInterface.addCallback("setFileName", setFileName); 98 | ExternalInterface.addCallback("setAction", setAction); 99 | ExternalInterface.addCallback("setCharSet", setCharSet); 100 | ExternalInterface.addCallback("setBomInc", setBomInc); 101 | } 102 | 103 | 104 | public function setCharSet(newCharSet:String):void { 105 | if ( newCharSet == 'UTF16LE' ) { 106 | charSet = newCharSet; 107 | } else { 108 | charSet = 'UTF8'; 109 | } 110 | } 111 | 112 | public function setBomInc(newBomInc:Boolean):void { 113 | incBom = newBomInc; 114 | } 115 | 116 | public function clearText():void { 117 | clipText = ''; 118 | } 119 | 120 | public function appendText(newText:String):void { 121 | clipText += newText; 122 | } 123 | 124 | public function setText(newText:String):void { 125 | clipText = newText; 126 | } 127 | 128 | public function setFileName(newFileName:String):void { 129 | fileName = newFileName; 130 | } 131 | 132 | public function setAction(newAction:String):void { 133 | action = newAction; 134 | } 135 | 136 | public function setHandCursor(enabled:Boolean):void { 137 | // control whether the hand cursor is shown on rollover (true) 138 | // or the default arrow cursor (false) 139 | button.useHandCursor = enabled; 140 | } 141 | 142 | 143 | private function clickHandler(event:Event):void { 144 | var fileRef:FileReference = new FileReference(); 145 | fileRef.addEventListener(Event.COMPLETE, saveComplete); 146 | 147 | if ( action == "save" ) { 148 | /* Save as a file */ 149 | if ( charSet == 'UTF16LE' ) { 150 | fileRef.save( strToUTF16LE(clipText), fileName ); 151 | } else { 152 | fileRef.save( strToUTF8(clipText), fileName ); 153 | } 154 | } else if ( action == "pdf" ) { 155 | /* Save as a PDF */ 156 | var pdf:PDF = configPdf(); 157 | fileRef.save( pdf.save( Method.LOCAL ), fileName ); 158 | } else { 159 | /* Copy the text to the clipboard. Note charset and BOM have no effect here */ 160 | System.setClipboard( clipText ); 161 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); 162 | } 163 | } 164 | 165 | 166 | private function saveComplete(event:Event):void { 167 | ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText ); 168 | } 169 | 170 | 171 | private function getProp( prop:String, opts:Array ):String 172 | { 173 | var i:int, iLen:int; 174 | for ( i=0, iLen=opts.length ; i> 8 ); 310 | } 311 | 312 | i++; 313 | } 314 | 315 | return utf16; 316 | } 317 | } 318 | } 319 | -------------------------------------------------------------------------------- /styles/dataTable_jui.css: -------------------------------------------------------------------------------- 1 | /* 2 | * File: demo_table_jui.css 3 | * CVS: $Id$ 4 | * Description: CSS descriptions for DataTables demo pages 5 | * Author: Allan Jardine 6 | * Created: Tue May 12 06:47:22 BST 2009 7 | * Modified: $Date$ by $Author$ 8 | * Language: CSS 9 | * Project: DataTables 10 | * 11 | * Copyright 2009 Allan Jardine. All Rights Reserved. 12 | * 13 | * *************************************************************************** 14 | * DESCRIPTION 15 | * 16 | * The styles given here are suitable for the demos that are used with the standard DataTables 17 | * distribution (see www.datatables.net). You will most likely wish to modify these styles to 18 | * meet the layout requirements of your site. 19 | * 20 | * Common issues: 21 | * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is 22 | * no conflict between the two pagination types. If you want to use full_numbers pagination 23 | * ensure that you either have "example_alt_pagination" as a body class name, or better yet, 24 | * modify that selector. 25 | * Note that the path used for Images is relative. All images are by default located in 26 | * ../images/ - relative to this CSS file. 27 | */ 28 | 29 | 30 | /* 31 | * jQuery UI specific styling 32 | */ 33 | 34 | .paging_two_button .ui-button { 35 | float: left; 36 | cursor: pointer; 37 | * cursor: hand; 38 | } 39 | 40 | .paging_full_numbers .ui-button { 41 | padding: 2px 6px; 42 | margin: 0; 43 | cursor: pointer; 44 | * cursor: hand; 45 | } 46 | 47 | .ui-buttonset .ui-button { 48 | margin-right: -0.1em !important; 49 | } 50 | 51 | .paging_full_numbers { 52 | width: 350px !important; 53 | } 54 | 55 | .ui-toolbar { 56 | padding: 5px; 57 | } 58 | 59 | .dataTables_paginate { 60 | width: auto; 61 | } 62 | 63 | .dataTables_info { 64 | padding-top: 3px; 65 | } 66 | 67 | table.display thead th { 68 | padding: 3px 0px 3px 10px; 69 | cursor: pointer; 70 | * cursor: hand; 71 | color: #0B93D5; 72 | font-weight: bold; 73 | } 74 | 75 | div.dataTables_wrapper .ui-widget-header { 76 | font-weight: normal; 77 | } 78 | 79 | 80 | /* 81 | * Sort arrow icon positioning 82 | */ 83 | table.display thead th div.DataTables_sort_wrapper { 84 | position: relative; 85 | padding-right: 20px; 86 | padding-right: 20px; 87 | } 88 | 89 | table.display thead th div.DataTables_sort_wrapper span { 90 | position: absolute; 91 | top: 50%; 92 | margin-top: -8px; 93 | right: 0; 94 | } 95 | 96 | 97 | 98 | 99 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 100 | * 101 | * Everything below this line is the same as demo_table.css. This file is 102 | * required for 'cleanliness' of the markup 103 | * 104 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 105 | 106 | 107 | 108 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 109 | * DataTables features 110 | */ 111 | 112 | .dataTables_wrapper { 113 | position: relative; 114 | min-height: 150px; 115 | _height: 302px; 116 | clear: both; 117 | padding: 5px; 118 | } 119 | 120 | .dataTables_processing { 121 | position: absolute; 122 | top: 0px; 123 | left: 50%; 124 | width: 250px; 125 | margin-left: -125px; 126 | border: 1px solid #ddd; 127 | text-align: center; 128 | color: #999; 129 | font-size: 11px; 130 | padding: 2px 0; 131 | } 132 | 133 | .dataTables_length { 134 | width: 40%; 135 | float: left; 136 | } 137 | 138 | .dataTables_filter { 139 | width: 50%; 140 | float: right; 141 | text-align: right; 142 | } 143 | 144 | .dataTables_info { 145 | width: 50%; 146 | float: left; 147 | } 148 | 149 | .dataTables_paginate { 150 | float: right; 151 | text-align: right; 152 | } 153 | 154 | /* Pagination nested */ 155 | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { 156 | height: 19px; 157 | width: 19px; 158 | margin-left: 3px; 159 | float: left; 160 | } 161 | 162 | .paginate_disabled_previous { 163 | background-image: url('../images/back_disabled.jpg'); 164 | } 165 | 166 | .paginate_enabled_previous { 167 | background-image: url('../images/back_enabled.jpg'); 168 | } 169 | 170 | .paginate_disabled_next { 171 | background-image: url('../images/forward_disabled.jpg'); 172 | } 173 | 174 | .paginate_enabled_next { 175 | background-image: url('../images/forward_enabled.jpg'); 176 | } 177 | 178 | 179 | 180 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 181 | * DataTables display 182 | */ 183 | table.display { 184 | margin: 0 auto; 185 | width: 100%; 186 | clear: both; 187 | border-collapse: collapse; 188 | } 189 | 190 | table.display tfoot th { 191 | padding: 3px 0px 3px 10px; 192 | font-weight: bold; 193 | font-weight: normal; 194 | } 195 | 196 | table.display tr.heading2 td { 197 | border-bottom: 1px solid #aaa; 198 | } 199 | 200 | table.display td { 201 | padding: 3px 10px; 202 | } 203 | 204 | table.display td.center { 205 | text-align: center; 206 | } 207 | 208 | 209 | 210 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 211 | * DataTables sorting 212 | */ 213 | 214 | .sorting_asc { 215 | background: url('../images/sort_asc.jpg') no-repeat center right; 216 | } 217 | 218 | .sorting_desc { 219 | background: url('../images/sort_desc.jpg') no-repeat center right; 220 | } 221 | 222 | .sorting { 223 | background: url('../images/sort_both.jpg') no-repeat center right; 224 | } 225 | 226 | 227 | 228 | 229 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 230 | * DataTables row classes 231 | */ 232 | table.display tr.odd.gradeA { 233 | background-color: #ddffdd; 234 | } 235 | 236 | table.display tr.even.gradeA { 237 | background-color: #eeffee; 238 | } 239 | 240 | 241 | 242 | 243 | table.display tr.odd.gradeA { 244 | background-color: #ddffdd; 245 | } 246 | 247 | table.display tr.even.gradeA { 248 | background-color: #eeffee; 249 | } 250 | 251 | table.display tr.odd.gradeC { 252 | background-color: #ddddff; 253 | } 254 | 255 | table.display tr.even.gradeC { 256 | background-color: #eeeeff; 257 | } 258 | 259 | table.display tr.odd.gradeX { 260 | background-color: #ffdddd; 261 | } 262 | 263 | table.display tr.even.gradeX { 264 | background-color: #ffeeee; 265 | } 266 | 267 | table.display tr.odd.gradeU { 268 | background-color: #ddd; 269 | } 270 | 271 | table.display tr.even.gradeU { 272 | background-color: #eee; 273 | } 274 | 275 | tr.odd 276 | { 277 | background-color: #999999; 278 | color: #001122; 279 | } 280 | 281 | tr.odd a 282 | { color: #001122; } 283 | 284 | tr.odd a:hover 285 | { color: #FC0; } 286 | 287 | tr.even 288 | { 289 | background-color: #CCCCCC; 290 | color: #001122; 291 | } 292 | 293 | 294 | 295 | 296 | 297 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 298 | * Misc 299 | */ 300 | .dataTables_scroll { 301 | clear: both; 302 | } 303 | 304 | .top, .bottom { 305 | padding: 15px; 306 | background-color: #F5F5F5; 307 | border: 1px solid #0B93D5; 308 | } 309 | 310 | .top .dataTables_info { 311 | float: none; 312 | } 313 | 314 | .clear { 315 | clear: both; 316 | } 317 | 318 | .dataTables_empty { 319 | text-align: center; 320 | } 321 | 322 | tfoot input { 323 | margin: 0.5em 0; 324 | width: 100%; 325 | color: #444; 326 | } 327 | 328 | tfoot input.search_init { 329 | color: #999; 330 | } 331 | 332 | td.group { 333 | background-color: #d1cfd0; 334 | border-bottom: 2px solid #A19B9E; 335 | border-top: 2px solid #A19B9E; 336 | } 337 | 338 | td.details { 339 | background-color: #d1cfd0; 340 | border: 2px solid #A19B9E; 341 | } 342 | 343 | 344 | .example_alt_pagination div.dataTables_info { 345 | width: 40%; 346 | } 347 | 348 | .paging_full_numbers span.paginate_button, 349 | .paging_full_numbers span.paginate_active { 350 | border: 1px solid #aaa; 351 | -webkit-border-radius: 5px; 352 | -moz-border-radius: 5px; 353 | padding: 2px 5px; 354 | margin: 0 3px; 355 | cursor: pointer; 356 | *cursor: hand; 357 | } 358 | 359 | .paging_full_numbers span.paginate_button { 360 | background-color: #ddd; 361 | } 362 | 363 | .paging_full_numbers span.paginate_button:hover { 364 | background-color: #ccc; 365 | } 366 | 367 | .paging_full_numbers span.paginate_active { 368 | background-color: #99B3FF; 369 | } 370 | 371 | table.display tr.even.row_selected td { 372 | background-color: #B0BED9; 373 | } 374 | 375 | table.display tr.odd.row_selected td { 376 | background-color: #9FAFD1; 377 | } 378 | 379 | 380 | /* 381 | * Sorting classes for columns 382 | */ 383 | /* For the standard odd/even */ 384 | tr.odd td.sorting_1 { 385 | background-color: #DDEEFF; 386 | } 387 | 388 | tr.odd td.sorting_2 { 389 | background-color: #CCDDEE; 390 | } 391 | 392 | tr.odd td.sorting_3 { 393 | background-color: #BBCCDD; 394 | } 395 | 396 | tr.even td.sorting_1 397 | { 398 | background-color: #223344; 399 | color: #EEEEEE; 400 | } 401 | 402 | tr.even td.sorting_2 403 | { 404 | background-color: #112233; 405 | color: #EEEEEE; 406 | } 407 | 408 | tr.even td.sorting_3 409 | { 410 | background-color: #001122; 411 | color: #EEEEEE; 412 | } 413 | 414 | 415 | /* For the Conditional-CSS grading rows */ 416 | /* 417 | Colour calculations (based off the main row colours) 418 | Level 1: 419 | dd > c4 420 | ee > d5 421 | Level 2: 422 | dd > d1 423 | ee > e2 424 | */ 425 | tr.odd.gradeA td.sorting_1 { 426 | background-color: #c4ffc4; 427 | } 428 | 429 | tr.odd.gradeA td.sorting_2 { 430 | background-color: #d1ffd1; 431 | } 432 | 433 | tr.odd.gradeA td.sorting_3 { 434 | background-color: #d1ffd1; 435 | } 436 | 437 | tr.even.gradeA td.sorting_1 { 438 | background-color: #d5ffd5; 439 | } 440 | 441 | tr.even.gradeA td.sorting_2 { 442 | background-color: #e2ffe2; 443 | } 444 | 445 | tr.even.gradeA td.sorting_3 { 446 | background-color: #e2ffe2; 447 | } 448 | 449 | tr.odd.gradeC td.sorting_1 { 450 | background-color: #c4c4ff; 451 | } 452 | 453 | tr.odd.gradeC td.sorting_2 { 454 | background-color: #d1d1ff; 455 | } 456 | 457 | tr.odd.gradeC td.sorting_3 { 458 | background-color: #d1d1ff; 459 | } 460 | 461 | tr.even.gradeC td.sorting_1 { 462 | background-color: #d5d5ff; 463 | } 464 | 465 | tr.even.gradeC td.sorting_2 { 466 | background-color: #e2e2ff; 467 | } 468 | 469 | tr.even.gradeC td.sorting_3 { 470 | background-color: #e2e2ff; 471 | } 472 | 473 | tr.odd.gradeX td.sorting_1 { 474 | background-color: #ffc4c4; 475 | } 476 | 477 | tr.odd.gradeX td.sorting_2 { 478 | background-color: #ffd1d1; 479 | } 480 | 481 | tr.odd.gradeX td.sorting_3 { 482 | background-color: #ffd1d1; 483 | } 484 | 485 | tr.even.gradeX td.sorting_1 { 486 | background-color: #ffd5d5; 487 | } 488 | 489 | tr.even.gradeX td.sorting_2 { 490 | background-color: #ffe2e2; 491 | } 492 | 493 | tr.even.gradeX td.sorting_3 { 494 | background-color: #ffe2e2; 495 | } 496 | 497 | tr.odd.gradeU td.sorting_1 { 498 | background-color: #c4c4c4; 499 | } 500 | 501 | tr.odd.gradeU td.sorting_2 { 502 | background-color: #d1d1d1; 503 | } 504 | 505 | tr.odd.gradeU td.sorting_3 { 506 | background-color: #d1d1d1; 507 | } 508 | 509 | tr.even.gradeU td.sorting_1 { 510 | background-color: #d5d5d5; 511 | } 512 | 513 | tr.even.gradeU td.sorting_2 { 514 | background-color: #e2e2e2; 515 | } 516 | 517 | tr.even.gradeU td.sorting_3 { 518 | background-color: #e2e2e2; 519 | } 520 | 521 | 522 | /* 523 | * Row highlighting example 524 | */ 525 | .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { 526 | background-color: #ECFFB3; 527 | } 528 | 529 | .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { 530 | background-color: #E6FF99; 531 | } -------------------------------------------------------------------------------- /scripts/datatables/css/demo_table.css: -------------------------------------------------------------------------------- 1 | /* 2 | * File: demo_table.css 3 | * CVS: $Id$ 4 | * Description: CSS descriptions for DataTables demo pages 5 | * Author: Allan Jardine 6 | * Created: Tue May 12 06:47:22 BST 2009 7 | * Modified: $Date$ by $Author$ 8 | * Language: CSS 9 | * Project: DataTables 10 | * 11 | * Copyright 2009 Allan Jardine. All Rights Reserved. 12 | * 13 | * *************************************************************************** 14 | * DESCRIPTION 15 | * 16 | * The styles given here are suitable for the demos that are used with the standard DataTables 17 | * distribution (see www.datatables.net). You will most likely wish to modify these styles to 18 | * meet the layout requirements of your site. 19 | * 20 | * Common issues: 21 | * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is 22 | * no conflict between the two pagination types. If you want to use full_numbers pagination 23 | * ensure that you either have "example_alt_pagination" as a body class name, or better yet, 24 | * modify that selector. 25 | * Note that the path used for Images is relative. All images are by default located in 26 | * ../images/ - relative to this CSS file. 27 | */ 28 | 29 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 30 | * DataTables features 31 | */ 32 | 33 | .dataTables_wrapper { 34 | position: relative; 35 | min-height: 302px; 36 | clear: both; 37 | _height: 302px; 38 | zoom: 1; /* Feeling sorry for IE */ 39 | } 40 | 41 | .dataTables_processing { 42 | position: absolute; 43 | top: 50%; 44 | left: 50%; 45 | width: 250px; 46 | height: 30px; 47 | margin-left: -125px; 48 | margin-top: -15px; 49 | padding: 14px 0 2px 0; 50 | border: 1px solid #ddd; 51 | text-align: center; 52 | color: #999; 53 | font-size: 14px; 54 | background-color: #FFF; 55 | } 56 | 57 | .dataTables_length { 58 | width: 40%; 59 | float: left; 60 | } 61 | 62 | .dataTables_filter { 63 | width: 50%; 64 | float: right; 65 | text-align: right; 66 | } 67 | 68 | .dataTables_info { 69 | width: 60%; 70 | float: left; 71 | } 72 | 73 | .dataTables_paginate { 74 | width: 44px; 75 | * width: 50px; 76 | float: right; 77 | text-align: right; 78 | } 79 | 80 | /* Pagination nested */ 81 | .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { 82 | height: 19px; 83 | width: 19px; 84 | margin-left: 3px; 85 | float: left; 86 | } 87 | 88 | .paginate_disabled_previous { 89 | background-image: url('../images/back_disabled.jpg'); 90 | } 91 | 92 | .paginate_enabled_previous { 93 | background-image: url('../images/back_enabled.jpg'); 94 | } 95 | 96 | .paginate_disabled_next { 97 | background-image: url('../images/forward_disabled.jpg'); 98 | } 99 | 100 | .paginate_enabled_next { 101 | background-image: url('../images/forward_enabled.jpg'); 102 | } 103 | 104 | 105 | 106 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 107 | * DataTables display 108 | */ 109 | table.display { 110 | margin: 0 auto; 111 | clear: both; 112 | width: 100%; 113 | 114 | /* Note Firefox 3.5 and before have a bug with border-collapse 115 | * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 ) 116 | * border-spacing: 0; is one possible option. Conditional-css.com is 117 | * useful for this kind of thing 118 | * 119 | * Further note IE 6/7 has problems when calculating widths with border width. 120 | * It subtracts one px relative to the other browsers from the first column, and 121 | * adds one to the end... 122 | * 123 | * If you want that effect I'd suggest setting a border-top/left on th/td's and 124 | * then filling in the gaps with other borders. 125 | */ 126 | } 127 | 128 | table.display thead th { 129 | padding: 3px 18px 3px 10px; 130 | border-bottom: 1px solid #FFF; 131 | font-weight: bold; 132 | cursor: pointer; 133 | * cursor: hand; 134 | } 135 | 136 | table.display tfoot th { 137 | padding: 3px 18px 3px 10px; 138 | border-top: 1px solid #FFF; 139 | font-weight: bold; 140 | } 141 | 142 | table.display tr.heading2 td { 143 | border-bottom: 1px solid #CCC; 144 | } 145 | 146 | table.display td { 147 | padding: 3px 10px; 148 | } 149 | 150 | table.display td.center { 151 | text-align: center; 152 | } 153 | 154 | 155 | 156 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 157 | * DataTables sorting 158 | */ 159 | 160 | .sorting_asc { 161 | background: url('../images/sort_asc.png') no-repeat center right; 162 | } 163 | 164 | .sorting_desc { 165 | background: url('../images/sort_desc.png') no-repeat center right; 166 | } 167 | 168 | .sorting { 169 | background: url('../images/sort_both.png') no-repeat center right; 170 | } 171 | 172 | .sorting_asc_disabled { 173 | background: url('../images/sort_asc_disabled.png') no-repeat center right; 174 | } 175 | 176 | .sorting_desc_disabled { 177 | background: url('../images/sort_desc_disabled.png') no-repeat center right; 178 | } 179 | 180 | 181 | 182 | 183 | 184 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 185 | * DataTables row classes 186 | */ 187 | table.display tr.odd.gradeA { 188 | background-color: #ddffdd; 189 | } 190 | 191 | table.display tr.even.gradeA { 192 | background-color: #eeffee; 193 | } 194 | 195 | table.display tr.odd.gradeC { 196 | background-color: #ddddff; 197 | } 198 | 199 | table.display tr.even.gradeC { 200 | background-color: #eeeeff; 201 | } 202 | 203 | table.display tr.odd.gradeX { 204 | background-color: #ffdddd; 205 | } 206 | 207 | table.display tr.even.gradeX { 208 | background-color: #ffeeee; 209 | } 210 | 211 | table.display tr.odd.gradeU { 212 | background-color: #ddd; 213 | } 214 | 215 | table.display tr.even.gradeU { 216 | background-color: #eee; 217 | } 218 | 219 | 220 | tr.odd { 221 | color: #000; 222 | background-color: #CCC; /* background-color: #E2E4FF; */ 223 | } 224 | 225 | tr.even { 226 | color: #000; 227 | background-color: #FFF; 228 | } 229 | 230 | 231 | 232 | 233 | 234 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 235 | * Misc 236 | */ 237 | .dataTables_scroll { 238 | clear: both; 239 | } 240 | 241 | .dataTables_scrollBody { 242 | *margin-top: -1px; 243 | } 244 | 245 | .top, .bottom { 246 | padding: 15px; 247 | background-color: #F5F5F5; 248 | border: 1px solid #CCCCCC; 249 | } 250 | 251 | .top .dataTables_info { 252 | float: none; 253 | } 254 | 255 | .clear { 256 | clear: both; 257 | } 258 | 259 | .dataTables_empty { 260 | text-align: center; 261 | } 262 | 263 | tfoot input { 264 | margin: 0.5em 0; 265 | width: 100%; 266 | color: #444; 267 | } 268 | 269 | tfoot input.search_init { 270 | color: #999; 271 | } 272 | 273 | td.group { 274 | background-color: #d1cfd0; 275 | border-bottom: 2px solid #A19B9E; 276 | border-top: 2px solid #A19B9E; 277 | } 278 | 279 | td.details { 280 | background-color: #d1cfd0; 281 | border: 2px solid #A19B9E; 282 | } 283 | 284 | 285 | .example_alt_pagination div.dataTables_info { 286 | width: 40%; 287 | } 288 | 289 | .paging_full_numbers { 290 | width: 400px; 291 | height: 22px; 292 | line-height: 22px; 293 | } 294 | 295 | .paging_full_numbers span.paginate_button, 296 | .paging_full_numbers span.paginate_active { 297 | border: 1px solid #aaa; 298 | -webkit-border-radius: 5px; 299 | -moz-border-radius: 5px; 300 | padding: 2px 5px; 301 | margin: 0 3px; 302 | cursor: pointer; 303 | *cursor: hand; 304 | } 305 | 306 | .paging_full_numbers span.paginate_button { 307 | background-color: #999; 308 | } 309 | 310 | .paging_full_numbers span.paginate_button:hover { 311 | background-color: #ccc; 312 | } 313 | 314 | .paging_full_numbers span.paginate_active { 315 | background-color: #99B3FF; 316 | } 317 | 318 | table.display tr.even.row_selected td { 319 | background-color: #B0BED9; 320 | } 321 | 322 | table.display tr.odd.row_selected td { 323 | background-color: #9FAFD1; 324 | } 325 | 326 | 327 | /* 328 | * Sorting classes for columns 329 | */ 330 | /* For the standard odd/even */ 331 | tr.odd td.sorting_1 { 332 | color: #FFF; 333 | background-color: #000032;/* background-color: #D3D6FF; */ 334 | } 335 | 336 | tr.odd td.sorting_2 { 337 | background-color: #DADCFF; 338 | } 339 | 340 | tr.odd td.sorting_3 { 341 | background-color: #E0E2FF; 342 | } 343 | 344 | tr.even td.sorting_1 { 345 | background-color: #FFF; /* background-color: #EAEBFF; */ 346 | } 347 | 348 | tr.even td.sorting_2 { 349 | background-color: #F2F3FF; 350 | } 351 | 352 | tr.even td.sorting_3 { 353 | background-color: #F9F9FF; 354 | } 355 | 356 | 357 | /* For the Conditional-CSS grading rows */ 358 | /* 359 | Colour calculations (based off the main row colours) 360 | Level 1: 361 | dd > c4 362 | ee > d5 363 | Level 2: 364 | dd > d1 365 | ee > e2 366 | */ 367 | tr.odd.gradeA td.sorting_1 { 368 | background-color: #c4ffc4; 369 | } 370 | 371 | tr.odd.gradeA td.sorting_2 { 372 | background-color: #d1ffd1; 373 | } 374 | 375 | tr.odd.gradeA td.sorting_3 { 376 | background-color: #d1ffd1; 377 | } 378 | 379 | tr.even.gradeA td.sorting_1 { 380 | background-color: #d5ffd5; 381 | } 382 | 383 | tr.even.gradeA td.sorting_2 { 384 | background-color: #e2ffe2; 385 | } 386 | 387 | tr.even.gradeA td.sorting_3 { 388 | background-color: #e2ffe2; 389 | } 390 | 391 | tr.odd.gradeC td.sorting_1 { 392 | background-color: #c4c4ff; 393 | } 394 | 395 | tr.odd.gradeC td.sorting_2 { 396 | background-color: #d1d1ff; 397 | } 398 | 399 | tr.odd.gradeC td.sorting_3 { 400 | background-color: #d1d1ff; 401 | } 402 | 403 | tr.even.gradeC td.sorting_1 { 404 | background-color: #d5d5ff; 405 | } 406 | 407 | tr.even.gradeC td.sorting_2 { 408 | background-color: #e2e2ff; 409 | } 410 | 411 | tr.even.gradeC td.sorting_3 { 412 | background-color: #e2e2ff; 413 | } 414 | 415 | tr.odd.gradeX td.sorting_1 { 416 | background-color: #ffc4c4; 417 | } 418 | 419 | tr.odd.gradeX td.sorting_2 { 420 | background-color: #ffd1d1; 421 | } 422 | 423 | tr.odd.gradeX td.sorting_3 { 424 | background-color: #ffd1d1; 425 | } 426 | 427 | tr.even.gradeX td.sorting_1 { 428 | background-color: #ffd5d5; 429 | } 430 | 431 | tr.even.gradeX td.sorting_2 { 432 | background-color: #ffe2e2; 433 | } 434 | 435 | tr.even.gradeX td.sorting_3 { 436 | background-color: #ffe2e2; 437 | } 438 | 439 | tr.odd.gradeU td.sorting_1 { 440 | background-color: #c4c4c4; 441 | } 442 | 443 | tr.odd.gradeU td.sorting_2 { 444 | background-color: #d1d1d1; 445 | } 446 | 447 | tr.odd.gradeU td.sorting_3 { 448 | background-color: #d1d1d1; 449 | } 450 | 451 | tr.even.gradeU td.sorting_1 { 452 | background-color: #d5d5d5; 453 | } 454 | 455 | tr.even.gradeU td.sorting_2 { 456 | background-color: #e2e2e2; 457 | } 458 | 459 | tr.even.gradeU td.sorting_3 { 460 | background-color: #e2e2e2; 461 | } 462 | 463 | 464 | /* 465 | * Row highlighting example 466 | */ 467 | .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { 468 | background-color: #ECFFB3; 469 | } 470 | 471 | .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { 472 | background-color: #E6FF99; 473 | } 474 | 475 | .ex_highlight_row #example tr.even:hover { 476 | background-color: #ECFFB3; 477 | } 478 | 479 | .ex_highlight_row #example tr.even:hover td.sorting_1 { 480 | background-color: #DDFF75; 481 | } 482 | 483 | .ex_highlight_row #example tr.even:hover td.sorting_2 { 484 | background-color: #E7FF9E; 485 | } 486 | 487 | .ex_highlight_row #example tr.even:hover td.sorting_3 { 488 | background-color: #E2FF89; 489 | } 490 | 491 | .ex_highlight_row #example tr.odd:hover { 492 | background-color: #E6FF99; 493 | } 494 | 495 | .ex_highlight_row #example tr.odd:hover td.sorting_1 { 496 | background-color: #D6FF5C; 497 | } 498 | 499 | .ex_highlight_row #example tr.odd:hover td.sorting_2 { 500 | background-color: #E0FF84; 501 | } 502 | 503 | .ex_highlight_row #example tr.odd:hover td.sorting_3 { 504 | background-color: #DBFF70; 505 | } 506 | 507 | 508 | /* 509 | * KeyTable 510 | */ 511 | table.KeyTable td { 512 | border: 3px solid transparent; 513 | } 514 | 515 | table.KeyTable td.focus { 516 | border: 3px solid #3366FF; 517 | } 518 | 519 | table.display tr.gradeA { 520 | background-color: #eeffee; 521 | } 522 | 523 | table.display tr.gradeC { 524 | background-color: #ddddff; 525 | } 526 | 527 | table.display tr.gradeX { 528 | background-color: #ffdddd; 529 | } 530 | 531 | table.display tr.gradeU { 532 | background-color: #ddd; 533 | } 534 | 535 | div.box { 536 | height: 100px; 537 | padding: 10px; 538 | overflow: auto; 539 | border: 1px solid #8080FF; 540 | background-color: #E5E5FF; 541 | } 542 | -------------------------------------------------------------------------------- /scripts/datatables/tableTools/ZeroClipboard.js: -------------------------------------------------------------------------------- 1 | // Simple Set Clipboard System 2 | // Author: Joseph Huckaby 3 | 4 | var ZeroClipboard = { 5 | 6 | version: "1.0.4-TableTools2", 7 | clients: {}, // registered upload clients on page, indexed by id 8 | moviePath: '', // URL to movie 9 | nextId: 1, // ID of next movie 10 | 11 | $: function(thingy) { 12 | // simple DOM lookup utility function 13 | if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); 14 | if (!thingy.addClass) { 15 | // extend element with a few useful methods 16 | thingy.hide = function() { this.style.display = 'none'; }; 17 | thingy.show = function() { this.style.display = ''; }; 18 | thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; 19 | thingy.removeClass = function(name) { 20 | this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); 21 | }; 22 | thingy.hasClass = function(name) { 23 | return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); 24 | } 25 | } 26 | return thingy; 27 | }, 28 | 29 | setMoviePath: function(path) { 30 | // set path to ZeroClipboard.swf 31 | this.moviePath = path; 32 | }, 33 | 34 | dispatch: function(id, eventName, args) { 35 | // receive event from flash movie, send to client 36 | var client = this.clients[id]; 37 | if (client) { 38 | client.receiveEvent(eventName, args); 39 | } 40 | }, 41 | 42 | register: function(id, client) { 43 | // register new client to receive events 44 | this.clients[id] = client; 45 | }, 46 | 47 | getDOMObjectPosition: function(obj) { 48 | // get absolute coordinates for dom element 49 | var info = { 50 | left: 0, 51 | top: 0, 52 | width: obj.width ? obj.width : obj.offsetWidth, 53 | height: obj.height ? obj.height : obj.offsetHeight 54 | }; 55 | 56 | if ( obj.style.width != "" ) 57 | info.width = obj.style.width.replace("px",""); 58 | 59 | if ( obj.style.height != "" ) 60 | info.height = obj.style.height.replace("px",""); 61 | 62 | while (obj) { 63 | info.left += obj.offsetLeft; 64 | info.top += obj.offsetTop; 65 | obj = obj.offsetParent; 66 | } 67 | 68 | return info; 69 | }, 70 | 71 | Client: function(elem) { 72 | // constructor for new simple upload client 73 | this.handlers = {}; 74 | 75 | // unique ID 76 | this.id = ZeroClipboard.nextId++; 77 | this.movieId = 'ZeroClipboardMovie_' + this.id; 78 | 79 | // register client with singleton to receive flash events 80 | ZeroClipboard.register(this.id, this); 81 | 82 | // create movie 83 | if (elem) this.glue(elem); 84 | } 85 | }; 86 | 87 | ZeroClipboard.Client.prototype = { 88 | 89 | id: 0, // unique ID for us 90 | ready: false, // whether movie is ready to receive events or not 91 | movie: null, // reference to movie object 92 | clipText: '', // text to copy to clipboard 93 | fileName: '', // default file save name 94 | action: 'copy', // action to perform 95 | handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor 96 | cssEffects: true, // enable CSS mouse effects on dom container 97 | handlers: null, // user event handlers 98 | sized: false, 99 | 100 | glue: function(elem, title) { 101 | // glue to DOM element 102 | // elem can be ID or actual DOM element object 103 | this.domElement = ZeroClipboard.$(elem); 104 | 105 | // float just above object, or zIndex 99 if dom element isn't set 106 | var zIndex = 99; 107 | if (this.domElement.style.zIndex) { 108 | zIndex = parseInt(this.domElement.style.zIndex) + 1; 109 | } 110 | 111 | // find X/Y position of domElement 112 | var box = ZeroClipboard.getDOMObjectPosition(this.domElement); 113 | 114 | // create floating DIV above element 115 | this.div = document.createElement('div'); 116 | var style = this.div.style; 117 | style.position = 'absolute'; 118 | style.left = (this.domElement.offsetLeft)+'px'; 119 | //style.left = (this.domElement.offsetLeft+2)+'px'; 120 | style.top = this.domElement.offsetTop+'px'; 121 | style.width = (box.width) + 'px'; 122 | //style.width = (box.width-4) + 'px'; 123 | style.height = box.height + 'px'; 124 | style.zIndex = zIndex; 125 | if ( typeof title != "undefined" && title != "" ) { 126 | this.div.title = title; 127 | } 128 | if ( box.width != 0 && box.height != 0 ) { 129 | this.sized = true; 130 | } 131 | 132 | // style.backgroundColor = '#f00'; // debug 133 | this.domElement.parentNode.appendChild(this.div); 134 | 135 | this.div.innerHTML = this.getHTML( box.width, box.height ); 136 | }, 137 | 138 | positionElement: function() { 139 | var box = ZeroClipboard.getDOMObjectPosition(this.domElement); 140 | var style = this.div.style; 141 | 142 | style.position = 'absolute'; 143 | style.left = (this.domElement.offsetLeft)+'px'; 144 | style.top = this.domElement.offsetTop+'px'; 145 | style.width = box.width + 'px'; 146 | style.height = box.height + 'px'; 147 | 148 | if ( box.width != 0 && box.height != 0 ) { 149 | this.sized = true; 150 | } 151 | 152 | var flash = this.div.childNodes[0]; 153 | flash.width = box.width; 154 | flash.height = box.height; 155 | }, 156 | 157 | getHTML: function(width, height) { 158 | // return HTML for movie 159 | var html = ''; 160 | var flashvars = 'id=' + this.id + 161 | '&width=' + width + 162 | '&height=' + height; 163 | 164 | if (navigator.userAgent.match(/MSIE/)) { 165 | // IE gets an OBJECT tag 166 | var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; 167 | html += ''; 168 | } 169 | else { 170 | // all other browsers get an EMBED tag 171 | html += ''; 172 | } 173 | return html; 174 | }, 175 | 176 | hide: function() { 177 | // temporarily hide floater offscreen 178 | if (this.div) { 179 | this.div.style.left = '-2000px'; 180 | } 181 | }, 182 | 183 | show: function() { 184 | // show ourselves after a call to hide() 185 | this.reposition(); 186 | }, 187 | 188 | destroy: function() { 189 | // destroy control and floater 190 | if (this.domElement && this.div) { 191 | this.hide(); 192 | this.div.innerHTML = ''; 193 | 194 | var body = document.getElementsByTagName('body')[0]; 195 | try { body.removeChild( this.div ); } catch(e) {;} 196 | 197 | this.domElement = null; 198 | this.div = null; 199 | } 200 | }, 201 | 202 | reposition: function(elem) { 203 | // reposition our floating div, optionally to new container 204 | // warning: container CANNOT change size, only position 205 | if (elem) { 206 | this.domElement = ZeroClipboard.$(elem); 207 | if (!this.domElement) this.hide(); 208 | } 209 | 210 | if (this.domElement && this.div) { 211 | var box = ZeroClipboard.getDOMObjectPosition(this.domElement); 212 | var style = this.div.style; 213 | style.left = '' + box.left + 'px'; 214 | style.top = '' + box.top + 'px'; 215 | } 216 | }, 217 | 218 | clearText: function() { 219 | // clear the text to be copy / saved 220 | this.clipText = ''; 221 | if (this.ready) this.movie.clearText(); 222 | }, 223 | 224 | appendText: function(newText) { 225 | // append text to that which is to be copied / saved 226 | this.clipText += newText; 227 | if (this.ready) { this.movie.appendText(newText) ;} 228 | }, 229 | 230 | setText: function(newText) { 231 | // set text to be copied to be copied / saved 232 | this.clipText = newText; 233 | if (this.ready) { this.movie.setText(newText) ;} 234 | }, 235 | 236 | setCharSet: function(charSet) { 237 | // set the character set (UTF16LE or UTF8) 238 | this.charSet = charSet; 239 | if (this.ready) { this.movie.setCharSet(charSet) ;} 240 | }, 241 | 242 | setBomInc: function(bomInc) { 243 | // set if the BOM should be included or not 244 | this.incBom = bomInc; 245 | if (this.ready) { this.movie.setBomInc(bomInc) ;} 246 | }, 247 | 248 | setFileName: function(newText) { 249 | // set the file name 250 | this.fileName = newText; 251 | if (this.ready) this.movie.setFileName(newText); 252 | }, 253 | 254 | setAction: function(newText) { 255 | // set action (save or copy) 256 | this.action = newText; 257 | if (this.ready) this.movie.setAction(newText); 258 | }, 259 | 260 | addEventListener: function(eventName, func) { 261 | // add user event listener for event 262 | // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel 263 | eventName = eventName.toString().toLowerCase().replace(/^on/, ''); 264 | if (!this.handlers[eventName]) this.handlers[eventName] = []; 265 | this.handlers[eventName].push(func); 266 | }, 267 | 268 | setHandCursor: function(enabled) { 269 | // enable hand cursor (true), or default arrow cursor (false) 270 | this.handCursorEnabled = enabled; 271 | if (this.ready) this.movie.setHandCursor(enabled); 272 | }, 273 | 274 | setCSSEffects: function(enabled) { 275 | // enable or disable CSS effects on DOM container 276 | this.cssEffects = !!enabled; 277 | }, 278 | 279 | receiveEvent: function(eventName, args) { 280 | // receive event from flash 281 | eventName = eventName.toString().toLowerCase().replace(/^on/, ''); 282 | 283 | // special behavior for certain events 284 | switch (eventName) { 285 | case 'load': 286 | // movie claims it is ready, but in IE this isn't always the case... 287 | // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function 288 | this.movie = document.getElementById(this.movieId); 289 | if (!this.movie) { 290 | var self = this; 291 | setTimeout( function() { self.receiveEvent('load', null); }, 1 ); 292 | return; 293 | } 294 | 295 | // firefox on pc needs a "kick" in order to set these in certain cases 296 | if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { 297 | var self = this; 298 | setTimeout( function() { self.receiveEvent('load', null); }, 100 ); 299 | this.ready = true; 300 | return; 301 | } 302 | 303 | this.ready = true; 304 | this.movie.clearText(); 305 | this.movie.appendText( this.clipText ); 306 | this.movie.setFileName( this.fileName ); 307 | this.movie.setAction( this.action ); 308 | this.movie.setCharSet( this.charSet ); 309 | this.movie.setBomInc( this.incBom ); 310 | this.movie.setHandCursor( this.handCursorEnabled ); 311 | break; 312 | 313 | case 'mouseover': 314 | if (this.domElement && this.cssEffects) { 315 | //this.domElement.addClass('hover'); 316 | if (this.recoverActive) this.domElement.addClass('active'); 317 | } 318 | break; 319 | 320 | case 'mouseout': 321 | if (this.domElement && this.cssEffects) { 322 | this.recoverActive = false; 323 | if (this.domElement.hasClass('active')) { 324 | this.domElement.removeClass('active'); 325 | this.recoverActive = true; 326 | } 327 | //this.domElement.removeClass('hover'); 328 | } 329 | break; 330 | 331 | case 'mousedown': 332 | if (this.domElement && this.cssEffects) { 333 | this.domElement.addClass('active'); 334 | } 335 | break; 336 | 337 | case 'mouseup': 338 | if (this.domElement && this.cssEffects) { 339 | this.domElement.removeClass('active'); 340 | this.recoverActive = false; 341 | } 342 | break; 343 | } // switch eventName 344 | 345 | if (this.handlers[eventName]) { 346 | for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { 347 | var func = this.handlers[eventName][idx]; 348 | 349 | if (typeof(func) == 'function') { 350 | // actual function reference 351 | func(this, args); 352 | } 353 | else if ((typeof(func) == 'object') && (func.length == 2)) { 354 | // PHP style object + method, i.e. [myObject, 'myMethod'] 355 | func[0][ func[1] ](this, args); 356 | } 357 | else if (typeof(func) == 'string') { 358 | // name of function 359 | window[func](this, args); 360 | } 361 | } // foreach event handler defined 362 | } // user defined handler for event 363 | } 364 | 365 | }; 366 | --------------------------------------------------------------------------------