[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">
|
---|
[353] | 200 | <form method="post" class="form-horizontal" id="validation-edit-form" action="<?php echo $base_url; ?>admin/home/update">
|
---|
[351] | 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">
|
---|
[353] | 205 | <label class="block clearfix has-error">
|
---|
| 206 | <span class="input-icon">
|
---|
| 207 | <input type="text" name="username" placeholder="Tà i khoản" id="form-field-1" value="">
|
---|
| 208 | <i class="icon-user blue"></i>
|
---|
| 209 | </span>
|
---|
| 210 | <div class="help-block"> </div>
|
---|
| 211 | </label>
|
---|
[344] | 212 | </div>
|
---|
| 213 | </div>
|
---|
| 214 |
|
---|
[351] | 215 | <div class="form-group">
|
---|
| 216 | <label for="form-field-2" class="col-sm-3 control-label no-padding-right"> HỠtên </label>
|
---|
| 217 | <div class="col-sm-9">
|
---|
| 218 | <span class="input-icon">
|
---|
| 219 | <input type="text" name="fullname" placeholder="HỠtên" 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 | <div class="form-group">
|
---|
| 229 | <label for="form-field-3" class="col-sm-3 control-label no-padding-right"> Email </label>
|
---|
| 230 | <div class="col-sm-9">
|
---|
| 231 | <span class="input-icon">
|
---|
| 232 | <input type="text" name="email" placeholder="Email" id="form-field-3" value="">
|
---|
| 233 | <i class="icon-envelope blue"></i>
|
---|
| 234 | </span>
|
---|
| 235 | </div>
|
---|
| 236 | <label class="block clearfix has-error">
|
---|
| 237 | <div class="help-block"> </div>
|
---|
| 238 | </label>
|
---|
| 239 |
|
---|
| 240 | </div>
|
---|
| 241 | <div class="form-group">
|
---|
| 242 | <label for="form-field-4" class="col-sm-3 control-label no-padding-right"> Phone </label>
|
---|
| 243 | <div class="col-sm-9">
|
---|
| 244 | <span class="input-icon">
|
---|
| 245 | <input type="text" name="phone" placeholder="Phone" id="form-field-4" value="">
|
---|
| 246 | <i class="icon-phone blue"></i>
|
---|
| 247 | </span>
|
---|
| 248 | </div>
|
---|
| 249 | <label class="block clearfix has-error">
|
---|
| 250 | <div class="help-block"> </div>
|
---|
| 251 | </label>
|
---|
| 252 |
|
---|
| 253 | </div>
|
---|
| 254 |
|
---|
[344] | 255 | <div class="space-4"></div>
|
---|
| 256 | <div class="clearfix form-actions">
|
---|
| 257 | <div class="col-md-offset-3 col-md-9">
|
---|
[351] | 258 | <button type="submit" name="submit" class="btn btn-info">
|
---|
[344] | 259 | <i class="icon-ok bigger-110"></i>
|
---|
| 260 | Hoà n tất
|
---|
| 261 | </button>
|
---|
| 262 |
|
---|
| 263 |
|
---|
| 264 | <button type="reset" name="reset" class="btn">
|
---|
| 265 | <i class="icon-undo bigger-110"></i>
|
---|
| 266 | Xóa hết
|
---|
| 267 | </button>
|
---|
| 268 | </div>
|
---|
| 269 | </div>
|
---|
| 270 | </form>
|
---|
| 271 | </div>
|
---|
| 272 | </div>
|
---|
| 273 | </div>
|
---|
| 274 | </div>
|
---|
[351] | 275 | <!-- End Edit User -->
|
---|
| 276 |
|
---|
| 277 | <!-- Delete User -->
|
---|
| 278 | <div tabindex="-1" class="modal fade in" id="deleteAdmin">
|
---|
| 279 | <div class="modal-dialog">
|
---|
| 280 | <div class="modal-content">
|
---|
| 281 | <div class="modal-header no-padding">
|
---|
| 282 | <div class="table-header">
|
---|
| 283 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
| 284 | <span class="white">Ã</span>
|
---|
| 285 | </button>
|
---|
| 286 | Xóa quản trỠviên
|
---|
| 287 | </div>
|
---|
| 288 | </div>
|
---|
| 289 |
|
---|
| 290 | <div class="modal-body">
|
---|
| 291 | <form method="post" class="form-horizontal" id="validation-form" action="<?php echo $base_url; ?>admin/home/delete">
|
---|
| 292 | <input type="hidden" name="id" id="form-field-0" value="">
|
---|
| 293 | <div class="form-group">
|
---|
| 294 | <center><h4> Chắc chắn muá»n xóa tà i khoản nà y? </h4></center>
|
---|
| 295 | </div>
|
---|
| 296 | <div class="clearfix form-actions">
|
---|
| 297 | <div class="col-md-offset-3 col-md-9">
|
---|
| 298 | <button type="submit" name="submit" class="btn btn-info">
|
---|
| 299 | <i class="icon-ok bigger-110"></i>
|
---|
| 300 | Xóa
|
---|
| 301 | </button>
|
---|
| 302 |
|
---|
| 303 |
|
---|
| 304 | <button type="reset" name="reset" class="btn" data-dismiss="modal">
|
---|
| 305 | <i class="icon-undo bigger-110"></i>
|
---|
| 306 | Há»§y
|
---|
| 307 | </button>
|
---|
| 308 | </div>
|
---|
| 309 | </div>
|
---|
| 310 | </form>
|
---|
| 311 | </div>
|
---|
| 312 | </div>
|
---|
| 313 | </div>
|
---|
| 314 | </div>
|
---|
| 315 | <!-- End Delete User -->
|
---|
| 316 |
|
---|
[344] | 317 | <script>
|
---|
[351] | 318 | $('#deleteAdmin').on('show.bs.modal', function(e) {
|
---|
| 319 | var id = parseInt($(e.relatedTarget).data('admin-id'));
|
---|
| 320 | $(e.currentTarget).find('input[name="id"]').val(id);
|
---|
| 321 | });
|
---|
| 322 |
|
---|
[344] | 323 | $('#editAdmin').on('show.bs.modal', function(e) {
|
---|
| 324 | //get data-id attribute of the clicked element
|
---|
[351] | 325 | var index = parseInt($(e.relatedTarget).data('admin-index'));
|
---|
[344] | 326 | //populate the textbox
|
---|
[351] | 327 | var ar = <?php echo json_encode($data) ?>;
|
---|
| 328 |
|
---|
| 329 | $(e.currentTarget).find('input[name="username"]').val(ar[index].login_name);
|
---|
| 330 | $(e.currentTarget).find('input[name="fullname"]').val(ar[index].full_name);
|
---|
| 331 | $(e.currentTarget).find('input[name="email"]').val(ar[index].email);
|
---|
| 332 | $(e.currentTarget).find('input[name="phone"]').val(ar[index].phone);
|
---|
| 333 | $(e.currentTarget).find('input[name="id"]').val(ar[index].admin_id);
|
---|
| 334 | });
|
---|
| 335 | </script>
|
---|
| 336 |
|
---|
| 337 | <!-- Add User -->
|
---|
[344] | 338 | <div tabindex="-1" class="modal fade in" id="addUser">
|
---|
| 339 | <div class="modal-dialog">
|
---|
| 340 | <div class="modal-content">
|
---|
| 341 | <div class="modal-header no-padding">
|
---|
| 342 | <div class="table-header">
|
---|
| 343 | <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
|
---|
| 344 | <span class="white">Ã</span>
|
---|
| 345 | </button>
|
---|
| 346 | Tạo quản trỠviên
|
---|
| 347 | </div>
|
---|
| 348 | </div>
|
---|
| 349 |
|
---|
| 350 | <div class="modal-body">
|
---|
[353] | 351 | <form method="post" class="form-horizontal" id="validation-add-form" action="<?php echo $base_url; ?>admin/home/insert">
|
---|
[344] | 352 | <div class="form-group">
|
---|
| 353 | <label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Tà i khoản </label>
|
---|
| 354 | <div class="col-sm-9">
|
---|
[353] | 355 | <label class="block clearfix has-error">
|
---|
| 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 class="help-block"> </div>
|
---|
| 361 | </label>
|
---|
[344] | 362 | </div>
|
---|
| 363 | </div>
|
---|
| 364 |
|
---|
| 365 | <div class="form-group">
|
---|
| 366 | <label for="form-field-2" class="col-sm-3 control-label no-padding-right"> Máºt khẩu </label>
|
---|
| 367 | <div class="col-sm-9">
|
---|
[353] | 368 | <label class="block clearfix has-error">
|
---|
| 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 class="help-block"> </div>
|
---|
| 374 | </label>
|
---|
| 375 | </div>
|
---|
[344] | 376 | </div>
|
---|
[353] | 377 | <div class="space-4"></div>
|
---|
[344] | 378 | <div class="form-group">
|
---|
[351] | 379 | <label for="form-field-3" class="col-sm-3 control-label no-padding-right"> HỠtên </label>
|
---|
[344] | 380 | <div class="col-sm-9">
|
---|
| 381 | <span class="input-icon">
|
---|
[351] | 382 | <input type="text" name="fullname" placeholder="HỠtên" id="form-field-3">
|
---|
[344] | 383 | <i class="icon-user blue"></i>
|
---|
| 384 | </span>
|
---|
| 385 | </div>
|
---|
| 386 | <div class="help-block"> </div>
|
---|
| 387 | </div>
|
---|
| 388 |
|
---|
| 389 | <div class="space-4"></div>
|
---|
| 390 |
|
---|
| 391 | <div class="form-group">
|
---|
[351] | 392 | <label for="form-field-3" class="col-sm-3 control-label no-padding-right"> Email </label>
|
---|
[344] | 393 | <div class="col-sm-9">
|
---|
| 394 | <span class="input-icon">
|
---|
[351] | 395 | <input type="text" name="email" placeholder="Email" id="form-field-3">
|
---|
[344] | 396 | <i class="icon-envelope blue"></i>
|
---|
| 397 | </span>
|
---|
| 398 | </div>
|
---|
| 399 | <div class="help-block"> </div>
|
---|
| 400 | </div>
|
---|
| 401 |
|
---|
| 402 | <div class="space-4"></div>
|
---|
| 403 |
|
---|
| 404 | <div class="form-group">
|
---|
[351] | 405 | <label for="form-field-4" class="col-sm-3 control-label no-padding-right"> Phone </label>
|
---|
[344] | 406 |
|
---|
| 407 | <div class="col-sm-9">
|
---|
| 408 | <span class="input-icon">
|
---|
[351] | 409 | <input type="text" name="phone" placeholder="Phone" id="form-field-4">
|
---|
[344] | 410 | <i class="icon-phone blue"></i>
|
---|
| 411 | </span>
|
---|
| 412 | </div>
|
---|
| 413 | <div class="help-block"> </div>
|
---|
| 414 | </div>
|
---|
| 415 |
|
---|
| 416 | <div class="space-4"></div>
|
---|
| 417 |
|
---|
| 418 | <div class="clearfix form-actions">
|
---|
| 419 | <div class="col-md-offset-3 col-md-9">
|
---|
[351] | 420 | <button type="submit" name="submit" class="btn btn-info">
|
---|
[344] | 421 | <i class="icon-ok bigger-110"></i>
|
---|
| 422 | Hoà n tất
|
---|
| 423 | </button>
|
---|
| 424 |
|
---|
| 425 |
|
---|
| 426 | <button type="reset" name="reset" class="btn">
|
---|
| 427 | <i class="icon-undo bigger-110"></i>
|
---|
| 428 | Xóa hết
|
---|
| 429 | </button>
|
---|
| 430 | </div>
|
---|
| 431 | </div>
|
---|
| 432 |
|
---|
| 433 | </div>
|
---|
| 434 | </form>
|
---|
| 435 | </div>
|
---|
| 436 | </div><!-- /.modal-content -->
|
---|
| 437 | </div><!-- /.modal-dialog -->
|
---|
| 438 | </div>
|
---|
[351] | 439 | <!-- End Add User -->
|
---|
[344] | 440 |
|
---|
| 441 | <!-- PAGE CONTENT ENDS -->
|
---|
| 442 | </div><!-- /.col -->
|
---|
| 443 | </div><!-- /.row -->
|
---|
| 444 | </div><!-- /.page-content -->
|
---|
| 445 | </div><!-- /.main-content -->
|
---|
| 446 |
|
---|
| 447 | </div><!-- /.main-container-inner -->
|
---|
| 448 |
|
---|
| 449 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
| 450 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
| 451 | </a>
|
---|
| 452 | </div><!-- /.main-container -->
|
---|
| 453 | <?php
|
---|
| 454 | $this->load->view('layout/admin/footer', array('base_url' => $base_url));
|
---|
| 455 | ?> |
---|