$title = ' › ' . $category['TITLE']; $can_use = $exceptions_RET[$file][1]['CAN_USE']; $can_edit = $exceptions_RET[$file][1]['CAN_EDIT']; echo "<TR><TD></TD><TD></TD>"; echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox id=can_use[" . str_replace('.', '_', $file) . "] name=can_use[" . str_replace('.', '_', $file) . "] value=true" . ($can_use == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>"; echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox id=can_edit[" . str_replace('.', '_', $file) . "] name=can_edit[" . str_replace('.', '_', $file) . "] value=true" . ($can_edit == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>"; echo "<TD bgcolor=#DDDDDD> {$title}</TD></TR><TR><TD></TD><TD></TD><TD colspan=3 height=1 bgcolor=#000000></TR>"; } } } else { echo '<TR><TD></TD><TD></TD><TD bgcolor=#FFFFFF colspan=3 align=center><small><b>- ' . $title . ' -</b></small></TD></TR>'; } } } echo '<TR><TD colspan=5 align=center height=20></TD></TR>'; } echo '</TABLE>'; PopTable('footer'); echo '<CENTER>' . SubmitButton(_('Save'), '', 'class=btn_medium') . '</CENTER>'; echo '</DIV>'; echo '</TD></TR></TABLE>'; echo '</FORM>'; echo '<DIV id=new_id_content style="position:absolute;visibility:hidden;">' . _('Title') . ' <INPUT type=text name=new_profile_title><BR>'; echo 'Type <SELECT name=new_profile_type><OPTION value=admin>' . _('Administrator') . '<OPTION value=teacher>Teacher<OPTION value=parent>Parent</SELECT></DIV>'; } elseif (UserStaffID() && $staff_RET[1]['PROFILE_ID']) { $profile_title = DBGet(DBQuery('SELECT TITLE FROM user_profiles WHERE ID=\'' . $staff_RET[1]['PROFILE_ID'] . '\'')); echo '<BR>'; PopTable('header', 'Error', 'width=50%'); echo '<TABLE><TR><TD><IMG SRC=assets/warning_button.gif width=30></TD><TD>' . $staff_RET[1]['FIRST_NAME'] . ' ' . $staff_RET[1]['LAST_NAME'] . '' . _(' is assigned to the profile ') . '' . $profile_title[1]['TITLE'] . '.<BR><BR> ' . _('To assign permissions to this user, either change the permissions for this profile using the') . ' ' . ProgramLink('Users/Profiles.php', '' . _('Profiles') . '') . _(' setup program or change this user to a User with custom permissions using the') . ' ' . ProgramLink('Users/User.php', '' . _('General Info') . '') . _('program') . '</TD></TR></TABLE>'; PopTable('footer'); }
$can_use = $exceptions_RET[$file][1]['CAN_USE']; $can_edit = $exceptions_RET[$file][1]['CAN_EDIT']; echo "<TR><TD></TD><TD></TD>"; echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_use[" . str_replace('.', '_', $file) . "] value=true" . ($can_use == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>"; echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_edit[" . str_replace('.', '_', $file) . "] value=true" . ($can_edit == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>"; echo "<TD bgcolor=#DDDDDD> {$title}</TD></TR><TR><TD></TD><TD></TD><TD colspan=3 height=1 bgcolor=#000000></TR>"; } } } else { echo '<TR><TD></TD><TD></TD><TD bgcolor=#FFFFFF colspan=3 align=center><small><b>- ' . $title . ' -</b></small></TD></TR>'; } } } echo '<TR><TD colspan=5 align=center height=20></TD></TR>'; } echo '</TABLE>'; PopTable('footer'); echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>'; echo '</DIV>'; echo '</TD></TR></TABLE>'; echo '</FORM>'; echo '<DIV id=new_id_content style="position:absolute;visibility:hidden;">' . _('Title') . ' <INPUT type=text name=new_profile_title><BR>'; echo _('Type') . ' <SELECT name=new_profile_type><OPTION value=admin>' . _('Administrator') . '<OPTION value=teacher>' . _('Teacher') . '<OPTION value=parent>' . _('Parent') . '</SELECT></DIV>'; } else { $profile_title = DBGet(DBQuery("SELECT TITLE FROM USER_PROFILES WHERE ID='" . $staff_RET[1]['PROFILE_ID'] . "'")); echo '<BR>'; PopTable('header', _('Error'), 'width=50%'); echo '<TABLE><TR><TD><IMG SRC=assets/warning_button.gif width=30></TD><TD>' . sprintf(_('%s %s is assigned to the profile %s.'), $staff_RET[1]['FIRST_NAME'], $staff_RET[1]['LAST_NAME'], $profile_title[1]['TITLE']) . '<BR><BR> ' . sprintf(_('To assign permissions to this user, either change the permissions for this profile using the %s setup or change this user to a user with custom permissions by using %s.'), ProgramLink('Users/Profiles.php', _('Profiles')), ProgramLink('Users/User.php', _('General Info'))) . '</TD></TR></TABLE>'; PopTable('footer'); } }
DBQuery("DELETE FROM STUDENT_REPORT_CARD_GRADES WHERE STUDENT_ID='" . UserStudentID() . "' AND COURSE_PERIOD_ID='" . $course_period_id . "'"); DBQuery("DELETE FROM STUDENT_REPORT_CARD_COMMENTS WHERE STUDENT_ID='" . UserStudentID() . "' AND COURSE_PERIOD_ID='" . $course_period_id . "'"); DBQuery("DELETE FROM ATTENDANCE_PERIOD WHERE STUDENT_ID='" . UserStudentID() . "' AND COURSE_PERIOD_ID='" . $course_period_id . "'"); } else { DBQuery("DELETE FROM ATTENDANCE_PERIOD WHERE STUDENT_ID='" . UserStudentID() . "' AND COURSE_PERIOD_ID='" . $course_period_id . "' AND (" . ($columns['START_DATE'] ? "SCHOOL_DATE<'" . $columns['START_DATE'] . "'" : 'FALSE') . ' OR ' . ($columns['END_DATE'] ? "SCHOOL_DATE>'" . $columns['END_DATE'] . "'" : 'FALSE') . ")"); } } } } unset($_SESSION['_REQUEST_vars']['schedule']); unset($_REQUEST['schedule']); } if (UserStudentID() && $_REQUEST['modfunc'] != 'choose_course') { echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=modify METHOD=POST>"; DrawHeader(PrepareDate($date, '_date', false, array('submit' => true)) . ' ' . CheckBoxOnclick('include_inactive') . _('Include Inactive Courses') . (AllowEdit() ? ' ' . CheckBoxOnclick('include_seats') . _('Show Open Seats') : ''), SubmitButton(_('Save'))); DrawHeader(ProgramLink('Scheduling/PrintSchedules.php', _('Print Schedule'), '&modfunc=save&st_arr[]=' . UserStudentID() . '&_CENTRE_PDF=true')); /* $schedule_fields_RET = DBGet(DBQuery("SELECT cf.TITLE,s.CUSTOM_71 FROM CUSTOM_FIELDS cf,STUDENTS s WHERE s.STUDENT_ID='".UserStudentID()."' AND cf.ID='71'")); if($schedule_fields_RET[1]['TITLE']=='Team') DrawHeader('<font color=gray><b>'.$schedule_fields_RET[1]['TITLE'].': </b></font>'.$schedule_fields_RET[1]['CUSTOM_71']); */ // get the fy marking period id, there should be exactly one fy marking period $fy_id = DBGet(DBQuery("SELECT MARKING_PERIOD_ID FROM SCHOOL_MARKING_PERIODS WHERE MP='FY' AND SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'")); $fy_id = $fy_id[1]['MARKING_PERIOD_ID']; $sql = "SELECT\n\t\t\t\ts.COURSE_ID,s.COURSE_PERIOD_ID,\n\t\t\t\ts.MARKING_PERIOD_ID,s.START_DATE,s.END_DATE,\n\t\t\t\textract(EPOCH FROM s.START_DATE) AS START_EPOCH,extract(EPOCH FROM s.END_DATE) AS END_EPOCH,sp.PERIOD_ID,\n\t\t\t\tcp.PERIOD_ID,cp.MARKING_PERIOD_ID AS COURSE_MARKING_PERIOD_ID,cp.MP,cp.CALENDAR_ID,cp.TOTAL_SEATS,\n\t\t\t\tc.TITLE,cp.COURSE_PERIOD_ID AS PERIOD_PULLDOWN,\n\t\t\t\ts.STUDENT_ID,ROOM,DAYS,SCHEDULER_LOCK\n\t\t\tFROM SCHEDULE s,COURSES c,COURSE_PERIODS cp,SCHOOL_PERIODS sp\n\t\t\tWHERE\n\t\t\t\ts.COURSE_ID = c.COURSE_ID AND s.COURSE_ID = cp.COURSE_ID\n\t\t\t\tAND s.COURSE_PERIOD_ID = cp.COURSE_PERIOD_ID\n\t\t\t\tAND s.SCHOOL_ID = sp.SCHOOL_ID AND s.SYEAR = c.SYEAR AND sp.PERIOD_ID = cp.PERIOD_ID\n\t\t\t\tAND s.STUDENT_ID='" . UserStudentID() . "'\n\t\t\t\tAND s.SYEAR='" . UserSyear() . "'\n\t\t\t\tAND s.SCHOOL_ID = '" . UserSchool() . "'"; if ($_REQUEST['include_inactive'] != 'Y') { $sql .= " AND ('" . $date . "' BETWEEN s.START_DATE AND s.END_DATE OR (s.END_DATE IS NULL AND s.START_DATE<='" . $date . "')) "; } $sql .= " ORDER BY sp.SORT_ORDER,s.MARKING_PERIOD_ID"; $QI = DBQuery($sql); $schedule_RET = DBGet($QI, array('TITLE' => '_makeTitle', 'PERIOD_PULLDOWN' => '_makePeriodSelect', 'COURSE_MARKING_PERIOD_ID' => '_makeMPSelect', 'SCHEDULER_LOCK' => '_makeLock', 'START_DATE' => '_makeDate', 'END_DATE' => '_makeDate'));