Exemple #1
0
    if (isset($_GET['gsgid'])) {
        $page_string .= htmlspecialchars(SEP) . 'gsgid=' . intval($_GET['gsgid']);
    }
}
// Called by "create/edit checks": add pre-requisite checks, add next checks,
//           "create/edit guidelined", add checks into guideline or group.
// only list the checks that are not in the pre-requisite checks, or next checks, or guideline, or group
if (isset($_GET['list'])) {
    if ($_GET['list'] == 'pre') {
        $existing_rows = $checkPrerequisitesDAO->getPreChecksByCheckID($_GET['cid']);
    }
    if ($_GET['list'] == 'next') {
        $existing_rows = $testPassDAO->getNextChecksByCheckID($_GET['cid']);
    }
    if ($_GET['list'] == 'guideline') {
        $existing_rows = $checksDAO->getGuidelineLevelChecks($_GET['gid']);
    }
    if ($_GET['list'] == 'group') {
        $existing_rows = $checksDAO->getGroupLevelChecks($_GET['ggid']);
    }
    if ($_GET['list'] == 'subgroup') {
        $existing_rows = $checksDAO->getChecksBySubgroupID($_GET['gsgid']);
    }
    // get checks that are open to public and not in guideline
    unset($str_existing_checks);
    if (is_array($existing_rows)) {
        foreach ($existing_rows as $existing_row) {
            $str_existing_checks .= $existing_row['check_id'] . ',';
        }
        $str_existing_checks = substr($str_existing_checks, 0, -1);
    }
    echo _AC('yes');
} else {
    echo _AC('no');
}
?>
</span></td>
		</tr>
	</table>
	
	<h2><br /><?php 
echo _AC('checks');
?>
</h2><br />
<?php 
// display guideline level checks
$guidelineLevel_checks = $checksDAO->getGuidelineLevelChecks($gid);
if (is_array($guidelineLevel_checks)) {
    $num_of_checks += count($guidelineLevel_checks);
    dispaly_check_table($guidelineLevel_checks);
}
// display named guidelines and their checks
$named_groups = $guidelineGroupsDAO->getNamedGroupsByGuidelineID($gid);
if (is_array($named_groups)) {
    foreach ($named_groups as $group) {
        ?>
	<h3><?php 
        echo _AC($group['name']);
        ?>
</h3><br/>
<?php 
        // get group level checks: the checks in subgroups without subgroup names