|
|
|
@ -98,6 +98,7 @@ else |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == 'GET') |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -140,7 +141,7 @@ else |
|
|
|
|
|
|
|
|
|
$form = createForm($doc, "classes.php"); |
|
|
|
|
$input = createHiddenInput($doc, 'class_id', (string)$row['id']); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
$input->setAttribute('type', 'hidden'); |
|
|
|
|
$input->setAttribute('name', 'class_id'); |
|
|
|
|
$input->setAttribute('value', $row['id']); */ |
|
|
|
@ -151,7 +152,7 @@ else |
|
|
|
|
if ($status === "Confirmed" || $status === "Registered") |
|
|
|
|
{ |
|
|
|
|
$input = createSubmitInput($doc, 'withdraw', $text0020); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
$input->setAttribute('type', 'submit'); |
|
|
|
|
$input->setAttribute('name', 'withdraw'); |
|
|
|
|
$input->setAttribute('value', 'Withdraw');*/ |
|
|
|
@ -160,7 +161,7 @@ else |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$input = createSubmitInput($doc, 'register', $text0021); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
/* $input = $doc->createElement('input'); |
|
|
|
|
$input->setAttribute('type', 'submit'); |
|
|
|
|
$input->setAttribute('name', 'register'); |
|
|
|
|
$input->setAttribute('value', 'Register'); */ |
|
|
|
@ -174,6 +175,44 @@ else |
|
|
|
|
else |
|
|
|
|
$body->appendChild(generateTrainingTable($doc, 'classes.php')); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
if (isset($_GET['course_id'])) |
|
|
|
|
{ |
|
|
|
|
/* |
|
|
|
|
* Get with no class_id, display table |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
$courseID = (int) cleanInput($_GET['course_id']); |
|
|
|
|
$courseDiv = createDiv($doc, 'FloatLeft50Div'); |
|
|
|
|
|
|
|
|
|
$dbh = returnDatabaseHandel(); |
|
|
|
|
$sth = $dbh->prepare($statement289); |
|
|
|
|
if ($sth->execute(array($courseID))) |
|
|
|
|
{ |
|
|
|
|
$count = 0; |
|
|
|
|
while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
|
|
|
|
{ |
|
|
|
|
$count++; |
|
|
|
|
//print ("bonk"); |
|
|
|
|
|
|
|
|
|
$h3 = $doc->createElement('h3'); |
|
|
|
|
$h3->appendChild($doc->createTextNode("Course ID: " . $row['id'])); |
|
|
|
|
$courseDiv->appendChild($h3); |
|
|
|
|
//$body->appendChild(generateTrainingTable($doc, 'classes.php')); |
|
|
|
|
|
|
|
|
|
$h3 = $doc->createElement('h3'); |
|
|
|
|
$h3->appendChild($doc->createTextNode("Course Title: " . $row['name'])); |
|
|
|
|
$courseDiv->appendChild($h3); |
|
|
|
|
|
|
|
|
|
$h3 = $doc->createElement('h3'); |
|
|
|
|
$h3->appendChild($doc->createTextNode("Course Description: " . $row['description'])); |
|
|
|
|
$courseDiv->appendChild($h3); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$body->appendChild($courseDiv); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
/* |
|
|
|
@ -181,6 +220,7 @@ else |
|
|
|
|
*/ |
|
|
|
|
$body->appendChild(generateTrainingTable($doc, 'classes.php')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
catch (Exception $e) |
|
|
|
|
{ |
|
|
|
|