CMS
Version 3.9
login_attempts.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"login"
);
3
4
$menu_item
=
"Login Attempts"
;
5
6
$attempt
=
new
LoginAttempt
();
7
8
$attempt
->filter =
new
InclusionFilter(
"date_received"
);
9
$attempt
->fromGET();
10
$filterForm
=
new
FilterForm(
$attempt
);
11
new
DateRangeFilterRenderer(
$filterForm
,
"date_received"
,
""
,
"month"
);
12
13
$constraint
=
$filterForm
->getConstraint();
14
15
$attempts
= Query::create(
LoginAttempt
,
"$constraint ORDER BY date_received"
)->execute();
16
17
$table
=
new
DataListView(
$attempts
,
"login_attempts"
);
18
$table
->column(
"Username"
,
"<b>{username:htmlSafe}</b>"
,
true
)
19
->column(
"Date"
,
"{date_received}"
,
true
,
"text-align: center"
,
null
,
null
,
"{date_received:YmdHis}"
)
20
->column(
"IP Address"
,
"{ip_address}"
,
true
,
"text-align: center"
)
21
->column(
"Login Type"
,
"{login_mode:prettify}"
,
true
,
"text-align: center"
)
22
->column(
"Result"
,
"{result:prettify}"
,
true
,
"text-align: center"
);
23
24
$table
->pageSize = 20;
25
$table
->sortable =
true
;
26
$table
->filter =
true
;
27
$table
->emptyMessage =
"There have been no login attempts for this time period"
;
28
$table
->excelFile =
"login_attempts.xls"
;
29
30
$script
.=
$filterForm
->writeScript();
31
$filterForm
->drawForm();
32
33
$script
.=
$table
->writeScript();
34
$table
->drawView();
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
LoginAttempt
Definition:
login_attempt.inc:8
$attempt
$attempt
Definition:
login_attempts.inc:6
$constraint
$constraint
Definition:
login_attempts.inc:13
$filterForm
$filterForm
Definition:
login_attempts.inc:10
$menu_item
$menu_item
Definition:
login_attempts.inc:4
$attempts
$attempts
Definition:
login_attempts.inc:15
$table
$table
Definition:
login_attempts.inc:17
$script
$script
Definition:
login_attempts.inc:30
code
cms.sonjara.com
cms
components
login
admin
login_attempts.inc
Generated on Tue Mar 23 2021 15:36:13 for CMS by
1.9.1