Initial commit
[2ch-be.git] / dev-test / bak / message2.php.bak
blob805e15f1c96765a720f41dd7b0c45da50b729fc7
1 <?php
2 include('encrypt.php');
3 require 'include/header.php';
4 $inbox = new Message;
5 $uid   = $inbox->GetID($_COOKIE['DMDM'],$id_mail_path);
6 $user  = $inbox->FindUser($uid,$id_mail_path);
7 if ($user<>false) {
8         $d = strip_tags(addslashes(trim($_GET['d'])));
9         $messages = $inbox->specificMDB($user, $d);
10         if ($messages == NULL) {
11                 $messages = $inbox->specificMDB($user, "u_".$d);
12         }
14         <div class="well well-lg">
15                 <?php
16                 include "include/nav.php";
17                 echo "<h4>Subject: ".$inbox->within_str($messages[0][0], "<subj>", "</subj>")."</h4>";
18                 ?>
19                 <div class="pagination panel panel-default mdes" id="page">
20                 <?php
21                         for ($i=0; $i < count($messages); $i++) {
22                                 for ($j=0; $j < count($messages[$i]); $j++) {
23                                         //echo $messages[$i][$j]."<br>";
24                                         echo "<div class=\"r mdes panel panel-default pull-left txt\">". urldecode($inbox->within_str($messages[$i][$j], "<msg>", "</msg>")) . "<br><small class=\"d pull-right\">". urldecode($inbox->within_str($messages[$i][$j], "<id>", "</id>")) ."</small></div>";
25                                         echo "<div class='clearfix'></div>";
26                                         // echo "<ul>";
27                                         // echo "<li>Sender: ".$inbox->within_str($messages[$i][$j], "<from>", "</from>")."</li>";
28                                         // echo "<li>Message: ".urldecode($inbox->within_str($messages[$i][$j], "<msg>", "</msg>"))."</li>";
29                                         // echo "</ul>";
30                                 }
31                                 if ($uid <> trim($inbox->within_str($messages[$i][0], "<from>", "</from>"))) {
32                                         $ss = "<input type=\"hidden\" name=\"zxcvbnm\" value=\"".$uid.$inbox->within_str($messages[$i][0], "<from>", "</from>").$inbox->within_str($messages[$i][0], "<id>", "</id>")."\">";
33                                 } else {
34                                         $ss = "<input type=\"hidden\" name=\"zxcvbnm\" value=\"".$uid.$inbox->within_str($messages[$i][0], "<to>", "</to>").$inbox->within_str($messages[$i][0], "<id>", "</id>")."\">";
35                                 }
36                         }
37                         echo "</div>";
38                         echo "<div id=\"replyForm\" style=\"\">
39                                         <form method=\"post\" action=\"reply.php\">".@$ss.
40                                         "<textarea rows=\"5\" name=\"msg\" class=\"form-control\"></textarea><br>
41                                         <button type=\"submit\">Send</button>
42                                         </form>
43                                 </div>";
44 } else {
45         echo "Doesn't Exist!";
47         echo "</div>";
48         require 'include/footer.php';