<?php /* $Id: vw_log_update.php,v 1.12 2005/12/28 20:03:33 theideaman Exp $ */ global $AppUI, $hditem, $ist, $HELPDESK_CONFIG; $item_id = dPgetParam($_GET, 'item_id', 0); // check permissions //$canEdit = !getDenyEdit( 'tasks', $item_id ); //if (!$canEdit) { // $AppUI->redirect( "m=public&a=access_denied" ); //} $users = getAllowedUsers(); $task_log_id = intval(dPgetParam($_GET, 'task_log_id', 0)); $log = new CHDTaskLog(); if ($task_log_id) { $log->load($task_log_id); //Prevent users from editing other ppls timecards. $can_edit_task_logs = $HELPDESK_CONFIG['minimum_edit_level'] >= $AppUI->user_type; if (!$can_edit_task_logs) { if ($log->task_log_creator != $AppUI->user_id) { $AppUI->redirect("m=public&a=access_denied"); } } } else { $log->task_log_help_desk_id = $item_id; $log->task_log_name = $hditem['item_title']; } // Lets check cost codes $q = new DBQuery(); $q->addTable('billingcode'); $q->addQuery('billingcode_id, billingcode_name'); $q->addWhere('billingcode_status=0');