ID && $current_user->has_cap('manage_options')) || ($wppmfunction->has_permission('view_task',$id)))) {exit;} $proj_id = isset($_POST) && isset($_POST['proj_id']) ? intval(sanitize_text_field($_POST['proj_id'])) : 0; $auth_id = $wppmfunction->wppm_get_auth_code($id); $auth_id = sanitize_text_field($auth_id); if(!empty($id)){ $task = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}wppm_task where id=".$id); $project_data = $wppmfunction->get_project($task->project); $task_comment = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_task_comment where task_id=".$id." ORDER BY create_time DESC"); } $user_role = $wpdb->get_var( "SELECT role_id FROM {$wpdb->prefix}wppm_project_users where proj_id = $task->project AND user_id = $current_user->ID"); if(!empty($task->project)){ $project_name = $wpdb->get_var( "SELECT project_name FROM {$wpdb->prefix}wppm_project where id=".$task->project); } $wppm_checklist=$wpdb->get_results( "SELECT * FROM {$wpdb->prefix}wppm_checklist where task_id=".$task->id ); if(!empty($task->status)){ $task_status = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}wppm_task_statuses where id=".$task->status); } if(!empty($task->priority)){ $task_priority = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}wppm_task_priorities where id=".$task->priority); } if(!empty($task->users)){ $users = explode(",",$task->users); } if(!empty($task->description)){ $task_description = stripslashes((htmlspecialchars_decode($task->description, ENT_QUOTES))); } ?>