+++ /dev/null
-<?php\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require (AT_INCLUDE_PATH.'vitals.inc.php');\r
-authenticate(AT_PRIV_CERTIFY);\r
-\r
-if (isset($_POST['delete'], $_POST['certify_id'])) \r
-{\r
- // DELETE\r
-\r
- header('Location: certify_delete.php?certify_id='.$_POST['certify_id']);\r
- exit;\r
-\r
-} \r
-else if (isset($_POST['edit'], $_POST['certify_id'])) \r
-{\r
- // EDIT\r
-\r
- header('Location: certify_certificate.php?certify_id='.$_POST['certify_id']);\r
- exit;\r
-} \r
-else if (isset($_POST['tests'], $_POST['certify_id'])) \r
-{\r
- // TESTS\r
- header('Location: certify_tests.php?certify_id='.$_POST['certify_id']);\r
- exit;\r
-} \r
-else if (isset($_POST['students'], $_POST['certify_id'])) \r
-{\r
- // STUDENTS\r
- header('Location: certify_student_status.php?certify_id='.$_POST['certify_id']);\r
- exit;\r
-} \r
-else if (!empty($_POST) && !isset($_POST['certify_id'])) {\r
- $msg->addError('NO_ITEM_SELECTED');\r
-}\r
-\r
-// Fetch all tests for course\r
-$sql = "SELECT certify_id, title, description FROM ".TABLE_PREFIX."certify WHERE course_id=".$_SESSION['course_id'];\r
-$result = mysql_query($sql, $db) or die(mysql_error());\r
-\r
-$certificates = array();\r
-\r
-while( $row = mysql_fetch_assoc($result) ) {\r
- $certificates[] = $row;\r
-}\r
-\r
-// if there are no certificates, print meldingen under, else ikke\r
-//$msg->printInfos('CERTIFY_NO_CERTIFICATES'); \r
-\r
-require (AT_INCLUDE_PATH.'header.inc.php');\r
-\r
-?>\r
-\r
-<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
-<table class="data" summary="" rules="cols">\r
-\r
-<thead>\r
-<tr>\r
- <th scope="col"> </th>\r
- <th scope="col"><?php echo _AT('certify_title'); ?></a></th>\r
- <th scope="col"><?php echo _AT('certify_description'); ?></a></th>\r
-</tr>\r
-</thead>\r
-\r
-<tfoot>\r
-<tr>\r
- <td colspan="3">\r
- <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> \r
- <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" />\r
- <input type="submit" name="tests" value="<?php echo _AT('certify_edit_tests'); ?>" />\r
- <input type="submit" name="students" value="<?php echo _AT('certify_student_status'); ?>" />\r
- </td>\r
-</tr>\r
-</tfoot>\r
-\r
-<tbody>\r
- <?php foreach ($certificates as $certificate) { ?>\r
- <tr>\r
- <td><input type="radio" name="certify_id" value="<?php echo $certificate['certify_id']; ?>" id="" /></td>\r
- \r
- <td><label for=""><?php echo $certificate['title']; ?></label></td> \r
- \r
- <td><?php echo $certificate['description']; ?></td>\r
- </tr>\r
- \r
- <?php } ?>\r
- <?php if (count($certificates)==0) { ?>\r
-\r
- <tr>\r
- <td colspan="3"><?php echo _AT('none_found'); ?></td>\r
- </tr>\r
- \r
- <?php } ?>\r
-\r
-</tbody>\r
-</table>\r
-</form>\r
-\r
-\r
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file