include ($_SERVER['DOCUMENT_ROOT']."/inc/config.php");
include ($_SERVER['DOCUMENT_ROOT']."/inc/header1.php");
if ($ses_AuthLevel >= $AuthLevel_BoardBottom) {
?>
Team Managers - echo $Year; ?>
################################################################################################
include ($_SERVER['DOCUMENT_ROOT']."/inc/sql_connect.php");
$GroupIDYear = substr("$GroupID", 0, 4);
$GroupIDClass = substr("$GroupID", 4, 1);
$GroupID = $GroupIDYear.$GroupIDClass."%";
// Create SQL statement
$sql = "SELECT People.*, Positions.*, PositionTypes.*, Groups.*
FROM People, Positions, PositionTypes, Groups
WHERE Positions.PeopleID = People.PeopleID AND Positions.PositionID = PositionTypes.PositionID AND Groups.GroupID = Positions.GroupID AND GroupType LIKE 'Team' AND GroupYear = $Year AND Positions.PositionID = '40'
ORDER BY Groups.GroupListOrder, PositionTypes.PositionOrder, LastName, FirstName ASC";
include ($_SERVER['DOCUMENT_ROOT']."/inc/sql_execute.php");
$numrows = mysql_num_rows($sql_result);
// Format results by row
while ($row = mysql_fetch_array($sql_result))
{
$GroupName = $row["GroupName"];
$GroupChar = $row["GroupChar"];
$GroupColor = $row["GroupColor"];
$GroupSong = $row["GroupSong"];
$GroupYear = $row["GroupYear"];
$GroupDivAge = $row["GroupDivAge"];
$GroupDivName = $row["GroupDivName"];
$GroupListOrder = $row["GroupListOrder"];
$CellOne = $row["GroupID"];
$CellOne = $GroupDivAge." Team ".substr("$CellOne", 5, 1);
$LastName = $row["LastName"];
$FirstName = $row["FirstName"];
$NickName = $row["NickName"];
include ($DocRoot."/inc/common_name_process.inc.php");
$EMailName = $row["EMailName"];
$Street = $row["Street"];
$Street2 = $row["Street2"];
$City = $row["City"];
$State = $row["State"];
$PostalCode = $row["PostalCode"];
$PostalCode5 = substr("$PostalCode", 0, 5);
$PostalCodePlus4 = substr("$PostalCode", 5, 4);
$PostalCode = $PostalCode5;
if ($PostalCodePlus4) {$PostalCode .= "-".$PostalCodePlus4;}
if ($Street) {$Addr = $Street;}
if ($Street2) {$Addr .= " - ".$Street2;}
$Addr .= " ";
if ($City) {$Addr .= $City.", ";}
if ($State) {$Addr .= $State;}
if ($PostalCode) {$Addr .=" ".$PostalCode;}
$Phone1Type = $row["Phone1Type"];
$Phone1 = $row["Phone1"];
$Phone1AC = substr("$Phone1", 0, 3);
$Phone1Prefix = substr("$Phone1", 3, 3);
$Phone1Suffix = substr("$Phone1", 6, 4);
$Phone1Ext = substr("$Phone1", 10, 10);
if ($Phone1) {
if ($Phone1Type) {
$Phone1Dsp = "[".$Phone1Type."] ";
}
$Phone1Dsp .= $Phone1AC."-".$Phone1Prefix."-".$Phone1Suffix;
if ($Phone1Ext) {$Phone1Dsp .= " x-".$Phone1Ext;}
}
$Phone2Type = $row["Phone2Type"];
$Phone2 = $row["Phone2"];
$Phone3Type = $row["Phone3Type"];
$Phone3 = $row["Phone3"];
$Phone2AC = substr("$Phone2", 0, 3);
$Phone2Prefix = substr("$Phone2", 3, 3);
$Phone2Suffix = substr("$Phone2", 6, 4);
$Phone2Ext = substr("$Phone2", 10, 10);
if ($Phone2) {
if ($Phone2Type) {
$Phone2Dsp = "[".$Phone2Type."] ";
}
$Phone2Dsp .= $Phone2AC."-".$Phone2Prefix."-".$Phone2Suffix;
if ($Phone2Ext) {$Phone2Dsp .= " x-".$Phone2Ext;
}
}
$Phone3AC = substr("$Phone3", 0, 3);
$Phone3Prefix = substr("$Phone3", 3, 3);
$Phone3Suffix = substr("$Phone3", 6, 4);
$Phone3Ext = substr("$Phone3", 10, 10);
if ($Phone3) {
if ($Phone3Type) {
$Phone3Dsp = "[".$Phone3Type."] ";
}
$Phone3Dsp .= $Phone3AC."-".$Phone3Prefix."-".$Phone3Suffix;
if ($Phone3Ext) {$Phone3 .= " x-".$Phone3Ext;}
}
// Cell Formatting
$CellThree = $Phone1Dsp;
if ($Phone2Dsp) {$CellThree .= " ".$Phone2Dsp;}
if ($Phone3Dsp) {$CellThree .= " ".$Phone3Dsp;}
$CellTwo = "$FullName";
if ($Addr) {
$CellTwo .=" ".$Addr;
}
if ($EMailName) {
$CellFour = $EMailName;
}
// -------------------------------- End Cell Formatting --------------------------------
// Display Section
?>