-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_profil.php
More file actions
173 lines (160 loc) · 5.71 KB
/
Copy pathuser_profil.php
File metadata and controls
173 lines (160 loc) · 5.71 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
164
165
166
167
168
169
170
171
172
173
<?php
error_reporting(0);
include "koneksi/koneksi_db.php";
?>
<html> <!--Tidak bisa Include-->
<head>
<title>Menu Pelanggan</title>
<link rel="stylesheet" type="text/css" href="css/gaya-1.css"/>
<link href="images/Computer1.png" rel="SHORTCUT ICON">
<script type="text/javascript" src="js/twd-menu.js" charset="utf-8"></script>
<!--Java Script Validasi Form-->
<script type="text/javascript" src="js/validasi.js" ></script>
<!--Java Script dan CSS Menu Tab-->
<link rel="stylesheet" type="text/css" href="css/easyui.css">
<link rel="stylesheet" type="text/css" href="css/icon.css">
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<!--Java Script Navigasi Menu
<!--<script type="text/javascript" src="jquery-1.9.1.min.js" charset="utf-8"></script>-->
</head>
<body>
<div id="wraf">
<div id="twd-menu" >
<ul >
<li><a href="index.php">Home</a></li>
<li><a href="publik_tentang.php">Tentang</a></li>
<li><a href="publik_berita.php">Berita</a></li>
<li><a href="publik_kontak.php">Kontak</a></li>
<div class="nvskanan">
<a href="cart.php"><?php include "keranjang2.php"; ?></a>|<u><a href="user_profil.php">
<?php
//memulai session
//session_start();
//cek adanya session
if(isset($_SESSION['username'])){
//if (ISSET($_SESSION['username'])){
#echo "Anda Login Sebagai ";
echo $_SESSION['username'];
//jika tidak ada session
}else{
header("location: user_logout.php");
}
?>
</a></u>|<u><a href="user_logout.php">Logout</a></u>|<u><a href="publik_bantuan.php">Bantuan</a></u>
</div>
</ul>
</div>
<div id="header"><img src="images/header.png" href="index.php" width="100%" height="auto"></div>
<div class="GarisKepala"></div>
<div id="konten">
<div id="kontenkiriProfil">
<h3 class="h3Index">Profil <?php echo $_SESSION['username'];?></h3>
<?php
$username = isset($_SESSION['username']);
$password1 = isset($_SESSION['password1']);
$q=mysql_query("select * from tb_pegawai where username = '$username' and password = '$password1'");
?>
<?php
$query="select * from tb_pelanggan where username='".$_SESSION['username']."'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
?>
<table border="0" style="margin-left:4%;margin-top:2%;" >
<tr>
<td>Nama</td>
<td>:</td>
<td><?php echo $row['nama_pelanggan'];?></td>
</tr>
<tr>
<td>Jenis Kelamin</td>
<td>:</td>
<td><?php echo $row['jenis_kelamin'];?></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><?php echo $row['email'];?></td>
</tr>
<tr>
<td>Alamat</td>
<td>:</td>
<td><?php echo $row['alamat'];?></td>
</tr>
<tr>
<td>Kota</td>
<td>:</td>
<td><?php echo $row['kota'];?></td>
</tr>
<tr>
<td>Provinsi</td>
<td>:</td>
<td><?php echo $row['provinsi'];?></td>
</tr>
<tr>
<td>Kode Pos</td>
<td>:</td>
<td><?php echo $row['kode_pos'];?></td>
</tr>
<tr>
<td>No. Handphone</td>
<td>:</td>
<td><?php echo $row['no_hp'];?></td>
</tr>
<tr>
<td>No. KTP</td>
<td>:</td>
<td><?php echo $row['no_ktp'];?></td>
</tr>
<tr>
<td>Tanggal Lahir</td>
<td>:</td>
<td><?php echo $row['tanggal_lahir'];?></td>
</tr>
</table>
<table style="margin-left:10px;margin-top:30%;" >
<tr>
<td>
<a href="user_menu.php"><img src="images/back.png" width="10%" height="10%" alt="Kembali ke Menu Admin" title="Kembali ke Menu Pelanggan"></a>
</td>
</tr>
</table>
</div>
<div id="kontenkananProfil">
<h3 class="h3Index">Ganti Password</h3>
<form CELLSPACING="5px" name="ganti_pass" method="post" action="user_ganti_password.php" onSubmit="return validasiGantiPassword()">
<table border="0" style="margin-left:4%;margin-top:2%;">
<tr>
<td style="margin-right:5px;">Username</td>
<td >:</td>
<td ><input class="input" required type="text" name="username" value="<?php echo $_SESSION['username'];?>" readonly="readonly" style="width:100%;"></td>
<td rowspan="4"><input class="tombol" type="submit" title="Ganti Password" value="EDIT" style="padding:0px;height:90px;width:100%;"></td>
</tr>
<tr>
<td >Password Lama</td>
<td >:</td>
<td >
<input class="input" required type="password" name="passwordLama" style="width:100%;"></td>
</tr>
<tr>
<td >Password Baru</td>
<td >:</td>
<td >
<input class="input" required type="password" name="passwordBaru" style="width:100%;"></td>
</tr>
<tr>
<td >Konfirmasi Password Baru</td>
<td >:</td>
<td >
<input class="input" required type="password" name="KpasswordBaru" style="width:100%;"></td>
</tr>
</table>
</form>
</div>
</div>
<?php
include "elemen/kaki.php";
?>
<p align=center><img src="images/g.gif" align="center" alt="Smile" title="Smile"></p>
</body>
</html>