Compare commits
3 Commits
06bf414f41
...
3279a565aa
Author | SHA1 | Date |
---|---|---|
|
3279a565aa | |
|
69ac69f41c | |
|
4f5557f6ca |
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
//
|
||||
// logs listings
|
||||
//
|
||||
/**
|
||||
* Logs Listings
|
||||
*
|
||||
* This page ("logs") retrieves and displays logs for a specified user within a time range.
|
||||
* It supports pagination and filtering, and generates a widget to display the logs.
|
||||
*/
|
||||
|
||||
// specify time range
|
||||
include '../app/helpers/time_range.php';
|
||||
|
@ -13,7 +16,7 @@ $browse_page = $_REQUEST['p'] ?? 1;
|
|||
$browse_page = (int)$browse_page;
|
||||
$offset = ($browse_page -1) * $items_per_page;
|
||||
|
||||
// user or system
|
||||
// logs scope: user or system
|
||||
$scope = 'user';
|
||||
|
||||
// prepare the result
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* User Profile Management
|
||||
*
|
||||
* This page ("profile") handles user profile actions such as updating user details,
|
||||
* avatar management, and assigning or removing user rights.
|
||||
* It supports both form submissions and displaying profile templates.
|
||||
*
|
||||
* Actions handled:
|
||||
* - `remove`: Remove a user's avatar.
|
||||
* - `edit`: Edit user profile details, rights, or avatar.
|
||||
*
|
||||
* Global Variables Used:
|
||||
* - `$userObject`: Instance of the user management class.
|
||||
* - `$userDetails`: Current user details array.
|
||||
* - `$userRights`: Array of user's current rights.
|
||||
* - `$config`: Configuration array for avatars and other settings.
|
||||
* - `$app_root`: Base URL of the application.
|
||||
*/
|
||||
|
||||
$action = $_REQUEST['action'] ?? '';
|
||||
|
||||
// if a form is submitted, it's from the edit page
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
<?php
|
||||
|
||||
// registration is allowed, go on
|
||||
/**
|
||||
* User registration
|
||||
*
|
||||
* This page ("register") handles user registration if the feature is enabled in the configuration.
|
||||
* It accepts a POST request with a username and password, attempts to register the user,
|
||||
* and redirects to the login page on success or displays an error message on failure.
|
||||
*/
|
||||
|
||||
// check if the registration is allowed
|
||||
if ($config['registration_enabled'] === true) {
|
||||
|
||||
// require '../app/classes/user.php';
|
||||
// clear any previous error messages
|
||||
unset($error);
|
||||
|
||||
try {
|
||||
|
@ -11,8 +19,6 @@ if ($config['registration_enabled'] === true) {
|
|||
// connect to database
|
||||
$dbWeb = connectDB($config);
|
||||
|
||||
// $userObject = new User($dbWeb);
|
||||
|
||||
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
|
Loading…
Reference in New Issue