Temperature-controlled transitions between glass, liquid, and gel states in dense p-NIPA suspensions