-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
165 lines (142 loc) · 6.01 KB
/
profile.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
ini_set('session.cache_limiter','public');
session_cache_limiter(false);
session_start();
include("config.php");
if(!isset($_SESSION['uemail']))
{
header("location:login.php");
}
////// code
$error='';
$msg='';
if(isset($_POST['insert']))
{
$name=$_POST['name'];
$phone=$_POST['phone'];
$content=$_POST['content'];
$uid=$_SESSION['uid'];
if(!empty($name) && !empty($phone) && !empty($content))
{
$sql="INSERT INTO feedback (uid,fdescription,status) VALUES ('$uid','$content','0')";
$result=mysqli_query($con, $sql);
if($result){
$msg = "<p class='alert alert-success'>Feedback Send Successfully</p> ";
}
else{
$error = "<p class='alert alert-warning'>Feedback Not Send Successfully</p> ";
}
}else{
$error = "<p class='alert alert-warning'>Please Fill all the fields</p>";
}
}
?>
<html>
<head>
<!-- HYML Header start -->
<?php include("include/html_header.php");?>
<!-- HYML Header end -->
</head>
<body>
<!-- Page Loader
=============================================================
<div class="page-loader position-fixed z-index-9999 w-100 bg-white vh-100">
<div class="d-flex justify-content-center y-middle position-relative">
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
-->
<div id="page-wrapper">
<div class="row">
<!-- Header start -->
<?php include("include/header.php");?>
<!-- Header end -->
<!-- Banner --->
<div class="rtable brdrClrHdr" style="background-image: url('images/banner/04.jpg'); min-width: 95%; max-width: 95%;min-height: 105%;margin:0 auto;margin-top:2px;">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2 class="page-name float-left text-white text-uppercase mt-1 mb-0"><b>Profile</b></h2>
</div>
<div class="col-md-6">
<nav aria-label="breadcrumb" class="float-left float-md-right">
<ol class="breadcrumb bg-transparent m-0 p-0">
<li class="breadcrumb-item text-white"><a href="#">Home</a></li>
<li class="breadcrumb-item active">Profile</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<!-- Banner --->
<!-- Submit property -->
<div class="full-row">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2 class="text-secondary double-down-line text-center">Profile</h2>
</div>
</div>
<div class="dashboard-personal-info p-5 bg-white">
<form action="#" method="post">
<h5 class="text-secondary border-bottom-on-white pb-3 mb-4">Feedback Form</h5>
<?php echo $msg; ?><?php echo $error; ?>
<div class="row">
<div class="col-lg-6 col-md-12">
<div class="form-group">
<label for="user-id">Name</label>
<input type="text" name="name" class="form-control" placeholder="Enter Name">
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="text" name="phone" class="form-control" placeholder="Enter Phone" maxlength="10">
</div>
<div class="form-group">
<label for="about-me">Description</label>
<textarea class="form-control" name="content" rows="7" placeholder="Enter Description"></textarea>
</div>
<input type="submit" class="btn btn-primary mb-4" name="insert" value="Send">
</div>
</form>
<div class="col-lg-1"></div>
<div class="col-lg-5 col-md-12">
<?php
$uid=$_SESSION['uid'];
$query=mysqli_query($con,"SELECT * FROM `user` WHERE uid='$uid'");
while($row=mysqli_fetch_array($query))
{
?>
<div class="user-info mt-md-50"> <img src="admin/user/<?php echo $row['6'];?>" alt="userimage">
<div class="mb-4 mt-3">
</div>
<div class="font-18">
<div class="mb-1 text-capitalize"><b>Name:</b> <?php echo $row['1'];?></div>
<div class="mb-1 text-capitalize"><b>Email:</b> <?php echo $row['2'];?></div>
<div class="mb-1 text-capitalize"><b>Phone:</b> <?php echo $row['3'];?></div>
<div class="mb-1 text-capitalize"><b>Role:</b> <?php echo $row['5'];?></div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Submit property -->
<!-- Footer start-->
<?php include("include/footer.php");?>
<!-- Footer start-->
<!-- Scroll to top -->
<a href="#" class="bg-secondary text-white hover-text-secondary" id="scroll"><i class="fas fa-angle-up"></i></a>
<!-- End Scroll To top -->
</div>
</div>
<!-- Wrapper End -->
<!-- HYML footer start -->
<?php include("include/html_footer.php");?>
<!-- HYML footer end -->
</body>
</html>