-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathofficeBearer.php
229 lines (167 loc) · 8.09 KB
/
officeBearer.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
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?php require_once 'php_action/db_connect.php' ?>
<?php require_once 'includes/header.php';
if($_SESSION['userId']!=1) {
header('location: dashboard.php');
}
?>
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="dashboard.php">Home</a></li>
<li class="active">OfficeBearers</li>
</ol>
<div class="panel panel-default">
<div class="panel-heading">
<div class="page-heading"> <i class="glyphicon glyphicon-edit"></i> Manage OfficeBearers</div>
</div>
<div class="panel-body">
<div class="remove-messages"></div>
<div class="div-action pull pull-right" style="padding-bottom:20px;">
<button class="btn btn-default button1" data-toggle="modal" id="addUserModalBtn" data-target="#addUserModal"> <i class="glyphicon glyphicon-plus-sign"></i> Add OfficeBearer </button>
</div>
<table class="table" id="manageUserTable">
<thead>
<tr>
<th style="width:10%;">Name</th>
<th style="width:10%;">Login Id</th>
<th style="width:15%;">Password</th>
<th style="width:15%;">Post</th>
<th style="width:15%;">Options</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<div class="modal fade" id="addUserModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" id="submitUserForm" action="php_action/createOfficeBearer.php" method="POST">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Add OfficeBearer</h4>
</div>
<div class="modal-body" style="max-height:450px; overflow:auto;">
<div id="add-user-messages"></div>
<div class="form-group">
<label for="uroll" class="col-sm-3 control-label">Login Id: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uroll" placeholder="Login Id of the OfficeBearer" name="uroll" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="upass" class="col-sm-3 control-label">Password: </label>
<div class="col-sm-8">
<input type="password" class="form-control" id="upass" placeholder="Initial Password" value="password" name="upass" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u1" class="col-sm-3 control-label">Name: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="u1" placeholder="Name" name="u1" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u2" class="col-sm-3 control-label">Contact Number: </label>
<div class="col-sm-8">
<input type="number" class="form-control" id="u2" placeholder="Contact Number" name="u2" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u3" class="col-sm-3 control-label">Permission: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="u3" placeholder="Default" value="4" name="u3" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="uhostel" class="col-sm-3 control-label">Post: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uhostel" placeholder="post" name="uhostel" autocomplete="off">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="submit" class="btn btn-primary" id="createUserBtn" data-loading-text="Loading..." autocomplete="off"> <i class="glyphicon glyphicon-ok-sign"></i> Save Changes</button>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="editUserModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal" id="editUserForm">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="fa fa-edit"></i> Edit OfficeBearer</h4>
</div>
<div class="modal-body" style="max-height:450px; overflow:auto;">
<div id="edit-user-messages"></div>
<div class="form-group">
<label for="uroll1" class="col-sm-3 control-label">New Login Id: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uroll1" placeholder="Login Id of the office bearer" name="uroll1" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="upass1" class="col-sm-3 control-label">New Password: </label>
<div class="col-sm-8">
<input type="password" class="form-control" id="upass1" placeholder="Initial Password" name="upass1" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u11" class="col-sm-3 control-label">New name: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="u11" placeholder="Name" name="u11" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u21" class="col-sm-3 control-label">New Contact Number: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="u21" placeholder="Contact Number" name="u21" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="u31" class="col-sm-3 control-label">New Permission: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="u31" placeholder="Default" name="u31" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="uhostel1" class="col-sm-3 control-label">New Post: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="uhostel1" placeholder="post" name="uhostel1" autocomplete="off">
</div>
</div>
</div>
<div class="modal-footer editUserFooter">
<button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="submit" class="btn btn-success" id="editProductBtn" data-loading-text="Loading..."> <i class="glyphicon glyphicon-ok-sign"></i> Save Changes</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="removeUserModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="glyphicon glyphicon-trash"></i> Remove OfficeBearer</h4>
</div>
<div class="modal-body">
<div class="removeUserMessages"></div>
<p>Do you really want to remove ?</p>
</div>
<div class="modal-footer removeProductFooter">
<button type="button" class="btn btn-default" data-dismiss="modal"> <i class="glyphicon glyphicon-remove-sign"></i> Close</button>
<button type="button" class="btn btn-primary" id="removeProductBtn" data-loading-text="Loading..."> <i class="glyphicon glyphicon-ok-sign"></i> Save changes</button>
</div>
</div>
</div>
</div>
<script src="custom/js/officeBearer.js"></script>
<?php require_once 'includes/footer.php'; ?>