die; } $preferences['skin'] = $_REQUEST['skin']; $preferences['autoselection'] = isset($_REQUEST['autoselection']) ? 1 : 0; $preferences['quickdelete'] = $_REQUEST['quickdelete']; $preferences['rowlimit'] = $_REQUEST['rowlimit']; $preferences['lang'] = $_REQUEST['lang']; $preferences['flip_pct_display'] = isset($_REQUEST['flip_pct_display']) ? 1 : 0; $preferences['pct_comment_flag'] = isset($_REQUEST['pct_comment_flag']) ? 1 : 0; $preferences['showIDs'] = isset($_REQUEST['showIDs']) ? 1 : 0; $preferences['noFading'] = isset($_REQUEST['noFading']) ? 1 : 0; $preferences['user_list_hidden'] = isset($_REQUEST['user_list_hidden']) ? 1 : 0; $preferences['hideClearedEntries'] = isset($_REQUEST['hideClearedEntries']) ? 1 : 0; $preferences['sublistAnnotations'] = $_REQUEST['sublistAnnotations']; usr_set_preferences($preferences, 'ui.'); usr_set_preferences(array('timezone' => $_REQUEST['timezone'])); $rate = str_replace($kga['conf']['decimalSeparator'], '.', $_REQUEST['rate']); if (is_numeric($rate)) { save_rate($kga['usr']['usr_ID'], null, NULL, $rate); } else { remove_rate($kga['usr']['usr_ID'], null, NULL); } // If the password field is empty don't overwrite the old password. if ($_REQUEST['pw'] != "") { $usr_data['pw'] = md5($kga['password_salt'] . $_REQUEST['pw'] . $kga['password_salt']); usr_edit($kga['usr']['usr_ID'], $usr_data); } break; /** * When the user changes the timespace it is stored in the database so * it can be restored, when the user reloads the page.
$knd_arr_data[$knd_id] = array(); } // add row $knd_arr_data[$knd_id][] = $row; } } require 'export_pdf.php'; break; /** * Export as a PDF document in a list format. */ /** * Export as a PDF document in a list format. */ case 'export_pdf2': usr_set_preferences(array('print_comments' => isset($_REQUEST['print_comments']) ? 1 : 0, 'print_summary' => isset($_REQUEST['print_summary']) ? 1 : 0, 'create_bookmarks' => isset($_REQUEST['create_bookmarks']) ? 1 : 0, 'download_pdf' => isset($_REQUEST['download_pdf']) ? 1 : 0, 'customer_new_page' => isset($_REQUEST['customer_new_page']) ? 1 : 0, 'reverse_order' => isset($_REQUEST['reverse_order']) ? 1 : 0, 'pdf_format' => 'export_pdf2'), 'ki_export.pdf.'); $arr_data = xp_get_arr($in, $out, $filterUsr, $filterKnd, $filterPct, $filterEvt, false, $reverse_order, $default_location, $filter_cleared, $filter_type, false, $filter_refundable); // sort data into new array, where first dimension is customer and second dimension is project $pdf_arr_data = array(); foreach ($arr_data as $row) { $knd_id = $row['pct_kndID']; $pct_id = $row['pct_ID']; // create key for customer, if not present if (!array_key_exists($knd_id, $pdf_arr_data)) { $pdf_arr_data[$knd_id] = array(); } // create key for project, if not present if (!array_key_exists($pct_id, $pdf_arr_data[$knd_id])) { $pdf_arr_data[$knd_id][$pct_id] = array(); } // add row