Code:<?php
/************************************************************************
* Idle Hour Swim Team Module
* By: Steve Donovan
* http://www.idlehourswimteam.org
* Copyright © 2007 by Idle Hour Swim Club
* License: GNU/GPL
************************************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
//error_reporting (E_ALL|E_STRICT);
error_reporting(E_ALL);
define('INDEX_FILE', TRUE);
$index = 1;
//Required Files
@include_once("header.php");
$module_name = basename(dirname(__FILE__));
@get_lang($module_name);
global $module_name, $db, $prefix, $bgcolor1, $bgcolor2;
switch($op) {
case "roster":
swim_menu('Roster');
break;
case "team_records":
swim_menu('Team Records');
break;
case "pool_records":
swim_menu('Pool Records');
break;
case "swim_meets":
swim_menu('Swim Meets');
break;
case "coaches":
swim_menu('Coaches');
break;
case "board_members":
swim_menu('Board Members');
break;
default:
swim_menu('Information');
break;
}
function tabmenu(){
global $prefix, $db, $bgcolor2, $bgcolor3;
echo "
<style type=\"text/css\">
a.tab {
border-collapse: collapse;
border-style: solid solid none solid;
border-color: $bgcolor2;
border-width: 1px 1px 0px 1px;
background-color: $bgcolor2;
padding: 2px 0.5em 1px 0.5em;
margin-top: 4px;
font-family: arial;
text-decoration: none;
}
a.tab2 {
border-collapse: collapse;
border-style: solid solid solid solid;
border-color: $bgcolor2;
border-width: 1px 1px 1px 1px;
background-color: $bgcolor2;
padding: 2px 0.5em 1px 0.5em;
margin-top: 4px;
font-family: arial;
text-decoration: none;
}
a.tab:hover {
border-color: $bgcolor2;
background-color: $bgcolor3;
text-decoration: none;
text-decoration: bold;
}
a.tab2:hover {
border-color: $bgcolor2;
background-color: $bgcolor3;
text-decoration: none;
text-decoration: bold;
}
.panel { border: solid 1px $bgcolor2; background-color: $bgcolor1; padding: 5px; height: 300px; overflow: none;
text-decoration: none;}
</style>";
?>
<script language="JavaScript" type="text/javascript">
var panels = new Array('panel1', 'panel2', 'panel3', 'panel4', 'panel5', 'panel6', 'panel7', 'panel8','panel9');
var selectedTab = null;
function showPanel(tab, name)
{
if (selectedTab)
{
selectedTab.style.backgroundColor = '<? echo"$bgcolor2";?>';
selectedTab.style.paddingTop = '';
selectedTab.style.paddingBottom = '2px';
}
selectedTab = tab;
selectedTab.style.backgroundColor = '<? echo"$bgcolor3";?>';
selectedTab.style.paddingTop = '4px';
for(i = 0; i < panels.length; i++)
{
document.getElementById(panels[i]).style.display = (name == panels[i]) ? 'block':'none';
}
return false;
}
</script>
<?php
}
/**********************************
* Swim Team Menu
***********************************/
function swim_menu($panel) {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
include("header.php");
OpenTable();
echo "<center><strong>Idle Hour Swim Team</strong></center><br>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel1');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\">Information</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel2');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Team Roster</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel3');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Team Records</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel4');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Pool Records</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel5');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Swim Meets</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel6');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Coaches</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel7');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Board Members</a>";
echo "<a href=\"#\" class=\"tab\" onclick=\"return showPanel(this, 'panel8');\" STYLE=\"text-decoration:none\"><img src=\"modules/Swim_Team/images/folder.gif\" width=\"10\" height=\"10\" border=\"0\"> Join the Team</a>";
if ($panel=="Information"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel1\" $panstyle>";
information();
echo "</div>";
if ($panel=="Roster"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel2\" $panstyle>";
roster();
echo "</div>";
if ($panel=="Team Records"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel3\" $panstyle>";
team_records();
echo "</div>";
if ($panel=="Pool Records"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel4\" $panstyle>";
pool_records();
echo "</div>";
if ($panel=="Swim Meets"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel5\" $panstyle>";
swim_meets();
echo "</div>";
if ($panel=="Coaches"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel6\" $panstyle>";
coaches();
echo "</div>";
if ($panel=="Board Members"){$panstyle="";}else{$panstyle="style=\"display: none\"";}
echo "<div class=\"panel\" id=\"panel7\" $panstyle>";
board_members();
echo "</div>";
CloseTable();
echo "<br>";
echo "<br>";
include("footer.php");
}
/**********************************
* Information
***********************************/
function information() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Information Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Team Roster
***********************************/
function roster() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Roster Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Team Records
***********************************/
function team_records() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Team Records Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Pool Records
***********************************/
function pool_records() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Pool Records Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Swim Meets
***********************************/
function swim_meets() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Swim Meets Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Coaches
***********************************/
function coaches() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Coaches Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
/**********************************
* Board Members
***********************************/
function board_members() {
global $prefix, $db, $bgcolor2, $bgcolor3;
tabmenu();
echo"<table border=\"1\" width=\"100%\" cellpadding=\"3\">";
echo"<tr>"
."<td>Board Members Under Construction</td>"
."</tr>"
."</table>";
include("footer.php");
}
?>
|