2 include('include/config.php');
3 require 'include/inbox.class.php';
7 require 'include/header.php';
9 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
10 header('location:index.php');
14 $uid = $init->GetID($_COOKIE['DMDM'],$id_mail_path);
16 if(isset($_POST['delete'])){
17 if(!file_exists($_SESSION['sLoggedDir'].'del')){
18 chdir($_SESSION['sLoggedDir']);
22 if(is_dir($_SESSION['sLoggedDir'].'del')){
23 $delete = $_POST['delete'].".dat";
24 if(file_exists($_SESSION['sLoggedDir'].$delete)){
25 rename($_SESSION['sLoggedDir'].$delete, $_SESSION['sLoggedDir'].'del/'.$delete);
26 $_SESSION['msg'] = "<div class=\"alert alert-success\">‰ï˜b‚ð�í�œ‚µ‚Ü‚µ‚½�B</div>";
27 header('Location: '.$livesitePath.'inbox.php');
30 $_SESSION['msg'] = "<div class=\"alert alert-danger\">Doesn't Exists</div>";
31 header('Location: '.$livesitePath.'inbox.php');
37 if(isset($_POST['msgSubmit'])){
39 $id = strip_tags(addslashes(trim($_POST['zxcvbnm'])));
40 $id = (filter_var($id, FILTER_VALIDATE_INT
)) ?
$id : FALSE;
41 $subj = trim($_POST['subj']);
42 $inf = trim($_POST['msg']);
44 $message = new Message
;
46 $subj = $message->BeSanitize($subj);
47 $sanitize = $message->BeSanitize($inf);
49 if ($sanitize<>false) {
50 $user = $message->FindUser($id,$id_mail_path);
51 $sender = $message->GetID($_COOKIE['DMDM'],$id_mail_path);
52 if($message->CheckBanMessaging()) {
53 echo "ƒ�ƒbƒZ�[ƒW‚ð‘—�M‚·‚é‚É‚Í1000BEƒ|ƒCƒ“ƒgˆÈ�ã�ŠŽ�‚µ‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·�B";
56 $ckp = $message->CheckPostLimit($sender,$plimit_path,TRUE);
57 if (($ckp >= 60) && ($ckp != false)) {
58 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì•ª‚¨‘Ò‚¿‚‚¾‚³‚¢";
61 $ckp = $message->CheckPostLimit($sender,$plimit_hpath,FALSE);
62 if (($ckp >= 600) && ($ckp != false)) {
63 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì1ŽžŠÔ‚¨‘Ò‚¿‚‚¾‚³‚¢";
66 $write = $message->WriteMDB($user,$sanitize,$sender,$subj,$id);
69 $message->AddPostLimit($sender,$plimit_path,TRUE);
70 $message->AddPostLimit($sender,$plimit_hpath,FALSE);
71 $_SESSION['msg'] = "<div class=\"alert alert-success\">ƒ�ƒbƒZ�[ƒW‚ð‘—�M‚µ‚Ü‚µ‚½�B</div>";
73 $_SESSION['msg'] = "<div class=\"alert alert-danger\">ƒAƒJƒEƒ“ƒg‚ª‘¶�Ý‚µ‚Ü‚¹‚ñ�B</div>";
77 echo "’·‚·‚¬‚éƒRƒ“ƒeƒ“ƒc";
80 $_SESSION['msg'] = "<div class=\"alert alert-danger\">ƒ�ƒbƒZ�[ƒW‚Í‘—�M‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½</div>";
84 $ultravariable = array();
86 foreach ($emoticon as $key => $value) {
87 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
89 $sEmote = implode("", $ultravariable);
96 <div
class="modal fade" id
="myModal" tabindex
="-1" role
="dialog" aria
-labelledby
="myModalLabel" aria
-hidden
="true">
97 <div
class="modal-dialog">
98 <div
class="modal-content">
99 <div
class="modal-header">
100 <button type
="button" class="close" data
-dismiss
="modal" aria
-hidden
="true">×
;</button
>
101 <h4
class="modal-title" id
="myModalLabel">ƒ�ƒbƒZ�
[ƒW‚ð‘—‚é
</h4
>
103 <form
class="form" method
="post" id
="sendMessage">
104 <div
class="modal-body">
105 <div
class="form-group">
106 <div
class="input-group">
107 <span
class="input-group-addon">Žó�MŽÒ ID
:</span
>
108 <input type
="text" class="form-control" name
="zxcvbnm" required
>
109 <div
class="clearfix"></div
>
112 <div
class="form-group">
113 <div
class="input-group">
114 <span
class="input-group-addon">Œ�–¼
:</span
>
115 <input type
="text" class="form-control" name
="subj" required
>
116 <div
class="clearfix"></div
>
119 <!--input type
="hidden" value
="" name
="rec"/> <!--receiver
-->
120 <div
class="form-group">
121 <textarea rows
="4" class="form-control top" id
='messageBox' name
="msg" maxlength
="250" id
="msg"></textarea
>
123 <div
class="clearfix"></div
>
125 <div
class="modal-footer">
126 <button type
="button" class="btn btn-default dropdown-toggle" data
-toggle
="dropdown">ŠG•¶Žš
</button
>
127 <ul
class="dropdown-menu dropdown-menu-right" role
="menu" id
="emoji">
128 <?php
echo $sEmote ?
>
130 <button type
="submit" class="btn btn-primary" name
="msgSubmit">‘—‚é
</button
>
138 <div
class="well well-sm pad3">
140 <?php
require 'include/nav.php' ?
>
143 <!-- <div
class="pad panel panel-default sp fxmrgn b "> -->
144 <!--Showing messages
-->
147 $inbox = new inboxRead();
148 $files = $inbox->getInbox();
151 echo " <!-- List of messages -->
152 <div class=\"btn-group akinlang\">
153 <button type=\"button\" class=\"btn btn-default\" id=\"btnMsg\" data-toggle=\"modal\" data-target=\"#myModal\">
154 <span class=\"glyphicon glyphicon-envelope\"></span>
156 </div><div class=\"clearfix\"></div><br> ";
157 echo "<div class=\"alert alert-danger\" id=\"delmsg\" style=\"display:none;\">
158 ‚±‚̉ï˜b‚ð�í�œ‚µ‚Ü‚·‚©�H<input type=\"submit\" class=\"btn btn-default btn-sm\" id=\"deleteM\" value=\"�í�œ\"name=\"block\">
159 <input type=\"button\" class=\"btn btn-default btn-sm\" value=\"ƒLƒƒƒ“ƒZƒ‹\" name=\"cancel\" onclick=\"document.getElementById('delmsg').style.display='none';\">
164 if(!empty($_SESSION['msg'])){
165 echo $_SESSION['msg'];
166 $_SESSION['msg'] = '';
170 <div id
="page" class="pagination2" >
171 <ul
class="list-group" id
="list">
174 foreach($files as $filename){
175 $value = $init->getContent($filename);
176 $from = $init->within_str($value[0], "<from>", "</from>");
177 $to = $init->within_str($value[0], "<to>", "</to>");
178 $id = $init->within_str(max($value), "<id>", "</id>");
179 $subj = $init->within_str($value[0], "<subj>", "</subj>");
180 $read = $init->within_str($value[0], "<read>", "</read>");
181 $msg = $init->within_str($value[0], "<msg>", "</msg>");
183 $array[$filename] = array("id" => $id, "subj" =>$subj, "read"=>$read, "msg"=>$msg ,"from" => $from, "to" => $to, );
185 // sort associative array
186 $array = $init->array_sort($array, 'id', SORT_DESC
);
188 foreach ($array as $key => $value) {
189 if (trim(urldecode($value["from"])) == trim($uid)) {
190 $ucode = urldecode($value["to"]);
192 $ucode = urldecode($value["from"]);
194 $ucode = $init->FindUser($ucode,$id_mail_path);
195 $ucode = trim($init->GetImgTrip($ucode));
196 $ucode = explode("\n", $ucode);
197 $uimg = trim($ucode[5]);
198 if (isset($ucode[7]) && ($ucode[7] != NULL ||
$ucode[7] != "")) {
203 $url = substr($key, 0,-4);
204 $ff = urldecode($value["subj"]);
206 if($init->countMessage($key) > 0 ){
207 $unreadMessage = "<span class='badge pull-right'>{$init->countMessage($key)}</span>";
214 echo "<li class='list-group-item ".$class."' style=\"overflow:auto !important;\">
215 <div class='media panel6'>
218 <div class=\"dropdown pull-right\">
219 <a data-toggle=\"dropdown\" href=\"#\"><span class=\"caret\"></span></a>
221 <ul class=\"dropdown-menu dropdown-menu-right cuzdropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\">
223 <form method=\"POST\" class='deleteForm'>
224 <input type='hidden' name='delete' value='{$url}'>
225 <small><a href='#' class='destroy'>��</a></small>
229 </ul><div class=\"clearfix\"></div>
232 <a class='pull-left' href='#'>
234 <img class='pic2' src=\"".$livesitePath2."/ico/{$uimg}\" >
237 <div class='media-body'>
239 <a href='message.php?d={$url}' class='pull-left'>
240 <h5 class='media-heading'>{$utrip}</h5>
241 <div class='limit'>{$ff}</div>
245 </div><!--media-body-->
251 echo "<h5> ‚²—˜—p‚¢‚½‚¾‚¯‚Ü‚¹‚ñƒ�ƒbƒZ�[ƒW </h5>";
256 </div
><!--hide
/"" pagination
-->
257 </div
><!--pad panel panel
-default-->
258 </div
><!--well well
-lg
-->
261 require 'include/footer.php';