closes #8

Created loop as follows:

1.       Connect to DB
2.       Query client table based on URL and get client_id
3.       Query page table to fetch array of everything where client_id
matches client_id
4.       “Foreach” loop round the results
                   i.      Query module_to_page  table where page_id
matches page.id (store modules in array)
                   ii.      Loop through array (carried out in order of
“weight” to determine order on page)
                                 a.       Query module where module_id
module.id matches (store results in variables)
                                 b.      Query module “type” tables
where the module.id matches module_id
                                 c.      Write out module filling it in
with data from results
                   iii.      Loop repeats for each module
5.       Loop goes round again from 4 until all pages are populated.
6. Pages currently stack on top of each other in index.php