Initial commit
[2ch-be.git] / dev-test / old_dev / bak / message.bak
blob47302e220dad28e62912626485a8665be0e46973
2 <?php
3 include('encrypt.php');
4 require 'inc/header.php';
5 ?>
7 </head>
8 <body>
10 <?php
14 $inbox = new Message;
15 $uid   = $inbox->GetID($_COOKIE['DMDM'],$id_mail_path);
16 $user  = $inbox->FindUser($uid,$id_mail_path);
17 if ($user<>false) {
18         $messages = $inbox->specificMDB($user, $_GET['d']);
19         //var_dump($messages);
20         //exit;
21 // var_dump($messages);
23         <div class="well well-lg">
24                 <?php include "inc/nav.php"; ?>
26         <?php echo "<h4>Subject: ".$inbox->within_str($messages[0][0], "<subj>", "</subj>")."</h4>"; ?>
27                 <div class="pagination panel panel-default mdes" id="page">
28 <?php
29         for ($i=0; $i < count($messages); $i++) {
30                 // echo $i.".  <br>";
31                 for ($j=0; $j < count($messages[$i]); $j++) {
32                         //echo $messages[$i][$j]."<br>";
33                         echo "<div class=\"r mdes panel panel-default pull-left\">". 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>";
34                         echo "<div class='clearfix'></div>";
35                         // echo "<ul>";
36                         // echo "<li>Sender: ".$inbox->within_str($messages[$i][$j], "<from>", "</from>")."</li>";
37                         // echo "<li>Message: ".urldecode($inbox->within_str($messages[$i][$j], "<msg>", "</msg>"))."</li>";
38                         // echo "</ul>";
39                 }
40                 if ($uid <> trim($inbox->within_str($messages[$i][0], "<from>", "</from>"))) {
41                         $ss = "<input type=\"hidden\" name=\"zxcvbnm\" value=\"".$uid.$inbox->within_str($messages[$i][0], "<from>", "</from>").$inbox->within_str($messages[$i][0], "<id>", "</id>")."\">";
42                 } else {
43                         $ss = "<input type=\"hidden\" name=\"zxcvbnm\" value=\"".$uid.$inbox->within_str($messages[$i][0], "<to>", "</to>").$inbox->within_str($messages[$i][0], "<id>", "</id>")."\">";
44                 }
46 <?php
47                 echo "<a href=\"#\" onclick=\"document.getElementById('replyForm').style.display='block';\">Reply</a><br><br>";
48         }
49         echo "</div>";
50         echo "<div id=\"replyForm\" style=\"display:none\">
51                                                 <form method=\"post\" action=\"messaging/reply.php\">".@$ss.
52                                                         "<textarea rows=\"5\" name=\"msg\" class=\"form-control\"></textarea><br>
53                           <button type=\"submit\">Send</button>
54                           <button type=\"button\" onclick=\"document.getElementById('replyForm').style.display='none';\">Cancel</button>
55                         </form>
56                                         </div>";
57 } else {
58         echo "Doesn't Exist!";
60         
61         echo "</div>";
62         require 'inc/footer.php';