/
chat.php
51 lines (48 loc) · 1.32 KB
/
chat.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
<html>
<head>
<meta charset="UTF-8">
<title>Chat</title>
<link rel='stylesheet prefetch' href='down/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
<style type="text/css">
#bo{
margin-left: 15px;
margin-right: 15px;
margin-top: 20px;
margin-bottom: 20px;
}
</style>
</head>
<body>
<?php
require_once 'header.php';
?>
<div id="bo">
<?php
require_once 'include/db_connect.php';
require_once 'include/essential.php';
?>
<?php
require_once 'include/db_connect.php';
require_once 'functions.php';
require_once 'include/essential.php';
echo"<h1>Chat List</h1><br>";
$fr= mysql_query("select user_one,user_two from frnd where user_one='$pid1' or user_two='$pid1'");
while ($frn = mysql_fetch_array($fr)) {
if($frn['user_one']==$pid1)
{
$frnid=$frn['user_two'];
}
else {
$frnid=$frn['user_one'];
}
$frname= getuser($frnid, 'user_name');
echo "<a href='chatbox.php?user=$frnid'class='btn btn-default btn-lg'style=margin:5px;>$frname</a><br><br>";
}
?>
</div>
</body>
<?php
require_once 'footer.php';
?>
</html>