send_Action_Response('Success', 1); exit; break; case 'Message_Mark_As_Read': $TMP_UMDMSGIDS = get_POST_var("UMDMSGIDS"); $UMDMSGIDS = explode('||', $TMP_UMDMSGIDS); $uid = $_SESSION['empl_id']; $DM = new DirectMessages(); $res = $DM->Mark_As_Read($UMDMSGIDS, $_SESSION['empl_id']); send_Action_Response('Success', $res); exit; break; case 'fetchArchives': $date = get_POST_var('DATE'); $roomId = get_POST_var('ROOMID'); $MCR = new ManageChatRooms(); $ARMSGS = $MCR->get_Archives_fromRoom($date, $roomId, $_SESSION['empl_id']); send_Action_Response('Success', " NEW_MESSAGES = " . json_encode($ARMSGS['NEW_MESSAGES']) . "; LASTFETCHEDMSGID = {$ARMSGS['LASTFETCHEDMSGID']} ;"); exit; break; case 'getRoomIdsForUser': $MU = new ManageUsers(); $MU->userId = get_POST_var('uid'); $user_rooms = $MU->getUser_AllowedChatRooms_IncludeDepricatedOnes(); send_Action_Response('Success', " USER_ROOMS = " . json_encode($user_rooms) . "; "); exit; break; case 'searchFiles': $date = get_POST_var('DATE'); list($stDay, $stMonth, $stYear) = explode("-", $date); $newdate = $stYear . '-' . $stMonth . '-' . $stDay;
</table> <div id="div_manageUser_Rooms_container" style=" display:none;width: 440" class="divAbovedivAboveBg"> <TABLE width="440" cellpadding=0 cellspacing=0 border=0 class="divHeadingTable"> <TR> <TD onmousedown="My_JsLibrary.startDrag(event);" class="drag_dialog_title2" id='div_manageUser_Rooms_title'></TD> <TD onclick="My_JsLibrary.hideDrag(event);" width="19" bgcolor="#C49762"><img src="/images/close.gif" border=0></TD> </TR> </TABLE> <TABLE width="438" cellpadding="4" cellspacing=4 border=0> <?php $MCR = new ManageChatRooms(); $rooms = $MCR->get_ListOfAllRooms(); foreach ($rooms as $this_room) { echo "<TR>\n\t\t\t\t\t<TD align='right' width='50'>\n\t\t\t\t\t\t<input type='checkbox' class='room_prev' value='{$this_room['roomId']}' id='room_{$this_room['roomId']}'>\n\t\t\t\t\t</TD>\n\t\t\t\t\t<TD>\n\t\t\t\t\t\t<label for='room_{$this_room['roomId']}'>{$this_room['roomName']}</label>\n\t\t\t\t\t</TD>\n\t\t\t\t</TR>\n\t\t\t"; } ?> <TR> <TD align=center colspan=2 > <input type='button' value="Close" onclick="$('#div_manageUser_Rooms_container').hideWithBg();"> </TD> </TR> </TABLE> </div>
<?php include_once "activeuserstracking.php"; $TMCR = new ManageChatRooms(); $MU = new ManageUsers(); $MU->userId = $CURRENT_USERID; $DM_COUNT = $MU->get_newDirectMessageCount(); $DM_COUNT_STR = $DM_COUNT ? " ({$DM_COUNT})" : ""; $LOGGEDIN_ROOMS = $MU->get_LoggedInRooms(); ?> <div class="mainMenu" style='margin-top: 5px;'> <span style='font-size:110%;'><I><?php echo $CURRENT_USER; ?> </I></span> <SPAN class='i' selclass='ic' goto="lobby.php" TITLE="Get into the ChatRooms from the Lobby">Lobby</SPAN> <?php foreach ($LOGGEDIN_ROOMS as $THIS_ROOM) { echo "<SPAN class='l' selclass='lc' goto='chatroom.php?rid={$THIS_ROOM}' TITLE='Goto ChatRoom'>" . $TMCR->get_roomTitle($THIS_ROOM) . "</SPAN>"; } ?> <SPAN class='j' selclass='jc' goto="bookmarks.php" TITLE="list of bookmarked messages">BookMarks</SPAN> <SPAN class='g' selclass='gc' goto="files.php" TITLE="Files from various Chat Rooms">Files</SPAN> <SPAN class='h' selclass='hc' goto="dchat.php" TITLE="Send Direct Messages to other users">Messages<?php echo $DM_COUNT_STR; ?> </SPAN> </div>
public function get_ListOfUsers_WhoCanSee($file_id) { $roomId = executesql_returnArray("select tbl_ChatRooms.chatRoom from tbl_chatFiles, tbl_ChatRooms where tbl_ChatRooms.fileId = tbl_chatFiles.fileId and tbl_chatFiles.fileId='{$fileId}'"); if ($roomId) { $MCR = new ManageChatRooms(); return $MCR->get_ListOfAllowedUsers($roomId); } else { $uids = executesql_returnAssocArray("select to_uid, from_uid from tbl_DirectMessages where fileId='{$file_id}' "); if (count($uids)) { return array($uids['to_uid'], $uids['from_uid']); } else { return array(); } } }
</script> <div style='float:left;'> <table cellpadding=5 cellspacing=5 width="600" style='margin-top:30px;' align='center' border=0> <tbody> <TR><TD> <?php $MU = new ManageUsers(); $MCR = new ManageChatRooms(); $MU->userId = $CURRENT_USERID; $MY_ROOMS = $MU->getUser_AllowedChatRooms(); if (!count($MY_ROOMS)) { echo "You dont have access to any rooms."; } else { foreach ($MY_ROOMS as $THIS_ROOM) { $ACTIVE_MEMBER_COUNT = count($MCR->get_ListOfActiveUsersIn_ChatRoom($THIS_ROOM)); if ($MU->isUserCurrently_InRoom($THIS_ROOM)) { $OTHERS = $ACTIVE_MEMBER_COUNT - 1; $me_in_class = "mein"; if ($OTHERS > 0) { $members_string = "You and {$OTHERS} others"; } else { $members_string = "Only You"; }
} }); return false; }); }; </script> <center> <div style='margin-left: auto; margin-right: auto; margin:2px; font-size: 110%; font-weight: bold; padding: 10px; width: 82%;'>List of Recent BookMarks</div> <div id='BOOKMARKSLIST'> <?php $MB = new ManageBookMarks(); $LASTX_BOOKMARKS_SQL = $MB->get_LastX_BookMarks_query($CURRENT_USERID, 200); $result = mysql_query($LASTX_BOOKMARKS_SQL); $MCR = new ManageChatRooms(); while ($row = mysql_fetch_array($result)) { $tmp_preview_str = "<div style='margin-top: 10px; padding: 10px; background-color: #F1F4E3; border-bottom: 2px solid #E7E7E7; text-align:left; display: table; width: 96%;' id='{$row['bkm_msgId']}'>"; if ($row['msgType'] == 'F') { $TMP_MF = new ManageFiles(); $d_fileId = $row['fileId']; $fileInfo = $TMP_MF->get_file_Info($d_fileId, $CURRENT_USERID); $tmp_preview_str .= "<div class='umsg' style='float:left; line-height:150%;'>" . USERID_TO_USERNAME($row['saidBy_empl_id']) . " has uploaded a file <a href='chatfiledownload.php?fc={$fileInfo['fileId']}'>{$fileInfo['fileName']}</a> <span style='color: #A9A9A9;'>" . formatBytesToHumanReadable($fileInfo['fileSize']) . "</span> <a rel='prettyPhoto[iframes]' href='filemail.php?fid={$fileInfo['fileId']}&iframe=true&width=800&height=400'>Email</a>"; if (in_array($fileInfo['fileExt'], array('jpg', 'jpeg', 'gif', 'png', 'bmp'))) { $tmp_preview_str .= "<br/><img src=files/chat_files/thumbs/{$fileInfo['fileRandomName']}>"; } $tmp_preview_str .= "</div>"; } else { // bkm_id, bkms.bkm_msgId, bkms.bkm_dmsgid, bkms.bkm_roomId, cRoom.message_base64 $tmp_preview_str .= "<div style='float:left; line-height:150%;'>" . USERID_TO_USERNAME($row['saidBy_empl_id']) . ": " . base64_decode($row['message_base64']) . "</div>"; }
echo ucwords(strtolower($CURRENT_USER)); ?> " ; var CHAT_USERS = {}; var LASTMSG_10_MIN_INTERVAL = '0000-00-00 00:0' ; var MY_NAME = '<?php echo $CURRENT_USER; ?> '; var lastmsg_user = ''; var umsg_bgclr = ''; <?php // Load last 100 messages into an array NEW_MESSAGES // and get the LASTFETCHEDMSGID $TMC = new ManageChatRooms(); $NMFR = $TMC->get_NewMessages_fromRoom(array('condition' => 'lastXMessages', 'value' => 1500), $rid, $CURRENT_USERID); echo " NEW_MESSAGES = " . json_encode($NMFR['NEW_MESSAGES']) . " ; "; echo " LASTFETCHEDMSGID = {$NMFR['LASTFETCHEDMSGID']} ;"; ?> var append_NEW_MESSAGES = function(){ var jq_div_ml = $("#tbl_messageLog") ; $("#tbl_messageLog TBODY TR.tmpmsg").remove(); var append_message = function( nmsg ){ // nmsg = { msgBy : '' , msgTime : '' , msg_base64 : '' } // show time if first 15 characters (same 10 minute interval) of '2010-10-09 04:31:42' is different than LASTMSG_TIME var thisMsg_10minuteInterval = nmsg.msgTime.substring(0, 15) ; if( thisMsg_10minuteInterval != LASTMSG_10_MIN_INTERVAL ){
include_once "include_functions.php"; include_once "include_header.php"; include_once "include_header_links.php"; ?> <script> var localajaxinit = function(){ }; </script> <?php $TMP_MU = new ManageUsers(); $ALLUSERS = $TMP_MU->getAllUserIdsInDomain(); $TMP_MCR = new ManageChatRooms(); $ACTIVE_USERS = $TMP_MCR->get_ListOfActiveUsersIn_Application(); ?> <table align=center class="manageLRS" cellpadding=5 cellspacing=5 width="500" style='margin-top:30px;'> <tbody> <table class="members"> <tbody> <?php foreach ($ALLUSERS as $this_uId) { $TMP_MU->userId = $this_uId; if ($this_uId == $CURRENT_USERID) { continue; } $THIS_USER_PROFILE = $TMP_MU->getUserProfile($this_uId); //print_r($THIS_USER_PROFILE);