本文整理汇总了PHP中_makeTextInput函数的典型用法代码示例。如果您正苦于以下问题:PHP _makeTextInput函数的具体用法?PHP _makeTextInput怎么用?PHP _makeTextInput使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_makeTextInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DBGet
$categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STUDENT_FIELD_CATEGORIES"));
echo '<CENTER><TABLE bgcolor=#FFFFCC><TR><TD>';
echo '<CENTER><SELECT name=category_id onchange="document.location.href=\'' . PreparePHP_SELF($_REQUEST, array('category_id')) . '&category_id=\'+this.form.category_id.value;"><OPTION value="">' . _('All Categories') . '</OPTION>';
foreach ($categories_RET as $category) {
echo '<OPTION value=' . $category['ID'] . ($_REQUEST['category_id'] == $category['ID'] ? ' SELECTED' : '') . '>' . ParseMLField($category['TITLE']) . '</OPTION>';
}
echo '</SELECT>';
echo '<TABLE></CENTER><HR>';
if (count($fields_RET['text'])) {
foreach ($fields_RET['text'] as $field) {
echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
}
}
if (count($fields_RET['numeric'])) {
foreach ($fields_RET['numeric'] as $field) {
echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
}
}
if (count($fields_RET['date'])) {
foreach ($fields_RET['date'] as $field) {
echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
}
}
if (count($fields_RET['select'])) {
foreach ($fields_RET['select'] as $field) {
$select_options = array();
$field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
$options = explode("\r", $field['SELECT_OPTIONS']);
if (count($options)) {
foreach ($options as $option) {
if ($option != '') {
示例2: mysql_query
$query = mysql_query('SELECT * FROM students');
$f = 0;
while ($colnames = mysql_fetch_field($query)) {
if ($colnames->name == $title) {
$f = 1;
}
}
if ($f == 0) {
$title = 'CUSTOM_' . trim($field['ID']);
}
echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeTextInput($title) . '</TD></TR>';
}
}
if (count($fields_RET['numeric'])) {
foreach ($fields_RET['numeric'] as $field) {
echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
}
}
if (count($fields_RET['date'])) {
foreach ($fields_RET['date'] as $field) {
echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
}
}
if (count($fields_RET['select'])) {
foreach ($fields_RET['select'] as $field) {
if ($field[TITLE] == 'Ethnicity' || $field[TITLE] == 'Gender' || $field[TITLE] == 'Language') {
$select_options = array();
$field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
$options = explode("\r", $field['SELECT_OPTIONS']);
if (count($options)) {
foreach ($options as $option) {
示例3: _makeAutoSelectInput
echo '<TD>';
echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'staff');
echo '</TD>';
if ($i % $per_row == 0) {
echo '</TR>';
} else {
echo '<TD style="width:50px;"></TD>';
}
$i++;
break;
case 'numeric':
if (($i - 1) % $per_row == 0) {
echo '<TR>';
}
echo '<TD>';
echo _makeTextInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'size=5 maxlength=10', 'staff');
echo '</TD>';
if ($i % $per_row == 0) {
echo '</TR>';
} else {
echo '<TD style="width:50px;"></TD>';
}
$i++;
break;
case 'date':
if (($i - 1) % $per_row == 0) {
echo '<TR>';
}
echo '<TD>';
echo _makeDateInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'staff');
echo '</TD>';
示例4: _
if ($_REQUEST['table'] == '0') {
$functions['STATE_CODE'] = '_makeSelectInput';
$LO_columns['STATE_CODE'] = _('State Code');
}
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'SHORT_NAME' => _makeTextInput('', 'SHORT_NAME'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'), 'TYPE' => _makeSelectInput('', 'TYPE'), 'DEFAULT_CODE' => _makeCheckBoxInput('', 'DEFAULT_CODE'));
if ($_REQUEST['table'] == '0') {
$link['add']['html']['STATE_CODE'] = _makeSelectInput('', 'STATE_CODE');
}
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&table={$_REQUEST['table']}";
$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)
{
示例5: _makeAutoSelectInput
echo '<TD>';
echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], $field['TITLE']);
echo '</TD>';
if ($i % 3 == 0) {
echo '</TR>';
} else {
echo '<TD width=50></TD>';
}
$i++;
break;
case 'numeric':
if (($i - 1) % 3 == 0) {
echo '<TR>';
}
echo '<TD>';
echo _makeTextInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'size=5 maxlength=10 class=cell_floating');
echo '</TD>';
if ($i % 3 == 0) {
echo '</TR>';
} else {
echo '<TD width=50></TD>';
}
$i++;
break;
case 'date':
if (($i - 1) % 3 == 0) {
echo '<TR>';
}
echo '<TD>';
echo _makeDateInput('CUSTOM_' . $field['ID'], $field['TITLE']);
echo '</TD>';
示例6: UserSchool
}
}
if ($_REQUEST['modfunc'] != 'remove') {
$sql = "SELECT ROOM_ID,TITLE,TITLE as NAME,CAPACITY,DESCRIPTION,SORT_ORDER FROM rooms WHERE school_id='" . UserSchool() . "' ORDER BY sort_order";
$QI = DBQuery($sql);
$LO = DBGet(DBQuery($sql));
$room_id_arr = array();
foreach ($LO as $ti => $td) {
array_push($room_id_arr, $td[ROOM_ID]);
}
$room_id = implode(',', $room_id_arr);
$room_ids = '';
$room_iv = '';
$rooms_RET = DBGet($QI, array('TITLE' => '_makeTextInput', 'CAPACITY' => '_makeIntInput', 'DESCRIPTION' => '_makeTextInput', 'SORT_ORDER' => '_makeIntInput'));
$columns = array('TITLE' => 'Title', 'CAPACITY' => 'Capacity', 'DESCRIPTION' => 'Description', 'SORT_ORDER' => 'Sort Order');
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'CAPACITY' => _makeTextInput('', 'CAPACITY'), 'DESCRIPTION' => _makeTextInput('', 'DESCRIPTION'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'ROOM_ID');
echo "<FORM name=F1 id=F1 action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=update method=POST>";
echo '<input type="hidden" name="h1" id="h1" value="' . $room_id . '">';
$count_room = count($rooms_RET);
if ($count_room > 0) {
$count_room = DBGet(DBQuery("Select max(ROOM_ID) as maxid FROM rooms"));
$count_room = $count_room[1]['MAXID'];
}
echo "<input type=hidden id=count_room value={$count_room} />";
ListOutput($rooms_RET, $columns, 'Room', 'Rooms', $link);
echo '<br><CENTER>' . SubmitButton('Save', '', 'class=btn_medium onclick="return formcheck_rooms();"') . '</CENTER>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
示例7: _makeAutoSelectInput
echo '<td width="121px">' . $req . $field['TITLE'] . '</td><td>:</td><td>';
echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], '');
echo '</TD>';
echo '</TR>';
break;
case 'edits':
echo '<TR>';
echo '<td width="121px">' . $req . $field['TITLE'] . '</td><td>:</td><td>';
echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], '');
echo '</TD>';
echo '</TR>';
break;
case 'numeric':
echo '<TR>';
echo '<td width="121px">' . $req . $field['TITLE'] . '</td><td>:</td><td>';
echo _makeTextInput('CUSTOM_' . $field['ID'], '', 'size=5 maxlength=10 class=cell_medium');
echo '</TD>';
echo '</TR>';
break;
case 'date':
echo '<TR>';
echo '<td width="121px">' . $req . $field['TITLE'] . '</td><td>:</td><td>';
echo _makeDateInput_mod('CUSTOM_' . $field['ID'], '');
echo '</TD>';
echo '</TR>';
break;
case 'codeds':
case 'select':
echo '<TR>';
echo '<td width="121px">' . $req . $field['TITLE'] . '</td><td>:</td><td>';
echo _makeSelectInput('CUSTOM_' . $field['ID'], '');
示例8: PreparePHP_SELF
//modif Francois: css WPadmin
echo '<TABLE style="margin:0 auto;"><TR><TD>';
echo '<span class="center"><SELECT name=category_id onchange="document.location.href=\'' . PreparePHP_SELF($_REQUEST, array('category_id')) . '&category_id=\'+this.form.category_id.value;"><OPTION value="">' . _('All Categories') . '</OPTION>';
foreach ($categories_RET as $category) {
echo '<OPTION value="' . $category['ID'] . '"' . ($_REQUEST['category_id'] == $category['ID'] ? ' SELECTED="SELECTED"' : '') . '>' . ParseMLField($category['TITLE']) . '</OPTION>';
}
echo '</SELECT>';
echo '</span><TABLE class="widefat cellspacing-0">';
if (count($fields_RET['text'])) {
foreach ($fields_RET['text'] as $field) {
echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
}
}
if (count($fields_RET['numeric'])) {
foreach ($fields_RET['numeric'] as $field) {
echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
}
}
if (count($fields_RET['date'])) {
foreach ($fields_RET['date'] as $field) {
echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
}
}
if (count($fields_RET['select'])) {
foreach ($fields_RET['select'] as $field) {
$select_options = array();
$field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
$options = explode("\r", $field['SELECT_OPTIONS']);
if (count($options)) {
foreach ($options as $option) {
if ($option != '') {
示例9: DeletePromptStaffCert
$a = DeletePromptStaffCert('Certificate');
}
if ($_REQUEST['delete_ok'] == '1') {
DBQuery("DELETE FROM staff_certification WHERE STAFF_CERTIFICATION_ID=" . $_REQUEST['certification_id']);
unset($_REQUEST['modfunc']);
}
if (!$_REQUEST['modfunc']) {
if ($_REQUEST['certification_id'] != '' && $_REQUEST['certification_id'] != 'new') {
$this_certification_RET = DBGet(DBQuery("SELECT * FROM staff_certification\r\n WHERE STAFF_ID=" . UserStaffID()));
$this_certification = $this_certification_RET[1];
}
$sql = "SELECT STAFF_CERTIFICATION_ID AS ID,STAFF_ID,STAFF_CERTIFICATION_DATE,STAFF_CERTIFICATION_EXPIRY_DATE,\r\n STAFF_CERTIFICATION_CODE,STAFF_CERTIFICATION_SHORT_NAME,STAFF_CERTIFICATION_NAME,\r\n STAFF_PRIMARY_CERTIFICATION_INDICATOR,STAFF_CERTIFICATION_DESCRIPTION FROM staff_certification\r\n WHERE STAFF_ID=" . UserStaffID();
$QI = DBQuery($sql);
$cert_RET = DBGet($QI, array('STAFF_CERTIFICATION_NAME' => '_makeTextInput', 'STAFF_CERTIFICATION_CODE' => '_makeTextInput', 'STAFF_CERTIFICATION_DATE' => '_makeDateInput', 'STAFF_CERTIFICATION_SHORT_NAME' => '_makeTextInput', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => '_makeSelectInput', 'STAFF_CERTIFICATION_EXPIRY_DATE' => '_makeDateInput', 'STAFF_CERTIFICATION_DESCRIPTION' => '_makeContentInput'));
$columns = array('STAFF_CERTIFICATION_NAME' => 'Certification Name', 'STAFF_CERTIFICATION_CODE' => 'Certification Code', 'STAFF_CERTIFICATION_DATE' => 'Certification Date', 'STAFF_CERTIFICATION_SHORT_NAME' => 'Certification Short Name', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => 'Primary Certification Indicator', 'STAFF_CERTIFICATION_EXPIRY_DATE' => 'Certification Expiry Date', 'STAFF_CERTIFICATION_DESCRIPTION' => 'Certification Description');
$link['add']['html'] = array('STAFF_CERTIFICATION_NAME' => _makeTextInput('', 'STAFF_CERTIFICATION_NAME'), 'STAFF_CERTIFICATION_CODE' => _makeTextInput('', 'STAFF_CERTIFICATION_CODE'), 'STAFF_CERTIFICATION_DATE' => _makeDateInput('', 'STAFF_CERTIFICATION_DATE'), 'STAFF_CERTIFICATION_SHORT_NAME' => _makeTextInput('', 'STAFF_CERTIFICATION_SHORT_NAME'), 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => _makeSelectInput('', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR'), 'STAFF_CERTIFICATION_EXPIRY_DATE' => _makeDateInput('', 'STAFF_CERTIFICATION_EXPIRY_DATE'), 'STAFF_CERTIFICATION_DESCRIPTION' => _makeContentInput('', 'STAFF_CERTIFICATION_DESCRIPTION'));
// $link['remove']['link'] = "Modules.php?modname=$_REQUEST[modname]&include=$_REQUEST[include]&category_id=$_REQUEST[category_id]&staff_id=".UserStaffID()."&modfunc=remove";
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&include={$_REQUEST['include']}&category_id={$_REQUEST['category_id']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'ID');
ListOutputStaffCert($cert_RET, $columns, 'Certificate', 'Certificates', $link);
//echo '<pre>';print_r($_REQUEST);echo '</pre>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name != 'TITLE') {
示例10: UserSyear
}
}
if ($_REQUEST['modfunc'] != 'remove') {
if ($_REQUEST['table'] !== 'new') {
$sql = 'SELECT ID,TITLE,SHORT_NAME,TYPE,DEFAULT_CODE,STATE_CODE,SORT_ORDER,TABLE_NAME FROM attendance_codes WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' AND TABLE_NAME=\'' . $_REQUEST['table'] . '\' ORDER BY SORT_ORDER,TITLE';
$QI = DBQuery($sql);
$LO = DBGet(DBQuery($sql));
$attandance_id_arr = array();
foreach ($LO as $ti => $td) {
array_push($attandance_id_arr, $td[ID]);
}
$attandance_id = implode(',', $attandance_id_arr);
$attendance_codes_RET = DBGet($QI, array('TITLE' => '_makeTextInput', 'SHORT_NAME' => '_makeTextInput', 'SORT_ORDER' => '_makeTextInput', 'TYPE' => '_makeSelectInput', 'STATE_CODE' => '_makeSelectInput', 'DEFAULT_CODE' => '_makeCheckBoxInput'));
}
$columns = array('TITLE' => 'Title', 'SHORT_NAME' => 'Short Name', 'SORT_ORDER' => 'Sort Order', 'TYPE' => 'Type', 'DEFAULT_CODE' => 'Default for Teacher', 'STATE_CODE' => 'State Code');
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'SHORT_NAME' => _makeTextInput('', 'SHORT_NAME'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER', 'onkeydown=return numberOnlyMod(event,this);'), 'TYPE' => _makeSelectInput('', 'TYPE'), 'DEFAULT_CODE' => _makeCheckBoxInput('', 'DEFAULT_CODE'), 'STATE_CODE' => _makeSelectInput('', 'STATE_CODE'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'ID', 'table' => 'TABLE_NAME');
echo "<FORM name=F1 id=F1 action=Modules.php?modname=" . strip_tags(trim($_REQUEST[modname])) . "&modfunc=update&table=" . strip_tags(trim($_REQUEST[table])) . " method=POST>";
echo '<input type="hidden" name="h1" id="h1" value="' . $attandance_id . '">';
$tabs = array(array('title' => 'Attendance', 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=0"));
$categories_RET = DBGet(DBQuery('SELECT ID,TITLE FROM attendance_code_categories WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY TITLE'));
foreach ($categories_RET as $category) {
$tabs[] = array('title' => $category['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=" . $category['ID']);
}
if ($_REQUEST['table'] === 'new') {
$tabs[] = array('title' => button('white_add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=new");
} else {
$tabs[] = array('title' => button('add'), 'link' => "Modules.php?modname={$_REQUEST['modname']}&table=new");
}
$max_id = DBGet(DBQuery("select max(ID) maxid from attendance_codes"));
示例11: DBGet
$has_assigned_RET = DBGet(DBQuery("SELECT COUNT(*) AS TOTAL_ASSIGNED FROM student_standards WHERE grade_id={$_REQUEST['id']}"));
$has_assigned = $has_assigned_RET[1]['TOTAL_ASSIGNED'];
if ($has_assigned > 0) {
UnableDeletePromptX('Cannot delete because standard grade is associated.');
} else {
if (DeletePromptX('Standard Grade')) {
DBQuery("DELETE FROM standard_grades WHERE ID='{$_REQUEST['id']}'");
unset($_SESSION['GR_scale_id']);
}
}
}
if (!$_REQUEST['modfunc']) {
$sql = "SELECT ID,GRADE,DESCRIPTION,SORT_ORDER FROM standard_grades WHERE school_id='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY sort_order,grade";
$functions = array('GRADE' => '_makeTextInput', 'DESCRIPTION' => '_makeTextInput', 'SORT_ORDER' => '_makeIntInput');
$LO_columns = array('GRADE' => 'Grade', 'DESCRIPTION' => 'Description', 'SORT_ORDER' => 'Order');
$link['add']['html'] = array('GRADE' => _makeTextInput('', 'GRADE'), 'DESCRIPTION' => _makeTextInput('', 'DESCRIPTION'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'));
$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);
echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
ListOutput($LO_ret, $LO_columns, 'Standard Grade', 'Standard Grades', $link, array(), array('search' => false));
echo '<BR>';
echo '<CENTER>' . SubmitButton('Save', '', 'class=btn_medium onclick="formcheck_grade_grade();"') . '</CENTER>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
示例12: echo
echo '<TD style="width:100px">';
echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeAutoSelectInput('CUSTOM_' . $field['ID']);
echo '</TD>';
echo '</TR>';
break;
case 'edits':
echo '<TR>';
echo '<TD style="width:100px">';
echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeAutoSelectInput('CUSTOM_' . $field['ID']);
echo '</TD>';
echo '</TR>';
break;
case 'numeric':
echo '<TR>';
echo '<TD style="width:100px">';
echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $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:100px">';
echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID'], '');
echo '</TD>';
echo '</TR>';
break;
case 'codeds':
case 'select':
echo '<TR>';
echo '<TD style="width:100px">';
echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeSelectInput('CUSTOM_' . $field['ID'], '');
示例13: DrawHeader
}
}
}
DrawHeader(ProgramTitle());
if ($_REQUEST['modfunc'] == 'remove' && AllowEdit()) {
if (DeletePrompt('period')) {
DBQuery("DELETE FROM SCHOOL_PERIODS WHERE PERIOD_ID='{$_REQUEST['id']}'");
unset($_REQUEST['modfunc']);
}
}
if ($_REQUEST['modfunc'] != 'remove') {
$sql = "SELECT PERIOD_ID,TITLE,SHORT_NAME,SORT_ORDER,LENGTH,START_TIME,END_TIME,BLOCK,ATTENDANCE FROM SCHOOL_PERIODS WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER";
$QI = DBQuery($sql);
$periods_RET = DBGet($QI, array('TITLE' => '_makeTextInput', 'SHORT_NAME' => '_makeTextInput', 'SORT_ORDER' => '_makeTextInput', 'BLOCK' => '_makeTextInput', 'LENGTH' => '_makeTextInput', 'START_TIME' => '_makeTimeInput', 'END_TIME' => '_makeTimeInput', 'ATTENDANCE' => '_makeCheckboxInput'));
$columns = array('TITLE' => _('Title'), 'SHORT_NAME' => _('Short Name'), 'SORT_ORDER' => _('Sort Order'), 'LENGTH' => _('Length (minutes)'), 'BLOCK' => _('Block'), 'ATTENDANCE' => _('Used for Attendance'), 'START_TIME' => _('Start Time'), 'END_TIME' => _('End Time'));
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'SHORT_NAME' => _makeTextInput('', 'SHORT_NAME'), 'LENGTH' => _makeTextInput('', 'LENGTH'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'), 'BLOCK' => _makeTextInput('', 'BLOCK'), 'START_TIME' => _makeTimeInput('', 'START_TIME'), 'END_TIME' => _makeTimeInput('', 'END_TIME'), 'ATTENDANCE' => _makeCheckboxInput('', 'ATTENDANCE'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'PERIOD_ID');
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
DrawHeader('', SubmitButton(_('Save')));
ListOutput($periods_RET, $columns, _('Period'), _('Periods'), $link);
echo '<CENTER>' . SubmitButton(_('Save')) . '</CENTER>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['PERIOD_ID']) {
$id = $THIS_RET['PERIOD_ID'];
} else {
$id = 'new';
示例14: DBQuery
DBQuery("DELETE FROM PORTAL_NOTES WHERE ID='{$_REQUEST['id']}'");
//modif Francois: Moodle integrator
if (MOODLE_INTEGRATOR) {
$moodleError = Moodle($_REQUEST['modname'], 'core_notes_delete_notes');
}
unset($_REQUEST['modfunc']);
}
}
if ($_REQUEST['modfunc'] != 'remove') {
//modif Francois: file attached to portal notes
$sql = "SELECT ID,SORT_ORDER,TITLE,CONTENT,START_DATE,END_DATE,PUBLISHED_PROFILES,FILE_ATTACHED,CASE WHEN END_DATE IS NOT NULL AND END_DATE<CURRENT_DATE THEN 'Y' ELSE NULL END AS EXPIRED FROM PORTAL_NOTES WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "' ORDER BY EXPIRED DESC,SORT_ORDER,PUBLISHED_DATE DESC";
$QI = DBQuery($sql);
$notes_RET = DBGet($QI, array('TITLE' => '_makeTextInput', 'CONTENT' => '_makeContentInput', 'SORT_ORDER' => '_makeTextInput', 'FILE_ATTACHED' => '_makeFileAttached', 'START_DATE' => '_makePublishing'));
$columns = array('TITLE' => _('Title'), 'CONTENT' => _('Note'), 'SORT_ORDER' => _('Sort Order'), 'FILE_ATTACHED' => _('File Attached'), 'START_DATE' => _('Publishing Options'));
//,'START_TIME'=>'Start Time','END_TIME'=>'End Time'
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'CONTENT' => _makeContentInput('', 'CONTENT'), 'SHORT_NAME' => _makeTextInput('', 'SHORT_NAME'), 'SORT_ORDER' => _makeTextInput('', 'SORT_ORDER'), 'FILE_ATTACHED' => _makeFileAttached('', 'FILE_ATTACHED'), 'START_DATE' => _makePublishing('', 'START_DATE'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'ID');
echo '<FORM action="Modules.php?modname=' . $_REQUEST[modname] . '&modfunc=update" method="POST" enctype="multipart/form-data">';
DrawHeader('', SubmitButton(_('Save')));
//modif Francois: fix SQL bug invalid sort order
if (isset($error)) {
echo $error;
}
//modif Francois: Moodle integrator
echo $moodleError;
if (!empty($PortalNotesFilesError)) {
echo ErrorMessage(array($PortalNotesFilesError));
}
ListOutput($notes_RET, $columns, 'Note', 'Notes', $link);
echo '<BR /><span class="center">' . SubmitButton(_('Save')) . '</span>';
示例15: UserSyear
}
}
}
if ($_REQUEST['modfunc'] != 'remove') {
#$sql = "SELECT PERIOD_ID,TITLE,SHORT_NAME,SORT_ORDER,LENGTH,START_TIME,END_TIME,BLOCK,ATTENDANCE FROM school_periods WHERE SYEAR='".UserSyear()."' AND SCHOOL_ID='".UserSchool()."' ORDER BY SORT_ORDER";
$sql = 'SELECT PERIOD_ID,TITLE,SHORT_NAME,SORT_ORDER,LENGTH,START_TIME,END_TIME,ATTENDANCE,IGNORE_SCHEDULING FROM school_periods WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER';
$QI = DBQuery($sql);
#$periods_RET = DBGet($QI,array('TITLE'=>'_makeTextInput','SHORT_NAME'=>'_makeTextInput','SORT_ORDER'=>'_makeTextInputMod','BLOCK'=>'_makeTextInput','LENGTH'=>'_makeTextInputMod','START_TIME'=>'_makeTimeInput','END_TIME'=>'_makeTimeInputEnd','ATTENDANCE'=>'_makeCheckboxInput'));
#$periods_RET = DBGet($QI,array('TITLE'=>'_makeTextInput','SHORT_NAME'=>'_makeTextInput','SORT_ORDER'=>'_makeTextInputMod','BLOCK'=>'_makeTextInput','LENGTH'=>'LENGTH','START_TIME'=>'_makeTimeInput','END_TIME'=>'_makeTimeInputEnd','ATTENDANCE'=>'_makeCheckboxInput'));
$periods_RET = DBGet($QI, array('TITLE' => '_makeTextInput', 'SHORT_NAME' => '_makeTextInput', 'SORT_ORDER' => '_makeTextInputMod', 'LENGTH' => 'LENGTH', 'START_TIME' => '_makeTimeInput', 'END_TIME' => '_makeTimeInputEnd', 'ATTENDANCE' => '_makeCheckboxInput', 'IGNORE_SCHEDULING' => '_makeCheckboxInput'));
#$columns = array('TITLE'=>'Title','SHORT_NAME'=>'Short Name','SORT_ORDER'=>'Sort Order','START_TIME'=>'Start Time','END_TIME'=>'End Time','LENGTH'=>'Length (minutes)','IGNORE_SCHEDULING'=>'Block','ATTENDANCE'=>'Used for Attendance');
$columns = array('TITLE' => '' . _('Title') . '', 'SHORT_NAME' => '' . _('Short Name') . '', 'SORT_ORDER' => '' . _('Sort Order') . '', 'START_TIME' => '' . _('Start Time') . '', 'END_TIME' => '' . _('End Time') . '', 'LENGTH' => '' . _('Length') . ' <div></div>(' . _('minutes') . ')', 'ATTENDANCE' => '' . _('Used for') . ' <div></div>' . _('Attendance') . '', 'IGNORE_SCHEDULING' => '' . _('Ignore for') . '<div></div>' . _('Scheduling') . '');
//,'START_TIME'=>'Start Time','END_TIME'=>'End Time'
#$link['add']['html'] = array('TITLE'=>_makeTextInput('','TITLE'),'SHORT_NAME'=>_makeTextInput('','SHORT_NAME'),'LENGTH'=>_makeTextInputMod2('','LENGTH'),'SORT_ORDER'=>_makeTextInputMod2('','SORT_ORDER'),'BLOCK'=>_makeTextInput('','BLOCK'),'START_TIME'=>_makeTimeInput('','START_TIME'),'END_TIME'=>_makeTimeInputEnd('','END_TIME'),'ATTENDANCE'=>_makeCheckboxInput('','ATTENDANCE'));
#$link['add']['html'] = array('TITLE'=>_makeTextInput('','TITLE'),'SHORT_NAME'=>_makeTextInput('','SHORT_NAME'),'SORT_ORDER'=>_makeTextInputMod2('','SORT_ORDER'),'BLOCK'=>_makeTextInput('','BLOCK'),'START_TIME'=>_makeTimeInput('','START_TIME'),'END_TIME'=>_makeTimeInputEnd('','END_TIME'),'ATTENDANCE'=>_makeCheckboxInput('','ATTENDANCE'));
$link['add']['html'] = array('TITLE' => _makeTextInput('', 'TITLE'), 'SHORT_NAME' => _makeTextInput('', 'SHORT_NAME'), 'SORT_ORDER' => _makeTextInputMod2('', 'SORT_ORDER'), 'START_TIME' => _makeTimeInput('', 'START_TIME'), 'END_TIME' => _makeTimeInputEnd('', 'END_TIME'), 'ATTENDANCE' => _makeCheckboxInput('', 'ATTENDANCE'), 'IGNORE_SCHEDULING' => _makeCheckboxInput('', 'IGNORE_SCHEDULING'));
$link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove";
$link['remove']['variables'] = array('id' => 'PERIOD_ID');
if ($err_msg) {
echo "<b style='color:red'>" . $err_msg . "</b>";
unset($err_msg);
}
echo "<FORM name=F1 id=F1 action=Modules.php?modname={$_REQUEST['modname']}&modfunc=update method=POST>";
#DrawHeader('',SubmitButton('Save'));
ListOutput($periods_RET, $columns, _('Period'), _('Periods'), $link);
echo '<br><CENTER>' . SubmitButton(_('Save'), '', 'class=btn_medium onclick="formcheck_school_setup_periods();"') . '</CENTER>';
echo '</FORM>';
}
function _makeTextInput($value, $name)
{
global $THIS_RET;