Compare commits
No commits in common. "3279a565aaa6766dcfff2770eab7d7ec91e1a1a1" and "06bf414f41e7292cf0d55e1359451b07dd26d30b" have entirely different histories.
3279a565aa
...
06bf414f41
|
@ -1,11 +1,8 @@
|
||||||
<?php
|
<?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
|
// specify time range
|
||||||
include '../app/helpers/time_range.php';
|
include '../app/helpers/time_range.php';
|
||||||
|
@ -16,7 +13,7 @@ $browse_page = $_REQUEST['p'] ?? 1;
|
||||||
$browse_page = (int)$browse_page;
|
$browse_page = (int)$browse_page;
|
||||||
$offset = ($browse_page -1) * $items_per_page;
|
$offset = ($browse_page -1) * $items_per_page;
|
||||||
|
|
||||||
// logs scope: user or system
|
// user or system
|
||||||
$scope = 'user';
|
$scope = 'user';
|
||||||
|
|
||||||
// prepare the result
|
// prepare the result
|
||||||
|
|
|
@ -1,24 +1,5 @@
|
||||||
<?php
|
<?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'] ?? '';
|
$action = $_REQUEST['action'] ?? '';
|
||||||
|
|
||||||
// if a form is submitted, it's from the edit page
|
// if a form is submitted, it's from the edit page
|
||||||
|
|
|
@ -1,17 +1,9 @@
|
||||||
<?php
|
<?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) {
|
if ($config['registration_enabled'] === true) {
|
||||||
|
|
||||||
// clear any previous error messages
|
// require '../app/classes/user.php';
|
||||||
unset($error);
|
unset($error);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -19,6 +11,8 @@ if ($config['registration_enabled'] === true) {
|
||||||
// connect to database
|
// connect to database
|
||||||
$dbWeb = connectDB($config);
|
$dbWeb = connectDB($config);
|
||||||
|
|
||||||
|
// $userObject = new User($dbWeb);
|
||||||
|
|
||||||
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
||||||
$username = $_POST['username'];
|
$username = $_POST['username'];
|
||||||
$password = $_POST['password'];
|
$password = $_POST['password'];
|
||||||
|
|
Loading…
Reference in New Issue