-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathedit_profile.php
More file actions
163 lines (133 loc) · 6.47 KB
/
edit_profile.php
File metadata and controls
163 lines (133 loc) · 6.47 KB
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
<?php
session_start();
if(empty($_SESSION)){
header('Location:index.php');
}
?>
<?php
if(!empty($_SESSION['photo'])){
$pphoto = $_SESSION['photo'];
}else{
$pphoto ="img/p_logo.png";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="css/style.css">
<!--Bootstrap CDNs-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<title>Document</title>
</head>
<body style="background-color:#f2f2f2" onload="myLoading()">
<div id="loadingScreen"></div>
<?php include "includes/header.php"; ?>
<div class="container mt-20">
<div class="row">
<div class="col-10 offset-1">
<div class="card border-success">
<div class="card-body">
<div class="row">
<div class="col-4">
<img style="border-radius: 50%; height: 200px; width: 200px; margin-left: 20px" class="" src="<?php echo $pphoto ?>"><hr>
</div>
<div class="col-6">
<div class="card-body">
<h1><?php echo $_SESSION['name']; ?>'s Profile: </h1>
<h5>About: <?php echo $_SESSION['about']; ?></h5>
<h5>Phone no: <?php echo $_SESSION['phone']; ?></h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-20 bt-20">
<div class="row">
<div class="col-10 offset-1">
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-4">
<div class="card border-info">
<img class="card-img-top" src="<?php echo $pphoto ?>">
<div class="card-body">
<div class="card-title">
<hr> <h4><?php echo $_SESSION['name']; ?></h4><hr>
<button id="changeImage" style="text-align: center" class="btn btn-sm btn-primary" data-toggle="modal" data-target=".bd-example-modal-sm">Change Image</button>
</div>
</div>
</div>
</div>
<div class="col-8">
<div class="card border-secondary">
<div class="card-body">
<h3 class="text-canter"><b>Change Your Profile Information: </b></h3><hr>
<form class="form" action="change_prf.php" method="post">
<label> Change Your Name: </label>
<input type="text" name="username" class="form-control" >
<label> Change Email: </label>
<input type="email" name="email" class="form-control" >
<label> Change Your Bio: </label>
<input type="text" name="about" class="form-control" >
<label> Change Your Phone Number: </label>
<input type="number" name="phone" class="form-control" ><br><br>
<input type="submit" value="Change Information" class="btn btn-block bg-nav text-light">
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- modal -->
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog col-6 offset-3">
<div class="modal-content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="card-title">
<h3 class="text-center">Upload New Profile photo</h3><hr>
</div>
<div class="row">
<div class="col-12">
<div class="row">
<form enctype="multipart/form-data" action="p_update.php" method="post">
<input style="margin: 20px;" type="file" name="user_ka_photo">
<input type="submit" class="btn btn-danger rounded" value="Upload">
</form>
</div><hr>
<button type="button" class="btn btn-secondary float-right" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var preloader = document.getElementById('loadingScreen');
function myLoading(){
preloader.style.display = 'none';
}
</script>
</body>
</html>