.




<?php
session_start
();
if (
$_GET['language']) $_SESSION['language'] = $_GET['language'];
if (
file_exists($_SESSION['language'] . '.php')) include $_SESSION['language'] . '.php';
?>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo $textos['title']; ?></title>
</head><body>
<h1><?php echo $textos['mediante_define'?></h1>
<p align="right"><a href="../"><?php echo $textos['volver'] , '.'?></a></p>
<p><?php echo $textos['seleccione_idioma'?></p>
<form method="get" action="index.php">
<p><input type="radio" name="language" value="es" <?php if ($_SESSION['language'] =='es') echo 'checked' ?> /> <?php echo $textos['castellano'?></p>
<p><input type="radio" name="language" value="en" <?php if ($_SESSION['language'] =='en') echo 'checked' ?>/> <?php echo $textos['ingles'?></p>
<p><input type="radio" name="language" value="xx" <?php if ($_SESSION['language'] =='xx') echo 'checked' ?>/> <?php echo $textos['no_hay'?></p>
<input type="submit" name="submit" value="<?php echo $textos['aceptar'?>" />
</form>
<hr />
<form method="get" action="index.php">
<select name="language" onChange="this.form.submit();">
<?php
     asort
($textos['idiomas']);
     foreach(
$textos['idiomas'] as $codigo =>$descr) {
       echo 
'<option value="'$codigo '"';
       if (
$codigo == $_SESSION['language']) echo ' selected';
       echo 
'>' $descr '</option>';
     }
?>
</select>
</form>
<?php
mostrar_archivos
();
function 
mostrar_archivos() {
         global 
$textos;
         
?>
         <hr />
         <h3><?php echo $textos['este_archivo'?></h3>
         <pre><?php highlight_file('index.php'); ?></pre>
         <hr />
         <h3><?php echo $textos['archivo_de_traducciones'?></h3>
         <pre><?php if (file_exists($_SESSION['language'] . '.php')) highlight_file($_SESSION['language'] . '.php'); else echo $textos['no_hay']; ?></pre>
         <?php
}
?>
</body></html>