本文整理匯總了PHP中DateInputAY函數的典型用法代碼示例。如果您正苦於以下問題:PHP DateInputAY函數的具體用法?PHP DateInputAY怎麽用?PHP DateInputAY使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DateInputAY函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: strip_tags
$title .= '<br><br> <span align="center">Teacher Re-Assignment Done <a href="#" onclick="load_link(\'Modules.php?modname=' . $_REQUEST['modname'] . '&subject_id=' . $_REQUEST['subject_id'] . '&course_id=' . $_REQUEST['course_id'] . '&course_period_id=' . $_REQUEST['course_period_id'] . '&action=undo\')">Undo</a></span>';
}
echo "<FORM name=F2 id=F2 action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&subject_id=" . strip_tags(trim($_REQUEST[subject_id])) . "&course_id=" . strip_tags(trim($_REQUEST[course_id])) . "&course_period_id=" . strip_tags(trim($_REQUEST[course_period_id])) . " method=POST>";
DrawHeaderHome($title, SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_teacher_reassignment();"'));
$header .= '<TABLE cellpadding=3 width=760 >';
$header .= '<TR>';
$header .= '<TD>Select New Teacher :</TD>';
$teachers_RET = DBGet(DBQuery('SELECT STAFF_ID,LAST_NAME,FIRST_NAME,MIDDLE_NAME FROM staff st INNER JOIN staff_school_relationship ssr USING (staff_id) WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND PROFILE=\'teacher\' AND staff_id <>\'' . $RET['TEACHER_ID'] . '\' AND (IS_DISABLE IS NULL OR IS_DISABLE<>\'Y\') 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('', 're_assignment_teacher', '', $teachers) . '</TD>';
$header .= '<TD>Assign Date :</TD>';
$header .= '<TD>' . DateInputAY('', 're_assignment', 1) . '</TD>';
$header .= '<TD><TD><input type=hidden name=course_period_id value=' . $_REQUEST['course_period_id'] . '><input type=hidden name=re_assignment_pre_teacher value=' . $RET['TEACHER_ID'] . '></TD>';
$header .= '</TR></TABLE>';
DrawHeaderHome($header);
echo '</FORM>';
//--------------------------------------------Re Assignment Record-------------------------------------------------------------
$sql = 'SELECT COURSE_PERIOD_ID,(SELECT CONCAT_WS(\' \',last_name,middle_name,first_name) FROM staff WHERE staff_id=teacher_id) AS TEACHER,ASSIGN_DATE,(SELECT CONCAT_WS(\' \',last_name,middle_name,first_name) FROM staff WHERE staff_id=pre_teacher_id) AS PRE_TEACHER_ID,MODIFIED_DATE,(SELECT CONCAT_WS(\' \',last_name,first_name) FROM staff WHERE staff_id=modified_by) AS MODIFIED_BY FROM teacher_reassignment WHERE course_period_id=\'' . $_REQUEST['course_period_id'] . '\' ORDER BY assign_date DESC';
$QI = DBQuery($sql);
$courses_RET = DBGet($QI, array('ASSIGN_DATE' => 'ProperDAte', 'MODIFIED_DATE' => 'ProperDate'));
echo '<TABLE width=100%><TR><TD valign=top>';
$LO_options = array('save' => false, 'search' => false);
$columns = array('TEACHER' => 'Teacher', 'ASSIGN_DATE' => 'Assign Date', 'PRE_TEACHER_ID' => 'Previous Teacher', 'MODIFIED_DATE' => 'Modified Date', 'MODIFIED_BY' => 'Modified By');
$link = array();
$link['TITLE']['variables'] = array('course_id' => 'COURSE_ID');
ListOutput($courses_RET, $columns, 'Re-Assignment Record', 'Re-Assignment Records', $link, array(), $LO_options);
echo '</TD></TR></TABLE>';
示例2: _makeAutoSelectInput
echo '<TD style="width:120px">';
echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeAutoSelectInput('CUSTOM_' . $field['ID']);
echo '</TD>';
echo '</TR>';
break;
case 'numeric':
echo '<TR>';
echo '<TD style="width:120px">';
echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], '', 'size=5 maxlength=10 class=cell_floating');
echo '</TD>';
echo '</TR>';
break;
case 'date':
echo '<TR>';
echo '<TD style="width:120px">';
echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . DateInputAY($value['CUSTOM_' . $field['ID']], 'CUSTOM_' . $field['ID'], $field['ID']);
echo '<input type=hidden name=custom_date_id[] value="' . $field['ID'] . '" />';
echo '</TD>';
echo '</TR>';
break;
case 'codeds':
case 'select':
echo '<TR>';
echo '<TD style="width:120px">';
echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeSelectInput('CUSTOM_' . $field['ID'], '');
echo '</TD>';
echo '</TR>';
break;
case 'multiple':
echo '<TR>';
echo '<TD style="width:120px">';
示例3: unset
echo '<TABLE border=0>';
echo '<tr><td style=width:120px>Name<font color=red>*</font></td><td>:</td><td>';
if ($_REQUEST['student_id'] == 'new') {
unset($_SESSION['students_order']);
echo '<TABLE ><TR><TD >' . TextInput($student['FIRST_NAME'], 'students[FIRST_NAME]', '<FONT color=red>First</FONT>', 'size=12 class=cell_floating maxlength=50 style="font-size:14px; font-weight:bold;"') . '</TD><TD>' . TextInput($student['MIDDLE_NAME'], 'students[MIDDLE_NAME]', 'Middle', 'class=cell_floating maxlength=50 style="font-size:14px; font-weight:bold;"') . '</TD><TD>' . TextInput($student['LAST_NAME'], 'students[LAST_NAME]', '<FONT color=red>Last</FONT>', 'size=12 class=cell_floating maxlength=50 style="font-size:14px; font-weight:bold;"') . '</TD></TR></TABLE>';
} else {
echo '<DIV id=student_name><div style="font-size:14px; font-weight:bold;" onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', TextInput($student['FIRST_NAME'], 'students[FIRST_NAME]', '<FONT color=red>First</FONT>', 'maxlength=50 style="font-size:14px; font-weight:bold;"', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($student['MIDDLE_NAME'], 'students[MIDDLE_NAME]', 'Middle', 'size=3 maxlength=50 style="font-size:14px; font-weight:bold;"', false)) . '</TD><TD>' . str_replace('"', '\\"', TextInput($student['LAST_NAME'], 'students[LAST_NAME]', '<FONT color=red>Last</FONT>', 'maxlength=50 style="font-size:14px; font-weight:bold;"', false)) . '</TD></TR></TABLE>","student_name",true);\'>' . $student['FIRST_NAME'] . ' ' . $student['MIDDLE_NAME'] . ' ' . $student['LAST_NAME'] . ' </div></DIV>';
}
echo '</td></tr>';
//<TD>'.SelectInput($student['NAME_SUFFIX'],'students[NAME_SUFFIX]','Suffix',array('Jr.'=>'Jr.','Sr.'=>'Sr.'),'','style="font-size:14px; font-weight:bold;"').'</TD>
//<TD>'.str_replace('"','\"',SelectInput($student['NAME_SUFFIX'],'students[NAME_SUFFIX]','Suffix',array('Jr.'=>'Jr.','Sr.'=>'Sr.','II'=>'II','III'=>'III','IV'=>'IV','V'=>'V'),'','style="font-size:14px; font-weight:bold;"',false)).'</TD>
echo '<tr><td>Common Name / 中文名</td><td>:</td><td>' . TextInput($student['COMMON_NAME'], 'students[COMMON_NAME]', '', 'size=10 class=cell_medium maxlength=10') . '</td></tr>';
echo '<tr><td>Gender</td><td>:</td><td>' . SelectInput($student['GENDER'], 'students[GENDER]', '', array('Male' => 'Male', 'Female' => 'Female'), 'N/A', '') . '</td></tr>';
echo '<tr><td>Ethnicity</td><td>:</td><td>' . SelectInput($student['ETHNICITY'], 'students[ETHNICITY]', '', $ethnic_option, 'N/A', '') . '</td></tr>';
echo '<input type=hidden id=current_date value=' . date('Y-m-d') . '>';
echo '<tr><td>Date of Birth<font color="red">*</font></td><td>:</td><td>' . DateInputAY($student['BIRTHDATE'], 'students[BIRTHDATE]', '2') . '</td></tr>';
//echo '<tr><td>Primary Language</td><td>:</td><td>'.SelectInput($student['LANGUAGE'],'students[LANGUAGE]','',$language_option,'N/A','').'</td></tr>';
if ($_REQUEST['student_id'] == 'new') {
$id_sent = 0;
} else {
$id_sent = UserStudentID();
}
echo '<tr><td>Email</td><td>:</td><td>' . TextInput($student['EMAIL'], 'students[EMAIL]', '', 'size=100 class=cell_medium maxlength=100 onkeyup=check_email(this,' . $id_sent . ',3); onblur=check_email(this,' . $id_sent . ',3)') . '<div id=email_error></div></td></tr>';
echo '<tr><td>Phone</td><td>:</td><td>' . TextInput($student['PHONE'], 'students[PHONE]', '', 'size=100 class=cell_medium maxlength=100') . '</td></tr>';
echo '<tr><td>Studying at</td><td>:</td><td>' . TextInput($student['LANGUAGE'], 'students[LANGUAGE]', '', 'size=100 class=cell_medium maxlength=100') . '</td></tr>';
echo '<TR><td height="30px" colspan=2 class=hseparator><b>Fees</b></td></tr><tr><td colspan="2">';
echo '<tr><td>Registration Fee </td><td>:</td><td>' . TextInput($student['ESTIMATED_GRAD_DATE'], 'students[ESTIMATED_GRAD_DATE]', '', 'size=100 class=cell_medium maxlength=100') . '</td></tr>';
echo '<tr><td>Deposit </td><td>:</td><td>' . TextInput($student['NAME_SUFFIX'], 'students[NAME_SUFFIX]', '', 'size=100 class=cell_medium maxlength=100') . '</td></tr>';
#############################################CUSTOM FIELDS###############################
$fields_RET = DBGet(DBQuery('SELECT ID,TITLE,TYPE,SELECT_OPTIONS,DEFAULT_SELECTION,REQUIRED,HIDE,SORT_ORDER FROM custom_fields WHERE SYSTEM_FIELD=\'N\' AND CATEGORY_ID=\'' . $_REQUEST[category_id] . '\' ORDER BY SORT_ORDER,TITLE'));
if (UserStudentID()) {
示例4: date
# 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';
if (!$_REQUEST['modfunc']) {
$start_date = date('Y-m') . '-01';
$end_date = DBDate('mysql');
echo "<br><FORM name=log id=log action=Modules.php?modname={$_REQUEST['modname']}&modfunc=generate method=POST>";
PopTable('header', 'Log Details');
echo '<div align=center style="padding-top:20px; font-size:12px;"><strong>Please Select Date Range</strong></div><br />
<TABLE border=0 width=100% align=center><tr><TD valign=middle>';
echo '<strong>From :</strong> </TD><TD valign=middle>';
DrawHeader(DateInputAY($start_date, 'start', 1));
echo '</TD><TD valign=middle><strong>To :</strong> </TD><TD valign=middle>';
DrawHeader(DateInputAY($end_date, 'end', 2));
echo '</TD></TR></TABLE><div style=height:10px></div>';
echo '<center><input type="submit" class=btn_medium value="Generate" name="generate"></center>';
PopTable('footer');
echo '</FORM>';
}
if ($_REQUEST['day_start'] && $_REQUEST['month_start'] && $_REQUEST['year_start']) {
$start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . substr($_REQUEST['year_start'], 2, 4);
$org_start_date = $_REQUEST['day_start'] . '-' . $_REQUEST['month_start'] . '-' . $_REQUEST['year_start'];
$conv_st_date = con_date($org_start_date);
}
if ($_REQUEST['day_end'] && $_REQUEST['month_end'] && $_REQUEST['year_end']) {
$end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . substr($_REQUEST['year_end'], 2, 4);
$org_end_date = $_REQUEST['day_end'] . '-' . $_REQUEST['month_end'] . '-' . $_REQUEST['year_end'];
$conv_end_date = con_date_end($org_end_date);
}
示例5: check_input_val
</tr>
<tr>
<td align="right">I am a :</td><td><input type="hidden" name="user_type_form" id="user_type_form" value="username" disabled="disabled"/><input type="radio" name="uname_user_type" id="uname_student" value="uname_student" checked="checked" disabled="disabled" onclick="uname_show_fields('student')" /><label>Student</label> <input type="radio" name="uname_user_type" id="uname_staff" value="uname_staff" disabled="disabled" onclick="uname_show_fields('staff');forgotpassemail_init('uname_email');" /><label>Staff</label> <input type="radio" name="uname_user_type" id="uname_parent" disabled="disabled" value="uname_parent" onclick="uname_show_fields('parent');forgotpassemail_init('uname_email');" /><label>Parent</label></td>
</tr>
<tr id="uname_stu_id">
<td width="30%" align="right">Student ID :</td>
<td width="70%"><input type="text" name="username_stn_id" id="username_stn_id" disabled="disabled" class="login_txt" onblur="return check_input_val(this.value,'username_stn_id');" onkeydown="return numberOnly(event);"/></td>
</tr>
<tr>
<td width="30%" align="right">Password :</td>
<td width="70%"><input type="password" name="pass" id="pass" class="login_txt" disabled="disabled"/></td>
</tr>
<tr id="uname_stu_dob">
<td width="30%" align="right">Date of Birth :</td>
<td width="70%"><?php
echo DateInputAY('', 'username_dob', 2);
?>
</td>
</tr>
<tr id="uname_stf_email" style="display: none">
<td width="30%" align="right">Email Address :<input type="hidden" name="un_email" id="un_email" value=""/></td>
<td width="70%"><input type="text" name="username_stf_email" id="username_stf_email" disabled="disabled" class="login_txt" onblur="forgotpassemail_init('uname_email');" /><span style="display: none" id="uname_calculating_email"><img src="assets/ajax_loader.gif"/></span><span id="uname_err_msg_email"></span></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="save" class="btn" value="Confirm" onClick="return forgotusername();"/>
</td>
</tr>
<tr>
<td align='center'></td>
<td></td>
示例6: implode
}
$enroll_msg = $s . " " . implode(",", $id_array) . " cannot be reenrolled because reenroll date and drop date are same or reenrollment date is before end date. ";
}
}
} else {
$err = "<b><font color=red>No students are selected.</font></b>";
}
unset($_REQUEST['modfunc']);
}
DrawBC("Students > " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
echo "<FORM name=sav id=sav action=Modules.php?modname={$_REQUEST['modname']}&modfunc=save method=POST>";
PopTable_wo_header('header');
$calendar = DBGet(DBQuery('SELECT CALENDAR_ID FROM school_calendars WHERE SCHOOL_ID=\'' . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY DEFAULT_CALENDAR DESC LIMIT 0,1"));
echo '<INPUT TYPE=hidden name=cal_id value=' . $calendar[1]["CALENDAR_ID"] . '>';
echo '<TABLE><TR><TD>Start Date <font color="red">*</font> </TD><TD>: </TD><TD>' . DateInputAY(DBDate('mysql'), 'start', 1) . '</TD></TR>';
echo '<TR><TD>Grade<font color="red">*</font> </TD><TD>: </TD><TD>';
$sel_grade = DBGet(DBQuery('SELECT TITLE,ID FROM school_gradelevels WHERE SCHOOL_ID=\'' . UserSchool() . '\''));
echo '<SELECT name=grade_id id=grade_id><OPTION value="">Select Grade</OPTION>';
foreach ($sel_grade as $g_id) {
echo "<OPTION value={$g_id['ID']}>" . $g_id['TITLE'] . '</OPTION>';
}
echo '</SELECT>';
echo '</TD></TR>';
echo '<TR><TD>Enrollment Code <font color="red">*</font> </TD><TD>: </TD><TD>';
$enroll_code = DBGet(DBQuery('SELECT TITLE,ID FROM student_enrollment_codes WHERE SYEAR=\'' . UserSyear() . '\' AND TYPE IN (\'' . Add . '\',\'' . TrnE . '\',\'' . Roll . '\')'));
echo '<SELECT name=en_code id=en_code><OPTION value="">Select Enroll Code</OPTION>';
foreach ($enroll_code as $enr_code) {
echo "<OPTION value={$enr_code['ID']}>" . $enr_code['TITLE'] . '</OPTION>';
}
echo '</SELECT>';
示例7: _makeDate
function _makeDate($value, $column)
{
global $THIS_RET;
static $counter = 0;
//
if ($column == 'START_DATE') {
$allow_na = false;
} else {
$allow_na = true;
}
if ($column == 'END_DATE' && $THIS_RET[END_DATE] != '') {
return date('M/d/Y', strtotime($value));
} else {
$counter++;
return '<div style="white-space: nowrap;">' . DateInputAY($value, "schedule[{$THIS_RET['COURSE_PERIOD_ID']}][{$THIS_RET['START_DATE']}][{$column}]", $counter . $THIS_RET[COURSE_PERIOD_ID]) . '</div>';
}
}
示例8: DrawHeaderHome
}
}
} else {
$period_select .= '<OPTION value="PERIOD"' . ($_REQUEST['period_id'] ? ' SELECTED' : '') . '>By Period</OPTION>';
}
$period_select .= '</SELECT>';
if (User('PROFILE') == 'teacher') {
$myclasses = '<SELECT name="myclasses" onchange="this.form.submit();">';
$myclasses .= '<OPTION value=""' . ($_REQUEST['myclasses'] == '' ? ' SELECTED' : '') . '>All course periods</OPTION>';
$myclasses .= '<OPTION value="my_classes"' . ($_REQUEST['myclasses'] == 'my_classes' ? ' SELECTED' : '') . '>All my course periods</OPTION>';
$myclasses .= '<OPTION value="selected_class"' . ($_REQUEST['myclasses'] == 'selected_class' ? ' SELECTED' : '') . '>Selected course period</OPTION>';
$myclasses .= '</SELECT>';
}
echo "<FORM action={$PHP_tmp_SELF} method=POST>";
echo "<div>";
DrawHeaderHome('<table><tr><td>' . DateInputAY($start_date, 'start', 1) . '</td><td> - </td><td>' . DateInputAY($end_date, 'end', 2) . '</td><td> : </td><td>' . $period_select . ' : <INPUT type=submit class=btn_medium value=Go>' . ($_REQUEST['period_id'] ? '<td>' . $myclasses . '</td>' : '') . '</tr></table>');
}
$cal_RET = DBGet(DBQuery('SELECT DISTINCT SCHOOL_DATE,CONCAT(\'_\',DATE_FORMAT(SCHOOL_DATE,\'%Y%m%d\')) AS SHORT_DATE FROM attendance_calendar WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SCHOOL_DATE BETWEEN \'' . date('Y-m-d', strtotime($start_date)) . '\' AND \'' . date('Y-m-d', strtotime($end_date)) . '\' ORDER BY SCHOOL_DATE'));
if (UserStudentID() || $_REQUEST['student_id'] || User('PROFILE') == 'parent') {
// JUST TO SET USERSTUDENTID()
Search('student_id');
$MP_TYPE_RET = DBGet(DBQuery('SELECT MP_TYPE FROM marking_periods WHERE MARKING_PERIOD_ID=\'' . UserMP() . '\' LIMIT 1'));
$MP_TYPE = $MP_TYPE_RET[1]['MP_TYPE'];
if ($MP_TYPE == 'year') {
$MP_TYPE = 'FY';
} else {
if ($MP_TYPE == 'semester') {
$MP_TYPE = 'SEM';
} else {
if ($MP_TYPE == 'quarter') {
$MP_TYPE = 'QTR';
示例9: SelectInput
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 valign=top>' . 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 valign=top>' . 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>NRIC/Passport ID</td><td>:</td><td>';
echo TextInput($staff['ALTERNATE_ID'], 'staff[ALTERNATE_ID]', '', 'size=12 maxlength=100 class=cell_floating ') . '</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>';
echo DateInputAY($staff['BIRTHDATE'], 'staff[BIRTHDATE]', 1) . '</td></tr>';
$ETHNICITY_RET = DBGet(DBQuery("SELECT ETHNICITY_ID,ETHNICITY_NAME FROM ethnicity ORDER BY SORT_ORDER"));
foreach ($ETHNICITY_RET as $ethnicity_array) {
$ethnicity[$ethnicity_array['ETHNICITY_ID']] = $ethnicity_array['ETHNICITY_NAME'];
}
echo '<tr><td><span class=red></span>Ethnicity</td><td>:</td><td>' . SelectInput($staff['ETHNICITY_ID'], 'staff[ETHNICITY_ID]', '', $ethnicity, 'N/A', '') . '</td></tr>';
$LANGUAGE_RET = DBGet(DBQuery("SELECT LANGUAGE_ID,LANGUAGE_NAME FROM language ORDER BY SORT_ORDER"));
foreach ($LANGUAGE_RET as $language_array) {
$language[$language_array['LANGUAGE_ID']] = $language_array['LANGUAGE_NAME'];
}
echo '<tr><td><span class=red></span>Primary Language</td><td>:</td><td>' . SelectInput($staff['PRIMARY_LANGUAGE_ID'], 'staff[PRIMARY_LANGUAGE_ID]', '', $language, 'N/A', '') . '</td></tr>';
echo '<tr><td>Second Language</td><td>:</td><td>' . SelectInput($staff['SECOND_LANGUAGE_ID'], 'staff[SECOND_LANGUAGE_ID]', '', $language, 'N/A', '') . '</td></tr>';
//echo '<tr><td>Third Language</td><td>:</td><td>'.SelectInput($staff['THIRD_LANGUAGE_ID'],'staff[THIRD_LANGUAGE_ID]','',$language,'N/A','').'</td></tr>';
if ($_REQUEST['staff_id'] == 'new') {
$id_sent = 0;
} else {
示例10: DrawBC
}
}
if (!$_REQUEST['modfunc']) {
DrawBC("Scheduling >> " . ProgramTitle());
if ($_REQUEST['search_modfunc'] == 'list') {
$mp_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,1 AS TBL FROM school_years WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,2 AS TBL FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' UNION SELECT MARKING_PERIOD_ID,TITLE,SORT_ORDER,3 AS TBL FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY TBL,SORT_ORDER'));
$mp_select = '<SELECT name=mp_id><OPTION value="">N/A';
foreach ($mp_RET as $mp) {
$mp_select .= '<OPTION value=' . $mp['MARKING_PERIOD_ID'] . '>' . $mp['TITLE'];
}
$mp_select .= '</SELECT>';
echo "<FORM name=sch id=sch action=ForExport.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&head_html=Student+Schedules+Report&modfunc=save&include_inactive={$_REQUEST['include_inactive']}&_openSIS_PDF=true method=POST target=_blank>";
PopTable_wo_header('header');
$extra['extra_header_left'] = '<TABLE>';
$extra['extra_header_left'] .= '<TR><TD align=right width=120>Marking Period</TD><TD>' . $mp_select . '</TD></TR>';
$extra['extra_header_left'] .= '<TR><TD align=right width=120>Include only courses active as of</TD><TD>' . DateInputAY('', 'include_active_date', 1) . '</TD></TR>';
Widgets('mailing_labels', true);
$extra['extra_header_left'] .= $extra['search'];
$extra['search'] = '';
$extra['extra_header_left'] .= '</TABLE>';
}
$extra['link'] = array('FULL_NAME' => false);
$extra['SELECT'] = ',s.STUDENT_ID AS CHECKBOX';
$extra['functions'] = array('CHECKBOX' => '_makeChooseCheckbox');
$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;
$extra['new'] = true;
Widgets('request');
Widgets('course');
Search('student_id', $extra);
if ($_REQUEST['search_modfunc'] == 'list') {
示例11: paramlib_validation
}
}
if (clean_param($_REQUEST['modfunc'], PARAM_ALPHAMOD) == 'edit_calendar') {
$colmn = Calender_Id;
$cal_id = paramlib_validation($colmn, $_REQUEST['calendar_id']);
$acs_RET = DBGet(DBQuery('SELECT TITLE, DEFAULT_CALENDAR FROM school_calendars WHERE CALENDAR_ID=\'' . $cal_id . '\''));
$acs_RET = $acs_RET[1];
$ac_RET = DBGet(DBQuery('SELECT MIN(SCHOOL_DATE) AS START_DATE,MAX(SCHOOL_DATE) AS END_DATE FROM attendance_calendar WHERE CALENDAR_ID=\'' . $cal_id . '\''));
$ac_RET = $ac_RET[1];
$day_RET = DBGet(DBQuery('SELECT DAYNAME(SCHOOL_DATE) AS DAY_NAME FROM attendance_calendar WHERE CALENDAR_ID=\'' . $cal_id . '\' ORDER BY SCHOOL_DATE LIMIT 0, 7'));
$i = 0;
foreach ($day_RET as $day) {
$weekdays[$i] = $day['DAY_NAME'];
$i++;
}
$message = '<TABLE cellspacing=0 cellpadding=0 border=0 ><TR><TD colspan=7 align=center>Title <INPUT type=text name=title class=cell_floating id=title value="' . $acs_RET[TITLE] . '"> <INPUT type=checkbox name=default value=Y ' . ($acs_RET['DEFAULT_CALENDAR'] == 'Y' ? 'checked' : '') . '> Default Calendar for this School<BR><BR></TD></TR><TR><TD colspan=7 align=center>From</TD></TR><TR><TD colspan=7 align=center> ' . DateInputAY($ac_RET['START_DATE'], '_min', 1) . '</TD></TR><TR><TD colspan=7 align=center> To </TD></TR><TR><TD colspan=7 align=center >' . DateInputAY($ac_RET['END_DATE'], '_max', 2) . '</TD></TR><TR><TD class=clear></TD></TR><TR><TD><INPUT type=checkbox value=Y name=weekdays[0] ' . (in_array('Sunday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Sunday</TD><TD><INPUT type=checkbox value=Y name=weekdays[1] ' . (in_array('Monday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Monday</TD><TD><INPUT type=checkbox value=Y name=weekdays[2] ' . (in_array('Tuesday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Tuesday</TD><TD><INPUT type=checkbox value=Y name=weekdays[3] ' . (in_array('Wednesday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Wednesday</TD><TD><INPUT type=checkbox value=Y name=weekdays[4] ' . (in_array('Thursday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Thursday</TD><TD><INPUT type=checkbox value=Y name=weekdays[5] ' . (in_array('Friday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Friday</TD><TD><INPUT type=checkbox value=Y name=weekdays[6] ' . (in_array('Saturday', $weekdays) == true ? 'CHECKED' : '') . ' DISABLED>Saturday</TD></TR></TABLE>';
$message .= calendarEventsVisibility();
if (Prompt_Calender('Edit this calendar', '', $message)) {
$col = Calender_Title;
$cal_title = singleQuoteReplace("'", "''", $_REQUEST['title']);
$dup_cal_title = DBGet(DBQuery('SELECT count(*) AS NO FROM school_calendars WHERE TITLE=\'' . $cal_title . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' AND CALENDAR_ID NOT IN(' . $cal_id . ')'));
if (isset($_REQUEST['default']) && $dup_cal_title[1]['NO'] == 0) {
DBQuery('UPDATE school_calendars SET DEFAULT_CALENDAR = NULL WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\'');
}
if ($dup_cal_title[1]['NO'] == 0) {
DBQuery('UPDATE school_calendars SET TITLE = \'' . $cal_title . '\', DEFAULT_CALENDAR = \'' . $_REQUEST['default'] . '\' WHERE CALENDAR_ID=\'' . $cal_id . '\'');
DBQuery('DELETE FROM calendar_events_visibility WHERE calendar_id=\'' . $cal_id . '\'');
}
if (count($_REQUEST['profiles'])) {
$profile_sql = 'INSERT INTO calendar_events_visibility(calendar_id,profile_id,profile) VALUES';
foreach ($_REQUEST['profiles'] as $key => $profile) {
示例12: numberOnlyMod
if ($id == "new" || $_REQUEST['tab_id'] == "new" || $RET['POINTS'] == '') {
$extra = ' size=4 maxlength=5 onkeydown="return numberOnlyMod(event,this);" ';
} else {
$extra = ' size=4 maxlength=5 onkeydown=\\"return numberOnlyMod(event,this);\\"';
}
$header .= '<TD>' . TextInput($RET['POINTS'], 'tables[' . $_REQUEST['assignment_id'] . '][POINTS]', ($RET['POINTS'] != '' ? '' : '<FONT color=red>') . 'Points' . ($RET['POINTS'] ? '' : '</FONT>'), $extra) . '</TD>';
if ($_REQUEST['assignment_id'] == 'new') {
$header .= '<TD>' . CheckboxInput($RET['COURSE_ID'], 'tables[' . $_REQUEST['assignment_id'] . '][COURSE_ID]', 'Apply to all Periods for this Course') . '</TD>';
}
foreach ($types_RET as $type) {
$assignment_type_options[$type['ASSIGNMENT_TYPE_ID']] = $type['TITLE'];
}
$header .= '<TD>' . SelectInput($RET['ASSIGNMENT_TYPE_ID'] ? $RET['ASSIGNMENT_TYPE_ID'] : $_REQUEST['assignment_type_id'], 'tables[' . $_REQUEST['assignment_id'] . '][ASSIGNMENT_TYPE_ID]', 'Assignment Type', $assignment_type_options, false) . '</TD>';
$header .= '</TR><TR>';
$header .= '<TD valign=top>' . DateInputAY($new && Preferences('DEFAULT_ASSIGNED', 'Gradebook') == 'Y' ? date('y-m-d') : $RET['ASSIGNED_DATE'], 'tables[' . $_REQUEST['assignment_id'] . '][ASSIGNED_DATE]', 1) . ($_REQUEST['assignment_id'] == 'new' ? '<br><small><font color="gray">Assigned<font color="gray"></font></font></small>' : '<small><font color="gray">Assigned Date<font color="gray"></font></font></small>') . '</TD>';
$header .= '<TD valign=top>' . DateInputAY($new && Preferences('DEFAULT_DUE', 'Gradebook') == 'Y' ? date('y-m-d') : $RET['DUE_DATE'], 'tables[' . $_REQUEST['assignment_id'] . '][DUE_DATE]', 2) . ($_REQUEST['assignment_id'] == 'new' ? '<br><small><font color="gray">Due<font color="gray"></font></font></small>' : '<small><font color="gray">Due Date<font color="gray"></font></font></small>') . '</TD>';
$header .= '<TD rowspan=2 colspan=2><TD></TR>';
} 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>';
}
示例13: stafflist
function stafflist($type, $extra = array())
{
global $_openSIS;
switch ($type) {
case 'staff_id':
// convert profile string to array for legacy compatibility
if (!is_array($extra)) {
$extra = array('profile' => $extra);
}
if (!$_REQUEST['staff_id'] && User('PROFILE') != 'admin') {
$_REQUEST['staff_id'] = User('STAFF_ID');
}
if ($_REQUEST['staff_id']) {
if ($_REQUEST['staff_id'] != 'new') {
$_SESSION['staff_id'] = $_REQUEST['staff_id'];
unset($_SESSION['fn']);
$pro = DBGet(DBQuery("SELECT PROFILE_ID FROM staff S WHERE STAFF_ID='" . $_SESSION['staff_id'] . "'"));
if ($pro[1]['PROFILE_ID'] == 4) {
$_SESSION['fn'] = 'user';
} else {
$_SESSION['fn'] = 'staff';
}
if ($_REQUEST['school_id']) {
$_SESSION['UserSchool'] = $_REQUEST['school_id'];
}
}
if (!$_REQUEST['_openSIS_PDF']) {
echo '<script language=JavaScript>parent.side.location="' . $_SESSION['Side_PHP_SELF'] . '?modcat="+parent.side.document.forms[0].modcat.value;</script>';
}
}
if (!UserStaffID() && $_REQUEST['staff_id'] != 'new' || $extra['new'] == true) {
if (!$_REQUEST['modfunc']) {
$_REQUEST['modfunc'] = 'search_fnc';
}
$_REQUEST['next_modname'] = $_REQUEST['modname'];
if (!$_REQUEST['modname']) {
$_REQUEST['modname'] = 'users/Search.php';
}
include 'modules/attendance/StaffSearch.inc.php';
}
break;
case 'general_info':
$ethnicity_RET = DBGet(DBQuery("SELECT ETHNICITY_ID, ETHNICITY_NAME FROM ethnicity"));
echo '<tr><td align=right width=120>Last Name</td><td><input type=text name="last" size=30 class="cell_floating"></td></tr>';
echo '<tr><td align=right width=120>First Name</td><td><input type=text name="first" size=30 class="cell_floating"></td></tr>';
echo '<tr><td align=right width=120>Staff ID</td><td><input type=text name="staffid" size=30 class="cell_floating"></td></tr>';
echo '<tr><td align=right width=120>Gender</td><td><SELECT name=gender style="max-width:1750;"><OPTION value="">N/A</OPTION><OPTION value="Male">Male</OPTION><OPTION value="Female">Female</OPTION></SELECT></td></tr>';
echo '<tr><td align=right width=120>Ethnicity</td><td><SELECT name=ethnicity style="max-width:1750;"><OPTION value="">N/A</OPTION>';
foreach ($ethnicity_RET as $ethnicity) {
echo "<OPTION value='" . $ethnicity['ETHNICITY_ID'] . "'>'" . $ethnicity['ETHNICITY_NAME'] . "'</OPTION>";
}
echo '</SELECT></td></tr>';
echo '<tr><td align=right width=120>Date of Birth</td><td>' . DateInputAY('', 'search[BIRTHDATE]', 1) . '</td></tr>';
break;
}
}
示例14: GetStaffList_Miss_Atn
}
$ERR = "";
if ($_REQUEST['day_From'] == '' && $_REQUEST['day_to']) {
$ERR = "please select from date";
}
if ($date < $start_date) {
$ERR = " From date cannot be before school start date.";
} else {
if ($_REQUEST['day_From'] && $_REQUEST['day_to'] || $From && $to) {
$staff_RET = GetStaffList_Miss_Atn($extra);
}
}
echo '<div><STRONG><FONT color=red>' . $ERR . '</font></strong></DIV>';
echo "<FORM name=missingatten id=missingatten action=Modules.php?modname={$_REQUEST['modname']}&func=save method=POST>";
$header .= '<TD style="width:40px; vertical-align:top; text-align:left; padding-top:8px;"><b>From :</b></TD><td valign="top" style="width:200px;">' . DateInputAY($From, 'From', 1) . '</TD>';
$header .= '<TD style="width:40px; vertical-align:top; text-align:left; padding-top:8px;"><b>To :</b></TD><td valign="top" style="width:150px;">' . DateInputAY($to, 'to', 2) . '</TD>';
$header .= '<td align=left><INPUT type=submit class=btn_medium name=go value=Go ></td>';
$header .= '</tr></table>';
DrawHeaderHome($header);
echo '</form>';
if ($extra['profile']) {
$options = array('admin' => 'Administrator', 'teacher' => 'Teacher', 'parent' => 'Parent', 'none' => 'No Access');
$singular = $options[$extra['profile']];
$plural = $singular . ($options[$extra['profile']] == 'none' ? 'es' : 's');
$columns = array('FULL_NAME' => $singular, 'STAFF_ID' => 'Staff ID');
} else {
$singular = 'User';
$plural = 'users';
$columns = array('FULL_NAME' => 'Staff Member', 'PROFILE' => 'Profile', 'STAFF_ID' => 'Staff ID');
}
if (is_array($extra['columns_before'])) {
示例15: DBGet
$profile_check = DBGet(DBQuery("SELECT PROFILE FROM staff WHERE STAFF_ID=" . UserID()));
$profile_check = $profile_check[1]['PROFILE'];
if ($profile_check == 'admin') {
if (count($stu_RET) != 0 && count($course_RET) != 0) {
DrawHeader(DateInputAY($date, 'date', 1) . $date_note, SubmitButton('Save', '', 'class=btn_medium'));
} else {
echo '<div style="float:left;">';
DrawHeader(DateInputAY($date, 'date', 2) . $date_note);
echo '</div>';
}
} else {
if (count($stu_RET) != 0 && count($course_RET) != 0) {
DrawHeader(DateInputAY($date, 'date', 3) . $date_note, SubmitButton('Save', '', 'class=btn_medium'));
} else {
echo '<div style="float:left;">';
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>';