示例#1
0
                $custom_fields_RET = DBGet(DBQuery('SELECT CONCAT(\'' . '<b>' . '\',sfc.TITLE,\'' . '</b>' . '\') AS CATEGORY,cf.ID,cf.TITLE,\'' . '' . '\' AS SEARCH,\'' . '' . '\' AS DISPLAY FROM custom_fields cf,student_field_categories sfc WHERE sfc.ID=cf.CATEGORY_ID AND (SELECT DISTINCT CAN_USE FROM profile_exceptions WHERE PROFILE_ID=\'' . $profile_id_mod . '\' AND MODNAME=CONCAT(\'' . 'students/Student.php&category_id=' . '\',cf.CATEGORY_ID))=\'' . 'Y' . '\' ORDER BY sfc.SORT_ORDER,sfc.TITLE,cf.SORT_ORDER,cf.TITLE'), array('SEARCH' => '_make', 'DISPLAY' => '_make'), array('CATEGORY'));
            }
        }
        $THIS_RET['ID'] = 'CONTACT_INFO';
        $custom_fields_RET[-1][1] = array('CATEGORY' => '<B>Contact Information</B>', 'ID' => 'CONTACT_INFO', 'TITLE' => '<IMG SRC=assets/down_phone_button.gif width=15> Contact Info Rollover', 'DISPLAY' => _make('', 'DISPLAY'));
        $THIS_RET['ID'] = 'HOME_PHONE';
        $custom_fields_RET[-1][] = array('CATEGORY' => '<B>Contact Information</B>', 'ID' => 'HOME_PHONE', 'TITLE' => 'Home Phone Number', 'DISPLAY' => _make('', 'DISPLAY'));
        $THIS_RET['ID'] = 'GUARDIANS';
        $custom_fields_RET[-1][] = array('CATEGORY' => '<B>Contact Information</B>', 'ID' => 'GUARDIANS', 'TITLE' => 'Guardians', 'DISPLAY' => _make('', 'DISPLAY'));
        $THIS_RET['ID'] = 'ALL_CONTACTS';
        $custom_fields_RET[-1][] = array('CATEGORY' => '<B>Contact Information</B>', 'ID' => 'ALL_CONTACTS', 'TITLE' => 'All Contacts', 'DISPLAY' => _make('', 'DISPLAY'));
        $custom_fields_RET[0][1] = array('CATEGORY' => '<B>Addresses</B>', 'ID' => 'ADDRESS', 'TITLE' => 'None', 'DISPLAY' => _makeAddress(''));
        $custom_fields_RET[0][] = array('CATEGORY' => '<B>Addresses</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC=assets/house_button.gif> Residence', 'DISPLAY' => _makeAddress('RESIDENCE'));
        $custom_fields_RET[0][] = array('CATEGORY' => '<B>Addresses</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC=assets/mailbox_button.gif> Mailing', 'DISPLAY' => _makeAddress('MAILING'));
        $custom_fields_RET[0][] = array('CATEGORY' => '<B>Addresses</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC=assets/bus_button.gif> Bus Pickup', 'DISPLAY' => _makeAddress('BUS_PICKUP'));
        $custom_fields_RET[0][] = array('CATEGORY' => '<B>Addresses</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC=assets/bus_button.gif> Bus Dropoff', 'DISPLAY' => _makeAddress('BUS_DROPOFF'));
        if (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') {
            $columns = array('CATEGORY' => '', 'TITLE' => 'Field', 'SEARCH' => 'Search', 'DISPLAY' => 'Expanded View');
        } else {
            $columns = array('CATEGORY' => '', 'TITLE' => 'Field', 'DISPLAY' => 'Expanded View');
        }
        ListOutputMod($custom_fields_RET, $columns, '', '', array(), array(array('CATEGORY')));
    }
    PopTable('footer');
    if ($_REQUEST['tab'] == 'display_options') {
        echo "<CENTER><INPUT type=submit class=\"btn_medium\" value=Save ></CENTER>";
    } else {
        echo "<CENTER><INPUT type=submit class=\"btn_medium\" value=Save onclick='formload_ajax(\"perf_form\");return pass_check();'></CENTER>";
    }
    echo '</FORM>';
}
示例#2
0
     $THIS_RET['ID'] = 'CONTACT_INFO';
     $custom_fields_RET[-1][1] = array('CATEGORY' => '<B>' . _('Contact Information') . '</B>', 'ID' => 'CONTACT_INFO', 'TITLE' => '<IMG SRC="assets/down_phone_button.png" width="24"> ' . _('Contact Information'), 'DISPLAY' => _make('', 'DISPLAY'));
     $THIS_RET['ID'] = 'HOME_PHONE';
     $custom_fields_RET[-1][] = array('CATEGORY' => '<B>' . _('Contact Information') . '</B>', 'ID' => 'HOME_PHONE', 'TITLE' => _('Home Phone Number'), 'DISPLAY' => _make('', 'DISPLAY'));
     $THIS_RET['ID'] = 'GUARDIANS';
     $custom_fields_RET[-1][] = array('CATEGORY' => '<B>' . _('Contact Information') . '</B>', 'ID' => 'GUARDIANS', 'TITLE' => _('Guardians'), 'DISPLAY' => _make('', 'DISPLAY'));
     $THIS_RET['ID'] = 'ALL_CONTACTS';
     $custom_fields_RET[-1][] = array('CATEGORY' => '<B>' . _('Contact Information') . '</B>', 'ID' => 'ALL_CONTACTS', 'TITLE' => _('All Contacts'), 'DISPLAY' => _make('', 'DISPLAY'));
     $custom_fields_RET[0][1] = array('CATEGORY' => '<B>' . _('Addresses') . '</B>', 'ID' => 'ADDRESS', 'TITLE' => _('None'), 'DISPLAY' => _makeAddress(''));
     $custom_fields_RET[0][] = array('CATEGORY' => '<B>' . _('Addresses') . '</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC="assets/house_button.png" height="24"> ' . _('Residence'), 'DISPLAY' => _makeAddress('RESIDENCE'));
     //modif Francois: disable mailing address display
     if (Config('STUDENTS_USE_MAILING')) {
         $custom_fields_RET[0][] = array('CATEGORY' => '<B>' . _('Addresses') . '</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC="assets/mailbox_button.png" height="24"> ' . _('Mailing'), 'DISPLAY' => _makeAddress('MAILING'));
     }
     $custom_fields_RET[0][] = array('CATEGORY' => '<B>' . _('Addresses') . '</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC="assets/bus_button.png" height="24"> ' . _('Bus Pickup'), 'DISPLAY' => _makeAddress('BUS_PICKUP'));
     $custom_fields_RET[0][] = array('CATEGORY' => '<B>' . _('Addresses') . '</B>', 'ID' => 'ADDRESS', 'TITLE' => '<IMG SRC="assets/bus_button.png" height="24"> ' . _('Bus Dropoff'), 'DISPLAY' => _makeAddress('BUS_DROPOFF'));
     if (User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') {
         $columns = array('CATEGORY' => '', 'TITLE' => _('Field'), 'SEARCH' => _('Search'), 'DISPLAY' => _('Expanded View'));
     } else {
         $columns = array('CATEGORY' => '', 'TITLE' => _('Field'), 'DISPLAY' => _('Expanded View'));
     }
     ListOutput($custom_fields_RET, $columns, '.', '.', array(), array(array('CATEGORY')));
 }
 if ($_REQUEST['tab'] == 'widgets') {
     $widgets = array();
     if ($RosarioModules['Students']) {
         $widgets += array('calendar' => _('Calendar'), 'next_year' => _('Next School Year'));
     }
     if ($RosarioModules['Scheduling'] && User('PROFILE') == 'admin') {
         $widgets = array('course' => _('Course'), 'request' => _('Request'));
     }