<?php
	require_once('config.php');
	
	$date = date("Y-m-d");
	$datetime = date("Y-m-d H:i:s");
	
	//Connect to mysql server
	$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	
	//Select database
	$db = mysql_select_db(DB_DATABASE);
	if(!$db) {
		die("Unable to select database");
	}		
	
?>

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<META HTTP-EQUIV='EXPIRES' CONTENT='Sun, 05 Dec 2010 18:36:53 GMT'>
<title>Fayetteville Half Marathon -- Flash Results, Inc.</title>

<style type="text/css">
A.link:visited { text-decoration:none; color: #000000; }
A.link { text-decoration:none; color:#000000; }
A.link:hover { text-decoration:none; color:#000000; }

A.info:visited { text-decoration:underline; color: #000000; }
A.info { text-decoration:underline; color:#000000; }
A.info:hover { text-decoration:none; color:#000000; }

.outside td { border-right:solid 1px #d5d5d5;border-left:solid 1px #d5d5d5; }

.bottom td { border-top:solid 1px #d5d5d5; }

.bottominside td { border-top:solid 0px #d5d5d5; }

.noborder td { border-left:solid 0px #d5d5d5;border-right:solid 0px #d5d5d5; }
</style>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="loadPracticeData();">

<table width='100%' bgcolor='#d31145' border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>

    	<td width='100%'>

        
        	<table width='1000' align='center'>
            	<tr>
            		<td width='350' align='left'>
                    <font face='calibri' color='#ffffff' size='+1'><b>Fayetteville Half Marathon</b></font>
            		</td>

            		<td width='100' align='center' onMouseOver="this.style.backgroundColor='#faa6bc'" onMouseOut="this.style.backgroundColor='#d31145'">

                    <a href='http://www.flashresults.com/2011_Meets/rr/FayettevilleHalf/' class='link'>
                    <font face='calibri' color='#ffffff'>Home</font>

                    </a>
            		</td>


            		<td width='150' align='center' onMouseOver="this.style.backgroundColor='#faa6bc'" onMouseOut="this.style.backgroundColor='#d31145'">
                    <a href='http://www.flashresults.com/2011_Meets/rr/FayettevilleHalf/entry/' class='link'>
                    <font face='calibri' color='#ffffff'>Entries</font>

                    </a>
            		</td>

            		<td width='150' align='center' onMouseOver="this.style.backgroundColor='#faa6bc'" onMouseOut="this.style.backgroundColor='#d31145'">
                    <a href='http://www.flashresults.com/2011_Meets/rr/FayettevilleHalf/results/' class='link'>
                    <font face='calibri' color='#ffffff'>Results</font>
                    </a>
            		</td>

            		<td width='150' align='center' onMouseOver="this.style.backgroundColor='#faa6bc'" onMouseOut="this.style.backgroundColor='#d31145'">
                    <a href='http://www.flashresults.com/2011_Meets/rr/FayettevilleHalf/leaderboards/' class='link'>

                    <font face='calibri' color='#ffffff'>Leaderboard</font>
                    </a>
            		</td>

            		<td width='150' align='center' onMouseOver="this.style.backgroundColor='#faa6bc'" onMouseOut="this.style.backgroundColor='#d31145'">
                    <a href='http://www.flashresults.com/2011_Meets/rr/FayettevilleHalf/athletetracking/' class='link'>

                    <font face='calibri' color='#ffffff'>Athlete Tracking</font>
                    </a>

            		</td>

            	</tr>
            </table>
        
        
        </td>
    </tr>

</table>


<table width='1000' align='center' class='outside'>
	<tr>
		<td width='100%'>


			<table width='99%' class='noborder' border='0' align='center'>
            	<tr>
                	<td width='500' valign='top'>
                       <br />  
                       
			<table width='99%' class='noborder' border='0' align='center'>
            	<tr>
                	<td valign='top'>                        



<?php
	if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) {
		echo '<ul class="err">';
		foreach($_SESSION['ERRMSG_ARR'] as $msg) {
			echo '<li>',$msg,'</li>'; 
		}
		echo '</ul>';
		unset($_SESSION['ERRMSG_ARR']);
	}
?>


<form id="addMeet" name="addMeet" method="post" action="SearchResultsMarathon-view.php">

<table width='500'>
<tr>
<td width='500' valign='top'>



  <table width="500" border="0" align="center" cellpadding="2" cellspacing="0">
  
    <tr>
      <td colspan='2'><font face='calibri' size='+3'>Search for Result -- Half Marathon</font></td>
    </tr>
  
    <tr>
      <th align='left'><font face='calibri'>First Name </th>
      <td align='left'><input name="fname" type="text" class="textfield" id="fname" /></td>
    </tr>
    <tr>
      <th align='left'><font face='calibri'>Last Name </th>
      <td align='left'><input name="lname" type="text" class="textfield" id="lname" /></td>
    </tr>
    
    
    <tr>
      <th align='left'><font face='calibri'>Gender </th>
      
      <td align='left'>
          <select id="sex" name="sex" class="dropdown" />
                    <option value="">Select a Gender</option>
                    <option value="M">Male</option>
                    <option value="F">Female</option>
			</select>      
      
      </td>
      
    </tr>    
    
    
    <tr>
      <th align='left'><font face='calibri'>City </th>
      <td align='left'><input name="city" type="text" class="textfield" id="city" /></td>
    </tr>
 
     <tr>
      <th align='left'><font face='calibri'>State </th>
      <td align='left'>
            <select id="country" name="country" class="country" />
                    <option value="">Select a State</option>
  
<?php
                    
$result99 = mysql_query("SELECT * FROM runnermaster Group By State");

while($row99 = mysql_fetch_array($result99))
  {

  echo "<option value='" . $row99['State'] . "'>" . $row99['State'] . "</option>";
  
  }                    

?>                                    
                    
                    
			</select>  
      
      </td>
    </tr>  
 
  
    
    <tr>
      <th align='left'><font face='calibri'>Division </th>
      <td align='left'>
            <select id="division" name="division" class="division" />
                    <option value="">Select a Division</option>
  
<?php
                    
$result97 = mysql_query("SELECT * FROM runnermaster Group By Division");

while($row97 = mysql_fetch_array($result97))
  {

  echo "<option value='" . $row97['Division'] . "'>" . $row97['Division'] . "</option>";
  
  }                    

?>                                    
                    
                    
			</select>  
      
      </td>
    </tr>

<input type='hidden' name='l' value='0'>
<input type='hidden' name='h' value='100'>
    
    
    <tr>
      <td colspan='2' align='center'><br><br><input type="submit" name="Submit" value="Search Results" class="button"/></td>
    </tr>
  </table>
</form>

</td>
</tr>
</table>



                    </td>                  
                </tr>
             </table>              
                    
                    </td>
                    
                    <td width='500' valign='top' align='center'>
                    
   <br /><br />                 

                    
                    </td>
                </tr>
           </table>
							





<br /><br /><br />





		</td>
	</tr>
</table>





<table width='100%' border="0" cellspacing="0" cellpadding="0" align="center" class='bottom'>
	<tr>
    	<td width='100%'>
        
        	<table width='1000' align='center' class='bottominside'>
            	<tr>
            		<td width='50%' align='left'>
                    <font face='calibri' color='#b1b1b1'>Flash Results, Inc.</font>
            		</td>
             		<td width='50%' align='right'>
                    <img src='ipico.jpg' />&nbsp;&nbsp;<img src='lynx.jpg' />
            		</td>
            	</tr>
            	<tr>
            		<td width='1000' align='center' colspan='2'>
                    <font face='calibri' color='#b1b1b1' size='-1'>Results are the property of Flash Results, Inc and can not be reproduced in any way without the express written consent of Flash Results, Inc. <b>Copyright © 2010 Flash Results, Inc.</b></font>
            		</td>
            	</tr>

            </table>
        
        
        </td>
    </tr>

</table>

</body>
</html>
