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