-
Notifications
You must be signed in to change notification settings - Fork 0
/
find.php
137 lines (133 loc) · 5.22 KB
/
find.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
include "conn.php";
include "auth.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.3.0/mdb.min.css" rel="stylesheet" />
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<link rel="icon" href="img/n.jpg" type="image/x-icon">
<title>Find Friend | NAMASTE</title>
<style>
* {
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
h1,h2,h3,h4,h5,h6{
font-weight: bold;
}
.container {
margin: auto;
font-family: "Poppins", Arial, san-serif;
line-height: 1.4;
display: flex;
justify-content: center;
align-items: center;
background-color: #f9f9f9;
height: 100%;
}
.card {
background: #fff;
background-size: contain;
border-radius: 10px;
box-shadow: 0 10px 30px -5px rgba(60, 60, 60, 0.2);
text-align: center;
padding: 30px;
}
.card img {
background-color: #dddfe6;
height: 120px;
width: 120px;
border-radius: 50%;
margin: auto auto 15px;
display: block;
}
.card h1 {
font-size: 22px;
margin: 10px auto 0;
letter-spacing: 1px;
}
.card h2 {
margin: auto;
color: #b1b6c6;
font-weight: 300;
font-size: 14px;
}
.navbar{
height: 60px;
padding-left:30px;
}
.fa-arrow-circle-left{
font-size: 25px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container-fluid">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<a href="home.php"><i class="fas fa-arrow-circle-left"></i></a>
<li class="breadcrumb-item"><a href="home.php">Home</a></li>
<li class="breadcrumb-item active" aria-current="page"><b>Find Friends</b></li>
</ol>
</nav>
</div>
</nav>
<div class="container mt-5 pt-3 bg-white">
<div class="row p-2">
<?php
$findSql = "SELECT * FROM `login`;";
$result = mysqli_query($conn, $findSql);
if(mysqli_num_rows($result)>0)
{
while($data = mysqli_fetch_assoc($result))
{
$friendUsername = $data['username'];
$friendEmail = $data['email'];
$friendMobile = $data['mobile'];
$target = $friendUsername.$username;
if($friendUsername != $username && $friendUsername != 'bot'){
$getImg ="SELECT * FROM `dp` WHERE `username` = '$friendUsername';";
$imgResult = mysqli_query($conn, $getImg);
if(mysqli_num_rows($imgResult)>0) {
$imgData = mysqli_fetch_array($imgResult);
$folder = $imgData['folder'];
}
else
{
$folder = "asset/user.png";
}
echo "
<div class='col-md-4 p-3'>
<div class='card'>
<img src='$folder' alt='User'>
<h1 class='font-weight-bold mb-1'>$friendUsername</h1>
<h2><i class='fas fa-envelope'></i> $friendEmail</h2>
<h2><i class='fas fa-mobile-alt'></i> $friendMobile</h2>
<div class='container bg-white'>
<a href='friendProfile.php?id=$friendUsername' type='button' class='btn btn-lg btn-outline-danger btn-rounded m-1 mt-3 fw-bold' data-mdb-ripple-color='dark'>Profile</a>
<a href='create.php?id=$target' type='button' title='Messsage' class='btn btn-lg btn-primary btn-floating m-1 mt-3'><i class='fas fa-paper-plane fa-lg''></i></a>
</div>
</div>
</div>";
}
}
}
?>
</div>
</div>
</body>
</html>