| Server IP : 180.180.241.3 / Your IP : 216.73.216.35 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/app/View/Users/ |
Upload File : |
<div class="users index">
<div class="admin-list-filters">
<div class="row">
<?php
echo $this->Form->create('User',
array(
'type' => 'get'
));
echo $this->Form->label('group_id',
__('กลุ่มผู้ใช้งาน'),
array(
'class' => 'col-md-2 alignright filter-label'
));
echo $this->Form->input('group_id', array(
'options' => $groups,
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'empty' => __('ทุกกลุ่ม'),
'required' => false,
'value' => $group_id
));
echo $this->Form->label('username',
__('ชื่อเข้าระบบ'),
array( 'class' => 'col-md-2 alignright filter-label'
));
echo $this->Form->input('username', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'placeholder' => __('username'),
'required' => false,
'value' => $username
));
?>
</div>
<div class="row">
<?php
echo $this->Form->label('date',
'วันที่สร้างข้อมูล',
array(
'class' => 'col-md-2 alignright filter-label'
));
?>
<?php
echo $this->Form->input('date', array(
'before' => '<span class="input-group-addon glyphicon glyphicon-calendar"></span>',
'label' => false,
'class' => 'form-control datepicker',
'div' => 'col-md-3 input-group',
'value' => $date
));
echo $this->Form->label('date_to', __('ถึงวันที่'), array(
'class' => 'col-md-2 text-center filter-label'
));
echo $this->Form->input('date_to', array(
'before' => '<span class="input-group-addon glyphicon glyphicon-calendar"></span>',
'label' => false,
'class' => 'form-control datepicker',
'div' => 'col-md-3 input-group',
'value' => $date_to
));
?>
<?php echo $this->Form->end(array('label' => __('ค้นหา'), 'class' => 'btn btn-success')); ?>
</div>
</div>
<div class="page-header clearfix">
<h2 class="pull-left admin-title-with-btn"><?php echo __('ทั้งหมด ') . count($users) . __(' ผู้ใช้งาน'); ?></h2>
<div class="pull-left status-filter">
<?php echo $this->Form->create(false, array('type' => 'get', 'id' => 'status-form')); ?>
<?php echo $this->Form->select('status',
array( 1 => __('เปิดใช้งาน'), 0 => __('ปิดการใช้งาน') ),
array(
'value' => $this->params->query['status'] ,
'empty' => false,
'class' => 'form-control',
'id' => 'status-select'
)
); ?>
<?php echo $this->Form->end(); ?>
</div>
<?php echo $this->Html->link('เพิ่ม', array(
'action' => 'add'
),
array(
'class' => 'btn btn-success pull-left'
)) ?>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th class="text-center"><?php echo __('รหัส'); ?></th>
<th><?php echo __('ชื่อเข้าระบบ') ?></th>
<th><?php echo __('กลุ่มผู้ใช้งาน') ?></th>
<th><?php echo __('วันที่สร้าง') ?></th>
<th class="text-center"><?php echo __('แก้ไข') ?></th>
<th class="actions text-center"><?php echo __('สถานะ'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ( $users as $user ) :?>
<tr>
<td class="text-center"><?php echo $user['User']['id']; ?></td>
<td><?php echo $user['User']['username']; ?></td>
<td><?php echo $user['Group']['name']; ?></td>
<td><?php echo $this->Time->format('d/m/Y', $user['User']['created']); ?></td>
<td class="actions text-center">
<?php echo $this->Html->link('<span class="glyphicon glyphicon-pencil"></a>', array('action' => 'edit', $user['User']['id']), array('escape' => false)); ?>
</td>
<td class="text-center">
<?php if ( $this->params->query['status'] == 1 ) : ?>
<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-minus-sign"></span>',
array('action' => 'delete', $user['User']['id']),
array('escape' => false),
__('ยืนยันการปิดการใช้งาน')); ?>
<?php else : ?>
<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-refresh"></span>',
array('action' => 'active', $user['User']['id']),
array('escape' => false),
__('ยืนยันการเปิดการใช้งาน')); ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php echo $this->element('pagination'); ?>
</div>
<script>
$(function() {
$('#status-select').on('change', function() {
$('form#status-form').submit();
});
});
</script>