13 <script
type=
"text/javascript">
14 $(document).
ready(
function() {
15 $(
'#table-sort').dataTable( {
17 "bLengthChange":
false,
28 <!-- Content Wrapper. Contains page content -->
29 <div class=\"content-wrapper\" id=\"content-FX\">
30 <!-- Content Header (Page header) -->
31 <section class=\"content-header\">";
33 echo backend::getTitle(
$lang[
'LOGINS'],
$lang[
'LOGINS_SUBTEXT']);
34 echo
"<ol class=\"breadcrumb\">
35 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
36 <li class=\"active\"><a href=\"index.php?page=logins\" title=\"$lang[LOGINS]\"> $lang[LOGINS]</a></li>
40 <section class=\"content\">";
44 <table style=
"width:100%;" class=
"table table-striped table-hover table-responsive" id=
"table-sort">
47 <td style=
"width:3%;"><strong>&
nbsp;</strong></td>
48 <td style=
"width:3%;" class=
"text-center"><strong><?php echo
$lang[
'ID']; ?></strong></td>
49 <td style=
"width:15%;" class=
"text-center"><strong><?php echo
$lang[
'DATE']; ?></strong></td>
50 <td style=
"width:14%;" class=
"text-center"><strong><?php echo
$lang[
'IP']; ?></strong></td>
51 <td style=
"width:15%;" class=
"text-center"><strong><?php echo
$lang[
'USERNAME']; ?></strong></td>
52 <td style=
"width:10%;" class=
"text-center"><strong><?php echo
$lang[
'PASSWORD']; ?></strong></td>
53 <td style=
"width:10%;" class=
"text-center"><strong><?php echo
$lang[
'LOGIN_FROM']; ?></strong></td>
54 <td style=
"width:2%;" class=
"text-center"><strong><?php echo
$lang[
'FAILED']; ?></strong></td>
55 <td style=
"width:28%;" class=
"text-center"><strong><?php echo
$lang[
'BROWSER']; ?></strong></td>
61 if (isset(
$_GET[
'user']) && (!empty(
$_GET[
'user'])))
62 { $user =
$_GET[
'user']; }
else { $user =
''; }
69 if ($row[
'failed'] ===
'0')
71 $pub =
"success"; $pubtext=
"OK";
72 $text =
"text-success text-center";
74 $pub =
"danger"; $pubtext =
"failed";
75 $text =
"text-danger text-center";
77 if ($row[
'location'] ===
"backend"){
78 $locationText =
"text-info text-center";
80 $locationText =
"text-muted text-center";
82 if (isset($row[
'useragent']) && (!empty($row{
'useragent'})))
84 $row[
'useragent'] = sys::getBrowser($row[
'useragent']);
87 echo
"<tr class=\"".$text.
"\" >
88 <td class=\"text-center\">
89 <i class=\"label label-$pub\">$pubtext</i></a> </td>
90 <td class=\"text-center\">".$row[
'id'].
"</td>
91 <td>".$row[
'datetime'].
"</td>
92 <td class=\"".$text.
"\" class=\"text-center\">".$row[
'ip'].
"</td>
93 <td>".$row[
'username'].
"</td>
94 <td class=\"".$text.
"\">".$row[
'password'].
"</td>
95 <td class=\"".$locationText.
"\">".$row[
'location'].
"</td>
96 <td class=\"".$text.
"\">".$row[
'failed'].
"</td>
97 <td class=\"text-center\">".$row[
'useragent'][
'name'].
" <small>".$row[
'useragent'][
'version'].
"</small></td>
print $lang['FILEMAN_UPLOAD']
Backend class serves a few useful functions for the admin backend.
Mysqli database class; returns db connection object.
The language class - support multilingual backend.
The sys class - handles yawk's system core functions.
The default user class. Provide all functions to handle the user object.
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp
document ready(function() { $('a[data-confirm]').click(function(ev) { modal='#dataConfirmModal';var href=$(this).attr('href');var title=$(this).attr('title');var icon=$(this).attr('data-icon');if(!icon) { icon='fa fa-trash-o';} if(!$(modal).length) { $('body').append('< div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">< div class="modal-dialog">< div class="modal-content">< div class="modal-header">< button type="button" class="close" data-dismiss="modal" aria-hidden="true">< i class="fa fa-times"></i ></button >< br >< div class="col-md-1">< h3 class="modal-title">< i class="'+icon+'"></i ></h3 ></div >< div class="col-md-11">< h3 class="modal-title" id="dataConfirmLabel">'+title+'</h3 ></div ></h3 ></div >< div class="modal-body"></div >< div class="modal-footer">< button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Abbrechen</button >< a type="button" class="btn btn-danger" id="dataConfirmOK">< i class="'+icon+'"></i > L öschen</a ></div ></div ></div ></div >');} $(modal).find('.modal-body').text($(this).attr('data-confirm'));$('#dataConfirmOK').attr('href', href);$(modal).modal({show:true});return false;});$('#terminateUser').click(function() { var terminate=window.confirm("ACHTUNG!\nDas wird Deinen Account permanent deaktivieren.\n"+"Bist Du Dir sicher, dass Du das tun willst?");if(terminate===true) { var terminateUser=window.confirm("Bist Du Dir wirklich ganz sicher?\n"+"Diese Aktion kann nicht rueckgaengig gemacht werden.");if(terminateUser===true) { $.get('system/templates/YaWK-bootstrap3/js/terminate-user.php', function(data) { if(data==="true") { setTimeout("window.location='logout.html'", 0);} else { alert("Fehler: "+data);} });} } });function dismissNotifications() { $.ajax({ url:'js/dismiss-notifications.php', type:'POST', success:function(data) { if(!data) { alert('Something went wrong!');return false;} } });$("#bell-label").fadeOut();$('#notification-header').html('You have 0 notifications');$('#notification-menu').fadeOut();} $("#dismiss").click(function() { dismissNotifications();});function disableButtons(delay) { $('#loginButton').removeClass().addClass('btn btn-success disabled').attr('id', 'LOGIN_FORBIDDEN');$('#resetPasswordButton').removeClass().addClass('btn btn-danger disabled');setTimeout(function() { $('#LOGIN_FORBIDDEN').attr('id', 'loginButton').removeClass().addClass('btn btn-success');$('#resetPasswordButton').removeClass().addClass('btn btn-danger');}, delay);} $("#loginButton").click(function(){ if($('#loginButton').length > 0) { if($('#loginButton').hasClass('btn') &&$('#loginButton').hasClass('btn-success') &&$('#loginButton').hasClass('disabled')) { } else { $("#loginForm").submit();disableButtons(10000);} } else if($('#LOGIN_FORBIDDEN').length > 0) { if($('#LOGIN_FORBIDDEN').hasClass('btn') &&$('#LOGIN_FORBIDDEN').hasClass('btn-success') &&$('#LOGIN_FORBIDDEN').hasClass('disabled')) { } else { } } });$("#blockedBtn").hover(function() { $("#blockedBtn").hide();$("#askBtn").fadeIn(820);});})