3 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
4 header('location:index.php');
7 include('encrypt.php');
9 $id = strip_tags(addslashes(trim($_POST['zxcvbnm'])));
10 $subj = addslashes(trim($_POST['subj']));
11 $inf = addslashes(trim($_POST['msg']));
13 $message = new Message
;
14 $subj = $message->BeSanitize($subj);
15 $sanitize = $message->BeSanitize($inf);
17 if ($sanitize<>false) {
18 $user = $message->FindUser($id,$id_mail_path);
19 $sender = $message->GetID($_COOKIE['DMDM'],$id_mail_path);
20 $ckp = $message->CheckPostLimit($sender,$plimit_path,TRUE);
21 if (($ckp >= 60) && ($ckp != false)) {
22 echo "Post limit reached, Please wait for next minute";
25 $ckp = $message->CheckPostLimit($sender,$plimit_hpath,FALSE);
26 if (($ckp >= 600) && ($ckp != false)) {
27 echo "Post limit reached, Please wait for next hour";
30 $write = $message->WriteMDB($user,$sanitize,$sender,$subj,$id);
33 $message->AddPostLimit($sender,$plimit_path,TRUE);
34 $message->AddPostLimit($sender,$plimit_hpath,FALSE);
37 echo "Error, please try again later";
40 echo "Content too long!";