Add core/user_logs

This commit is contained in:
Mark J Crane
2021-02-13 15:56:49 -07:00
parent ddb03b7722
commit deac19f646
8 changed files with 1219 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<?php
//application details
$apps[$x]['name'] = 'User Logs';
$apps[$x]['uuid'] = '582a13cf-7d75-4ea3-b2d9-60914352d76e';
$apps[$x]['category'] = 'system';
$apps[$x]['subcategory'] = 'users';
$apps[$x]['version'] = '1.1';
$apps[$x]['license'] = 'Mozilla Public License 1.1';
$apps[$x]['url'] = 'http://www.fusionpbx.com';
$apps[$x]['description']['en-us'] = '';
//permission details
$y = 0;
$apps[$x]['permissions'][$y]['name'] = 'user_log_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'user_log_delete';
//$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
//User Logs
$y = 0;
$apps[$x]['db'][$y]['table']['name'] = 'v_user_logs';
$apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'user_log_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'timestamp';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the datetime.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'user_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Select the user.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'username';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the Username.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'type';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the type.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'result';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the result.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'remote_address';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the IP address.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'user_agent';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the user agent.';
$z++;
?>

View File

@@ -0,0 +1,7 @@
<?php
if ($domains_processed == 1) {
}
?>

View File

@@ -0,0 +1,422 @@
<?php
//User Logs
$text['title-user_logs']['en-us'] = 'User Logs';
$text['title-user_logs']['ar-eg'] = '';
$text['title-user_logs']['de-at'] = '';
$text['title-user_logs']['de-ch'] = '';
$text['title-user_logs']['de-de'] = '';
$text['title-user_logs']['es-cl'] = '';
$text['title-user_logs']['es-mx'] = '';
$text['title-user_logs']['fr-ca'] = '';
$text['title-user_logs']['fr-fr'] = '';
$text['title-user_logs']['he-il'] = '';
$text['title-user_logs']['it-it'] = '';
$text['title-user_logs']['nl-nl'] = '';
$text['title-user_logs']['pl-pl'] = '';
$text['title-user_logs']['pt-br'] = '';
$text['title-user_logs']['pt-pt'] = '';
$text['title-user_logs']['ro-ro'] = '';
$text['title-user_logs']['ru-ru'] = '';
$text['title-user_logs']['sv-se'] = '';
$text['title-user_logs']['uk-ua'] = '';
$text['title-user_log']['en-us'] = 'User Log';
$text['title-user_log']['ar-eg'] = '';
$text['title-user_log']['de-at'] = '';
$text['title-user_log']['de-ch'] = '';
$text['title-user_log']['de-de'] = '';
$text['title-user_log']['es-cl'] = '';
$text['title-user_log']['es-mx'] = '';
$text['title-user_log']['fr-ca'] = '';
$text['title-user_log']['fr-fr'] = '';
$text['title-user_log']['he-il'] = '';
$text['title-user_log']['it-it'] = '';
$text['title-user_log']['nl-nl'] = '';
$text['title-user_log']['pl-pl'] = '';
$text['title-user_log']['pt-br'] = '';
$text['title-user_log']['pt-pt'] = '';
$text['title-user_log']['ro-ro'] = '';
$text['title-user_log']['ru-ru'] = '';
$text['title-user_log']['sv-se'] = '';
$text['title-user_log']['uk-ua'] = '';
$text['title_description-user_logs']['en-us'] = 'Shows authentication attempts with the result, timestamp, remote address and user details.';
$text['title_description-user_logs']['ar-eg'] = '';
$text['title_description-user_logs']['de-at'] = '';
$text['title_description-user_logs']['de-ch'] = '';
$text['title_description-user_logs']['de-de'] = '';
$text['title_description-user_logs']['es-cl'] = '';
$text['title_description-user_logs']['es-mx'] = '';
$text['title_description-user_logs']['fr-ca'] = '';
$text['title_description-user_logs']['fr-fr'] = '';
$text['title_description-user_logs']['he-il'] = '';
$text['title_description-user_logs']['it-it'] = '';
$text['title_description-user_logs']['nl-nl'] = '';
$text['title_description-user_logs']['pl-pl'] = '';
$text['title_description-user_logs']['pt-br'] = '';
$text['title_description-user_logs']['pt-pt'] = '';
$text['title_description-user_logs']['ro-ro'] = '';
$text['title_description-user_logs']['ru-ru'] = '';
$text['title_description-user_logs']['sv-se'] = '';
$text['title_description-user_logs']['uk-ua'] = '';
$text['label-timestamp']['en-us'] = 'Timestamp';
$text['label-timestamp']['ar-eg'] = '';
$text['label-timestamp']['de-at'] = '';
$text['label-timestamp']['de-ch'] = '';
$text['label-timestamp']['de-de'] = '';
$text['label-timestamp']['es-cl'] = '';
$text['label-timestamp']['es-mx'] = '';
$text['label-timestamp']['fr-ca'] = '';
$text['label-timestamp']['fr-fr'] = '';
$text['label-timestamp']['he-il'] = '';
$text['label-timestamp']['it-it'] = '';
$text['label-timestamp']['nl-nl'] = '';
$text['label-timestamp']['pl-pl'] = '';
$text['label-timestamp']['pt-br'] = '';
$text['label-timestamp']['pt-pt'] = '';
$text['label-timestamp']['ro-ro'] = '';
$text['label-timestamp']['ru-ru'] = '';
$text['label-timestamp']['sv-se'] = '';
$text['label-timestamp']['uk-ua'] = '';
$text['description-timestamp']['en-us'] = 'Set the datetime.';
$text['description-timestamp']['ar-eg'] = '';
$text['description-timestamp']['de-at'] = '';
$text['description-timestamp']['de-ch'] = '';
$text['description-timestamp']['de-de'] = '';
$text['description-timestamp']['es-cl'] = '';
$text['description-timestamp']['es-mx'] = '';
$text['description-timestamp']['fr-ca'] = '';
$text['description-timestamp']['fr-fr'] = '';
$text['description-timestamp']['he-il'] = '';
$text['description-timestamp']['it-it'] = '';
$text['description-timestamp']['nl-nl'] = '';
$text['description-timestamp']['pl-pl'] = '';
$text['description-timestamp']['pt-br'] = '';
$text['description-timestamp']['pt-pt'] = '';
$text['description-timestamp']['ro-ro'] = '';
$text['description-timestamp']['ru-ru'] = '';
$text['description-timestamp']['sv-se'] = '';
$text['description-timestamp']['uk-ua'] = '';
$text['label-user_uuid']['en-us'] = 'User';
$text['label-user_uuid']['ar-eg'] = '';
$text['label-user_uuid']['de-at'] = '';
$text['label-user_uuid']['de-ch'] = '';
$text['label-user_uuid']['de-de'] = '';
$text['label-user_uuid']['es-cl'] = '';
$text['label-user_uuid']['es-mx'] = '';
$text['label-user_uuid']['fr-ca'] = '';
$text['label-user_uuid']['fr-fr'] = '';
$text['label-user_uuid']['he-il'] = '';
$text['label-user_uuid']['it-it'] = '';
$text['label-user_uuid']['nl-nl'] = '';
$text['label-user_uuid']['pl-pl'] = '';
$text['label-user_uuid']['pt-br'] = '';
$text['label-user_uuid']['pt-pt'] = '';
$text['label-user_uuid']['ro-ro'] = '';
$text['label-user_uuid']['ru-ru'] = '';
$text['label-user_uuid']['sv-se'] = '';
$text['label-user_uuid']['uk-ua'] = '';
$text['description-user_uuid']['en-us'] = 'Select the user.';
$text['description-user_uuid']['ar-eg'] = '';
$text['description-user_uuid']['de-at'] = '';
$text['description-user_uuid']['de-ch'] = '';
$text['description-user_uuid']['de-de'] = '';
$text['description-user_uuid']['es-cl'] = '';
$text['description-user_uuid']['es-mx'] = '';
$text['description-user_uuid']['fr-ca'] = '';
$text['description-user_uuid']['fr-fr'] = '';
$text['description-user_uuid']['he-il'] = '';
$text['description-user_uuid']['it-it'] = '';
$text['description-user_uuid']['nl-nl'] = '';
$text['description-user_uuid']['pl-pl'] = '';
$text['description-user_uuid']['pt-br'] = '';
$text['description-user_uuid']['pt-pt'] = '';
$text['description-user_uuid']['ro-ro'] = '';
$text['description-user_uuid']['ru-ru'] = '';
$text['description-user_uuid']['sv-se'] = '';
$text['description-user_uuid']['uk-ua'] = '';
$text['label-username']['en-us'] = 'Username';
$text['label-username']['ar-eg'] = '';
$text['label-username']['de-at'] = '';
$text['label-username']['de-ch'] = '';
$text['label-username']['de-de'] = '';
$text['label-username']['es-cl'] = '';
$text['label-username']['es-mx'] = '';
$text['label-username']['fr-ca'] = '';
$text['label-username']['fr-fr'] = '';
$text['label-username']['he-il'] = '';
$text['label-username']['it-it'] = '';
$text['label-username']['nl-nl'] = '';
$text['label-username']['pl-pl'] = '';
$text['label-username']['pt-br'] = '';
$text['label-username']['pt-pt'] = '';
$text['label-username']['ro-ro'] = '';
$text['label-username']['ru-ru'] = '';
$text['label-username']['sv-se'] = '';
$text['label-username']['uk-ua'] = '';
$text['description-username']['en-us'] = 'Enter the Username.';
$text['description-username']['ar-eg'] = '';
$text['description-username']['de-at'] = '';
$text['description-username']['de-ch'] = '';
$text['description-username']['de-de'] = '';
$text['description-username']['es-cl'] = '';
$text['description-username']['es-mx'] = '';
$text['description-username']['fr-ca'] = '';
$text['description-username']['fr-fr'] = '';
$text['description-username']['he-il'] = '';
$text['description-username']['it-it'] = '';
$text['description-username']['nl-nl'] = '';
$text['description-username']['pl-pl'] = '';
$text['description-username']['pt-br'] = '';
$text['description-username']['pt-pt'] = '';
$text['description-username']['ro-ro'] = '';
$text['description-username']['ru-ru'] = '';
$text['description-username']['sv-se'] = '';
$text['description-username']['uk-ua'] = '';
$text['label-type']['en-us'] = 'Type';
$text['label-type']['ar-eg'] = '';
$text['label-type']['de-at'] = '';
$text['label-type']['de-ch'] = '';
$text['label-type']['de-de'] = '';
$text['label-type']['es-cl'] = '';
$text['label-type']['es-mx'] = '';
$text['label-type']['fr-ca'] = '';
$text['label-type']['fr-fr'] = '';
$text['label-type']['he-il'] = '';
$text['label-type']['it-it'] = '';
$text['label-type']['nl-nl'] = '';
$text['label-type']['pl-pl'] = '';
$text['label-type']['pt-br'] = '';
$text['label-type']['pt-pt'] = '';
$text['label-type']['ro-ro'] = '';
$text['label-type']['ru-ru'] = '';
$text['label-type']['sv-se'] = '';
$text['label-type']['uk-ua'] = '';
$text['description-type']['en-us'] = 'Enter the type.';
$text['description-type']['ar-eg'] = '';
$text['description-type']['de-at'] = '';
$text['description-type']['de-ch'] = '';
$text['description-type']['de-de'] = '';
$text['description-type']['es-cl'] = '';
$text['description-type']['es-mx'] = '';
$text['description-type']['fr-ca'] = '';
$text['description-type']['fr-fr'] = '';
$text['description-type']['he-il'] = '';
$text['description-type']['it-it'] = '';
$text['description-type']['nl-nl'] = '';
$text['description-type']['pl-pl'] = '';
$text['description-type']['pt-br'] = '';
$text['description-type']['pt-pt'] = '';
$text['description-type']['ro-ro'] = '';
$text['description-type']['ru-ru'] = '';
$text['description-type']['sv-se'] = '';
$text['description-type']['uk-ua'] = '';
$text['label-result']['en-us'] = 'Result';
$text['label-result']['ar-eg'] = '';
$text['label-result']['de-at'] = '';
$text['label-result']['de-ch'] = '';
$text['label-result']['de-de'] = '';
$text['label-result']['es-cl'] = '';
$text['label-result']['es-mx'] = '';
$text['label-result']['fr-ca'] = '';
$text['label-result']['fr-fr'] = '';
$text['label-result']['he-il'] = '';
$text['label-result']['it-it'] = '';
$text['label-result']['nl-nl'] = '';
$text['label-result']['pl-pl'] = '';
$text['label-result']['pt-br'] = '';
$text['label-result']['pt-pt'] = '';
$text['label-result']['ro-ro'] = '';
$text['label-result']['ru-ru'] = '';
$text['label-result']['sv-se'] = '';
$text['label-result']['uk-ua'] = '';
$text['description-result']['en-us'] = 'Enter the result.';
$text['description-result']['ar-eg'] = '';
$text['description-result']['de-at'] = '';
$text['description-result']['de-ch'] = '';
$text['description-result']['de-de'] = '';
$text['description-result']['es-cl'] = '';
$text['description-result']['es-mx'] = '';
$text['description-result']['fr-ca'] = '';
$text['description-result']['fr-fr'] = '';
$text['description-result']['he-il'] = '';
$text['description-result']['it-it'] = '';
$text['description-result']['nl-nl'] = '';
$text['description-result']['pl-pl'] = '';
$text['description-result']['pt-br'] = '';
$text['description-result']['pt-pt'] = '';
$text['description-result']['ro-ro'] = '';
$text['description-result']['ru-ru'] = '';
$text['description-result']['sv-se'] = '';
$text['description-result']['uk-ua'] = '';
$text['label-success']['en-us'] = 'success';
$text['label-success']['ar-eg'] = '';
$text['label-success']['de-at'] = '';
$text['label-success']['de-ch'] = '';
$text['label-success']['de-de'] = '';
$text['label-success']['es-mx'] = '';
$text['label-success']['fr-ca'] = '';
$text['label-success']['fr-fr'] = '';
$text['label-success']['he-il'] = '';
$text['label-success']['it-it'] = '';
$text['label-success']['nl-nl'] = '';
$text['label-success']['pl-pl'] = '';
$text['label-success']['pt-br'] = '';
$text['label-success']['pt-pt'] = '';
$text['label-success']['ro-ro'] = '';
$text['label-success']['ru-ru'] = '';
$text['label-success']['sv-se'] = '';
$text['label-success']['uk-ua'] = '';
$text['label-failure']['en-us'] = 'failure';
$text['label-failure']['ar-eg'] = '';
$text['label-failure']['de-at'] = '';
$text['label-failure']['de-ch'] = '';
$text['label-failure']['de-de'] = '';
$text['label-failure']['es-mx'] = '';
$text['label-failure']['fr-ca'] = '';
$text['label-failure']['fr-fr'] = '';
$text['label-failure']['he-il'] = '';
$text['label-failure']['it-it'] = '';
$text['label-failure']['nl-nl'] = '';
$text['label-failure']['pl-pl'] = '';
$text['label-failure']['pt-br'] = '';
$text['label-failure']['pt-pt'] = '';
$text['label-failure']['ro-ro'] = '';
$text['label-failure']['ru-ru'] = '';
$text['label-failure']['sv-se'] = '';
$text['label-failure']['uk-ua'] = '';
$text['label-remote_address']['en-us'] = 'Remote Address';
$text['label-remote_address']['ar-eg'] = '';
$text['label-remote_address']['de-at'] = '';
$text['label-remote_address']['de-ch'] = '';
$text['label-remote_address']['de-de'] = '';
$text['label-remote_address']['es-cl'] = '';
$text['label-remote_address']['es-mx'] = '';
$text['label-remote_address']['fr-ca'] = '';
$text['label-remote_address']['fr-fr'] = '';
$text['label-remote_address']['he-il'] = '';
$text['label-remote_address']['it-it'] = '';
$text['label-remote_address']['nl-nl'] = '';
$text['label-remote_address']['pl-pl'] = '';
$text['label-remote_address']['pt-br'] = '';
$text['label-remote_address']['pt-pt'] = '';
$text['label-remote_address']['ro-ro'] = '';
$text['label-remote_address']['ru-ru'] = '';
$text['label-remote_address']['sv-se'] = '';
$text['label-remote_address']['uk-ua'] = '';
$text['description-remote_address']['en-us'] = 'Enter the IP address.';
$text['description-remote_address']['ar-eg'] = '';
$text['description-remote_address']['de-at'] = '';
$text['description-remote_address']['de-ch'] = '';
$text['description-remote_address']['de-de'] = '';
$text['description-remote_address']['es-cl'] = '';
$text['description-remote_address']['es-mx'] = '';
$text['description-remote_address']['fr-ca'] = '';
$text['description-remote_address']['fr-fr'] = '';
$text['description-remote_address']['he-il'] = '';
$text['description-remote_address']['it-it'] = '';
$text['description-remote_address']['nl-nl'] = '';
$text['description-remote_address']['pl-pl'] = '';
$text['description-remote_address']['pt-br'] = '';
$text['description-remote_address']['pt-pt'] = '';
$text['description-remote_address']['ro-ro'] = '';
$text['description-remote_address']['ru-ru'] = '';
$text['description-remote_address']['sv-se'] = '';
$text['description-remote_address']['uk-ua'] = '';
$text['label-user_agent']['en-us'] = 'User Agent';
$text['label-user_agent']['ar-eg'] = '';
$text['label-user_agent']['de-at'] = '';
$text['label-user_agent']['de-ch'] = '';
$text['label-user_agent']['de-de'] = '';
$text['label-user_agent']['es-cl'] = '';
$text['label-user_agent']['es-mx'] = '';
$text['label-user_agent']['fr-ca'] = '';
$text['label-user_agent']['fr-fr'] = '';
$text['label-user_agent']['he-il'] = '';
$text['label-user_agent']['it-it'] = '';
$text['label-user_agent']['nl-nl'] = '';
$text['label-user_agent']['pl-pl'] = '';
$text['label-user_agent']['pt-br'] = '';
$text['label-user_agent']['pt-pt'] = '';
$text['label-user_agent']['ro-ro'] = '';
$text['label-user_agent']['ru-ru'] = '';
$text['label-user_agent']['sv-se'] = '';
$text['label-user_agent']['uk-ua'] = '';
$text['description-user_agent']['en-us'] = 'Enter the user agent.';
$text['description-user_agent']['ar-eg'] = '';
$text['description-user_agent']['de-at'] = '';
$text['description-user_agent']['de-ch'] = '';
$text['description-user_agent']['de-de'] = '';
$text['description-user_agent']['es-cl'] = '';
$text['description-user_agent']['es-mx'] = '';
$text['description-user_agent']['fr-ca'] = '';
$text['description-user_agent']['fr-fr'] = '';
$text['description-user_agent']['he-il'] = '';
$text['description-user_agent']['it-it'] = '';
$text['description-user_agent']['nl-nl'] = '';
$text['description-user_agent']['pl-pl'] = '';
$text['description-user_agent']['pt-br'] = '';
$text['description-user_agent']['pt-pt'] = '';
$text['description-user_agent']['ro-ro'] = '';
$text['description-user_agent']['ru-ru'] = '';
$text['description-user_agent']['sv-se'] = '';
$text['description-user_agent']['uk-ua'] = '';
$text['label-location']['en-us'] = 'Location';
$text['label-location']['ar-eg'] = '';
$text['label-location']['de-at'] = '';
$text['label-location']['de-ch'] = '';
$text['label-location']['de-de'] = '';
$text['label-location']['es-cl'] = '';
$text['label-location']['es-mx'] = '';
$text['label-location']['fr-ca'] = '';
$text['label-location']['fr-fr'] = '';
$text['label-location']['he-il'] = '';
$text['label-location']['it-it'] = '';
$text['label-location']['nl-nl'] = '';
$text['label-location']['pl-pl'] = '';
$text['label-location']['pt-br'] = '';
$text['label-location']['pt-pt'] = '';
$text['label-location']['ro-ro'] = '';
$text['label-location']['ru-ru'] = '';
$text['label-location']['sv-se'] = '';
$text['label-location']['uk-ua'] = '';
$text['description-location']['en-us'] = 'Enter the location.';
$text['description-location']['ar-eg'] = '';
$text['description-location']['de-at'] = '';
$text['description-location']['de-ch'] = '';
$text['description-location']['de-de'] = '';
$text['description-location']['es-cl'] = '';
$text['description-location']['es-mx'] = '';
$text['description-location']['fr-ca'] = '';
$text['description-location']['fr-fr'] = '';
$text['description-location']['he-il'] = '';
$text['description-location']['it-it'] = '';
$text['description-location']['nl-nl'] = '';
$text['description-location']['pl-pl'] = '';
$text['description-location']['pt-br'] = '';
$text['description-location']['pt-pt'] = '';
$text['description-location']['ro-ro'] = '';
$text['description-location']['ru-ru'] = '';
$text['description-location']['sv-se'] = '';
$text['description-location']['uk-ua'] = '';
?>

