0) { echo '

' .'Some database upgrades are missing, ' .'upgrade now' .'

' ; } } // // Setup gallery wide options, if this fails then we output a CRITICAL_ERROR // since basic gallery information is not available // $query = ' SELECT param,value FROM '.CONFIG_TABLE.' ;'; if (!($result = pwg_query($query))) { die("Could not query config information"); } while ( $row =mysql_fetch_array( $result ) ) { if ( isset( $row['value'] ) ) { $conf[$row['param']] = $row['value']; } else { $conf[$row['param']] = ''; } // If the field is true or false, the variable is transformed into a // boolean value. if ( $conf[$row['param']] == 'true' or $conf[$row['param']] == 'false' ) { $conf[$row['param']] = get_boolean( $conf[$row['param']] ); } } include(PHPWG_ROOT_PATH.'include/user.inc.php'); // language files include_once(get_language_filepath('common.lang.php')); if (defined('IN_ADMIN') and IN_ADMIN) { include_once(get_language_filepath('admin.lang.php')); } // only now we can set the localized username of the guest user (and not in // include/user.inc.php) if ($user['is_the_guest']) { $user['username'] = $lang['guest']; } // include template/theme configuration list($user['template'], $user['theme']) = explode('/', $user['template']); // TODO : replace initial $user['template'] by $user['layout'] include(PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme'].'/themeconf.inc.php'); // template instance $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); ?>