$value ) { $value=preg_split ("/[-]+/", $value ); $HTTP_LANGS2[$key]=$value[0]; } $HTTP_LANGS = array_merge ($HTTP_LANGS1, $HTTP_LANGS2); foreach( $HTTP_LANGS as $HTTP_LANG) { // try to grab one after the other the language file if( file_exists( realpath( "lang/recoded/$HTTP_LANG.php" ) ) && is_readable( realpath( "lang/recoded/$HTTP_LANG.php" ) ) ) { ob_start(); include realpath( "lang/recoded/$HTTP_LANG.php" ); ob_end_clean(); break; } } } } else { // grab the language file configured in config.php if( $language != null ) { if( 0 == strcmp( $language, 'english' ) ) $language = 'en'; if( file_exists( realpath( "lang/recoded/$language.php" ) ) && is_readable( realpath( "lang/recoded/$language.php" ) ) ) { ob_start(); include realpath( "lang/recoded/$language.php" ); ob_end_clean(); } else { pla_error( "Could not read language file 'lang/recoded/$language.php'. Either the file does not exist, or its permissions do not allow phpLDAPadmin to read it." ); } } } } // If config.php doesn't create the templates array, create it here. if( ! isset( $templates ) || ! is_array( $templates ) ) $templates = array(); // Always including the 'custom' template (the most generic and flexible) $templates['custom'] = array( 'desc' => 'Custom', 'icon' => 'images/object.png', 'handler' => 'custom.php' ); // Strip slashes from GET, POST, and COOKIE variables if this // PHP install is configured to automatically addslashes() if ( get_magic_quotes_gpc() && ( ! isset( $slashes_stripped ) || ! $slashes_stripped ) ) { array_stripslashes($_GET); array_stripslashes($_POST); array_stripslashes($_COOKIE); array_stripslashes($_FILES); $slashes_stripped = true; } ?>