-
Notifications
You must be signed in to change notification settings - Fork 0
/
profil-duzenle.php
138 lines (118 loc) · 3.24 KB
/
profil-duzenle.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
<?php
session_start();
include_once 'config.php';
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(!isset($_SESSION['kullaniciadi'])){
header("Location: index.php");
exit();
}
$kullaniciadi = $_SESSION['kullaniciadi'];
$errors = array();
$success = array();
if(isset($_POST['update'])){
$kullaniciadi = $_POST['kullaniciadi'];
$sifre = $_POST['sifre'];
if(empty($errors)){
$conn->query("UPDATE kullanicilar SET kullaniciadi='$kullaniciadi', sifre='$sifre'");
$success[] = 'Profiliniz başarıyla güncellendi.';
}
}
$result = $conn->query("SELECT kullaniciadi, sifre FROM kullanicilar");
$row = $result->fetch_assoc();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/profil-duzenle.css">
<link rel="stylesheet" href="css/panel.css">
<link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
<title>Profil Düzenle</title>
</head>
<title>Profil Düzenle</title>
<body>
<nav class="navbar">
<ul class="navbar-nav">
<li class="nav-item">
<a href="panel.php" class="nav-link"><i class="fa fa-home"></i> Panel</a>
</li>
<li class="nav-item">
<a href="https://discord.gg/xFsKXkmnbJ" class="nav-link"><i class="fa fa-link"></i> Discord</a>
</li>
</ul>
<ul class="navbar-profile">
<li class="nav-item">
<a href="#" class="nav-link">
<div class="user-info">
<i class="fa fa-user"></i>
<?php echo $kullaniciadi; ?>
</div>
</a>
<ul class="dropdown">
<li><a href="profil-duzenle.php">Profil Düzenle</a></li>
<li><a href="cikis.php">Çıkış Yap</a></li>
</ul>
</li>
</ul>
</nav>
<div class="div1">
<h1>Profil Düzenle</h1>
<?php if(!empty($errors)): ?>
<div>
<ul>
<?php foreach($errors as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if(!empty($success)): ?>
<div>
<ul>
<?php foreach($success as $message): ?>
<li><?php echo $message; ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<form method="post" action="profil-duzenle.php">
<label for="kullaniciadi">Kullanıcı Adı:</label>
<input type="text" id="kullaniciadi" name="kullaniciadi" value="<?php echo $row['kullaniciadi']; ?>">
<br>
<label for="sifre">Şifre:</label>
<input type="password" id="sifre" name="sifre" value="">
<br>
<button type="submit" name="update">Güncelle</button>
</form>
</div>
</body>
<footer>
<div>
<style>
footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
font-size: 12px;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
.arx {
text-decoration: none;
}
.arx p {
color: #000;
}
.arx:hover {
text-decoration: none;
}
</style>
<img src="https://arxdevelopers.github.io/assets/img/arx-logo.png" alt="ARX" width="50" height="50">
<div class="arx">
<a href="https://arxdevelopers.github.io"><p>ArX Developers</p></a>
</div>
</div>
</footer>
</html>