Beispiel #1
0
        echo '<input type=hidden name=sql_save_session_staf value=true />';
        /************************************************/
        echo '</FORM>';
        // set focus to last name text box
        echo '<script type="text/javascript"><!--
			document.search.last.focus();
			--></script>';
        PopTable('footer');
    } else {
        if (!$_REQUEST['next_modname']) {
            $_REQUEST['next_modname'] = 'Users/User.php';
        }
        if (!isset($_openSIS['DrawHeader'])) {
            DrawHeaderHome('Please select a user');
        }
        $staff_RET = GetStaffList($extra);
        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'])) {
            $columns = $extra['columns_before'] + $columns;
        }
        if (is_array($extra['columns_after'])) {
            $columns += $extra['columns_after'];
                        }
                    }
                }
                if (strpos($field, 'CUSTOM') === 0) {
                    $custom_id = str_replace("CUSTOM_", "", $field);
                    $custom_RET = DBGet(DBQuery("SELECT TYPE FROM staff_fields WHERE ID={$custom_id}"));
                    if ($custom_RET[1]['TYPE'] == 'date' && !$extra['functions'][$field]) {
                        $extra['functions'][$field] = 'ProperDate';
                    } elseif ($custom_RET[1]['TYPE'] == 'codeds' && !$extra['functions'][$field]) {
                        $extra['functions'][$field] = 'DeCodeds';
                    }
                }
            }
        }
        if (isset($extra['user_profile']) && $extra['user_profile'] == 'parent') {
            $RET = GetStaffList($extra);
        } else {
            $RET = GetUserStaffList($extra);
        }
        if ($extra['array_function'] && function_exists($extra['array_function'])) {
            $extra['array_function']($RET);
        }
        echo "<html><link rel='stylesheet' type='text/css' href='styles/Export.css'><body style=\" font-family:Arial; font-size:12px;\">";
        ListOutputPrint_Report($RET, $columns, $extra['singular'] ? $extra['singular'] : 'User', $extra['plural'] ? $extra['plural'] : 'users', array(), $extra['LO_group'], $extra['LO_options']);
        echo "</body></html>";
    }
} else {
    if (!$fields_list) {
        if (AllowUse('users/User.php&category_id=1')) {
            $fields_list['General'] = array('FULL_NAME' => Preferences('NAME') == 'Common' ? 'Last, Common' : 'Last, First M', 'FIRST_NAME' => 'First', 'TITLE' => 'Title', 'LAST_NAME' => 'Last', 'MIDDLE_NAME' => 'Middle', 'STAFF_ID' => 'Staff Id', 'ROLLOVER_ID' => 'Last Year Id', 'SCHOOLS' => 'Schools', 'USERNAME' => 'Username', 'IS_DISABLE' => 'Disable', 'EMAIL' => 'Email ID', 'PHONE' => 'Phone', 'LAST_LOGIN' => 'Last Login', 'PROFILE' => 'User Profile');
        }