(a) Any person who possesses or has under his control any quantity of any narcotic substance, except as authorized in this chapter, for a first offense, may be imprisoned not more than seven years or be fined not more than fifty thousand dollars, or be both fined and imprisoned; and for a second offense, may be imprisoned not more than fifteen years or be fined not more than one hundred thousand dollars, or be both fined and imprisoned; and for any subsequent offense, may be imprisoned not more than twenty-five years or be fined not more than two hundred fifty thousand dollars, or be both fined and imprisoned.

(b) Any person who possesses or has under his control any quantity of a hallucinogenic substance other than marijuana or four ounces or more of a cannabis-type substance, except as authorized in this chapter, for a first offense, may be imprisoned not more than five years or be fined not more than two thousand dollars or be both fined and imprisoned, and for a subsequent offense may be imprisoned not more than ten years or be fined not more than five thousand dollars or be both fined and imprisoned.

(c) Any person who possesses or has under his control any quantity of any controlled substance other than a narcotic substance, or a hallucinogenic substance other than marijuana or who possesses or has under his control one-half ounce or more but less than four ounces of a cannabis-type substance, except as authorized in this chapter, (1) for a first offense, may be fined not more than one thousand dollars or be imprisoned not more than one year, or be both fined and imprisoned; and (2) for a subsequent offense, may be fined not more than three thousand dollars or be imprisoned not more than five years, or be both fined and imprisoned.

(d) Any person who violates subsection (a), (b) or (c) of this section in or on, or within one thousand five hundred feet of, the real property comprising a public or private elementary or secondary school and who is not enrolled as a student in such school or a licensed child day care center, as defined in section 19a-77, that is identified as a child day care center by a sign posted in a conspicuous place shall be imprisoned for a term of two years, which shall not be suspended and shall be in addition and consecutive to any term of imprisonment imposed for violation of subsection (a), (b) or (c) of this section.

(e) As an alternative to the sentences specified in subsections (a) and (b) and specified for a subsequent offense under subsection (c) of this section, the court may sentence the person to the custody of the Commissioner of Correction for an indeterminate term not to exceed three years or the maximum term specified for the offense, whichever is the lesser, and at any time within such indeterminate term and without regard to any other provision of law regarding minimum term of confinement, the Commissioner of Correction may release the convicted person so sentenced subject to such conditions as he may impose including, but not limited to, supervision by suitable authority. At any time during such indeterminate term, the Commissioner of Correction may revoke any such conditional release in his discretion for violation of the conditions imposed and return the convicted person to a correctional institution.

(f) To the extent that it is possible, medical treatment rather than criminal sanctions shall be afforded individuals who breathe, inhale, sniff or drink the volatile substances defined in subdivision (49) of section 21a-240.

(g) The provisions of subsections (a) to (c), inclusive, of this section shall not apply to any person (1) who in good faith, seeks medical assistance for another person who such person reasonably believes is experiencing an overdose from the ingestion, inhalation or injection of intoxicating liquor or any drug or substance, (2) for whom another person, in good faith, seeks medical assistance, reasonably believing such person is experiencing an overdose from the ingestion, inhalation or injection of intoxicating liquor or any drug or substance, or (3) who reasonably believes he or she is experiencing an overdose from the ingestion, inhalation or injection of intoxicating liquor or any drug or substance and, in good faith, seeks medical assistance for himself or herself, if evidence of the possession or control of a controlled substance in violation of subsection (a), (b) or (c) of this section was obtained as a result of the seeking of such medical assistance. For the purposes of this subsection, “good faith” does not include seeking medical assistance during the course of the execution of an arrest warrant or search warrant or a lawful search.