What is the ruling on congregational prayer performed outside the mosque, and is it a condition that it be performed in a mosque in order to attain the full reward?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
It is not a condition for attaining the reward of congregational prayer that it be performed in a mosque; however, a Muslim should still be keen to perform his prayers in the mosque, so as not to miss out on immense reward. This is due to the virtue of the mosque and of spending time there (i‘tikāf), the typically larger number of worshippers present, and the additional reward gained through walking to and from the mosque. On the authority of Abū Hurayrah (raḍiyallāhu ‘anh), the Messenger of Allah ﷺ said: "Whoever purifies himself in his house, then walks to one of the houses of Allah to fulfill one of the obligations Allah has prescribed, one of his steps will erase a sin, and the other will raise him a degree [in status]." (Related by Muslim)
Whoever misses congregational prayer at the mosque should still strive to pray in congregation at his workplace, or together with the members of his household. And Allah, the Exalted, knows best.
If someone prayed sitting or lying down because of illness, must he repeat the prayer after he recovers?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah.
If a sick person prays sitting or lying down in the obligatory prayer because he is unable to stand, and then recovers, he does not have to repeat what he prayed in those postures, because he was excused.
Shaykh al-Islām Imam al-Nawawī (may Allah have mercy on him) said: “The Ummah is unanimously agreed that whoever is unable to stand in the obligatory prayer prays it sitting and does not have to repeat it. Our fellow scholars said: His reward is not less than his reward when standing, because he is excused. It is established in Ṣaḥīḥ al-Bukhārī that the Messenger of Allah (peace and blessings be upon him) said: ‘When a servant falls ill or travels, there is recorded for him what he used to do when healthy and resident.’ Our fellow scholars said: It is not a condition of inability that standing be altogether impossible, nor does the slightest hardship suffice. What counts is clear hardship. If he fears severe hardship, a worsening of his illness, or the like, or if a passenger on a ship fears drowning or dizziness, he prays sitting and does not have to repeat.” [al-Majmūʿ, Vol.4/p.201]. And Allah Almighty knows best.
What is required of one who doubts the number of rakʿāt during prayer?
All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
If a person doubts the number of rakʿāt he has prayed, he should build upon the lesser number, as that is what he is certain of. He should then perform the prostration of forgetfulness (sujūd al-sahw) before the final salām at the end of the prayer. ʿAṭāʾ ibn Yasār narrated that the Messenger of Allah ﷺ said: "When any one of you is in doubt during his prayer and does not know whether he has prayed three rakʿāt or four, let him pray one more rakʿah and then perform two prostrations while seated before the salām. If the rakʿah he prayed was a fifth, these two prostrations will make it even; and if it was the fourth, then the two prostrations serve as a humiliation for the devil." (Reported by Abū Dāwūd.)
It is stated in al-Muqaddimah al-Ḥaḍramiyyah — one of the foundational texts of the Shāfiʿī school: "If one doubts whether he has prayed three rakʿāt or four, he is obliged to build upon the lesser number."
However, if such doubt recurs repeatedly and reaches the level of obsessive whispering (waswasah), he should not build upon the lesser number in that case — rather, he should build upon the greater number. And Allah the Almighty knows best.
Is Fajr (dawn) Sunnah a confirmed one?
All praise be to Allah The Lord of The Worlds Of course, it is a confirmed Sunna which the Prophet (PBUH) used to offer in a regular basis. And Allah Knows Best.