diff options
Diffstat (limited to 'blocks')
-rw-r--r-- | blocks/announcements/index.php | 8 | ||||
-rw-r--r-- | blocks/donations/index.php | 7 | ||||
-rw-r--r-- | blocks/forum_login/index.php | 44 | ||||
-rw-r--r-- | blocks/mini_calendar/functions.php | 195 | ||||
-rw-r--r-- | blocks/mini_calendar/index.php | 3 | ||||
-rw-r--r-- | blocks/mini_calendar/scripts.js | 0 | ||||
-rw-r--r-- | blocks/mini_calendar/style.css | 114 | ||||
-rw-r--r-- | blocks/rss_agw/index.php | 107 | ||||
-rw-r--r-- | blocks/rss_agw/style.css | 17 | ||||
-rw-r--r-- | blocks/rudi/index.php | 6 | ||||
-rw-r--r-- | blocks/server_monitor/index.php | 16 | ||||
-rw-r--r-- | blocks/soldier_info/index.php | 66 | ||||
-rw-r--r-- | blocks/tsviewer/index.php | 12 |
13 files changed, 595 insertions, 0 deletions
diff --git a/blocks/announcements/index.php b/blocks/announcements/index.php new file mode 100644 index 0000000..dca72dd --- /dev/null +++ b/blocks/announcements/index.php @@ -0,0 +1,8 @@ +<?php
+
+ global $db;
+ $result = $db->Query("SELECT `text` FROM `bayonet_announcements` LIMIT 1");
+ $row = $db->FetchRow($result);
+ echo bbcode_format($row['text']);
+
+?>
\ No newline at end of file diff --git a/blocks/donations/index.php b/blocks/donations/index.php new file mode 100644 index 0000000..7b62be4 --- /dev/null +++ b/blocks/donations/index.php @@ -0,0 +1,7 @@ + +<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> +<input type="hidden" name="cmd" value="_s-xclick" /> +<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDA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wFI1QfcH1hx9vdQUg1TNdREeovbEZx47T9G7HHVpZTcNCQeQNsz0IpFZTfmQAD71ad3qXQvJyh/ghsE/s9guMO6x5AQ1iQdA5ls928WvpqYx8EFs7fGvKYhrPzI=-----END PKCS7-----" /> +<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" /> +<!-- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /> --> + diff --git a/blocks/forum_login/index.php b/blocks/forum_login/index.php new file mode 100644 index 0000000..c5343d9 --- /dev/null +++ b/blocks/forum_login/index.php @@ -0,0 +1,44 @@ +<?php +$avatar_path = '/cms/forums/avatars/'; +require_once dirname(__FILE__) . '/../../forums/SSI.php'; + +//decho($GLOBALS['user_info']); + + +global $user_info; + +$user = $user_info; +$name = $user['name']; +$avatar = empty($user['avatar']['url']) ? 'blank.gif' : $user['avatar']['url']; +$ip = $user['ip']; +$posts = $user['posts']; +$messages = $user['messages']; +$unread_messages = $user['unread_messages']; + +if(strstr($avatar,'http://')) +{ + $avatar_path = NULL; +} + +if (isset($GLOBALS['ID_MEMBER']) && $GLOBALS['ID_MEMBER'] != 0): ?> + <div> + <p> + <center> + <b>Your IP:</b> <?php echo $ip; ?><br /> + <?php /* fix this, what about avatars that arent saved no our site */ ?> + <img src="<?php echo $avatar_path . $avatar; ?>" alt="<?php echo 'No Avatar'; ?>" /><br/> + <b>Total posts:</b> <?php echo $posts; ?><br /> + </center> + </p> + + <p> + Welcome, <?php echo $name; ?> (<?php ssi_logout('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?>)<br /> + <b>Inbox:</b> <?php echo $messages; ?><br /> + <b>Unread:</b> <?php echo $unread_messages; ?><br /> + </p> + + </div> + +<?php else: ?> +<?php ssi_login('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); ?> +<?php endif; ?> diff --git a/blocks/mini_calendar/functions.php b/blocks/mini_calendar/functions.php new file mode 100644 index 0000000..ffc98a6 --- /dev/null +++ b/blocks/mini_calendar/functions.php @@ -0,0 +1,195 @@ +<?php +/** + * Bayonet Content Management System + * Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/** + * Note to anyone feeling the need to edit this file... + * You MUST declare $db as global inside your functions in order access MySQL from here. + */ + + /** + * PrintCalendar() - prints the calendar with events + */ + ?> +<script type="text/javascript"> +function openEvent(date) +{ + myWindow = window.open('http://testbed.3rd-infantry-division.org/cms/blocks/mini_calendar/event.php?date='+date+'','','width=300,height=300') + myWindow.focus(); +} +</script> + <?php + function PrintCalendar(){ + + $date = time(); + date_default_timezone_set("America/New_York"); //EASTERN TIME ZONE + + $day = date('d', $date); + $today = date('j', $date); + $month = date('m', $date); + $monthNum = date('n', $date); + $year = date('Y', $date); + + /* Accounts for the last couple days from the previous months */ + $first_day = mktime(0,0,0,$monthNum, 1, $year); + + $title = date('F', $first_day); + + $day_of_week = date('D', $first_day); + + switch($day_of_week){ + case "Sun": $blank = 0; break; + case "Mon": $blank = 1; break; + case "Tue": $blank = 2; break; + case "Wed": $blank = 3; break; + case "Thu": $blank = 4; break; + case "Fri": $blank = 5; break; + case "Sat": $blank = 6; break; + } + + /* calculates the days in the current month */ + $days_in_month = cal_days_in_month(0, $monthNum, $year); + + //makes sure that previous year is not year 0 + if($monthNum == 1){ + $previous_month = 12; + $previous_year = $year-1; + }else{ + $previous_month = $monthNum-1; + $previous_year = $year; + } + //makes sure the next year is not year 13 + if($monthNum == 12){ + $next_month = 1; + $next_year = $year+1; + }else{ + $next_month = $monthNum+1; + $next_year = $year; + } + ?> + <center> + <table class="calendar" style="background-color:white;" cellspacing="1" cellpadding="0"> + <tr style="background-color:#999999; height:20px;"> + <td colspan="50" style="vertical-align:middle; text-align:center;"> + <!-- <a href="?op=calendar&month=<?php echo $previous_month.'&year='.$previous_year; ?>"><<</a> --> + <!-- Month Name and Year --> + <span class="monthTitle"><?php echo strtoupper($title).' '.$year; ?></span> + <!-- <a href="?op=calendar&month=<?php echo $next_month.'&year='.$next_year; ?>">>></a> --> + </td> + </tr> + + <tr> + <th class="weekday">Sun</th><th class="weekday">Mon</th><th class="weekday">Tue</th><th class="weekday">Wed</th> + <th class="weekday">Thu</th><th class="weekday">Fri</th><th class="weekday">Sat</th> + </tr> + + <tr> + <?php + + $day_count = 1; //holds the current day of the week 1-7 + $day_num = 1; //holds the current day of the month 1-31 + + $days_monthbefore = cal_days_in_month(0, $previous_month, $year); + //prints the numbers of days for the previous month + while($blank > 0){ + $blank = $blank-1; + $days_before = $days_monthbefore-$blank; + echo '<td class="cal_notmonth">'.$days_before.'</td>'; //'.$days_before.'</td>'; + $day_count++; + } + +$sqlToday = date("Y-m-d", mktime(0, 0, 0, $monthNum, $today, $year)); +$events = GetEventsOnInterval("{$year}-{$monthNum}-01","{$year}-{$monthNum}-{$days_in_month}"); + + //loop printing each day of the CURRENT month ONLY + while($day_num <= $days_in_month){ + + if($day_count==1 || $day_count==7){ + echo '<td class="cal_weekend">'; //weekends + }else{ + echo '<td class="cal_weekday">'; //weekdays + } + + $sqlDate = date("Y-m-d", mktime(0, 0, 0, $monthNum, $day_num, $year)); + + //checks to see if the current day has events + $isEvent=false; + foreach($events as $event){ + if($event['date'] == $sqlDate){ + $isEvent = true; + if($event['date'] == $sqlToday){ + $todaysEvents[] = $event; + } + } + + } + if($day_num == $today && $isEvent==true){ + echo '<div class="eventtoday">'.$day_num.'</div>'; + }else if($day_num == $today && $isEvent==false){ + echo '<div class="monthtoday">'.$day_num.'</div>'; + }else if($day_num != $today && $isEvent==true){ + echo "<div class=\"event\" onclick=\"openEvent('{$sqlDate}')\">"; + echo $day_num; + echo '</div>'; + }else{ + echo $day_num; + } + + echo '</td>'; + + $day_num++; + $day_count++; + + if($day_count > 7){ + echo '</tr><tr>'; + $day_count = 1; + } + } + + $days_after = 1; + //loop for printing the days for the next month + while($day_count > 1 && $day_count <=7){ + echo '<td class="cal_notmonth">'.$days_after.'</td>'; //'.$days_after.'</td>'; + $days_after++; + $day_count++; + } + + ?> + + </tr> + </table> + </center> +<?php + //list events for today + if(count($todaysEvents)>0){ + echo "<h3>Today's Events</h3>"; + foreach($todaysEvents as $event){ + $time = date("g:i a", strtotime($event['date']." ".$event['time'])); + echo "<span style=\"background-color: {$event['color']}\"> </span> {$event['title']} @ {$time}<br />"; + } + } + } + +function GetEventsOnInterval($start,$end){ + global $db; + $result = $db->Query("SELECT `event_id`, `title`, `color`, `date`, `time` FROM `bayonet_events` WHERE `date` BETWEEN '$start' AND '$end' ORDER BY `time` ASC"); + $events = $db->Fetch($result); + return $events; +} + + ?>
\ No newline at end of file diff --git a/blocks/mini_calendar/index.php b/blocks/mini_calendar/index.php new file mode 100644 index 0000000..c58469b --- /dev/null +++ b/blocks/mini_calendar/index.php @@ -0,0 +1,3 @@ +<link rel="stylesheet" type="text/css" href="blocks/mini_calendar/style.css" media="screen"/> +<?php include 'blocks/mini_calendar/functions.php'; ?> +<?php PrintCalendar(); ?> diff --git a/blocks/mini_calendar/scripts.js b/blocks/mini_calendar/scripts.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/blocks/mini_calendar/scripts.js diff --git a/blocks/mini_calendar/style.css b/blocks/mini_calendar/style.css new file mode 100644 index 0000000..d34db05 --- /dev/null +++ b/blocks/mini_calendar/style.css @@ -0,0 +1,114 @@ +/* START>> CALENDAR STYLES*/
+ .monthTitle{
+ color:black;
+ text-align:center;
+ font-size:12px;
+ font-weight:bold;
+ font-family:arial;
+ }
+ td.weekday {
+ width:40px;
+ height:20px;
+ background-color:#cb2121;
+ color:green;
+ text-align:center;
+ font-size:10px;
+ /* font-weight:bold; */
+ }
+ th.weekday {
+ width:40px;
+ height:29px;
+ background-color:white;
+ color:black;
+ text-align:center;
+ font-size:11px;
+ font-weight:normal;
+ }
+ .monthday {
+ width:40px;
+ height:20px;
+ background-color:#aea2a2;
+ color:white;
+ text-align:left;
+ font-size:10pt;
+ /* font-weight:bold; */
+
+ }
+ .monthtoday {
+ width:38px;
+ height:38px;
+ /* background-color:#3666ba; */
+ color:#225eac;
+ text-align:center;
+ font-size:14px;
+ font-weight:bold;
+ font-family: arial;
+ border:1px solid #333333;
+ }
+ .event {
+ width:38px;
+ height:38px;
+ background-color:#225eac;
+ text-align:center;
+ border:1px solid #333333;
+ cursor: pointer;
+ }
+ table.calendar a, table.calendar a:visited, table.calendar a:active, table.calendar a:hover {
+ color:white;
+ }
+ .eventtoday {
+ width:38px;
+ height:38px;
+ background-color:#225eac;
+ color: white;
+ text-align:center;
+ font-size:14px;
+ font-weight:bold;
+ font-family: arial;
+ border:1px solid #333333;
+ }
+ td.cal_weekday {
+ width:40px;
+ height:40px;
+ background-color:#a1a1a1;
+ vertical-align:top;
+ color:#eeeeee;
+ font-family:arial;
+ text-align:center;
+ font-size:12px;
+ }
+ td.cal_weekend {
+ width:40px;
+ height:40px;
+ background-color:#8f8f8f;
+ vertical-align:top;
+ color:#eeeeee;
+ font-family:arial;
+ text-align:center;
+ font-size:12px;
+ }
+ td.cal_notmonth {
+ width:40px;
+ height:40px;
+ background-color:#6e6e6e;
+ vertical-align:top;
+ color:#d4d4d4;
+ text-align:left;
+ font-size:11px;
+ }
+ div.event_title {
+ font-family: Geneva, Verdana, Arial;
+ font-size: 14px;
+ }
+ div.event_text {
+ font-family: Geneva, Verdana, Arial;
+ font-size: 12px;
+ padding-top: 3px;
+ padding-left: 10px;
+ padding-right: 5px;
+ }
+ div.event_time {
+ font-family: Geneva, Verdana, Arial;
+ font-size: 12px;
+ }
+/* END>> CALENDAR STYLES */
\ No newline at end of file diff --git a/blocks/rss_agw/index.php b/blocks/rss_agw/index.php new file mode 100644 index 0000000..21506bb --- /dev/null +++ b/blocks/rss_agw/index.php @@ -0,0 +1,107 @@ +<link rel="stylesheet" type="text/css" href="blocks/rss_agw/style.css" media="screen"/> +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +// {{{ prerequesists + +/** + * Check to make sure the cURL extension is available to us + */ +if (!extension_loaded('curl')) { + $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : ''; + if (!@dl($prefix . 'curl.' . PHP_SHLIB_SUFFIX)) { + trigger_error('Unable to load the PHP cURL extension.', E_USER_ERROR); + exit; + } +} + +// {{{ constants + +/** + * Armed Global Warfare Feed + */ +define('AGW_FEED', 'http://www.armedglobalwarfare.com/index.php?type=rss;action=.xml;limit=300'); + +/** + * Cache File + */ +define('AGW_CACHE', dirname(__FILE__) . '/rss_cache.xml'); +define('AGW_AGE_CACHE', time() - 3600); + +/** + * Feed Variables + */ +$agwFeed = array(); +$agwXml = null; +$agwProcess = true; + +// }}} + +// {{{ main + +/** + * Check existance of cache + */ +if (file_exists(AGW_CACHE) && (filectime(AGW_CACHE) > AGW_AGE_CACHE)) { + $agwFeed = simplexml_load_file(AGW_CACHE); + $agwProcess = false; +} + +/** + * If we don't have a cache then we'll need to build one + */ +if ($agwProcess === true) { + /** + * Set up global options for cURL to utilize for the transfer. + */ + $options = array(CURLOPT_FORBID_REUSE => true, + CURLOPT_POST => false, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_TIMEOUT => 3, + CURLOPT_USERAGENT => 'Mozilla/5.0 (Compatible; libCURL)', + CURLOPT_VERBOSE => false); + + /** + * Initialize cURL + */ + $agwFeedSource = curl_init(AGW_FEED); + curl_setopt_array($agwFeedSource, $options); + + /** + * Execute cURL container and store the output + */ + $agwFeedOutput = curl_exec($agwFeedSource); + + /** + * Parse the received data + */ + + if (!curl_errno($agwFeedSource)) { + $agwFeed = simplexml_load_string($agwFeedOutput); + $agwXml = new SimpleXMLElement($agwFeedOutput); + + file_put_contents(AGW_CACHE, $agwXml->asXML(), LOCK_EX); + curl_close($agwFeedSource); + } + else { + curl_close($agwFeedSource); + } + + /** + * Check to make sure the results are not empty before proceeding. + */ + if (empty($agwFeed) || !is_object($agwFeed)) $agwFeed = array(); +} + +/** + * Process output + */ +foreach ($agwFeed->channel->item as $item) { + if ($item->category != 'Tournament Announcements') continue; + + echo '<a href="' . $item->link . '" onclick="javascript:window.open(this.href, \'_blank\'); return false;">' . + '<span class="title">' . $item->title . '</span></a><br />' . + '<span class="date">' . $item->pubDate . '</span><br /><br /><hr />' . PHP_EOL; +} +// }}} +?> diff --git a/blocks/rss_agw/style.css b/blocks/rss_agw/style.css new file mode 100644 index 0000000..e9d0824 --- /dev/null +++ b/blocks/rss_agw/style.css @@ -0,0 +1,17 @@ + .rss img {
+ display: none;
+ }
+ .rss span.title{
+ font-size: 10px;
+ font-weight: bold;
+ /* text-decoration:underline; */
+ }
+
+ .rss span.date{
+ font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif;
+ font-size: 11px;
+ text-transform: uppercase;
+ font-weight:bold;
+ text-align: center;
+ letter-spacing: 2px;
+ }
\ No newline at end of file diff --git a/blocks/rudi/index.php b/blocks/rudi/index.php new file mode 100644 index 0000000..da9f4e1 --- /dev/null +++ b/blocks/rudi/index.php @@ -0,0 +1,6 @@ +<ul class="block"> +<li><?php echo LinkModule('rudi',NULL,'Roster'); ?></li> +<li><?php echo LinkModule('rudi','&show=awards','Awards & Medals'); ?></li> +<li><?php echo LinkModule('rudi','&show=ranks','Ranks'); ?></li> +</ul> + diff --git a/blocks/server_monitor/index.php b/blocks/server_monitor/index.php new file mode 100644 index 0000000..791a5b2 --- /dev/null +++ b/blocks/server_monitor/index.php @@ -0,0 +1,16 @@ +<?php + +$feed = fopen("http://module.game-monitor.com/216.245.211.59:28910/data/server.php","r"); +$tmp = fgets($feed); +$server = unserialize($tmp); + +OpenBlock("Game Server"); +echo "<div style=\"margin:5px;\">\n +<a href=\"{$server->link}\">{$server->name}</a><br/>\n +IP: {$server->ip}:{$server->port}<br/>\n +Players: {$server->player}/{$server->maxplayer}<br/>\n +</td></tr>\n +</div>\n"; +CloseBlock(); + +?>
\ No newline at end of file diff --git a/blocks/soldier_info/index.php b/blocks/soldier_info/index.php new file mode 100644 index 0000000..f7ff24c --- /dev/null +++ b/blocks/soldier_info/index.php @@ -0,0 +1,66 @@ +<?php +if($_COOKIE['mybbuser'] != '') +{ + global $db; + $logged_in = 'true'; + + $username = stripslashes($_COOKIE['mybbuser']); + $login_cookie = explode('_', $username); + $result = $db->Query("SELECT `uid`, `username`, `unreadpms`, `totalpms`, `postnum`, `usergroup`, `additionalgroups` FROM `mybb_users` WHERE `uid` = '".$login_cookie['0']."' AND `loginkey` = '".$login_cookie['1']."'"); + $check_num = $db->Rows($result); + if ($check_num != '1') + { + $past = time() - 100; + $logged_in = ''; + setcookie('mybbuser', gone, $past); + header("location: index.php"); + } + while(($row = $db->Fetch($result))!==false) + { + $logged_uid = $row['uid']; + $logged_username = $row['username']; + $avatar_type = $row['avatartype']; + $pm_unread = $row['unreadpms']; + $pm_total = $row['totalpms']; + $postnum = $row['postnum']; + + $main_usergroup = $row['usergroup']; + $add_usergroup = $row['additionalgroups']; + + $add_usergroups= explode(',', $add_usergroup); + } +} +?> + <center> + + Your IP: <?php echo $_SERVER['REMOTE_ADDR']; ?><br /> +<?php + if ($logged_in == 'true'){ +?> + <!-- <img src="<?php echo $avatar; ?>" alt="<?php echo $logged_username; ?>"/><br /><br /> --> + <?php echo $postnum;?> post(s)<br /><br /> + </center> + + Welcome, <?php echo $logged_username; ?> <a href="logout.php">Logout</a><br /> + <hr /> + Private Messages <br /> + Unread: <a href="forums/private.php"><?php echo $pm_unread; ?></a><br /> + Total: <a href="forums/private.php"><?php echo $pm_total; ?></a><br /> + <hr /> +<?php + } + else{ +?> + Welcome Guest.<br /><br /> + + <form method="POST" action=""> + <table> + <tr><td><input type="text" name="username" /></td></tr> + <tr><td><input type="password" name="password" /></td><td><input type="submit" value="Login" /></td></tr> + </table> + </form> + + </center> +<?php + } +?>
\ No newline at end of file diff --git a/blocks/tsviewer/index.php b/blocks/tsviewer/index.php new file mode 100644 index 0000000..fd24fb3 --- /dev/null +++ b/blocks/tsviewer/index.php @@ -0,0 +1,12 @@ +<?php + +/** +* The overlaying css div.content class is messing up the padding of the text. +* Apparently I cannot override this... +*/ +echo "<div style=\"padding:0px; margin: 5px;\">\n"; +$ts = implode('',file("http://www.tsviewer.com/ts_viewer_pur.php?ID=902437&bg=&type=8f8f8f&type_size=11&type_family=5&info=1&channels=1&users=1&type_s_color=000000&type_s_weight=bold&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_color_h=525284&type_s_weight_h=bold&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=underline&type_i_color=000000&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_color_h=525284&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=underline&type_c_color=000000&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_color_h=525284&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=underline&type_u_color=000000&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_color_h=525284&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none")); +echo $ts; +echo "</div>\n"; + +?> |