本文整理汇总了PHP中SelectInput函数的典型用法代码示例。如果您正苦于以下问题:PHP SelectInput函数的具体用法?PHP SelectInput怎么用?PHP SelectInput使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SelectInput函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeSelectInput
function makeSelectInput($value, $name)
{
global $THIS_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'TYPE') {
$options = array('Add' => _('Add'), 'Drop' => _('Drop'));
}
return SelectInput($value, 'values[' . $id . '][' . $name . ']', '', $options);
}
示例2: makeGradeInput
function makeGradeInput($value, $name)
{
global $THIS_RET, $grades;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if (!$grades) {
$grades_RET = DBGet(DBQuery("SELECT ID,TITLE FROM SCHOOL_GRADELEVELS WHERE SCHOOL_ID='" . UserSchool() . "' ORDER BY SORT_ORDER"));
if (count($grades_RET)) {
foreach ($grades_RET as $grade) {
$grades[$grade['ID']] = $grade['TITLE'];
}
}
}
return SelectInput($value, 'values[' . $id . '][' . $name . ']', '', $grades, 'N/A');
}
示例3: DBGet
}
echo '</TD></TR>';
echo '<TR><TD width=100% valign=top>';
$items_RET = DBGet(DBQuery("SELECT fsi.SHORT_NAME,fsi.DESCRIPTION,fsi.PRICE_STAFF,fsi.ICON FROM FOOD_SERVICE_ITEMS fsi,FOOD_SERVICE_MENU_ITEMS fsmi WHERE fsmi.MENU_ID='" . $_REQUEST['menu_id'] . "' AND fsi.ITEM_ID=fsmi.ITEM_ID AND fsmi.CATEGORY_ID IS NOT NULL AND fsi.SCHOOL_ID='" . UserSchool() . "' ORDER BY fsi.SORT_ORDER"), array('ICON' => 'makeIcon'), array('SHORT_NAME'));
$items = array();
foreach ($items_RET as $sn => $item) {
$items += array($sn => $item[1]['DESCRIPTION']);
}
$LO_ret = array(array());
foreach ($_SESSION['FSA_sale'] as $id => $item_sn) {
$price = $items_RET[$item_sn][1]['PRICE_STAFF'];
$LO_ret[] = array('SALE_ID' => $id, 'PRICE' => $price, 'DESCRIPTION' => $items_RET[$item_sn][1]['DESCRIPTION'], 'ICON' => $items_RET[$item_sn][1]['ICON']);
}
unset($LO_ret[0]);
$link['remove'] = array('link' => "Modules.php?modname={$_REQUEST['modname']}&modfunc=remove&menu_id={$_REQUEST['menu_id']}", 'variables' => array('id' => 'SALE_ID'));
$link['add']['html'] = array('DESCRIPTION' => '<TABLE border=0 cellpadding=0 cellspacing=0><TR><TD>' . SelectInput('', 'item_sn', '', $items) . '</TD></TR></TABLE>', 'ICON' => '<TABLE border=0 cellpadding=0 cellspacing=0><TR><TD><INPUT type=submit value=' . _('Add') . '></TD></TR></TABLE>', 'remove' => button('add'));
$columns = array('DESCRIPTION' => _('Item'), 'ICON' => _('Icon'), 'PRICE' => _('Price'));
$tabs = array();
foreach ($menus_RET as $id => $menu) {
$tabs[] = array('title' => $menu[1]['TITLE'], 'link' => "Modules.php?modname={$_REQUEST['modname']}&menu_id={$id}");
}
$extra = array('save' => false, 'search' => false, 'header' => WrapTabs($tabs, "Modules.php?modname={$_REQUEST['modname']}&menu_id={$_REQUEST['menu_id']}"));
echo '<BR>';
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&modfunc=add&menu_id={$_REQUEST['menu_id']} method=POST>";
ListOutput($LO_ret, $columns, _('Item'), _('Items'), $link, array(), $extra);
echo '</FORM>';
echo '</TD></TR></TABLE>';
} else {
ErrorMessage(array(_('This user does not have a Food Service Account.')), 'fatal');
}
}
示例4: _makeCodePulldown
function _makeCodePulldown($value, $title)
{
global $THIS_RET, $codes_RET, $current_RET, $current_schedule_RET, $date;
if (!is_array($current_schedule_RET[$THIS_RET['STUDENT_ID']])) {
$current_schedule_RET[$THIS_RET['STUDENT_ID']] = DBGet(DBQuery('SELECT cp.PERIOD_ID,cp.COURSE_PERIOD_ID FROM schedule s,course_periods cp WHERE s.STUDENT_ID=\'' . $THIS_RET['STUDENT_ID'] . '\' AND s.SYEAR=\'' . UserSyear() . '\' AND s.SCHOOL_ID=\'' . UserSchool() . '\' AND cp.COURSE_PERIOD_ID = s.COURSE_PERIOD_ID AND cp.DOES_ATTENDANCE=\'Y\' AND s.MARKING_PERIOD_ID IN (' . GetAllMP('QTR', GetCurrentMP('QTR', $date)) . ') AND (\'' . $date . '\' BETWEEN s.START_DATE AND s.END_DATE OR s.END_DATE IS NULL)'), array(), array('PERIOD_ID'));
if (!$current_schedule_RET[$THIS_RET['STUDENT_ID']]) {
$current_schedule_RET[$THIS_RET['STUDENT_ID']] = array();
}
}
if ($THIS_RET['COURSE']) {
$period = $THIS_RET['COURSE_PERIOD_ID'];
$period_id = $THIS_RET['PERIOD_ID'];
foreach ($codes_RET as $code) {
$options[$code['ID']] = $code['TITLE'];
}
} else {
$period_id = substr($title, 7);
$period = $current_schedule_RET[$THIS_RET['STUDENT_ID']][$period_id][1]['COURSE_PERIOD_ID'];
foreach ($codes_RET as $code) {
$options[$code['ID']] = $code['SHORT_NAME'];
}
}
$val = $current_RET[$THIS_RET['STUDENT_ID']][$period][1]['ATTENDANCE_CODE'];
if ($current_schedule_RET[$THIS_RET['STUDENT_ID']][$period_id]) {
return SelectInput($val, 'attendance[' . $THIS_RET['STUDENT_ID'] . '][' . $period . '][ATTENDANCE_CODE]', '', $options);
} else {
return false;
}
}
示例5: _makeGradeForStandard
function _makeGradeForStandard($value, $column)
{
global $THIS_RET, $report_card_grades;
#echo '<pre>';print_r($THIS_RET);echo'</pre>';
return SelectInput($THIS_RET['GRADE_ID'], "student_standards[{$THIS_RET['ID']}][GRADE_ID]", '', $report_card_grades, 'N/A', '') . " <br/>";
}
示例6: elseif
echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N" onClick="hidediv();"> No Access <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y" onClick="showdiv();" checked> Access</TD></TR></TABLE>';
echo '<div id="hideShow">';
} elseif ($this_school_mod['USERNAME'] && $this_school_mod['PASSWORD'] && $this_school['OPENSIS_ACCESS']) {
if ($this_school['OPENSIS_ACCESS'] == 'N') {
echo '<table><TR><TD><input type="radio" id="noaccs" name="values[SCHOOL][OPENSIS_ACCESS]" value="N" checked> No Access <input type="radio" id="r4" name="values[SCHOOL][OPENSIS_ACCESS]" value="Y" > Access</TD></TR></TABLE>';
} elseif ($this_school['OPENSIS_ACCESS'] == 'Y') {
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>";
示例7: array
// You can't change a student field type after it has been created
// mab - allow changing between select and autos and edits and text and exports
if ($_REQUEST['id'] != 'new') {
if ($RET['TYPE'] != 'select' && $RET['TYPE'] != 'autos' && $RET['TYPE'] != 'edits' && $RET['TYPE'] != 'text' && $RET['TYPE'] != 'exports') {
$allow_edit = $_ROSARIO['allow_edit'];
$AllowEdit = $_ROSARIO['AllowEdit'][$modname];
$_ROSARIO['allow_edit'] = false;
$_ROSARIO['AllowEdit'][$modname] = array();
$type_options = array('select' => _('Pull-Down'), 'autos' => _('Auto Pull-Down'), 'edits' => _('Edit Pull-Down'), 'text' => _('Text'), 'radio' => _('Checkbox'), 'codeds' => _('Coded Pull-Down'), 'exports' => _('Export Pull-Down'), 'numeric' => _('Number'), 'multiple' => _('Select Multiple from Options'), 'date' => _('Date'), 'textarea' => _('Long Text'));
} else {
$type_options = array('select' => _('Pull-Down'), 'autos' => _('Auto Pull-Down'), 'edits' => _('Edit Pull-Down'), 'exports' => _('Export Pull-Down'), 'text' => _('Text'));
}
} else {
$type_options = array('select' => _('Pull-Down'), 'autos' => _('Auto Pull-Down'), 'edits' => _('Edit Pull-Down'), 'text' => _('Text'), 'radio' => _('Checkbox'), 'codeds' => _('Coded Pull-Down'), 'exports' => _('Export Pull-Down'), 'numeric' => _('Number'), 'multiple' => _('Select Multiple from Options'), 'date' => _('Date'), 'textarea' => _('Long Text'));
}
$header .= '<TD>' . SelectInput($RET['TYPE'], 'tables[' . $_REQUEST['id'] . '][TYPE]', _('Data Type'), $type_options, false) . '</TD>';
if ($_REQUEST['id'] != 'new' && $RET['TYPE'] != 'select' && $RET['TYPE'] != 'autos' && $RET['TYPE'] != 'edits' && $RET['TYPE'] != 'text' && $RET['TYPE'] != 'exports') {
$_ROSARIO['allow_edit'] = $allow_edit;
$_ROSARIO['AllowEdit'][$modname] = $AllowEdit;
}
foreach ($categories_RET as $type) {
$categories_options[$type['ID']] = ParseMLField($type['TITLE']);
}
$header .= '<TD>' . MLSelectInput($RET['CATEGORY_ID'] ? $RET['CATEGORY_ID'] : $_REQUEST['category_id'], 'tables[' . $_REQUEST['id'] . '][CATEGORY_ID]', _('Student Field Category'), $categories_options, false) . '</TD>';
$header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['id'] . '][SORT_ORDER]', _('Sort Order'), 'size=5') . '</TD>';
$header .= '</TR><TR>';
$colspan = 2;
if ($RET['TYPE'] == 'autos' || $RET['TYPE'] == 'edits' || $RET['TYPE'] == 'select' || $RET['TYPE'] == 'codeds' || $RET['TYPE'] == 'multiple' || $RET['TYPE'] == 'exports' || $_REQUEST['id'] == 'new') {
$header .= '<TD colspan="2">' . TextAreaInput($RET['SELECT_OPTIONS'], 'tables[' . $_REQUEST['id'] . '][SELECT_OPTIONS]', _('Pull-Down') . '/' . _('Auto Pull-Down') . '/' . _('Coded Pull-Down') . '/' . _('Select Multiple from Options') . '<BR />' . _('* one per line'), 'rows=7 cols=40') . '</TD>';
$colspan = 1;
}
示例8: makeGradesInput
function makeGradesInput($value, $name)
{
global $THIS_RET, $grade_scale_select, $teacher_id, $config_RET;
if ($THIS_RET['ID']) {
$id = $THIS_RET['ID'];
} else {
$id = 'new';
}
if ($name == 'GRADE_SCALE_ID') {
return SelectInput($value, "values[{$id}][{$name}]", '', $grade_scale_select, false);
} elseif ($name == 'COMMENT') {
$extra = 'size=15 maxlength=100';
} elseif ($name == 'GPA_VALUE') {
$extra = 'size=5 maxlength=5';
} elseif ($name == 'SORT_ORDER') {
$extra = 'size=5 maxlength=5';
} elseif ($name == 'BREAK_OFF' && $teacher_id && $config_RET[UserCoursePeriod() . '-' . $THIS_RET['ID']][1]['VALUE'] != '') {
return '<FONT color=blue>' . $config_RET[UserCoursePeriod() . '-' . $THIS_RET['ID']][1]['VALUE'] . '</FONT>';
} else {
$extra = 'size=5 maxlength=5';
}
return TextInput($value, "values[{$id}][{$name}]", '', $extra);
}
示例9: _makeMPSelect
function _makeMPSelect($mp_id, $name = '')
{
global $_openSIS, $THIS_RET, $fy_id;
if ($mp_id != '') {
if (!$_openSIS['_makeMPSelect']) {
$semesters_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,NULL AS SEMESTER_ID FROM school_semesters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
$quarters_RET = DBGet(DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SEMESTER_ID FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER'));
$_openSIS['_makeMPSelect'][$fy_id][1] = array('MARKING_PERIOD_ID' => "{$fy_id}", 'TITLE' => 'Full Year', 'SEMESTER_ID' => '');
foreach ($semesters_RET as $sem) {
$_openSIS['_makeMPSelect'][$fy_id][] = $sem;
}
foreach ($quarters_RET as $qtr) {
$_openSIS['_makeMPSelect'][$fy_id][] = $qtr;
}
$quarters_QI = DBQuery('SELECT MARKING_PERIOD_ID,TITLE,SEMESTER_ID FROM school_quarters WHERE SYEAR=\'' . UserSyear() . '\' AND SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER');
$quarters_indexed_RET = DBGet($quarters_QI, array(), array('SEMESTER_ID'));
foreach ($semesters_RET as $sem) {
$_openSIS['_makeMPSelect'][$sem['MARKING_PERIOD_ID']][1] = $sem;
foreach ($quarters_indexed_RET[$sem['MARKING_PERIOD_ID']] as $qtr) {
$_openSIS['_makeMPSelect'][$sem['MARKING_PERIOD_ID']][] = $qtr;
}
}
foreach ($quarters_RET as $qtr) {
$_openSIS['_makeMPSelect'][$qtr['MARKING_PERIOD_ID']][] = $qtr;
}
}
foreach ($_openSIS['_makeMPSelect'][$mp_id] as $value) {
$mps[$value['MARKING_PERIOD_ID']] = $value['TITLE'];
}
if ($THIS_RET['MARKING_PERIOD_ID'] != $mp_id) {
$mps[$THIS_RET['MARKING_PERIOD_ID']] = '* ' . $mps[$THIS_RET['MARKING_PERIOD_ID']];
}
return SelectInput($THIS_RET['MARKING_PERIOD_ID'], "schedule[{$THIS_RET['COURSE_PERIOD_ID']}][{$THIS_RET['START_DATE']}][MARKING_PERIOD_ID]", '', $mps, false);
} else {
$check_custom = DBGet(DBQuery('SELECT BEGIN_DATE,END_DATE FROM course_periods WHERE COURSE_PERIOD_ID=' . $THIS_RET['COURSE_PERIOD_ID'] . ' AND BEGIN_DATE IS NOT NULL AND END_DATE IS NOT NULL AND BEGIN_DATE!=\'0000-00-00\' AND END_DATE!=\'0000-00-00\' '));
if (count($check_custom) > 0) {
return '<div style="white-space: nowrap;">' . ProperDateAY($check_custom[1]['BEGIN_DATE']) . ' to ' . ProperDateAY($check_custom[1]['END_DATE']) . '</div>';
}
}
}
示例10: TextInput
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');
}
// warn if other students associated with the same account
if (count($xstudents)) {
$warning = Localize('colon', _('Other students associated with the same account')) . '<BR>';
foreach ($xstudents as $xstudent) {
$warning .= ' ' . str_replace('\'', ''', $xstudent['FULL_NAME']) . '<BR>';
}
echo button('warning', '', '# onMouseOver=\'stm(["Warning","' . $warning . '"],["white","#006699","","","",,"black","#e8e8ff","","","",,,,2,"#006699",2,,,,,"",,,,]);\' onMouseOut=\'htm()\'');
}
echo '</TD>';
$options = array('Inactive' => _('Inactive'), 'Disabled' => _('Disabled'), 'Closed' => _('Closed'));
echo '<TD>' . SelectInput($student['STATUS'], 'food_service[STATUS]', _('Status'), $options, _('Active')) . '</TD>';
echo '</TR><TR>';
$options = array('Reduced' => 'Reduced', 'Free' => 'Free');
echo '<TD>' . SelectInput($student['DISCOUNT'], 'food_service[DISCOUNT]', _('Discount'), $options, _('Full')) . '</TD>';
echo '<TD>' . TextInput($student['BARCODE'], 'food_service[BARCODE]', _('Barcode'), 'size=12 maxlength=25') . '</TD>';
echo '</TR>';
echo '</TABLE>';
echo '</TD></TR>';
echo '</TABLE>';
}
示例11: _makeTimeInputEnd
function _makeTimeInputEnd($value, $name)
{
global $THIS_RET;
if ($THIS_RET['PERIOD_ID']) {
$id = $THIS_RET['PERIOD_ID'];
} else {
$id = 'new';
}
$hour = substr($value, 0, strpos($value, ':'));
$m = substr($value, 0, strpos($value, ''));
for ($i = 1; $i <= 12; $i++) {
$hour_options[$i] = $i;
}
#$hour_options['0'] = '12';
for ($i = 0; $i <= 9; $i++) {
$minute_options[$i] = '0' . $i;
}
for ($i = 10; $i <= 59; $i++) {
$minute_options[$i] = $i;
}
#$m_options = array('AM'=>'AM','PM'=>'PM');
$sql_ampm = 'select end_time from school_periods where period_id=' . $id;
$res_ampm = mysql_query($sql_ampm);
$row_ampm = mysql_fetch_array($res_ampm);
$ampm = $row_ampm['end_time'];
$f_ampm = substr($ampm, -2);
$min = $row_ampm['end_time'];
$f_min = explode(":", $min);
$fn_min = substr($f_min[1], 0, 2);
if (!is_numeric($fn_min)) {
$fn_min = substr($f_min[1], 0, 1);
}
/*
if($id!='new' && $value)
return '<DIV id=etime'.$id.'><div onclick=\'addHTML("<TABLE><TR><TD>'.str_replace('"','\"',SelectInput($hour,'values['.$id.'][END_HOUR]','',$hour_options,false,'',false)).'</TD><TD>'.str_replace('"','\"',SelectInput($fn_min,'values['.$id.'][END_MINUTE]','',$minute_options,false,'',false)).'</TD><TD>'.str_replace('"','\"',SelectInput($f_ampm,'values['.$id.'][END_M]','',array('AM'=>'AM','PM'=>'PM'),false,'',false)).'</TD></TR></TABLE>","etime'.$id.'",true);\'>'.$value.'</div></DIV>';
else
return '<TABLE cellspacing=0 cellpadding=0><TR><TD>'.SelectInput($hour,'values['.$id.'][END_HOUR]','',$hour_options,false,'',false).'</TD><TD>'.SelectInput($fn_min,'values['.$id.'][END_MINUTE]','',$minute_options,false,'',false).'</TD><TD>'.SelectInput($f_ampm,'values['.$id.'][END_M]','',array('AM'=>'AM','PM'=>'PM'),false,'',false).'</TD></TR></TABLE>';
*/
if ($id != 'new' && $value) {
return '<DIV id=etime' . $id . '><div onclick=\'addHTML("<TABLE><TR><TD>' . str_replace('"', '\\"', SelectInput($hour, 'values[' . $id . '][END_HOUR]', '', $hour_options, false, '', false)) . '</TD><TD>' . str_replace('"', '\\"', SelectInput($fn_min, 'values[' . $id . '][END_MINUTE]', '', $minute_options, false, '', false)) . '</TD><TD>' . str_replace('"', '\\"', SelectInput($f_ampm, 'values[' . $id . '][END_M]', '', array('AM' => 'AM', 'PM' => 'PM'), false, '', false)) . '</TD></TR></TABLE>","etime' . $id . '",true);\'>' . $value . '</div></DIV>';
} else {
return '<TABLE cellspacing=0 cellpadding=0><TR><TD>' . SelectInput($hour, 'values[' . $id . '][END_HOUR]', '', $hour_options, 'N/A', '', false) . '</TD><TD>' . SelectInput($fn_min, 'values[' . $id . '][END_MINUTE]', '', $minute_options, 'N/A', '', false) . '</TD><TD>' . SelectInput($f_ampm, 'values[' . $id . '][END_M]', '', array('AM' => 'AM', 'PM' => 'PM'), 'N/A', '', false) . '</TD></TR></TABLE>';
}
}
示例12: _makeSelectInput
function _makeSelectInput($column, $options)
{
return SelectInput('', 'values[' . $column . ']', '', $options, _('N/A'), "style='max-width:250;'");
}
示例13: date
$date = date('d-M-y', $day_time);
echo "<TD width=100 class=" . ($calendar_RET[$date][1]['MINUTES'] ? $calendar_RET[$date][1]['MINUTES'] == '999' ? 'calendar_active' : 'calendar_extra' : 'calendar_holiday') . " valign=top><table width=100><tr><td width=5 valign=top>{$i}</td><td width=95 align=right>";
if (AllowEdit()) {
if ($calendar_RET[$date][1]['MINUTES'] == '999') {
echo '<TABLE cellpadding=0 cellspacing=0 ><TR><TD>' . CheckboxInput($calendar_RET[$date], "all_day[{$date}]", '', '', false, '<IMG SRC=assets/check.gif> ') . '</TD></TR></TABLE>';
} else {
echo "<TABLE cellpadding=0 cellspacing=0 ><TR><TD><INPUT type=checkbox name=all_day[{$date}] value=Y></TD>";
echo '<TD>' . TextInput($calendar_RET[$date][1]['MINUTES'], "minutes[{$date}]", '', 'size=3 class=cell_small onkeydown="return numberOnly(event);"') . '</TD></TR></TABLE>';
}
}
if (count($blocks_RET) > 0) {
unset($options);
foreach ($blocks_RET as $block) {
$options[$block['BLOCK']] = $block['BLOCK'];
}
echo SelectInput($calendar_RET[$date][1]['BLOCK'], "blocks[{$date}]", '', $options);
}
echo "</td></tr><tr><TD colspan=2 height=50 valign=top>";
if (count($events_RET[$date])) {
echo '<TABLE cellpadding=2 cellspacing=2 border=0>';
foreach ($events_RET[$date] as $event) {
echo "<TR><TD>" . button('dot', '0000FF', '', '6') . "</TD><TD> <A HREF=# onclick='javascript:window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=detail&event_id={$event['ID']}&year={$_REQUEST['year']}&month=" . MonthNWSwitch($_REQUEST['month'], 'tochar') . "\",\"blank\",\"width=500,height=300\"); return false;'><b>" . ($event['TITLE'] ? $event['TITLE'] : '***') . "</b></A></TD></TR>";
}
if (count($assignments_RET[$date])) {
foreach ($assignments_RET[$date] as $event) {
echo "<TR><TD>" . button('dot', $event['ASSIGNED'] == 'Y' ? '00FF00' : 'FF0000', '', 6) . "</TD><TD><A HREF=# onclick='javascript:window.open(\"for_window.php?modname={$_REQUEST['modname']}&modfunc=detail&assignment_id={$event['ID']}&year={$_REQUEST['year']}&month=" . MonthNWSwitch($_REQUEST['month'], 'tochar') . "\",\"blank\",\"width=500,height=300\"); return false;'>" . $event['TITLE'] . "</A></TD></TR>";
}
}
echo '</TABLE>';
} elseif (count($assignments_RET[$date])) {
echo '<TABLE cellpadding=0 cellspacing=0 border=0>';
示例14: DBGet
echo '<TD bgcolor=' . $color . '><INPUT type=radio name=values[Preferences][HIGHLIGHT] value=' . $color . (Preferences('HIGHLIGHT') == $color ? ' CHECKED' : '') . '></TD>';
}
echo '</TR></TABLE></TD></TR><TR><td class=break></td></tr>';
echo '<TR><TD><b>Currency</b></TD></tr><tr><TD>';
# echo '<TR><TD><b>Currency</b></TD></tr><tr><TD><SELECT name=values[Preferences][CURRENCY]>';
$values = DBGet(DBQuery("SELECT VALUE AS ID,TITLE FROM PROGRAM_CONFIG WHERE PROGRAM='Currency' "));
# $values = array('USD' => 'US Dollar','GBP' => 'British Pound','EUR' => 'Euro','CAD' => 'Canadian Dollar','AUD' => 'Australian Dollar','JPY' => 'Japanese Yen','BRL' => 'Brazillian Real');
##foreach($values as $symbol => $name)
#echo '<OPTION value='.$symbol.((Preferences('CURRENCY')==$symbol)?' SELECTED':'').'>'.$name.'</OPTION>';
#echo '</SELECT></TD></TR>';
$current_RET = DBGet(DBQuery("SELECT TITLE,VALUE,PROGRAM FROM PROGRAM_USER_CONFIG WHERE USER_ID='1' AND TITLE='CURRENCY' AND PROGRAM IN ('Preferences') "));
$val = $current_RET[1]['VALUE'];
foreach ($values as $symbol) {
$symbols[$symbol['ID']] = $symbol['TITLE'];
}
echo SelectInput($val, 'values[Preferences][CURRENCY]', '', $symbols, 'N/A');
echo '</TD></TR>';
echo '<TR><TD><b>Date Format</b></TD></tr><tr><TD><SELECT name=values[Preferences][MONTH]>';
$values = array('F', 'M', 'm', 'n');
foreach ($values as $value) {
echo '<OPTION value=' . $value . (Preferences('MONTH') == $value ? ' SELECTED' : '') . '>' . date($value) . '</OPTION>';
}
echo '</SELECT> ';
echo '<SELECT name=values[Preferences][DAY]>';
$values = array('d', 'j', 'jS');
foreach ($values as $value) {
echo '<OPTION value=' . $value . (Preferences('DAY') == $value ? ' SELECTED' : '') . '>' . date($value == 'd' ? '[0]j' : $value) . '</OPTION>';
}
echo '</SELECT> ';
echo '<SELECT name=values[Preferences][YEAR]>';
$values = array('Y', 'y', '');
示例15: _makeType
function _makeType($value, $name)
{
global $THIS_RET;
if ($THIS_RET['USAGE_ID']) {
$id = $THIS_RET['USAGE_ID'];
} else {
$id = 'new';
}
$new_options = array('checkbox' => _('Checkbox'), 'text' => _('Text'), 'multiple_checkbox' => _('Select Multiple from Options'), 'multiple_radio' => _('Select One from Options'), 'select' => _('Pull-Down'), 'date' => _('Date'), 'numeric' => _('Number'), 'textarea' => _('Long Text'));
if ($THIS_RET['ID']) {
return $new_options[$value];
} else {
return SelectInput($value, 'values[new][' . $name . ']', '', $new_options, false);
}
}