Gastenboek foutje
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Website = $_POST["Website"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];
$Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
$Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "", $Email);
$Website = eregi_replace($Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "", $Website);
$comments = eregi_replace('neuken', '****',$comments);
$comments = eregi_replace('kankerboeren', '****',$comments);
$comments = eregi_replace('terin', '****',$comments);
$comments = eregi_replace('kanker', '****',$comments);
$comments = eregi_replace('vagina', '****',$comments);
$comments = eregi_replace('tievus', '****',$comments);
$comments = eregi_replace('tyfus', '****',$comments);
$comments = eregi_replace('klote', '****',$comments);
$comments = eregi_replace('pik', '****',$comments);
$comments = eregi_replace('kut', '****',$comments);
$comments = eregi_replace('lul', '****',$comments);
$comments = eregi_replace('godverdomme', '@#%&^!#@!',$comments);
$comments = eregi_replace('homo', '****',$comments);
$comments = eregi_replace('flikker', '****',$comments);
$comments = eregi_replace('nicht', '****',$comments);
$comments = eregi_replace('hoer', '****',$comments);
$comments = eregi_replace('likker', '****',$comments);
$comments = eregi_replace('suck', '****',$comments);
$comments = eregi_replace('fuck', '****',$comments);
$comments = eregi_replace('slet', '****',$comments);
$comments = eregi_replace('aids', '****',$comments);
$comments = eregi_replace('nigt', '****',$comments);
$comments = eregi_replace('neuken', '****',$comments);
$comments = eregi_replace('shit', 'poep',$comments);
$comments = eregi_replace('neuke', '****',$comments);
$comments = eregi_replace('boeren', '****',$comments);
$comments = eregi_replace('hoeren', '****',$comments);
$comments = eregi_replace('nicht', '****',$comments);
$comments = eregi_replace('penis', '****',$comments);
$comments = eregi_replace('p1is', '****',$comments);
$comments = eregi_replace('boer', '****',$comments);
$comments = eregi_replace('kutwijf', '****',$comments);
$comments = eregi_replace('doos', 'lekker wijf',$comments);
$comments = eregi_replace('pisnicht', '****',$comments);
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);
if ($Submit == "Yes") {
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"Guestbook.txt");
$OldData = fread($fp, 80000);
// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
// 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
// you can use in flash - visit: http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";
/* 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,"Guestbook.txt");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
// ###################################################################################
// ######### 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,"Guestbook.txt");
$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 "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>
$Submit = $_POST["Submit"];
$Name = $_POST["Name"];
$Email = $_POST["Email"];
$Website = $_POST["Website"];
$Comments = $_POST["Comments"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];
$Name = ereg_replace("[^A-Za-z0-9 ]", "", $Name);
$Email = ereg_replace("[^A-Za-z0-9 \@\.\-\/\']", "", $Email);
$Website = eregi_replace($Website);
$Website = ereg_replace("[^A-Za-z0-9 \@\.\-\/\'\~\:]", "", $Website);
$comments = eregi_replace('neuken', '****',$comments);
$comments = eregi_replace('kankerboeren', '****',$comments);
$comments = eregi_replace('terin', '****',$comments);
$comments = eregi_replace('kanker', '****',$comments);
$comments = eregi_replace('vagina', '****',$comments);
$comments = eregi_replace('tievus', '****',$comments);
$comments = eregi_replace('tyfus', '****',$comments);
$comments = eregi_replace('klote', '****',$comments);
$comments = eregi_replace('pik', '****',$comments);
$comments = eregi_replace('kut', '****',$comments);
$comments = eregi_replace('lul', '****',$comments);
$comments = eregi_replace('godverdomme', '@#%&^!#@!',$comments);
$comments = eregi_replace('homo', '****',$comments);
$comments = eregi_replace('flikker', '****',$comments);
$comments = eregi_replace('nicht', '****',$comments);
$comments = eregi_replace('hoer', '****',$comments);
$comments = eregi_replace('likker', '****',$comments);
$comments = eregi_replace('suck', '****',$comments);
$comments = eregi_replace('fuck', '****',$comments);
$comments = eregi_replace('slet', '****',$comments);
$comments = eregi_replace('aids', '****',$comments);
$comments = eregi_replace('nigt', '****',$comments);
$comments = eregi_replace('neuken', '****',$comments);
$comments = eregi_replace('shit', 'poep',$comments);
$comments = eregi_replace('neuke', '****',$comments);
$comments = eregi_replace('boeren', '****',$comments);
$comments = eregi_replace('hoeren', '****',$comments);
$comments = eregi_replace('nicht', '****',$comments);
$comments = eregi_replace('penis', '****',$comments);
$comments = eregi_replace('p1is', '****',$comments);
$comments = eregi_replace('boer', '****',$comments);
$comments = eregi_replace('kutwijf', '****',$comments);
$comments = eregi_replace('doos', 'lekker wijf',$comments);
$comments = eregi_replace('pisnicht', '****',$comments);
$Name = stripslashes($Name);
$Email = stripslashes($Email);
$Website = stripslashes($Website);
$Comments = stripslashes($Comments);
if ($Submit == "Yes") {
$filename = "GuestBook.txt";
// Opens up the file declared above for reading
$fp = fopen( $filename,"Guestbook.txt");
$OldData = fread($fp, 80000);
// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));
// 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
// you can use in flash - visit: http://www.macromedia.com/support/flash/ts/documents/htmltext.htm
$Input = "Name: <b>$Name</b><br>Email: <b><u><a href=\"mailto:$Email\">$Email</a></u></b><br>Website: <b><u><a href=\"http://$Website\" target=\"_blank\">$Website</a></u></b><br>Comments: <b>$Comments</b><br><i><font size=\"-1\">Date: $Today</font><br><br>.:::.";
/* 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,"Guestbook.txt");
if(!$fp) die("&GuestBook=cannot write $filename ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
// ###################################################################################
// ######### 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,"Guestbook.txt");
$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 "&TotalEntries=$NumEntries&NumLow=$NumLow&NumHigh=$NumHigh";
for ($n = $NumLow; $n < $NumHigh; $n++) {
print $DataArray[$n];
if (!$DataArray[$n]) {
Print "<br><br><b>No More entries</b>";
exit;
}
}
?>
Foutmelding???
$fp = fopen( $filename,"Guestbook.txt");
De eerste keer moet de laatse parameter 'r' (string) zijn, de tweede keer 'w' (string) (al zou 'a' sneller zijn, maar dan moet je nog meer aanpassen)
bedankt voor jullie reacties maar het gastenboek werkt nog steeds niet
Wat verstaan we onder 'werkt niet'. Krijg je een fout? Een wit scherm? Een heleboel rommel?
hij zet alles in een tekst bestand maar als je naar de pagina gaat laat hij de tekst niet zien