-
Notifications
You must be signed in to change notification settings - Fork 0
/
room.php
59 lines (53 loc) · 2.47 KB
/
room.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div class="col-lg-12">
<div class="panel panel-default" style="height:50px;">
<span style="font-size:18px; margin-left:10px; position:relative; top:13px;"><strong>Chat Room: <?php echo $chatrow['chat_name']; ?></strong></span>
<div class="pull-right" style="margin-right:10px; margin-top:7px;">
<span id="user_details" style="font-size:18px; position:relative; top:2px;"><strong>Members: </strong><span class="badge"><?php echo mysqli_num_rows($cmem); ?></span></span>
<a href="#add_member" data-toggle="modal" class="btn btn-primary">Add Member</a>
<a href="#delete_room" data-toggle="modal" class="btn btn-danger">Delete Room</a>
<a href="index.php" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left"></span> Back</a>
</div>
<div class="showme hidden" style="position: absolute; left:570px; top:20px;">
<div class="well">
<strong>Room Member/s:</strong>
<div style="height: 10px;"></div>
<?php
$rm=mysqli_query($conn,"select * from chat_member left join `user` on user.userid=chat_member.userid where chatroomid='$id'");
while($rmrow=mysqli_fetch_array($rm)){
?>
<span>
<?php
$creq=mysqli_query($conn,"select * from chatroom where chatroomid='$id'");
$crerow=mysqli_fetch_array($creq);
if ($crerow['userid']==$rmrow['userid']){
?>
<span class="glyphicon glyphicon-user"></span>
<?php
}
?>
<?php echo $rmrow['uname']; ?></span><br>
<?php
}
?>
</div>
</div>
</div>
<div>
<div class="panel panel-default" style="height: 400px;">
<div style="height:10px;"></div>
<span style="margin-left:10px;">Welcome to Chatroom</span><br>
<span style="font-size:10px; margin-left:10px;"><i>Note: Avoid using foul language and hate speech to avoid banning of account</i></span>
<div style="height:10px;"></div>
<div id="chat_area" style="margin-left:10px; max-height:320px; overflow-y:scroll;">
</div>
</div>
<div class="input-group">
<input type="text" class="form-control" placeholder="Type message..." id="chat_msg">
<span class="input-group-btn">
<button class="btn btn-success" type="submit" id="send_msg" value="<?php echo $id; ?>">
<span class="glyphicon glyphicon-comment"></span> Send
</button>
</span>
</div>
</div>
</div>