-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangecontact.php
More file actions
178 lines (156 loc) · 6.92 KB
/
changecontact.php
File metadata and controls
178 lines (156 loc) · 6.92 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
174
175
176
177
178
<?php
require 'header.php';
if($_SESSION['id']=="nouser"){
?>
<script language="javascript">alert("Anda harus login terlebih dahulu");</script>
<script>document.location.href='masuk.php';</script>
<?php
}
?>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="A front-end template that helps you build fast, modern mobile web apps.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Profile</title>
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="user/images/android-desktop.png">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Material Design Lite">
<link rel="apple-touch-icon-precomposed" href="user/images/ios-desktop.png">
<!-- Tile icon for Win8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="user/images/touch/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#3372DF">
<link rel="shortcut icon" href="user/images/favicon.png">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- SEO: If your mobile URL is different from the desktop URL, add a canonical link to the desktop page https://developers.google.com/webmasters/smartphone-sites/feature-phones -->
<!--
<link rel="canonical" href="http://www.example.com/">
-->
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="utama/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="utama/css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body>
<?php
if(isset($_SESSION['id'])) {
$id = $_SESSION['id'];
$query = mysqli_query($connect, "SELECT * FROM user WHERE id_user = '$id'");
$result = mysqli_fetch_array($query);
?>
<div class="card-panel grey lighten-2">
<div class="container">
<div class="row">
<h5> Profile: <?php echo $result['nama_user']?> </h5>
<div class="card blue-grey lighten-1">
<div class="card-content white-text">
<div class="col s12">
<ul class="tabs">
<li class="tab col s3 disabled"><a href="#test1">Umum</a></li>
<li class="tab col s3"><a class="active" href="#test2">Kontak</a></li>
<li class="tab col s3 disabled"><a href="#test3">Privasi</a></li>
<li class="tab col s3 disabled"><a href="#test4">Foto</a></li>
</ul>
</div>
<div id="test2" class="col s12">
<div class="col s4">
<img src="<?php echo $result['foto']?>" width="250" height="250" class="circle responsive-img">
</div>
<div class="col s8">
<table>
<thead>
<tr>
<th data-field="id">Informasi Kontak</th>
<th data-field="name"><button class="btn waves-effect waves-light" type="submit" name="action" disabled>Ubah</button></th>
</tr>
</thead>
<tbody>
<tr>
<td>Email:</td>
<td><?php echo $result['email']?></td>
</tr>
<tr>
<td>No Handphone:</td>
<td><?php echo $result['no_telp']?></td>
</tr>
<form action="changecontactproses.php" method="post">
<tr>
<td>Email:</td>
<td>
<input placeholder="Email" id="password" type="text" name="email" class="validate" required>
</td>
</tr>
<tr>
<td>No Handphone:</td>
<td>
<input placeholder="No Handphone" id="password" type="text" name="no_telp" class="validate" required>
</td>
</tr>
<tr>
<td><a href="profile.php"><button class="btn waves-effect waves-light" type="submit" name="action">Batal</button></a></td>
<td><button class="btn waves-effect waves-light" type="submit" name="action">Ubah</button></td>
</tr>
</form>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="card-panel blue-grey darken-4">
<div class="card-content white-text">
Recent Post
</div>
</div>
<?php
/** $query2=mysqli_query($connect, "SELECT * FROM report WHERE id_user = '$id'");
while ($result2=mysqli_fetch_assoc($query2)) { ?>
<br>
<div class="container">
<div class="row">
<div class="section">
<div class="card">
<p>Posted on <?php echo $result2['timestamp']?></p>
<div class="card-image waves-effect waves-block waves-light">
<img class="activator" src="<?php echo $result2['foto']?>">
</div>
<div class="card-content">
<span class="card-title activator grey-text text-darken-4">Daerah : <?php echo $result2['kec']?><i class="material-icons right">more_vert</i></span>
</div>
<div class="card-reveal span.card-title">
<div class="activator">
<span class="card-title grey-text text-darken-4">Daerah : <?php echo $result2['kec']?><i class="material-icons right">close</i></span>
<p><?php echo $result2['deskripsi']?></p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } **/?>
</div>
</div>
</div>
<script src="user/material.min.js"></script>
<script src="utama/js/jquery-2.1.4.min.js"></script>
<script src="utama/js/materialize.min.js"></script>
<script src="utama/js/init.js"></script>
<script src="utama/js/jquery.chained.min.js"></script>
<script>
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears:60 // Creates a dropdown of 15 years to control year
});
$(".button-collapse").sideNav();
$('.fixed-action-btn').openFAB();
$('.fixed-action-btn').closeFAB();
</script>
<?php } ?>
</body>
</html>