View File

@@ -0,0 +1,19 @@
<?php
$apps[$x]['menu'][0]['title']['en-us'] = 'User Logs';
$apps[$x]['menu'][0]['title']['es-cl'] = '';
$apps[$x]['menu'][0]['title']['fr-fr'] = '';
$apps[$x]['menu'][0]['title']['fr-ca'] = '';
$apps[$x]['menu'][0]['title']['pl'] = '';
$apps[$x]['menu'][0]['title']['sv-se'] = '';
$apps[$x]['menu'][0]['title']['uk'] = '';
$apps[$x]['menu'][0]['title']['de-at'] = '';
$apps[$x]['menu'][0]['uuid'] = '88e5773a-2e33-43dc-9a6e-07d46d200e9c';
$apps[$x]['menu'][0]['parent_uuid'] = '0438b504-8613-7887-c420-c837ffb20cb1';
$apps[$x]['menu'][0]['category'] = 'internal';
$apps[$x]['menu'][0]['path'] = '/app/user_logs/user_logs.php';
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
//$apps[$x]['menu'][0]['groups'][] = 'admin';
//$apps[$x]['menu'][0]['groups'][] = 'user';
?>

View File

@@ -0,0 +1,125 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2019
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
/**
* user_logs class
*
* @method null delete
* @method null toggle
* @method null copy
*/
if (!class_exists('user_logs')) {
class user_logs {
/**
* declare the variables
*/
private $app_name;
private $app_uuid;
private $name;
private $table;
private $toggle_field;
private $toggle_values;
private $location;
/**
* called when the object is created
*/
public function __construct() {
//assign the variables
$this->app_name = 'user_logs';
$this->app_uuid = '582a13cf-7d75-4ea3-b2d9-60914352d76e';
$this->name = 'user_log';
$this->table = 'user_logs';
$this->toggle_field = '';
$this->toggle_values = ['true','false'];
$this->location = 'user_logs.php';
}
/**
* called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
/**
* delete rows from the database
*/
public function delete($records) {
if (permission_exists($this->name.'_delete')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//delete multiple records
if (is_array($records) && @sizeof($records) != 0) {
//build the delete array
$x = 0;
foreach ($records as $record) {
//add to the array
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
$array[$this->table][$x][$this->name.'_uuid'] = $record['uuid'];
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
}
//increment the id
$x++;
}
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//execute delete
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->delete($array);
unset($array);
//set message
message::add($text['message-delete']);
}
unset($records);
}
}
}
}
}
?>

