Court confirms bail of KP chief minister