-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
137 lines (124 loc) · 5.99 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
include_once (MODULE_PATH . 'admin/views/toolbar.php');
include_once 'submenu/index.php';
// COLUMN
@$columnPost = $this->arrayParams['filter_column'];
@$orderPost = $this->arrayParams['filter_column_dir'];
$lblUserName = Helper::cmsLinkSort('Username', 'username', $columnPost, $orderPost);
$lblEmail = Helper::cmsLinkSort('Email', 'email', $columnPost, $orderPost);
$lblFullName = Helper::cmsLinkSort('Full Name', 'fullname', $columnPost, $orderPost);
$lblGroup = Helper::cmsLinkSort('Group', 'group_id', $columnPost, $orderPost);
$lblStatus = Helper::cmsLinkSort('Status', 'status', $columnPost, $orderPost);
$lblOrdering = Helper::cmsLinkSort('Ordering', 'ordering', $columnPost, $orderPost);
$lblCreated = Helper::cmsLinkSort('Created', 'created', $columnPost, $orderPost);
$lblCreatedBy = Helper::cmsLinkSort('Created By', 'created_by', $columnPost, $orderPost);
$lblModified = Helper::cmsLinkSort('Modified', 'modified', $columnPost, $orderPost);
$lblModifiedBy = Helper::cmsLinkSort('Modified By', 'modified_by', $columnPost, $orderPost);
$lblID = Helper::cmsLinkSort('ID', 'id', $columnPost, $orderPost);
// SELECT BOX
$arrStatus = array('default' => '- Select Status -', '1' => 'Publish', '0' => 'Unpublish' );
$selectBoxStatus = Helper::cmsSelectBox('filter_state', 'inputbox', $arrStatus, @$this->arrayParams['filter_state']);
// SELECT GROUP ACP
$selectGroup = Helper::cmsSelectBox('filter_group_id', 'inputbox', $this->slbGroup, @$this->arrayParams['filter_group_id']);
// PAGINATION
$paginationHTML = $this->pagination->showPagination(URL::createLink('admin', 'user', 'index'));
// MESSAGE
$message = Session::get('message');
Session::delete('message');
$strMessage = Helper::cmsMessage($message);
?>
<div id="system-message-container"><?php echo $strMessage; ?></div>
<div id="element-box">
<div class="m">
<form action="#" method="post" name="adminForm" id="adminForm">
<!-- FILTER -->
<fieldset id="filter-bar">
<div class="filter-search fltlft">
<label class="filter-search-lbl" for="filter_search">Filter:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo @$this->arrayParams['filter_search']; ?>" />
<button type="submit" name="submit-keyword">Search</button>
<button type="button" name="clear-keyword">Clear</button>
</div>
<div class="filter-select fltrt">
<?php echo $selectBoxStatus . $selectGroup; ?>
</div>
</fieldset>
<div class="clr"></div>
<table class="adminlist" id="modules-mgr">
<!-- HEADER TABLE -->
<thead>
<tr>
<th width="1%"><input type="checkbox" name="checkall-toggle" /></th>
<th class="title"><?php echo $lblUserName; ?></th>
<th class="10%"><?php echo $lblEmail; ?></th>
<th class="10%"><?php echo $lblFullName; ?></th>
<th class="10%"><?php echo $lblGroup; ?></th>
<th width="6%"><?php echo $lblStatus; ?></th>
<th width="10%"><?php echo $lblOrdering; ?></th>
<th width="8%"><?php echo $lblCreated; ?></th>
<th width="10%"><?php echo $lblCreatedBy; ?></th>
<th width="8%"><?php echo $lblModified; ?></th>
<th width="10%"><?php echo $lblModifiedBy; ?></th>
<th width="1%" class="nowrap"><?php echo $lblID; ?></th>
</tr>
</thead>
<!-- FOOTER TABLE -->
<tfoot>
<tr>
<td colspan="12">
<!-- PAGINATION -->
<div class="container">
<?php echo $paginationHTML; ?>
</td>
</tr>
</tfoot>
<!-- BODY TABLE -->
<tbody>
<?php
if(!empty($this->Items)) :
$i = 0;
foreach($this->Items as $key => $value) :
$id = $value['id'];
$ckb = '<input type="checkbox" name="cid[]" value="'.$id.'" />';
$username = $value['username'];
$email = $value['email'];
$fullname = $value['fullname'];
$group_name = $value['group_name'];
$row = ($i % 2 == 0) ? 'row0' : 'row1';
// index.php?module=admin&controller=group&action=ajaxStatus&id=2&status=0
$status = Helper::cmsStatus($value['status'], URL::createLink('admin', 'user', 'ajaxStatus', array('id' => $id, 'status' => $value['status'])), $id);
$ordering = '<input type="text" name="order['.$id.']" size="5" value="'.$value['ordering'].'" class="text-area-order">';
$created = Helper::formatDate('d-m-Y', $value['created']);
$created_by = $value['created_by'];
$modified = Helper::formatDate('d-m-Y', $value['modified']);
$modified_by = $value['modified_by'];
$linkEdit = URL::createLink('admin', 'user', 'form', array('id' => $id));
echo '<tr class="'.$row.'">
<td class="center">'.$ckb.'</td>
<td><a href="'.$linkEdit.'">'.$username.'</a></td>
<td class="center">'.$email.'</td>
<td class="center">'.$fullname.'</td>
<td class="center">'.$group_name.'</td>
<td class="center">'.$status.'</td>
<td class="center">'.$ordering.'</td>
<td class="center">'.$created.'</td>
<td class="center">'.$created_by.'</td>
<td class="center">'.$modified.'</td>
<td class="center">'.$modified_by.'</td>
<td class="center">'.$id.'</td>
</tr>';
$i++;
endforeach;
endif;
?>
</tbody>
</table>
<div>
<input type="hidden" name="filter_column" value="username" />
<input type="hidden" name="filter_page" value="1" />
<input type="hidden" name="filter_column_dir" value="desc" />
</div>
</form>
<div class="clr"></div>
</div>
</div>