-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact-list.php
107 lines (94 loc) · 2.2 KB
/
contact-list.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
include 'login.php';
if (empty($_SESSION['login_user'])){
header("location: home.php");
exit();
}
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Fjalla+One|Maitree|Ropa+Sans" rel="stylesheet">
<link rel="stylesheet" href="css/reset.css"> <!-- CSS reset -->
<link rel="stylesheet" href="css/style.css"> <!-- Resource style -->
<link rel="stylesheet" href="css/media.css">
<script src="js/modernizr.js"></script> <!-- Modernizr -->
<style>
body{
font-size: 20px;
font-family: calibri;
overflow:hidden;
}
body:hover{
overflow-y:auto;
}
span.user_name{
display: block;
font-size: 15px;
padding-top: 5px;
opacity: 0.5;
}
img.dp-icon{
float: left;
height: 45px;
width: 45px;
margin-right: 15px;
margin-bottom: 20px;
border-radius: 50%;
box-shadow: 1px 2px 5px rgba(100,100,100,0.3);
}
ul.contact-list li{
padding: 15px 20px;
border-bottom: 1px solid rgb(245,245,245);
}
ul.contact-list li:hover{
cursor: pointer;
background-color: #F3F3F3;
}
body::-webkit-scrollbar-track {
border-radius: 10px;
}
body::-webkit-scrollbar {
width: 8px;
background-color: #F5F5F5;
}
body::-webkit-scrollbar-thumb {
border-radius: 10px;
background-color: rgb(180,180,180);
}
</style>
</head>
<body>
<ul class="contact-list">
<?php
$data;
include 'conn.php';
$query = "call GetContactList(".$_SESSION['login_user'].")";
$table = mysqli_query($conn,$query);
if($table){
$rows=mysqli_num_rows($table);
if($rows > 0){
for($x = 0; $x<= $row; $x++){
$row = mysqli_fetch_assoc($table);
if ($row){
?>
<li onclick="init(<?php echo $row['id'] ?>, '<?php echo $row['name']?>')">
<img class="dp-icon" src="<?php echo $row['img_url'];?>">
<span class="full_name"><?php echo $row['name'];?><span><br/>
<span class="user_name">@<?php echo $row['user_name'];?></span>
</li>
<?php
}
}
}
}
?>
<script type="text/javascript">
function init(id,username){
window.parent.get_contact(id, username);
return true;
}
</script>
</ul>
</body>
</html>