Example #1
0
 public function get_ListOfAllUsersInRoom_andStatus($roomId)
 {
     // get list of all users
     // get list of active users
     $ALLUSERS_STATUSS = array();
     $allusers = $this->get_ListOfAllowedUsers($roomId);
     $activeUsers_inRoom = $this->get_ListOfActiveUsersIn_ChatRoom($roomId);
     foreach ($allusers as $this_userId) {
         $active_status = in_array($this_userId, $activeUsers_inRoom) ? 'active' : 'inactive';
         $ALLUSERS_STATUSS[] = array('userid' => $this_userId, 'username' => USERID_TO_USERNAME($this_userId), 'status' => $active_status);
     }
     return $ALLUSERS_STATUSS;
 }
Example #2
0
$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>&nbsp;&nbsp;&nbsp;<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>";
    }
    $tmp_preview_str .= "<div style='float:right;'><img src='images/bookmark.png' class='bmarkstar' msgid='{$row['bkm_msgId']}'  rid='{$row['bkm_roomId']}' ></div>";
    $tmp_preview_str .= "<div style='float:right; color: #C7AD8B; margin-right: 10px;'> " . $MCR->get_roomTitle($row['bkm_roomId']) . "</div>";
    $tmp_preview_str .= "</div>";
    echo $tmp_preview_str;
}
?>
		</div>
	</center>
<?php 
some_prettyPicture_JsCrap();
?>

<?php 
include_once "include_footer.php";
Example #3
0
		</TR>
		</TABLE>
		<TABLE width="738" cellpadding="4" cellspacing=4 border=0>
			<TR><TD align='right'>Room Title : </TD>
				<TD><input type='text' size='57' id='newRoom_title'></TD>
			</TR>
			<TR><TD align='right' valign='top' align='right'><NOBR>Room Description : </NOBR></TD>
				<TD><textarea cols=50 rows=3 id='newRoom_Description'></textarea></TD>
			</TR>
			<TR><TD align='right' valign='top' align='right'>Users : </TD>
				<TD>
					<div>
						<?php 
$ALLUSERS = $GMU->getAllUserIdsInDomain();
foreach ($ALLUSERS as $this_uId) {
    echo "<span ><label><NOBR><input type='checkbox' class='newRoom_users' value='{$this_uId}'>&nbsp;" . ucfirst(USERID_TO_USERNAME($this_uId)) . "</NOBR></label></span>&nbsp;<WBR>";
}
?>
					</div>
				</TD>
			</TR>
			<TR>
				<TD align=center valign='middle' colspan=2>
					<input type='button' value="Cancel" onclick="$('#div_createNewRoom_container').hideWithBg();">
					<input type='button' value="Create" onclick="create_newRoom();">
				</TD>
			</TR>
		</TABLE>
	</div>

<?php 
Example #4
0
 } else {
     $bgcolor = '#F1F4E3';
     $textcolor = '#000000';
 }
 $tmp_preview_str = "<div style='margin-top: 10px; padding: 10px; color: {$textcolor}; background-color: {$bgcolor}; border-bottom: 2px solid #E7E7E7; text-align:left; display:table; width:96%;'>";
 if ($row['to_uid'] == $_SESSION['empl_id']) {
     $msg_class = "leftbox_msg";
     $user_float = "float:left;";
     $mark_float = "float:right;";
     $from_to_name = USERID_TO_USERNAME($row['from_uid']);
     $user_image = USERID_TO_USERPIC($row['from_uid']);
 } else {
     $msg_class = "rightbox_msg";
     $user_float = "float:right;";
     $mark_float = "float:left;";
     $from_to_name = "To " . USERID_TO_USERNAME($row['to_uid']);
     $user_image = USERID_TO_USERPIC($row['to_uid']);
 }
 $tmp_preview_str .= "<div style='{$user_float}'>{$from_to_name}:<div><img width='60' height='60' src='files/users/thumbs/{$user_image}'><div>" . $row['msgtime'] . "</div></div></div>";
 $file_str = '';
 if ($row['msgType'] == 'F') {
     $MF = new ManageFiles();
     $THIS_FILEINFO = $MF->get_file_Info($row['fileId'], $CURRENT_USERID);
     $file_str .= "<div>File Name: <a href='chatfiledownload.php?fc={$THIS_FILEINFO['fileId']}'>{$THIS_FILEINFO['fileName']}</a>";
     if (in_array($THIS_FILEINFO['fileExt'], array('jpg', 'jpeg', 'gif', 'png', 'bmp'))) {
         $file_str .= "<br/><a href='chatfiledownload.php?fc={$THIS_FILEINFO['fileId']}'><img src=files/chat_files/thumbs/{$THIS_FILEINFO['fileRandomName']}></a>";
     }
     $file_str .= "</div>";
 }
 $tmp_preview_str .= "<div class='{$msg_class}'>&nbsp;" . stripslashes(base64_decode($row['msg_base64'])) . "{$file_str}</div>";
 if ($row['msgStatus'] == 'N' && $row['to_uid'] == $_SESSION['empl_id']) {