本文整理汇总了PHP中sendChatroomMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP sendChatroomMessage函数的具体用法?PHP sendChatroomMessage怎么用?PHP sendChatroomMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendChatroomMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_decode
$url = "https://api.zoom.us/v1/user/list";
$params = "api_key=" . $zoomapplicationid . "&api_secret=" . $zoomappAuthSecret . "&data_type=JSON&page_size=30&page_number=1";
$response = json_decode(checkcURL(0, $url, $params, 1), true);
$flag = 0;
foreach ($response['users'] as $user) {
if ($user['email'] == $result['email']) {
$url = "https://api.zoom.us/v1/meeting/create";
$params = "api_key=" . $zoomapplicationid . "&api_secret=" . $zoomappAuthSecret . "&data_type=JSON&host_id=" . $user['id'] . "&topic=audiovideo&type=3& option_jbh=true&option_start_type=video";
$response = json_decode(checkcURL(0, $url, $params, 1), true);
$grp = $to;
if (!empty($response['start_url']) && !isset($chatroommode)) {
sendMessage($to, $avchat_language[5] . " <a class='avchat_link_" . $grp . "' href='javascript:void(0);' onclick=\"javascript:jqcc.ccavchat.accept_fid('" . $userid . "','','" . $response['start_url'] . "');\">" . $avchat_language[26] . "</a>", 2);
incrementCallback();
sendMessage($to, $avchat_language[2] . " <a class='avchat_link_" . $grp . "' href='javascript:void(0);' onclick=\"javascript:jqcc.ccavchat.accept('" . $userid . "','" . $grp . "','" . $response['join_url'] . "','" . $response['start_url'] . "');\">" . $avchat_language[3] . "</a> " . $avchat_language[4], 1);
} elseif (!empty($response['start_url'])) {
sendChatroomMessage($grp, $avchat_language[19] . " <a href='javascript:void(0);' onclick=\"javascript:parent.jqcc.ccavchat.accept('" . $userid . "','" . $grp . "','" . $response['join_url'] . "','" . $response['start_url'] . "','chatroommode');\">" . $avchat_language[20] . "</a>", 0);
}
$flag = 0;
incrementCallback();
break;
}
$flag++;
}
if ($flag != 0 && !isset($chatroommode)) {
$url = "https://api.zoom.us/v1/user/create";
$params = "api_key=" . $zoomapplicationid . "&api_secret=" . $zoomappAuthSecret . "&data_type=JSON&email=" . $result['email'] . "&type=1";
json_decode(checkcURL(0, $url, $params, 1), true);
sendMessage($to, $avchat_language[27] . " " . $result['email'], 2);
} else {
if ($flag != 0 && isset($chatroommode)) {
$url = "https://api.zoom.us/v1/user/create";
示例2: sendMessage
sendMessage($to, 'CC^CONTROL_' . $controlparameters, 1);
}
if (!empty($_GET['callback'])) {
echo $_GET['callback'] . '(' . json_encode(1) . ')';
} else {
echo json_encode(1);
}
}
if ($action == 'request') {
$audiochat_token = '';
if (empty($grp)) {
$grp = $userid < $to ? md5($userid) . md5($to) : md5($to) . md5($userid);
$grp = md5($_SERVER['HTTP_HOST'] . $grp);
}
if (isset($chatroommode)) {
sendChatroomMessage($to, $audiochat_language[19] . " <a token ='" . $audiochat_token . "' href='javascript:void(0);' onclick=\"javascript:jqcc.ccaudiochat.join('" . $to . "');\">" . $audiochat_language[20] . "</a> ", 0);
} else {
sendMessage($to, $audiochat_language[2] . " <a class='audiochat_link_" . $grp . " acceptAudioChat' token ='" . $audiochat_token . "' mobileAction=\"javascript:jqcc.ccaudiochat.accept('" . $userid . "','" . $grp . "');\" href='javascript:void(0);' to='" . $userid . "' grp='" . $grp . "' >" . $audiochat_language[3] . "</a> " . $audiochat_language[45] . "<a href='javascript:void(0);' class='audiochat_link_" . $grp . "' onclick=\"javascript:jqcc.ccaudiochat.reject_call('" . $userid . "','" . $grp . "');\">" . $audiochat_language[43] . ".</a>" . $audiochat_language[46], 1);
incrementCallback();
$_REQUEST['callback'];
sendMessage($to, $audiochat_language[5] . $audiochat_language[44] . "<a href='javascript:void(0);' class='audiochat_link_" . $grp . "' onclick=\"javascript:jqcc.ccaudiochat.cancel_call('" . $to . "','" . $grp . "');\">" . $audiochat_language[43] . ".</a>", 2);
}
if (!empty($_REQUEST['callback'])) {
header('content-type: application/json; charset=utf-8');
echo json_encode(1);
} else {
echo json_encode(1);
}
exit;
}
if ($action == 'accept') {
示例3: str_replace
$filename = str_replace(" ", "_", $filename);
$md5filename = md5($filename . "cometchat");
} else {
$filename = preg_replace("/[^a-zA-Z0-9 ]/", "", $_FILES['Filedata']['name']);
$filename = str_replace(" ", "_", $filename);
$md5filename = md5($filename . "cometchat");
}
if (!(!isset($_FILES['Filedata']) || !is_uploaded_file($_FILES['Filedata']['tmp_name']))) {
if (!move_uploaded_file($_FILES['Filedata']['tmp_name'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $md5filename)) {
$message = 'An error has occurred. Please contact administrator. Closing Window.';
$mediauploaded = 0;
}
}
if (empty($message)) {
if (!empty($_POST['chatroommode'])) {
sendChatroomMessage($_POST['to'], $filetransfer_language[9] . " (" . $_FILES['Filedata']['name'] . "). <a href=\"" . BASE_URL . "plugins/filetransfer/download.php?file=" . $_FILES['Filedata']['name'] . "\" target=\"_blank\">" . $filetransfer_language[6] . "</a>");
} else {
if (isset($_REQUEST['callbackfn']) && $_REQUEST['callbackfn'] == 'mobileapp') {
sendMessageTo($_POST['to'], $filetransfer_language[5] . " (" . $_POST['name'] . "). <a href=\"" . BASE_URL . "plugins/filetransfer/download.php?file=" . $_POST['name'] . "\" target=\"_blank\" imageheight=\"" . $_POST['imageheight'] . "\" imagewidth=\"" . $_POST['imagewidth'] . "\">" . $filetransfer_language[6] . "</a>");
sendSelfMessage($_POST['to'], "<a href=\"" . BASE_URL . "plugins/filetransfer/download.php?file=" . $_POST['name'] . "\" target=\"_blank\" imageheight=\"" . $_POST['imageheight'] . "\" imagewidth=\"" . $_POST['imagewidth'] . "\">" . $filetransfer_language[6] . "</a>");
} else {
sendMessageTo($_POST['to'], $filetransfer_language[5] . " (" . $_FILES['Filedata']['name'] . "). <a href=\"" . BASE_URL . "plugins/filetransfer/download.php?file=" . $_FILES['Filedata']['name'] . "\" target=\"_blank\">" . $filetransfer_language[6] . "</a>");
sendSelfMessage($_POST['to'], $filetransfer_language[7] . " (" . $_FILES['Filedata']['name'] . ").");
}
}
$message = $filetransfer_language[8];
}
$embed = '';
$embedcss = '';
$close = "setTimeout('window.close()',2000);";
if (!empty($_GET['embed']) && $_GET['embed'] == 'web') {
示例4: sendMessage
echo $_GET['callback'] . '()';
}
}
if ($_GET['action'] == 'accept') {
sendMessage($_REQUEST['to'], $screenshare_language[6], 1);
if (!empty($_GET['callback'])) {
header('content-type: application/json; charset=utf-8');
echo $_GET['callback'] . '()';
}
}
if ($_GET['action'] == 'screenshare') {
global $lightboxWindows;
$id = $_GET['id'];
$type = $_GET['type'];
if (!empty($_GET['chatroommode'])) {
sendChatroomMessage($_GET['roomid'], $screenshare_language[2] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccscreenshare.accept('" . $userid . "','" . $_GET['id'] . "');\">" . $screenshare_language[3] . "</a>", 0);
}
ini_set('display_errors', 0);
$connectUrl = "rtmp://" . $hostAddress . "/" . $application;
if ($screensharePluginType == '0') {
if ($type == 1) {
echo <<<EOD
t\t\t<!DOCTYPE html>
t\t\t<html>
t\t\t<head>
t\t\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
t\t\t<title>{$screenshare_language[0]}</title>
t\t\t<style>
t\t\thtml, body, div, span, applet, object, iframe,
t\t\th1, h2, h3, h4, h5, h6, p, blockquote, pre,
t\t\ta, abbr, acronym, address, big, cite, code,
示例5: catch
}
try {
$session = $apiObj->createSession(array('location' => $location));
$newsessionid = $session->getSessionId();
} catch (Exception $e) {
echo "<div style='background:white;padding:15px;'>Please ask your administrator to configure this plugin using administration panel.</div>";
exit;
}
$sql = "update cometchat_chatrooms set vidsession = '" . mysqli_real_escape_string($GLOBALS['dbh'], $newsessionid) . "' where id = '" . mysqli_real_escape_string($GLOBALS['dbh'], $grp) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$grp = $newsessionid;
} else {
$grp = $chatroom['vidsession'];
}
if (empty($_REQUEST['join'])) {
sendChatroomMessage($grporg, $broadcast_language[9] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccbroadcast.join('" . $grporg . "');\">" . $broadcast_language[10] . "</a>", 0);
}
$avchat_token = $apiObj->generateToken($grp);
}
$name = "";
$sql = getUserDetails($userid);
if ($guestsMode && $userid >= 10000000) {
$sql = getGuestDetails($userid);
}
$result = mysqli_query($GLOBALS['dbh'], $sql);
if ($row = mysqli_fetch_assoc($result)) {
if (function_exists('processName')) {
$row['username'] = processName($row['username']);
}
$name = $row['username'];
}
示例6: function
\t\t\t<div style="clear:both"></div>
\t\t</div>
\t</body>
<script>
\t\teval(resize +'300,330);');
\t\tconnect();
\t\twindow.onload = function() { resizeWindow(); }
\t\twindow.onresize = function() { resizeWindow(); }
\t</script>
</html>
EOD;
} elseif ($videoPluginType == '4') {
$grp = $_REQUEST['grp'];
if (!empty($_REQUEST['chatroommode'])) {
if (empty($_REQUEST['join'])) {
sendChatroomMessage($grp, $avchat_language[19] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccavchat.join('" . $_REQUEST['grp'] . "');\">" . $avchat_language[20] . "</a>");
}
}
$baseUrl = BASE_URL;
$embed = '';
$embedcss = '';
$resize = 'window.resizeTo(';
$invitefunction = 'window.open';
if (!empty($_REQUEST['embed']) && $_REQUEST['embed'] == 'web') {
$embed = 'web';
$resize = "parent.resizeCCPopup('audiovideochat',";
$embedcss = 'embed';
$invitefunction = 'parent.loadCCPopup';
}
if (!empty($_REQUEST['embed']) && $_REQUEST['embed'] == 'desktop') {
$embed = 'desktop';
示例7: sendChatroomMessage
} else {
if (!empty($isVideo) && $isVideo) {
$imgtag = "(" . $filename . ")<img class=\"file_video\" type=\"video\" src=\"" . BASE_URL . "images/videoicon.png\"/>";
} else {
if (!empty($isAudio) && $isAudio) {
$imgtag = "(" . $filename . ")<img class=\"file_audio\" type=\"audio\" src=\"" . BASE_URL . "images/audioicon.png\"/>";
}
}
}
if (empty($message)) {
$insertedId = "";
if (!empty($_POST['chatroommode'])) {
if (!empty($isImage) && $isImage || !empty($isVideo) && $isVideo || !empty($isAudio) && $isAudio) {
$insertedId = sendChatroomMessage($_POST['to'], $filetransfer_language[9] . "<br/><a class=\"imagemessage mediamessage\" filename=\"" . $unencryptedfilename . "\" encfilename=\"" . $md5filename . "\" mediatype=\"" . $mediaType . "\" href=\"" . $server_url . "plugins/filetransfer/download.php?file=" . $md5filename . "&unencryptedfilename=" . $unencryptedfilename . "\" imageheight=\"" . $height . "\" imagewidth=\"" . $width . "\">" . $imgtag . "</a>", 0);
} else {
$insertedId = sendChatroomMessage($_POST['to'], $filetransfer_language[9] . " (" . $filename . "). <a href=\"" . $server_url . "plugins/filetransfer/download.php?file=" . $md5filename . "&unencryptedfilename=" . $unencryptedfilename . "\" target=\"_blank\" mediaType=\"0\">" . $filetransfer_language[6] . "</a>", 0);
}
} else {
if (!empty($isImage) && $isImage || !empty($isVideo) && $isVideo || !empty($isAudio) && $isAudio) {
$response = sendMessage($_POST['to'], $filetransfer_language[5] . "<br/><a class=\"imagemessage mediamessage\" filename=\"" . $unencryptedfilename . "\" encfilename=\"" . $md5filename . "\" mediatype=\"" . $mediaType . "\" href=\"" . $server_url . "plugins/filetransfer/download.php?file=" . $md5filename . "&unencryptedfilename=" . $unencryptedfilename . "\">" . $imgtag . "</a>", 0, 'filetransfer');
$processedMessage = $_SESSION['cometchat']['user']['n'] . ": " . $filetransfer_language[5];
pushMobileNotification($_POST['to'], $response['id'], $processedMessage);
if (USE_COMET == 1) {
$cometmessage = array();
$cometresponse = array('to' => $_POST['to'], 'message' => $filetransfer_language[5] . "<br/><a class=\"imagemessage mediamessage\" filename=\"" . $unencryptedfilename . "\" encfilename=\"" . $md5filename . "\" mediatype=\"" . $mediaType . "\" href=\"" . $server_url . "plugins/filetransfer/download.php?file=" . $md5filename . "&unencryptedfilename=" . $unencryptedfilename . "\">" . $imgtag . "</a>", 'dir' => 0, 'type' => "filetransfer");
array_push($cometmessage, $cometresponse);
publishCometMessages($cometmessage, $response['id']);
}
$insertedId = $response['id'];
} else {
$response = sendMessage($_POST['to'], $filetransfer_language[5] . " (" . $filename . "). <a class=\"imagemessage\" href=\"" . $server_url . "plugins/filetransfer/download.php?file=" . $md5filename . "&unencryptedfilename=" . $unencryptedfilename . "\" target=\"_blank\" mediatype=\"" . $mediaType . "\">" . $filetransfer_language[6] . "</a>", 0, 'filetransfer');
示例8: base64_decode
$jpg = base64_decode($image[1]);
fwrite($file, $jpg);
fclose($file);
} else {
$inputSocket = fopen('php://input', 'rb');
$jpg = stream_get_contents($inputSocket);
fclose($inputSocket);
fwrite($file, $jpg);
fclose($file);
}
if (file_exists(dirname(dirname(dirname(__FILE__))) . "/plugins/handwrite/uploads/" . $randomImage . ".jpg")) {
$linkToImage = BASE_URL . "plugins/handwrite/uploads/" . $randomImage . ".jpg";
$text = '<a href="' . $linkToImage . '" target="_blank" style="display:inline-block;margin-bottom:3px;margin-top:3px;"><img src="' . $linkToImage . '" border="0" style="padding:0px;display: inline-block;border:1px solid #666;" height="90" width="134"></a>';
if (substr($_REQUEST['tid'], 0, 1) == 'c') {
$_REQUEST['tid'] = substr($_REQUEST['tid'], 1);
sendChatroomMessage($_REQUEST['tid'], $handwrite_language[3] . "<br/>{$text}");
} else {
sendMessageTo($_REQUEST['tid'], $handwrite_language[1] . "<br/>{$text}");
sendSelfMessage($_REQUEST['tid'], $handwrite_language[2] . "<br/>{$text}");
if (isset($_REQUEST['sendername']) && $pushNotifications == 1) {
pushMobileNotification($handwrite_language[2], $_REQUEST['sendername'], $_REQUEST['tid'], $_REQUEST['tid']);
}
}
}
$embed = '';
$embedcss = '';
$close = "setTimeout('window.close()',2000);";
if (!empty($_REQUEST['embed']) && $_REQUEST['embed'] == 'web') {
$embed = 'web';
$embedcss = 'embed';
$close = "parent.closeCCPopup('handwrite');";
示例9: deleteChatroomMessage
function deleteChatroomMessage()
{
$id = $_REQUEST['currentroom'];
$delid = $_REQUEST['delid'];
global $allowdelete;
global $userid;
$deleteflag = 0;
if (!empty($_SESSION['cometchat']['isModerator'])) {
$deleteflag = 1;
} elseif (empty($allowdelete)) {
if (USE_COMET == 1 && COMET_CHATROOMS == 1) {
$sql = "select message from cometchat_comethistory where message like '%s:13:\"" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "\";%' ";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$row = mysqli_fetch_assoc($query);
$message = unserialize($row['message']);
if ($message['fromid'] == $userid) {
$deleteflag = 1;
}
} else {
$sql = "select userid from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$row = mysqli_fetch_assoc($query);
if ($row['userid'] == $userid) {
$deleteflag = 1;
}
}
}
if (empty($deleteflag)) {
echo 0;
exit;
} else {
sendCCResponse(1);
}
if (USE_COMET == 1 && COMET_CHATROOMS == 1) {
$sql = "delete from cometchat_comethistory where message like '%s:13:\"" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "\";%' ";
$query = mysqli_query($GLOBALS['dbh'], $sql);
} else {
$del = $delid;
$sql = "delete from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $del) . "' and chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $id) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
}
sendChatroomMessage($id, 'CC^CONTROL_deletemessage_' . $delid, 0);
}
示例10: deleteChatroomMessage
function deleteChatroomMessage()
{
$id = $_REQUEST['currentroom'];
$delid = $_REQUEST['delid'];
global $allowdelete;
global $userid;
$deleteflag = 0;
if (!empty($_SESSION['cometchat']['isModerator'])) {
$deleteflag = 1;
} elseif (empty($allowdelete)) {
if (USE_COMET == 1 && COMET_CHATROOMS == 1) {
$sql = "select message from cometchat_comethistory where message like '%s:13:\"" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "\";%' ";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$row = mysqli_fetch_assoc($query);
$message = unserialize($row['message']);
if ($message['fromid'] == $userid) {
$deleteflag = 1;
}
} else {
$sql = "select userid from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$row = mysqli_fetch_assoc($query);
if ($row['userid'] == $userid) {
$deleteflag = 1;
}
}
}
if (empty($deleteflag)) {
echo 0;
exit;
} else {
ob_end_clean();
header("Connection: close");
ignore_user_abort();
ob_start();
echo 1;
header("Content-Length:" . ob_get_length());
ob_end_flush();
flush();
}
if (USE_COMET == 1 && COMET_CHATROOMS == 1) {
$sql = "delete from cometchat_comethistory where message like '%s:13:\"" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "\";%' ";
$query = mysqli_query($GLOBALS['dbh'], $sql);
} else {
$del = $delid;
$sql = "delete from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $del) . "' and chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $id) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
}
sendChatroomMessage($id, 'CC^CONTROL_deletemessage_' . $delid);
}
示例11: dirname
\t\t\t</div>\t
\t</body>
\t</html>
EOD;
} else {
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'sdk' . DIRECTORY_SEPARATOR . 'API_Config.php';
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'sdk' . DIRECTORY_SEPARATOR . 'OpenTokSDK.php';
$apiKey = '23262682';
$apiSecret = '4c03c626ca826d554d66c16d74afb80fe2d0e3dc';
$apiServer = 'https://api.opentok.com/hl';
$sessionid = $_REQUEST['grp'];
$apiObj = new OpenTokSDK($apiKey, $apiSecret);
$token = $apiObj->generate_token();
if (!empty($_REQUEST['chatroommode'])) {
if (empty($_REQUEST['join'])) {
sendChatroomMessage($sessionid, $broadcast_language[9] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccbroadcast.join('" . $_REQUEST['grp'] . "');\">" . $broadcast_language[10] . "</a>");
}
$sql = "select vidsession from cometchat_chatrooms where id = '" . mysql_real_escape_string($sessionid) . "'";
$query = mysql_query($sql);
$chatroom = mysql_fetch_array($query);
if (empty($chatroom['vidsession'])) {
$session = $apiObj->create_session(time());
$newsessionid = $session->getSessionId();
$sql = "update cometchat_chatrooms set vidsession = '" . mysql_real_escape_string($newsessionid) . "' where id = '" . mysql_real_escape_string($sessionid) . "'";
$query = mysql_query($sql);
$sessionid = $newsessionid;
} else {
$sessionid = $chatroom['vidsession'];
}
}
$name = "";
示例12: switch
switch ($authPacket->getStatus()) {
case AuthPacket::STATUS_NEED_AUTH:
$authPacket->setAccount(G::$account);
$authPacket->setPassword(G::$password);
$cli->send(serializePacket($authPacket));
break;
case AuthPacket::STATUS_AUTH_FAILED:
echo "error: auth failed\n";
break;
case AuthPacket::STATUS_AUTH_SUCCESS:
echo "auth success\n";
G::$auth = true;
G::$uid = $authPacket->getUid();
sendChatPacket();
sendGroupMessage();
sendChatroomMessage();
break;
default:
echo "error: auth status undefined!\n";
exit;
}
} else {
echo "error: first message from server is not auth message!\n";
exit;
}
}
echo "---------RECEIVE----------------------------\n";
echo "from: ", $packet->getFrom(), "\n";
echo "to: ", $packet->getTo(), "\n";
echo "type: ", $packet->getType(), "\n";
echo "session: ", G::$sessionId, "\n";
示例13: deleteChatroomMessage
function deleteChatroomMessage()
{
$id = $_REQUEST['currentroom'];
$delid = $_REQUEST['delid'];
global $allowdelete;
global $userid;
$deleteflag = 0;
if (!empty($_SESSION['cometchat']['isModerator'])) {
$deleteflag = 1;
} elseif (empty($allowdelete)) {
$sql = "select userid from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $delid) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$row = mysqli_fetch_assoc($query);
if ($row['userid'] == $userid) {
$deleteflag = 1;
}
}
if (empty($deleteflag)) {
echo 0;
exit;
} else {
sendCCResponse(1);
}
$del = $delid;
$sql = "delete from cometchat_chatroommessages where id='" . mysqli_real_escape_string($GLOBALS['dbh'], $del) . "' and chatroomid = '" . mysqli_real_escape_string($GLOBALS['dbh'], $id) . "'";
$query = mysqli_query($GLOBALS['dbh'], $sql);
$controlparameters = array('type' => 'modules', 'name' => 'chatroom', 'method' => 'deletemessage', 'params' => array('id' => $delid));
$controlparameters = json_encode($controlparameters);
sendChatroomMessage($id, 'CC^CONTROL_' . $controlparameters, 0);
}
示例14: sendChatroomMessage
if (!move_uploaded_file($_FILES['Filedata']['tmp_name'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . $md5filename)) {
$message = 'An error has occurred. Please contact administrator. Closing Window.';
$mediauploaded = 0;
}
}
if (empty($message)) {
$insertedId = "";
$server_url = $_SERVER['SERVER_NAME'] . BASE_URL;
if (filter_var(BASE_URL, FILTER_VALIDATE_URL)) {
$server_url = BASE_URL;
}
if (!empty($_POST['chatroommode'])) {
if (!empty($isImage) && $isImage || !empty($isVideo) && $isVideo) {
$insertedId = sendChatroomMessage($_POST['to'], $filetransfer_language[9] . "<br/><a class=\"imagemessage\" href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" target=\"_blank\" imageheight=\"" . $height . "\" imagewidth=\"" . $width . "\">" . $imgtag . "</a>", 0);
} else {
$insertedId = sendChatroomMessage($_POST['to'], $filetransfer_language[9] . " (" . $filename . "). <a href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" target=\"_blank\">" . $filetransfer_language[6] . "</a>", 0);
}
} else {
if (!empty($isImage) && $isImage || !empty($isVideo) && $isVideo) {
$response = sendMessage($_POST['to'], $filetransfer_language[5] . "<br/><a href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" target=\"_blank\"><a class=\"imagemessage\" href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" onClick=\"javascript:jqcc('div.cometchat_other > a')[0].click();return false;\" target=\"none\" imageheight=\"" . $height . "\" imagewidth=\"" . $width . "\">" . $imgtag . "</a></a>", 1);
$processedMessage = $_SESSION['cometchat']['user']['n'] . ": " . "has sent you a file";
parsePusher($_POST['to'], $response['id'], $processedMessage);
$array_response = sendMessage($_POST['to'], $filetransfer_language[7] . "<br/><a href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" target=\"_blank\"><a class=\"imagemessage\" href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" onClick=\"javascript:jqcc('div.cometchat_other > a')[0].click();return false;\" target=\"none\" imageheight=\"" . $height . "\" imagewidth=\"" . $width . "\">" . $imgtag . "</a></a>", 2);
$insertedId = $array_response['id'];
} else {
$response = sendMessage($_POST['to'], $filetransfer_language[5] . " (" . $filename . "). <a href=\"//" . $server_url . "plugins/filetransfer/download.php?file=" . $filename . "\" target=\"_blank\"><a href=\"" . BASE_URL . "plugins/filetransfer/download.php?file=" . $filename . "\" onClick=\"return false;\" target=\"none\" " . $filetransfer_language[6] . "</a></a>", 1);
$processedMessage = $_SESSION['cometchat']['user']['n'] . ": " . "has sent you a file";
parsePusher($_POST['to'], $response['id'], $processedMessage);
$array_response = sendMessage($_POST['to'], $filetransfer_language[7] . " (" . $filename . ").", 2);
$insertedId = $array_response['id'];
}
示例15: sendMessageTo
sendMessageTo($_REQUEST['to'], $writeboard_language[6]);
if (!empty($_GET['callback'])) {
header('content-type: application/json; charset=utf-8');
echo $_GET['callback'] . '()';
}
}
if ($_GET['action'] == 'writeboard') {
$id = $_GET['id'];
$type = $_GET['type'];
if ($type == 1) {
$type = 'publisher';
} else {
$type = 'subscriber';
}
if (!empty($_GET['chatroommode'])) {
sendChatroomMessage($_GET['roomid'], $writeboard_language[2] . " <a href='javascript:void(0);' onclick=\"javascript:jqcc.ccwriteboard.accept('" . $userid . "','" . $_GET['id'] . "');\">" . $writeboard_language[3] . "</a>");
}
$room = "writeboard" . $id;
$room = md5($room);
$name = "Unknown" . rand(0, 999);
$sql = getUserDetails($userid);
if ($guestsMode && $userid >= 10000000) {
$sql = getGuestDetails($userid);
}
$result = mysql_query($sql);
if ($row = mysql_fetch_array($result)) {
if (function_exists('processName')) {
$row['username'] = processName($row['username']);
}
$name = $row['username'];
}