} else {
     if ($page == "update" && check_perms("items")) {
         require_once "./include/update.inc";
         if (isset($_POST['submit'])) {
             update_item($_POST['code'], $_POST['amount']);
         } else {
             if (isset($_POST['rateUpdate'])) {
                 update_rate($_POST['code'], $_POST['rate']);
             } else {
                 if (isset($_GET['search'])) {
                     display_item($_GET['search']);
                 } else {
                     if (isset($_POST['block'])) {
                         block_items();
                     } else {
                         display_item();
                     }
                 }
             }
         }
     } else {
         if ($page == "getdetails") {
             require_once "./include/getdetails.inc";
         } else {
             if (isset($_POST['Bill'])) {
                 bill();
             } else {
                 if (isset($_GET['view'])) {
                     if ($_GET['view'] != NULL) {
                         display_bill($_GET['view']);
                     } else {
$selected = array();
$selected[$phpgw_info['user']['preferences']['calendar']['defaultfilter']] = ' selected';
if (!isset($phpgw_info['user']['preferences']['calendar']['defaultfilter']) || $phpgw_info['user']['preferences']['calendar']['defaultfilter'] == 'private') {
    $selected['private'] = ' selected';
}
$str = '<select name="defaultfilter">' . '<option value="all"' . $selected['all'] . '>' . lang('all') . '</option>' . '<option value="private"' . $selected['private'] . '>' . lang('private only') . '</option>' . '</select>';
display_item(lang('Default calendar filter'), $str);
$selected = array();
$selected[intval($phpgw_info['user']['preferences']['calendar']['interval'])] = ' selected';
if (!isset($phpgw_info['user']['preferences']['calendar']['interval'])) {
    $selected[60] = ' selected';
}
$var = array(5 => '5', 10 => '10', 15 => '15', 20 => '20', 30 => '30', 45 => '45', 60 => '60');
$str = '<select name="interval">';
while (list($key, $value) = each($var)) {
    $str .= '<option value="' . $key . '"' . $selected[$key] . '>' . $value . '</option>';
}
$str .= '</select>';
display_item(lang('Display interval in Day View'), $str);
$str = '<input type="checkbox" name="send_updates" value="True"' . ($phpgw_info['user']['preferences']['calendar']['send_updates'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['send_updates'] == True ? ' checked' : '') . '>';
display_item(lang('Send/receive updates via email'), $str);
$str = '<input type="checkbox" name="display_status" value="True"' . ($phpgw_info['user']['preferences']['calendar']['display_status'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_status'] == True ? ' checked' : '') . '>';
display_item(lang('Display status of events'), $str);
$str = '<input type="checkbox" name="default_private" value="True"' . ($phpgw_info['user']['preferences']['calendar']['default_private'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['default_private'] == True ? ' checked' : '') . '>';
display_item(lang('When creating new events default set to private'), $str);
$str = '<input type="checkbox" name="display_minicals" value="True"' . ($phpgw_info['user']['preferences']['calendar']['display_minicals'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['display_minicals'] == True ? ' checked' : '') . '>';
display_item(lang('Display mini calendars when printing'), $str);
$str = '<input type="checkbox" name="print_black_white" value="True"' . ($phpgw_info['user']['preferences']['calendar']['print_black_white'] == 'Y' || $phpgw_info['user']['preferences']['calendar']['print_black_white'] == True ? ' checked' : '') . '>';
display_item(lang('Print calendars in black & white'), $str);
$p->pparse('out', 'pref');
$phpgw->common->phpgw_footer();
    }
    $str .= html_form_input("checkbox", $internal, NULL, NULL, NULL, $checked, NULL, 1) . " {$displayed}" . html_break(1, NULL, 1);
}
display_item(lang('Display attributes'), $str);
reset($other_checkboxes);
while (list($internal, $displayed) = each($other_checkboxes)) {
    unset($checked);
    if ($GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal]) {
        $checked = 1;
    }
    $str = html_form_input("checkbox", $internal, NULL, NULL, NULL, $checked, NULL, 1);
    display_item($displayed, $str);
}
reset($other_dropdown);
while (list($internal, $value_array) = each($other_dropdown)) {
    reset($value_array);
    unset($options);
    while (list($num, $value) = each($value_array)) {
        if ($num == 0) {
            $displayed = $value;
            continue;
        }
        $options .= html_form_option($value, $value, $GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal] == $value, True);
    }
    $output = html_form_select_begin($internal, True);
    $output .= $options;
    $output .= html_form_select_end(True);
    display_item($displayed, $output);
}
$p->pparse('out', 'pref');
$GLOBALS['phpgw']->common->phpgw_footer();