2 include('encrypt.php');
3 require 'include/inbox.class.php';
4 require 'include/header.php';
6 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
7 header('location:index.php');
11 /*********************************************
12 function GetImgTrip($mail) {
14 $fdir = substr($mail, 0, 1);
15 $sdir = substr($mail, 1, 1);
16 $impo = file_get_contents(DB_PATH."$fdir/$sdir/$mail");
20 //*********************************************/
21 // $init = new Message;
23 $uid = $init->GetID($_COOKIE['DMDM'],$id_mail_path);
25 if(isset($_POST['delete'])){
26 if(!file_exists($_SESSION['sLoggedDir'].'del')){
27 chdir($_SESSION['sLoggedDir']);
31 if(is_dir($_SESSION['sLoggedDir'].'del')){
32 $delete = $_POST['delete'].".dat";
33 if(file_exists($_SESSION['sLoggedDir'].$delete)){
34 rename($_SESSION['sLoggedDir'].$delete, $_SESSION['sLoggedDir'].'del/'.$delete);
35 $_SESSION['msg'] = "<div class=\"alert alert-danger\">Message has been successfully deleted.</div>";
36 header('Location: '.$livesitePath.'inbox.php');
39 $_SESSION['msg'] = "<div class=\"alert alert-danger\">Doesn't Exists</div>";
40 header('Location: '.$livesitePath.'inbox.php');
48 <div
class="well well-sm pad3">
50 <?php
require 'include/nav.php' ?
>
53 <!-- <div
class="pad panel panel-default sp fxmrgn b "> -->
54 <!--Showing messages
-->
57 $inbox = new inboxRead();
58 $files = $inbox->getInbox();
62 echo "<div class=\"alert alert-danger\" id=\"delmsg\" style=\"display:none;\">
63 ‚ ‚È‚½‚ª‰ï˜b‚ð�í�œ‚µ‚Ä‚à‚æ‚낵‚¢‚Å‚·‚©�H<input type=\"submit\" class=\"btn btn-default btn-sm\" id=\"deleteM\" value=\"�í�œ\"name=\"block\">
64 <input type=\"button\" class=\"btn btn-default btn-sm\" value=\"ƒLƒƒƒ“ƒZƒ‹\" name=\"cancel\" onclick=\"document.getElementById('delmsg').style.display='none';\">
68 <!-- List of messages
-->
69 <div id
="page" class="pagination2" >
71 <ul
class="list-group" id
="list">
73 if(!empty($_SESSION['msg'])){
74 echo $_SESSION['msg'];
75 $_SESSION['msg'] = '';
78 foreach($files as $filename){
79 $value = $init->getContent($filename);
80 $from = $init->within_str($value[0], "<from>", "</from>");
81 $to = $init->within_str($value[0], "<to>", "</to>");
82 $id = $init->within_str(max($value), "<id>", "</id>");
83 $subj = $init->within_str($value[0], "<subj>", "</subj>");
84 $read = $init->within_str($value[0], "<read>", "</read>");
85 $msg = $init->within_str($value[0], "<msg>", "</msg>");
87 $array[$filename] = array("id" => $id, "subj" =>$subj, "read"=>$read, "msg"=>$msg ,"from" => $from, "to" => $to, );
92 // sort associative array
93 $array = $init->array_sort($array, 'id', SORT_DESC
);
98 foreach ($array as $key => $value) {
99 if (trim(urldecode($value["from"])) == trim($uid)) {
100 $ucode = urldecode($value["to"]);
102 $ucode = urldecode($value["from"]);
104 $ucode = $init->FindUser($ucode,$id_mail_path);
105 $ucode = trim($init->GetImgTrip($ucode));
106 $ucode = explode("\n", $ucode);
107 $uimg = trim($ucode[5]);
108 if (isset($ucode[7]) && ($ucode[7] != NULL ||
$ucode[7] != "")) {
113 $url = substr($key, 0,-4);
114 $ff = urldecode($value["subj"]);
116 if($init->countMessage($key) > 0 ){
117 $unreadMessage = "<span class='badge pull-right'>{$init->countMessage($key)}</span>";
123 // $unreadCounter = ($init->within_str(max($value), "<read>", "</read>")==1) ? 'read' : 'unread' ;
125 echo "<li class='list-group-item ".$class."' style=\"overflow:auto !important;\">
126 <div class='media panel6'>
129 <div class=\"dropdown pull-right\">
130 <a data-toggle=\"dropdown\" href=\"#\"><span class=\"caret\"></span></a>
132 <ul class=\"dropdown-menu dropdown-menu-right cuzdropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\">
134 <form method=\"POST\" class='deleteForm'>
135 <input type='hidden' name='delete' value='{$url}'>
136 <small><a href='#' class='destroy'>��</a></small>
140 </ul><div class=\"clearfix\"></div>
150 <a class='pull-left' href='#'>
152 <img class='pic2' src=\"".$livesitePath2."/ico/{$uimg}\" >
155 <div class='media-body'>
157 <a href='message.php?d={$url}' class='pull-left'>
158 <h5 class='media-heading'>{$utrip}</h5>
159 <div class='limit'>{$ff}</div>
163 </div><!--media-body-->
173 </div
><!--hide
/"" pagination
-->
174 </div
><!--pad panel panel
-default-->
175 </div
><!--well well
-lg
-->
178 require 'include/footer.php';