Exemplo n.º 1
0
                            $sql[] = "DELETE FROM schedule WHERE COURSE_ID='{$course['COURSE_ID']}'";
                            $sql[] = "DELETE FROM schedule_requests WHERE COURSE_ID='{$course['COURSE_ID']}'";
                        }
                    }
                    foreach ($sql as $query) {
                        DBQuery($query);
                    }
                    unset($_REQUEST['modfunc']);
                    unset($_REQUEST['subject_id']);
                }
            }
        }
    }
    if ($_REQUEST['course_period_id']) {
        if (DeletePromptCommon($table)) {
            if (BlockDelete($table)) {
                foreach ($sql as $query) {
                    DBQuery($query);
                }
                unset($_REQUEST['modfunc']);
                unset($_REQUEST['course_period_id']);
            }
        }
    }
}
if ($_REQUEST['modfunc'] == 'enter_standards') {
    //***********insertion of standard for course******
    if ($_REQUEST['process'] == 'update') {
        $stand_added = 0;
        foreach ($_REQUEST['stand_arr'] as $key => $st_value) {
            $check_stand_for_course = DBGet(DBQuery('SELECT * FROM course_standards WHERE SYEAR="' . UserSyear() . '" AND COURSE_ID="' . $_REQUEST['course_id'] . '" AND SCHOOL_ID="' . UserSchool() . '" AND STANDARD_ID="' . $st_value . '" AND STANDARD_TYPE="' . $_REQUEST['STANDARD_TYPE'] . '" '));
Exemplo n.º 2
0
            echo '<FORM action=Modules.php?modname=' . strip_tags(trim($_REQUEST['modname'])) . ' method=POST>';
            echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
            echo "<br><br>";
            DrawHeaderHome('<IMG SRC=assets/check.gif> &nbsp; A new school called <strong>' . GetSchool(UserSchool()) . '</strong> has been created. To finish the operation, click OK button.', '<INPUT  type=submit value=OK class="btn_medium">');
            echo '<input type="hidden" name="copy" value="done"/>';
            echo '</FORM>';
        }
    } else {
        $_REQUEST['modfunc'] = '';
    }
    unset($_SESSION['_REQUEST_vars']['values']);
    unset($_SESSION['_REQUEST_vars']['modfunc']);
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'update' && clean_param($_REQUEST['button'], PARAM_ALPHAMOD) == 'Delete' && User('PROFILE') == 'admin') {
    if (DeletePrompt('school')) {
        if (BlockDelete('school')) {
            DBQuery('DELETE FROM schools WHERE ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_gradelevels WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM attendance_calendar WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_periods WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_years WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_semesters WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_quarters WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('DELETE FROM school_progress_periods WHERE SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('UPDATE staff SET CURRENT_SCHOOL_ID=NULL WHERE CURRENT_SCHOOL_ID=\'' . UserSchool() . '\'');
            DBQuery('UPDATE staff SET SCHOOLS=replace(SCHOOLS,\',' . UserSchool() . ',\',\',\')');
            unset($_SESSION['UserSchool']);
            echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
            unset($_REQUEST);
            $_REQUEST['modname'] = "schoolsetup/Schools.php?new_school=true";
            $_REQUEST['new_school'] = true;