-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_user.php
More file actions
119 lines (93 loc) · 3.98 KB
/
edit_user.php
File metadata and controls
119 lines (93 loc) · 3.98 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
<?php
require_once("functions/function.php");
get_conn();
$uname=$_GET['uName'];
$sql = "SELECT * FROM users WHERE username= '$uname'";
$result=mysql_query($sql);
get_header();
get_sidebar();
get_bread_four();
get_err_message();
?>
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header" data-original-title>
<h2><i class="halflings-icon white edit"></i><span class="break"></span>Update User's Data</h2>
<div class="box-icon">
</div>
</div>
<div class="box-content">
<?php while($row=mysql_fetch_array($result)) {?>
<form class="form-horizontal" method="post" action="proses.php" enctype="multipart/form-data">
<fieldset>
<div class="control-group">
<div class="controls">
<input class="input-xlarge focused" name="id" id="focusedInput" type="hidden" placeholder="Name"
value="<?php echo $row['id']; ?>" >
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Userame:</label>
<div class="controls">
<input class="input-xlarge focused" name="txtname" id="focusedInput" type="text" placeholder="Name"
value="<?php echo $row['username']; ?>" >
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">UserType:</label>
<div class="controls">
<select class="input-xlarge focused" name="usertype" id="focusedInput" placeholder="Usertype" required>
<option name="usertype" value="1" <?php if($row['usertype'] == "1"){echo "selected";} ?>>Admin</option>
<option name="usertype" value="2" <?php if($row['usertype'] == "2"){echo "selected";} ?>>Adminaset</option>
<option name="usertype" value="3" <?php if($row['usertype'] == "3"){echo "selected";} ?>>PIC</option>
<option name="usertype" value="4" <?php if($row['usertype'] == "4"){echo "selected";} ?>>General User</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Name:</label>
<div class="controls">
<input class="input-xlarge focused" name="name" id="focusedInput" type="text" placeholder="Name"
value="<?php echo $row['name']; ?>" >
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Nama Makmal:</label>
<div class="controls">
<select class="input-xlarge focused" name="nama_makmal" id="focusedInput" type="text" placeholder="id makmal">
<option value="<?php echo $row['nama_makmal']; ?> "><?php echo $row['nama_makmal']; ?></option>
<option value=" ">----Pilih-----</option>
<?php
$sql="SELECT * FROM makmal
WHERE Not exists
(SELECT nama_makmal FROM users WHERE makmal.nama_makmal=users.nama_makmal)";
$query= mysql_query($sql);
while($rows=mysql_fetch_array($query)){
?>
<option value="<?php echo $rows['nama_makmal'] ?>" ><?php echo $rows['nama_makmal'] ?></option>
<?php }?>
</select>
</div>
</div>
<div class="form-actions">
<button type="submit" onclick="return confirmUpdate()" class="btn btn-primary">Kemaskini
</button>
<input type="hidden" name="edit_user" value="<?php echo $uname; ?>">
</div>
</fieldset>
</form>
<?php } ?>
</div>
</div> <!--/span-->
</div><!--/row-->
<?php
get_footer();
?>
<!-- <div class="common-modal modal fade" id="common-Modal1" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-content">
<ul class="list-inline item-details">
<li><a href="http://themifycloud.com">Admin templates</a></li>
<li><a href="http://themescloud.org">Bootstrap themes</a></li>
</ul>
</div>
</div> -->