| Default Date: |
|
";
if ($queue_approval->employee_approver_check('false')==1) {
$common->show_datestuff();
echo "Transfer Approval Team to:
(You can not undo this) | ";
$sql = "select ID, display_name, user_login
from {$wpdb->users}
where ID <> {$user_id}
order by display_name";
$users = $db->get_results($sql);
echo " |
| I conform that I want to move my team to the above approver. |
";
$sql = "select * from {$wpdb->prefix}timesheet_approvers where user_id = {$user_id}";
$approver_info = $db->get_row($sql);
echo "| Backup Approver: |
|
";
echo "| Backup Approver Expires On: |
|
";
}
if ($queue_invoice->employee_invoicer_check()!=0) {
$primary_sort_col = get_user_option('time_sheets_invoicing_primary_sort_col', $user_id);
$primary_sort_order = get_user_option('time_sheets_invoicing_primary_sort_order', $user_id);
$secondary_sort_col = get_user_option('time_sheets_invoicing_secondary_sort_col', $user_id);
$secondary_sort_order = get_user_option('time_sheets_invoicing_secondary_sort_order', $user_id);
$allow_show_record_invoicing = get_user_option('time_sheets_invoicing_allow_show_record_invoicing', $user_id);
if ($allow_show_record_invoicing != '') {
$allow_show_record_invoicing = 'checked';
}
if ($primary_sort_col=='') {
$primary_sort_col = 'c.ClientName';
}
if ($primary_sort_order=='') {
$primary_sort_order='asc';
}
if ($secondary_sort_col=='') {
$secondary_sort_col = 't.start_date';
}
if ($secondary_sort_order=='') {
$secondary_sort_order='asc';
}
echo "| Invoice List Sort Order |
|
";
echo "| Always show 'Record Invoicing' button above time sheet list |
";
}
if ($options['users_override_location']) {
$menu_location = get_user_option('time_sheets_menu_location', $user_id);
echo "| Time Sheets Below: | |
";
}
if ($options['user_specific_date_format']) {
$user_date = get_user_option('user_date_format', $user_id);
echo "| Custom Date Format: | Documentation on Date Formatting Use of a non-ISO date format can cause search issues when searching for old time sheets. |
";
}
echo " |
";
echo "
";
if ($queue_approval->employee_approver_check('false')==1) {
echo "
";
}
}
function save_settings() {
global $wpdb;
$options = get_option('time_sheets');
$common = new time_sheets_common();
$queue_approval = new time_sheets_queue_approval();
$queue_invoice = new time_sheets_queue_invoice();
$db = new time_sheets_db();
$user_id = get_current_user_id();
update_user_option( $user_id, 'timesheet_defaultdate', $_POST['default_date'], false);
if ($_POST['transfer_to_user_id'] != '') {
if ($_POST['approve_change']) {
$sql = "insert into {$wpdb->prefix}timesheet_approvers (user_id) values (%d)";
$parms = array(intval($_POST['transfer_to_user_id']));
$db->query($sql, $parms);
$sql = "update {$wpdb->prefix}timesheet_approvers_approvies
set approver_user_id = %d
where approver_user_id = %d";
$parms = array(intval($_POST['transfer_to_user_id']), $user_id);
$db->query($sql, $parms);
echo '