(a)imprisonment in the Quarter Guard, or such other place as may be considered suitable, for a term which may extend to twenty-eight days when the order is passed by a District Magistrate or a Commandant or to seven days when it is passed by any other officer ;