Terror bid foiled in Punjab, four held with arms