[370] | 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 | <div class="main-content">
|
---|
| 7 | <div class="breadcrumbs" id="breadcrumbs">
|
---|
| 8 | <script type="text/javascript">
|
---|
| 9 | try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
|
---|
| 10 | </script>
|
---|
| 11 |
|
---|
| 12 | <ul class="breadcrumb">
|
---|
| 13 | <li>
|
---|
| 14 | <i class="icon-home home-icon"></i>
|
---|
| 15 | <a href="#">Trang chá»§</a>
|
---|
| 16 | </li>
|
---|
| 17 |
|
---|
| 18 | <li>
|
---|
| 19 | <a href="#">Quản lÜ tà i khoản</a>
|
---|
| 20 | </li>
|
---|
| 21 | <li>
|
---|
| 22 | <a href="#">Ngưá»i dùng</a>
|
---|
| 23 | </li>
|
---|
| 24 | <li class="active">Thá»ng kê tà i khoản</li>
|
---|
| 25 | </ul><!-- .breadcrumb -->
|
---|
| 26 |
|
---|
| 27 | <div class="nav-search" id="nav-search">
|
---|
| 28 | <form class="form-search">
|
---|
| 29 | <span class="input-icon">
|
---|
| 30 | <input type="text" placeholder="Tìm kiếm ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
|
---|
| 31 | <i class="icon-search nav-search-icon"></i>
|
---|
| 32 | </span>
|
---|
| 33 | </form>
|
---|
| 34 | </div><!-- #nav-search -->
|
---|
| 35 | </div>
|
---|
| 36 |
|
---|
| 37 | <div class="page-content">
|
---|
| 38 | <div class="page-header">
|
---|
| 39 | <h1>
|
---|
| 40 | Ngưá»i dùng
|
---|
| 41 | <small>
|
---|
| 42 | <i class="icon-double-angle-right"></i>
|
---|
| 43 | thá»ng kê tà i khoản
|
---|
| 44 | </small>
|
---|
| 45 | </h1>
|
---|
| 46 | </div><!-- /.page-header -->
|
---|
| 47 |
|
---|
| 48 | <script src="<?php echo $base_url;?>assets/js/jquery-2.0.3.min.js"></script>
|
---|
| 49 | <script src="<?php echo $base_url;?>assets/js/jquery.dataTables.min.js"></script>
|
---|
| 50 | <script src="<?php echo $base_url;?>assets/js/jquery.dataTables.bootstrap.js"></script>
|
---|
| 51 | <script type="text/javascript">
|
---|
| 52 |
|
---|
| 53 | jQuery(function($) {
|
---|
| 54 | var oTable1 = $('#sample-table-2').dataTable( {
|
---|
| 55 | "aoColumns": [
|
---|
| 56 | { "bSortable": false },
|
---|
| 57 | null, null,null, null,
|
---|
| 58 | { "bSortable": false }
|
---|
| 59 | ] } );
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | $('table th input:checkbox').on('click' , function(){
|
---|
| 63 | var that = this;
|
---|
| 64 | $(this).closest('table').find('tr > td:first-child input:checkbox')
|
---|
| 65 | .each(function(){
|
---|
| 66 | this.checked = that.checked;
|
---|
| 67 | $(this).closest('tr').toggleClass('selected');
|
---|
| 68 | });
|
---|
| 69 |
|
---|
| 70 | });
|
---|
| 71 |
|
---|
| 72 | });
|
---|
| 73 | </script>
|
---|
| 74 |
|
---|
| 75 | <div class="row">
|
---|
| 76 | <div class="col-xs-12">
|
---|
| 77 | <!-- PAGE CONTENT BEGINS -->
|
---|
| 78 | <div class="table-header" style="padding-bottom:4px">
|
---|
| 79 | Thá»ng kê tà i khoản
|
---|
| 80 |
|
---|
| 81 | <button class="btn btn-success pull-right" data-toggle="modal" href="#addUser">
|
---|
| 82 | <i class="icon-plus"></i>
|
---|
| 83 | Thêm thà nh viên
|
---|
| 84 | </button>
|
---|
| 85 |
|
---|
| 86 | </div>
|
---|
| 87 |
|
---|
| 88 | <div class="table-responsive">
|
---|
| 89 | <table id="sample-table-2" class="table table-striped table-bordered table-hover">
|
---|
| 90 | <thead>
|
---|
| 91 | <tr>
|
---|
| 92 | <th class="center">
|
---|
| 93 | <label>
|
---|
| 94 | <input type="checkbox" class="ace" />
|
---|
| 95 | <span class="lbl"></span>
|
---|
| 96 | </label>
|
---|
| 97 | </th>
|
---|
| 98 | <th>Sá» Äiá»n thoại</th>
|
---|
| 99 | <th class="hidden-480">Tiá»n</th>
|
---|
| 100 |
|
---|
| 101 | <th>
|
---|
| 102 | <i class="icon-time bigger-110 hidden-480"></i>
|
---|
| 103 | Ngà y ÄÄng kÜ
|
---|
| 104 | </th>
|
---|
| 105 | <th class="hidden-480">Trạng thái</th>
|
---|
| 106 |
|
---|
| 107 | <th></th>
|
---|
| 108 | </tr>
|
---|
| 109 | </thead>
|
---|
| 110 |
|
---|
| 111 | <tbody>
|
---|
| 112 | <?php foreach ($users as $key=>$user): ?>
|
---|
| 113 | <tr>
|
---|
| 114 | <td class="center">
|
---|
| 115 | <label>
|
---|
| 116 | <input type="checkbox" class="ace" />
|
---|
| 117 | <span class="lbl"></span>
|
---|
| 118 | </label>
|
---|
| 119 | </td>
|
---|
| 120 |
|
---|
| 121 | <td>
|
---|
| 122 | <a href="#"><?php echo $user->cellphone; ?></a>
|
---|
| 123 | </td>
|
---|
| 124 | <td class="hidden-480"><?php echo $user->acc_balanced; ?></td>
|
---|
| 125 | <td><?php echo $user->created_time; ?></td>
|
---|
| 126 |
|
---|
| 127 | <td class="hidden-480">
|
---|
| 128 | <span class="label label-sm label-success">KÃch hoạt</span>
|
---|
| 129 | </td>
|
---|
| 130 |
|
---|
| 131 | <td>
|
---|
| 132 | <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
|
---|
| 133 | <a class="blue" href="#">
|
---|
| 134 | <i class="icon-zoom-in bigger-130"></i>
|
---|
| 135 | </a>
|
---|
| 136 |
|
---|
| 137 | <a class="green" data-us-index=<?php echo $key; ?> data-toggle="modal" href="#editUser" title="Edit">
|
---|
| 138 | <i class="icon-pencil bigger-130"></i>
|
---|
| 139 | </a>
|
---|
| 140 |
|
---|
| 141 | <a class="red" data-us-id=<?php echo $user->us_id; ?> data-toggle="modal" href="#deleteUser" title="Delete">
|
---|
| 142 | <i class="icon-trash bigger-130"></i>
|
---|
| 143 | </a>
|
---|
| 144 | </div>
|
---|
| 145 |
|
---|
| 146 | <div class="visible-xs visible-sm hidden-md hidden-lg">
|
---|
| 147 | <div class="inline position-relative">
|
---|
| 148 | <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
|
---|
| 149 | <i class="icon-caret-down icon-only bigger-120"></i>
|
---|
| 150 | </button>
|
---|
| 151 |
|
---|
| 152 | <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
|
---|
| 153 | <li>
|
---|
| 154 | <a href="#" class="tooltip-info" data-rel="tooltip" title="View">
|
---|
| 155 | <span class="blue">
|
---|
| 156 | <i class="icon-zoom-in bigger-120"></i>
|
---|
| 157 | </span>
|
---|
| 158 | </a>
|
---|
| 159 | </li>
|
---|
| 160 |
|
---|
| 161 | <li>
|
---|
| 162 | <a class="green" data-us-index=<?php echo $key; ?> data-toggle="modal" href="#editUser" title="Edit">
|
---|
| 163 | <span class="green">
|
---|
| 164 | <i class="icon-edit bigger-120"></i>
|
---|
| 165 | </span>
|
---|
| 166 | </a>
|
---|
| 167 | </li>
|
---|
| 168 |
|
---|
| 169 | <li>
|
---|
| 170 | <a class="red" data-admin-id=<?php echo $user->us_id; ?> data-toggle="modal" href="#deleteUser" title="Delete">
|
---|
| 171 | <span class="red">
|
---|
| 172 | <i class="icon-trash bigger-120"></i>
|
---|
| 173 | </span>
|
---|
| 174 | </a>
|
---|
| 175 | </li>
|
---|
| 176 | </ul>
|
---|
| 177 | </div>
|
---|
| 178 | </div>
|
---|
| 179 | </td>
|
---|
| 180 | </tr>
|
---|
| 181 | <?php endforeach; ?>
|
---|
| 182 | </tbody>
|
---|
| 183 | </table>
|
---|
| 184 | </div>
|
---|
| 185 |
|
---|
| 186 | <!-- Edit User -->
|
---|
| 187 | <div tabindex="-1" class="modal fade in" id="editUser">
|
---|
| 188 | <div class="modal-dialog">
|
---|
| 189 | <div class="modal-content">
|
---|
| 190 | <div class="modal-header no-padding">
|
---|
| 191 | <div class="table-header">
|
---|
| 192 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
| 193 | <span class="white">Ã</span>
|
---|
| 194 | </button>
|
---|
| 195 | Sá»a ngưá»i dùng
|
---|
| 196 | </div>
|
---|
| 197 | </div>
|
---|
| 198 |
|
---|
| 199 | <div class="modal-body">
|
---|
| 200 | <form method="post" class="form-horizontal" id="validation-edit-form" action="<?php echo $base_url; ?>admin/user_account/update">
|
---|
| 201 | <input type="hidden" name="id" id="form-field-0" value="">
|
---|
| 202 | <div class="form-group">
|
---|
| 203 | <label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Sá» Äiá»n thoại </label>
|
---|
| 204 | <div class="col-sm-9">
|
---|
| 205 | <label class="block clearfix has-error">
|
---|
| 206 | <span class="input-icon">
|
---|
| 207 | <input type="text" name="phone" placeholder="Phone" id="form-field-1" value="">
|
---|
| 208 | <i class="icon-user blue"></i>
|
---|
| 209 | </span>
|
---|
| 210 | <div class="help-block"> </div>
|
---|
| 211 | </label>
|
---|
| 212 | </div>
|
---|
| 213 | </div>
|
---|
| 214 |
|
---|
| 215 | <div class="form-group">
|
---|
| 216 | <label for="form-field-2" class="col-sm-3 control-label no-padding-right"> Tiá»n </label>
|
---|
| 217 | <div class="col-sm-9">
|
---|
| 218 | <span class="input-icon">
|
---|
| 219 | <input type="text" name="balance" placeholder="" id="form-field-2" value="">
|
---|
| 220 | <i class="icon-user blue"></i>
|
---|
| 221 | </span>
|
---|
| 222 | </div>
|
---|
| 223 | <label class="block clearfix has-error">
|
---|
| 224 | <div class="help-block"> </div>
|
---|
| 225 | </label>
|
---|
| 226 |
|
---|
| 227 | </div>
|
---|
| 228 |
|
---|
| 229 | <div class="space-4"></div>
|
---|
| 230 | <div class="clearfix form-actions">
|
---|
| 231 | <div class="col-md-offset-3 col-md-9">
|
---|
| 232 | <button type="submit" name="submit" class="btn btn-info">
|
---|
| 233 | <i class="icon-ok bigger-110"></i>
|
---|
| 234 | Hoà n tất
|
---|
| 235 | </button>
|
---|
| 236 |
|
---|
| 237 |
|
---|
| 238 | <button type="reset" name="reset" class="btn">
|
---|
| 239 | <i class="icon-undo bigger-110"></i>
|
---|
| 240 | Xóa hết
|
---|
| 241 | </button>
|
---|
| 242 | </div>
|
---|
| 243 | </div>
|
---|
| 244 | </form>
|
---|
| 245 | </div>
|
---|
| 246 | </div>
|
---|
| 247 | </div>
|
---|
| 248 | </div>
|
---|
| 249 | <!-- End Edit Admin -->
|
---|
| 250 |
|
---|
| 251 | <!-- Add User -->
|
---|
| 252 | <div tabindex="-1" class="modal fade in" id="addUser">
|
---|
| 253 | <div class="modal-dialog">
|
---|
| 254 | <div class="modal-content">
|
---|
| 255 | <div class="modal-header no-padding">
|
---|
| 256 | <div class="table-header">
|
---|
| 257 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
| 258 | <span class="white">Ã</span>
|
---|
| 259 | </button>
|
---|
| 260 | Tạo má»i thà nh viên
|
---|
| 261 | </div>
|
---|
| 262 | </div>
|
---|
| 263 |
|
---|
| 264 | <div class="modal-body">
|
---|
| 265 | <form method="post" class="form-horizontal" id="validation-form" action="<?php echo $base_url; ?>admin/user_account/insert">
|
---|
| 266 | <div class="form-group">
|
---|
| 267 | <label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Sá» Äiá»n thoại </label>
|
---|
| 268 |
|
---|
| 269 | <div class="col-sm-9">
|
---|
| 270 | <span class="input-icon">
|
---|
| 271 | <input type="number" name="cellphone" placeholder="phone" id="form-field-1">
|
---|
| 272 | <i class="icon-phone blue"></i>
|
---|
| 273 | </span>
|
---|
| 274 | </div>
|
---|
| 275 | <div class="help-block"> </div>
|
---|
| 276 | </div>
|
---|
| 277 |
|
---|
| 278 | <div class="clearfix form-actions">
|
---|
| 279 | <div class="col-md-offset-3 col-md-9">
|
---|
| 280 | <button type="submit" name="submit" class="btn btn-info">
|
---|
| 281 | <i class="icon-ok bigger-110"></i>
|
---|
| 282 | Hoà n tất
|
---|
| 283 | </button>
|
---|
| 284 |
|
---|
| 285 |
|
---|
| 286 | <button type="reset" class="btn">
|
---|
| 287 | <i class="icon-undo bigger-110"></i>
|
---|
| 288 | Xóa hết
|
---|
| 289 | </button>
|
---|
| 290 | </div>
|
---|
| 291 | </div>
|
---|
| 292 |
|
---|
| 293 | </div>
|
---|
| 294 | </form>
|
---|
| 295 | </div>
|
---|
| 296 | </div><!-- /.modal-content -->
|
---|
| 297 | </div><!-- /.modal-dialog -->
|
---|
| 298 | </div>
|
---|
| 299 |
|
---|
| 300 | <!-- Delete User -->
|
---|
| 301 | <div tabindex="-1" class="modal fade in" id="deleteUser">
|
---|
| 302 | <div class="modal-dialog">
|
---|
| 303 | <div class="modal-content">
|
---|
| 304 | <div class="modal-header no-padding">
|
---|
| 305 | <div class="table-header">
|
---|
| 306 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
| 307 | <span class="white">Ã</span>
|
---|
| 308 | </button>
|
---|
| 309 | Xóa ngưá»i dùng
|
---|
| 310 | </div>
|
---|
| 311 | </div>
|
---|
| 312 |
|
---|
| 313 | <div class="modal-body">
|
---|
| 314 | <form method="post" class="form-horizontal" id="validation-form" action="<?php echo $base_url; ?>admin/user_account/delete">
|
---|
| 315 | <input type="hidden" name="id" id="form-field-0" value="">
|
---|
| 316 | <div class="form-group">
|
---|
| 317 | <center><h4> Chắc chắn muá»n xóa tà i khoản nà y? </h4></center>
|
---|
| 318 | </div>
|
---|
| 319 | <div class="clearfix form-actions">
|
---|
| 320 | <div class="col-md-offset-3 col-md-9">
|
---|
| 321 | <button type="submit" name="submit" class="btn btn-info">
|
---|
| 322 | <i class="icon-ok bigger-110"></i>
|
---|
| 323 | Xóa
|
---|
| 324 | </button>
|
---|
| 325 |
|
---|
| 326 |
|
---|
| 327 | <button type="reset" name="reset" class="btn" data-dismiss="modal">
|
---|
| 328 | <i class="icon-undo bigger-110"></i>
|
---|
| 329 | Há»§y
|
---|
| 330 | </button>
|
---|
| 331 | </div>
|
---|
| 332 | </div>
|
---|
| 333 | </form>
|
---|
| 334 | </div>
|
---|
| 335 | </div>
|
---|
| 336 | </div>
|
---|
| 337 | </div>
|
---|
| 338 | <!-- End Delete User -->
|
---|
| 339 | <script>
|
---|
| 340 | $('#deleteUser').on('show.bs.modal', function(e) {
|
---|
| 341 | var id = parseInt($(e.relatedTarget).data('us-id'));
|
---|
| 342 | $(e.currentTarget).find('input[name="id"]').val(id);
|
---|
| 343 | });
|
---|
| 344 | $('#editUser').on('show.bs.modal', function(e) {
|
---|
| 345 | //get data-id attribute of the clicked element
|
---|
| 346 | var index = parseInt($(e.relatedTarget).data('us-index'));
|
---|
| 347 | //populate the textbox
|
---|
| 348 | var ar = <?php echo json_encode($users) ?>;
|
---|
| 349 |
|
---|
| 350 | $(e.currentTarget).find('input[name="phone"]').val(ar[index].cellphone);
|
---|
| 351 | $(e.currentTarget).find('input[name="balance"]').val(ar[index].acc_balanced);
|
---|
| 352 | $(e.currentTarget).find('input[name="id"]').val(ar[index].us_id);
|
---|
| 353 | });
|
---|
| 354 |
|
---|
| 355 | </script>
|
---|
| 356 | <!-- PAGE CONTENT ENDS -->
|
---|
| 357 | </div><!-- /.col -->
|
---|
| 358 | </div><!-- /.row -->
|
---|
| 359 | </div><!-- /.page-content -->
|
---|
| 360 | </div><!-- /.main-content -->
|
---|
| 361 |
|
---|
| 362 | </div><!-- /.main-container-inner -->
|
---|
| 363 |
|
---|
| 364 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
| 365 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
| 366 | </a>
|
---|
| 367 | </div><!-- /.main-container -->
|
---|
| 368 | <?php
|
---|
| 369 | $this->load->view('layout/admin/footer', array('base_url' => $base_url));
|
---|
| 370 | ?> |
---|