2 include('encrypt.php');
3 require 'include/header.php';
5 $uid = $inbox->GetID($_COOKIE['DMDM'],$id_mail_path);
6 $user = $inbox->FindUser($uid,$id_mail_path);
8 $d = strip_tags(addslashes(trim($_GET['d'])));
9 $messages = $inbox->specificMDB($user, $d, FALSE);
10 $senderCounter = $inbox->specificMDB($user, $d, TRUE);
11 $file = $_SESSION['sLoggedDir'].$d.".dat";
12 $value = $inbox->getContent2($_SESSION['sLoggedDir'].$d.".dat");
14 $ff = $inbox->within_str(max($value), "<read>", "</read>");
16 if ($uid <> trim($inbox->within_str($senderCounter, "<from>", "</from>"))) {
17 $kausap = trim($inbox->within_str($senderCounter, "<from>", "</from>"));
19 $kausap = trim($inbox->within_str($senderCounter, "<to>", "</to>"));
21 $checkifban = $inbox->CheckBanList($user,$kausap);
26 // End of set, check for user block
29 if(file_exists($file)){
31 $newLine = substr($max, 0, -15)."<read>1</read>";
32 $lastLine = count($value)-1;
33 unset($arr[$lastLine]);
34 $arr[$lastLine] = $newLine.PHP_EOL
;
35 file_put_contents($file,implode($arr));
36 header("Location: message.php?d=$d");
38 header("Location: inbox.php");
42 if (isset($_POST['block'])) {
43 $block = $inbox->BlockUser($user,$kausap);
45 echo "ユーザーがブロックされた!このユーザーからメッセージを受信することはできません";
46 header('Location: '.$_SERVER['REQUEST_URI']);
48 echo "エラー!ユーザーをブロックすることはできません!";
51 if (isset($_POST['ublock'])) {
52 $block = $inbox->UnblockUser($user,$kausap);
54 echo "ユーザーがブロックされていない!これで、このユーザーからのメッセージを受け取ることができます";
55 header('Location: '.$_SERVER['REQUEST_URI']);
57 echo "エラー!ユーザーブロックを解除することはできません!";
61 <div
class="well well-lg">
63 include "include/nav.php";
64 echo "<h4>被写体: ".urldecode($inbox->within_str($senderCounter, "<subj>", "</subj>"))."</h4>";
66 <div id
="block_user" style
="display:none" class="alert alert-warning">
69 <input type
="submit" class="btn btn-default btn-sm" name
="block" value
="はい"> 
; 
;
70 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('block_user').style.display='none';" value
="取り消す">
73 <div id
="ublock_user" style
="display:none" class="alert alert-warning">
75 あなたは、このユーザーのブロックを解除してもよろしいですか?
76 <input type
="submit" class="btn btn-default btn-sm" name
="ublock" value
="はい"> 
; 
;
77 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('ublock_user').style.display='none';" value
="取り消す">
82 echo "<input type=¥"button¥
" class=Â¥"btn btn
-danger btn
-xs¥
" name=¥"block¥
" onclick=Â¥"document
.getElementById('block_user').style
.display
='block';Â¥
" value=Âブãƒãƒƒã‚¯ãƒ¦ãƒ¼ã‚¶ãƒ¼Â¥"><small
>"
84 echo "<input type
=Â¥
"button¥" class=¥
"btn btn-danger btn-xs¥" name
=Â¥
"ublock¥" onclick
=Â¥
"document.getElementById('ublock_user').style.display='block';Â¥" value
=Âユーザーブãƒãƒƒã‚¯ã‚’解除¥
">
86 <div class="pagination panel panel
-default mdes
" id="pageMessage
">
88 // print_r($messages);
90 for ($i=0; $i < count($messages); $i++) {
91 $leftRightCounter = ($inbox->within_str($messages[$i], "<from
>", "</from
>")==$uid) ? "r mdes panel panel
-default pull
-left txt
" : "s mdes panel panel
-default pull
-right txt
";
92 echo "<div
class=¥
"".$leftRightCounter."¥">". urldecode($inbox->within_str($messages[$i], "<msg
>", "</msg
>")) . "<br
><small
class=¥
"d pull-right¥">". date("Y
-m
-d g
:i a
",urldecode($inbox->within_str($messages[$i], "<id
>", "</id
>"))) ."</small
></div
>";
93 echo "<div
class='clearfix'></div
>";
95 if ($uid <> trim($inbox->within_str($senderCounter, "<from
>", "</from
>"))) {
96 $ss = "<input type
=¥
"hidden¥" name
=¥
"zxcvbnm¥" value
=¥
"".Encrypt($uid.$inbox->within_str($senderCounter, "<from>", "</from>").$inbox->within_str($senderCounter, "<id>", "</id>"), KEY
)."¥">";
98 $ss = "<input type
=¥
"hidden¥" name
=¥
"zxcvbnm¥" value
=¥
"".Encrypt($uid.$inbox->within_str($senderCounter, "<to>", "</to>").$inbox->within_str($senderCounter, "<id>", "</id>"), KEY
)."¥">";
101 echo "<div id
=¥
"replyForm¥" style
=¥
"¥">
102 <form method
=¥
"post¥" action
=¥
"reply.php¥">".@$ss.
103 "<textarea rows
=¥
"5¥" name
=¥
"msg¥" class=¥
"form-control¥" required
></textarea
><br
>
104 <button type
=¥
"submit¥">Send
</button
>
108 // echo "Doesn
't Exist!";
109 header("Location: index.php");
112 require 'include/footer
.php
';