".$TbMsg[14]."";
} else {
// ultimo número: a todos los números posibles le quito los ya usados
// y me quedo con el primero
chdir($dirtemplates);
$pn=array_map("principio",glob("*"));
$todos=range(21,99);
$ultimonumero=current(array_diff($todos,$pn));
$nombrenuevoboot=$ultimonumero.$guarnomb;
$parametrosnuevoboot=$_POST["parametrosnuevoboot"];
$nuevoboot = $dirtemplates.$nombrenuevoboot;
$fp = fopen($nuevoboot, "w");
$string = $TbMsg[22].$descripfich."\n".$parametrosnuevoboot;
$write = fputs($fp, $string);
fclose($fp);
$action="./boot_grub4dos.php";
$mensaje=$TbMsg[6]."
".$descripfich."";
}
?>
";
$parametrosmodifica=$_POST["parametrosmodifica"];
if(empty($modificadescripcion)) {
$mensaje=$TbMsg[14];
}else{
$fp = fopen($ficherow, "w");
$string = $TbMsg[22].$descripfich."\n".$parametrosmodifica;
$write = fputs($fp, $string);//Escribe la primera linea
fclose($fp);
$action="./boot_grub4dos.php";
$mensaje=$TbMsg[7];
}
?>
$valor) {
if (strnatcmp ( $valor , "20" ) > 0) break;
unset($pn[$key]);
}
// Botón cambio de modo
$textoboton = ' '."\n";
} else {
$textoboton = ' '."\n";
}
// Opciones del select
$select = ' '."\n";
// Hay una plantilla seleccionada para modificar
} else {
$file=$dirtemplates.$selectfile;
$descripcion=exec("awk 'NR==1 {print $2}' ".$dirtemplates.$selectfile);
$parametros=file_get_contents ($file);
// Elimino cabecera anterior
$parametros=preg_replace ("/$TbMsg[22].*\n/",'', $parametros);
// Campos de formulario especificos de esta opción
$input .= ''."\n".
''."\n";
}
// Parte del formulario comun
?>