本文整理汇总了PHP中WrapTabs函数的典型用法代码示例。如果您正苦于以下问题:PHP WrapTabs函数的具体用法?PHP WrapTabs怎么用?PHP WrapTabs使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了WrapTabs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PopTable
function PopTable($action, $title = 'Search', $table_att = '', $cell_padding = '5')
{
global $_ROSARIO;
if ($action == 'header') {
//modif Francois: css WPadmin
if (!empty($_REQUEST['_ROSARIO_PDF'])) {
echo '<TABLE class="cellpadding-6" ' . $table_att . '>';
echo '<TR><TD class="width-100p center" style="background-color:' . Preferences('HEADER') . ';">';
} else {
echo '<TABLE class="postbox cellspacing-0 cellpadding-0" ' . $table_att . '>';
echo '<TR><TD class="center">';
}
if (is_array($title)) {
echo WrapTabs($title, $_ROSARIO['selected_tab']);
} else {
echo DrawTab($title);
}
echo '</TD></TR>
<TR><TD>';
// Start content table.
echo '<TABLE style="padding:' . $cell_padding . 'px;" class="width-100p cellspacing-0"><tr><td>';
} elseif ($action == 'footer') {
// Close embeded table.
echo '</td></tr></TABLE>';
echo '</TD>
</TR>
</TABLE>';
}
}
示例2: PopTableCustom
function PopTableCustom($action, $title = 'Search', $table_att = '', $cell_padding = '5')
{
global $_CENTRE;
if ($action == 'header') {
echo "<CENTER>\n\t\t\t<TABLE cellpadding=0 cellspacing=0 {$table_att}>";
echo "<TR><TD align=center colspan=3>";
if (is_array($title)) {
echo WrapTabs($title, $_CENTRE['selected_tab']);
} else {
echo DrawTab($title);
}
echo "</TD></TR>\n\t\t\t<TR><TD background=assets/left_shadow.gif width=4 rowspan=2> </TD><TD background=assets/bottom.gif height=7></TD><TD background=assets/right_shadow.gif width=4 rowspan=2></TD></TR><TR><TD bgcolor=white>";
// Start content table.
echo "<TABLE cellpadding=" . $cell_padding . " cellspacing=0 width=100%><tr><td bgcolor=white>";
} elseif ($action == 'footer') {
// Close embeded table.
echo "</td></tr></TABLE>";
// 2nd cell is for shadow.....
echo "</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD background=assets/left_corner_shadow.gif height=6 width=4></TD>\n\t\t\t<TD background=assets/bottom_shadow.gif height=6></TD>\n\t\t\t<TD height=6 width=4 background=assets/right_corner_shadow.gif></TD>\n\t\t</TR></TABLE></CENTER>";
}
}
示例3: DrawHeader
DrawHeader(DateInputAY($date, 'date', 4) . $date_note);
echo '</div>';
}
}
//echo '<input type=hidden name=period value='.$_REQUEST['period'].' />';
echo "<div style='padding-left:10px; padding-top:8px; float:left;'><input type='button' value='Go' class='btn_medium' onClick='document.location.href=\"Modules.php?modname=users/TeacherPrograms.php?include=attendance/TakeAttendance.php&period=" . strip_tags(trim($_REQUEST[period])) . "&include=attendance/TakeAttendance.php&day_date=\"+this.form.day_date.value+\"&year_date=\"+this.form.year_date.value+\"&table=0&month_date=\"+this.form.month_date.value;' /></div><div style='clear:both;'></div>";
DrawHeader($note, $note1);
$LO_columns = array('FULL_NAME' => 'Student', 'STUDENT_ID' => 'Student ID', 'GRADE_ID' => 'Grade') + $columns;
$tabs[] = array('title' => 'Attendance', 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=0&month_date={$_REQUEST['month_date']}&day_date={$_REQUEST['day_date']}&year_date={$_REQUEST['year_date']}");
$categories_RET = DBGet(DBQuery('SELECT ID,TITLE FROM attendance_code_categories WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\''));
foreach ($categories_RET as $category) {
$tabs[] = array('title' => $category['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&table={$category['ID']}&month_date={$_REQUEST['month_date']}&day_date={$_REQUEST['day_date']}&year_date={$_REQUEST['year_date']}");
}
echo '<BR>';
if (count($categories_RET)) {
echo '<CENTER>' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&table={$_REQUEST['table']}&month_date={$_REQUEST['month_date']}&day_date={$_REQUEST['day_date']}&year_date={$_REQUEST['year_date']}") . '</CENTER>';
$extra = array('download' => true, 'search' => true);
$singular = 'Student';
$plural = 'Students';
} else {
$extra = array();
$singular = 'Student';
$plural = 'Students';
}
if (!$mp_id) {
echo "<table align=center><tr><td class=note></td><td class=note_msg>The selected date is not in a school quarter.</td></tr></table>";
} else {
if (count($course_RET) != 0) {
echo '<div style="overflow:auto; width:840px;">';
$posted_date2 = ucfirst(strtolower($_REQUEST['month_date'])) . '-' . $_REQUEST['day_date'] . '-' . $_REQUEST['year_date'];
if ($_REQUEST['month_date'] && $_REQUEST['day_date'] && $_REQUEST['year_date']) {
示例4: array
}
$LO_columns += array('SORT_ORDER' => _('Sort Order'), 'COLOR' => _('Color'));
$link['add']['html'] = array('TITLE' => _makeTypeInput('', 'TITLE'), 'SORT_ORDER' => _makeTypeInput('', 'SORT_ORDER'), 'COLOR' => _makeColorInput('', 'COLOR'));
if (Preferences('WEIGHT', 'Gradebook') == 'Y') {
$link['add']['html']['FINAL_GRADE_PERCENT'] = _makeTypeInput('', 'FINAL_GRADE_PERCENT');
}
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&tab_id=new&allow_edit={$_REQUEST['allow_edit']}";
$link['remove']['variables'] = array('id' => 'ASSIGNMENT_TYPE_ID');
$link['add']['html']['remove'] = button('add');
$tabs[] = array('title' => button('white_add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=new&allow_edit={$_REQUEST['allow_edit']}");
$subject = 'Assignmemt Types';
}
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update&tab_id={$_REQUEST['tab_id']} method=POST>";
DrawHeader(CheckBoxOnclick('allow_edit') . ' ' . _('Edit'), SubmitButton(_('Save')));
echo '<BR>';
$LO_options = array('save' => false, 'search' => false, 'header_color' => $types_RET[$_REQUEST['tab_id']][1]['COLOR'], 'header' => WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&tab_id={$_REQUEST['tab_id']}&allow_edit={$_REQUEST['allow_edit']}"));
if ($subject == 'Assignments') {
ListOutput($LO_ret, $LO_columns, _('Assignment'), _('Assignments'), $link, array(), $LO_options);
} else {
ListOutput($LO_ret, $LO_columns, _('Assignment Type'), _('Assignment Types'), $link, array(), $LO_options);
}
echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
echo '</FORM>';
}
function _makeAssnInput($value, $name)
{
global $THIS_RET, $type_options;
if ($THIS_RET['ASSIGNMENT_ID']) {
$id = $THIS_RET['ASSIGNMENT_ID'];
} else {
$id = 'new';
示例5: UserSchool
}
if (!$_REQUEST['modfunc']) {
$sql = 'SELECT TITLE,VALUE, id as ID FROM honor_roll WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY VALUE';
$functions = array('TITLE' => '_makeTextInput', 'VALUE' => 'makeTextInputt');
$LO_columns = array('TITLE' => 'Honor Roll', 'VALUE' => 'Breakoff');
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'VALUE' => makeTextInputt('', 'VALUE'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'ID');
$link['add']['html']['remove'] = button('add');
$LO_ret = DBGet(DBQuery($sql), $functions);
$tabs = array();
$tabs[] = array('title' => 'Honor Roll Setup');
echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
echo '<BR>';
echo '<style type="text/css">#div_margin { margin-top:-20px; _margin-top:-1px; }</style>';
echo WrapTabs($tabs, "");
echo '<div id="div_margin">';
PopTable_wo_header('header');
ListOutputMod($LO_ret, $LO_columns, '', '', $link, array(), array('count' => false, 'download' => false, 'search' => false));
echo '<BR>';
echo '<CENTER>' . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_honor_roll();"') . '</CENTER>';
PopTable('footer');
echo '</div>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
示例6: PopTableforWindow
function PopTableforWindow($action, $title = 'Search', $table_att = '', $cell_padding = '0')
{
global $_openSIS;
if ($action == 'header') {
echo "<CENTER>\r\n\t\t\t<TABLE align=left cellpadding=0 cellspacing=0 {$table_att}>";
echo "<TR><TD >";
if (is_array($title)) {
echo WrapTabs($title, $_openSIS['selected_tab']);
} else {
echo "</TD></TR>\r\n\t\t\t<TR><TD>";
}
// Start content table.
echo "<TABLE cellpadding=" . $cell_padding . " cellspacing=0 ><tr><td width=10></td><td >\r\n\t\t<div class='inside_block_top'></div>\r\n <div class='content_block'>";
} elseif ($action == 'footer') {
// Close embeded table.
echo "</div><div class='content_bottom'></div>";
echo "</td></tr></TABLE>";
// 2nd cell is for shadow.....
echo "</TD></TR></TABLE></CENTER>";
}
}
示例7: DBGet
if ($meal_RET) {
echo '<TABLE class="width-100p">';
echo '<TR><TD class="center">';
echo '<B>Today\'s ' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ':</B> ' . $meal_RET[1]['DESCRIPTION'];
echo '</TD></TR></TABLE><HR>';
}
$items_RET = DBGet(DBQuery('SELECT fsi.ITEM_ID,fsi.DESCRIPTION,fsmi.DOES_COUNT,(SELECT COUNT FROM FOOD_SERVICE_COMPLETED WHERE STAFF_ID=\'' . User('STAFF_ID') . '\' AND SCHOOL_DATE=\'' . $date . '\' AND PERIOD_ID=\'' . UserPeriod() . '\' AND ITEM_ID=fsi.ITEM_ID AND MENU_ID=fsmi.MENU_ID) AS COUNT FROM FOOD_SERVICE_ITEMS fsi,FOOD_SERVICE_MENU_ITEMS fsmi WHERE fsmi.MENU_ID=\'' . $_REQUEST['menu_id'] . '\' AND fsi.ITEM_ID=fsmi.ITEM_ID AND fsmi.DOES_COUNT IS NOT NULL ORDER BY fsmi.SORT_ORDER'), array('COUNT' => 'makeTextInput'));
echo '<TABLE class="width-100p"><TR><TD style="width:50%;">';
$LO_columns = array('DESCRIPTION' => _('Item'), 'COUNT' => _('Count'));
if (count($menus_RET) > 1) {
$tabs = array();
foreach ($menus_RET as $id => $meal) {
$tabs[] = array('title' => $meal[1]['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&menu_id={$id}&day_date={$_REQUEST['day_date']}&month_date={$_REQUEST['month_date']}&year_date={$_REQUEST['year_date']}");
}
echo '<BR />';
echo '<span class="center">' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&menu_id={$_REQUEST['menu_id']}&day_date={$_REQUEST['day_date']}&month_date={$_REQUEST['month_date']}&year_date={$_REQUEST['year_date']}") . '</span>';
$extra = array('count' => false, 'download' => false, 'search' => false);
} else {
$extra = array('search' => false);
$plural = $menus_RET[1][1]['TITLE'] . ' ' . _('Items');
$singular = $menus_RET[1][1]['TITLE'] . ' ' . _('Item');
}
ListOutput($items_RET, $LO_columns, $singular, $plural, false, false, $extra);
echo '<span class="center">' . SubmitButton(_('Save')) . '</CENTRE>';
echo '</TD><TD style="width:50%;">';
$extra['SELECT'] .= ',fsa.BALANCE,fssa.STATUS';
$extra['FROM'] .= ',FOOD_SERVICE_ACCOUNTS fsa,FOOD_SERVICE_STUDENT_ACCOUNTS fssa';
$extra['WHERE'] .= ' AND fssa.STUDENT_ID=s.STUDENT_ID AND fsa.ACCOUNT_ID=fssa.ACCOUNT_ID AND fssa.STATUS IS NOT NULL';
if (!$extra['functions']) {
$extra['functions'] = array();
}
示例8: array
$link['remove']['variables'] = array('id' => 'ID');
$tabs[] = array('title' => button('add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=new");
} else {
$sql = "SELECT ID,TITLE,SORT_ORDER FROM ATTENDANCE_CODE_CATEGORIES WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER,TITLE";
$functions = array('TITLE' => '_makeTextInput', 'SORT_ORDER' => '_makeTextInput');
$LO_columns = array('TITLE' => 'Title', 'SORT_ORDER' => 'Sort Order');
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&table=new";
$link['remove']['variables'] = array('id' => 'ID');
$tabs[] = array('title' => button('white_add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=new");
}
$LO_ret = DBGet(DBQuery($sql), $functions);
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update&table={$_REQUEST['table']} method=POST>";
DrawHeader('', SubmitButton(_('Save')));
echo '<BR>';
echo '<CENTER>' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&table={$_REQUEST['table']}") . '</CENTER>';
ListOutput($LO_ret, $LO_columns, '.', '.', $link, array(), array('count' => false, 'download' => false, 'search' => false));
echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'SHORT_NAME' || $name == 'SORT_ORDER') {
$extra = 'size=5 maxlength=10';
}
示例9: button
$link['add']['html']['remove'] = button('add');
} else {
$sql = 'SELECT * FROM REPORT_CARD_COMMENTS WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' AND COURSE_ID IS NULL ORDER BY SORT_ORDER';
$functions = array('SORT_ORDER' => 'makeTextInput', 'TITLE' => 'makeTextInput');
$LO_columns = array('SORT_ORDER' => 'ID', 'TITLE' => 'Comment');
$link['add']['html'] = array('SORT_ORDER' => makeTextInput('', 'SORT_ORDER'), 'TITLE' => makeTextInput('', 'TITLE'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&tab_id=new";
$link['remove']['variables'] = array('id' => 'ID');
$link['add']['html']['remove'] = button('add');
}
$LO_ret = DBGet(DBQuery($sql), $functions);
echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update&course_id={$_REQUEST['course_id']}&tab_id={$_REQUEST['tab_id']} method=POST>";
DrawHeaderHome($course_select, SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_grade_comment();"'));
#echo '<BR>';
echo '<style type="text/css">#div_margin { margin-top:-20px; _margin-top:-1px; }</style>';
echo '<CENTER>' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&course_id={$_REQUEST['course_id']}&tab_id={$_REQUEST['tab_id']}") . '</CENTER>';
echo '<div id="div_margin">';
PopTable_wo_header('header');
echo "<table width=300px height=120px><tr><td>";
//hack for an empty poptable
ListOutputMod($LO_ret, $LO_columns, '', '', $link, array(), array('count' => false, 'download' => false, 'search' => false));
echo "</td></tr></table>";
PopTable('footer');
echo '</div>';
echo '<CENTER>' . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_grade_comment();"') . '</CENTER>';
echo '</FORM>';
}
function makeGradesInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
示例10: array
}
}
$columns = array('FULL_NAME' => 'Teacher');
if (!$_REQUEST['period']) {
foreach ($periods_RET as $period) {
$columns[$period['PERIOD_ID']] = $period['TITLE'];
}
}
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeader(PrepareDate($date, '_date') . ' : ' . $period_select . ' : <INPUT type=submit value=' . _('Go') . '>');
echo '</FORM>';
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=add&menu_id={$_REQUEST['menu_id']} method=POST>";
if (count($menus_RET) > 1) {
$tabs = array();
foreach ($menus_RET as $id => $menu) {
$tabs[] = array('title' => $menu[1]['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&menu_id={$id}");
}
echo '<BR>';
echo '<CENTER>' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&menu_id={$_REQUEST['menu_id']}") . '</CENTER>';
}
echo '<TABLE width=100%><TR><TD>';
$singular = sprintf(_('Teacher who takes %s counts'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
$plural = sprintf(_('Teachers who take %s counts'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
ListOutput($staff_RET, $columns, $singular, $plural);
echo '</TD></TR>';
$totals = array_values($totals);
unset($totals[0]);
echo '<TR><TD>';
ListOutput($totals, array('DESCRIPTION' => _('Item'), 'COUNT' => _('Total Count')), _('Item Total'), _('Item Totals'));
echo '</TD></TR></TABLE>';
echo '</FORM>';
示例11: PopTable_grade_header
PopTable_grade_header('header');
echo "<TABLE align=center><TR><TD>";
echo SelectInput(null, 'new_sms', 'New Marking Period', $mpoptions, false, null);
echo "</TD>";
echo "<TD WIDTH=14%></TD>";
echo "<TD>";
echo $sms_grade_level;
echo "</TD></TR></TABLE>";
PopTable('footer');
}
} else {
echo '<tr><td align=right width=50% valign=top>Grade:</td><td width=50% valign=top>' . $sms_grade_level . '</td></tr><tr><td class=clear></td></tr></table>';
$tabs = array();
$tabs[] = array('title' => 'grades', 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=grades&mp_id={$mp_id}");
$tabs[] = array('title' => 'Credits', 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=credits&mp_id={$mp_id}");
echo '<CENTER>' . WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&tab_id={$tab_id}&mp_id={$mp_id}") . '</CENTER>';
$sql = 'SELECT ID,COURSE_TITLE,GRADE_PERCENT,GRADE_LETTER,
IF(ISNULL(UNWEIGHTED_GP), WEIGHTED_GP,UNWEIGHTED_GP ) AS GP,WEIGHTED_GP as WEIGHTED_GP,
GP_SCALE,CREDIT_ATTEMPTED,CREDIT_EARNED,CREDIT_CATEGORY
FROM student_report_card_grades WHERE STUDENT_ID = ' . $student_id . ' AND MARKING_PERIOD_ID = ' . $mp_id . ' ORDER BY ID';
//build forms based on tab selected
if ($_REQUEST['tab_id'] == 'grades' || $_REQUEST['tab_id'] == '') {
$functions = array('COURSE_TITLE' => 'makeTextInput', 'GRADE_PERCENT' => 'makeTextInput', 'GRADE_LETTER' => 'makeTextInput', 'GP' => 'makeTextInput', 'WEIGHTED_GP' => 'makeCheckboxInput', 'GP_SCALE' => 'makeTextInput');
$LO_columns = array('COURSE_TITLE' => 'Course Name', 'GRADE_PERCENT' => 'Percentage', 'GRADE_LETTER' => 'Letter Grade', 'GP' => 'GP Value', 'WEIGHTED_GP' => 'Weighted GP', 'GP_SCALE' => 'Grade Scale');
$link['add']['html'] = array('COURSE_TITLE' => makeTextInput('', 'COURSE_TITLE'), 'GRADE_PERCENT' => makeTextInput('', 'GRADE_PERCENT'), 'GRADE_LETTER' => makeTextInput('', 'GRADE_LETTER'), 'GP' => makeTextInput('', 'GP'), 'WEIGHTED_GP' => makeCheckboxInput('', 'WEIGHTED_GP'), 'GP_SCALE' => makeTextInput('', 'GP_SCALE'));
} else {
$functions = array('COURSE_TITLE' => 'makeTextInput', 'CREDIT_ATTEMPTED' => 'makeTextInput', 'CREDIT_EARNED' => 'makeTextInput', 'CREDIT_CATEGORY' => 'makeTextInput');
$LO_columns = array('COURSE_TITLE' => 'Course Name', 'CREDIT_ATTEMPTED' => 'Credit Attempted', 'CREDIT_EARNED' => 'Credit Earned', 'CREDIT_CATEGORY' => 'Credit Category');
$link['add']['html'] = array('COURSE_TITLE' => makeTextInput('', 'COURSE_TITLE'), 'CREDIT_ATTEMPTED' => makeTextInput('', 'CREDIT_ATTEMPTED'), 'CREDIT_EARNED' => makeTextInput('', 'CREDIT_EARNED'), 'CREDIT_CATEGORY' => makeTextInput('', 'CREDIT_CATEGORY'));
}
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&mp_id={$mp_id}";
示例12: UserSchool
$sql = 'SELECT * FROM REPORT_CARD_GRADE_SCALES WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' ORDER BY SORT_ORDER,ID';
$functions = array('TITLE' => 'makeTextInput', 'GP_SCALE' => 'makeTextInput', 'COMMENT' => 'makeTextInput', 'HHR_GPA_VALUE' => 'makeGradesInput', 'HR_GPA_VALUE' => 'makeGradesInput', 'SORT_ORDER' => 'makeTextInput');
$LO_columns = array('TITLE' => _('Gradescale'), 'GP_SCALE' => _('Scale Value'), 'COMMENT' => _('Comment'), 'HHR_GPA_VALUE' => _('High Honor Roll GPA Min'), 'HR_GPA_VALUE' => _('Honor Roll GPA Min'), 'SORT_ORDER' => _('Sort Order'));
$link['add']['html'] = array('TITLE' => makeTextInput('', 'TITLE'), 'GP_SCALE' => makeTextInput('', 'GP_SCALE'), 'COMMENT' => makeTextInput('', 'COMMENT'), 'HHR_GPA_VALUE' => makeGradesInput('', 'HHR_GPA_VALUE'), 'HR_GPA_VALUE' => makeGradesInput('', 'HR_GPA_VALUE'), 'SORT_ORDER' => makeTextInput('', 'SORT_ORDER'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&tab_id=new";
$link['remove']['variables'] = array('id' => 'ID');
$link['add']['html']['remove'] = button('add');
$tabs[] = array('title' => button('white_add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&tab_id=new");
$singular = 'Grade Scale';
$plural = 'Grade Scales';
}
$LO_ret = DBGet(DBQuery($sql), $functions);
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update&tab_id={$_REQUEST['tab_id']} method=POST>";
DrawHeader('', SubmitButton(_('Save')));
echo '<BR>';
$LO_options = array('save' => false, 'search' => false, 'header' => WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&tab_id={$_REQUEST['tab_id']}"));
ListOutput($LO_ret, $LO_columns, $singular, $plural, $link, array(), $LO_options);
echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
echo '</FORM>';
}
function makeGradesInput($value, $name)
{
global $THIS_RET, $grade_scale_select, $teacher_id, $config_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'GRADE_SCALE_ID') {
return SelectInput($value, "values[{$id}][{$name}]", '', $grade_scale_select, false);
} elseif ($name == 'COMMENT') {
示例13: array
for ($i = 1; $i <= $max_current_commentsB; $i++) {
$LO_columns += array('CB' . $i => sprintf(_('Comment %d'), $i));
}
if (count($commentsB_select) && AllowEdit() && !isset($_REQUEST['_CENTRE_PDF'])) {
$LO_columns += array('CB' . $i => _('Add Comment'));
}
}
if (!$hide_non_attendance_comment || $course_RET[1]['ATTENDANCE'] == 'Y') {
$LO_columns += array('COMMENT' => _('Comment'));
}
foreach ($categories_RET as $id => $category) {
$tabs[] = array('title' => $category[1]['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&mp={$_REQUEST['mp']}&tab_id={$id}") + ($category[1]['COLOR'] ? array('color' => $category[1]['COLOR']) : array());
}
$LO_options = array('yscroll' => true, 'save' => false, 'search' => false);
if (count($categories_RET) && GetMP($_REQUEST['mp'], 'DOES_COMMENTS') == 'Y') {
$LO_options['header'] = WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&mp={$_REQUEST['mp']}&tab_id={$_REQUEST['tab_id']}");
if ($categories_RET[$_REQUEST['tab_id']][1]['COLOR']) {
$LO_options['header_color'] = $categories_RET[$_REQUEST['tab_id']][1]['COLOR'];
}
}
ListOutput($stu_RET, $LO_columns, 'Student', 'Students', false, array(), $LO_options);
echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
echo "</FORM>";
function _makeLetterPercent($student_id, $column)
{
global $THIS_RET, $current_RET, $import_RET, $grades_select, $student_count, $tabindex, $grade_scale_id, $does_letter_percent;
if ($import_RET[$student_id]) {
$select_percent = $import_RET[$student_id][1]['GRADE_PERCENT'];
$select_grade = $import_RET[$student_id][1]['REPORT_CARD_GRADE_ID'];
$div = false;
} else {
示例14: DrawHeader
}
//modif Francois: add label on checkbox
DrawHeader($type_select . $assignment_select, $_REQUEST['assignment_id'] ? SubmitButton(_('Save')) : '', '<label>' . CheckBoxOnclick('include_inactive') . ' ' . _('Include Inactive Students') . '</label> <label>' . CheckBoxOnclick('include_all') . ' ' . _('Include Inactive Assignments') . '</label>');
if ($_REQUEST['assignment_id'] && $_REQUEST['assignment_id'] != 'all') {
$assigned_date = $assignments_RET[$_REQUEST['assignment_id']][1]['ASSIGNED_DATE'];
$due_date = $assignments_RET[$_REQUEST['assignment_id']][1]['DUE_DATE'];
$due = $assignments_RET[$_REQUEST['assignment_id']][1]['DUE'];
DrawHeader('<b>' . Localize('colon', _('Assigned Date')) . '</b> ' . ($assigned_date ? ProperDate($assigned_date) : _('N/A')) . ', <b>' . Localize('colon', _('Due Date')) . '</b> ' . ($due_date ? ProperDate($due_date) : _('N/A')) . ($due ? ' - <b>' . _('Assignment is Due') . '</b>' : ''));
}
if ($_REQUEST['type_id'] && $types_RET[$_REQUEST['type_id']][1]['COLOR']) {
$LO_options['header_color'] = $types_RET[$_REQUEST['type_id']][1]['COLOR'];
}
if (!UserStudentID() && $_REQUEST['assignment_id'] == 'all') {
$LO_options['yscroll'] = true;
}
$LO_options['header'] = WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&type_id=" . ($_REQUEST['type_id'] ? $_REQUEST['type_id'] : ($_REQUEST['assignment_id'] && $_REQUEST['assignment_id'] != 'all' ? $assignments_RET[$_REQUEST['assignment_id']][1]['ASSIGNMENT_TYPE_ID'] : '')) . ($_REQUEST['assignment_id'] == 'all' ? '&assignment_id=all' : '') . (UserStudentID() ? '&student_id=' . UserStudentID() : '') . "&include_inactive={$_REQUEST['include_inactive']}&include_all={$_REQUEST['include_all']}");
ListOutput($stu_RET, $LO_columns, $item, $items, $link, array(), $LO_options);
echo $_REQUEST['assignment_id'] ? '<span class="center">' . SubmitButton(_('Save')) . '</span>' : '';
echo '</FORM>';
function _makeExtraAssnCols($assignment_id, $column)
{
global $THIS_RET, $assignments_RET, $current_RET, $points_RET, $tabindex, $max_allowed, $total, $programconfig;
switch ($column) {
case 'POINTS':
$tabindex++;
if (!$assignment_id) {
$total = $total_points = 0;
if (count($points_RET[$THIS_RET['STUDENT_ID']])) {
foreach ($points_RET[$THIS_RET['STUDENT_ID']] as $partial_points) {
if ($partial_points['PARTIAL_TOTAL'] != 0 || $programconfig[User('STAFF_ID')]['WEIGHT'] != 'Y') {
$total += $partial_points['PARTIAL_POINTS'];
示例15: array
$link['add']['html'] = array('TITLE' => makeCommentsInput('', 'TITLE'), 'SCALE_ID' => makeCommentsInput('', 'SCALE_ID'), 'SORT_ORDER' => makeCommentsInput('', 'SORT_ORDER'));
$link['remove']['link'] = 'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . '&tab_id=' . $_REQUEST['tab_id'];
$link['remove']['variables'] = array('id' => 'ID');
$link['add']['html']['remove'] = button('add');
if (User('PROFILE') == 'admin') {
$tabs[] = array('title' => button('add', '', '', 14), 'link' => 'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . '&tab_id=new');
}
}
$LO_ret = DBGet(DBQuery($sql), $functions);
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=update&course_id=' . $_REQUEST['course_id'] . '&tab_id=' . $_REQUEST['tab_id'] . '" method="POST">';
DrawHeader($subject_select . ' : ' . $course_select, SubmitButton(_('Save')));
//modif Francois: fix SQL bug invalid sort order
if (isset($error)) {
echo $error;
}
$LO_options = array('save' => false, 'search' => false, 'header_color' => $categories_RET[$_REQUEST['tab_id']][1]['COLOR'], 'header' => WrapTabs($tabs, 'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . '&tab_id=' . $_REQUEST['tab_id']));
//ListOutput($LO_ret,$LO_columns,$singular,$plural,$link,array(),$LO_options);
if ($_REQUEST['tab_id'] == 'new') {
ListOutput($LO_ret, $LO_columns, 'Category', 'Categories', $link, array(), $LO_options);
} else {
ListOutput($LO_ret, $LO_columns, 'Comment', 'Comments', $link, array(), $LO_options);
}
echo '<span class="center">' . SubmitButton(_('Save')) . '</span>';
echo '</FORM>';
}
function makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {