本文整理汇总了PHP中ParseMLField函数的典型用法代码示例。如果您正苦于以下问题:PHP ParseMLField函数的具体用法?PHP ParseMLField怎么用?PHP ParseMLField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ParseMLField函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ParseMLArray
function ParseMLArray($array, $keys)
{
foreach ($array as $k => $v) {
if (is_array($v)) {
$array[$k] = ParseMLArray($v, $keys);
} else {
if (!is_array($keys)) {
$keys = array($keys);
}
foreach ($keys as $key) {
if ($k == $key) {
$array[$k] = ParseMLField($v);
}
}
}
}
return $array;
}
示例2: DrawRoundedRect
function DrawRoundedRect($title, $link = '', $tabcolor = '#333366', $textcolor = '#FFFFFF', $type = '', $rollover = '')
{
if (substr($title, 0, 1) != '<') {
$title = preg_replace("/ /", " ", $title);
}
if (!$tabcolor) {
$tabcolor = Preferences('HEADER');
}
$block_table .= "<table border=0 cellspacing=0 cellpadding=0>";
$block_table .= " <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
$block_table .= " <td height=5 width=5 valign=top><IMG SRC=assets/left_upper_corner.gif border=0></td><td rowspan=3 width=100% class=\"BoxHeading\" valign=middle>";
if ($link) {
if (is_array($rollover)) {
$rollover = " onmouseover=\"document.getElementById('tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.backgroundColor='" . $rollover['tabcolor'] . "';document.getElementById('tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.color='" . $rollover['textcolor'] . "';\" onmouseout=\"document.getElementById('tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.backgroundColor='{$tabcolor}';document.getElementById('tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.color='" . $textcolor . "';\" ";
}
if (!isset($_REQUEST['_CENTRE_PDF'])) {
$block_table .= "<A HREF='{$link}' class=BoxHeading style='color:{$textcolor}' {$rollover} id=tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>" . ParseMLField($title) . "</A>";
} else {
$block_table .= "<font color={$textcolor} face=Verdana,Arial,sans-serif size=-2><b>" . ParseMLField($title) . "</b></font>";
}
} else {
if (!isset($_REQUEST['_CENTRE_PDF'])) {
$block_table .= "<font color={$textcolor}>" . ParseMLField($title) . "</font>";
} else {
$block_table .= "<font color={$textcolor} face=Verdana,Arial,sans-serif size=-2><b>" . ParseMLField($title) . "</b></font>";
}
}
$block_table .= "</td><td height=5 width=5 valign=top><IMG SRC=assets/right_upper_corner.gif border=0></td>";
$block_table .= " </tr>";
// MIDDLE ROW
$block_table .= " <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
$block_table .= " <td width=5> </td>";
$block_table .= "<td width=5> </td>";
$block_table .= " </tr>";
// BOTTOM ROW
$block_table .= " <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
$block_table .= " <td height=5 width=5 valign=bottom><IMG SRC=assets/left_lower_corner.gif border=0></td>";
$block_table .= "<td height=5 width=5 valign=bottom><IMG SRC=assets/right_lower_corner.gif border=0></td>";
$block_table .= " </tr>";
$block_table .= "</table>\n";
return $block_table;
}
示例3: DrawTab
function DrawTab($title, $link = '')
{
$title = ParseMLField($title);
if (mb_substr($title, 0, 1) != '<') {
$title = str_replace(" ", " ", $title);
}
/* if(!$tabcolor)
$tabcolor = Preferences('HEADER');*/
//modif Francois: css WPadmin
if ($link && !isset($_REQUEST['_ROSARIO_PDF'])) {
$block_table .= '<h3><A HREF="' . $link . '" class="BoxHeading" id="tab_link[' . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . ']">' . _($title) . '</A></h3>';
} else {
if (!isset($_REQUEST['_ROSARIO_PDF'])) {
$block_table .= '<h3>' . $title . '</h3>';
} else {
$block_table .= '<span class="size-1" style="color:' . Preferences('HIGHLIGHT') . '"><b>' . $title . '</b> </span>';
}
}
return $block_table;
}
示例4: SelectInput
}
echo SelectInput('', 'values[EXISTING][person_id]', _('Select Person'), $people_select);
}
} elseif ($_REQUEST['address_id'] != '0' && $_REQUEST['address_id'] != 'new' && $_REQUEST['address_id'] != 'old') {
$categories_RET = DBGet(DBQuery("SELECT c.ID AS CATEGORY_ID,c.TITLE AS CATEGORY_TITLE,c.RESIDENCE,c.MAILING,c.BUS,f.ID,f.TITLE,f.TYPE,f.SELECT_OPTIONS,f.DEFAULT_SELECTION,f.REQUIRED FROM ADDRESS_FIELD_CATEGORIES c,ADDRESS_FIELDS f WHERE f.CATEGORY_ID=c.ID ORDER BY c.SORT_ORDER,c.TITLE,f.SORT_ORDER,f.TITLE"), array(), array('CATEGORY_ID'));
if ($categories_RET) {
echo '<TD style="width:10px; border:1; border-style: none dotted none none;"> </TD><TD style="width:10px;"></TD>';
echo '<TD class="valign-top">';
$value = DBGet(DBQuery("SELECT * FROM ADDRESS WHERE ADDRESS_ID='{$_REQUEST['address_id']}'"));
$value = $value[1];
$request = 'values[ADDRESS]';
echo '<TABLE>';
foreach ($categories_RET as $fields_RET) {
if (!$fields_RET[1]['RESIDENCE'] && !$fields_RET[1]['MAILING'] && !$fields_RET[1]['BUS'] || $fields_RET[1]['RESIDENCE'] == 'Y' && $this_address['RESIDENCE'] == 'Y' || $fields_RET[1]['MAILING'] == 'Y' && $this_address['MAILING'] == 'Y' || $fields_RET[1]['BUS'] == 'Y' && ($this_address['BUS_PICKUP'] == 'Y' || $this_address['BUS_DROPOFF'] == 'Y')) {
echo '<TR><TD>';
echo '<FIELDSET><LEGEND><span style="color:gray">' . ParseMLField($fields_RET[1]['CATEGORY_TITLE']) . '</span></LEGEND>';
include 'modules/Students/includes/Other_Fields.inc.php';
echo '</FIELDSET>';
echo '</TD></TR>';
}
}
echo '</TABLE>';
}
}
echo '</TD>';
} else {
echo '<TD></TD><TD></TD>';
}
echo '</TR>';
echo '</TABLE>';
$separator = '<HR>';
示例5: DBGet
$categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STUDENT_FIELD_CATEGORIES ORDER BY SORT_ORDER,TITLE"));
foreach ($categories_RET as $category) {
$file = 'Students/Student.php&category_id=' . $category['ID'];
$title = ' › ' . ParseMLField($category['TITLE']);
$can_use = $exceptions_RET[$file][1]['CAN_USE'];
$can_edit = $exceptions_RET[$file][1]['CAN_EDIT'];
echo "<TR><TD></TD><TD></TD>";
echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_use[" . str_replace('.', '_', $file) . "] value=true" . ($can_use == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>";
echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_edit[" . str_replace('.', '_', $file) . "] value=true" . ($can_edit == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>";
echo "<TD bgcolor=#DDDDDD> {$title}</TD></TR><TR><TD></TD><TD></TD><TD colspan=3 height=1 bgcolor=#000000></TR>";
}
} elseif ($modcat == 'Users' && $file == 'Users/User.php') {
$categories_RET = DBGet(DBQuery("SELECT ID,TITLE FROM STAFF_FIELD_CATEGORIES ORDER BY SORT_ORDER,TITLE"));
foreach ($categories_RET as $category) {
$file = 'Users/User.php&category_id=' . $category['ID'];
$title = ' › ' . ParseMLField($category['TITLE']);
$can_use = $exceptions_RET[$file][1]['CAN_USE'];
$can_edit = $exceptions_RET[$file][1]['CAN_EDIT'];
echo "<TR><TD></TD><TD></TD>";
echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_use[" . str_replace('.', '_', $file) . "] value=true" . ($can_use == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>";
echo "<TD align=center bgcolor=#DDDDDD><INPUT type=checkbox name=can_edit[" . str_replace('.', '_', $file) . "] value=true" . ($can_edit == 'Y' ? ' CHECKED' : '') . (AllowEdit() ? '' : ' DISABLED') . "></TD>";
echo "<TD bgcolor=#DDDDDD> {$title}</TD></TR><TR><TD></TD><TD></TD><TD colspan=3 height=1 bgcolor=#000000></TR>";
}
}
} else {
echo '<TR><TD></TD><TD></TD><TD bgcolor=#FFFFFF colspan=3 align=center><small><b>- ' . $title . ' -</b></small></TD></TR>';
}
}
}
echo '<TR><TD colspan=5 align=center height=20></TD></TR>';
}
示例6: foreach
foreach ($calendars_RET as $calendar) {
$options[$calendar['CALENDAR_ID']] = $calendar['TITLE'];
}
}
echo _makeSelectInput('CALENDAR_ID', $options);
echo '</TD>';
echo '</TR>';
}
echo '</TABLE>';
echo '<BR>';
$radio_count = count($fields_RET['radio']);
if ($radio_count) {
echo '<TABLE cellpadding=5>';
echo '<TR>';
for ($i = 1; $i <= $radio_count; $i++) {
echo '<TD>' . _makeCheckboxInput('CUSTOM_' . $fields_RET['radio'][$i]['ID'], '<b>' . ParseMLField($fields_RET['radio'][$i]['TITLE']) . '</b>') . '</TD>';
if ($i % 5 == 0 && $i != $radio_count) {
echo '</TR><TR>';
}
}
echo '</TD></TR>';
echo '</TABLE>';
}
echo '</TD></TR>';
echo '</TABLE><BR>';
} elseif ($note) {
DrawHeader($note);
}
//Widgets('activity');
//Widgets('course');
//Widgets('absences');
示例7: ParseMLField
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks,
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions:{
angle:-20
}
},
},
legend: {
show: true,
location: 'e',
placement: 'outside'
},
title: '<?php
echo ParseMLField($category_RET[1]['TITLE']) . ' ' . _('Breakdown') . $_ROSARIO['SearchTerms'];
?>
'
});
});
</script>
<div id="chart" style="margin-top:20px; margin-left:20px; width:600px; height:480px;"></div>
<script type="text/javascript" src="assets/js/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="assets/js/colorbox/colorbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="assets/js/jquery.jqplottocolorbox.js"></script>
<?php
unset($_REQUEST['_ROSARIO_PDF']);
}
PopTable('footer');
}
echo '</FORM>';
示例8: ListOutput
//.........这里部分代码省略.........
}
if ($result_count > 1) {
if (is_int($sort_array[1]) || is_double($sort_array[1])) {
array_multisort($sort_array, $dir, SORT_NUMERIC, $result);
} else {
array_multisort($sort_array, $dir, $result);
}
for ($i = $result_count - 1; $i >= 0; $i--) {
$result[$i + 1] = $result[$i];
}
unset($result[0]);
}
}
}
// HANDLE SAVING THE LIST ---
if ($options['save'] && $_REQUEST['LO_save'] == $options['save']) {
if (!$options['save_delimiter'] && Preferences('DELIMITER') == 'CSV') {
$options['save_delimiter'] = 'comma';
}
switch ($options['save_delimiter']) {
case 'comma':
$extension = 'csv';
break;
case 'xml':
$extension = 'xml';
break;
default:
$extension = 'xls';
break;
}
ob_end_clean();
if ($options['save_delimiter'] != 'xml') {
foreach ($column_names as $key => $value) {
$value = ParseMLField($value);
if ($options['save_delimiter'] == 'comma' && !$options['save_quotes']) {
$value = str_replace(',', ';', $value);
}
$output .= ($options['save_quotes'] ? '"' : '') . str_replace(' ', ' ', str_replace('<BR />', ' ', preg_replace('/<!--.*-->/', '', $value))) . ($options['save_quotes'] ? '"' : '') . ($options['save_delimiter'] == 'comma' ? ',' : "\t");
}
$output .= "\n";
}
foreach ($result as $item) {
foreach ($column_names as $key => $value) {
$value = $item[$key];
if ($options['save_delimiter'] == 'comma' && !$options['save_quotes']) {
$value = str_replace(',', ';', $value);
}
$value = preg_replace('!<SELECT.*SELECTED\\>([^<]+)<.*</SELECT\\>!i', '\\1', $value);
$value = preg_replace('!<SELECT.*</SELECT\\>!i', '', $value);
$output .= ($options['save_quotes'] ? '"' : '') . ($options['save_delimiter'] == 'xml' ? '<' . str_replace(' ', '', $value) . '>' : '') . preg_replace('/<[^>]+>/', '', preg_replace("/<div onclick='[^']+'>/", '', preg_replace('/ +/', ' ', preg_replace('/&[^;]+;/', '', str_replace('<BR />·', ' : ', str_replace(' ', ' ', $value)))))) . ($options['save_delimiter'] == 'xml' ? '</' . str_replace(' ', '', $value) . '>' . "\n" : '') . ($options['save_quotes'] ? '"' : '') . ($options['save_delimiter'] == 'comma' ? ',' : "\t");
}
$output .= "\n";
}
//modif Francois: accents problem
$output = utf8_decode($output);
header("Cache-Control: public");
header("Pragma: ");
header("Content-Type: application/{$extension}");
header("Content-Disposition: inline; filename=\"" . ProgramTitle() . ".{$extension}\"\n");
if ($options['save_eval']) {
eval($options['save_eval']);
}
echo $output;
exit;
}
// END SAVING THE LIST ---
示例9: PDFStart
$handle = PDFStart();
echo '<TABLE><TR><TD><IMG SRC="assets/themes/' . Preferences('THEME') . '/logo.png" /></TD><TD><h1>' . sprintf(_('%s Handbook'), $title) . '<BR />' . sprintf(_('version %s'), '1.0') . '</h1></TD></TR></TABLE><HR>';
foreach ($help as $program => $value) {
if (mb_strpos($program, '/')) {
$modcat = str_replace('_', ' ', mb_substr($program, 0, mb_strpos($program, '/')));
if (!$RosarioModules[str_replace(' ', '_', $modcat)]) {
//module not activated
break;
}
if ($modcat != $old_modcat) {
echo '<div style="page-break-after: always;"></div><TABLE><TR><TD><IMG SRC="assets/icons/' . str_replace(' ', '_', $modcat) . '.png" class="headerIcon" /></TD><TD><h2>' . $modcat . '</h2></TD></TR></TABLE><HR>';
}
$old_modcat = $modcat;
}
$_REQUEST['modname'] = $program;
echo '<h3>';
if ($program == 'default') {
echo ParseMLField(Config('TITLE')) . ' - ' . sprintf(_('%s Handbook'), $title) . '<BR />' . sprintf(_('version %s'), '1.0');
} else {
echo ProgramTitle() == 'RosarioSIS' ? str_replace(' ', '_', $program) : ProgramTitle();
}
echo '</h3>';
echo '<TABLE class="width-100p cellpadding-5"><TR><TD class="header2">';
if ($student == true) {
$value = str_replace('your child', 'yourself', str_replace('your child\'s', 'your', $value));
}
echo $value;
echo '</TD></TR></TABLE><BR />';
}
PDFStop($handle);
}
示例10: ErrorMessage
}
if (empty($_REQUEST['modfunc'])) {
if (!empty($note)) {
echo ErrorMessage($note, 'note');
}
if (!empty($error)) {
echo ErrorMessage($error, 'error');
}
echo '<FORM ACTION="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=update" METHOD="POST">';
if (AllowEdit()) {
DrawHeader('', SubmitButton(_('Save')));
}
echo '<BR />';
PopTable('header', SchoolInfo('TITLE'));
$program_config = DBGet(DBQuery("SELECT * FROM PROGRAM_CONFIG WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "'"), array(), array('TITLE'));
echo '<FIELDSET><legend><b>' . ParseMLField(Config('TITLE')) . '</b></legend><TABLE>';
echo '<TR style="text-align:left;"><TD>' . MLTextInput(Config('TITLE'), 'values[CONFIG][TITLE]', _('Program Title'), 'required') . '</TD></TR>';
echo '</TABLE></FIELDSET>';
echo '<BR /><FIELDSET><legend><b>' . _('School') . '</b></legend><TABLE>';
//modif Francois: school year over one/two calendar years format
echo '<TR style="text-align:left;"><TD>' . CheckboxInput(Config('SCHOOL_SYEAR_OVER_2_YEARS'), 'values[CONFIG][SCHOOL_SYEAR_OVER_2_YEARS]', _('School year over two calendar years'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';
echo '</TABLE></FIELDSET>';
echo '<BR /><FIELDSET><legend><b>' . _('Students') . '</b></legend><TABLE>';
echo '<TR style="text-align:left;"><TD>' . CheckboxInput(Config('STUDENTS_USE_MAILING'), 'values[CONFIG][STUDENTS_USE_MAILING]', _('Display Mailing Address'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';
echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_USE_BUS'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_USE_BUS]', _('Check Bus Pickup / Dropoff by default'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';
echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_USE_CONTACT'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_USE_CONTACT]', _('Enable Legacy Contact Information'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';
echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_SEMESTER_COMMENTS]', _('Use Semester Comments instead of Quarter Comments'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';
echo '</TABLE></FIELDSET>';
echo '<BR /><FIELDSET><legend><b>' . _('Grades') . '</b></legend><TABLE>';
$options = array('-1' => _('Use letter grades only'), '0' => _('Use letter and percent grades'), '1' => _('Use percent grades only'));
echo '<TR style="text-align:left;"><TD>' . SelectInput($program_config['GRADES_DOES_LETTER_PERCENT'][1]['VALUE'], 'values[PROGRAM_CONFIG][GRADES_DOES_LETTER_PERCENT]', _('Grades'), $options, false) . '</TD></TR>';
示例11: printCustom
function printCustom(&$categories, &$values)
{
echo '<TR><TD colspan="3"><b>' . ParseMLField($categories[1]['CATEGORY_TITLE']) . '<b></TD></TR>';
foreach ($categories as $field) {
echo '<TR><TD> </TD>';
echo '<TD>' . ($field['REQUIRED'] && $values['CUSTOM_' . $field['ID']] == '' ? '<span style="color:red">' : '') . ParseMLField($field['TITLE']) . ($field['REQUIRED'] && $values['CUSTOM_' . $field['ID']] == '' ? '</span>' : '') . '</TD>';
if ($field['TYPE'] == 'select') {
echo '<TD>' . ($field['SELECT_OPTIONS'][$values['CUSTOM_' . $field['ID']]] != '' ? '' : '<span style="color:red">') . $values['CUSTOM_' . $field['ID']] . ($field['SELECT_OPTIONS'][$values['CUSTOM_' . $field['ID']]] != '' ? '' : '</span>') . '</TD>';
} elseif ($field['TYPE'] == 'codeds') {
echo '<TD>' . ($field['SELECT_OPTIONS'][$values['CUSTOM_' . $field['ID']]] != '' ? $field['SELECT_OPTIONS'][$values['CUSTOM_' . $field['ID']]] : '<span style="color:red">' . $values['CUSTOM_' . $field['ID']] . '</span>') . '</TD>';
} else {
echo '<TD>' . $values['CUSTOM_' . $field['ID']] . '</TD>';
}
echo '</TR>';
}
}
示例12: elseif
// If $test email is set then this script will only 'go through the motions' and email the results to the $test_email address instead of parents
$test_email = $_REQUEST['test_email'];
// Set the from and cc emails here - the emails can be comma separated list of emails.
if (!empty($test_email)) {
$from = $test_email;
} elseif (User('EMAIL')) {
$from = $cc = User('EMAIL');
} else {
ErrorMessage(array(_('You must set the <b>test mode email</b> or have a user email address to use this script.')), 'fatal');
}
$headers = "From:" . $from . "\r\nCc:" . (isset($cc) ? $cc . ',' : '') . $RosarioNotifyAddress . "\r\n";
//modif Francois: add email headers
$headers .= 'Return-Path:' . $from . "\r\n";
$headers .= 'Reply-To:' . $from . "\r\n" . 'X-Mailer:PHP/' . phpversion();
$params = '-f ' . $from;
$subject = ParseMLField(Config('TITLE')) . ' - ' . _('New Parent Account');
//modif Francois: add Template
$template_update = DBGet(DBQuery("SELECT 1 FROM TEMPLATES WHERE MODNAME = 'Custom/NotifyParents.php' AND STAFF_ID = '" . User('STAFF_ID') . "'"));
if (!$template_update) {
DBQuery("INSERT INTO TEMPLATES (MODNAME, STAFF_ID, TEMPLATE) VALUES ('Custom/NotifyParents.php', '" . User('STAFF_ID') . "', '" . $_REQUEST['inputnotifyparentstext'] . "')");
} else {
DBQuery("UPDATE TEMPLATES SET TEMPLATE = '" . $_REQUEST['inputnotifyparentstext'] . "' WHERE MODNAME = 'Custom/NotifyParents.php' AND STAFF_ID = '" . User('STAFF_ID') . "'");
}
$message = $_REQUEST['inputnotifyparentstext'];
if (count($_REQUEST['staff'])) {
$st_list = '\'' . implode('\',\'', $_REQUEST['staff']) . '\'';
$extra['SELECT'] = ",s.FIRST_NAME||' '||s.LAST_NAME AS NAME,s.USERNAME,s.PASSWORD,s.EMAIL";
$extra['WHERE'] = " AND s.STAFF_ID IN ({$st_list})";
$RET = GetStaffList($extra);
//echo '<pre>'; var_dump($RET); echo '</pre>';
$RESULT = array(0 => array());
示例13: Widgets
$extra['extra_header_left'] = '<TABLE>';
Widgets('mailing_labels');
$extra['extra_header_left'] .= $extra['search'];
$extra['search'] = '';
$extra['extra_header_left'] .= '</TABLE>';
if (User('PROFILE_ID')) {
$can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM PROFILE_EXCEPTIONS WHERE PROFILE_ID='" . User('PROFILE_ID') . "' AND CAN_USE='Y'"), array(), array('MODNAME'));
} else {
$can_use_RET = DBGet(DBQuery("SELECT MODNAME FROM STAFF_EXCEPTIONS WHERE USER_ID='" . User('STAFF_ID') . "' AND CAN_USE='Y'"), array(), array('MODNAME'));
}
$categories_RET = DBGet(DBQuery("SELECT ID,TITLE,INCLUDE FROM STUDENT_FIELD_CATEGORIES ORDER BY SORT_ORDER,TITLE"));
$extra['extra_header_right'] = '<TABLE>';
foreach ($categories_RET as $category) {
if ($can_use_RET['Students/Student.php&category_id=' . $category['ID']]) {
$extra['extra_header_right'] .= '<TR><TD><INPUT type=checkbox name=category[' . $category['ID'] . '] value=Y checked></TD>';
$extra['extra_header_right'] .= '<TD>' . ParseMLField($category['TITLE']) . '</TD></TR>';
}
}
$extra['extra_header_right'] .= '</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('course');
//Widgets('request');
//Widgets('activity');
//Widgets('absences');
//Widgets('gpa');
示例14: elseif
if (!empty($test_email)) {
$from = $test_email;
} elseif (User('EMAIL')) {
$from = $cc = User('EMAIL');
} else {
ErrorMessage(array(_('You must set the <b>test mode email</b> or have a user email address to use this script.')), 'fatal');
}
$headers = "From:" . $from . "\r\nCc:" . (isset($cc) ? $cc . ',' : '') . $RosarioNotifyAddress . "\r\n";
//modif Francois: add email headers
$headers .= 'Return-Path:' . $from . "\r\n";
$headers .= 'Reply-To:' . $from . "\r\n" . 'X-Mailer:PHP/' . phpversion();
$params = '-f ' . $from;
// new for when parent account was created new
// old for when parent account was existing
$subject['new'] = ParseMLField(Config('TITLE')) . ' ' . _('New Parent Account');
$subject['old'] = ParseMLField(Config('TITLE')) . ' ' . _('Updated Parent Account');
//modif Francois: add Template
$createparentstext = $_REQUEST['inputcreateparentstext_new'] . '__BLOCK2__' . $_REQUEST['inputcreateparentstext_old'];
$template_update = DBGet(DBQuery("SELECT 1 FROM TEMPLATES WHERE MODNAME = 'Custom/CreateParents.php' AND STAFF_ID = '" . User('STAFF_ID') . "'"));
if (!$template_update) {
DBQuery("INSERT INTO TEMPLATES (MODNAME, STAFF_ID, TEMPLATE) VALUES ('Custom/CreateParents.php', '" . User('STAFF_ID') . "', '" . $createparentstext . "')");
} else {
DBQuery("UPDATE TEMPLATES SET TEMPLATE = '" . $createparentstext . "' WHERE MODNAME = 'Custom/CreateParents.php' AND STAFF_ID = '" . User('STAFF_ID') . "'");
}
$message['new'] = $_REQUEST['inputcreateparentstext_new'];
$message['old'] = $_REQUEST['inputcreateparentstext_old'];
if (count($_REQUEST['student'])) {
$st_list = '\'' . implode('\',\'', $_REQUEST['student']) . '\'';
$extra['SELECT'] = ",lower({$email_column}) AS EMAIL";
$extra['SELECT'] .= ",(SELECT STAFF_ID FROM STAFF WHERE lower(EMAIL)=lower({$email_column}) AND PROFILE='parent' AND SYEAR=ssm.SYEAR) AS STAFF_ID";
$extra['WHERE'] = " AND s.STUDENT_ID IN ({$st_list})";
示例15: foreach
}
}
}
if ($_REQUEST['values']['STUDENTS']) {
$sql = "UPDATE STUDENTS SET ";
foreach ($_REQUEST['values']['STUDENTS'] as $column_name => $value) {
$sql .= "{$column_name}='" . $value . "',";
}
$sql = mb_substr($sql, 0, -1) . " WHERE STUDENT_ID='" . UserStudentID() . "'";
DBQuery($sql);
}
$student = DBGet(DBQuery("SELECT FIRST_NAME,LAST_NAME FROM STUDENTS WHERE STUDENT_ID='" . UserStudentID() . "'"));
mail('mgamson@tampabay.rr.com', sprintf(_('New Registration %s %s (%d) has been registered by %s.'), $student[1]['FIRST_NAME'], $student[1]['LAST_NAME'], UserStudentID(), User('NAME')));
unset($_SESSION['_REQUEST_vars']['values']);
}
echo '<H4>Welcome, ' . User('NAME') . ', to the ' . ParseMLField(Config('TITLE')) . '</H4>';
$addresses = DBGet(DBQuery("SELECT COUNT(*) AS COUNT FROM STUDENTS_JOIN_ADDRESS WHERE STUDENT_ID='" . UserStudentID() . "'"));
echo '' . _('We would appreciate it if you would enter just a little bit of information about you and your child to help us out this school year. Thanks!') . '';
if ($addresses[1]['COUNT'] != 0) {
echo '<BR /><BR /><IMG SRC="assets/check.png" class="alignImg"><b>' . _('Your child has been registered.') . '</b>';
}
echo '<BR /><BR /><TABLE><TR><TD class="valign-top">';
echo '<B>' . Localize('colon', _('Information about you')) . '</B><BR /><BR />';
echo '<TABLE class="cellpadding-3"><TR><TD>';
echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '" method="POST" onsubmit=\'for(i=0;i<document.forms[0].elements.length;i++){if(document.forms[0].elements[i].style.color=="rgb(187, 187, 187)" || document.forms[0].elements[i].style.color=="#bbbbbb") document.forms[0].elements[i].value="";}\'>';
echo _makeInput('values[PEOPLE][1][FIRST_NAME]', _('First Name'));
echo _makeInput('values[PEOPLE][1][LAST_NAME]', _('Last Name'));
echo '<BR />' . _makeInput('values[PEOPLE][1][extra][Cell]', _('Cell Phone'), '', 'size=30');
echo '<BR />' . _makeInput('values[PEOPLE][1][extra][Workplace]', _('Workplace'), '', 'size=30');
echo '</TD></TR></TABLE>';
echo '</TD><TD>';