login}'"); /* ------------------------- */ ?> [( Criminals )] "> Mobieltje == 1) { if($_GET['p'] == "inbox") { print << ENDHTML; print " \n"; } else if($_GET['p'] == "outbox") { print << ENDHTML; print " \n"; } else if($_GET['p'] == "read" && is_numeric($_GET['id'])) { $dbres = mysql_query("SELECT *,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[messages]` WHERE `id`='{$_GET['id']}' AND (`to`='{$data->login}' OR `from`='{$data->login}')"); if($message = mysql_fetch_object($dbres)) { if($message->to == $data->login) mysql_query("UPDATE `[messages]` SET `read`=1 WHERE `id`='{$_GET['id']}'"); $message->message = preg_replace('/(http:\/\/\S+)/','$1',$message->message); $message->message = preg_replace('/\n/',"
\n",$message->message); print <<
Inbox
- Inbox
- Outbox
- Nieuw bericht
- Block list
\n"; print " \n"; $dbres = mysql_query("SELECT *,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[messages]` WHERE `to`='{$data->login}' AND `read`=0 AND `inbox`=1 ORDER BY `time` DESC"); while($message = mysql_fetch_object($dbres)) { if(preg_match('/^\s*$/',$message->subject)) $message->subject = "(Geen)"; print " \n"; } $dbres = mysql_query("SELECT *,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[messages]` WHERE `to`='{$data->login}' AND `read`=1 AND `inbox`=1 ORDER BY `time` DESC"); while($message = mysql_fetch_object($dbres)) { if(preg_match('/^\s*$/',$message->subject)) $message->subject = "(Geen)"; print " \n"; } print "
Van: Onderwerp: Datum:
id}\"> from}\">{$message->from} id}\">{$message->subject} {$message->time}
id}\"> from}\">{$message->from} id}\">{$message->subject} {$message->time}
Outbox
- Inbox
- Outbox
- Nieuw bericht
- Block list
\n"; print " \n"; $dbres = mysql_query("SELECT *,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[messages]` WHERE `from`='{$data->login}' AND `outbox`=1 ORDER BY `time` DESC"); while($message = mysql_fetch_object($dbres)) { if(preg_match('/^\s*$/',$message->subject)) $message->subject = "(Geen)"; if($message->read == 1) print " \n"; else print " \n"; } print "
Naar: Onderwerp: Datum:
id}\"> to}\">{$message->to} id}\">{$message->subject} {$message->time}
id}\"> to}\">{$message->to} id}\">{$message->subject} {$message->time}
Bericht
Van: {$message->from}
Naar: {$message->to}
Onderwerp: {$message->subject}
{$message->message}
ENDHTML; if($message->from != $data->login) print " "; else print " "; print "\n"; } } else if($_GET['p'] == "del") { if(isset($_GET['id'])) $_POST['id'] = $_GET['id']; foreach($_POST['id'] as $msgid) { $dbres = mysql_query("SELECT `outbox`,`inbox`,`from`,`to` FROM `[messages]` WHERE `id`='$msgid' AND (`from`='{$data->login}' OR `to`='{$data->login}')"); if($message = mysql_fetch_object($dbres)) { if($message->from == $data->login) mysql_query("UPDATE `[messages]` SET `outbox`=0 WHERE `id`='$msgid'"); else mysql_query("UPDATE `[messages]` SET `inbox`=0 WHERE `id`='$msgid'"); } } print << ENDHTML; } else if($_GET['p'] == "block") { print << ENDHTML; if(isset($_POST['update_list'])) { $newlist = ""; if(isset($_POST['blocklist'])) { foreach($_POST['blocklist'] as $blocked) { if($info = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$blocked}'"))) { $newlist = preg_replace("/,{$info->login},/i",'',$newlist); $newlist .= ",{$info->login},"; } } } mysql_query("UPDATE `[users]` SET `blocklist`='$newlist' WHERE `login`='{$data->login}'"); print " "; $blocklist = $newlist; } else { $dbres = mysql_query("SELECT `blocklist` FROM `[users]` WHERE `login`='{$data->login}'"); $blocklist = mysql_fetch_object($dbres); $blocklist = $blocklist->blocklist; } if(isset($_GET['add'])) { $dbres = mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_GET['add']}'"); if($sender = mysql_fetch_object($dbres)) { $blocklist = preg_replace("/,{$sender->login},/i",'',$blocklist); $blocklist .= ",{$sender->login},"; mysql_query("UPDATE `[users]` SET `blocklist`='$blocklist' WHERE `login`='{$data->login}'"); print " \n"; } } print <<\n"; } else if($_GET['p'] == "new") { print << ENDHTML; if(isset($_POST['to'],$_POST['message'])) { if(strtolower($_POST['to']) != strtolower($data->login)) { $dbres = mysql_query("SELECT `login`,`Mobieltje`,`blocklist` FROM `[users]` WHERE `login`='{$_POST['to']}'"); $info = mysql_fetch_object($dbres); if($info == false) print " \n"; else if($info->Mobieltje == 0) print " \n"; else if(preg_match("/,{$data->login},/i",$info->blocklist)) print " \n"; else { $_POST['subject'] = preg_replace('/login}','{$recp->login}','{$_POST['subject']}','{$_POST['message']}')"); mysql_query("DELETE FROM `[temp]` WHERE `id`='{$_POST['id']}' AND `code`='{$_POST['code']}' AND `area`='message'"); print " \n"; } } } else print " \n"; } $_REQUEST['message'] = stripslashes($_REQUEST['message']); print <<
from}\">Block from}&subject=". urlencode("Re: {$message->subject}") ."\">Antwoord
id}\">Delete
Berichten
- Inbox
- Outbox
- Nieuw bericht
- Block list
Bericht(en) verwijderd
Block list
- Inbox
- Outbox
- Nieuw bericht
- Block list
De block list is geupdate
{$sender->login} is geblokt
\n \n \n

Altijd opslaan wanneer je iemand hebt geblockt/unblockt
Nieuw bericht
- Inbox
- Outbox
- Nieuw bericht
- Block list
'{$_POST['to']}' bestaat niet
{$info->login} heeft geen mobiel
{$info->login} heeft je geblockt
Bericht verzonden
Je kan geen bericht naar jezelf sturen
ENDHTML; } else { print << ENDHTML; } } else print " \n"; /* ------------------------- */ ?>
Naar:
Onderwerp:
Bericht:

Secret link
ENDHTML; if($data->clanlevel > 0) print " Clan link\n"; print <<
Berichten
- Inbox
- Outbox
- Nieuw bericht
- Block list
Je moet een mobiel hebben om berichten te kunnen versturen/ontvangen