Longview man sentenced for cold pills