1 | <?php
|
---|
2 | $base_url = base_url();
|
---|
3 | $this->load->view('layout/admin/header', array('base_url' => $base_url));
|
---|
4 | $this->load->view('layout/admin/sidebar', array('base_url' => $base_url));
|
---|
5 | ?>
|
---|
6 | <script type="text/javascript">
|
---|
7 | function init_page()
|
---|
8 | {
|
---|
9 | $(".ajax_paging").click(function () {
|
---|
10 | $.ajax({
|
---|
11 | url: $(this).attr("href"),
|
---|
12 | type: "POST",
|
---|
13 | data: $("#user").serialize(),
|
---|
14 | success: function (data, textStatus, jqXHR)
|
---|
15 | {
|
---|
16 | $("#content").html(data);
|
---|
17 | init_page();
|
---|
18 | },
|
---|
19 | error: function (jqXHR, textStatus, errorThrown)
|
---|
20 | {
|
---|
21 | $(".ajaxloading").hide();
|
---|
22 | }
|
---|
23 | });
|
---|
24 | return false;
|
---|
25 | });
|
---|
26 | $('#keyword').bind('input', function(){
|
---|
27 | filter();
|
---|
28 | });
|
---|
29 |
|
---|
30 | $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
|
---|
31 | var current_class=$( this ).attr('class');
|
---|
32 | $(".sorting_desc").attr("class","sorting");
|
---|
33 | $(".sorting_asc").attr("class","sorting");
|
---|
34 |
|
---|
35 | if(current_class=='sorting')
|
---|
36 | {
|
---|
37 | $(this).attr("class","sorting_desc");
|
---|
38 | }
|
---|
39 | else
|
---|
40 | {
|
---|
41 | if(current_class=='sorting_desc')
|
---|
42 | {
|
---|
43 | $(this).attr("class","sorting_asc");
|
---|
44 | }
|
---|
45 | else
|
---|
46 | {
|
---|
47 | if(current_class=='sorting_asc')
|
---|
48 | {
|
---|
49 | $(this).attr("class","sorting");
|
---|
50 | }
|
---|
51 | }
|
---|
52 | }
|
---|
53 | $("#sorting_field").val($(this).attr("id"));
|
---|
54 | $("#sorting_order").val($(this).attr("class"));
|
---|
55 | filter();
|
---|
56 | });
|
---|
57 | }
|
---|
58 |
|
---|
59 | function filter()
|
---|
60 | {
|
---|
61 | $.ajax({
|
---|
62 | url: 'http://viettel.violet.vn/admin/nguoi_dung/trang/1',
|
---|
63 | type: "POST",
|
---|
64 | data: $("#user").serialize(),
|
---|
65 | success: function (data, textStatus, jqXHR)
|
---|
66 | {
|
---|
67 | $("#content").html(data);
|
---|
68 | init_page();
|
---|
69 | $("#keyword").focus();
|
---|
70 | $("#keyword").setCursorToTextEnd();
|
---|
71 |
|
---|
72 | },
|
---|
73 | error: function (jqXHR, textStatus, errorThrown)
|
---|
74 | {
|
---|
75 | $(".ajaxloading").hide();
|
---|
76 | }
|
---|
77 | });
|
---|
78 | }
|
---|
79 |
|
---|
80 | </script>
|
---|
81 |
|
---|
82 | <div class="main-content" id="content">
|
---|
83 | <?php echo $content; ?>
|
---|
84 | </div><!-- /.main-content -->
|
---|
85 | </div><!-- /.main-container-inner -->
|
---|
86 |
|
---|
87 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
88 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
89 | </a>
|
---|
90 | </div><!-- /.main-container -->
|
---|
91 |
|
---|
92 | <div id="addUser" class="modal fade in" tabindex="-1">
|
---|
93 | <div class="modal-dialog">
|
---|
94 | <div class="modal-content">
|
---|
95 | <div class="modal-header no-padding">
|
---|
96 | <div class="table-header">
|
---|
97 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
---|
98 | <span class="white">Ã</span>
|
---|
99 | </button>
|
---|
100 | Thêm ngưá»i dùng
|
---|
101 | </div>
|
---|
102 | </div>
|
---|
103 |
|
---|
104 | <div class="modal-body">
|
---|
105 | <form id="add_frm" onsubmit="return false;" class="form-horizontal" role="form">
|
---|
106 | <div class="form-group">
|
---|
107 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoại </label>
|
---|
108 |
|
---|
109 | <div class="col-sm-9">
|
---|
110 | <span class="input-icon">
|
---|
111 | <input name="phone" type="text" id="form-field-1" placeholder="Phone">
|
---|
112 | <i class="icon-user blue"></i>
|
---|
113 | </span>
|
---|
114 | </div>
|
---|
115 | <div class="help-block"> </div>
|
---|
116 | </div>
|
---|
117 | <div class="form-group">
|
---|
118 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Tên ÄÄng nháºp </label>
|
---|
119 |
|
---|
120 | <div class="col-sm-9">
|
---|
121 | <span class="input-icon">
|
---|
122 | <input name="login_name" type="text" id="form-field-2" placeholder="Tà i khoản">
|
---|
123 | <i class="icon-user blue"></i>
|
---|
124 | </span>
|
---|
125 | </div>
|
---|
126 | <div class="help-block"> </div>
|
---|
127 | </div>
|
---|
128 |
|
---|
129 | <div class="form-group">
|
---|
130 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máºt khẩu </label>
|
---|
131 |
|
---|
132 | <div class="col-sm-9">
|
---|
133 | <span class="input-icon">
|
---|
134 | <input type="password" name="passwd" id="form-field-3" placeholder="Máºt khẩu">
|
---|
135 | <i class="icon-lock blue"></i>
|
---|
136 | </span>
|
---|
137 | </div>
|
---|
138 | <div class="help-block"> </div>
|
---|
139 | </div>
|
---|
140 | <div class="form-group">
|
---|
141 | <label class="col-sm-3 control-label no-padding-right" for="form-field-4"> Xác nháºn máºt khẩu </label>
|
---|
142 |
|
---|
143 | <div class="col-sm-9">
|
---|
144 | <span class="input-icon">
|
---|
145 | <input type="password" name="passwd2" id="form-field-4" placeholder="Nháºp lại máºt khẩu">
|
---|
146 | <i class="icon-lock blue"></i>
|
---|
147 | </span>
|
---|
148 | </div>
|
---|
149 | <div class="help-block"> </div>
|
---|
150 | </div>
|
---|
151 |
|
---|
152 | <div class="space-4"></div>
|
---|
153 | <div class="form-group errors" id="add_user">
|
---|
154 |
|
---|
155 | </div>
|
---|
156 | <div class="clearfix form-actions">
|
---|
157 | <div class="col-md-offset-3 col-md-9">
|
---|
158 | <button class="btn btn-info" id="add_user" type="button">
|
---|
159 | <i class="icon-ok bigger-110"></i>
|
---|
160 | Hoà n tất
|
---|
161 | </button>
|
---|
162 |
|
---|
163 |
|
---|
164 | <button class="btn" type="reset">
|
---|
165 | <i class="icon-undo bigger-110"></i>
|
---|
166 | Xóa hết
|
---|
167 | </button>
|
---|
168 | </div>
|
---|
169 | </div>
|
---|
170 |
|
---|
171 | </form></div>
|
---|
172 |
|
---|
173 | </div>
|
---|
174 | </div><!-- /.modal-content -->
|
---|
175 | </div><!-- /.modal-dialog -->
|
---|
176 |
|
---|
177 | <!-- Edit User -->
|
---|
178 | <div tabindex="-1" class="modal fade in" id="editUser">
|
---|
179 | <div class="modal-dialog">
|
---|
180 | <div class="modal-content">
|
---|
181 | <div class="modal-header no-padding">
|
---|
182 | <div class="table-header">
|
---|
183 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
184 | <span class="white">Ã</span>
|
---|
185 | </button>
|
---|
186 | Sá»a ngưá»i dùng
|
---|
187 | </div>
|
---|
188 | </div>
|
---|
189 |
|
---|
190 | <div class="modal-body">
|
---|
191 | <form id="edit_frm" onsubmit="return false;" class="form-horizontal" role="form">
|
---|
192 | <div class="form-group">
|
---|
193 | <label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Sá» Äiá»n thoại </label>
|
---|
194 | <div class="col-sm-9">
|
---|
195 | <label class="block clearfix has-error">
|
---|
196 | <span class="input-icon">
|
---|
197 | <input type="text" id="edit_cellphone" name="cellphone" placeholder="Phone" id="form-field-1" value="">
|
---|
198 | <i class="icon-user blue"></i>
|
---|
199 | </span>
|
---|
200 | <div class="help-block"> </div>
|
---|
201 | </label>
|
---|
202 | </div>
|
---|
203 | </div>
|
---|
204 |
|
---|
205 | <div class="form-group">
|
---|
206 | <label for="form-field-2" class="col-sm-3 control-label no-padding-right"> Tiá»n </label>
|
---|
207 | <div class="col-sm-9">
|
---|
208 | <span class="input-icon">
|
---|
209 | <input type="text" id="edit_acc_balanced" name="acc_balanced" placeholder="" id="form-field-2" value="">
|
---|
210 | <i class="icon-user blue"></i>
|
---|
211 | </span>
|
---|
212 | </div>
|
---|
213 | <label class="block clearfix has-error">
|
---|
214 | <div class="help-block"> </div>
|
---|
215 | </label>
|
---|
216 |
|
---|
217 | </div>
|
---|
218 |
|
---|
219 | <div class="space-4"></div>
|
---|
220 | <div class="clearfix form-actions">
|
---|
221 | <div class="col-md-offset-3 col-md-9">
|
---|
222 | <button type="button" id="edit" class="btn btn-info">
|
---|
223 | <i class="icon-ok bigger-110"></i>
|
---|
224 | Hoà n tất
|
---|
225 | </button>
|
---|
226 |
|
---|
227 |
|
---|
228 | <button type="reset" name="reset" class="btn">
|
---|
229 | <i class="icon-undo bigger-110"></i>
|
---|
230 | Xóa hết
|
---|
231 | </button>
|
---|
232 | </div>
|
---|
233 | </div>
|
---|
234 | </form>
|
---|
235 | </div>
|
---|
236 | </div>
|
---|
237 | </div>
|
---|
238 | </div>
|
---|
239 | <!-- End Edit User -->
|
---|
240 |
|
---|
241 | <!-- Delete User -->
|
---|
242 | <div tabindex="-1" class="modal fade in" id="deleteUser">
|
---|
243 | <div class="modal-dialog">
|
---|
244 | <div class="modal-content">
|
---|
245 | <div class="modal-header no-padding">
|
---|
246 | <div class="table-header">
|
---|
247 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
248 | <span class="white">Ã</span>
|
---|
249 | </button>
|
---|
250 | Xóa ngưá»i dùng
|
---|
251 | </div>
|
---|
252 | </div>
|
---|
253 |
|
---|
254 | <div class="modal-body">
|
---|
255 | <form id="delete_frm" onsubmit="return false;" class="form-horizontal" role="form">
|
---|
256 | <div class="form-group">
|
---|
257 | <center><h4> Chắc chắn muá»n xóa tà i khoản nà y? </h4></center>
|
---|
258 | </div>
|
---|
259 | <div class="clearfix form-actions">
|
---|
260 | <div class="col-md-offset-3 col-md-9">
|
---|
261 | <button type="button" id="delete" class="btn btn-info">
|
---|
262 | <i class="icon-ok bigger-110"></i>
|
---|
263 | Xóa
|
---|
264 | </button>
|
---|
265 |
|
---|
266 |
|
---|
267 | <button type="reset" name="reset" class="btn" data-dismiss="modal">
|
---|
268 | <i class="icon-undo bigger-110"></i>
|
---|
269 | Há»§y
|
---|
270 | </button>
|
---|
271 | </div>
|
---|
272 | </div>
|
---|
273 | </form>
|
---|
274 | </div>
|
---|
275 | </div>
|
---|
276 | </div>
|
---|
277 | </div>
|
---|
278 | <!-- End Delete User -->
|
---|
279 |
|
---|
280 | <?php
|
---|
281 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/user.js')));
|
---|
282 | ?> |
---|