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