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);
7 date_default_timezone_set("Asia/Tokyo");
9 $d = strip_tags(addslashes(trim($_GET['d'])));
10 $messages = $inbox->specificMDB($user, $d, FALSE);
11 $senderCounter = $inbox->specificMDB($user, $d, TRUE);
12 $file = $_SESSION['sLoggedDir'].$d.".dat";
13 $value = $inbox->getContent2($_SESSION['sLoggedDir'].$d.".dat");
15 $ff = $inbox->within_str(max($value), "<read>", "</read>");
17 if ($uid <> trim($inbox->within_str($senderCounter, "<from>", "</from>"))) {
18 $kausap = trim($inbox->within_str($senderCounter, "<from>", "</from>"));
20 $kausap = trim($inbox->within_str($senderCounter, "<to>", "</to>"));
22 $checkifban = $inbox->CheckBanList($user,$kausap);
27 // End of set, check for user block
30 if(file_exists($file)){
32 $newLine = substr($max, 0, -15)."<read>1</read>";
33 $lastLine = count($value)-1;
34 unset($arr[$lastLine]);
35 $arr[$lastLine] = $newLine.PHP_EOL
;
36 file_put_contents($file,implode($arr));
37 header("Location: message.php?d=$d");
39 header("Location: inbox.php");
43 if (isset($_POST['block'])) {
44 $block = $inbox->BlockUser($user,$kausap);
46 echo "ユーザーがブロックされた!このユーザーからメッセージを受信することはできません";
47 header('Location: '.$_SERVER['REQUEST_URI']);
49 echo "エラー!ユーザーをブロックすることはできません!";
52 if (isset($_POST['ublock'])) {
53 $block = $inbox->UnblockUser($user,$kausap);
55 echo "ユーザーがブロックされていない!これで、このユーザーからのメッセージを受け取ることができます";
56 header('Location: '.$_SERVER['REQUEST_URI']);
58 echo "エラー!ユーザーブロックを解除することはできません!";
62 <div
class="well well-lg">
64 include "include/nav.php";
65 echo "<h4>宛先: ".urldecode($inbox->within_str($senderCounter, "<subj>", "</subj>"))."</h4>";
67 <div id
="block_user" style
="display:none" class="alert alert-warning">
70 <input type
="submit" class="btn btn-default btn-sm" name
="block" value
="はい"> 
; 
;
71 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('block_user').style.display='none';" value
="取り消す">
74 <div id
="ublock_user" style
="display:none" class="alert alert-warning">
76 あなたは、このユーザーのブロックを解除してもよろしいですか?
77 <input type
="submit" class="btn btn-default btn-sm" name
="ublock" value
="はい"> 
; 
;
78 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('ublock_user').style.display='none';" value
="取り消す">
83 echo "<input type=¥"button¥
" class=¥"btn btn
-danger btn
-xs¥
" name=¥"block¥
" onclick=¥"document
.getElementById('block_user').style
.display
='block';¥
" value=ブロックユーザー¥"><small
>";
85 echo "<input type
=¥
"button¥" class=¥
"btn btn-danger btn-xs¥" name
=¥
"ublock¥" onclick
=¥
"document.getElementById('ublock_user').style.display='block';¥" value
=ユーザーブロックを解除¥
">";
87 <div
class="pagination panel panel-default mdes" id
="pageMessage">
89 // print_r($messages);
91 for ($i=0; $i < count($messages); $i++
) {
92 $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";
93 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>";
94 echo "<div class='clearfix'></div>";
96 if ($uid <> trim($inbox->within_str($senderCounter, "<from>", "</from>"))) {
97 $ss = "<input type=¥"hidden¥
" name=¥"zxcvbnm¥
" value=¥"".Encrypt($uid.$inbox->within_str($senderCounter, "<from
>", "</from
>").$inbox->within_str($senderCounter, "<id
>", "</id
>"), KEY)."¥
">";
99 $ss = "<input type=¥"hidden¥
" name=¥"zxcvbnm¥
" value=¥"".Encrypt($uid.$inbox->within_str($senderCounter, "<to
>", "</to
>").$inbox->within_str($senderCounter, "<id
>", "</id
>"), KEY)."¥
">";
102 echo "<div id=¥"replyForm¥
" style=¥"¥
">
103 <form method=¥"post¥
" action=¥"reply
.php¥
">".@$ss.
104 "<textarea rows=¥"5¥
" name=¥"msg¥
" class=¥"form
-control¥
" required></textarea><br>
105 <button type=¥"submit¥
">Send</button>
109 // echo "Doesn't Exist!";
110 header("Location: index.php");
113 require 'include/footer.php';