'Production', Kohana::STAGING=>'Staging', Kohana::TESTING=>'Testing', Kohana::DEVELOPMENT=>'Development', ); return (! isset($modes[static::sitemode()])) ? 'Unknown' : $modes[static::sitemode()]; } public static function submode() { $submode = Kohana::Config('config.debug.submode'); return (isset($submode[Request::$client_ip])) ? $submode[Request::$client_ip] : FALSE; } public static function sitename() { return Kohana::Config('config.site.name'); } // Called in Invoice/Emailing to embed the file. public static function logo_file() { list ($path,$suffix) = explode('.',static::$logo); return Kohana::find_file(sprintf('media/%s',Config::siteid()),$path,$suffix); } public static function logo_uri() { list ($path,$suffix) = explode('.',static::$logo); return URL::site(Route::get('default/media')->uri(array('file'=>$path.'.'.$suffix),array('alt'=>static::sitename())),'http'); } public static function logo() { return HTML::image(static::logo_uri(),array('class'=>'headlogo','alt'=>_('Logo'))); } public static function login_uri() { return ($ao = Auth::instance()->get_user()) ? $ao->name() : HTML::anchor('login',_('Login')); } public static function copywrite() { return '(c) phpLDAPadmin Development Team'; } /** * Return our caching mechanism */ public static function cachetype() { return is_null(Kohana::config('config.cache_type')) ? 'file' : Kohana::config('config.cache_type'); } } ?>