emoties via pop-up
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<?
session_start();
if(session_is_registered('memberid')){
require("config.php");
// Verwijder deze comment en de onderstaande regel als je een eigen stylesheet gebruikt...
echo "<link rel=\"stylesheet\" content=\"text/css\" href=\"style.css\">";
?>
<script language="javascript">
function verwijder(bericht, url)
{
if(confirm(bericht)) location.href = url;
}
function icon(theicon)
{
document.formulier.bericht.value += ""+theicon;
document.formulier.bericht.focus();
}
</script>
<?
if(!$new AND !$send AND !$id AND !$deleteall AND !$delete AND !$block AND !$saveblock AND !$reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' ORDER BY id DESC");
$result = mysql_num_rows($query);
if(!$result){
echo "<b>Geen privé- berichten in je inbox...</b><br><br>";
}
else{
?>
<b><? echo $result ?> priv- berichten in je inbox...</b><hr>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="75%"">
<tr>
<td width="5%"><b>Gelezen</b></td>
<td width="10%"><b>Auteur</b></td>
<td width="10%"><b>Onderwerp</b></td>
<td width="10%"><b>Datum</b></td>
</tr>
<?
while($object = mysql_fetch_object($query)){
?>
<tr>
<td width="5%"><? if($object->gelezen){ echo "Ja"; } else{ echo "Nee"; } ?></td>
<td width="10%"><?
$fuck = mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");
while($you = mysql_fetch_object($fuck)){
$auteur = $you->naam;
}
echo $auteur;
?></td>
<td width="10%"><a href="?id=<? echo $object->id ?>"><? echo $object->onderwerp ?></a></td>
<td width="10%"><? echo $object->datum ?></td>
</tr>
<?
}
echo "</table><hr>";
}
?>
<img src="img/new.gif"> <a href="?new=1">Nieuw bericht</a><br>
<img src="img/delete.gif"> <a href="javascript:verwijder('Weet je zeker dat je alle berichten in je inbox wilt verwijderen?','?deleteall=1')">Verwijder alle berichten</a><br>
<img src="img/block.gif"> <a href="?block=1">Blokkeer members</a>
<?
}
if($new){
if($reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$reply'");
while($object = mysql_fetch_object($query)){
$object->onderwerp = str_replace("Re: ", "", $object->onderwerp);
$titel = "Re: $object->onderwerp";
$naar = $object->van;
}
}
?>
Stel hier een nieuw bericht op dat je vervolgens naar een member wilt gaan zenden...<br><br>
<form method="POST" action="?send=1" name=formulier>
Member ID: <input type="text" name="naar" size="5" value="<? echo $naar ?>"> ( <a href="profiel.php">Zoek member ID</a> )<br>
Onderwerp: <input type="text" name="onderwerp" size="20" maxlength="100" value="<? echo $titel ?>"><br>
<input type="button" style="font-weight: bold; width: 30px" value="B" onclick="javascript:icon('[b][/b] ')">
<input type="button" style="font-style: italic; width: 30px" value="I " onclick="javascript:icon('[i][/i] ')">
<input type="button" style="text-decoraton: underline; width: 30px" value="U" onclick="javascript:icon('[u][/u] ')">
<input type="button" style="color: #0000FF" value="Color" onclick="javascript:icon('[color="#FF9900"][/color] ')">
<input type="button" style="font-family: Courier New" value="Code" onclick="javascript:icon(' ')"><br>
<textarea rows="7" name="bericht" cols="40"></textarea><br>
<a href="javascript:icon(';-)')"><img border="0" src="img/smiles/wink.gif"></a><a href="javascript:icon(':-|')"><img border="0" src="img/smiles/unsure.gif"></a><a href="javascript:icon(':-P')"><img border="0" src="img/smiles/tongue.gif"></a><a href="javascript:icon(':-)')"><img border="0" src="img/smiles/smile.gif"></a><a href="javascript:icon(':(')"><img border="0" src="img/smiles/sad.gif"></a><a href="javascript:icon('%-)')"><img border="0" src="img/smiles/rolleyes.gif"></a><a href="javascript:icon('|8|')"><img border="0" src="img/smiles/ph34r.gif"></a><a href="javascript:icon(':-O')"><img border="0" src="img/smiles/ohmy.gif"></a><a href="javascript:icon(':-@')"><img border="0" src="img/smiles/mad.gif"></a><a href="javascript:icon(':-]')"><img border="0" src="img/smiles/laugh.gif"></a><a href="javascript:icon(':-?')"><img border="0" src="img/smiles/huh.gif"></a><a href="javascript:icon(':-\\')"><img border="0" src="img/smiles/dry.gif"></a><a href="javascript:icon('8)')"><img border="0" src="img/smiles/cool.gif"></a><a href="javascript:icon('8-/')"><img border="0" src="img/smiles/blink.gif"></a><a href="javascript:icon(':-D')"><img border="0" src="img/smiles/biggrin.gif"></a><br>
<input type="submit" value="Verstuur"> <input type="reset" value="Wis velden"></p>
</form>
<?
}
if($send){
if(!$naar || !$onderwerp || !$bericht){
echo "Alle velden dienen ingevuld te zijn...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query)){
$ikblock = $object->blockpm;
$error = $object->pm;
$geblokkeerd = $object->blockpm;
}
if(strstr($ikblock,$naar)){
echo "De member waar je dit bericht naartoe wilt sturen heb je zelf geblokkeerd ...";
}
else{
if(strstr($geblokkeerd,$memberid)){
echo "Deze member heeft je geblokkeerd qua sturen van privé- berichten...";
}
else{
if(!$error){
echo "Deze member heeft niet ingesteld dat hij/zij privé- berichten wil ontvangen, daarom is je bericht niet verzonden";
}
else{
if(!$result){
echo "De ID die je hebt ingevuld waar dit privé- bericht naar toe moet bestaat niet, probeer het nog eens...";
}
if($result){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$naar'");
$result = mysql_num_rows($query);
if($result > $maxpm-1){
echo "Deze member heeft het limiet van $maxpm privé- berichten overschreden, daarom kan dit privé- bericht niet verzonden
worden. Onze excuses voor dit ongemak.";
}
else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$naar'");
while($object = mysql_fetch_object($query)){
$naar = $object->memberid;
$naarnaam = $object->naam;
$privmsg = $object->pm;
}
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$van = $object->memberid;
}
$datum = date("d-m-Y \o\m\ H:i:s");
if($privmsg){
$query = mysql_query("INSERT INTO priveberichten (onderwerp,van,naar,datum,bericht,ip,gelezen) VALUES ('$onderwerp','$van','$naar','$datum','$bericht','$REMOTE_ADDR','0')") or die (mysql_error());
echo "Je bericht is succesvol verzonden naar <b>$naarnaam</b>";
}
else{
echo "Deze member heeft deze functie uitgeschakeld en/of deze member bestaat niet...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
}
}
}
}
}
}
}
if($id){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' AND id = '$id'");
$result = mysql_num_rows($query);
if(!$result){
echo "Dit bericht bestaat niet...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
else{
mysql_query("UPDATE priveberichten SET gelezen = '1' WHERE id = '$id'");
while($object = mysql_fetch_object($query)){
$hopla = mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");
while($kee = mysql_fetch_object($hopla)){
$a = $kee->naam;
}
$aap = mysql_query("SELECT * FROM members WHERE memberid = '$object->naar'");
while($noot = mysql_fetch_object($aap)){
$b = $noot->naam;
}
?>
<b>Van:</b> <a href="profiel.php?mid=<? echo $object->van ?>"><? echo $a ?></a><br>
<b>Naar:</b> <? echo $b ?><br>
<b>Verzonden:</b> <? echo $object->datum ?><hr style="width: 50%" align="left">
<?
$bericht = $object->bericht;
$bericht = htmlspecialchars($bericht);
$bericht = nl2br($bericht);
$bericht = str_replace("\n","<br>",$bericht);
$bericht = str_replace(" "," ",$bericht);
$bericht = str_replace(":]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":-]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":-)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":-D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(";)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(";-)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(":O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace(":-(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace("8)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace("8-)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace(":\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace("%)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace("%-)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace(":@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":-|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace(":-?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace("|8|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("|8-|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("8/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = str_replace("8-/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $bericht);
$bericht = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $bericht);
$bericht = preg_replace("#\[center\](.*?)\[/center\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[hr\]#si","<hr style=\"width: 50%\" align=\"left\">", $bericht);
$bericht = preg_replace("#\[code\](.*?)\[/code\]#si","<font style=\"font-family: Courier New\">\\1</font>", $bericht);
$bericht = eregi_replace("([a-zA-Z0-9_-]+)@([a-zA-Z0-9\._-]+)(\.[a-zA-Z]+)", "<a href=\"mailto:\\1@\\2\\3\">\\1@\\2\\3</a>", $bericht);
$bericht = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>",$bericht);
$bericht = preg_replace("#\[img="(.*?)"\]#si","<img src=\"http://\\1\">", $bericht);
$bericht = preg_replace("#\[color="(.*?)"](.*?)\[/color\]#si","<font color=\"\\1\">\\2</font>", $bericht);
echo $bericht;
?><hr style="width: 50%" align="left">
> <a href="?new=1">Nieuw bericht</a><br>
> <a href="?new=1&reply=<? echo $object->id ?>">Reageer</a><br>
> <a href="javascript:verwijder('Weet je zeker dat je dit bericht wilt verwijderen?','?delete=<? echo $object->id ?>')">Verwijder</a><br>
<?
}
}
}
if($deleteall){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid'");
$result = mysql_num_rows($query);
if(!$result){
echo "Er zijn geen berichten gevonden om te verwijderen dus is je hele inbox al leeg...<br>\n<br>\n<a href=\"priveberichten.php\">Terug naar je inbox</a>";
}
if($result){
$query = mysql_query("DELETE FROM priveberichten WHERE naar = '$memberid'");
$query = mysql_query("REPAIR TABLE priveberichten");
echo "Al je privé- berichten zijn nu verwijderd...";
}
}
if($block){
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$geblokkeerd = $object->blockpm;
}
?>
Hier kun je instellen van welke members je geen priv- berichten wilt ontvangen, zet elke ID van een member op een nieuwe regel ( <a href="profiel.php">Zoek memberID</a> )<br>
<form method="POST" action="?saveblock=1">
<center><textarea name="blockdeze" rows="8"><? echo htmlspecialchars($geblokkeerd); ?></textarea><br>
<input class="button" type="submit" value="Opslaan"></center>
</form>
<?
}
if($saveblock){
$query = mysql_query("UPDATE members SET blockpm = '$blockdeze' WHERE memberid = '$memberid'") or die (mysql_error());
echo "Gegevens zijn succesvol opgeslagen...";
}
if($delete){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$delete'");
$result = mysql_num_rows($query);
if(!$result){
echo "Dit bericht bestaat niet...";
}
else{
mysql_query("DELETE FROM priveberichten WHERE id = '$delete' AND naar = '$memberid'") or die(mysql_error());
echo "Bericht succesvol verwijderd...<br><br><a href=\"priveberichten.php\">Naar je inbox</a>";
}
}
}
else{
echo "Om privé-berichten te kunnen versturen moet je ingelogd zijn...<br><br><a href=\"login.php\">Login</a>";
}
?>
session_start();
if(session_is_registered('memberid')){
require("config.php");
// Verwijder deze comment en de onderstaande regel als je een eigen stylesheet gebruikt...
echo "<link rel=\"stylesheet\" content=\"text/css\" href=\"style.css\">";
?>
<script language="javascript">
function verwijder(bericht, url)
{
if(confirm(bericht)) location.href = url;
}
function icon(theicon)
{
document.formulier.bericht.value += ""+theicon;
document.formulier.bericht.focus();
}
</script>
<?
if(!$new AND !$send AND !$id AND !$deleteall AND !$delete AND !$block AND !$saveblock AND !$reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' ORDER BY id DESC");
$result = mysql_num_rows($query);
if(!$result){
echo "<b>Geen privé- berichten in je inbox...</b><br><br>";
}
else{
?>
<b><? echo $result ?> priv- berichten in je inbox...</b><hr>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="75%"">
<tr>
<td width="5%"><b>Gelezen</b></td>
<td width="10%"><b>Auteur</b></td>
<td width="10%"><b>Onderwerp</b></td>
<td width="10%"><b>Datum</b></td>
</tr>
<?
while($object = mysql_fetch_object($query)){
?>
<tr>
<td width="5%"><? if($object->gelezen){ echo "Ja"; } else{ echo "Nee"; } ?></td>
<td width="10%"><?
$fuck = mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");
while($you = mysql_fetch_object($fuck)){
$auteur = $you->naam;
}
echo $auteur;
?></td>
<td width="10%"><a href="?id=<? echo $object->id ?>"><? echo $object->onderwerp ?></a></td>
<td width="10%"><? echo $object->datum ?></td>
</tr>
<?
}
echo "</table><hr>";
}
?>
<img src="img/new.gif"> <a href="?new=1">Nieuw bericht</a><br>
<img src="img/delete.gif"> <a href="javascript:verwijder('Weet je zeker dat je alle berichten in je inbox wilt verwijderen?','?deleteall=1')">Verwijder alle berichten</a><br>
<img src="img/block.gif"> <a href="?block=1">Blokkeer members</a>
<?
}
if($new){
if($reply){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$reply'");
while($object = mysql_fetch_object($query)){
$object->onderwerp = str_replace("Re: ", "", $object->onderwerp);
$titel = "Re: $object->onderwerp";
$naar = $object->van;
}
}
?>
Stel hier een nieuw bericht op dat je vervolgens naar een member wilt gaan zenden...<br><br>
<form method="POST" action="?send=1" name=formulier>
Member ID: <input type="text" name="naar" size="5" value="<? echo $naar ?>"> ( <a href="profiel.php">Zoek member ID</a> )<br>
Onderwerp: <input type="text" name="onderwerp" size="20" maxlength="100" value="<? echo $titel ?>"><br>
<input type="button" style="font-weight: bold; width: 30px" value="B" onclick="javascript:icon('[b][/b] ')">
<input type="button" style="font-style: italic; width: 30px" value="I " onclick="javascript:icon('[i][/i] ')">
<input type="button" style="text-decoraton: underline; width: 30px" value="U" onclick="javascript:icon('[u][/u] ')">
<input type="button" style="color: #0000FF" value="Color" onclick="javascript:icon('[color="#FF9900"][/color] ')">
<input type="button" style="font-family: Courier New" value="Code" onclick="javascript:icon(' ')"><br>
<textarea rows="7" name="bericht" cols="40"></textarea><br>
<a href="javascript:icon(';-)')"><img border="0" src="img/smiles/wink.gif"></a><a href="javascript:icon(':-|')"><img border="0" src="img/smiles/unsure.gif"></a><a href="javascript:icon(':-P')"><img border="0" src="img/smiles/tongue.gif"></a><a href="javascript:icon(':-)')"><img border="0" src="img/smiles/smile.gif"></a><a href="javascript:icon(':(')"><img border="0" src="img/smiles/sad.gif"></a><a href="javascript:icon('%-)')"><img border="0" src="img/smiles/rolleyes.gif"></a><a href="javascript:icon('|8|')"><img border="0" src="img/smiles/ph34r.gif"></a><a href="javascript:icon(':-O')"><img border="0" src="img/smiles/ohmy.gif"></a><a href="javascript:icon(':-@')"><img border="0" src="img/smiles/mad.gif"></a><a href="javascript:icon(':-]')"><img border="0" src="img/smiles/laugh.gif"></a><a href="javascript:icon(':-?')"><img border="0" src="img/smiles/huh.gif"></a><a href="javascript:icon(':-\\')"><img border="0" src="img/smiles/dry.gif"></a><a href="javascript:icon('8)')"><img border="0" src="img/smiles/cool.gif"></a><a href="javascript:icon('8-/')"><img border="0" src="img/smiles/blink.gif"></a><a href="javascript:icon(':-D')"><img border="0" src="img/smiles/biggrin.gif"></a><br>
<input type="submit" value="Verstuur"> <input type="reset" value="Wis velden"></p>
</form>
<?
}
if($send){
if(!$naar || !$onderwerp || !$bericht){
echo "Alle velden dienen ingevuld te zijn...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
$result = mysql_num_rows($query);
while($object = mysql_fetch_object($query)){
$ikblock = $object->blockpm;
$error = $object->pm;
$geblokkeerd = $object->blockpm;
}
if(strstr($ikblock,$naar)){
echo "De member waar je dit bericht naartoe wilt sturen heb je zelf geblokkeerd ...";
}
else{
if(strstr($geblokkeerd,$memberid)){
echo "Deze member heeft je geblokkeerd qua sturen van privé- berichten...";
}
else{
if(!$error){
echo "Deze member heeft niet ingesteld dat hij/zij privé- berichten wil ontvangen, daarom is je bericht niet verzonden";
}
else{
if(!$result){
echo "De ID die je hebt ingevuld waar dit privé- bericht naar toe moet bestaat niet, probeer het nog eens...";
}
if($result){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$naar'");
$result = mysql_num_rows($query);
if($result > $maxpm-1){
echo "Deze member heeft het limiet van $maxpm privé- berichten overschreden, daarom kan dit privé- bericht niet verzonden
worden. Onze excuses voor dit ongemak.";
}
else{
$query = mysql_query("SELECT * FROM members WHERE memberid = '$naar'");
while($object = mysql_fetch_object($query)){
$naar = $object->memberid;
$naarnaam = $object->naam;
$privmsg = $object->pm;
}
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$van = $object->memberid;
}
$datum = date("d-m-Y \o\m\ H:i:s");
if($privmsg){
$query = mysql_query("INSERT INTO priveberichten (onderwerp,van,naar,datum,bericht,ip,gelezen) VALUES ('$onderwerp','$van','$naar','$datum','$bericht','$REMOTE_ADDR','0')") or die (mysql_error());
echo "Je bericht is succesvol verzonden naar <b>$naarnaam</b>";
}
else{
echo "Deze member heeft deze functie uitgeschakeld en/of deze member bestaat niet...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
}
}
}
}
}
}
}
if($id){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid' AND id = '$id'");
$result = mysql_num_rows($query);
if(!$result){
echo "Dit bericht bestaat niet...<br><br><a href=\"javascript:history.go(-1)\">Ga terug</a>";
}
else{
mysql_query("UPDATE priveberichten SET gelezen = '1' WHERE id = '$id'");
while($object = mysql_fetch_object($query)){
$hopla = mysql_query("SELECT * FROM members WHERE memberid = '$object->van'");
while($kee = mysql_fetch_object($hopla)){
$a = $kee->naam;
}
$aap = mysql_query("SELECT * FROM members WHERE memberid = '$object->naar'");
while($noot = mysql_fetch_object($aap)){
$b = $noot->naam;
}
?>
<b>Van:</b> <a href="profiel.php?mid=<? echo $object->van ?>"><? echo $a ?></a><br>
<b>Naar:</b> <? echo $b ?><br>
<b>Verzonden:</b> <? echo $object->datum ?><hr style="width: 50%" align="left">
<?
$bericht = $object->bericht;
$bericht = htmlspecialchars($bericht);
$bericht = nl2br($bericht);
$bericht = str_replace("\n","<br>",$bericht);
$bericht = str_replace(" "," ",$bericht);
$bericht = str_replace(":]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":-]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":-)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":-D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(";)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(";-)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(":O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace(":-(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace("8)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace("8-)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace(":\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace("%)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace("%-)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace(":@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":-|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace(":-?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace("|8|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("|8-|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("8/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = str_replace("8-/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $bericht);
$bericht = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $bericht);
$bericht = preg_replace("#\[center\](.*?)\[/center\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[hr\]#si","<hr style=\"width: 50%\" align=\"left\">", $bericht);
$bericht = preg_replace("#\[code\](.*?)\[/code\]#si","<font style=\"font-family: Courier New\">\\1</font>", $bericht);
$bericht = eregi_replace("([a-zA-Z0-9_-]+)@([a-zA-Z0-9\._-]+)(\.[a-zA-Z]+)", "<a href=\"mailto:\\1@\\2\\3\">\\1@\\2\\3</a>", $bericht);
$bericht = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>",$bericht);
$bericht = preg_replace("#\[img="(.*?)"\]#si","<img src=\"http://\\1\">", $bericht);
$bericht = preg_replace("#\[color="(.*?)"](.*?)\[/color\]#si","<font color=\"\\1\">\\2</font>", $bericht);
echo $bericht;
?><hr style="width: 50%" align="left">
> <a href="?new=1">Nieuw bericht</a><br>
> <a href="?new=1&reply=<? echo $object->id ?>">Reageer</a><br>
> <a href="javascript:verwijder('Weet je zeker dat je dit bericht wilt verwijderen?','?delete=<? echo $object->id ?>')">Verwijder</a><br>
<?
}
}
}
if($deleteall){
$query = mysql_query("SELECT * FROM priveberichten WHERE naar = '$memberid'");
$result = mysql_num_rows($query);
if(!$result){
echo "Er zijn geen berichten gevonden om te verwijderen dus is je hele inbox al leeg...<br>\n<br>\n<a href=\"priveberichten.php\">Terug naar je inbox</a>";
}
if($result){
$query = mysql_query("DELETE FROM priveberichten WHERE naar = '$memberid'");
$query = mysql_query("REPAIR TABLE priveberichten");
echo "Al je privé- berichten zijn nu verwijderd...";
}
}
if($block){
$query = mysql_query("SELECT * FROM members WHERE memberid = '$memberid'");
while($object = mysql_fetch_object($query)){
$geblokkeerd = $object->blockpm;
}
?>
Hier kun je instellen van welke members je geen priv- berichten wilt ontvangen, zet elke ID van een member op een nieuwe regel ( <a href="profiel.php">Zoek memberID</a> )<br>
<form method="POST" action="?saveblock=1">
<center><textarea name="blockdeze" rows="8"><? echo htmlspecialchars($geblokkeerd); ?></textarea><br>
<input class="button" type="submit" value="Opslaan"></center>
</form>
<?
}
if($saveblock){
$query = mysql_query("UPDATE members SET blockpm = '$blockdeze' WHERE memberid = '$memberid'") or die (mysql_error());
echo "Gegevens zijn succesvol opgeslagen...";
}
if($delete){
$query = mysql_query("SELECT * FROM priveberichten WHERE id = '$delete'");
$result = mysql_num_rows($query);
if(!$result){
echo "Dit bericht bestaat niet...";
}
else{
mysql_query("DELETE FROM priveberichten WHERE id = '$delete' AND naar = '$memberid'") or die(mysql_error());
echo "Bericht succesvol verwijderd...<br><br><a href=\"priveberichten.php\">Naar je inbox</a>";
}
}
}
else{
echo "Om privé-berichten te kunnen versturen moet je ingelogd zijn...<br><br><a href=\"login.php\">Login</a>";
}
?>
Gewijzigd op 01/01/1970 01:00:00 door Nick
@nick , same problem als je andere topics, waar je nog niets mee gedaan hebt aan dit script te zien. tis nog steeds allemaal achterhaald en oud en onaangepast