}
    }
    echo $strcombo = '</select>';
    ?>
 
								
								&nbsp;&nbsp;<a href="ADAthleteCatagoryAdd.php">Add New</a>
								
								</td>
								
								</tr>
								<?php 
}
#Code for paging
$page->set_page_data('', $db1->num_rows(), 100, 5, true, false, true);
$page->set_qry_string($queryString);
$query = $page->get_limit_query($query);
//return the query with limits
$db1->query($query);
$db1->next_record();
if ($db1->num_rows() > 0) {
    #check for record availability
    echo '<tr><td align="center" class="normalblack_12" width="4%">&nbsp;</td>
							   		<td align="left" class="normalblack_12" width="8%">&nbsp;<strong>S.No.</strong></td>
									<td align="left" class="normalblack_12" width="25%">&nbsp;<strong>Category Name</strong></td>
                                    <td align="left" class="normalblack_12" width="15%">&nbsp;<strong>Category (Initials)</strong></td>
                                   ';
    echo '<td class="normalblack_12" width="5%" align="center"><strong>Edit</strong></td>';
    echo '<td class="normalblack_12" width="7%" align="center"><strong>Delete</strong></td>';
    echo '<td class="normalblack_12" width="7%" align="center"><strong>View</strong></td>';
    echo '</tr>';
    $query = " Select * from " . TBL_HS_AAU_TEAM_NAME . " where fldStatus=1";
} else {
    $query = "Select * from " . TBL_HS_AAU_TEAM_NAME . " where " . $srchCond;
}
$db->query($query);
$db->next_record();
$totalPages = $db->num_rows();
if ($totalPages > 0) {
    ?>

								<tr> <td align="left" style="padding-left:7px;"colspan="10"><input type="checkbox" id="check_all" name="check_all" value="" onclick="javascript:checkAll();"> <b>Check All</b>&nbsp; &nbsp;<input type="button" name="delete" value="Delete Selected" onclick="return submitDeleteAll();"></td></tr>
								<?php 
}
#Code for paging
$page->set_page_data('', $db->num_rows(), 100, 5, true, false, true);
$page->set_qry_string($queryString);
$query = $page->get_limit_query($query);
//return the query with limits
//echo $query;
//echo $queryString;
$db->query($query);
$db->next_record();
if ($db->num_rows() > 0) {
    #check for record availability
    echo '<tr><td align="center" class="normalblack_12" width="4%">&nbsp;</td>
							   		<td align="left" class="normalblack_12" width="8%">&nbsp;<strong>S.No.</strong></td>
							   		
							   		
									<td align="left" class="normalblack_12" width="25%">&nbsp;<strong>HS AAU Team Name</strong></td>
                                   ';
    echo '<td class="normalblack_12" width="5%" align="center"><strong>Edit</strong></td>';
    echo "<p><label>To: </label><span>{$fullname}</span></p>";
    echo "<p><label>Subject:</label><span>{$Subject}</span></p>";
    echo "<p><label>Message:</label><span style='line-height:18px;'>{$Message}</span></p>";
    $Subjectnew = str_replace(" ", "%", $Subject);
    echo "<p style='padding-top:10px;height:50px;line-height:18px;display:none;'><a href=Athmessage.php?action=compose&to={$fullname}&subject=RE: {$Subjectnew}&Usertypefrom={$Usertypefrom}&newfrom={$UserTo} class='mailaction'>Forward Message</a></p>";
}
////////////////////////////Viewssent///////////////////////////////
////////////////////////////Biginning Inbox///////////////////////////////
if ($action == inbox || $action == '') {
    $selquery = "select * from " . TBL_MAIL . " where UserTo='{$username}' and status!='delete' and visible = 'ACTIVE' order by mail_id DESC";
    $db->query($selquery);
    $db->next_record();
    $totalPages = $db->num_rows();
    #Code for paging
    $page->set_page_data('', $db->num_rows(), 20, 5, true, false, true);
    $page->set_qry_string($selquery);
    $selquery = $page->get_limit_query($selquery);
    //return the query with limits
    $db->query($selquery);
    $db->next_record();
    if ($db->num_rows() == '0') {
        if ($_REQUEST['msg'] == '') {
            echo '<div class="thankyoumessage">Your Inbox is Empty!</div>';
        }
    } else {
        #echo "<h3 class='black'>Inbox</h3>";
        echo "<table cellpadding=2 cellspacing=1 width='100%'  align='center'>";
        echo '<tr>                                    
                                    <td align="left" class="normalblack_12" width="10%"><strong>Date</strong></td>
                                    <td align="left" class="normalblack_12" width="45%"><strong>Subject</strong></td>
                                    <td align="left" class="normalblack_12" width="30%"><strong>From User</strong></td>
	<body>
		<?php 
include 'header.php';
?>
		<!--middle panel starts from here -->
		<!--content panel starts from here -->
		<div class="container">
			<div class="innerWraper">
				<div class="middle-bg">
					<div class="cantener">
						<div class="register-main">
							<div class="registerPage">
								<h1>Find Colleges for Your Network</h1>
								<table cellspacing="2" cellpadding="5" bordercolor="#808080" border="0" width="100%" class="tablePadd" style="border-collapse: collapse;">
									<tr>
										<td align='center' colspan='4' height='30' valign='middle' width="100%"><font class="thankyoumessage"><?php 
if ($_REQUEST['msg'] != "") {
    echo $_REQUEST['msg'];
} else {
    echo " ";
}
?>
</font></td>
									</tr>
									<tr>
										<td align="right"   colspan='4' height='30' valign='middle'>
										<form name="searchFrm" id="searchFrm" action="<?php 
echo $PHP_SELF;
?>
"  method="POST">
											<input type="hidden" name="page" id="page" value="0">
if ($_REQUEST['division'] == 'DivisionI') {
    echo '<option value="DivisionI" selected="selected">Division I</option>';
} else {
    echo '<option value="DivisionI">Division I</option>';
}
if ($_REQUEST['division'] == 'DivisionII') {
    echo '<option value="DivisionII" selected="selected">Division II</option>';
} else {
    echo '<option value="DivisionII">Division II</option>';
}
if ($_REQUEST['division'] == 'DivisionIII') {
    echo '<option value="DivisionIII" selected="selected">Division III</option>';
} else {
    echo '<option value="DivisionIII">Division III</option>';
}
if ($_REQUEST['division'] == 'NAIA') {
    echo '<option value="NAIA" selected="selected">NAIA</option>';
} else {
    echo '<option value="NAIA">NAIA</option>';
}
if ($_REQUEST['division'] == 'JUCO') {
    echo '<option value="JUCO" selected="selected">JUCO</option>';
} else {
    echo '<option value="JUCO">JUCO</option>';
}
echo '</select>';
?>
</span>
								</p>
								<?php 
if ($_REQUEST['mode'] == "div") {
 $where .= AthleteSearchHelper::getMajorCond($fldIntendedMajor);
 $where .= AthleteSearchHelper::getSchoolCond($fldSchool);
 $where .= AthleteSearchHelper::getStateCond($fldState);
 $where .= AthleteSearchHelper::getSchoolsInDistance($fldZipCode, $fldDistance);
 $query = $select . $where;
 // creates pagination
 if (!$db->query($query)) {
     die(mysql_error() . '<br>' . $query);
 }
 $page = new Page();
 $page->set_page_data('', $db->num_rows(), 10, 5, true, false, true);
 $data = $_GET;
 unset($data['page']);
 unset($data['submit']);
 if (count($data) > 0) {
     $page->set_qry_string(http_build_query($data));
 }
 $query = $page->get_limit_query($query);
 // retrieves athletes matching search critera from the
 // database and parses the results to be redered to the page
 if (!$db->query($query)) {
     die(mysql_error() . '<br>' . $query);
 }
 if ($db->num_rows() == 0) {
     $isError = TRUE;
     $errorMsg = 'We currently do not have any available athletes meeting ' . 'your search criteria. Please broaden the criteria to find ' . 'the athlete you are looking for.';
 }
 while ($db->next_record()) {
     $a = new Athlete();
     $a->gradClass = htmlentities($db->f('fldClass'));
     $a->fname = htmlentities($db->f('fldFirstname'));
        $db->next_record();
        $count++;
    }
    #show pagination
    echo '<tr><td align="right" class="normalblack_12x" colspan="5">';
    echo '</td></tr>';
}
echo '</form></table></span>';
?>

									</div>
									<div style="background: none repeat scroll 0 0 #FFFFFF;
									border: 1px solid #DBDBDB;
									min-height: 120px;
									margin-top:11px;
									width: 567px;float:right">
									<form name="frmUsers_need" action="" method="post" onsubmit="">
									<span class="gernal">Coach's Needs</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />
									<?php 
if ($_REQUEST['page'] == '') {
    $pageno = '0';
} else {
    $pageno = $_REQUEST['page'];
}
if ($_SESSION['mode'] == 'college') {
    ?>

									<a href="#" onclick="window.open('collegeneed.php','windowname1', 'width=665, height=650'); return false;">Add Needs</a>
									<?php 
}
?>