connect($dbData['host'], $dbData['username'], $dbData['password'], $dbData['database']); //function to fetch settings function getSettings($name) { $data = mysql_query('SELECT value FROM settings WHERE `key`="'.$name.'"'); return mysql_result($data, 0); } function setValue($name, $value) { mysql_query('UPDATE settings SET value="'.$value.'" WHERE `key`="'.$name.'"'); } //this array holds our rights $allRightsD = array( 'write_articles', 'manage_usergroups', 'manage_users', 'manage_categories', 'edit_articles', 'upload_images', 'remove_comments', 'edit_weblog_settings', 'browse_images', 'manage_plugins' ); //add some numbers to the array foreach($allRightsD AS $num => $right) $allRights[$right] = pow(2, $num); //fetch the user rights if($_SESSION['loggedin']) $rights = $database->query('SELECT rights FROM writers WHERE id='.$_SESSION['userid'], 'result'); //fetch the current template $currentTemplate = getSettings('currentTemplate'); //check if the template cookie has been set $tplCookie = $_COOKIE['layout']; //check if this template exists if($tplCookie != '' && file_exists('templates/'.$tplCookie)) $currentTemplate = $tplCookie; include('includes/ubb.php'); ?>
Fatal error: Class 'templateEngine' not found in D:\wamp\www\do8\header.php on line 3