Updated:

The city gates (they were always at least two) served to watch over the comings and goings of the city dwellers, and tolls and duties were collected there from traders for goods brought in and sold. The ground level housed the armoury and storage facilities, the highest level featured an astronomical clock or town clock.
 
The gate tower was typically a rectangular tower of greater or lesser height with a passage through and a drawbridge over a frontal moat. The walls of some cities also included a water gate, through which the townspeople made their way to the water supply. There were also dedicated gates for the executioner and his henchmen, for unclean people, as well as Jewish gates.
 
After closing time, it was only possible to enter the city with a special permit from the Councillors. Anyone who failed to make it back in time had to spend the night outside the city walls. The gate was locked with a key that was kept overnight with the Bailiff or the Head of the City Council.

Codex
Abbots Of Sasau MonasteryAbduction Of Prokop Of LuxembourgAbduction Of Wenceslas IvAlbert Iv Of HabsburgAlchemyAnimal HusbandryArmourArmouryAstrologyAvicenna (Ibn Síná)Bailiff And City CouncilBakerBaptismBaths And BathmaidsBeekeepingBeveragesBlacksmithBooks And LibrariesBurghersBurglars And RobbersBurialButcherCarpenters And JoinersCarts And WagonsCharcoal-BurnerCharityCharles IvChroniclesChurchesClothing And FashionCombat TechniqueConciliation CrossesCounterfeitingCourtlinessCrime And PunishmentDiseasesDrinking WaterDugout SheltersEcumenical CouncilEntertainment And GamesExecutionerFabricsFaith And DevotionFarmerFarmingFeudalismFishermanFolk SongsFoodForeignersForgeryFrescosFurnitureGardensGordGothic ArchitectureGravediggerGreetingsGuilds And CraftsHealing HerbsHeinrich Iii Von RosenbergHenry Of LeipaHeraldryHorse-RidingHospitals And AlmshousesHouses And DwellingsHroznata Of Uhzitz And HusitzHuntsmanHygieneInvectiveJailJan "birdie" JešekJan Of PředbořiceJan Ptáček (Hans Capon)JewsJobst Of MoraviaJohn HusJohn Ii Of LiechtensteinJohn Of JensteinJohn Sokol Of LambergJourneymen And ApprenticesKitchensKnighthood TrainingKonrad KyeserKuttenbergLand ArmyLanguage And LiteratureLedetchkoLiturgical ItemsLiturgyLocksLocksmithMalters And BrewersMerchantMerhojedMillersMiners And MineworkersMoneyMorgueMunicipal FinancesMusicNames And SurnamesNecronomiconNeuhofOtto Iii Of Trosky, Called BergowOtto Iv Von BergowPaganismPainterPennants And BannersPharmacistPilloryPopePope Benedict XiiiPope Boniface IxPope Clement ViiPope Urban ViPrayerPriestProkop Of LuxembourgProstitutionRacek Kobyla Of DvojitzRathouse And Town HallRattay On SasauRoman Catholic ChurchRovnaRupert Iii Of The PalatinateSafe ConductSaint ProcopiusSamopeshSasau MonasterySasau TownSchoolsScribeShepherdSigismund Of LuxembourgSir Divish Of TalmbergSir Hanush Of LeipaSir Markvart Von AulitzSir Smil FlashkaSkalitzSkalitz-Sasau DistrictSlaughterhouseSmugglerSources Of LightSt. Wenceslas' CrownStonemasonSwordsmiths And ArmourersTailor And DraperTalmbergTannerTaverns, Inns And InnkeepersThe Battle Of KosovoThe Battle Of NicopolisThe Conquest Of KuttenbergThe Devil's FurrowThe Golden Age Of Charles IvThe Lords Of TalmbergThe Ronov FamilyThe Sacking Of SkalitzThe Western SchismTithesToiletsToolsTournamentsTown GarrisonTown GatesTowns And CitiesTravel And Travelling MerchantsTrebuchetTrial By OrdealUniversityUzhitzVenoms And PoisonsVilem Zajíc Of ValdekVillageVranikWaldensiansWater MillsWater-Driven SawmillsWeaponsWenceslas IvWilliam I Of MeissenWilliam Of Talmberg And MiličínWilliam The Courteous Of HabsburgWindmillsWinegrowerWitchcraftWomen In The Middle AgesWoodcutterWoodsZajíc Family Of Zaluzh And HasenburgZbyněk Zajíc Of Hasenburg
Codex