90
core/user_logs/root.php Normal file
View File

@@ -0,0 +1,90 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
umask(2);
if (!defined("PATH_SEPARATOR")) {
if (strpos($_ENV["OS"], "Win") !== false) {
define("PATH_SEPARATOR", ";");
} else {
define("PATH_SEPARATOR", ":");
}
}
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
if(PHP_SAPI == 'cli'){
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
if (file_exists('/project_root.php')) {
$path = '/';
} else {
$i = 1;
$path = '';
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
}
$_SERVER["DOCUMENT_ROOT"] = $path;
}else{
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
}
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
// try to detect if a project path is being used
if (!defined('PROJECT_PATH')) {
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
define('PROJECT_PATH', '/fusionpbx');
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
define('PROJECT_PATH', '');
} else {
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
$i = 1;
$path = $_SERVER["DOCUMENT_ROOT"];
while ($i < count($dirs)) {
$path .= '/' . $dirs[$i];
if (file_exists($path. '/project_root.php')) {
break;
}
$i++;
}
if(!file_exists($path. '/project_root.php')){
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
}
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
define('PROJECT_PATH', $project_path);
}
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
}
?>

View File

@@ -0,0 +1,213 @@
<?php
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('user_log_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get the uuid
$user_log_uuid = $_GET['id'];
//pre-populate the form
if (is_array($_GET) && $_POST["persistformvar"] != "true") {
$sql = "select * from v_user_logs ";
$sql .= "where user_log_uuid = :user_log_uuid ";
//$sql .= "and domain_uuid = :domain_uuid ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['user_log_uuid'] = $user_log_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$domain_uuid = $row["domain_uuid"];
$timestamp = $row["timestamp"];
$user_uuid = $row["user_uuid"];
$username = $row["username"];
$type = $row["type"];
$result = $row["result"];
$remote_address = $row["remote_address"];
$user_agent = $row["user_agent"];
}
unset($sql, $parameters, $row);
}
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//show the header
$document['title'] = $text['title-user_log'];
require_once "resources/header.php";
//get the users
$sql = "SELECT user_uuid, username FROM v_users ";
$sql .= "WHERE domain_uuid = :domain_uuid ";
$sql .= "ORDER by username asc ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
$users = $database->execute($sql, $parameters, 'all');
unset ($sql, $parameters);
//show the content
echo "<form name='frm' id='frm' method='post' action=''>\n";
echo "<input class='formfld' type='hidden' name='user_log_uuid' value='".escape($user_log_uuid)."'>\n";
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-user_log']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'user_logs.php']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
echo $text['title_description-user_logs']."\n";
echo "<br /><br />\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-domain_uuid']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='domain_uuid'>\n";
if (strlen($domain_uuid) == 0) {
echo " <option value='' selected='selected'>".$text['select-global']."</option>\n";
}
else {
echo " <option value=''>".$text['label-global']."</option>\n";
}
foreach ($_SESSION['domains'] as $row) {
if ($row['domain_uuid'] == $domain_uuid) {
echo " <option value='".$row['domain_uuid']."' selected='selected'>".escape($row['domain_name'])."</option>\n";
}
else {
echo " <option value='".$row['domain_uuid']."'>".$row['domain_name']."</option>\n";
}
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-domain_uuid']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-timestamp']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='timestamp' maxlength='255' value='".escape($timestamp)."'>\n";
echo "<br />\n";
echo $text['description-timestamp']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-user_uuid']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='user_uuid'>\n";
echo " <option value=''></option>\n";
foreach($users as $field) {
if ($field['user_uuid'] == $user_uuid) { $selected = "selected='selected'"; } else { $selected = ''; }
echo " <option value='".$field['user_uuid']."' $selected>".escape($field['username'])."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-user_uuid']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-username']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='username' maxlength='255' value='".escape($username)."'>\n";
echo "<br />\n";
echo $text['description-username']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-type']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='type' maxlength='255' value='".escape($type)."'>\n";
echo "<br />\n";
echo $text['description-type']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-result']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select class='formfld' name='result'>\n";
echo " <option value=''></option>\n";
if ($result == "success") {
echo " <option value='success' selected='selected'>".$text['label-success']."</option>\n";
}
else {
echo " <option value='success'>".$text['label-success']."</option>\n";
}
if ($result == "failure") {
echo " <option value='failure' selected='selected'>".$text['label-failure']."</option>\n";
}
else {
echo " <option value='failure'>".$text['label-failure']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-result']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-remote_address']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='remote_address' maxlength='255' value='".escape($remote_address)."'>\n";
echo "<br />\n";
echo $text['description-remote_address']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-user_agent']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <input class='formfld' type='text' name='user_agent' maxlength='255' value='".escape($user_agent)."'>\n";
echo "<br />\n";
echo $text['description-user_agent']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>";
echo "<br /><br />";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -0,0 +1,262 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2020
the Initial Developer. All Rights Reserved.
*/
//includes
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
require_once "resources/paging.php";
//check permissions
if (permission_exists('user_log_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get the http post data
if (is_array($_POST['user_logs'])) {
$action = $_POST['action'];
$search = $_POST['search'];
$user_logs = $_POST['user_logs'];
}
//process the http post data by action
if ($action != '' && is_array($user_logs) && @sizeof($user_logs) != 0) {
//validate the token
$token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: user_logs.php');
exit;
}
//prepare the array
foreach($user_logs as $row) {
$array['user_logs'][$x]['checked'] = $row['checked'];
$array['user_logs'][$x]['user_log_uuid'] = $row['user_log_uuid'];
$x++;
}
//prepare the database object
$database = new database;
$database->app_name = 'user_logs';
$database->app_uuid = '582a13cf-7d75-4ea3-b2d9-60914352d76e';
//send the array to the database class
if ($action == 'delete') {
if (permission_exists('user_log_delete')) {
$database->delete($array);
}
}
//redirect the user
header('Location: user_logs.php'.($search != '' ? '?search='.urlencode($search) : null));
exit;
}
//get order and order by
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//add the search
if (isset($_GET["search"])) {
$search = strtolower($_GET["search"]);
$parameters['search'] = '%'.$search.'%';
}
//get the count
$sql = "select count(user_log_uuid) ";
$sql .= "from v_user_logs ";
if (isset($search)) {
$sql .= "where (";
$sql .= " lower(username) like :search ";
$sql .= " or lower(type) like :search ";
$sql .= " or lower(result) like :search ";
$sql .= " or lower(remote_address) like :search ";
$sql .= " or lower(user_agent) like :search ";
$sql .= ") ";
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
}
$parameters['domain_uuid'] = $domain_uuid;
}
$database = new database;
$num_rows = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
//prepare to page the results
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
$param = $search ? "&search=".$search : null;
$param = ($_GET['show'] == 'all' && permission_exists('user_log_all')) ? "&show=all" : null;
$page = is_numeric($_GET['page']) ? $_GET['page'] : 0;
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
$offset = $rows_per_page * $page;
//get the list
$sql = "select ";
$sql .= "domain_uuid, ";
$sql .= "user_log_uuid, ";
$sql .= "timestamp, ";
$sql .= "username, ";
$sql .= "type, ";
$sql .= "result, ";
$sql .= "remote_address, ";
$sql .= "user_agent ";
$sql .= "from v_user_logs ";
if (isset($_GET["search"])) {
$sql .= "where (";
$sql .= " lower(username) like :search ";
$sql .= " or lower(type) like :search ";
$sql .= " or lower(result) like :search ";
$sql .= " or lower(remote_address) like :search ";
$sql .= " or lower(user_agent) like :search ";
$sql .= ") ";
}
$sql .= order_by($order_by, $order, 'timestamp', 'desc');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$user_logs = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//create token
$object = new token;
$token = $object->create($_SERVER['PHP_SELF']);
//additional includes
$document['title'] = $text['title-user_logs'];
require_once "resources/header.php";
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-user_logs']." (".$num_rows.")</b></div>\n";
echo " <div class='actions'>\n";
if (permission_exists('user_log_delete') && $user_logs) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('user_log_all')) {
if ($_GET['show'] == 'all') {
echo " <input type='hidden' name='show' value='all'>\n";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'?show=all']);
}
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'user_logs.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (permission_exists('user_log_delete') && $user_logs) {
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
}
echo $text['title_description-user_logs']."\n";
echo "<br /><br />\n";
echo "<form id='form_list' method='post'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='search' value=\"".escape($search)."\">\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('user_log_add') || permission_exists('user_log_edit') || permission_exists('user_log_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".($user_logs ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
if ($_GET['show'] == 'all' && permission_exists('user_log_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('timestamp', $text['label-timestamp'], $order_by, $order);
echo th_order_by('username', $text['label-username'], $order_by, $order);
echo th_order_by('type', $text['label-type'], $order_by, $order);
echo th_order_by('result', $text['label-result'], $order_by, $order);
echo th_order_by('remote_address', $text['label-remote_address'], $order_by, $order);
echo th_order_by('user_agent', $text['label-user_agent'], $order_by, $order);
if (permission_exists('user_log_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($user_logs) && @sizeof($user_logs) != 0) {
$x = 0;
foreach ($user_logs as $row) {
if (permission_exists('user_log_edit')) {
$list_row_url = "user_log_edit.php?id=".urlencode($row['user_log_uuid']);
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('user_log_add') || permission_exists('user_log_edit') || permission_exists('user_log_delete')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='user_logs[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='user_logs[$x][user_log_uuid]' value='".escape($row['user_log_uuid'])."' />\n";
echo " </td>\n";
}
if ($_GET['show'] == 'all' && permission_exists('user_log_all')) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
echo " <td>".escape($row['timestamp'])."</td>\n";
echo " <td>".escape($row['username'])."</td>\n";
echo " <td>".escape($row['type'])."</td>\n";
echo " <td>".escape($row['result'])."</td>\n";
echo " <td>".escape($row['remote_address'])."</td>\n";
echo " <td>".escape($row['user_agent'])."</td>\n";
if (permission_exists('user_log_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";
$x++;
}
unset($user_logs);
}
echo "</table>\n";
echo "<br />\n";
echo "<div align='center'>".$paging_controls."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//include the footer
require_once "resources/footer.php";
?>