assign('self', $path); $page->assign('lang', $lang); // look for user data if (isset($session->sid)) { $u = new Diver; if ($u->fetchBySession($session->sid)) { $viewer = $u; $page->assign('viewer', $viewer); } } // check for "units" cookie. if (!empty($_COOKIE['units'])) $units = $_COOKIE['units']; // sanitize if ($units != 'metric' && $units != 'imperial') $units = 'metric'; $page->assign('units', $units); // create notifies array if (!empty($_GET['n'])) $page->assign('notifies', explode('|', $_GET['n'])); require($config['htdocs'].$pathare."do.php"); header("Content-type: text/html; charset=UTF-8"); do_page(); ?>