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: '<?php echo base_url();?>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 | <?php
|
---|
178 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/user.js')));
|
---|
179 | ?> |
---|