Hvad er galt
Hej som I kan se er der noget i denne gæstebog, som gør at den erstatter :-) med et billede og den erstatter også banneord med et billede.Nu er jeg ikke noget haj til php, men Jeg har nu brugt lang tid på at forsøge at fjerne det, men hvis man fjerner de linjer, hvor der står at den skal erstatte, kan man ikke se indholdet af gæstebogen...
/******************************************************************/
if ($name == \"\" || $company == \"\" || $message == \"\")
{
echo \"Velkommen\";
$filesize = filesize(\"entry.dat\");
$file = fopen(\"entry.dat\",\"r\");
$buffer = fread($file,$filesize);
/********************** SMILE PARSING **(beta)********************/
$smile_parse1 = str_replace(\":-)\",\"<IMG SRC=smile.gif border=\\\"0\\\">\",$buffer);
$smile_parse2 = str_replace(\":-P\",\"<IMG SRC=tongue.gif border=\\\"0\\\">\",$smile_parse1);
$smile_parse3 = str_replace(\":-p\",\"<IMG SRC=tongue.gif border=\\\"0\\\">\",$smile_parse2);
$smile_parse4 = str_replace(\":P\",\"<IMG SRC=tongue.gif border=\\\"0\\\">\",$smile_parse3);
$smile_parse5 = str_replace(\":)\",\"<IMG SRC=smile.gif border=\\\"0\\\">\",$smile_parse4);
$smile_parse6 = str_replace(\":-(\",\"<IMG SRC=notsmile.gif border=\\\"0\\\">\",$smile_parse5);
$smile_parse7 = str_replace(\":(\",\"<IMG SRC=notsmile.gif border=\\\"0\\\">\",$smile_parse6);
$smile_parse8 = str_replace(\":-o\",\"<IMG SRC=osmile.gif border=\\\"0\\\">\",$smile_parse7);
$smile_parse9 = str_replace(\";-)\",\"<IMG SRC=zwinker.gif border=\\\"0\\\">\",$smile_parse8);
$smile_parse10 = str_replace(\";)\",\"<IMG SRC=zwinker.gif border=\\\"0\\\">\",$smile_parse9);
/********************** CENSURES **************************/
$smile_parse11 = str_replace(\"sex\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse10);
$smile_parse12 = str_replace(\"shit\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse11);
$smile_parse13 = str_replace(\"fuck\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse12);
$smile_parse14 = str_replace(\"asshole\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse13);
$smile_parse15 = str_replace(\"microsoft\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse14);
$smile_parse16 = str_replace(\"bitch\",\"<IMG SRC=censured.gif border=\\\"0\\\">\",$smile_parse15);
$buffer_parsed = str_replace(\":-x\",\"<IMG SRC=xsmile.gif border=\\\"0\\\">\",$smile_parse16);
echo \"$buffer_parsed\";
fclose($file);
}
else if ($send_status == \"ok\")
{
/********* GET VARIABLE **********/
$filesize = filesize(\"entry.dat\");
$file = fopen(\"entry.dat\",\"r\");
$buffer = fread($file,$filesize);
fclose($file);
$today = getdate();
$month = $today[month];
$mday = $today[mday];
$year = $today[year];
$zeituhr = \"$month $mday, $year\";
/******* WRITING MESSAGE TO FILE ****/
$file = fopen(\"entry.dat\",\"w\");
$parsed_message = strip_tags($message,\"<a>,<i>\");
$parsed_message_br = str_replace(\"\\n\",\"<br>\",$parsed_message);
$today = date( \"Ymd\", time() );
$message_table =\"<TABLE BORDER=\\\"0\\\" CELLPADDING=\\\"1\\\" CELLSPACING=\\\"0\\\"
background=gbag2.gif width=\\\"500\\\"></TD></TR><TR><TD align=\\\"right\\\" colspan=\\\"1\\\"><i>$zeituhr</i></TD></TR><TR><TR><TD width=\\\"30%\\\"><font color=\\\"#ced6f7\\\"><B>Navn:</B></TD><TD>$name</TD></TR><TR><TD><B><font color=\\\"#ced6f7\\\">E-mail:</B></TD><TD><A HREF=\\\"mailto:$email\\\">$email</A></TD></TR><TR><TD><B><font color=\\\"#ced6f7\\\">Hjemmeside:</B></TD><TD><A HREF=\\\"$url\\\" target=\\\"_blank\\\">$url</A></TD></TR><TR><TD><B><font color=\\\"#ced6f7\\\">Emne:</B></TD><TD>$company</TD></TR><TR><TD valign=\\\"top\\\" colspan=\\\"1\\\"><B><font color=\\\"#ced6f7\\\">Besked:</B></TD><TD>$parsed_message_br</TD></TR><TR><TD <TD bg=\\\"bottom.gif\\\" colspan=\\\"2\\\"><IMG SRC=\\\"bottom.gif\\\" width=\\\"100%\\\" height=\\\"3\\\" border=\\\"0\\\">
</font></TD></TR></TABLE>\";
fputs($file,\"$message_table \\n $buffer\");
fclose($file);
}
else if ($view_guestbook == \"View Guestbook\"){
/************ READING OUT **************/
$filesize = filesize(\"entry.dat\");
$file = fopen(\"entry.dat\",\"r\");
$buffer = fread($file,$filesize);
echo \"$buffer_parsed\";
fclose($file);
/************************************/
}
?>