############################################ # + xGB [x-devGuestBook] v 1.2 # # + by Robert Klikics & Alexander Weiss # # + visit: http://x-dev.de for more stuff # # + License: GPL # # + You may not remove the Copyrights # ############################################ # + Filename: xGB_write.php [sign] # ############################################ include("./config/gb_head.inc"); include("./config/gb_settings.php"); if($eintrag == "ok") { setlocale("LC_TIME", "en"); $date = strftime("%m.%d.%Y at %I:%M %p", time()); if($newname == "") { echo "
Need your name
"; echo "--> back
"; include("./config/gb_foot.inc"); exit; } if($newemail == "") { echo "Your email address would be nice
"; echo "--> back
"; include("./config/gb_foot.inc"); exit; } if($newtext == "") { echo "C'mon, you need to write something....
"; echo "--> back
"; include("./config/gb_foot.inc"); exit; } if($html == "off") { $newtext = htmlentities($newtext); $newtext = stripslashes($newtext); } include("./data/gb_data.dat"); $newname = ereg_replace(" ", "!", $newname); $datei = fopen("./data/gb_data.dat", "w"); $newtext = nl2br($newtext); include("./data/gb_badwords.dat"); $zaehler = "0"; while($badword[$zaehler] != "") { $newtext = ereg_replace($badword[$zaehler],$re_by, $newtext); $zaehler++; } // in datei schreiben: if($datei) { fputs($datei, " \n \$name[] = \"$newname\"; \n" . "\$email[] = \"$newemail\";\n"); fputs($datei, "\$pagename[] = \"$newpagename\"; \n" . "\$pageurl[] = \"$newpageurl\";\n" . "\$text[] = \"$newtext\";\n"); fputs($datei, "\$datum[] = \"$date\";\n"); fclose($datei); } $datei = fopen("./data/gb_data.dat", "a"); $count = "0"; $max--; while($name[$count] != "") { fputs($datei, "\$name[] = \"$name[$count]\";\n"); fputs($datei, "\$email[] = \"$email[$count]\";\n"); fputs($datei, "\$pagename[] = \"$pagename[$count]\";\n"); fputs($datei, "\$pageurl[] = \"$pageurl[$count]\";\n"); fputs($datei, "\$text[] = \"$text[$count]\";\n"); fputs($datei, "\$datum[] = \"$datum[$count]\";\n"); $count++; if($count == $max) { break; } } echo "thanks for your entry, $newname!\n\n\n";
echo "";
echo "--> back";
include("./config/gb_foot.inc");
exit;
}
// die form [html]:
//js einblenden, wenn code an:
if ($code == "on")
{
echo "\n";
}
echo <<
bold ::
italic ::
image ::
link ::
email ::
END_HTML;
}
//footer einfügen:
include("./config/gb_foot.inc");
echo "
these (*) fields are required
END_HTML;
// UBC umwandeln
if ($code == "on")
{
// codebuttons:
echo <<