1.   It shall be unlawful for any person to climb upon, hold to or in any manner attach to, any train or railroad car, while such is in motion within the city, unless such person is acting in the line of duty.
   2.   It shall also be unlawful to board any train or railroad car (passenger, freight or other) without a proper ticket or the permission of the person in charge of the train or railroad car, or not in the line of duty.