<?php
/**************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
include("./data.php");
$service['add_header'] = TRUE;
if(!file_exists('./config.inc.php'))
{
header('Location:./config');
exit();
} else {
include('./config.inc.php');
}
echo $layout->page_header;
?>
<table width="100%">
<tr>
<?php
$i = 0;
while($i < 9)
{
$sql = "SELECT o_services.location, o_home_layout.service
FROM o_home_layout LEFT JOIN o_services ON o_home_layout.service=o_services.code
WHERE o_home_layout.user_id='{$user->user_id}' AND o_home_layout.position='$i'";
$db->query($sql);
$db->fetch_results();
$location = $db->record['location'];
$svc = $db->record['service'];
$sql = "SELECT rights FROM o_user_rights WHERE service='$svc' AND user_id='{$user->user_id}'";
$db->query($sql);
$db->fetch_results();
if($i == 1 || $i == 4 || $i == 7)
{
$cell_width="60%";
} else {
$cell_width="20%";
}
echo "<td width=\"$cell_width\" valign=\"top\">";
if(!empty($location) && $db->record['rights'] != 0)
{
include($O->dir ."/$location/home.php");
}
echo "</td>";
$i++;
if($i == 3 || $i == 6 || $i == 9)
{
echo "</tr>\n<tr>\n";
}
}
?>
</table>
<?php
echo $layout->create_footer();
?>