<?php error_reporting(E_ALL); $errors = array(); if (isset($_GET['classSchedId'])) { $classSchedId = $_GET['classSchedId']; } $chooseState = getAllState($dbconn); $majorCat = getMajorCategories($dbconn); $subCat = getSubCategories($dbconn); $schedClass = getSchClassAllInfo($dbconn, $classSchedId); $numReg = getCountParticipants($dbconn, $classSchedId); $contactId = $schedClass['contactId']; $allTrLocate = getAllTrLocations($dbconn, $contactId); $datetime = strtotime($schedClass['classDateTime']); $date = date('M/d/Y', $datetime); $time = date('h:i a', $datetime); try { if (isset($_POST['edit'])) { if ($_POST['classMaxParticipants'] < $numReg['total']) { $errors['classMaxParticipants'] = "You have more students registered than your new maximum number."; } //validators if (!is_numeric($_POST['classPrice'])) { $errors['classPrice'] = "Numbers only please"; } if (!is_numeric($_POST['classMaxParticipants'])) { $errors['classMaxParticipants'] = "Numbers only please"; } //Location validators if ($_POST['location'] == 'new') {
} ?> <div id="rightBot"> <?php echo "<h2>" . $focus['firstName'] . "'s Classes</h2>"; ?> <br/> <div id="trclasspanel"> <?php foreach ($classes as $rowSch) { $datetime = strtotime($rowSch['classDateTime']); $date = date('M/d/Y', $datetime); $time = date('h:i a', $datetime); $classSchedId = $rowSch['classSchedId']; $numReg = getCountParticipants($dbconn, $rowSch['classSchedId']); ?> <div id="trClasspanelscontainer"> <div id="tr1">Class Name: <a href="class.php?classSchedId=<?php echo $rowSch['classSchedId']; ?> &zip=<?php echo $rowSch['zip']; ?> " class="reg" title="See more" ><?php echo $rowSch['className']; ?> </a></div> <div id="td1">Price: $<?php echo $rowSch['classPrice']; ?>