Initial commit
[2ch-be.git] / dev-test / message_procbck.php
blobe4ee4ff42f6967ed254a106307f44f9d77ae85ef
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="Shift_JIS">
5 </head>
6 <body>
7 <?php
9 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
10 header('location:index.php');
11 exit;
13 include('encrypt.php');
15 $id = strip_tags(addslashes(trim($_POST['zxcvbnm'])));
16 $subj = trim($_POST['subj']);
17 $inf = trim($_POST['msg']);
19 $message = new Message;
20 $subj = $message->BeSanitize($subj);
21 $sanitize = $message->BeSanitize($inf);
23 if ($sanitize<>false) {
24 $user = $message->FindUser($id,$id_mail_path);
25 $sender = $message->GetID($_COOKIE['DMDM'],$id_mail_path);
26 if($message->CheckBanMessaging()) {
27 echo "ƒ�ƒbƒZ�[ƒW‚ð‘—�M‚·‚邱‚Æ‚Í‚Å‚«‚Ü‚¹‚ñ�A’á‚·‚¬‚é‚Ì“_BE";
28 exit;
30 $ckp = $message->CheckPostLimit($sender,$plimit_path,TRUE);
31 if (($ckp >= 60) && ($ckp != false)) {
32 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì•ª‚¨‘Ò‚¿‚­‚¾‚³‚¢";
33 exit;
35 $ckp = $message->CheckPostLimit($sender,$plimit_hpath,FALSE);
36 if (($ckp >= 600) && ($ckp != false)) {
37 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì1ŽžŠÔ‚¨‘Ò‚¿‚­‚¾‚³‚¢";
38 exit;
40 $write = $message->WriteMDB($user,$sanitize,$sender,$subj,$id);
42 if ($write) {
43 $message->AddPostLimit($sender,$plimit_path,TRUE);
44 $message->AddPostLimit($sender,$plimit_hpath,FALSE);
45 echo "�³�í‚É‘—�M‚³‚ꂽƒ�ƒbƒZ�[ƒW";
46 $_SESSION['alert'] = "<div class=\"alert alert-success\">�³�í‚É‘—�M‚³‚ꂽƒ�ƒbƒZ�[</div>";
47 header('Location:test/p.php?i='.$id);
48 } else {
49 echo "ƒGƒ‰�[�AŒã‚Å‚à‚¤ˆê“x‚¨ŽŽ‚µ‚­‚¾‚³‚¢";
50 $_SESSION['alert'] = "<div class=\"alert alert-danger\">ƒ�ƒbƒZ�[ƒW‚Í‘—�M‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½</div>";
51 header('Location:test/p.php?i='.$id);
53 } else {
54 echo "’·‚·‚¬‚éƒRƒ“ƒeƒ“ƒc";
58 </body>
59 </html>