本文整理汇总了PHP中DrawBC函数的典型用法代码示例。如果您正苦于以下问题:PHP DrawBC函数的具体用法?PHP DrawBC怎么用?PHP DrawBC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DrawBC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DrawBC
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
$cp_id = $_REQUEST['cp_id'];
if (UserStaffID() || $_REQUEST['staff_id']) {
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&dt=1&pr=1 method=POST>";
}
DrawBC(_('Users') . " >" . _('Teacher Programs') . "");
###########################################
if (UserStaffID() || $_REQUEST['staff_id']) {
if ($_REQUEST['modfunc'] != 'save' && $_REQUEST[modname] != 'Users/TeacherPrograms.php?include=Attendance/Missing_Attendance.php' && $_REQUEST[modname] != 'Users/TeacherPrograms.php?include=Attendance/TakeAttendance.php') {
//if(UserStudentID())
// echo '<IMG SRC=assets/pixel_trans.gif height=2>';
if ($_REQUEST['staff_id']) {
$RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME FROM staff WHERE STAFF_ID=\'' . $_REQUEST['staff_id'] . '\''));
} else {
$RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME FROM staff WHERE STAFF_ID=\'' . UserStaffID() . '\''));
}
$count_staff_RET = DBGet(DBQuery('SELECT COUNT(*) AS NUM FROM staff'));
if ($count_staff_RET[1]['NUM'] > 1) {
DrawHeaderHome('' . _('Selected User') . ': ' . $RET[1]['FIRST_NAME'] . ' ' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>' . _('Deselect') . '</font></A>) | <A HREF=Modules.php?modname=' . $_REQUEST['modname'] . '&search_modfunc=list&next_modname=Users/User.php&ajax=true&bottom_back=true&return_session=true target=body>' . _('Back to User List') . '</A>');
} else {
DrawHeaderHome('' . _('Selected User') . ': ' . $RET[1]['FIRST_NAME'] . ' ' . $RET[1]['LAST_NAME'] . ' (<A HREF=Side.php?staff_id=new&modcat=' . $_REQUEST['modcat'] . '><font color=red>' . _('Deselect') . '</font></A>)');
示例2: DrawBC
#
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../RedirectModulesInc.php';
DrawBC("Extracurricular > " . ProgramTitle());
Widgets('activity');
Widgets('course');
Widgets('eligibility');
Search('student_id', $extra);
if ($_REQUEST['modfunc'] == 'add' || $_REQUEST['student_id']) {
if ($_REQUEST['student_id']) {
$RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME,MIDDLE_NAME,NAME_SUFFIX FROM students WHERE STUDENT_ID=\'' . $_REQUEST['student_id'] . '\''));
} else {
$RET = DBGet(DBQuery('SELECT FIRST_NAME,LAST_NAME,MIDDLE_NAME,NAME_SUFFIX FROM students WHERE STUDENT_ID=\'' . UserStudentID() . '\''));
}
$count_student_RET = DBGet(DBQuery('SELECT COUNT(*) AS NUM FROM students'));
if ($count_student_RET[1]['NUM'] > 1) {
DrawHeaderHome('Selected Student: ' . $RET[1]['FIRST_NAME'] . ' ' . ($RET[1]['MIDDLE_NAME'] ? $RET[1]['MIDDLE_NAME'] . ' ' : '') . $RET[1]['LAST_NAME'] . ' ' . ' (<A HREF=Side.php?student_id=new&modcat=' . clean_param($_REQUEST['modcat'], PARAM_NOTAGS) . '><font color=red>Search Again</font></A>) | <A HREF=Modules.php?modname=' . clean_param($_REQUEST['modname'], PARAM_NOTAGS) . '&search_modfunc=list&next_modname=Students/Student.php&ajax=true&bottom_back=true&return_session=true target=body>Back to Student List</A>');
} else {
if ($count_student_RET[1]['NUM'] == 1) {
示例3: PDFstop
echo '<td width="33.3%" height="86" align="center" valign="middle"> </td>';
$cols++;
}
if ($cols == $max_cols) {
echo '</tr>';
}
echo '</table>';
}
PDFstop($handle);
} else {
BackPrompt(_('No Students were found.'));
}
}
}
if (!$_REQUEST['modfunc']) {
DrawBC("" . _('Students') . " >> " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
echo "<FORM action=for_export.php?modname={$_REQUEST['modname']}&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_search_all_schools={$_REQUEST['_search_all_schools']}" . (User('PROFILE') == 'admin' ? "&w_course_period_id_which={$_REQUEST['w_course_period_id_which']}&w_course_period_id={$_REQUEST['w_course_period_id']}" : '') . "&_openSIS_PDF=true method=POST target=_blank>";
//$extra['header_right'] = '<INPUT type=submit value=\'Create Labels for Selected Students\'>';
$extra['extra_header_left'] = '<TABLE style="margin-top:-30px;">';
$extra['extra_header_left'] .= '<TR><TD><b>' . _('Include on Labels:') . '</b></TD></TR>';
if (User('PROFILE') == 'admin') {
if ($_REQUEST['w_course_period_id_which'] == 'course_period' && $_REQUEST['w_course_period_id']) {
$course_RET = DBGet(DBQuery('SELECT CONCAT(s.FIRST_NAME,' . ' ' . ',s.LAST_NAME) AS TEACHER,cp.ROOM FROM staff s,course_periods cp WHERE s.STAFF_ID=cp.TEACHER_ID AND cp.COURSE_PERIOD_ID=\'' . $_REQUEST[w_course_period_id] . '\''));
$extra['extra_header_left'] .= '<TR><TD><INPUT type=checkbox name=teacher value=Y>' . _('Teacher') . ' (' . $course_RET[1]['TEACHER'] . ')</TD></TR>';
$extra['extra_header_left'] .= '<TR><TD><INPUT type=checkbox name=room value=Y>' . _('Room') . ' (' . $course_RET[1]['ROOM'] . ')</TD></TR>';
} else {
$extra['extra_header_left'] .= '<TR><TD><INPUT type=checkbox name=teacher value=Y>' . _('Attendance Teacher') . '</TD></TR>';
$extra['extra_header_left'] .= '<TR><TD><INPUT type=checkbox name=room value=Y>' . _('Attendance Room') . '</TD></TR>';
}
} else {
示例4: DrawBC
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
include 'modules/Grades/config.inc.php';
DrawBC("GradeBook >> " . ProgramTitle());
$mp_RET = DBGet(DBQuery('SELECT MP FROM course_periods WHERE course_period_id = \'' . UserCoursePeriod() . '\''));
if ($mp_RET[1]['MP'] == 'SEM') {
$sem = GetParentMP('SEM', UserMP());
$pros = GetChildrenMP('PRO', UserMP());
}
if ($mp_RET[1]['MP'] == 'FY') {
$sem = GetParentMP('SEM', UserMP());
if ($sem) {
$fy = GetParentMP('FY', $sem);
} else {
$fy = GetParentMP('FY', UserMP());
}
$pros = GetChildrenMP('PRO', UserMP());
}
if ($mp_RET[1]['MP'] == 'QTR') {
示例5: DBGet
} else {
$select_stu = DBGet(DBQuery("SELECT FIRST_NAME,LAST_NAME FROM STUDENTS WHERE STUDENT_ID='" . $student_id . "'"));
$select_stu = $select_stu[1]['FIRST_NAME'] . " " . $select_stu[1]['LAST_NAME'];
$clash .= $select_stu . "<br>";
}
}
unset($_REQUEST['modfunc']);
unset($_SESSION['MassSchedule.php']);
} else {
//BackPrompt('You must choose a Course');
ShowErr('You must choose a Course');
for_error();
}
}
if ($_REQUEST['modfunc'] != 'choose_course') {
DrawBC("Scheduling > " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
echo "<FORM name=sav id=sav action=Modules.php?modname={$_REQUEST['modname']}&modfunc=save method=POST>";
#DrawHeader('',SubmitButton('Add Course to Selected Students'));
PopTable_wo_header('header');
echo '<TABLE><TR><TD>Course to Add</TD><TD><DIV id=course_div>';
if ($_SESSION['MassSchedule.php']) {
$course_title = DBGet(DBQuery("SELECT TITLE FROM COURSES WHERE COURSE_ID='" . $_SESSION['MassSchedule.php']['course_id'] . "'"));
$course_title = $course_title[1]['TITLE'];
$period_title = DBGet(DBQuery("SELECT TITLE FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='" . $_SESSION['MassSchedule.php']['course_period_id'] . "'"));
$period_title = $period_title[1]['TITLE'];
echo "{$course_title} - {$_REQUEST['course_weight']}<BR>{$period_title}";
}
echo '</DIV>' . "<A HREF=# onclick='window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=choose_course\",\"\",\"scrollbars=yes,resizable=yes,width=800,height=400\");'>Choose a Course</A></TD></TR>";
echo '<TR><TD>Start Date</TD><TD>' . PrepareDate(DBDate(), '') . '</TD></TR>';
echo '<TR><TD>Marking Period</TD><TD>';
示例6: DrawLogo
echo "<tr><td width=105>" . DrawLogo() . "</td><td style=\"font-size:15px; font-weight:bold; padding-top:20px;\">" . GetSchool(UserSchool()) . "<div style=\"font-size:12px;\">User Advanced Report</div></td><td align=right style=\"padding-top:20px;\">" . ProperDate(DBDate()) . "<br />Powered by openSIS</td></tr><tr><td colspan=3 style=\"border-top:1px solid #333;\"> </td></tr></table>";
echo "<table >";
include 'modules/miscellaneous/UserExport.php';
}
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'call') {
$_SESSION['st_arr'] = $_REQUEST['st_arr'];
echo "<FORM action=ForExport.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&head_html=Staff+Advanced+Report&modfunc=save&search_modfunc=list&_openSIS_PDF=true&_dis_user={$_REQUEST['_dis_user']}&_search_all_schools={$_REQUEST['_search_all_schools']} method=POST target=_blank>";
echo '<DIV id=fields_div></DIV>';
echo '<br/>';
include 'modules/miscellaneous/UserExport.php';
echo '<BR><CENTER><INPUT type=submit value=\'Create Report for Selected users\' class=btn_xxlarge></CENTER>';
echo "</FORM>";
}
if (!$_REQUEST['modfunc'] || $_REQUEST['modfunc'] == 'list') {
DrawBC("users >> " . ProgramTitle());
if ($_REQUEST['modfunc'] == 'list') {
$extra['columns_after'] = array('LAST_LOGIN' => 'Last Login');
$extra['functions'] = array('LAST_LOGIN' => 'makeLogin');
$extra['SELECT'] = ',LAST_LOGIN,CONCAT(\'<INPUT type=checkbox name=st_arr[] value=\',s.STAFF_ID,\' checked>\') AS CHECKBOX';
$extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller checked onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
$extra['options']['search'] = false;
echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=call method=POST>";
echo '<DIV id=fields_div></DIV>';
if ($_REQUEST['_dis_user']) {
echo '<INPUT type=hidden name=_dis_user value=' . strip_tags(trim($_REQUEST['_dis_user'])) . '>';
}
if ($_REQUEST['_search_all_schools']) {
echo '<INPUT type=hidden name=_search_all_schools value=' . strip_tags(trim($_REQUEST['_search_all_schools'])) . '>';
}
Search('staff_id', $extra);
示例7: unset
unset($_REQUEST['modfunc']);
unset($_SESSION['_REQUEST_vars']['staff']);
unset($_SESSION['_REQUEST_vars']['modfunc']);
if (User('STAFF_ID') == $_REQUEST['staff_id']) {
unset($_openSIS['User']);
echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
}
}
$extra['SELECT'] = ',LAST_LOGIN';
$extra['columns_after'] = array('LAST_LOGIN' => 'Last Login');
$extra['functions'] = array('LAST_LOGIN' => 'makeLogin');
if (basename($_SERVER['PHP_SELF']) != 'index.php') {
if ($_REQUEST['staff_id'] == 'new') {
DrawBC("Users > Add a User");
} else {
DrawBC("Users > " . ProgramTitle());
}
SearchStaff('staff_id', $extra);
} else {
DrawHeader('Create Account');
}
if ($_REQUEST['modfunc'] == 'delete' && basename($_SERVER['PHP_SELF']) != 'index.php' && AllowEdit()) {
# ------------------------------------ For Certification Start ------------------------------------------- #
if (DeletePrompt('certification')) {
DBQuery("DELETE FROM staff_certification WHERE STAFF_CERTIFICATION_ID='{$_REQUEST['certification_id']}'");
unset($_REQUEST['modfunc']);
$_REQUEST['certification_id'] = 'new';
}
}
if ((UserStaffID() || $_REQUEST['staff_id'] == 'new') && (basename($_SERVER['PHP_SELF']) != 'index.php' || !$_REQUEST['staff']['USERNAME']) && $_REQUEST['modfunc'] != 'delete' && $_SESSION['fn'] != 'user' && $_REQUEST['modfunc'] != 'remove') {
if ($_REQUEST['modfunc'] != 'delete' || $_REQUEST['delete_ok'] == '1') {
示例8: DrawHeaderHome
} else {
$header .= '<TD><b>' . 'No Parent Course Selected' . '</b><br>Parent Course' . '</TD>';
}
$header .= '<TD><b>' . $periods_RET[1]['START_TIME'] . '</b><br>Start Time' . '</TD>';
$header .= '<TD><b>' . $periods_RET[1]['END_TIME'] . '</b><br>End Time' . '</TD><td></td>';
$header .= '</TR>';
$header .= '</TABLE>';
DrawHeaderHome($header);
}
echo "</div></div></div><div class='tab_footer'>";
} else {
unset($_SESSION['_REQUEST_vars']['subject_id']);
unset($_SESSION['_REQUEST_vars']['course_id']);
unset($_SESSION['_REQUEST_vars']['course_weight']);
unset($_SESSION['_REQUEST_vars']['course_period_id']);
DrawBC("Courses > " . ProgramTitle());
if ($_REQUEST['print'] != 'list') {
echo PopTable('header', 'Quick Search');
}
#echo "<FORM id='search' name='search' method=POST action=Modules.php?modname=$_REQUEST[modname]>";
if ($_REQUEST['print'] != 'list') {
echo "<FORM name=search id=search action=for_export.php?modname={$_REQUEST['modname']}&modfunc=print&marking_period_id=" . $_REQUEST['marking_period_id'] . "&_openSIS_PDF=true&report=true&print=list method=POST target=_blank>";
echo '<table width=100%><tr><td align="center"><INPUT type=submit class=btn_medium value=\'Print\'></td></tr></table>';
echo '<TABLE align=left cellpadding="5" border="0"><TR>';
echo '<TD valign=top align=left>';
}
$mp_RET = DBGet(DBQuery("SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,'2' FROM SCHOOL_QUARTERS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,'1' FROM SCHOOL_SEMESTERS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' UNION SELECT MARKING_PERIOD_ID,TITLE,SHORT_NAME,'0' FROM SCHOOL_YEARS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY 3,4"));
unset($options);
if (count($mp_RET)) {
foreach ($mp_RET as $key => $value) {
if ($value['MARKING_PERIOD_ID'] == $_REQUEST['marking_period_id']) {
示例9: ListOutput
if (count($RET)) {
echo '<p><font color=#FF0000><b>Warning!!</b></font> - You have students with food service balance below $5.00 - please deposit at least the Minimum Deposit into you children\'s accounts.';
ListOutput($RET, array('FULL_NAME' => 'Student', 'GRADE_ID' => 'Grade', 'ACCOUNT_ID' => 'AccountID', 'BALANCE' => 'Balance', 'DEPOSIT' => 'Minimum Deposit'), 'Student', 'Students', array(), array(), array('save' => false, 'search' => false));
echo '</p>';
}
// warn if negative food service balance
$staff = DBGet(DBQuery('SELECT (SELECT STATUS FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS,(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE FROM STAFF s WHERE s.STAFF_ID=' . User('STAFF_ID')));
$staff = $staff[1];
if ($staff['BALANCE'] && $staff['BALANCE'] < 0) {
echo '<p><font color=#FF0000><b>Warning!!</b></font> - You have a <b>negative</b> food service balance of <font color=#FF0000>' . $staff['BALANCE'] . '</font></p>';
}
}
#echo '<p> Happy parenting...</p>';
break;
case 'student':
DrawBC($welcome . ' | Role: Student');
$notes_RET = DBGet(DBQuery("SELECT s.TITLE AS SCHOOL,pn.PUBLISHED_DATE,pn.TITLE,pn.CONTENT FROM PORTAL_NOTES pn,SCHOOLS s WHERE pn.SYEAR='" . UserSyear() . "' AND pn.START_DATE<=CURRENT_DATE AND (pn.END_DATE>=CURRENT_DATE OR pn.END_DATE IS NULL) AND pn.SCHOOL_ID='" . UserSchool() . "' AND position(',0,' IN pn.PUBLISHED_PROFILES)>0 AND s.ID=pn.SCHOOL_ID ORDER BY pn.SORT_ORDER,pn.PUBLISHED_DATE DESC"), array('PUBLISHED_DATE' => 'ProperDate', 'CONTENT' => '_nl2br'));
if (count($notes_RET)) {
echo '<p>';
ListOutput($notes_RET, array('PUBLISHED_DATE' => 'Date Posted', 'TITLE' => 'Title', 'CONTENT' => 'Note'), 'Note', 'Notes', array(), array(), array('save' => false, 'search' => false));
echo '</p>';
}
$events_RET = DBGet(DBQuery("SELECT TITLE,SCHOOL_DATE,DESCRIPTION FROM CALENDAR_EVENTS WHERE SCHOOL_DATE BETWEEN CURRENT_DATE AND CURRENT_DATE+30 AND SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'"), array('SCHOOL_DATE' => 'ProperDate'));
if (count($events_RET)) {
echo '<p>';
ListOutput($events_RET, array('TITLE' => 'Event', 'SCHOOL_DATE' => 'Date', 'DESCRIPTION' => 'Description'), 'Upcoming Event', 'Upcoming Events', array(), array(), array('save' => false, 'search' => false));
echo '</p>';
}
//echo '<p> Happy learning...</p>';
break;
}
示例10: DrawHeaderHome
echo '<FORM action=Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=' . $_REQUEST['modfunc'] . '&month=' . $_REQUEST['month'] . '&year=' . $_REQUEST['year'] . ' METHOD=POST>';
DrawHeaderHome(PrepareDateSchedule($start_date, 'start') . ' <div style="float:left;"> -  </div> ' . PrepareDateSchedule($end_date, 'end') . ' <A HREF=Modules.php?modname=' . $_REQUEST['modname'] . '&month=' . $_REQUEST['month'] . '&year=' . $_REQUEST['year'] . '> -Back to Calendar</A>', '<INPUT type=submit class=btn_medium value=Go>');
$functions = array('SCHOOL_DATE' => 'ProperDate');
// <A HREF=Modules.php?modname='.$_REQUEST["modname"].'&month='.$_REQUEST["month"].'&year='.$_REQUEST["year"].'>
$events_RET = DBGet(DBQuery('SELECT ID,SCHOOL_DATE,TITLE,DESCRIPTION FROM calendar_events WHERE SCHOOL_DATE BETWEEN \'' . $start_date . '\' AND \'' . $end_date . '\' AND SYEAR=\'' . UserSyear() . '\' AND (calendar_id=\'' . $_REQUEST['calendar_id'] . '\' OR calendar_id=\'0\') ORDER BY SCHOOL_DATE'), $functions);
$_SESSION['events_RET'] = $events_RET;
echo '<div style="overflow:auto; width:820px;">';
echo '<div id="students" >';
ListOutput($events_RET, array('SCHOOL_DATE' => 'Date', 'TITLE' => 'Event', 'DESCRIPTION' => 'Description'), 'Event', 'Events');
echo '</div></div></FORM>';
}
if (!$_REQUEST['modfunc']) {
if (User('PROFILE') != 'student') {
DrawBC("School Setup >> " . ProgramTitle());
} else {
DrawBC("School Info >> " . ProgramTitle());
}
$last = 31;
while (!checkdate($_REQUEST['month'], $last, $_REQUEST['year'])) {
$last--;
}
$calendar_RET = DBGet(DBQuery('SELECT DATE_FORMAT(SCHOOL_DATE,\'%d-%b-%y\') as SCHOOL_DATE,MINUTES,BLOCK FROM attendance_calendar WHERE SCHOOL_DATE BETWEEN \'' . date('Y-m-d', $time) . '\' AND \'' . date('Y-m-d', mktime(0, 0, 0, $_REQUEST['month'], $last, $_REQUEST['year'])) . '\' AND SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND CALENDAR_ID=\'' . $_REQUEST['calendar_id'] . '\''), array(), array('SCHOOL_DATE'));
if ($_REQUEST['minutes']) {
foreach ($_REQUEST['minutes'] as $date => $minutes) {
if ($calendar_RET[$date]) {
if ($minutes != '0' && $minutes != '') {
DBQuery('UPDATE attendance_calendar SET MINUTES=\'' . $minutes . '\' WHERE SCHOOL_DATE=\'' . $date . '\' AND SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND CALENDAR_ID=\'' . $_REQUEST['calendar_id'] . '\'');
} else {
DBQuery('DELETE FROM attendance_calendar WHERE SCHOOL_DATE=\'' . $date . '\' AND SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND CALENDAR_ID=\'' . $_REQUEST['calendar_id'] . '\'');
}
} elseif ($minutes != '0' && $minutes != '') {
示例11: DrawBC
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
//include("languages/English/$_REQUEST[modname]");
DrawBC(_('Attendance') . " >> " . ProgramTitle());
if ($_REQUEST['codes']) {
$_SESSION['code'] = $_REQUEST['codes'];
} else {
$_SESSION['code'] = 'A';
}
if ($_REQUEST['month_date'] && $_REQUEST['day_date'] && $_REQUEST['year_date']) {
//echo $_REQUEST['year_date'];
while (!VerifyDate($date = $_REQUEST['day_date'] . '-' . $_REQUEST['month_date'] . '-' . $_REQUEST['year_date'])) {
$_REQUEST['day_date']--;
}
/*if($_SESSION['Administration.php']['date'] && $_SESSION['Administration.php']['date']!=$date)
{
unset($_REQUEST['attendance']);
unset($_REQUEST['attendance_day']);
}*/
示例12: DrawLogo
echo "<tr><td width=105>" . DrawLogo() . "</td><td style=\"font-size:15px; font-weight:bold; padding-top:20px;\">" . GetSchool(UserSchool()) . "<div style=\"font-size:12px;\">" . _('User Advanced Report') . "</div></td><td align=right style=\"padding-top:20px;\">" . ProperDate(DBDate()) . "<br />" . _('Powered by openSIS') . "</td></tr><tr><td colspan=3 style=\"border-top:1px solid #333;\"> </td></tr></table>";
echo "<table >";
include 'modules/misc/UserExport.php';
}
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'call') {
$_SESSION['st_arr'] = $_REQUEST['st_arr'];
echo "<meta charset='UTF-8'><FORM action=for_export.php?modname={$_REQUEST['modname']}&head_html=Staff+Advanced+Report&modfunc=save&search_modfunc=list&_openSIS_PDF=true&_dis_user={$_REQUEST['_dis_user']}&_search_all_schools={$_REQUEST['_search_all_schools']} method=POST target=_blank>";
echo '<DIV id=fields_div></DIV>';
echo '<br/>';
include 'modules/misc/UserExport.php';
echo '<BR><CENTER><INPUT type=submit value=' . _('Create Report for Selected Users') . ' class=btn_xxlarge></CENTER>';
echo "</FORM>";
}
if (!$_REQUEST['modfunc'] || $_REQUEST['modfunc'] == 'list') {
DrawBC("" . _('Users') . " >> " . ProgramTitle());
if ($_REQUEST['modfunc'] == 'list') {
$extra['columns_after'] = array('LAST_LOGIN' => _('Last Login'));
$extra['functions'] = array('LAST_LOGIN' => 'makeLogin');
#$extra['SELECT'] = ",LAST_LOGIN,CONCAT('<INPUT type=checkbox name=st_arr[] value=',s.STAFF_ID,' checked>') AS CHECKBOX";
$extra['SELECT'] = ',LAST_LOGIN,CONCAT(\'<INPUT type=checkbox name=st_arr[] value=\',s.STAFF_ID,\' checked>\') AS CHECKBOX';
$extra['columns_before'] = array('CHECKBOX' => '</A><INPUT type=checkbox value=Y name=controller checked onclick="checkAll(this.form,this.form.controller.checked,\'st_arr\');"><A>');
$extra['options']['search'] = false;
echo "<meta charset='UTF-8'><FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=call method=POST>";
echo '<DIV id=fields_div></DIV>';
if ($_REQUEST['_dis_user']) {
echo '<INPUT type=hidden name=_dis_user value=' . $_REQUEST['_dis_user'] . '>';
}
if ($_REQUEST['_search_all_schools']) {
echo '<INPUT type=hidden name=_search_all_schools value=' . $_REQUEST['_search_all_schools'] . '>';
}
示例13: DrawBC
#
# This program is released under the terms of the GNU General Public License as
# published by the Free Software Foundation, version 2 of the License.
# See license.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
include '../../Redirect_modules.php';
DrawBC("Grades >> " . ProgramTitle());
$mp_RET = DBGet(DBQuery('SELECT MP FROM course_periods WHERE course_period_id = \'' . UserCoursePeriod() . '\''));
if ($mp_RET[1]['MP'] == 'SEM') {
$sem = GetParentMP('SEM', UserMP());
$pros = GetChildrenMP('PRO', UserMP());
}
if ($mp_RET[1]['MP'] == 'FY') {
$sem = GetParentMP('SEM', UserMP());
if ($sem) {
$fy = GetParentMP('FY', $sem);
} else {
$fy = GetParentMP('FY', UserMP());
}
$pros = GetChildrenMP('PRO', UserMP());
}
if ($mp_RET[1]['MP'] == 'QTR') {
示例14: AND
AND (ga.POINTS!=\'0\') ORDER BY ga.ASSIGNMENT_ID DESC'));
}
if (count($assignments_RET)) {
$LO_columns = array('TITLE' => '' . _('Title') . '', 'CATEGORY' => '' . _('Category') . '', 'ASSIGNED_DATE' => '' . _('Assigned Date') . '', 'DUE_DATE' => '' . _('Due Date') . '', 'COMMENT' => '' . _('Description') . '');
$LO_ret = array(0 => array());
foreach ($assignments_RET as $assignment) {
$LO_ret[] = array('TITLE' => $assignment['TITLE'], 'CATEGORY' => $assignment['CATEGORY'], 'ASSIGNED_DATE' => $assignment['ASSIGNED_DATE'], 'DUE_DATE' => $assignment['DUE_DATE'], 'COMMENT' => $assignment['COMMENT']);
}
DrawHeader('' . _('Subject') . ' - ' . _(substr($course['TITLE']), strrpos(str_replace(' - ', ' ^ ', _($course['TITLE'])), '^')));
unset($LO_ret[0]);
ListOutput($LO_ret, $LO_columns, '' . _('Assignment') . '', '' . _('Assignments') . '', array(), array(), array('center' => false, 'save' => $_REQUEST['id'] != 'all', 'search' => false));
}
}
break;
case 'student':
DrawBC(_($welcome) . ' | ' . _('Role') . ' : ' . _('Student') . '');
$notes_RET = DBGet(DBQuery('SELECT IF(pn.school_id IS NULL,\'All School\',(SELECT TITLE FROM schools WHERE id=pn.school_id)) AS SCHOOL,pn.PUBLISHED_DATE,pn.TITLE,pn.CONTENT
FROM portal_notes pn
WHERE pn.SYEAR=\'' . UserSyear() . '\'
AND pn.START_DATE<=CURRENT_DATE AND (pn.END_DATE>=CURRENT_DATE OR pn.END_DATE IS NULL)
AND (pn.school_id IS NULL OR pn.SCHOOL_ID=\'' . UserSchool() . '\')
AND position(\',0,\' IN pn.PUBLISHED_PROFILES)>0
ORDER BY pn.SORT_ORDER,pn.PUBLISHED_DATE DESC'), array('PUBLISHED_DATE' => 'ProperDate', 'CONTENT' => '_nl2br'));
if (count($notes_RET)) {
echo '<p>';
ListOutput($notes_RET, array('PUBLISHED_DATE' => '' . _('Date Posted') . '', 'TITLE' => '' . _('Title') . '', 'CONTENT' => '' . _('Note') . ''), '' . _('Note') . '', '' . _('Notes') . '', array(), array(), array('save' => false, 'search' => false));
echo '</p>';
}
//$events_RET = DBGet(DBQuery("SELECT TITLE,SCHOOL_DATE,DESCRIPTION FROM calendar_events WHERE SCHOOL_DATE BETWEEN CURRENT_DATE AND CURRENT_DATE+30 AND SYEAR='".UserSyear()."' AND SCHOOL_ID='".UserSchool()."'"),array('SCHOOL_DATE'=>'ProperDate'));
$events_RET = DBGet(DBQuery("SELECT TITLE,SCHOOL_DATE,DESCRIPTION FROM calendar_events ce,calendar_events_visibility cev WHERE ce.calendar_id=cev.calendar_id AND cev.profile_id=0 AND SCHOOL_DATE BETWEEN CURRENT_DATE AND CURRENT_DATE+30 AND SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'"), array('SCHOOL_DATE' => 'ProperDate'));
$events_RET1 = DBGet(DBQuery('SELECT ce.TITLE,ce.DESCRIPTION,ce.SCHOOL_DATE,s.TITLE AS SCHOOL
示例15: strtoupper
$start_time = $start;
$start_date = strtoupper(date('d-M-y', $start_time));
$end_date = strtoupper(date('d-M-y', $end));
} else {
$start_time = $_REQUEST['start_date'];
$start_date = strtoupper(date('d-M-y', $start_time));
$end_date = strtoupper(date('d-M-y', $start_time + 60 * 60 * 24 * 7));
}
$QI = DBQuery("SELECT PERIOD_ID,TITLE FROM SCHOOL_PERIODS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY SORT_ORDER ");
$periods_RET = DBGet($QI);
$period_select = " <SELECT name=period><OPTION value=''>All</OPTION>";
foreach ($periods_RET as $period) {
$period_select .= "<OPTION value={$period['PERIOD_ID']}" . ($_REQUEST['period'] == $period['PERIOD_ID'] ? ' SELECTED' : '') . ">" . $period['TITLE'] . "</OPTION>";
}
$period_select .= "</SELECT>";
DrawBC("Eligibility > " . ProgramTitle());
echo "<FORM name=teach_comp id=teach_comp action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
$begin_year = DBGet(DBQuery("SELECT min(unix_timestamp(SCHOOL_DATE)) as SCHOOL_DATE FROM ATTENDANCE_CALENDAR WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "'"));
$begin_year = $begin_year[1]['SCHOOL_DATE'];
if ($start && $begin_year) {
$date_select = "<OPTION value={$start}>" . date('M d, Y', $start) . ' - ' . date('M d, Y', $end) . '</OPTION>';
for ($i = $start - 60 * 60 * 24 * 7; $i >= $begin_year; $i -= 60 * 60 * 24 * 7) {
$date_select .= "<OPTION value={$i}" . ($i + 86400 >= $start_time && $i - 86400 <= $start_time ? ' SELECTED' : '') . ">" . date('M d, Y', $i) . ' - ' . date('M d, Y', $i + 1 + ($END_DAY - $START_DAY) * 60 * 60 * 24) . '</OPTION>';
}
}
DrawHeaderHome('<SELECT name=start_date>' . $date_select . '</SELECT>' . $period_select, '<INPUT type=submit class=btn_medium value=Go onclick=\'formload_ajax("teach_comp");\'>');
echo '</FORM>';
$sql = "SELECT CONCAT(s.LAST_NAME,', ',s.FIRST_NAME) AS FULL_NAME,sp.TITLE,cp.PERIOD_ID,s.STAFF_ID \n\t\tFROM STAFF s,COURSE_PERIODS cp,SCHOOL_PERIODS sp \n\t\tWHERE \n\t\t\tsp.PERIOD_ID = cp.PERIOD_ID\n\t\t\tAND cp.TEACHER_ID=s.STAFF_ID AND cp.MARKING_PERIOD_ID IN (" . GetAllMP('QTR', UserMP()) . ")\n\t\t\tAND cp.SYEAR='" . UserSyear() . "' AND cp.SCHOOL_ID='" . UserSchool() . "' AND s.PROFILE='teacher'\n\t\t\t" . ($_REQUEST['period'] ? " AND cp.PERIOD_ID='{$_REQUEST['period']}'" : '') . "\n\t\t\tAND NOT EXISTS (SELECT '' FROM ELIGIBILITY_COMPLETED ac WHERE ac.STAFF_ID=cp.TEACHER_ID AND ac.PERIOD_ID = sp.PERIOD_ID AND ac.SCHOOL_DATE BETWEEN '" . date('Y-m-d', $start_time) . "' AND '" . date('Y-m-d', $start_time + 60 * 60 * 24 * 7) . "')";
$RET = DBGet(DBQuery($sql), array(), array('STAFF_ID', 'PERIOD_ID'));
$i = 0;
if (count($RET)) {