芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/rentandbuyrealty.com/requests/rt.php
pusherData('cluster') ); $rt = new Pusher( pusherData('key'), pusherData('secret'), pusherData('id'), $options ); if ($_SERVER['REQUEST_METHOD'] === 'GET') { switch ($_GET['action']) { case 'message': $query = secureEncode($_GET['query']); $data = explode('[rt]',$query); $s_id = $data[0]; $r_id = $data[1]; $photo = $data[2]; $name = $data[3]; $m = $data[4]; $type = $data[5]; $storyType = ''; $storyUrl = ''; $lang = getUserLang($r_id); if($type == 'story'){ if(isset($data[6])){ $storyUrl = $data[6]; $storyType = $data[7]; } } $time = time(); $notiMessage = getLang(686,$lang); if($type == 'credits'){ $m = '
'.getLang(583,$lang).' '.$data[6].' '.getLang(128,$lang).'!
'; $notiMessage = $m; } if($type == 'videocall'){ $notiMessage = $m; } $content = $m; if($type == 'image'){ $content = '
'; $notiMessage = getLang(687,$lang); } if($type == 'gif'){ $content = '
'; $notiMessage = getLang(688,$lang); } if($type == 'gift'){ $content = '
'; $notiMessage = getLang(689,$lang); } if($type == 'story'){ if($storyType == 'video'){ $content = '
'.getLang(663,$lang).'
'.$m; } else { $content = '
'.getLang(663,$lang).'
'.$m; } } $event = 'chat'.$r_id.$s_id; $arr['type'] = $type; $arr['notification_chat'] = false; $arr['message'] = $m; $arr['id'] = $s_id; $arr['action'] = 'message'; $arr['chatHeaderRight']='
'.date("H:i", time()).'
'.$name.'
'.$content.'
'; if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key'), $event, $arr ); } $notiData['notification_chat'] = false; $results = $mysqli->query("SELECT DISTINCT s_id FROM chat WHERE r_id = '".$r_id."' AND seen = 0 AND notification = 0 order by id desc"); if($results->num_rows > 0){ $notiData['notification_chat'] = getUserFriends($r_id); $notiData['unread'] = checkUnreadMessages($r_id); } $noti= 'notification'.$r_id; $notiData['id'] = $s_id; $notiData['message'] = $notiMessage; $notiData['time'] = date("H:i", time()); $notiData['type'] = $type; $notiData['icon'] = $photo; $notiData['name'] = $name; $notiData['photo'] = 0; $notiData['action'] = 'message'; $notiData['unread'] = checkUnreadMessages($r_id); if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key'), $noti, $notiData); } break; case 'typing': $query = secureEncode($_GET['query']); $data = explode(',',$query); $s_id = $data[0]; $r_id = $data[1]; $t = $data[2]; $time = time(); $event = 'typing'.$r_id.$s_id; $arr['t'] = $t; if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key'), $event, $arr ); } break; case 'liveMingleMsg': $query = secureEncode($_GET['query']); $data = explode('[rt]',$query); $s_id = $data[0]; $r_id = $data[1]; $name = $data[2]; $m = $data[3]; $time = time(); $event = 'livemingle'.$r_id; $arr['msg'] = $m; $arr['name'] = $name; $arr['type'] = 'message'; if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key'), $event, $arr ); } break; case 'liveMingleFinish': $query = secureEncode($_GET['query']); $data = explode('[rt]',$query); $s_id = $data[0]; $r_id = $data[1]; $time = time(); $event = 'livemingle'.$r_id; $arr['type'] = 'finish'; if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key'), $event, $arr ); } break; case 'endVideocall': $query = secureEncode($_GET['query']); $data = explode(',',$query); $r_id = $data[0]; $event = 'videocall'.$r_id; $arr['data'] = 'End videocall'; $rt->trigger(pusherData('key'), $event, $arr ); break; case 'themeUpdate': $sm = array(); $query = secureEncode($_GET['query']); $data = explode(',',$query); $preset = $data[0]; $theme = $data[1]; $themeType = $data[2]; $reload = $data[3]; $event = $preset; $arr['preset'] = $preset; $arr['theme'] = $theme; $arr['reload'] = $reload; if(is_numeric(pusherData('id'))){ $rt->trigger(pusherData('key').'iframe', $event, $arr ); $rt->trigger(pusherData('key'), $event, $arr ); } break; } }