$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" ) ) ) { include realpath( "lang/recoded/$HTTP_LANG.php" ); 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" ) ) ) { include realpath( "lang/recoded/$language.php" ); } else { pla_error( "Could not read language file 'lang/recoded/$language.php'. Either the file does not exist, or 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 ) ) { if( ! function_exists( "array_stripslashes" ) ) { function array_stripslashes(&$array) { if( is_array( $array ) ) while ( list( $key ) = each( $array ) ) if ( is_array( $array[$key] ) && $key != $array ) array_stripslashes( $array[$key] ); else $array[$key] = stripslashes( $array[$key] ); } } array_stripslashes($_GET); array_stripslashes($_POST); array_stripslashes($_COOKIE); $slashes_stripped = true; } ?>