Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/05/2007, 14:03
Christian28Ex
 
Fecha de Ingreso: junio-2006
Mensajes: 3
Antigüedad: 17 años, 10 meses
Puntos: 0
Pregunta Flash/Php/Libro Visitas (Caracteres y lenguaje)

Hola :

Por favor me podrian ayudar con lo siguente ?
Tengo un script de un Libro de Visitas o Guestbook que me baje de internet, el cual me funciona bien en mi pagina al ingresar los datos en mi pelicula Flash y visualizarlos tambien en la misma pelicula, pero con algunos errores.
Como no entiendo casi nada de Php necestio de su ayuda.

1- La fecha me la muestra en Ingles y necesito que salga en español.
2- Cuando ingreso texto con acentos, me aparece todo mal al chequear el libro de visitas (salen puros simbolos extraños)
3- Me gustaria que tambien apareciera la hora abajito de la fecha.
4- Y lo ultimo, es que me gustaria que los titulos de lo que me esta mostrando (Nombre, Email, comentario, etc, me aparecieran subrayados o con negrita al mostrarme el registro del libro de visitas.

El Script del archivo Php que trabaja con Flash, es el siguente :

<?php

// If you are using an old version of php, remove the next set of lines.
// or use $HTTP_POST_VARS["..."] instead.

$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Website = $_POST["Website"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];

// Replace special characters - you can remove the next 5 lines if wanted.
$Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
$Comments = ereg_replace("[^A-Za-z0-9 \@\.\/\']", "", $Comments);
$Website = eregi_replace("MODIFICADO", "", $Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\/\'\~\:]", "", $Website);

// Remove slashes.
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);

// ################################################## #################################
// ########## Reading and Writing the new data to the GuestBook Database #############

if ($Submit == "Yes") {
// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";

// Opens up the file declared above for reading

$fp = fopen( $filename,"r");
$OldData = fread($fp, 80000);
fclose( $fp );

// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y"));

// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags

$Input = "Nombre: $Name
Email : $Email
Website : $Website
Mensaje : $Comments
Fecha : $Today

.:::.";

/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */

$New = "$Input$OldData";

// Opens and writes the file.

$fp = fopen( $filename,"w");
fwrite($fp, $New, 800000);
fclose( $fp );
echo '&load=loaded&';
}

// ################################################## #################################
// ######### Formatting and Printing the Data from the Guestbook to the Flash Movie ##



// Next line tells the script which Text file to open.
$filename = "GuestBook.txt";

// Opens up the file declared above for reading

$fp = fopen( $filename,"r");
$Data = fread($fp, 800000);
fclose( $fp );

// Splits the Old data into an array anytime it finds the pattern .:::.
$DataArray = split (".:::.", $Data);

// Counts the Number of entries in the GuestBook
$NumEntries = count($DataArray) - 1;

print "&load=loaded&&TotalEntries=$NumEntries&NumLow=$Nu mLow&NumHigh=$NumHigh&GuestBook=";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "No hay mas registros";

exit;
}
}
##### Original PHP Script by Jeffrey Hill


Alguien me puede ayudar por favor ??


PD : Cambie h t t p : / / por la palabra MODIFICADO ya que no me dejo incluirlo en este script (por las reglas del foro)