Is it a condition for I‘tikaf to be performed in the mosque?
Yes, for I‘tikaf to be valid, it must be performed in a mosque. I‘tikaf is not valid if performed at home or elsewhere.
What is the ruling of Islamic Law on performing ṭawāf on the upper floors of al-Masjid al-Ḥarām, given that these floors are situated above the level of the Ka‘bah, and that the one performing ṭawāf passes by certain barriers, such as pillars and walls, during the ṭawāf?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
There are numerous conditions for the validity of ṭawāf (circumambulation around the Ka‘bah), among them: that the one performing ṭawāf be inside the Masjid (al-Masjid al-Ḥarām) — even if the Masjid has been expanded, so long as the expansion does not extend out into al-ḥill (land outside the sanctuary boundaries). It suffices for the ṭawāf to be performed in the airspace of the Masjid or upon its roof, even if that roof is higher than the Ka‘bah (the House) itself.
Al-Khaṭīb ash-Shirbīnī (raḥimahullāh) said: "It [ṭawāf] is valid upon the roof of the Masjid, even if the roof of the Masjid is higher than the House — just as prayer [is valid] upon Mount Abū Qubays despite its elevation above the House. This is the relied-upon (mu‘tamad) position." [Mughnī al-Muḥtāj, Vol.2/P.246]
The validity of the tawaf isn`t affected by the pillars and walls standing between the one performing ṭawāf and the House, since the condition is only that the person performing ṭawāf be within the boundaries of the Masjid and outside the boundaries of the Ka‘bah itself.
Ash-Shirbīnī said: "It [ṭawāf] is valid inside the Masjid, even if it is expanded, and even if a barrier stands between the one circumambulating and the House — such as a water-supply structure (saqāyah) or pillars (sawārī)." [Mughnī al-Muḥtāj, Vol. 2/P.246]
Accordingly, ṭawāf performed on the upper floors is valid, and the presence of barriers such as pillars and walls during the ṭawāf does not affect its validity. And Allah, the Exalted, knows best.
Is the marriage, which lacks a valid legal contract, a guardian, and a court registration, valid?
It is incumbent that a valid marriage contract be concluded in the presence of a guardian and two trustful witnesses, and it should be registered in the court to protect the rights of the wife. Actually, a valid marriage contract is what differentiates between sound marriage and fornication.
What is the ruling if hemorrhoid blood exits after completing ablution?
If this blood is exiting from outside the anus (due to the hemorrhoid protruding), it does not invalidate ablution, because blood exiting from the body from other than the two orifices does not invalidate ablution. If it exits from the anus (meaning from inside it), it invalidates ablution, and one must perform istinja' from it, wash the area of impurity, and repeat the ablution.
However, if this blood exits continuously such that no time remains sufficient for purification and prayer without it flowing, then it takes the ruling of urinary incontinence (sals al-bawl). One then cleanses from it after the time for each prayer enters, performs ablution immediately thereafter, and performs the obligatory prayer immediately. There is no liability upon him after that if something of it flows, and he may pray as many voluntary prayers as he wishes. If he wants to pray another obligatory prayer, he must cleanse himself and perform ablution. And Allah the Almighty knows best.