本文整理汇总了PHP中PopTable函数的典型用法代码示例。如果您正苦于以下问题:PHP PopTable函数的具体用法?PHP PopTable怎么用?PHP PopTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PopTable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PromptX
function PromptX($title = _('Confirm'), $question = '', $message = '', $pdf = '')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST, array('delete_ok'), $pdf == true ? array('_CENTRE_PDF' => true) : array());
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', $title);
echo "<CENTER><h4>{$question}</h4><FORM action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST>{$message}<BR><BR><INPUT type=submit value=\"" . _('OK') . "\"><INPUT type=button name=delete_cancel value=\"" . _('Cancel') . "\" onClick='javascript:history.back()'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}
示例2: PromptX
function PromptX($title = 'Confirm', $question = '', $message = '', $pdf = '')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST, array('delete_ok'), $pdf == true ? array('_ROSARIO_PDF' => true) : array());
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR />';
PopTable('header', $title);
echo '<span class="center"><h4>' . $question . '</h4><FORM action="' . $PHP_tmp_SELF . '&delete_ok=1" METHOD="POST">' . $message . '<BR /><BR /><INPUT type="submit" value="' . _('OK') . '"><INPUT type="button" name="delete_cancel" value="' . _('Cancel') . '" onClick="javascript:history.back()"></FORM></span>';
PopTable('footer');
return false;
} else {
return true;
}
}
示例3: Prompt
function Prompt($title = 'Confirm', $question = '', $message = '', $pdf = '')
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
if ($pdf == true) {
$tmp_REQUEST['_CENTRE_PDF'] = true;
}
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', $title);
echo "<CENTER><h4>{$question}</h4><FORM action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST>{$message}<BR><BR><INPUT type=submit class=btn_medium value=OK> <INPUT type=button class=btn_medium name=delete_cancel value=Cancel onclick='javascript:history.go(-1);'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}
示例4: UnableDeletePromptX
function UnableDeletePromptX($title)
{
$tmp_REQUEST = $_REQUEST;
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', 'Unable to Delete');
echo "<CENTER><h4>{$title}</h4><br><FORM action={$PHP_tmp_SELF} METHOD=POST><INPUT type=submit class=btn_medium name=delete_cancel value=Cancel></FORM></CENTER>";
PopTable('footer');
return '';
}
if ($_REQUEST['delete_ok']) {
unset($_REQUEST['delete_ok']);
unset($_REQUEST['modfunc']);
return true;
}
unset($_REQUEST['delete_cancel']);
unset($_REQUEST['modfunc']);
return false;
}
示例5: DeletePromptX
function DeletePromptX($title, $action = 'Delete')
{
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST, array('delete_ok', 'delete_cancel'));
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR />';
//modif Francois: add translation
PopTable('header', _('Confirm') . (mb_strpos($action, ' ') === false ? ' ' . ($action == 'Delete' ? _('Delete') : $action) : ''));
echo '<span class="center"><h4>' . sprintf(_('Are you sure you want to %s that %s?'), $action == 'Delete' ? _('Delete') : $action, $title) . '</h4><FORM action="' . $PHP_tmp_SELF . '" METHOD="POST"><INPUT type="submit" name="delete_ok" value="' . _('OK') . '"><INPUT type="submit" name="delete_cancel" value="' . _('Cancel') . '"></FORM></span>';
PopTable('footer');
return '';
}
if ($_REQUEST['delete_ok']) {
unset($_REQUEST['delete_ok']);
unset($_REQUEST['modfunc']);
return true;
}
unset($_REQUEST['delete_cancel']);
unset($_REQUEST['modfunc']);
return false;
}
示例6: DeletePromptX
function DeletePromptX($title, $action = null)
{
if (empty($action)) {
$action = _('delete');
}
$PHP_tmp_SELF = PreparePHP_SELF($_REQUEST, array('delete_ok', 'delete_cancel'));
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', _('Confirm') . (!substr(' ', ' ' . $action) ? $action : ''));
echo "<CENTER><h4>" . _('Are You Sure You Want to') . " {$action} " . _('that') . " {$title}?</h4><FORM action={$PHP_tmp_SELF} METHOD=POST><INPUT type=submit name=delete_ok value=" . _('OK') . "><INPUT type=submit name=delete_cancel value=" . _('Cancel') . "></FORM></CENTER>";
PopTable('footer');
return '';
}
if ($_REQUEST['delete_ok']) {
unset($_REQUEST['delete_ok']);
unset($_REQUEST['modfunc']);
return true;
}
unset($_REQUEST['delete_cancel']);
unset($_REQUEST['modfunc']);
return false;
}
示例7: DeletePromptX
function DeletePromptX($title, $action = 'Delete')
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
unset($tmp_REQUEST['delete_cancel']);
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', 'Confirm' . (!substr(' ', ' ' . $action) ? $action : ''));
echo "<CENTER><h4>Are You Sure You Want to {$action} that {$title}?</h4><br><FORM action={$PHP_tmp_SELF} METHOD=POST><INPUT type=submit name=delete_ok class=btn_medium value=OK> <INPUT type=submit class=btn_medium name=delete_cancel value=Cancel></FORM></CENTER>";
PopTable('footer');
return '';
}
if ($_REQUEST['delete_ok']) {
unset($_REQUEST['delete_ok']);
unset($_REQUEST['modfunc']);
return true;
}
unset($_REQUEST['delete_cancel']);
unset($_REQUEST['modfunc']);
return false;
}
示例8: Prompt_Home_Schedule
function Prompt_Home_Schedule($title = 'Confirm', $question = '', $message = '', $pdf = '')
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
if ($pdf == true) {
$tmp_REQUEST['_openSIS_PDF'] = true;
}
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', $title);
echo "<CENTER><h4>{$question}</h4><FORM name=run_schedule action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST onSubmit='return confirmAction();'>{$message}<BR><BR><INPUT type=submit class=btn_medium value=OK > <INPUT type=button class=btn_medium name=delete_cancel value=Cancel onclick='window.location=\"Modules.php?modname=miscellaneous/Portal.php\"'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}
示例9: mySearch
function mySearch($type, $extra = '')
{
global $extra;
if ($_REQUEST['search_modfunc'] == 'search_fnc' || !$_REQUEST['search_modfunc']) {
echo '<BR>';
PopTable('header', 'Search');
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&search_modfunc=list&next_modname={$_REQUEST['next_modname']} method=POST>";
echo '<TABLE border=0>';
$RET = DBGet(DBQuery("SELECT STAFF_ID,CONCAT(LAST_NAME,LAST_NAME,', ',FIRST_NAME) AS FULL_NAME FROM STAFF WHERE PROFILE='teacher' AND position('," . UserSchool() . ",' IN SCHOOLS)>0 AND SYEAR='" . UserSyear() . "' ORDER BY FULL_NAME"));
echo '<TR><TD align=right width=120>Teacher</TD><TD>';
echo "<SELECT name=teacher_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $teacher) {
echo "<OPTION value={$teacher['STAFF_ID']}>{$teacher['FULL_NAME']}</OPTION>";
}
echo '</SELECT>';
echo '</TD></TR>';
$RET = DBGet(DBQuery("SELECT SUBJECT_ID,TITLE FROM COURSE_SUBJECTS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY TITLE"));
echo '<TR><TD align=right width=120>Subject</TD><TD>';
echo "<SELECT name=subject_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $subject) {
echo "<OPTION value={$subject['SUBJECT_ID']}>{$subject['TITLE']}</OPTION>";
}
echo '</SELECT>';
$RET = DBGet(DBQuery("SELECT PERIOD_ID,TITLE FROM SCHOOL_PERIODS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER"));
echo '<TR><TD align=right width=120>Period</TD><TD>';
echo "<SELECT name=period_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $period) {
echo "<OPTION value={$period['PERIOD_ID']}>{$period['TITLE']}</OPTION>";
}
echo '</SELECT>';
echo '</TD></TR>';
Widgets('course');
echo $extra['search'];
echo '<TR><TD colspan=2 align=center>';
echo '<BR>';
echo Buttons('Submit', 'Reset');
echo '</TD></TR>';
echo '</TABLE>';
echo '</FORM>';
PopTable('footer');
} else {
DrawHeader('', $extra['header_right']);
DrawHeader($extra['extra_header_left'], $extra['extra_header_right']);
if (User('PROFILE') == 'admin') {
if ($_REQUEST['teacher_id']) {
$where .= " AND cp.TEACHER_ID='{$_REQUEST['teacher_id']}'";
}
if ($_REQUEST['first']) {
$where .= " AND UPPER(s.FIRST_NAME) LIKE '" . strtoupper($_REQUEST['first']) . "%'";
}
if ($_REQUEST['w_course_period_id']) {
if ($_REQUEST['w_course_period_id_which'] == 'course') {
$where .= " AND cp.COURSE_ID=(SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "')";
} else {
$where .= " AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'";
}
}
if ($_REQUEST['subject_id']) {
$from .= ",COURSES c";
$where .= " AND c.COURSE_ID=cp.COURSE_ID AND c.SUBJECT_ID='" . $_REQUEST['subject_id'] . "'";
}
if ($_REQUEST['period_id']) {
$where .= " AND cp.PERIOD_ID='" . $_REQUEST['period_id'] . "'";
}
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp{$from} WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "' AND sp.PERIOD_ID=cp.PERIOD_ID{$where}";
} elseif (User('PROFILE') == 'teacher') {
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "' AND cp.TEACHER_ID='" . User('STAFF_ID') . "' AND sp.PERIOD_ID=cp.PERIOD_ID";
} else {
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp,SCHEDULE ss WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR='" . UserSyear() . "' AND ss.STUDENT_ID='" . UserStudentID() . "' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE)) AND sp.PERIOD_ID=cp.PERIOD_ID";
}
$sql .= ' ORDER BY sp.PERIOD_ID';
$course_periods_RET = DBGet(DBQuery($sql), array('COURSE_PERIOD_ID' => '_makeChooseCheckbox'));
$LO_columns = array('COURSE_PERIOD_ID' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'cp_arr\');"><A>', 'TITLE' => 'Course Period');
ListOutput($course_periods_RET, $LO_columns, 'Course Period', 'Course Periods');
}
}
示例10: mySearch
function mySearch($type, $extra = '')
{
global $extra;
if ($_REQUEST['search_modfunc'] == 'search_fnc' || !$_REQUEST['search_modfunc']) {
echo '<BR>';
PopTable('header', 'Search');
echo "<FORM action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=" . strip_tags(trim($_REQUEST[modfunc])) . "&search_modfunc=list&next_modname=" . strip_tags(trim($_REQUEST[next_modname])) . " method=POST>";
echo '<TABLE border=0>';
$RET = DBGet(DBQuery('SELECT s.STAFF_ID,CONCAT(s.LAST_NAME,\'' . ',' . '\',s.FIRST_NAME) AS FULL_NAME FROM staff s,staff_school_relationship ssr WHERE s.STAFF_ID=ssr.STAFF_ID AND s.PROFILE=\'' . 'teacher' . '\' AND position(\'' . UserSchool() . '\' IN ssr.SCHOOL_ID)>0 AND ssr.SYEAR=\'' . UserSyear() . '\' ORDER BY FULL_NAME'));
echo '<TR><TD align=right width=120>Teacher</TD><TD>';
echo "<SELECT name=teacher_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $teacher) {
echo "<OPTION value={$teacher['STAFF_ID']}>{$teacher['FULL_NAME']}</OPTION>";
}
echo '</SELECT>';
echo '</TD></TR>';
$RET = DBGet(DBQuery('SELECT SUBJECT_ID,TITLE FROM course_subjects WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY TITLE'));
echo '<TR><TD align=right width=120>Subject</TD><TD>';
echo "<SELECT name=subject_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $subject) {
echo "<OPTION value={$subject['SUBJECT_ID']}>{$subject['TITLE']}</OPTION>";
}
echo '</SELECT>';
$RET = DBGet(DBQuery('SELECT PERIOD_ID,TITLE FROM school_periods WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
echo '<TR><TD align=right width=120>Period</TD><TD>';
echo "<SELECT name=period_id style='max-width:250;'><OPTION value=''>N/A</OPTION>";
foreach ($RET as $period) {
echo "<OPTION value={$period['PERIOD_ID']}>{$period['TITLE']}</OPTION>";
}
echo '</SELECT>';
echo '</TD></TR>';
Widgets('course');
echo $extra['search'];
echo '<TR><TD colspan=2 align=center>';
echo '<BR>';
echo Buttons('Submit', 'Reset');
echo '</TD></TR>';
echo '</TABLE>';
echo '</FORM>';
PopTable('footer');
} else {
DrawHeader('', $extra['header_right']);
DrawHeader($extra['extra_header_left'], $extra['extra_header_right']);
if (User('PROFILE') == 'admin') {
if ($_REQUEST['teacher_id']) {
$where .= ' AND cp.TEACHER_ID=\'' . $_REQUEST[teacher_id] . '\'';
}
if ($_REQUEST['first']) {
$where .= ' AND UPPER(s.FIRST_NAME) LIKE \'' . strtoupper($_REQUEST['first']) . '%' . '\'';
}
if ($_REQUEST['w_course_period_id']) {
if ($_REQUEST['w_course_period_id_which'] == 'course') {
$where .= ' AND cp.COURSE_ID=(SELECT COURSE_ID FROM course_periods WHERE COURSE_PERIOD_ID=\'' . $_REQUEST['w_course_period_id'] . '\')';
} else {
$where .= ' AND cp.COURSE_PERIOD_ID=\'' . $_REQUEST['w_course_period_id'] . '\'';
}
}
if ($_REQUEST['subject_id']) {
$from .= ',courses c';
$where .= ' AND c.COURSE_ID=cp.COURSE_ID AND c.SUBJECT_ID=\'' . $_REQUEST['subject_id'] . '\'';
}
if ($_REQUEST['period_id']) {
$where .= " AND cpv.PERIOD_ID='" . $_REQUEST['period_id'] . "'";
}
$sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp' . $from . ' WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID AND cp.SYEAR=\'' . UserSyear() . '\' AND sp.PERIOD_ID=cpv.PERIOD_ID' . $where . '';
} elseif (User('PROFILE') == 'teacher') {
$sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.SYEAR=\'' . UserSyear() . '\' AND cp.TEACHER_ID=\'' . User('STAFF_ID') . '\' AND sp.PERIOD_ID=cpv.PERIOD_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID';
} else {
$sql = 'SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM course_periods cp,course_period_var cpv,school_periods sp,schedule ss WHERE cp.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR=\'' . UserSyear() . '\' AND ss.STUDENT_ID=\'' . UserStudentID() . '\' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE)) AND sp.PERIOD_ID=cpv.PERIOD_ID AND cp.COURSE_PERIOD_ID=cpv.COURSE_PERIOD_ID';
}
$sql .= ' GROUP BY cp.COURSE_PERIOD_ID ORDER BY sp.PERIOD_ID';
$course_periods_RET = DBGet(DBQuery($sql), array('COURSE_PERIOD_ID' => '_makeChooseCheckbox'));
$_SESSION['count_course_periods'] = count($course_periods_RET);
$LO_columns = array('COURSE_PERIOD_ID' => '</A><INPUT type=checkbox value=Y name=controller onclick="checkAll(this.form,this.form.controller.checked,\'cp_arr\');"><A>', 'TITLE' => 'Course Period');
ListOutput($course_periods_RET, $LO_columns, 'Course Period', 'Course Periods');
}
}
示例11: mySearch
function mySearch($type, $extra = '')
{
global $extra;
if ($_REQUEST['search_modfunc'] == 'search_fnc' || !$_REQUEST['search_modfunc']) {
$_SESSION['Search_PHP_SELF'] = PreparePHP_SELF($_SESSION['_REQUEST_vars'], array('bottom_back'));
if ($_SESSION['Back_PHP_SELF'] != 'course') {
$_SESSION['Back_PHP_SELF'] = 'course';
unset($_SESSION['List_PHP_SELF']);
}
echo '<script type="text/javascript">parent.help.location.reload();</script>';
echo '<BR />';
PopTable('header', _('Find a Course'));
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=' . $_REQUEST['modfunc'] . '&search_modfunc=list&next_modname=' . $_REQUEST['next_modname'] . '" method="POST">';
echo '<TABLE>';
$RET = DBGet(DBQuery("SELECT STAFF_ID,LAST_NAME||', '||FIRST_NAME AS FULL_NAME FROM STAFF WHERE PROFILE='teacher' AND (SCHOOLS IS NULL OR position('," . UserSchool() . ",' IN SCHOOLS)>0) AND SYEAR='" . UserSyear() . "' ORDER BY FULL_NAME"));
echo '<TR><TD style="text-align:right; width:120px:">' . _('Teacher') . '</TD><TD>';
echo '<SELECT name="teacher_id" style="max-width:250;"><OPTION value="">' . _('N/A') . '</OPTION>';
foreach ($RET as $teacher) {
echo '<OPTION value="' . $teacher['STAFF_ID'] . '">' . $teacher['FULL_NAME'] . '</OPTION>';
}
echo '</SELECT>';
echo '</TD></TR>';
$RET = DBGet(DBQuery("SELECT SUBJECT_ID,TITLE FROM COURSE_SUBJECTS WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY TITLE"));
echo '<TR><TD style="text-align:right; width:120px:">' . _('Subject') . '</TD><TD>';
echo '<SELECT name="subject_id" style="max-width:250;"><OPTION value="">' . _('N/A') . '</OPTION>';
foreach ($RET as $subject) {
echo '<OPTION value="' . $subject['SUBJECT_ID'] . '">' . $subject['TITLE'] . '</OPTION>';
}
echo '</SELECT>';
$RET = DBGet(DBQuery("SELECT PERIOD_ID,TITLE FROM SCHOOL_PERIODS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER"));
echo '<TR><TD style="text-align:right; width:120px:">' . _('Period') . '</TD><TD>';
echo "<SELECT name=period_id style='max-width:250;'><OPTION value=''>" . _('N/A') . "</OPTION>";
foreach ($RET as $period) {
echo "<OPTION value={$period['PERIOD_ID']}>{$period['TITLE']}</OPTION>";
}
echo '</SELECT>';
echo '</TD></TR>';
Widgets('course');
echo $extra['search'];
echo '<TR><TD colspan="2" class="center">';
echo '<BR />';
echo Buttons(_('Submit'), _('Reset'));
echo '</TD></TR>';
echo '</TABLE>';
echo '</FORM>';
PopTable('footer');
} else {
DrawHeader('', $extra['header_right']);
DrawHeader($extra['extra_header_left'], $extra['extra_header_right']);
if (User('PROFILE') == 'admin') {
if ($_REQUEST['teacher_id']) {
$where .= " AND cp.TEACHER_ID='{$_REQUEST['teacher_id']}'";
}
if ($_REQUEST['first']) {
$where .= " AND UPPER(s.FIRST_NAME) LIKE '" . mb_strtoupper($_REQUEST['first']) . "%'";
}
if ($_REQUEST['w_course_period_id']) {
if ($_REQUEST['w_course_period_id_which'] == 'course') {
$where .= " AND cp.COURSE_ID=(SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "')";
} else {
$where .= " AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_course_period_id'] . "'";
}
}
if ($_REQUEST['subject_id']) {
$from .= ",COURSES c";
$where .= " AND c.COURSE_ID=cp.COURSE_ID AND c.SUBJECT_ID='" . $_REQUEST['subject_id'] . "'";
}
//modif Francois: multiple school periods for a course period
if ($_REQUEST['period_id']) {
//$where .= " AND cp.PERIOD_ID='".$_REQUEST['period_id']."'";
$where .= " AND cpsp.PERIOD_ID='" . $_REQUEST['period_id'] . "' AND cp.COURSE_PERIOD_ID=cpsp.COURSE_PERIOD_ID";
$from .= ",COURSE_PERIOD_SCHOOL_PERIODS cpsp";
}
//$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp$from WHERE cp.SCHOOL_ID='".UserSchool()."' AND cp.SYEAR='".UserSyear()."' AND sp.PERIOD_ID=cp.PERIOD_ID$where";
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE FROM COURSE_PERIODS cp{$from} WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "'{$where}";
} elseif (User('PROFILE') == 'teacher') {
//modif Francois: multiple school periods for a course period
//$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp WHERE cp.SCHOOL_ID='".UserSchool()."' AND cp.SYEAR='".UserSyear()."' AND cp.TEACHER_ID='".User('STAFF_ID')."' AND sp.PERIOD_ID=cp.PERIOD_ID";
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE FROM COURSE_PERIODS cp WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.SYEAR='" . UserSyear() . "' AND cp.TEACHER_ID='" . User('STAFF_ID') . "'";
} else {
//modif Francois: multiple school periods for a course period
//$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE,sp.ATTENDANCE FROM COURSE_PERIODS cp,SCHOOL_PERIODS sp,SCHEDULE ss WHERE cp.SCHOOL_ID='".UserSchool()."' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR='".UserSyear()."' AND ss.STUDENT_ID='".UserStudentID()."' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE)) AND sp.PERIOD_ID=cp.PERIOD_ID";
$sql = "SELECT cp.COURSE_PERIOD_ID,cp.TITLE FROM COURSE_PERIODS cp,SCHEDULE ss WHERE cp.SCHOOL_ID='" . UserSchool() . "' AND cp.COURSE_PERIOD_ID=ss.COURSE_PERIOD_ID AND ss.SYEAR='" . UserSyear() . "' AND ss.STUDENT_ID='" . UserStudentID() . "' AND (CURRENT_DATE>=ss.START_DATE AND (ss.END_DATE IS NULL OR CURRENT_DATE<=ss.END_DATE))";
}
//$sql .= ' ORDER BY sp.PERIOD_ID';
$course_periods_RET = DBGet(DBQuery($sql), array('COURSE_PERIOD_ID' => '_makeChooseCheckbox'));
$LO_columns = array('COURSE_PERIOD_ID' => '</A><INPUT type="checkbox" value="Y" name="controller" onclick="checkAll(this.form,this.form.controller.checked,\'cp_arr\');" checked /><A>', 'TITLE' => _('Course Period'));
if (!$_REQUEST['LO_save'] && !$extra['suppress_save']) {
$_SESSION['List_PHP_SELF'] = PreparePHP_SELF($_SESSION['_REQUEST_vars'], array('bottom_back'));
if ($_SESSION['Back_PHP_SELF'] != 'course') {
$_SESSION['Back_PHP_SELF'] = 'course';
unset($_SESSION['Search_PHP_SELF']);
}
echo '<script type="text/javascript">parent.help.location.reload();</script>';
}
echo '<INPUT type="hidden" name="relation">';
ListOutput($course_periods_RET, $LO_columns, 'Course Period', 'Course Periods');
}
}
示例12: db_show_error
function db_show_error($sql, $failnote, $additional = '')
{
global $openSISTitle, $openSISVersion, $openSISNotifyAddress;
PopTable('header', 'Error');
$tb = debug_backtrace();
$error = $tb[1]['file'] . " at " . $tb[1]['line'];
echo "\r\n\t\t<TABLE CELLSPACING=10 BORDER=0>\r\n\t\t\t<TD align=right><b>Date:</TD>\r\n\t\t\t<TD><pre>" . date("m/d/Y h:i:s") . "</pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Failure Notice:</b></TD>\r\n\t\t\t<TD><pre> {$failnote} </pre></TD>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>SQL:</b></TD>\r\n\t\t\t<TD>{$sql}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Traceback:</b></TD>\r\n\t\t\t<TD>{$error}</TD>\r\n\t\t</TR>\r\n\t\t</TR><TR>\r\n\t\t\t<TD align=right><b>Additional Information:</b></TD>\r\n\t\t\t<TD>{$additional}</TD>\r\n\t\t</TR>\r\n\t\t</TABLE>";
/*echo "
<TABLE CELLSPACING=10 BORDER=0>
<TR><TD align=right><b>Date:</TD>
<TD><pre>".date("m/d/Y h:i:s")."</pre></TD>
</TR><TR>
<TD align=right></TD>
<TD>openSIS has encountered an error that could have resulted from any of the following:
<br/>
<ul>
<li>Invalid data input</li>
<li>Database SQL error</li>
<li>Program error</li>
</ul>
Please take this screen shot and send it to your openSIS representative for debugging and resolution.
</TD>
</TR>
</TABLE>";*/
//Something you have asked the system to do has thrown a database error. A system administrator has been notified, and the problem will be fixed as soon as possible. It might be that changing the input parameters sent to this program will cause it to run properly. Thanks for your patience.
PopTable('footer');
echo "<!-- SQL STATEMENT: \n\n {$sql} \n\n -->";
/*if(false && function_exists('mysql_query'))
{
$link = @mysql_connect('os4ed.com','openSIS_log','openSIS_log');
@mysql_select_db('openSIS_log');
@mysql_query("INSERT INTO SQL_ERROR_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME,MODNAME,USERNAME,SQL,REQUEST) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','$openSISVersion','$_SERVER[PHP_SELF]','$_SERVER[DOCUMENT_ROOT]','$_SERVER[SCRIPT_NAME]','$_REQUEST[modname]','".User('USERNAME')."','$sql','".ShowVar($_REQUEST,'Y', 'N')."')");
@mysql_close($link);
}*/
if ($openSISNotifyAddress) {
$message = "System: {$openSISTitle} \n";
$message .= "Date: " . date("m/d/Y h:i:s") . "\n";
$message .= "Page: " . $_SERVER['PHP_SELF'] . ' ' . ProgramTitle() . " \n\n";
$message .= "Failure Notice: {$failnote} \n";
$message .= "Additional Info: {$additional} \n";
$message .= "\n {$sql} \n";
$message .= "Request Array: \n" . ShowVar($_REQUEST, 'Y', 'N');
$message .= "\n\nSession Array: \n" . ShowVar($_SESSION, 'Y', 'N');
mail($openSISNotifyAddress, 'openSIS Database Error', $message);
}
die;
}
示例13: DeletePromptBigString
function DeletePromptBigString($title, $queryString)
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>' . $queryString;
PopTable('header', 'Confirm Delete');
echo "<CENTER><h4>Are you sure you want to {$action} that " . (strpos($title, ' ') === false ? ucwords($title) : $title) . "?</h4><br><FORM action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST><INPUT type=submit class=btn_medium value=OK> <INPUT type=button class=btn_medium name=delete_cancel value=Cancel onclick='load_link(\"Modules.php?modname={$_REQUEST['modname']}&{$queryString}\");'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}
示例14: PromptCourseWarning
function PromptCourseWarning($title = 'Confirm', $question = '', $message = '', $pdf = '')
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
if ($pdf == true) {
$tmp_REQUEST['_openSIS_PDF'] = true;
}
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', '' . _($title) . '');
echo "<CENTER><h4>" . _($question) . "</h4><FORM action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST>" . _($message) . "<BR><BR><INPUT type=button class=btn_medium name=delete_cancel value=" . _('Cancel') . " onclick='javascript:history.go(-1);'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}
示例15: DeletePrompt_GradeLevel
function DeletePrompt_GradeLevel($title, $action = 'delete')
{
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['delete_ok']);
$PHP_tmp_SELF = PreparePHP_SELF($tmp_REQUEST);
if (!$_REQUEST['delete_ok'] && !$_REQUEST['delete_cancel']) {
echo '<BR>';
PopTable('header', '' . _('Confirm') . '' . (strpos($action, ' ') === false ? ' ' . ucwords($action) : ''));
echo "<CENTER><h4>" . _('Are you sure you want to') . "" . _($action) . "" . _('that') . " " . _($title) . "" . _('?') . "</h4><br><FORM action={$PHP_tmp_SELF}&delete_ok=1 METHOD=POST><INPUT type=submit class=btn_medium value=" . _('OK') . "> <INPUT type=button class=btn_medium name=delete_cancel value=" . _('Cancel') . " onclick='window.location=\"Modules.php?modname=School_Setup/GradeLevels.php\"'></FORM></CENTER>";
PopTable('footer');
return false;
} else {
return true;
}
}