The person who leads prayers in a mosque; Guide; Leader; Ruler) If one sees himself building a prison in a dream, it means that he will meet a righteous man or an Imam who will guide him on the straight path.
An Imam in a dream also represents the spiritual leader of all Muslims.
(Also see Five times prayers; Pharaoh)... imam dream meaning
(Grave; Tomb) The graves of martyrs, holy men, saints or their shrines in a dream represent innovation, heedlessness, intoxication, adultery, corruption, or fear. Seeing the shrine of a saint or a shaikh, or the grave site of a martyr who is venerated by people in a dream means witnessing either good or evil happenings. It also could represent the pilgrimage season, religious gatherings, precious metals, a treasure, or offerings.
(Also see Dome’; Cemetery)... shrine dream meaning