<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  
  // load viewer library
  $libraryPath = 'cmsb/lib/viewer_functions.php';
  $dirsToCheck = array('/web/sites/greywood/yogamerge.com/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records from 'all_classes'
  list($all_classesRecords, $all_classesMetaData) = getRecords(array(
    'tableName'   => 'all_classes',
    'perPage'     => '10',
    'loadUploads' => true,
    'allowSearch' => true,
		'where'       => "categories = '". mysql_escape($category) ."",
  ));

?>

<!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>
<style>
</style>


<TITLE></TITLE>
 

<script language="JavaScript">
<!--//BEGIN Script
function new_window(url) {

link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=750,height=675,left=80,top=180");

}
//END Script-->
</script>


</head>



<body font face="Verdana, Arial, Helvetica, sans-serif" size="2" text="#000000" link="#000000">

  

<?php foreach ($all_classesRecords as $record): ?>
               
    
<table width="950" table  cellspacing="5" valign="TOP" nowrap>

<tr align="CENTER" bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF">

<Td><font color="white" font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Class</b></Td><td width="950" colspan="3"><b><font color="white" font face="Verdana, Arial, Helvetica, sans-serif" size="2"><?php echo htmlencode($record['title']) ?></b></td></a>

<TD><font color="white" font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><?php echo htmlencode($record['download_price']) ?></b></TD></tr>

<tr>

<td rowspan="4" align="CENTER" valign="TOP">

<a href="<?php echo htmlencode($record['preview_link']) ?>"><?php echo $record['thumb']; ?><font face="Verdana, Arial, Helvetica, sans-serif" font size="2" font color="000000" link="#FFFFFF" vlink="#FFFFFF"><B>PREVIEW</B></a><P>
</TD>





</TD></tr>

<tr>

<td  nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Style: </b><?php echo htmlencode($record['style']) ?></td>

<td  nowrap>

</td>

<td nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Length: </b><?php echo htmlencode($record['class_length']) ?></td>

<td nowrap> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Media: </b><?php echo htmlencode($record['media']) ?></TD>

</tr>

</TR>

<tr>

<td colspan="3" class=desc width="400"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Instructor: </b><?php echo htmlencode($record['instructor']) ?></TD>
<TD noWrap><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>HD: </b><?php echo htmlencode($record['format']) ?></TD></TR>

<tr><td width="1100" colspan="3" class="desc"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Level: </b><?php echo htmlencode($record['class_level']) ?> 
                                     <?php echo htmlencode($record['description']) ?><P>

 	                                    
</td>

<td align="center">

<?php echo $record['add_to_cart']; ?><P>






</tr>

</table>


      
    <?php endforeach ?>

    <?php if (!$all_classesRecords): ?>
      No records were found!<br/><br/>
    <?php endif ?>

<br>
<br>




 
 
</body>
</html>
