The cost of securing sites or constructing and equipping buildings and in general the cost of housing and equipping any 24-hour school, including the necessary dormitories, dining halls, and other living quarters for pupils and employees of the county or the district shall be a charge against the funds of the county or school district maintaining it. The county superintendent or governing board of any district, as the case may be, may employ such principals, assistants, teachers, and employees as it deems necessary for the proper conduct of the 24-hour school and may pay them from available funds. The expenses of lodging and boarding pupils residing within the buildings of any 24-hour school shall be paid from the sums received from contracts with the parents or guardians of the pupils, or from the funds of the county within which the school is located paid to the school district, if applicable, in pursuance of court orders for the maintenance of pupils.