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 "User Blocked! You cannot receive message from this user";
46 header('Location: '.$_SERVER['REQUEST_URI']);
48 echo "Error! Cannot Block User!";
51 if (isset($_POST['ublock'])) {
52 $block = $inbox->UnblockUser($user,$kausap);
54 echo "User Unblocked! You can now receive message from this user";
55 header('Location: '.$_SERVER['REQUEST_URI']);
57 echo "Error! Cannot Unblock User!";
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">
68 Are you sure you want to block this user?
69 <input type
="submit" class="btn btn-default btn-sm" name
="block" value
="Yes"> 
; 
;
70 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('block_user').style.display='none';" value
="Cancel">
73 <div id
="ublock_user" style
="display:none" class="alert alert-warning">
75 Are you sure you want to unblock this user?
76 <input type
="submit" class="btn btn-default btn-sm" name
="ublock" value
="Yes"> 
; 
;
77 <input type
="button" class="btn btn-default btn-sm" name
="cancel" onclick
="document.getElementById('ublock_user').style.display='none';" value
="Cancel">
82 echo "<input type=\"button\" class=\"btn btn-danger btn-xs\" name=\"block\" onclick=\"document.getElementById('block_user').style.display='block';\" value=\"Block User\"><small>";
84 echo "<input type=\"button\" class=\"btn btn-danger btn-xs\" name=\"ublock\" onclick=\"document.getElementById('ublock_user').style.display='block';\" value=\"Unblock User\">";
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';