<?php require_once('Connections/FMKickers.php'); ?>
<?php
$clinics_find = $FMKickers->newFindCommand('Clinics');
$clinics_findCriterions = array('clinicId'=>'*',);
foreach($clinics_findCriterions as $key=>$value) {
    $clinics_find->AddFindCriterion($key,$value);
}

fmsSetPage($clinics_find,'clinics',10); 

$clinics_result = $clinics_find->execute(); 

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

fmsSetLastPage($clinics_result,'clinics',10); 

$clinics_row = current($clinics_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>Our Clinics </h1>
    <p>

    <table name="results_table" style="background-color: #000000; " cellspacing="1" width="400">
      <tr>
        <th style="background-color: #64AB62;">Clinic Name</th>
        <th style="background-color: #64AB62;">Description</th>
        <th style="background-color: #64AB62;">Price</th>
        <th style="background-color: #64AB62;">&nbsp;</th>
      </tr>
      <?php foreach($clinics_result->getRecords() as $clinics_row){ ?>
        <tr>
          <td style="background-color: #FFFFFF;"><?php echo $clinics_row->getField('clinicName'); ?></td>
          <td style="background-color: #FFFFFF;"><?php echo $clinics_row->getField('clinicDescription'); ?></td>
          <td style="background-color: #FFFFFF;"><?php echo $clinics_row->getField('clinicPrice'); ?></td>
          <td style="background-color: #FFFFFF;"><a href="clinic_detail.php?clinicId=<?php echo $clinics_row->getField('clinicId'); ?>">details</a></td>
        </tr>
        <?php } ?>
    </table>
    </p></td>
  </tr>
  
  <tr>
    <td colspan="2"><img src="Images/footer.jpg" width="760" height="24"></td>
  </tr>
</table>
</body>
</html>
