コード例 #1
0
ファイル: index.php プロジェクト: giuliaforsythe/AChecker
                exit;
            } else {
                if (isset($_GET['add'], $_GET['id'])) {
                    if (is_array($_GET['id'])) {
                        if ($_GET['list'] == 'pre') {
                            foreach ($_GET['id'] as $pre_check_id) {
                                $checkPrerequisitesDAO->Create($_GET['cid'], $pre_check_id);
                            }
                        }
                        if ($_GET['list'] == 'next') {
                            foreach ($_GET['id'] as $next_check_id) {
                                $testPassDAO->Create($_GET['cid'], $next_check_id);
                            }
                        }
                        if ($_GET['list'] == 'guideline') {
                            $guidelinesDAO->addChecks($_GET['gid'], $_GET['id']);
                        }
                        if ($_GET['list'] == 'group') {
                            $guidelineGroupsDAO->addChecks($_GET['ggid'], $_GET['id']);
                        }
                        if ($_GET['list'] == 'subgroup') {
                            $guidelineSubgroupsDAO->addChecks($_GET['gsgid'], $_GET['id']);
                        }
                        $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
                        // force refresh parent window
                        $javascript_run_now = '<script language="JavaScript">
<!--
window.opener.location.href = window.opener.location.href;
//-->
</script>';
                    }
コード例 #2
0
    header('Location: index.php');
    exit;
} else {
    if (isset($_POST['save_no_close']) || isset($_POST['save_and_close']) || $_POST['javascript_submit']) {
        if (isset($gid)) {
            $guidelinesDAO->update($gid, $_POST['user_id'], $_POST['title'], $_POST['abbr'], $_POST['long_name'], $_POST['published_date'], $_POST['earlid'], '', $_POST['status'], $_POST['open_to_public']);
        } else {
            $gid = $guidelinesDAO->Create($_SESSION['user_id'], $_POST['title'], $_POST['abbr'], $_POST['long_name'], $_POST['published_date'], $_POST['earlid'], '', $_POST['status'], $_POST['open_to_public']);
            if (intval($gid) == 0) {
                unset($gid);
            }
        }
        if (!$msg->containsErrors()) {
            // add checks
            if (is_array($_POST['add_checks_id'])) {
                $guidelinesDAO->addChecks($gid, $_POST['add_checks_id']);
            }
            $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
        }
        if (isset($_POST['save_and_close'])) {
            header('Location: index.php');
            exit;
        } else {
            if (isset($gid)) {
                header('Location: create_edit_guideline.php?id=' . $gid);
                exit;
            }
        }
    } else {
        if (isset($_POST['remove'])) {
            foreach ($_POST as $name => $value) {