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-success\">‰ï˜b‚ð�í�œ‚µ‚Ü‚µ‚½�B</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');
46 if(isset($_POST['msgSubmit'])){
48 $id = strip_tags(addslashes(trim($_POST['zxcvbnm'])));
49 $id = (filter_var($id, FILTER_VALIDATE_INT
)) ?
$id : FALSE;
50 $subj = trim($_POST['subj']);
51 $inf = trim($_POST['msg']);
53 $message = new Message
;
55 $subj = $message->BeSanitize($subj);
56 $sanitize = $message->BeSanitize($inf);
57 if ($sanitize<>false) {
58 $user = $message->FindUser($id,$id_mail_path);
59 $sender = $message->GetID($_COOKIE['DMDM'],$id_mail_path);
62 if($message->CheckBanMessaging()) {
63 echo "ƒ�ƒbƒZ�[ƒW‚ð‘—�M‚·‚é‚É‚Í1000BEƒ|ƒCƒ“ƒgˆÈ�ã�ŠŽ�‚µ‚Ä‚¢‚é•K—v‚ª‚ ‚è‚Ü‚·�B";
66 $ckp = $message->CheckPostLimit($sender,$plimit_path,TRUE);
67 if (($ckp >= 60) && ($ckp != false)) {
68 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì•ª‚¨‘Ò‚¿‚‚¾‚³‚¢";
71 $ckp = $message->CheckPostLimit($sender,$plimit_hpath,FALSE);
72 if (($ckp >= 600) && ($ckp != false)) {
73 echo "“ž’B‚µ‚½Œã‚Ì�§ŒÀ‚Í�AŽŸ‚Ì1ŽžŠÔ‚¨‘Ò‚¿‚‚¾‚³‚¢";
77 $write = $message->WriteMDB($user,$sanitize,$sender,$subj,$id);
80 $message->AddPostLimit($sender,$plimit_path,TRUE);
81 $message->AddPostLimit($sender,$plimit_hpath,FALSE);
82 $_SESSION['msg'] = "<div class=\"alert alert-success\">ƒ�ƒbƒZ�[ƒW‚ð‘—�M‚µ‚Ü‚µ‚½�B</div>";
84 $_SESSION['msg'] = "<div class=\"alert alert-danger\">ƒAƒJƒEƒ“ƒg‚ª‘¶�Ý‚µ‚Ü‚¹‚ñ�B</div>";
88 $_SESSION['msg'] = "<div class=\"alert alert-danger\">ƒ�ƒbƒZ�[ƒW‚Í‘—‚ê‚Ü‚¹‚ñ‚Å‚µ‚½�ABEƒ†�[ƒUID‚ª‘¶�Ý‚µ‚È‚¢—l‚Å‚·�B</div>";
93 echo "’·‚·‚¬‚éƒRƒ“ƒeƒ“ƒc";
97 $_SESSION['msg'] = "<div class=\"alert alert-danger\">ƒ�ƒbƒZ�[ƒW‚Í‘—‚ê‚Ü‚¹‚ñ‚Å‚µ‚½�ABEƒ†�[ƒUID‚ª‘¶�Ý‚µ‚È‚¢—l‚Å‚·�B</div>";
103 'amazed' => '::amazed::',
105 'okay' => '::okay::',
106 'treasure' => '::treasure::',
107 'angry' => '::angry::',
108 'gangster' => '::gangster::',
109 'shame' => '::shame::',
110 'wink' => '::wink::',
111 'annoyed' => '::annoyed::',
112 'laugh' => '::laugh::',
113 'sick' => '::sick::',
114 'blush' => '::blush::',
115 'sing' => '::sing::',
116 'chocked' => '::chocked::',
117 'smile' => '::smile::',
118 'confused' => '::confused::',
119 'ninja' => '::ninja::',
120 'tongue' => '::tongue::',
121 'lawyer' => '::lawyer::',
122 'guru' => '::guru::',
125 $ultravariable = array();
126 foreach ($emoticon as $key => $value) {
127 $ultravariable[] = "<li class=\"lialign\"><img src='{$livesitePath}images/{$key}.gif' data-alt='{$value}'></li>";
129 $sEmote = implode("", $ultravariable);
135 <div
class="modal fade" id
="myModal" tabindex
="-1" role
="dialog" aria
-labelledby
="myModalLabel" aria
-hidden
="true">
136 <div
class="modal-dialog">
137 <div
class="modal-content">
138 <div
class="modal-header">
139 <button type
="button" class="close" data
-dismiss
="modal" aria
-hidden
="true">×
;</button
>
140 <h4
class="modal-title" id
="myModalLabel">ƒ�ƒbƒZ�
[ƒW‚ð‘—‚é
</h4
>
142 <form
class="form" method
="post" id
="sendMessage">
143 <div
class="modal-body">
144 <div
class="form-group">
145 <div
class="input-group">
146 <span
class="input-group-addon">Žó�MŽÒ ID
:</span
>
147 <input type
="text" class="form-control" name
="zxcvbnm" required
>
148 <div
class="clearfix"></div
>
151 <div
class="form-group">
152 <div
class="input-group">
153 <span
class="input-group-addon">Œ�–¼
:</span
>
154 <input type
="text" class="form-control" name
="subj" required
>
155 <div
class="clearfix"></div
>
158 <!--input type
="hidden" value
="" name
="rec"/> <!--receiver
-->
159 <div
class="form-group">
160 <textarea rows
="4" class="form-control top" id
='messageBox' name
="msg" maxlength
="250" id
="msg"></textarea
>
162 <div
class="clearfix"></div
>
164 <div
class="modal-footer">
165 <button type
="button" class="btn btn-default dropdown-toggle" data
-toggle
="dropdown">ŠG•¶Žš
</button
>
166 <ul
class="dropdown-menu dropdown-menu-right" role
="menu" id
="emoji">
167 <?php
echo $sEmote ?
>
169 <button type
="submit" class="btn btn-primary" name
="msgSubmit">‘—‚é
</button
>
177 <div
class="well well-sm pad3">
179 <?php
require 'include/nav.php' ?
>
182 <!-- <div
class="pad panel panel-default sp fxmrgn b "> -->
183 <!--Showing messages
-->
186 $inbox = new inboxRead();
187 $files = $inbox->getInbox();
188 $sh_msg = "message.php";
189 /*if(detect_device2($_SERVER['HTTP_USER_AGENT']) == "PLSDISPLAY") {
190 $sh_msg = "message.php";
192 $sh_msg = "message2.php";
195 echo " <!-- List of messages -->
196 <div class=\"btn-group akinlang\">
197 <button type=\"button\" class=\"btn btn-default\" id=\"btnMsg\" data-toggle=\"modal\" data-target=\"#myModal\">
198 <span class=\"glyphicon glyphicon-envelope\"></span>
200 </div><div class=\"clearfix\"></div><br> ";
201 echo "<div class=\"alert alert-danger\" id=\"delmsg\" style=\"display:none;\">
202 ‚±‚̉ï˜b‚ð�í�œ‚µ‚Ü‚·‚©�H<input type=\"submit\" class=\"btn btn-default btn-sm\" id=\"deleteM\" value=\"�í�œ\"name=\"block\">
203 <input type=\"button\" class=\"btn btn-default btn-sm\" value=\"ƒLƒƒƒ“ƒZƒ‹\" name=\"cancel\" onclick=\"document.getElementById('delmsg').style.display='none';\">
208 if(!empty($_SESSION['msg'])){
209 echo $_SESSION['msg'];
210 $_SESSION['msg'] = '';
214 <div id
="page" class="pagination2" >
215 <ul
class="list-group" id
="list">
218 foreach($files as $filename){
219 $value = $init->getContent($filename);
220 $from = $init->within_str($value[0], "<from>", "</from>");
221 $to = $init->within_str($value[0], "<to>", "</to>");
222 $id = $init->within_str(max($value), "<id>", "</id>");
223 $subj = $init->within_str($value[0], "<subj>", "</subj>");
224 $read = $init->within_str($value[0], "<read>", "</read>");
225 $msg = $init->within_str($value[0], "<msg>", "</msg>");
227 $array[$filename] = array("id" => $id, "subj" =>$subj, "read"=>$read, "msg"=>$msg ,"from" => $from, "to" => $to, );
232 // sort associative array
233 $array = $init->array_sort($array, 'id', SORT_DESC
);
238 foreach ($array as $key => $value) {
239 if (trim(urldecode($value["from"])) == trim($uid)) {
240 $ucode = urldecode($value["to"]);
242 $ucode = urldecode($value["from"]);
244 $ucode = $init->FindUser($ucode,$id_mail_path);
245 $ucode = trim($init->GetImgTrip($ucode));
246 $ucode = explode("\n", $ucode);
247 $uimg = trim($ucode[5]);
249 if (strpos($uimg, "-PREM")) {
250 $ico = explode("-PREM", $uimg);
251 $uimg = "<img src=\"".$livesitePath2."/premium/".$ico[0]."\" class='pic2'/>";
253 $uimg = "<img src=\"".$livesitePath2."/ico/".$uimg."\" class='pic2'/>";
256 if (isset($ucode[7]) && ($ucode[7] != NULL ||
$ucode[7] != "")) {
261 $url = substr($key, 0,-4);
262 $ff = urldecode($value["subj"]);
264 if($init->countMessage($key) > 0 ){
265 $unreadMessage = "<span class='badge pull-right'>{$init->countMessage($key)}</span>";
271 // $unreadCounter = ($init->within_str(max($value), "<read>", "</read>")==1) ? 'read' : 'unread' ;
273 echo "<li class='list-group-item ".$class."' style=\"overflow:auto !important;\">
274 <div class='media panel6'>
277 <div class=\"dropdown pull-right\">
278 <a data-toggle=\"dropdown\" href=\"#\"><span class=\"caret\"></span></a>
280 <ul class=\"dropdown-menu dropdown-menu-right cuzdropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\">
282 <form method=\"POST\" class='deleteForm'>
283 <input type='hidden' name='delete' value='{$url}'>
284 <small><a href='#' class='destroy'>��</a></small>
288 </ul><div class=\"clearfix\"></div>
291 <a class='pull-left' href='#'>
296 <div class='media-body'>
298 <a href='{$sh_msg}?d={$url}' class='pull-left'>
299 <h5 class='media-heading'>{$utrip}</h5>
300 <div class='limit'>{$ff}</div>
304 </div><!--media-body-->
314 </div
><!--hide
/"" pagination
-->
315 </div
><!--pad panel panel
-default-->
316 </div
><!--well well
-lg
-->
319 require 'include/footer.php';