本文整理汇总了PHP中NoInput函数的典型用法代码示例。如果您正苦于以下问题:PHP NoInput函数的具体用法?PHP NoInput怎么用?PHP NoInput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NoInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
$header .= '</TR>';
// $header .= '<TR><TD valign=top colspan=2>'.($RET['DATE_ERROR']=='Y'?'<Font color=red>Due date earlier than assigned date!</FONT>':'').'</TD></TR>';
$header .= '</TABLE>';
} elseif ($_REQUEST['assignment_type_id']) {
echo "<FORM name=F3 action=Modules.php?modname={$_REQUEST['modname']}&table=gradebook_assignment_types";
if ($_REQUEST['assignment_type_id'] != 'new') {
echo "&assignment_type_id={$_REQUEST['assignment_type_id']}";
}
echo " method=POST>";
DrawHeader($title, $delete_button . '<INPUT type=submit value=' . _('Save') . ' onclick="formcheck_assignments();">');
$header .= '<TABLE cellpadding=3 bgcolor=#F0F0F1 width=100%>';
$header .= '<TR>';
$header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_type_id'] . '][TITLE]', '' . _('Title') . '', 'size=36') . '</TD>';
if ($programconfig['WEIGHT'] == 'Y') {
$header .= '<TD>' . TextInput($RET['FINAL_GRADE_PERCENT'], 'tables[' . $_REQUEST['assignment_type_id'] . '][FINAL_GRADE_PERCENT]', ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '<FONT color=red>') . '' . _('Percent of Final Grade') . '' . ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '</FONT>')) . '</TD>';
$header .= '<TD>' . NoInput($RET['TOTAL_PERCENT'] == 1 ? '100%' : '<FONT COLOR=red>' . 100 * $RET['TOTAL_PERCENT'] . '%</FONT>', '' . _('Percent Total') . '') . '</TD>';
}
$header .= '</TR>';
$header .= '</TABLE>';
} else {
$header = false;
}
if ($header) {
DrawHeader($header);
echo '</FORM>';
}
// DISPLAY THE MENU
$LO_options = array('save' => false, 'search' => false, 'add' => true);
echo '<TABLE><TR>';
if (count($types_RET)) {
if ($_REQUEST['assignment_type_id']) {
示例2: SelectInput
#
#***************************************************************************************
//include_once('modules/Users/includes/functions_staff.php');
#########################################################ENROLLMENT##############################################
echo '<TABLE width=100% border=0 cellpadding=3>';
echo '<TR><td valign="top">';
echo '<TABLE border=0>';
echo '<tr><td style=width:120px><span class=red>*</span>Name</td><td>:</td><td>';
$_SESSION['staff_selected'] = $staff['STAFF_ID'];
if ($_REQUEST['staff_id'] == 'new') {
echo '<TABLE><TR><TD>' . SelectInput($staff['TITLE'], 'staff[TITLE]', '<span class=red>Salutation</span>', array('Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', 'Miss' => 'Miss', 'Dr' => 'Dr', 'Rev' => 'Rev'), '') . '</TD><TD>' . TextInput($staff['FIRST_NAME'], 'staff[FIRST_NAME]', '<FONT class=red>First</FONT>', 'maxlength=50 class=cell_floating') . '</TD><TD>' . TextInput($staff['MIDDLE_NAME'], 'staff[MIDDLE_NAME]', 'Middle', 'maxlength=50 class=cell_floating') . '</TD><TD>' . TextInput($staff['LAST_NAME'], 'staff[LAST_NAME]', '<FONT color=red>Last</FONT>', 'maxlength=50 class=cell_floating') . '</TD><TD>' . SelectInput($staff['NAME_SUFFIX'], 'staff[NAME_SUFFIX]', 'Suffix', array('Jr.' => 'Jr.', 'Sr.' => 'Sr.', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'), '', 'style="font-size:14px; font-weight:bold;"') . '</TD></TR></TABLE>';
} else {
echo '<DIV id=user_name><div onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', SelectInput($staff['TITLE'], 'staff[TITLE]', 'Salutation', array('Mr.' => 'Mr.', 'Mrs.' => 'Mrs.', 'Ms.' => 'Ms.', 'Miss' => 'Miss', 'Dr' => 'Dr', 'Rev' => 'Rev'), '', '', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput(trim($staff['FIRST_NAME']), 'staff[FIRST_NAME]', (!$staff['FIRST_NAME'] ? '<FONT color=red>' : '') . 'First' . (!$staff['FIRST_NAME'] ? '</FONT>' : ''), 'maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($staff['MIDDLE_NAME'], 'staff[MIDDLE_NAME]', 'Middle', 'size=3 maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput(trim($staff['LAST_NAME']), 'staff[LAST_NAME]', (!$staff['LAST_NAME'] ? '<FONT color=red>' : '') . 'Last' . (!$staff['LAST_NAME'] ? '</FONT>' : ''), 'maxlength=50', false)) . '</TD><TD>' . str_replace('"', '\\"', SelectInput($staff['NAME_SUFFIX'], 'staff[NAME_SUFFIX]', '', array('Jr.' => 'Jr.', 'Sr.' => 'Sr.', 'II' => 'II', 'III' => 'III', 'IV' => 'IV', 'V' => 'V'), '', 'style="font-size:14px; font-weight:bold;"', false)) . '</TD></TR></TABLE>","user_name",true);\'>' . (!$staff['TITLE'] && !$staff['FIRST_NAME'] && !$staff['MIDDLE_NAME'] && !$staff['LAST_NAME'] && !$staff['NAME_SUFFIX'] ? '-' : $staff['TITLE'] . ' ' . $staff['FIRST_NAME'] . ' ' . $staff['MIDDLE_NAME'] . ' ' . $staff['LAST_NAME']) . ' ' . $staff['NAME_SUFFIX'] . '</div></DIV><small>' . (!$staff['FIRST_NAME'] || !$staff['LAST_NAME'] ? '<FONT color=red>' : '<FONT color=' . Preferences('TITLES') . '>') . '</FONT></small>';
}
echo '</td></tr>';
echo '<tr><td>Staff ID</td><td>:</td><td>' . NoInput($staff['STAFF_ID'], '') . '</td></tr>';
echo '<tr><td>Alternate ID</td><td>:</td><td>';
//if($_REQUEST['staff_id']=='new')
//{
echo TextInput($staff['ALTERNATE_ID'], 'staff[ALTERNATE_ID]', '', 'size=12 maxlength=100 class=cell_floating ') . '</td></tr>';
//echo NoInput('Will automatically be assigned','');
// echo '<span id="ajax_output_stid"></span>';
//}
//else
//{
// echo NoInput(str_repeat('*',strlen($staff['ALTERNATE_ID'])),'','','class=cell_medium').'</td></tr>';
////echo NoInput($staff['ALTERNATE_ID'],'','','size=10 class=cell_medium maxlength=10').'</td></tr>';
//}
$options = array('Dr.' => 'Dr.', 'Mr.' => 'Mr.', 'Ms.' => 'Ms.', 'Rev.' => 'Rev.', 'Miss.' => 'Miss.');
echo '<tr><td><span class=red></span>Gender</td><td>:</td><td>' . SelectInput($staff['GENDER'], 'staff[GENDER]', '', array('Male' => 'Male', 'Female' => 'Female'), 'N/A', '') . '</td></tr>';
echo '<tr><td><span class=red></span>Date of Birth</td><td>:</td><td>';
示例3: DBGet
// find other students associated with the same account
$xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'" . ($_REQUEST['include_inactive'] ? '' : " AND exists(SELECT '' FROM STUDENT_ENROLLMENT WHERE STUDENT_ID=s.STUDENT_ID AND SYEAR='" . UserSyear() . "' AND (START_DATE<=CURRENT_DATE AND (END_DATE IS NULL OR CURRENT_DATE<=END_DATE)))")));
echo '<FORM action="Modules.php?modname=' . $_REQUEST[modname] . '&modfunc=update" method="POST">';
DrawHeader('<label>' . CheckBoxOnclick('include_inactive') . ' ' . _('Include Inactive Students in Shared Account') . '</label>', SubmitButton(_('Save')));
echo '<BR />';
//modif Francois: fix SQL bug invalid numeric data
if (isset($error)) {
echo $error;
}
PopTable('header', _('Account Information'), 'width="100%"');
echo '<TABLE class="width-100p">';
echo '<TR>';
echo '<TD class="valign-top">';
echo '<TABLE class="width-100p"><TR>';
echo '<TD class="valign-top">' . NoInput($student['FULL_NAME'], '<b>' . $student['STUDENT_ID'] . '</b>') . '</TD>';
echo '<TD class="valign-top">' . NoInput(red($student['BALANCE']), _('Balance')) . '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<HR>';
echo '<TABLE class="width-100p cellspacing-0 cellpadding-0">';
echo '<TR><TD class="valign-top">';
echo '<TABLE class="width-100p cellpadding-6">';
echo '<TR>';
echo '<TD>';
// warn if account non-existent (balance query failed)
if ($student['BALANCE'] == '') {
//var_dump($student['ACCOUNT_ID']);
echo TextInput(array($student['ACCOUNT_ID'], '<span style="color:red">' . $student['ACCOUNT_ID'] . '</span>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
$warning = _('Non-existent account!');
echo button('warning', '', '"#" onMouseOver=\'stm(["' . _('Warning') . '","' . str_replace('"', '\\"', str_replace("'", ''', $warning)) . '"],tipmessageStyle);\' onMouseOut=\'htm()\'');
} else {
示例4: elseif
echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N"> No Access <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y" checked> Access</TD></TR></TABLE>';
}
echo '<div id="hideShow">';
} elseif (!$this_school_mod['USERNAME'] || $this_school['OPENSIS_ACCESS'] == 'N') {
echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N" onClick="hidediv();" checked> No Access <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y" onClick="showdiv();"> Access</TD></TR></TABLE>';
echo '<div id="hideShow" style="display:none">';
}
echo '<TABLE>';
$staff_profile = DBGet(DBQuery("SELECT PROFILE_ID FROM staff WHERE STAFF_ID='" . UserStaffID() . "'"));
echo '<TR><td>Profile</td><td>:</td><TD>' . SelectInput($this_school['OPENSIS_PROFILE'], 'values[SCHOOL][OPENSIS_PROFILE]', '', $option, false, 'id=values[SCHOOL][OPENSIS_PROFILE]') . '</TD><tr>';
echo '<TR><td>Username<span class=red>*</span></td><td>:</td><TD>';
if (!$this_school_mod['USERNAME']) {
echo TextInput('', 'USERNAME', '', 'size=20 maxlength=50 class=cell_floating onblur="usercheck_init_staff(this)"');
echo '<span id="ajax_output_st"></span><input type=hidden id=usr_err_check value=0>';
} else {
echo NoInput($this_school_mod['USERNAME'], '', '', 'class=cell_medium onkeyup="usercheck_init(this)"') . '<div id="ajax_output"></div>' . '</TD></tr>';
}
echo '<TR><td>Password<span class=red>*</span></td><td>:</td><TD>';
if (!$this_school_mod['PASSWORD']) {
echo TextInput('', 'PASSWORD', '', 'size=20 maxlength=100 class=cell_floating AUTOCOMPLETE = off onblur=passwordStrength(this.value);validate_password_staff(this.value);');
echo '<span id="ajax_output_st"></span>';
} else {
echo TextInput(array($this_school_mod['PASSWORD'], str_repeat('*', strlen($this_school_mod['PASSWORD']))), 'staff_school[PASSWORD]', '', 'size=20 maxlength=100 class=cell_floating AUTOCOMPLETE = off onkeyup=passwordStrength(this.value);validate_password(this.value);');
}
echo "<td><span id='passwordStrength'></span></td>";
echo '<TR>';
echo '<TD>Disable User</TD><TD>:</TD><TD>';
if ($this_school_mod['IS_DISABLE'] == 'Y') {
$dis_val = 'Y';
} else {
$dis_val = 'N';
示例5: DBGet
}
if (!$_REQUEST['modfunc'] && UserStaffID()) {
$staff = DBGet(DBQuery("SELECT s.STAFF_ID,s.FIRST_NAME||' '||s.LAST_NAME,(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,(SELECT BARCODE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BARCODE FROM STAFF s WHERE s.STAFF_ID='" . UserStaffID() . "'"));
$staff = $staff[1];
echo '<TABLE width=100%>';
echo '<TR>';
echo '<TD valign=top>';
echo '<TABLE width=100%><TR>';
//echo '<TD valign=top>'.NoInput($staff['FULL_NAME'],$staff['STAFF_ID']);
//if($staff['BALANCE']=='')
//{
// $warning = 'This user does not have a Meal Account.';
// echo '<BR>'.button('warning','','# onMouseOver=\'stm(["Warning","'.$warning.'"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
//}
//echo '</TD>';
echo '<TD valign=top>' . NoInput(($staff['BALANCE'] < 0 ? '<FONT color=red>' : '') . $staff['BALANCE'] . ($staff['BALANCE'] < 0 ? '</FONT>' : ''), 'Balance');
if ($staff['BALANCE'] == '') {
$warning = 'This user does not have a Meal Account.';
echo '<BR>' . button('warning', '', '# onMouseOver=\'stm(["Warning","' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
}
echo '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<HR>';
echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0>';
echo '<TR><TD valign=top>';
echo '<TABLE border=0 cellpadding=6 width=100%>';
echo '<TR>';
$options = array('Inactive' => 'Inactive', 'Disabled' => 'Disabled', 'Closed' => 'Closed');
echo '<TD>' . SelectInput($staff['STATUS'], 'food_service[STATUS]', 'Status', $options, 'Active') . '</TD>';
echo '<TD>' . TextInput($staff['BARCODE'], 'food_service[BARCODE]', 'Barcode', 'size=12 maxlength=25') . '</TD>';
示例6: unset
}
}
//unset($_REQUEST['modfunc']);
unset($_REQUEST['food_service']);
unset($_SESSION['_REQUEST_vars']['food_service']);
}
if (!$_REQUEST['modfunc'] && UserStudentID()) {
$student = DBGet(DBQuery("SELECT s.STUDENT_ID," . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . "||' '||s.LAST_NAME AS FULL_NAME,fssa.ACCOUNT_ID,fssa.STATUS,fssa.DISCOUNT,fssa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fssa.STUDENT_ID=s.STUDENT_ID"));
$student = $student[1];
// find other students associated with the same account
$xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID," . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . "||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'"));
echo '<TABLE width=100%>';
echo '<TR>';
echo '<TD valign=top>';
echo '<TABLE width=100%><TR>';
echo '<TD valign=top>' . NoInput(($student['BALANCE'] < 0 ? '<FONT color=red>' : '') . $student['BALANCE'] . ($student['BALANCE'] < 0 ? '</FONT>' : ''), _('Balance')) . '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<HR>';
echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0>';
echo '<TR><TD valign=top>';
echo '<TABLE border=0 cellpadding=6 width=100%>';
echo '<TR>';
echo '<TD>';
// warn if account non-existent (balance query failed)
if ($student['BALANCE'] == '') {
echo TextInput(array($student['ACCOUNT_ID'], '<FONT color=red>' . $student['ACCOUNT_ID'] . '</FONT>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
$warning = 'Non-existent account!';
echo button('warning', '', '# onMouseOver=\'stm(["Warning","' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
} else {
echo TextInput($student['ACCOUNT_ID'], 'food_service[ACCOUNT_ID]', 'Account ID', 'size=12 maxlength=10');
示例7: TextInput
$header .= '<TABLE cellpadding=4 width=100%>';
$header .= '<TR>';
$header .= '<TD>' . TextInput($RET['SHORT_NAME'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][SHORT_NAME]', 'Short Name', 'class=cell_floating', $div) . '</TD>';
echo '<input type="hidden" id="hidden_cp_id" value="' . $_REQUEST['course_period_id'] . '">';
$cal_RET = DBGet(DBQuery("SELECT TITLE,CALENDAR_ID FROM school_calendars WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY DEFAULT_CALENDAR DESC"));
$options = array();
foreach ($cal_RET as $option) {
$options[$option['CALENDAR_ID']] = $option['TITLE'];
}
if ($_REQUEST[course_period_id] == 'new') {
$header .= '<TD>' . SelectInput($RET['CALENDAR_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][CALENDAR_ID]', 'Calendar', $options, 'N/A', ' id=calendar_id onchange=reset_schedule();', $div) . '</TD>';
} else {
$cal_sql = "SELECT TITLE FROM school_calendars WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' AND CALENDAR_ID='" . $RET['CALENDAR_ID'] . "'";
$cal_RET = DBGET(DBQuery($cal_sql));
$cal_RET = $cal_RET[1];
$header .= '<TD>' . NoInput($cal_RET['TITLE'], 'Calendar') . '</TD>';
}
$teachers_RET = DBGet(DBQuery("SELECT STAFF_ID,LAST_NAME,FIRST_NAME,MIDDLE_NAME FROM staff INNER JOIN staff_school_relationship USING (staff_id) WHERE school_id='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' AND PROFILE='teacher' AND ISNULL(IS_DISABLE) AND (END_DATE>=CURDATE() OR END_DATE IS NULL OR END_DATE='0000-00-00') AND START_DATE<=CURDATE() ORDER BY LAST_NAME,FIRST_NAME "));
if (count($teachers_RET)) {
foreach ($teachers_RET as $teacher) {
$teachers[$teacher['STAFF_ID']] = $teacher['LAST_NAME'] . ', ' . $teacher['FIRST_NAME'] . ' ' . $teacher['MIDDLE_NAME'];
}
}
$header .= '<TD>' . SelectInput($RET['TEACHER_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][TEACHER_ID]', 'Primary Teacher', $teachers, 'N/A', '', $div) . '</TD>';
$header .= '<TD>' . SelectInput($RET['SECONDARY_TEACHER_ID'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][SECONDARY_TEACHER_ID]', 'Secondary Teacher', $teachers, 'N/A', '', $div) . '</TD>';
$header .= '<TD>' . TextInput($RET['TOTAL_SEATS'], 'tables[course_periods][' . $_REQUEST['course_period_id'] . '][TOTAL_SEATS]', 'Seats', 'size=4 class=cell_floating', $div) . '</TD>';
if ($_REQUEST['course_period_id'] != 'new') {
$header .= '<TD><FONT color=green>' . $RET['AVAILABLE_SEATS'] . '</FONT><BR><FONT color=gray><SMALL>Available Seats</SMALL></FONT></TD>';
} else {
$header .= '<TD> </TD>';
}
示例8: unset
}
}
//unset($_REQUEST['modfunc']);
unset($_REQUEST['food_service']);
unset($_SESSION['_REQUEST_vars']['food_service']);
}
if (!$_REQUEST['modfunc'] && UserStudentID()) {
$student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fssa.ACCOUNT_ID,fssa.STATUS,fssa.DISCOUNT,fssa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fssa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fssa.STUDENT_ID=s.STUDENT_ID"));
$student = $student[1];
// find other students associated with the same account
$xstudents = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fssa WHERE fssa.ACCOUNT_ID='" . $student['ACCOUNT_ID'] . "' AND s.STUDENT_ID=fssa.STUDENT_ID AND s.STUDENT_ID!='" . UserStudentID() . "'"));
echo '<TABLE class="width-100p">';
echo '<TR>';
echo '<TD class="valign-top">';
echo '<TABLE class="width-100p"><TR>';
echo '<TD class="valign-top">' . NoInput(($student['BALANCE'] < 0 ? '<span style="color:red">' : '') . $student['BALANCE'] . ($student['BALANCE'] < 0 ? '</span>' : ''), _('Balance')) . '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<HR>';
echo '<TABLE class="width-100p cellspacing-0 cellpadding-0">';
echo '<TR><TD class="valign-top">';
echo '<TABLE class="width-100p cellpadding-6">';
echo '<TR>';
echo '<TD>';
// warn if account non-existent (balance query failed)
if ($student['BALANCE'] == '') {
echo TextInput(array($student['ACCOUNT_ID'], '<span style="color:red">' . $student['ACCOUNT_ID'] . '</span>'), 'food_service[ACCOUNT_ID]', _('Account ID'), 'size=12 maxlength=10');
$warning = _('Non-existent account!');
echo button('warning', '', '"#" onMouseOver=\'stm(["' . _('Warning') . '","' . str_replace('"', '\\"', str_replace("'", ''', $warning)) . '"],tipmessageStyle);\' onMouseOut=\'htm()\'');
} else {
echo TextInput($student['ACCOUNT_ID'], 'food_service[ACCOUNT_ID]', 'Account ID', 'size=12 maxlength=10');
示例9: DrawHeaderHome
echo "<FORM name=F2 id=F2 action=Modules.php?modname={$_REQUEST['modname']}&table=student_field_categories";
if ($_REQUEST['category_id'] != 'new') {
echo "&category_id={$_REQUEST['category_id']}";
}
echo " method=POST>";
if ($_REQUEST[category_id] > 7 || $_REQUEST['category_id'] == 'new') {
DrawHeaderHome($title, $delete_button . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_student_studentField_F2();"'));
}
$header .= '<TABLE cellpadding=3 width=100%>';
$header .= '<TR><TD><input type=hidden id=t_id value="' . $_REQUEST['category_id'] . '"/></TD></TR>';
$header .= '<TR>';
$header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['TITLE'], 'Title') : TextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', 'Title')) . '</TD>';
if ($_REQUEST['category_id'] == 'new' || $RET['SORT_ORDER'] == '') {
$header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['SORT_ORDER'], 'Sort Order') : TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order', 'maxlength=5 onkeydown="return numberOnly(event);"')) . '</TD>';
} else {
$header .= '<TD>' . ($_REQUEST['category_id'] <= 7 && $_REQUEST['category_id'] != 'new' ? NoInput($RET['SORT_ORDER'], 'Sort Order') : TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', 'Sort Order', 'maxlength=5 onkeydown=\\"return numberOnly(event);\\"')) . '</TD>';
}
$new = $_REQUEST['category_id'] == 'new';
if ($_REQUEST['category_id'] > 7 || $new) {
$header .= '<TD>' . TextInput($RET['INCLUDE'], 'tables[' . $_REQUEST['category_id'] . '][INCLUDE]', 'Include (should be left blank for most categories)') . '</TD>';
}
$header .= '</TR>';
$header .= '</TABLE>';
} else {
$header = false;
}
if ($header) {
DrawHeaderHome($header);
echo '</FORM>';
}
// DISPLAY THE MENU
示例10: unset
}
unset($_REQUEST['modfunc']);
} else {
unset($_REQUEST['modfunc']);
}
unset($_REQUEST['submit']);
}
if (UserStudentID() && !$_REQUEST['modfunc']) {
$student = DBGet(DBQuery("SELECT s.STUDENT_ID,CONCAT(" . (Preferences('NAME') == 'Common' ? 'coalesce(s.CUSTOM_200000002,s.FIRST_NAME)' : 's.FIRST_NAME') . ",' ',s.LAST_NAME) AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,fsa.DISCOUNT,fsa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fsa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fsa.STUDENT_ID=s.STUDENT_ID"));
$student = $student[1];
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=submit&menu_id={$_REQUEST['menu_id']} method=POST>";
DrawHeader('', SubmitButton('Cancel Sale', 'submit[cancel]') . SubmitButton('Complete Sale', 'submit[save]'));
echo '</FORM>';
echo '<TABLE width=100%><TR>';
echo '<TD valign=top>' . NoInput($student['FULL_NAME'], $student['STUDENT_ID']) . '</TD>';
echo '<TD valign=top>' . NoInput(red($student['BALANCE']), 'Balance') . '</TD>';
echo '</TR></TABLE>';
echo '<HR>';
if ($student['BALANCE']) {
echo '<TABLE border=0 width=100%>';
echo '<TR><TD width=100% valign=top>';
$RET = DBGet(DBQuery('SELECT fsti.DESCRIPTION,fsti.AMOUNT FROM FOOD_SERVICE_TRANSACTIONS fst,FOOD_SERVICE_TRANSACTION_ITEMS fsti WHERE fst.ACCOUNT_ID=' . $student['ACCOUNT_ID'] . ' AND fst.STUDENT_ID=' . UserStudentID() . ' AND fst.SYEAR=' . UserSyear() . ' AND fst.SHORT_NAME=\'' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . '\' AND fst.TIMESTAMP BETWEEN CURRENT_DATE AND \'tomorrow\' AND fsti.TRANSACTION_ID=fst.TRANSACTION_ID'));
$columns = array('DESCRIPTION' => 'Item', 'AMOUNT' => 'Amount');
ListOutput($RET, $columns, 'Earlier ' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' Sale', 'Earlier ' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . ' Sales', $link, false, array('save' => false, 'search' => false));
// IMAGE
if ($file = @fopen($picture = $StudentPicturesPath . '/' . UserSyear() . '/' . UserStudentID() . '.jpg', 'r') || ($file = @fopen($picture = $StudentPicturesPath . '/' . (UserSyear() - 1) . '/' . UserStudentID() . '.jpg', 'r'))) {
fclose($file);
echo '<TD rowspan=2 width=150 align=left><IMG SRC="' . $picture . '" width=150></TD>';
}
echo '</TD></TR>';
echo '<TR><TD width=100% valign=top>';
示例11: SelectInput
echo SelectInput($student['GRADE_ID'], 'values[STUDENT_ENROLLMENT][' . $student_id . '][GRADE_ID]', (!$student['GRADE_ID'] ? '<FONT color=red>' : '') . _('Grade') . (!$student['GRADE_ID'] ? '</FONT>' : ''), $options);
echo '</TD>';
if ($_REQUEST['student_id'] != 'new' && $student['SCHOOL_ID'] != UserSchool()) {
$_CENTRE['allow_edit'] = $allow_edit;
$_CENTRE['AllowEdit'][$_REQUEST['modname']] = $AllowEdit;
}
echo '</TR><TR>';
echo '<TD>';
echo TextInput($student['USERNAME'], 'students[USERNAME]', _('Username'));
echo '</TD>';
echo '<TD>';
//echo TextInput($student['PASSWORD'],'students[PASSWORD]','Password');
echo TextInput(array($student['PASSWORD'], str_repeat('*', strlen($student['PASSWORD']))), 'students[PASSWORD]', ($student['USERNAME'] && !$student['PASSWORD'] ? '<FONT color=red>' : '') . _('Password') . ($student['USERNAME'] && !$student['PASSWORD'] ? '</FONT>' : ''));
echo '</TD>';
echo '<TD>';
echo NoInput(makeLogin($student['LAST_LOGIN']), _('Last Login'));
echo '</TD>';
echo '</TR></TABLE>';
// IMAGE
if ($_REQUEST['student_id'] != 'new' && $StudentPicturesPath && (($file = @fopen($picture_path = $StudentPicturesPath . UserSyear() . '/' . UserStudentID() . '.JPG', 'r')) || ($file = @fopen($picture_path = $StudentPicturesPath . (UserSyear() - 1) . '/' . UserStudentID() . '.JPG', 'r')))) {
fclose($file);
echo '<TD><IMG SRC="' . $picture_path . '" width=150>';
if (User('PROFILE') == 'admin' && User('PROFILE') != 'student' && User('PROFILE') != 'parent') {
echo '<br><a href=Modules.php?modname=Students/Upload.php style="text-decoration:none"><b>Upload Student\'s Photo</b></a></div>';
}
echo '</TD><TD valign=top></TD>';
} else {
if ($_REQUEST['student_id'] != 'new') {
echo '<TD><div align="center"><IMG SRC="assets/noimage.jpg?id=' . rand(6, 100000) . '" width=144 class=pic>';
if (User('PROFILE') == 'admin' && User('PROFILE') != 'student' && User('PROFILE') != 'parent') {
echo '<br><a href=Modules.php?modname=Students/Upload.php style="text-decoration:none"><b>Upload Student\'s Photo</b></a></div>';
示例12: _
$message = '<SELECT name=copy_id><OPTION value="">' . _('N/A');
foreach ($title_RET as $id => $title) {
if ($_REQUEST['calendar_id'] && $title['CALENDAR_ID'] == $_REQUEST['calendar_id']) {
$message .= '<OPTION value="' . $title['CALENDAR_ID'] . '" selected>' . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (' . _('Default') . ')' : '');
$default_id = $id;
$prompt = $title['TITLE'];
} else {
$message .= '<OPTION value="' . $title['CALENDAR_ID'] . '">' . ($title['SCHOOL_ID'] != UserSchool() ? $title['SCHOOL_TITLE'] . ':' : '') . $title['TITLE'] . (AllowEdit() && $title['DEFAULT_CALENDAR'] == 'Y' ? ' (' . _('Default') . ')' : '');
}
}
$message .= '</SELECT>';
//modif Francois: add <label> on checkbox
$message = '<TABLE><TR><TD colspan="7" class="center"><table><tr><td>' . NoInput('<INPUT type="text" name="title"' . ($_REQUEST['calendar_id'] ? ' value="' . $title_RET[$default_id]['TITLE'] . '"' : '') . '>', _('Title')) . '</td><td><label>' . NoInput('<INPUT type="checkbox" name="default" value="Y"' . ($_REQUEST['calendar_id'] && $title_RET[$default_id]['DEFAULT_CALENDAR'] == 'Y' ? ' checked' : '') . '>') . ' ' . _('Default Calendar for this School') . '</label></td><td>' . NoInput($message, _('Copy Calendar')) . '</td></tr></table></TD></TR>';
$message .= '<TR><TD colspan="7" class="center"><table><tr><td>' . _('From') . ' ' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['START_DATE'] ? $title_RET[$default_id]['START_DATE'] : $fy_RET['START_DATE'], '_min')) . '</td><td>' . _('To') . ' ' . NoInput(PrepareDate($_REQUEST['calendar_id'] && $title_RET[$default_id]['END_DATE'] ? $title_RET[$default_id]['END_DATE'] : $fy_RET['END_DATE'], '_max')) . '</td></tr></table></TD></TR>';
$message .= '<TR><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[0]"' . ($_REQUEST['calendar_id'] ? ' checked' : '') . '>') . ' ' . _('Sunday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[1]" checked />') . ' ' . _('Monday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[2]" checked />') . ' ' . _('Tuesday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[3]" checked />') . ' ' . _('Wednesday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[4]" checked />') . ' ' . _('Thursday') . '</label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[5]" checked />') . ' ' . _('Friday') . '<label></TD><TD><label>' . NoInput('<INPUT type="checkbox" value="Y" name="weekdays[6]"' . ($_REQUEST['calendar_id'] ? ' checked' : '') . '>') . ' ' . _('Saturday') . '</label></TD></TR>';
$message .= '<TR><TD colspan="7" class="center"><table><tr><td>' . NoInput('<INPUT type="text" name="minutes" size="3" maxlength="3">', _('Minutes')) . '</td><td><span class="legend-gray">(' . ($_REQUEST['calendar_id'] ? _('Default is Full Day if Copy Calendar is N/A.') . '<BR />' . _('Otherwise Default is minutes from the Copy Calendar') : _('Default is Full Day')) . ')</span></td></tr></table></TD></TR>';
$message .= '</TABLE>';
if (Prompt($_REQUEST['calendar_id'] ? sprintf(_('Recreate %s calendar'), $prompt) : _('Create new calendar'), '', $message)) {
if ($_REQUEST['calendar_id']) {
$calendar_id = $_REQUEST['calendar_id'];
} else {
$calendar_id = DBGet(DBQuery("SELECT " . db_seq_nextval('CALENDARS_SEQ') . " AS CALENDAR_ID " . FROM_DUAL));
$calendar_id = $calendar_id[1]['CALENDAR_ID'];
}
if ($_REQUEST['default']) {
DBQuery("UPDATE ATTENDANCE_CALENDARS SET DEFAULT_CALENDAR=NULL WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "'");
}
if ($_REQUEST['calendar_id']) {
DBQuery("UPDATE ATTENDANCE_CALENDARS SET TITLE='" . $_REQUEST['title'] . "',DEFAULT_CALENDAR='" . $_REQUEST['default'] . "' WHERE CALENDAR_ID='" . $calendar_id . "'");
} else {
DBQuery("INSERT INTO ATTENDANCE_CALENDARS (CALENDAR_ID,SYEAR,SCHOOL_ID,TITLE,DEFAULT_CALENDAR) values('" . $calendar_id . "','" . UserSyear() . "','" . UserSchool() . "','" . $_REQUEST['title'] . "','" . $_REQUEST['default'] . "')");
示例13: NoInput
echo NoInput($staff['STAFF_ID'], 'Staff ID');
echo '</TD>';
echo '<TD colspan=1>';
echo NoInput($staff['ROLLOVER_ID'], 'Last Year Staff ID');
echo '</TD>';
echo '</TR><TR>';
echo '<TD>';
echo TextInput($staff['USERNAME'], 'staff[USERNAME]', 'Username', 'size=12 maxlength=100 class=cell_floating onkeyup="usercheck_init(this)"');
echo '<br><div id="ajax_output"></div>';
echo '</TD>';
echo '<TD>';
//echo TextInput($staff['PASSWORD'],'staff[PASSWORD]','Password','size=12 maxlength=100');
echo TextInput(array($staff['PASSWORD'], str_repeat('*', strlen($staff['PASSWORD']))), 'staff[PASSWORD]', 'Password', 'size=12 maxlength=100 class=cell_floating');
echo '</TD>';
echo '<TD>';
echo NoInput(ProperDate(substr($staff['LAST_LOGIN'], 0, 10)) . substr($staff['LAST_LOGIN'], 10), 'Last Login');
echo '</TD>';
echo '</TR></TABLE>';
echo '</TD></TR></TABLE>';
echo '<div class=break></div>';
echo '<TABLE border=0 cellpadding=6 width=100%>';
if (basename($_SERVER['PHP_SELF']) != 'index.php') {
echo '<TR>';
echo '<TD>';
echo '<TABLE><TR><TD>';
unset($options);
$profiles_options = DBGet(DBQuery("SELECT PROFILE ,TITLE FROM USER_PROFILES ORDER BY ID"));
//print_r($profiles_options[1]);
$i = 1;
foreach ($profiles_options as $options) {
$options = array($profiles_options[$i]['PROFILE'] => $profiles_options[$i]['TITLE']);
示例14: mb_substr
$header .= '<TR><TD class="valign-top" colspan="2">' . mb_substr($errors, 0, -6) . '</TD></TR>';
$header .= '</TABLE>';
} elseif ($_REQUEST['assignment_type_id']) {
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&table=GRADEBOOK_ASSIGNMENT_TYPES';
if ($_REQUEST['assignment_type_id'] != 'new') {
echo '&assignment_type_id=' . $_REQUEST['assignment_type_id'];
}
echo '" method="POST">';
DrawHeader($title, $delete_button . SubmitButton(_('Save')));
$header .= '<TABLE class="width-100p cellpadding-3">';
$header .= '<TR>';
//modif Francois: title is required
$header .= '<TD>' . TextInput($RET['TITLE'], 'tables[' . $_REQUEST['assignment_type_id'] . '][TITLE]', ($RET['TITLE'] ? '' : '<span style="color:red">') . _('Title') . ($RET['TITLE'] ? '' : '</span>'), 'required') . '</TD>';
if (Preferences('WEIGHT', 'Gradebook') == 'Y') {
$header .= '<TD>' . TextInput($RET['FINAL_GRADE_PERCENT'], 'tables[' . $_REQUEST['assignment_type_id'] . '][FINAL_GRADE_PERCENT]', ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '<span style="color:red">') . _('Percent of Final Grade') . ($RET['FINAL_GRADE_PERCENT'] != 0 ? '' : '</span>')) . '</TD>';
$header .= '<TD>' . NoInput($RET['TOTAL_PERCENT'] == 1 ? '100%' : '<span style="color:red">' . 100 * $RET['TOTAL_PERCENT'] . '%</span>', _('Percent Total')) . '</TD>';
}
$header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['assignment_type_id'] . '][SORT_ORDER]', _('Sort Order')) . '</TD>';
$colors = array('#330099', '#3366FF', '#003333', '#FF3300', '#660000', '#666666', '#333366', '#336633', 'purple', 'teal', 'firebrick', 'tan');
foreach ($colors as $color) {
$color_select[$color] = array('<TABLE class="width-100p cellspacing-0 cellpadding-0" style="background-color:' . $color . ';"><TR><TD> </TD></TR></TABLE>', '<TABLE class="cellpadding-1 cellspacing-0" style="width:30px;"><TR><TD style="background-color:' . $color . ';"> </TD></TR></TABLE>');
}
//modif Francois: add translation
$header .= '<TD>' . RadioInput($RET['COLOR'], 'tables[' . $_REQUEST['assignment_type_id'] . '][COLOR]', _('Color'), $color_select) . '</TD>';
$header .= '</TR></TABLE>';
} else {
$header = false;
}
if ($header) {
DrawHeader($header);
echo '</FORM>';
示例15: DBQuery
DBQuery('BEGIN; ' . $sql1 . '; ' . $sql2 . '; COMMIT');
unset($_SESSION['FSA_sale']);
}
unset($_REQUEST['modfunc']);
} else {
unset($_REQUEST['modfunc']);
}
unset($_REQUEST['submit']);
}
if (UserStudentID() && !$_REQUEST['modfunc']) {
$student = DBGet(DBQuery("SELECT s.STUDENT_ID,s.FIRST_NAME||' '||s.LAST_NAME AS FULL_NAME,fsa.ACCOUNT_ID,fsa.STATUS,fsa.DISCOUNT,fsa.BARCODE,(SELECT BALANCE FROM FOOD_SERVICE_ACCOUNTS WHERE ACCOUNT_ID=fsa.ACCOUNT_ID) AS BALANCE FROM STUDENTS s,FOOD_SERVICE_STUDENT_ACCOUNTS fsa WHERE s.STUDENT_ID='" . UserStudentID() . "' AND fsa.STUDENT_ID=s.STUDENT_ID"));
$student = $student[1];
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=submit&menu_id=' . $_REQUEST['menu_id'] . '" method="POST">';
DrawHeader('', SubmitButton(_('Cancel Sale'), 'submit[cancel]') . SubmitButton(_('Complete Sale'), 'submit[save]'));
echo '</FORM>';
DrawHeader(NoInput($student['FULL_NAME'], ' ' . $student['STUDENT_ID']), '', NoInput(red($student['BALANCE']), _('Balance')));
if ($student['BALANCE'] != '') {
echo '<TABLE class="width-100p">';
echo '<TR><TD class="width-100p valign-top">';
$RET = DBGet(DBQuery('SELECT fsti.DESCRIPTION,fsti.AMOUNT FROM FOOD_SERVICE_TRANSACTIONS fst,FOOD_SERVICE_TRANSACTION_ITEMS fsti WHERE fst.ACCOUNT_ID=\'' . $student['ACCOUNT_ID'] . '\' AND fst.STUDENT_ID=\'' . UserStudentID() . '\' AND fst.SYEAR=\'' . UserSyear() . '\' AND fst.SHORT_NAME=\'' . $menus_RET[$_REQUEST['menu_id']][1]['TITLE'] . '\' AND fst.TIMESTAMP BETWEEN CURRENT_DATE AND \'tomorrow\' AND fsti.TRANSACTION_ID=fst.TRANSACTION_ID'));
$columns = array('DESCRIPTION' => _('Item'), 'AMOUNT' => _('Amount'));
$singular = sprintf(_('Earlier %s Sale'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
$plural = sprintf(_('Earlier %s Sales'), $menus_RET[$_REQUEST['menu_id']][1]['TITLE']);
ListOutput($RET, $columns, $singular, $plural, $link, false, array('save' => false, 'search' => false));
// IMAGE
//modif Francois: fix error Warning: fclose() expects parameter 1 to be resource, boolean given
// if($file = @fopen($picture=$StudentPicturesPath.'/'.UserSyear().'/'.UserStudentID().'.jpg','r') || $file = @fopen($picture=$StudentPicturesPath.'/'.(UserSyear()-1).'/'.UserStudentID().'.jpg','r'))
if (file_exists($picture = $StudentPicturesPath . UserSyear() . '/' . UserStudentID() . '.jpg') || file_exists($picture = $StudentPicturesPath . (UserSyear() - 1) . '/' . UserStudentID() . '.jpg')) {
// fclose($file);
echo '</TD><TD rowspan="2" style="text-align:left; width:150px;"><IMG SRC="' . $picture . '" width="150">';
}