<?php require_once('Connections/FMKickers.php'); ?>
<?php
$clinic_find = $FMKickers->newFindCommand('Clinics');
$clinic_findCriterions = array('clinicId'=>'=='.fmsEscape($_REQUEST['clinicId']),);
foreach($clinic_findCriterions as $key=>$value) {
    $clinic_find->AddFindCriterion($key,$value);
}

fmsSetPage($clinic_find,'clinic',10); 

$clinic_result = $clinic_find->execute(); 

if(FileMaker::isError($clinic_result)) fmsTrapError($clinic_result,"error.php"); 

fmsSetLastPage($clinic_result,'clinic',10); 

$clinic_row = current($clinic_result->getRecords());

 
 // FMStudio v1.0 - do not remove comment, needed for DreamWeaver support ?>
<!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="Content-Type" content="text/html; charset=iso-8859-1">
<title>FM Kickers</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table align="CENTER" width="750" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2"><img src="Images/fmkickers.png" width="760" height="152"></td>
  </tr>
  <tr>
    <td width="169" bgcolor="#D1D1D1" valign="TOP"><img src="Images/header1.jpg" width="169" height="140">      <p><a href="index.php">All Clinics<br />
    </a><a href="user_clinics.php">My Registrations  </a></p></td>
    <td class="main_area" width="587" valign="TOP"><h1><?php echo $clinic_row->getField('clinicName'); ?></h1>
    <p>
      <?php foreach($clinic_result->getRecords() as $clinic_row){ ?>
    <table name="clinic_table" style="background-color: #000000; width: 400px;" cellspacing="1">
        <tr>
          <th style="background-color: #62A960;">Name</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicName'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">Description</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicDescription'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">Start Date</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicStartDate'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">End Date</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicEndDate'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">Schedule</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicSchedule'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">Instructor</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicInstructor'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">Price</th>
          <td style="background-color: #FFFFFF;"><?php echo $clinic_row->getField('clinicPrice'); ?></td>
        </tr>
        <tr>
          <th style="background-color: #62A960;">&nbsp;</th>
          <td style="background-color: #FFFFFF;"><a href="registration.php?clinicId=<?php echo $clinic_row->getField('clinicId'); ?>">Register for this Clinic</a></td>
        </tr>
        </table>
    <?php } ?></p></td>
  </tr>
  
  <tr>
    <td colspan="2"><img src="Images/footer.jpg" width="760" height="24"></td>
  </tr>
</table>
</body>
</html>
