@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | DB::update( |
| 112 | 112 | prefixTable('background_subtasks'), |
| 113 | 113 | array( |
| 114 | - 'sub_task_in_progress' => 0, // flag sub task is no more in prgoress |
|
| 114 | + 'sub_task_in_progress' => 0, // flag sub task is no more in prgoress |
|
| 115 | 115 | 'is_in_progress' => 0, |
| 116 | 116 | 'finished_at' => time(), |
| 117 | 117 | 'updated_at' => time(), |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | // Check if user exists |
| 148 | 148 | $userInfo = DB::queryFirstRow( |
| 149 | 149 | 'SELECT public_key, private_key |
| 150 | - FROM ' . prefixTable('users') . ' |
|
| 150 | + FROM ' . prefixTable('users').' |
|
| 151 | 151 | WHERE id = %i', |
| 152 | 152 | $post_user_id |
| 153 | 153 | ); |
@@ -260,13 +260,13 @@ discard block |
||
| 260 | 260 | { |
| 261 | 261 | $userInfo = DB::queryFirstRow( |
| 262 | 262 | 'SELECT pw, public_key, private_key, login, name |
| 263 | - FROM ' . prefixTable('users') . ' |
|
| 263 | + FROM ' . prefixTable('users').' |
|
| 264 | 264 | WHERE id = %i', |
| 265 | 265 | $owner_id |
| 266 | 266 | ); |
| 267 | 267 | |
| 268 | 268 | // decrypt owner password |
| 269 | - $pwd = cryption($owner_pwd, '','decrypt', $SETTINGS)['string']; |
|
| 269 | + $pwd = cryption($owner_pwd, '', 'decrypt', $SETTINGS)['string']; |
|
| 270 | 270 | // decrypt private key and send back |
| 271 | 271 | return [ |
| 272 | 272 | 'private_key' => decryptPrivateKey($pwd, $userInfo['private_key']), |
@@ -306,17 +306,17 @@ discard block |
||
| 306 | 306 | // Loop on items |
| 307 | 307 | $rows = DB::query( |
| 308 | 308 | 'SELECT id, pw, perso |
| 309 | - FROM ' . prefixTable('items') . ' |
|
| 309 | + FROM ' . prefixTable('items').' |
|
| 310 | 310 | '.(isset($extra_arguments['only_personal_items']) === true && $extra_arguments['only_personal_items'] === 1 ? 'WHERE perso = 1' : '').' |
| 311 | 311 | ORDER BY id ASC |
| 312 | - LIMIT ' . $post_start . ', ' . $post_length |
|
| 312 | + LIMIT ' . $post_start.', '.$post_length |
|
| 313 | 313 | ); |
| 314 | 314 | // WHERE perso = 0 |
| 315 | 315 | foreach ($rows as $record) { |
| 316 | 316 | // Get itemKey from current user |
| 317 | 317 | $currentUserKey = DB::queryFirstRow( |
| 318 | 318 | 'SELECT share_key, increment_id |
| 319 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 319 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 320 | 320 | WHERE object_id = %i AND user_id = %i', |
| 321 | 321 | $record['id'], |
| 322 | 322 | //$extra_arguments['owner_id'] |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | |
| 346 | 346 | $currentUserKey = DB::queryFirstRow( |
| 347 | 347 | 'SELECT increment_id |
| 348 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 348 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 349 | 349 | WHERE object_id = %i AND user_id = %i', |
| 350 | 350 | $record['id'], |
| 351 | 351 | $post_user_id |
@@ -419,15 +419,15 @@ discard block |
||
| 419 | 419 | // Loop on logs |
| 420 | 420 | $rows = DB::query( |
| 421 | 421 | 'SELECT increment_id |
| 422 | - FROM ' . prefixTable('log_items') . ' |
|
| 422 | + FROM ' . prefixTable('log_items').' |
|
| 423 | 423 | WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes" |
| 424 | - LIMIT ' . $post_start . ', ' . $post_length |
|
| 424 | + LIMIT ' . $post_start.', '.$post_length |
|
| 425 | 425 | ); |
| 426 | 426 | foreach ($rows as $record) { |
| 427 | 427 | // Get itemKey from current user |
| 428 | 428 | $currentUserKey = DB::queryFirstRow( |
| 429 | 429 | 'SELECT share_key |
| 430 | - FROM ' . prefixTable('sharekeys_logs') . ' |
|
| 430 | + FROM ' . prefixTable('sharekeys_logs').' |
|
| 431 | 431 | WHERE object_id = %i AND user_id = %i', |
| 432 | 432 | $record['increment_id'], |
| 433 | 433 | $extra_arguments['owner_id'] |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | if ((int) $post_user_id !== (int) $extra_arguments['owner_id']) { |
| 460 | 460 | $currentUserKey = DB::queryFirstRow( |
| 461 | 461 | 'SELECT increment_id |
| 462 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 462 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 463 | 463 | WHERE object_id = %i AND user_id = %i', |
| 464 | 464 | $record['id'], |
| 465 | 465 | $post_user_id |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | // SHould we change step? |
| 482 | 482 | DB::query( |
| 483 | 483 | 'SELECT increment_id |
| 484 | - FROM ' . prefixTable('log_items') . ' |
|
| 484 | + FROM ' . prefixTable('log_items').' |
|
| 485 | 485 | WHERE raison LIKE "at_pw :%" AND encryption_type = "teampass_aes"' |
| 486 | 486 | ); |
| 487 | 487 | |
@@ -521,15 +521,15 @@ discard block |
||
| 521 | 521 | // Loop on fields |
| 522 | 522 | $rows = DB::query( |
| 523 | 523 | 'SELECT id |
| 524 | - FROM ' . prefixTable('categories_items') . ' |
|
| 524 | + FROM ' . prefixTable('categories_items').' |
|
| 525 | 525 | WHERE encryption_type = "teampass_aes" |
| 526 | - LIMIT ' . $post_start . ', ' . $post_length |
|
| 526 | + LIMIT ' . $post_start.', '.$post_length |
|
| 527 | 527 | ); |
| 528 | 528 | foreach ($rows as $record) { |
| 529 | 529 | // Get itemKey from current user |
| 530 | 530 | $currentUserKey = DB::queryFirstRow( |
| 531 | 531 | 'SELECT share_key |
| 532 | - FROM ' . prefixTable('sharekeys_fields') . ' |
|
| 532 | + FROM ' . prefixTable('sharekeys_fields').' |
|
| 533 | 533 | WHERE object_id = %i AND user_id = %i', |
| 534 | 534 | $record['id'], |
| 535 | 535 | $extra_arguments['owner_id'] |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | if ((int) $post_user_id !== (int) $extra_arguments['owner_id']) { |
| 558 | 558 | $currentUserKey = DB::queryFirstRow( |
| 559 | 559 | 'SELECT increment_id |
| 560 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 560 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 561 | 561 | WHERE object_id = %i AND user_id = %i', |
| 562 | 562 | $record['id'], |
| 563 | 563 | $post_user_id |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | // SHould we change step? |
| 581 | 581 | DB::query( |
| 582 | 582 | 'SELECT * |
| 583 | - FROM ' . prefixTable('categories_items') . ' |
|
| 583 | + FROM ' . prefixTable('categories_items').' |
|
| 584 | 584 | WHERE encryption_type = "teampass_aes"' |
| 585 | 585 | ); |
| 586 | 586 | |
@@ -620,14 +620,14 @@ discard block |
||
| 620 | 620 | // Loop on suggestions |
| 621 | 621 | $rows = DB::query( |
| 622 | 622 | 'SELECT id |
| 623 | - FROM ' . prefixTable('suggestion') . ' |
|
| 624 | - LIMIT ' . $post_start . ', ' . $post_length |
|
| 623 | + FROM ' . prefixTable('suggestion').' |
|
| 624 | + LIMIT ' . $post_start.', '.$post_length |
|
| 625 | 625 | ); |
| 626 | 626 | foreach ($rows as $record) { |
| 627 | 627 | // Get itemKey from current user |
| 628 | 628 | $currentUserKey = DB::queryFirstRow( |
| 629 | 629 | 'SELECT share_key |
| 630 | - FROM ' . prefixTable('sharekeys_suggestions') . ' |
|
| 630 | + FROM ' . prefixTable('sharekeys_suggestions').' |
|
| 631 | 631 | WHERE object_id = %i AND user_id = %i', |
| 632 | 632 | $record['id'], |
| 633 | 633 | $extra_arguments['owner_id'] |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | if ((int) $post_user_id !== (int) $extra_arguments['owner_id']) { |
| 660 | 660 | $currentUserKey = DB::queryFirstRow( |
| 661 | 661 | 'SELECT increment_id |
| 662 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 662 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 663 | 663 | WHERE object_id = %i AND user_id = %i', |
| 664 | 664 | $record['id'], |
| 665 | 665 | $post_user_id |
@@ -719,16 +719,16 @@ discard block |
||
| 719 | 719 | // Loop on files |
| 720 | 720 | $rows = DB::query( |
| 721 | 721 | 'SELECT f.id AS id, i.perso AS perso |
| 722 | - FROM ' . prefixTable('files') . ' AS f |
|
| 723 | - INNER JOIN ' . prefixTable('items') . ' AS i ON i.id = f.id_item |
|
| 724 | - WHERE f.status = "' . TP_ENCRYPTION_NAME . '" |
|
| 725 | - LIMIT ' . $post_start . ', ' . $post_length |
|
| 722 | + FROM ' . prefixTable('files').' AS f |
|
| 723 | + INNER JOIN ' . prefixTable('items').' AS i ON i.id = f.id_item |
|
| 724 | + WHERE f.status = "' . TP_ENCRYPTION_NAME.'" |
|
| 725 | + LIMIT ' . $post_start.', '.$post_length |
|
| 726 | 726 | ); //aes_encryption |
| 727 | 727 | foreach ($rows as $record) { |
| 728 | 728 | // Get itemKey from current user |
| 729 | 729 | $currentUserKey = DB::queryFirstRow( |
| 730 | 730 | 'SELECT share_key, increment_id |
| 731 | - FROM ' . prefixTable('sharekeys_files') . ' |
|
| 731 | + FROM ' . prefixTable('sharekeys_files').' |
|
| 732 | 732 | WHERE object_id = %i AND user_id = %i', |
| 733 | 733 | $record['id'], |
| 734 | 734 | (int) $record['perso'] === 0 ? $extra_arguments['owner_id'] : $extra_arguments['new_user_id'] |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | |
| 757 | 757 | $currentUserKey = DB::queryFirstRow( |
| 758 | 758 | 'SELECT increment_id |
| 759 | - FROM ' . prefixTable('sharekeys_files') . ' |
|
| 759 | + FROM ' . prefixTable('sharekeys_files').' |
|
| 760 | 760 | WHERE object_id = %i AND user_id = %i', |
| 761 | 761 | $record['id'], |
| 762 | 762 | $post_user_id |
@@ -787,8 +787,8 @@ discard block |
||
| 787 | 787 | // SHould we change step? Finished ? |
| 788 | 788 | DB::query( |
| 789 | 789 | 'SELECT * |
| 790 | - FROM ' . prefixTable('files') . ' |
|
| 791 | - WHERE status = "' . TP_ENCRYPTION_NAME . '"' |
|
| 790 | + FROM ' . prefixTable('files').' |
|
| 791 | + WHERE status = "' . TP_ENCRYPTION_NAME.'"' |
|
| 792 | 792 | ); |
| 793 | 793 | $counter = DB::count(); |
| 794 | 794 | $next_start = (int) $post_start + (int) $post_length; |
@@ -854,7 +854,7 @@ discard block |
||
| 854 | 854 | // get user info |
| 855 | 855 | $userInfo = DB::queryFirstRow( |
| 856 | 856 | 'SELECT email, login, auth_type, special, lastname, name |
| 857 | - FROM ' . prefixTable('users') . ' |
|
| 857 | + FROM ' . prefixTable('users').' |
|
| 858 | 858 | WHERE id = %i', |
| 859 | 859 | $extra_arguments['new_user_id'] |
| 860 | 860 | ); |
@@ -869,10 +869,10 @@ discard block |
||
| 869 | 869 | filter_var($userInfo['email'], FILTER_SANITIZE_FULL_SPECIAL_CHARS), |
| 870 | 870 | // @scrutinizer ignore-type |
| 871 | 871 | empty($extra_arguments['email_body']) === false ? $extra_arguments['email_body'] : $lang->get('email_body_user_config_1'), |
| 872 | - 'TEAMPASS - ' . $lang->get('login_credentials'), |
|
| 872 | + 'TEAMPASS - '.$lang->get('login_credentials'), |
|
| 873 | 873 | (array) filter_var_array( |
| 874 | 874 | [ |
| 875 | - '#code#' => cryption($extra_arguments['new_user_code'], '','decrypt', $SETTINGS)['string'], |
|
| 875 | + '#code#' => cryption($extra_arguments['new_user_code'], '', 'decrypt', $SETTINGS)['string'], |
|
| 876 | 876 | '#lastname#' => isset($userInfo['name']) === true ? $userInfo['name'] : '', |
| 877 | 877 | '#login#' => isset($userInfo['login']) === true ? $userInfo['login'] : '', |
| 878 | 878 | ], |
@@ -25,18 +25,18 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | use TeampassClasses\ConfigManager\ConfigManager; |
| 27 | 27 | |
| 28 | -define("API_ROOT_PATH", __DIR__ . "/.."); |
|
| 28 | +define("API_ROOT_PATH", __DIR__."/.."); |
|
| 29 | 29 | |
| 30 | 30 | // include main configuration file |
| 31 | -require API_ROOT_PATH . '/../sources/main.functions.php'; |
|
| 31 | +require API_ROOT_PATH.'/../sources/main.functions.php'; |
|
| 32 | 32 | |
| 33 | 33 | // include the base controller file |
| 34 | -require API_ROOT_PATH . "/Controller/Api/BaseController.php"; |
|
| 34 | +require API_ROOT_PATH."/Controller/Api/BaseController.php"; |
|
| 35 | 35 | |
| 36 | 36 | // include the use model file |
| 37 | -require API_ROOT_PATH . "/Model/UserModel.php"; |
|
| 38 | -require API_ROOT_PATH . "/Model/ItemModel.php"; |
|
| 39 | -require API_ROOT_PATH . "/Model/FolderModel.php"; |
|
| 37 | +require API_ROOT_PATH."/Model/UserModel.php"; |
|
| 38 | +require API_ROOT_PATH."/Model/ItemModel.php"; |
|
| 39 | +require API_ROOT_PATH."/Model/FolderModel.php"; |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Launch expected action for ITEM |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | // Perform the action |
| 58 | - require API_ROOT_PATH . "/Controller/Api/ItemController.php"; |
|
| 58 | + require API_ROOT_PATH."/Controller/Api/ItemController.php"; |
|
| 59 | 59 | $objFeedController = new ItemController(); |
| 60 | - $strMethodName = $actions[0] . 'Action'; |
|
| 60 | + $strMethodName = $actions[0].'Action'; |
|
| 61 | 61 | $objFeedController->{$strMethodName}($userData); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | ); |
| 79 | 79 | } |
| 80 | 80 | // Perform the action |
| 81 | - require API_ROOT_PATH . "/Controller/Api/FolderController.php"; |
|
| 81 | + require API_ROOT_PATH."/Controller/Api/FolderController.php"; |
|
| 82 | 82 | $objFeedController = new FolderController(); |
| 83 | - $strMethodName = $actions[0] . 'Action'; |
|
| 83 | + $strMethodName = $actions[0].'Action'; |
|
| 84 | 84 | $objFeedController->{$strMethodName}($userData); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | function verifyAuth(): string |
| 139 | 139 | { |
| 140 | - include_once API_ROOT_PATH . '/inc/jwt_utils.php'; |
|
| 140 | + include_once API_ROOT_PATH.'/inc/jwt_utils.php'; |
|
| 141 | 141 | $bearer_token = get_bearer_token(); |
| 142 | 142 | |
| 143 | 143 | if (empty($bearer_token) === false && is_jwt_valid($bearer_token) === true) { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | function getDataFromToken(): string |
| 169 | 169 | { |
| 170 | - include_once API_ROOT_PATH . '/inc/jwt_utils.php'; |
|
| 170 | + include_once API_ROOT_PATH.'/inc/jwt_utils.php'; |
|
| 171 | 171 | $bearer_token = get_bearer_token(); |
| 172 | 172 | |
| 173 | 173 | if (empty($bearer_token) === false) { |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | { |
| 30 | 30 | return DB::query( |
| 31 | 31 | 'SELECT * |
| 32 | - FROM ' . prefixTable('users') . ' |
|
| 32 | + FROM ' . prefixTable('users').' |
|
| 33 | 33 | ORDER BY id ASC LIMIT %i', |
| 34 | 34 | $limit |
| 35 | 35 | ); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // Get folders |
| 38 | 38 | $rows = DB::query( |
| 39 | 39 | 'SELECT id, title |
| 40 | - FROM ' . prefixTable('nested_tree') . ' |
|
| 40 | + FROM ' . prefixTable('nested_tree').' |
|
| 41 | 41 | WHERE nlevel = %i', |
| 42 | 42 | 1 |
| 43 | 43 | ); |
@@ -69,12 +69,12 @@ discard block |
||
| 69 | 69 | $ret = []; |
| 70 | 70 | $childrens = DB::query( |
| 71 | 71 | 'SELECT id, title |
| 72 | - FROM ' . prefixTable('nested_tree') . ' |
|
| 72 | + FROM ' . prefixTable('nested_tree').' |
|
| 73 | 73 | WHERE parent_id = %i', |
| 74 | 74 | $parentId |
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | - if ( count($childrens) > 0) { |
|
| 77 | + if (count($childrens) > 0) { |
|
| 78 | 78 | foreach ($childrens as $children) { |
| 79 | 79 | $isVisible = in_array((int) $children['id'], $foldersId); |
| 80 | 80 | $childs = $this->getFoldersChildren($children['id'], $foldersId); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | ): array |
| 117 | 117 | { |
| 118 | 118 | // Validate inputs |
| 119 | - include_once API_ROOT_PATH . '/../sources/main.functions.php'; |
|
| 119 | + include_once API_ROOT_PATH.'/../sources/main.functions.php'; |
|
| 120 | 120 | $data = [ |
| 121 | 121 | 'title' => $title, |
| 122 | 122 | 'parent_id' => $parent_id, |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | 'error' => true, |
| 182 | 182 | 'error_header' => 'HTTP/1.1 422 Unprocessable Entity', |
| 183 | 183 | 'error_message' => 'Invalid parameters' |
| 184 | - ];} |
|
| 184 | + ]; } |
|
| 185 | 185 | |
| 186 | 186 | // Create folder |
| 187 | 187 | require_once TEAMPASS_ROOT_PATH.'/sources/folders.class.php'; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function getUserAuth(string $login, string $password, string $apikey): array |
| 50 | 50 | { |
| 51 | 51 | // Sanitize |
| 52 | - include_once API_ROOT_PATH . '/../sources/main.functions.php'; |
|
| 52 | + include_once API_ROOT_PATH.'/../sources/main.functions.php'; |
|
| 53 | 53 | $inputData = dataSanitizer( |
| 54 | 54 | [ |
| 55 | 55 | 'login' => isset($login) === true ? $login : '', |
@@ -74,8 +74,8 @@ discard block |
||
| 74 | 74 | // Check if user exists |
| 75 | 75 | $userInfo = DB::queryfirstrow( |
| 76 | 76 | "SELECT u.id, u.pw, u.login, u.admin, u.gestionnaire, u.can_manage_all_users, u.fonction_id, u.can_create_root_folder, u.public_key, u.private_key, u.personal_folder, u.fonction_id, u.groupes_visibles, u.groupes_interdits, a.value AS user_api_key, a.allowed_folders as user_api_allowed_folders, a.enabled, a.allowed_to_create, a.allowed_to_read, a.allowed_to_update, a.allowed_to_delete |
| 77 | - FROM " . prefixTable('users') . " AS u |
|
| 78 | - INNER JOIN " . prefixTable('api') . " AS a ON (a.user_id=u.id) |
|
| 77 | + FROM " . prefixTable('users')." AS u |
|
| 78 | + INNER JOIN " . prefixTable('api')." AS a ON (a.user_id=u.id) |
|
| 79 | 79 | WHERE login = %s", |
| 80 | 80 | $inputData['login'] |
| 81 | 81 | ); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | if (count($userFunctionId) > 0) { |
| 252 | 252 | $rows = DB::query( |
| 253 | 253 | 'SELECT * |
| 254 | - FROM ' . prefixTable('roles_values') . ' |
|
| 254 | + FROM ' . prefixTable('roles_values').' |
|
| 255 | 255 | WHERE role_id IN %li AND type IN ("W", "ND", "NE", "NDNE", "R")', |
| 256 | 256 | $userFunctionId |
| 257 | 257 | ); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $inc = 0; |
| 278 | 278 | $rows = DB::query( |
| 279 | 279 | 'SELECT id, id_tree |
| 280 | - FROM ' . prefixTable('items') . ' |
|
| 280 | + FROM ' . prefixTable('items').' |
|
| 281 | 281 | WHERE restricted_to LIKE %s'. |
| 282 | 282 | (count($userFunctionId) > 0 ? ' AND id_tree NOT IN %li' : ''), |
| 283 | 283 | $userInfo['id'], |
@@ -292,8 +292,8 @@ discard block |
||
| 292 | 292 | // Check for the users roles if some specific rights exist on items |
| 293 | 293 | $rows = DB::query( |
| 294 | 294 | 'SELECT i.id_tree, r.item_id |
| 295 | - FROM ' . prefixTable('items') . ' AS i |
|
| 296 | - INNER JOIN ' . prefixTable('restriction_to_roles') . ' AS r ON (r.item_id=i.id) |
|
| 295 | + FROM ' . prefixTable('items').' AS i |
|
| 296 | + INNER JOIN ' . prefixTable('restriction_to_roles').' AS r ON (r.item_id=i.id) |
|
| 297 | 297 | WHERE '.(count($userFunctionId) > 0 ? ' id_tree NOT IN %li AND ' : '').' i.id_tree != "" |
| 298 | 298 | ORDER BY i.id_tree ASC', |
| 299 | 299 | count($userFunctionId) > 0 ? $userFunctionId : DB::sqleval('0') |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | // Add all personal folders |
| 310 | 310 | $rows = DB::queryFirstRow( |
| 311 | 311 | 'SELECT id |
| 312 | - FROM ' . prefixTable('nested_tree') . ' |
|
| 312 | + FROM ' . prefixTable('nested_tree').' |
|
| 313 | 313 | WHERE title = %i AND personal_folder = 1'. |
| 314 | 314 | (count($userFunctionId) > 0 ? ' AND id NOT IN %li' : ''), |
| 315 | 315 | $userInfo['id'], |
@@ -50,18 +50,18 @@ discard block |
||
| 50 | 50 | // Get items |
| 51 | 51 | $rows = DB::query( |
| 52 | 52 | 'SELECT i.id, label, description, i.pw, i.url, i.id_tree, i.login, i.email, i.viewed_no, i.fa_icon, i.inactif, i.perso, t.title as folder_label |
| 53 | - FROM ' . prefixTable('items') . ' AS i |
|
| 53 | + FROM ' . prefixTable('items').' AS i |
|
| 54 | 54 | LEFT JOIN '.prefixTable('nested_tree').' as t ON (t.id = i.id_tree) '. |
| 55 | - $sqlExtra . |
|
| 56 | - " ORDER BY i.id ASC" . |
|
| 57 | - ($limit > 0 ? " LIMIT ". $limit : '') |
|
| 55 | + $sqlExtra. |
|
| 56 | + " ORDER BY i.id ASC". |
|
| 57 | + ($limit > 0 ? " LIMIT ".$limit : '') |
|
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | 60 | $ret = []; |
| 61 | 61 | foreach ($rows as $row) { |
| 62 | 62 | $userKey = DB::queryfirstrow( |
| 63 | 63 | 'SELECT share_key |
| 64 | - FROM ' . prefixTable('sharekeys_items') . ' |
|
| 64 | + FROM ' . prefixTable('sharekeys_items').' |
|
| 65 | 65 | WHERE user_id = %i AND object_id = %i', |
| 66 | 66 | $userId, |
| 67 | 67 | $row['id'] |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | if (empty($path) === true) { |
| 99 | 99 | $path = htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES); |
| 100 | 100 | } else { |
| 101 | - $path .= '/' . htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES); |
|
| 101 | + $path .= '/'.htmlspecialchars(stripslashes(htmlspecialchars_decode($elem->title, ENT_QUOTES)), ENT_QUOTES); |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | ) : array |
| 149 | 149 | { |
| 150 | 150 | try { |
| 151 | - include_once API_ROOT_PATH . '/../sources/main.functions.php'; |
|
| 151 | + include_once API_ROOT_PATH.'/../sources/main.functions.php'; |
|
| 152 | 152 | |
| 153 | 153 | // Load config |
| 154 | 154 | $configManager = new ConfigManager(); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | if (strlen($password) > $SETTINGS['pwd_maximum_length']) { |
| 274 | - throw new Exception('Password is too long (max allowed is ' . $SETTINGS['pwd_maximum_length'] . ' characters)'); |
|
| 274 | + throw new Exception('Password is too long (max allowed is '.$SETTINGS['pwd_maximum_length'].' characters)'); |
|
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | { |
| 285 | 285 | $dataFolderSettings = DB::queryFirstRow( |
| 286 | 286 | 'SELECT bloquer_creation, bloquer_modification, personal_folder |
| 287 | - FROM ' . prefixTable('nested_tree') . ' |
|
| 287 | + FROM ' . prefixTable('nested_tree').' |
|
| 288 | 288 | WHERE id = %i', |
| 289 | 289 | $folderId |
| 290 | 290 | ); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | { |
| 308 | 308 | $folderComplexity = DB::queryFirstRow( |
| 309 | 309 | 'SELECT valeur |
| 310 | - FROM ' . prefixTable('misc') . ' |
|
| 310 | + FROM ' . prefixTable('misc').' |
|
| 311 | 311 | WHERE type = %s AND intitule = %i', |
| 312 | 312 | 'complex', |
| 313 | 313 | $itemInfos['folderId'] |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | private function checkForDuplicates(string $label, array $SETTINGS, array $itemInfos) : void |
| 336 | 336 | { |
| 337 | 337 | DB::queryFirstRow( |
| 338 | - 'SELECT * FROM ' . prefixTable('items') . ' |
|
| 338 | + 'SELECT * FROM '.prefixTable('items').' |
|
| 339 | 339 | WHERE label = %s AND inactif = %i', |
| 340 | 340 | $label, |
| 341 | 341 | 0 |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | // SQL where clause with folders list |
| 56 | 56 | if (isset($arrQueryStringParams['folders']) === true) { |
| 57 | 57 | // convert the folders to an array |
| 58 | - $arrQueryStringParams['folders'] = explode(',', str_replace( array('[',']') , '' , $arrQueryStringParams['folders'])); |
|
| 58 | + $arrQueryStringParams['folders'] = explode(',', str_replace(array('[', ']'), '', $arrQueryStringParams['folders'])); |
|
| 59 | 59 | |
| 60 | 60 | // ensure to only use the intersection |
| 61 | 61 | $foldersList = implode(',', array_intersect($arrQueryStringParams['folders'], $userData['folders_list'])); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } else { |
| 217 | 217 | // Gérer le cas où les paramètres ne sont pas un tableau |
| 218 | 218 | $strErrorDesc = 'Data not consistent'; |
| 219 | - $strErrorHeader = 'Expected array, received ' . gettype($arrQueryStringParams); |
|
| 219 | + $strErrorHeader = 'Expected array, received '.gettype($arrQueryStringParams); |
|
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | } else { |
@@ -263,10 +263,10 @@ discard block |
||
| 263 | 263 | // SQL where clause with item id |
| 264 | 264 | if (isset($arrQueryStringParams['id']) === true) { |
| 265 | 265 | // build sql where clause by ID |
| 266 | - $sqlExtra = ' WHERE i.id = '.$arrQueryStringParams['id'] . $sql_constraint; |
|
| 266 | + $sqlExtra = ' WHERE i.id = '.$arrQueryStringParams['id'].$sql_constraint; |
|
| 267 | 267 | } else if (isset($arrQueryStringParams['label']) === true) { |
| 268 | 268 | // build sql where clause by LABEL |
| 269 | - $sqlExtra = ' WHERE i.label '.(isset($arrQueryStringParams['like']) === true && (int) $arrQueryStringParams['like'] === 1 ? ' LIKE '.$arrQueryStringParams['label'] : ' = '.$arrQueryStringParams['label']) . $sql_constraint; |
|
| 269 | + $sqlExtra = ' WHERE i.label '.(isset($arrQueryStringParams['like']) === true && (int) $arrQueryStringParams['like'] === 1 ? ' LIKE '.$arrQueryStringParams['label'] : ' = '.$arrQueryStringParams['label']).$sql_constraint; |
|
| 270 | 270 | } else if (isset($arrQueryStringParams['description']) === true) { |
| 271 | 271 | // build sql where clause by LABEL |
| 272 | 272 | $sqlExtra = ' WHERE i.description '.(isset($arrQueryStringParams['like']) === true && (int) $arrQueryStringParams['like'] === 1 ? ' LIKE '.$arrQueryStringParams['description'] : ' = '.$arrQueryStringParams['description']).$sql_constraint; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | csrfProtector::init(); |
| 74 | 74 | |
| 75 | 75 | // Load functions |
| 76 | -require_once __DIR__. '/includes/config/include.php'; |
|
| 76 | +require_once __DIR__.'/includes/config/include.php'; |
|
| 77 | 77 | require_once __DIR__.'/sources/main.functions.php'; |
| 78 | 78 | |
| 79 | 79 | // init |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $SETTINGS = $antiXss->xss_clean($SETTINGS); |
| 108 | 108 | |
| 109 | 109 | // Load Core library |
| 110 | -require_once $SETTINGS['cpassman_dir'] . '/sources/core.php'; |
|
| 110 | +require_once $SETTINGS['cpassman_dir'].'/sources/core.php'; |
|
| 111 | 111 | // Prepare POST variables |
| 112 | 112 | $post_language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 113 | 113 | $session_user_language = $session->get('user-language'); |
@@ -146,8 +146,8 @@ discard block |
||
| 146 | 146 | //get default language |
| 147 | 147 | $dataLanguage = DB::queryFirstRow( |
| 148 | 148 | 'SELECT m.valeur AS valeur, l.flag AS flag |
| 149 | - FROM ' . prefixTable('misc') . ' AS m |
|
| 150 | - INNER JOIN ' . prefixTable('languages') . ' AS l ON (m.valeur = l.name) |
|
| 149 | + FROM ' . prefixTable('misc').' AS m |
|
| 150 | + INNER JOIN ' . prefixTable('languages').' AS l ON (m.valeur = l.name) |
|
| 151 | 151 | WHERE m.type=%s_type AND m.intitule=%s_intitule', |
| 152 | 152 | [ |
| 153 | 153 | 'type' => 'admin', |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $session_user_language = $SETTINGS['default_language']; |
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | -$lang = new Language($session_user_language, __DIR__. '/includes/language/'); |
|
| 181 | +$lang = new Language($session_user_language, __DIR__.'/includes/language/'); |
|
| 182 | 182 | |
| 183 | 183 | if (isset($SETTINGS['cpassman_dir']) === false || $SETTINGS['cpassman_dir'] === '') { |
| 184 | 184 | $SETTINGS['cpassman_dir'] = __DIR__; |
@@ -252,29 +252,29 @@ discard block |
||
| 252 | 252 | </script> |
| 253 | 253 | |
| 254 | 254 | <!-- IonIcons --> |
| 255 | - <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 255 | + <link rel="stylesheet" href="includes/css/ionicons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 256 | 256 | <!-- Theme style --> |
| 257 | - <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 258 | - <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 259 | - <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 260 | - <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 257 | + <link rel="stylesheet" href="plugins/adminlte/css/adminlte.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 258 | + <link rel="stylesheet" href="plugins/pace-progress/themes/corner-indicator.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 259 | + <link rel="stylesheet" href="plugins/select2/css/select2.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 260 | + <link rel="stylesheet" href="plugins/select2/theme/select2-bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 261 | 261 | <!-- Theme style --> |
| 262 | - <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 262 | + <link rel="stylesheet" href="includes/css/teampass.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 263 | 263 | <!-- Google Font: Source Sans Pro --> |
| 264 | - <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 264 | + <link rel="stylesheet" type="text/css" href="includes/fonts/fonts.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 265 | 265 | <!-- Altertify --> |
| 266 | - <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 267 | - <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 266 | + <link rel="stylesheet" href="plugins/alertifyjs/css/alertify.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 267 | + <link rel="stylesheet" href="plugins/alertifyjs/css/themes/bootstrap.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 268 | 268 | <!-- Toastr --> |
| 269 | - <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 269 | + <link rel="stylesheet" href="plugins/toastr/toastr.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 270 | 270 | <!-- favicon --> |
| 271 | - <link rel="shortcut icon" type="image/png" href="<?php echo $favicon;?>"/> |
|
| 271 | + <link rel="shortcut icon" type="image/png" href="<?php echo $favicon; ?>"/> |
|
| 272 | 272 | <!-- manifest (PWA) --> |
| 273 | - <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 273 | + <link rel="manifest" href="manifest.json?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 274 | 274 | <!-- Custom style --> |
| 275 | 275 | <?php |
| 276 | - if (file_exists(__DIR__ . '/includes/css/custom.css') === true) {?> |
|
| 277 | - <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 276 | + if (file_exists(__DIR__.'/includes/css/custom.css') === true) {?> |
|
| 277 | + <link rel="stylesheet" href="includes/css/custom.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 278 | 278 | <?php |
| 279 | 279 | } ?> |
| 280 | 280 | </head> |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | <div class="dropdown show"> |
| 323 | 323 | <a class="btn btn-primary dropdown-toggle" href="#" data-toggle="dropdown"> |
| 324 | 324 | <?php |
| 325 | - echo $session_name . ' ' . $session_lastname; ?> |
|
| 325 | + echo $session_name.' '.$session_lastname; ?> |
|
| 326 | 326 | </a> |
| 327 | 327 | |
| 328 | 328 | <div class="dropdown-menu dropdown-menu-right"> |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | </a> |
| 347 | 347 | <?php |
| 348 | 348 | } ?> |
| 349 | - <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : '';?>" href="#" data-name="generate-new_keys"> |
|
| 349 | + <a class="dropdown-item user-menu<?php echo (int) $session_user_admin === 1 ? ' hidden' : ''; ?>" href="#" data-name="generate-new_keys"> |
|
| 350 | 350 | <i class="fa-solid fa-spray-can-sparkles fa-fw mr-2"></i><?php echo $lang->get('generate_new_keys'); ?> |
| 351 | 351 | </a> |
| 352 | 352 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | <!-- Main Sidebar Container --> |
| 381 | 381 | <aside class="main-sidebar sidebar-dark-primary elevation-4"> |
| 382 | 382 | <!-- Brand Logo --> |
| 383 | - <a href="<?php echo $cpassman_url . '/index.php?page=' . ((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link"> |
|
| 383 | + <a href="<?php echo $cpassman_url.'/index.php?page='.((int) $session_user_admin === 1 ? 'admin' : 'items'); ?>" class="brand-link"> |
|
| 384 | 384 | <img src="includes/images/teampass-logo2-home.png" alt="Teampass Logo" class="brand-image"> |
| 385 | 385 | <span class="brand-text font-weight-light"><?php echo TP_TOOL_NAME; ?></span> |
| 386 | 386 | </a> |
@@ -398,20 +398,20 @@ discard block |
||
| 398 | 398 | <a href="#" data-name="items" class="nav-link', $get['page'] === 'items' ? ' active' : '', '"> |
| 399 | 399 | <i class="nav-icon fa-solid fa-key"></i> |
| 400 | 400 | <p> |
| 401 | - ' . $lang->get('pw') . ' |
|
| 401 | + ' . $lang->get('pw').' |
|
| 402 | 402 | </p> |
| 403 | 403 | </a> |
| 404 | 404 | </li>'; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | 407 | // IMPORT menu |
| 408 | - if (isset($SETTINGS['allow_import']) === true && (int) $SETTINGS['allow_import'] === 1&& $session_user_admin === 0) { |
|
| 408 | + if (isset($SETTINGS['allow_import']) === true && (int) $SETTINGS['allow_import'] === 1 && $session_user_admin === 0) { |
|
| 409 | 409 | echo ' |
| 410 | 410 | <li class="nav-item"> |
| 411 | 411 | <a href="#" data-name="import" class="nav-link', $get['page'] === 'import' ? ' active' : '', '"> |
| 412 | 412 | <i class="nav-icon fa-solid fa-file-import"></i> |
| 413 | 413 | <p> |
| 414 | - ' . $lang->get('import') . ' |
|
| 414 | + ' . $lang->get('import').' |
|
| 415 | 415 | </p> |
| 416 | 416 | </a> |
| 417 | 417 | </li>'; |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | <a href="#" data-name="export" class="nav-link', $get['page'] === 'export' ? ' active' : '', '"> |
| 433 | 433 | <i class="nav-icon fa-solid fa-file-export"></i> |
| 434 | 434 | <p> |
| 435 | - ' . $lang->get('export') . ' |
|
| 435 | + ' . $lang->get('export').' |
|
| 436 | 436 | </p> |
| 437 | 437 | </a> |
| 438 | 438 | </li>'; |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | <a href="#" data-name="search" class="nav-link', $get['page'] === 'search' ? ' active' : '', '"> |
| 460 | 460 | <i class="nav-icon fa-solid fa-search"></i> |
| 461 | 461 | <p> |
| 462 | - ' . $lang->get('find') . ' |
|
| 462 | + ' . $lang->get('find').' |
|
| 463 | 463 | </p> |
| 464 | 464 | </a> |
| 465 | 465 | </li>'; |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | <a href="#" data-name="favourites" class="nav-link', $get['page'] === 'favourites' ? ' active' : '', '"> |
| 476 | 476 | <i class="nav-icon fa-solid fa-star"></i> |
| 477 | 477 | <p> |
| 478 | - ' . $lang->get('favorites') . ' |
|
| 478 | + ' . $lang->get('favorites').' |
|
| 479 | 479 | </p> |
| 480 | 480 | </a> |
| 481 | 481 | </li>'; |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | <a href="#" data-name="suggestion" class="nav-link', $get['page'] === 'suggestion' ? ' active' : '', '"> |
| 506 | 506 | <i class="nav-icon fa-solid fa-lightbulb"></i> |
| 507 | 507 | <p> |
| 508 | - ' . $lang->get('suggestion_menu') . ' |
|
| 508 | + ' . $lang->get('suggestion_menu').' |
|
| 509 | 509 | </p> |
| 510 | 510 | </a> |
| 511 | 511 | </li>'; |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | <a href="#" data-name="admin" class="nav-link', $get['page'] === 'admin' ? ' active' : '', '"> |
| 519 | 519 | <i class="nav-icon fa-solid fa-info"></i> |
| 520 | 520 | <p> |
| 521 | - ' . $lang->get('admin_main') . ' |
|
| 521 | + ' . $lang->get('admin_main').' |
|
| 522 | 522 | </p> |
| 523 | 523 | </a> |
| 524 | 524 | </li> |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | <a href="#" class="nav-link"> |
| 527 | 527 | <i class="nav-icon fa-solid fa-wrench"></i> |
| 528 | 528 | <p> |
| 529 | - ' . $lang->get('admin_settings') . ' |
|
| 529 | + ' . $lang->get('admin_settings').' |
|
| 530 | 530 | <i class="fa-solid fa-angle-left right"></i> |
| 531 | 531 | </p> |
| 532 | 532 | </a> |
@@ -534,63 +534,63 @@ discard block |
||
| 534 | 534 | <li class="nav-item"> |
| 535 | 535 | <a href="#" data-name="options" class="nav-link', $get['page'] === 'options' ? ' active' : '', '"> |
| 536 | 536 | <i class="fa-solid fa-check-double nav-icon"></i> |
| 537 | - <p>' . $lang->get('options') . '</p> |
|
| 537 | + <p>' . $lang->get('options').'</p> |
|
| 538 | 538 | </a> |
| 539 | 539 | </li> |
| 540 | 540 | <li class="nav-item"> |
| 541 | 541 | <a href="#" data-name="2fa" class="nav-link', $get['page'] === '2fa' ? ' active' : '', '"> |
| 542 | 542 | <i class="fa-solid fa-qrcode nav-icon"></i> |
| 543 | - <p>' . $lang->get('mfa_short') . '</p> |
|
| 543 | + <p>' . $lang->get('mfa_short').'</p> |
|
| 544 | 544 | </a> |
| 545 | 545 | </li> |
| 546 | 546 | <li class="nav-item"> |
| 547 | 547 | <a href="#" data-name="api" class="nav-link', $get['page'] === 'api' ? ' active' : '', '"> |
| 548 | 548 | <i class="fa-solid fa-cubes nav-icon"></i> |
| 549 | - <p>' . $lang->get('api') . '</p> |
|
| 549 | + <p>' . $lang->get('api').'</p> |
|
| 550 | 550 | </a> |
| 551 | 551 | </li> |
| 552 | 552 | <li class="nav-item"> |
| 553 | 553 | <a href="#" data-name="backups" class="nav-link', $get['page'] === 'backups' ? ' active' : '', '"> |
| 554 | 554 | <i class="fa-solid fa-database nav-icon"></i> |
| 555 | - <p>' . $lang->get('backups') . '</p> |
|
| 555 | + <p>' . $lang->get('backups').'</p> |
|
| 556 | 556 | </a> |
| 557 | 557 | </li> |
| 558 | 558 | <li class="nav-item"> |
| 559 | 559 | <a href="#" data-name="emails" class="nav-link', $get['page'] === 'emails' ? ' active' : '', '"> |
| 560 | 560 | <i class="fa-solid fa-envelope nav-icon"></i> |
| 561 | - <p>' . $lang->get('emails') . '</p> |
|
| 561 | + <p>' . $lang->get('emails').'</p> |
|
| 562 | 562 | </a> |
| 563 | 563 | </li> |
| 564 | 564 | <li class="nav-item"> |
| 565 | 565 | <a href="#" data-name="fields" class="nav-link', $get['page'] === 'fields' ? ' active' : '', '"> |
| 566 | 566 | <i class="fa-solid fa-keyboard nav-icon"></i> |
| 567 | - <p>' . $lang->get('fields') . '</p> |
|
| 567 | + <p>' . $lang->get('fields').'</p> |
|
| 568 | 568 | </a> |
| 569 | 569 | </li> |
| 570 | 570 | <li class="nav-item"> |
| 571 | 571 | <a href="#" data-name="ldap" class="nav-link', $get['page'] === 'ldap' ? ' active' : '', '"> |
| 572 | 572 | <i class="fa-solid fa-id-card nav-icon"></i> |
| 573 | - <p>' . $lang->get('ldap') . '</p> |
|
| 573 | + <p>' . $lang->get('ldap').'</p> |
|
| 574 | 574 | </a> |
| 575 | 575 | </li> |
| 576 | 576 | |
| 577 | 577 | <li class="nav-item"> |
| 578 | 578 | <a href="#" data-name="oauth" class="nav-link', $get['page'] === 'oauth' ? ' active' : '', '"> |
| 579 | 579 | <i class="fa-solid fa-plug nav-icon"></i> |
| 580 | - <p>' . $lang->get('oauth') . '</p> |
|
| 580 | + <p>' . $lang->get('oauth').'</p> |
|
| 581 | 581 | </a> |
| 582 | 582 | </li> |
| 583 | 583 | |
| 584 | 584 | <li class="nav-item"> |
| 585 | 585 | <a href="#" data-name="uploads" class="nav-link', $get['page'] === 'uploads' ? ' active' : '', '"> |
| 586 | 586 | <i class="fa-solid fa-file-upload nav-icon"></i> |
| 587 | - <p>' . $lang->get('uploads') . '</p> |
|
| 587 | + <p>' . $lang->get('uploads').'</p> |
|
| 588 | 588 | </a> |
| 589 | 589 | </li> |
| 590 | 590 | <li class="nav-item"> |
| 591 | 591 | <a href="#" data-name="statistics" class="nav-link', $get['page'] === 'statistics' ? ' active' : '', '"> |
| 592 | 592 | <i class="fa-solid fa-chart-bar nav-icon"></i> |
| 593 | - <p>' . $lang->get('statistics') . '</p> |
|
| 593 | + <p>' . $lang->get('statistics').'</p> |
|
| 594 | 594 | </a> |
| 595 | 595 | </li> |
| 596 | 596 | </ul> |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | <li class="nav-item"> |
| 602 | 602 | <a href="#" data-name="tasks" class="nav-link', $get['page'] === 'tasks' ? ' active' : '', '"> |
| 603 | 603 | <i class="fa-solid fa-tasks nav-icon"></i> |
| 604 | - <p>' . $lang->get('tasks') . '</p> |
|
| 604 | + <p>' . $lang->get('tasks').'</p> |
|
| 605 | 605 | </a> |
| 606 | 606 | </li>'; |
| 607 | 607 | } |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | <a href="#" data-name="tools" class="nav-link', $get['page'] === 'tools' ? ' active' : '', '"> |
| 613 | 613 | <i class="nav-icon fa-solid fa-screwdriver-wrench"></i> |
| 614 | 614 | <p> |
| 615 | - ' . $lang->get('tools') . ' |
|
| 615 | + ' . $lang->get('tools').' |
|
| 616 | 616 | </p> |
| 617 | 617 | </a> |
| 618 | 618 | </li>'; |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | <a href="#" data-name="folders" class="nav-link', $get['page'] === 'folders' ? ' active' : '', '"> |
| 630 | 630 | <i class="nav-icon fa-solid fa-folder-open"></i> |
| 631 | 631 | <p> |
| 632 | - ' . $lang->get('folders') . ' |
|
| 632 | + ' . $lang->get('folders').' |
|
| 633 | 633 | </p> |
| 634 | 634 | </a> |
| 635 | 635 | </li> |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | <a href="#" data-name="roles" class="nav-link', $get['page'] === 'roles' ? ' active' : '', '"> |
| 638 | 638 | <i class="nav-icon fa-solid fa-graduation-cap"></i> |
| 639 | 639 | <p> |
| 640 | - ' . $lang->get('roles') . ' |
|
| 640 | + ' . $lang->get('roles').' |
|
| 641 | 641 | </p> |
| 642 | 642 | </a> |
| 643 | 643 | </li> |
@@ -645,38 +645,38 @@ discard block |
||
| 645 | 645 | <a href="#" data-name="users" class="nav-link', $get['page'] === 'users' ? ' active' : '', '"> |
| 646 | 646 | <i class="nav-icon fa-solid fa-users"></i> |
| 647 | 647 | <p> |
| 648 | - ' . $lang->get('users') . ' |
|
| 648 | + ' . $lang->get('users').' |
|
| 649 | 649 | </p> |
| 650 | 650 | </a> |
| 651 | 651 | </li> |
| 652 | 652 | <li class="nav-item has-treeview', $menuUtilities === true ? ' menu-open' : '', '"> |
| 653 | 653 | <a href="#" class="nav-link"> |
| 654 | 654 | <i class="nav-icon fa-solid fa-cubes"></i> |
| 655 | - <p>' . $lang->get('admin_views') . '<i class="fa-solid fa-angle-left right"></i></p> |
|
| 655 | + <p>' . $lang->get('admin_views').'<i class="fa-solid fa-angle-left right"></i></p> |
|
| 656 | 656 | </a> |
| 657 | 657 | <ul class="nav nav-treeview"> |
| 658 | 658 | <li class="nav-item"> |
| 659 | 659 | <a href="#" data-name="utilities.renewal" class="nav-link', $get['page'] === 'utilities.renewal' ? ' active' : '', '"> |
| 660 | 660 | <i class="far fa-calendar-alt nav-icon"></i> |
| 661 | - <p>' . $lang->get('renewal') . '</p> |
|
| 661 | + <p>' . $lang->get('renewal').'</p> |
|
| 662 | 662 | </a> |
| 663 | 663 | </li> |
| 664 | 664 | <li class="nav-item"> |
| 665 | 665 | <a href="#" data-name="utilities.deletion" class="nav-link', $get['page'] === 'utilities.deletion' ? ' active' : '', '"> |
| 666 | 666 | <i class="fa-solid fa-trash-alt nav-icon"></i> |
| 667 | - <p>' . $lang->get('deletion') . '</p> |
|
| 667 | + <p>' . $lang->get('deletion').'</p> |
|
| 668 | 668 | </a> |
| 669 | 669 | </li> |
| 670 | 670 | <li class="nav-item"> |
| 671 | 671 | <a href="#" data-name="utilities.logs" class="nav-link', $get['page'] === 'utilities.logs' ? ' active' : '', '"> |
| 672 | 672 | <i class="fa-solid fa-history nav-icon"></i> |
| 673 | - <p>' . $lang->get('logs') . '</p> |
|
| 673 | + <p>' . $lang->get('logs').'</p> |
|
| 674 | 674 | </a> |
| 675 | 675 | </li> |
| 676 | 676 | <li class="nav-item"> |
| 677 | 677 | <a href="#" data-name="utilities.database" class="nav-link', $get['page'] === 'utilities.database' ? ' active' : '', '"> |
| 678 | 678 | <i class="fa-solid fa-database nav-icon"></i> |
| 679 | - <p>' . $lang->get('database') . '</p> |
|
| 679 | + <p>' . $lang->get('database').'</p> |
|
| 680 | 680 | </a> |
| 681 | 681 | </li> |
| 682 | 682 | </ul> |
@@ -687,10 +687,10 @@ discard block |
||
| 687 | 687 | <!-- /.sidebar-menu --> |
| 688 | 688 | <div class="menu-footer"> |
| 689 | 689 | <div class="" id="sidebar-footer"> |
| 690 | - <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time') . ' ' . |
|
| 691 | - date($date_format, (int) $server['request_time']) . ' - ' . |
|
| 690 | + <i class="fa-solid fa-clock-o mr-2 infotip text-info pointer" title="<?php echo htmlspecialchars($lang->get('server_time').' '. |
|
| 691 | + date($date_format, (int) $server['request_time']).' - '. |
|
| 692 | 692 | date($time_format, (int) $server['request_time']), ENT_QUOTES, 'UTF-8'); ?>"></i> |
| 693 | - <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online . ' ' . $lang->get('users_online'); ?>"></i> |
|
| 693 | + <i class="fa-solid fa-users mr-2 infotip text-info pointer" title="<?php echo $session_nb_users_online.' '.$lang->get('users_online'); ?>"></i> |
|
| 694 | 694 | <a href="<?php echo DOCUMENTATION_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-book mr-2 infotip" title="<?php echo $lang->get('documentation_canal'); ?>"></i></a> |
| 695 | 695 | <a href="<?php echo HELP_URL; ?>" target="_blank" class="text-info"><i class="fa-solid fa-life-ring mr-2 infotip" title="<?php echo $lang->get('admin_help'); ?>"></i></a> |
| 696 | 696 | <?php if ($session_user_admin === 1) : ?><i class="fa-solid fa-bug infotip pointer text-info" title="<?php echo $lang->get('bugs_page'); ?>" onclick="generateBugReport()"></i><?php endif; ?> |
@@ -839,7 +839,7 @@ discard block |
||
| 839 | 839 | </div> |
| 840 | 840 | <div class="mt-3"> |
| 841 | 841 | <label> |
| 842 | - <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password');?></span> |
|
| 842 | + <span class="mr-2 pointer fw-normal"><i class="fa-solid fa-eye mr-2 text-orange"></i><?php echo $lang->get('show_user_password'); ?></span> |
|
| 843 | 843 | <input type="checkbox" id="dialog-admin-change-user-password-do-show-password" class="pointer"> |
| 844 | 844 | </label> |
| 845 | 845 | </div> |
@@ -998,34 +998,34 @@ discard block |
||
| 998 | 998 | if ($get['page'] === 'items') { |
| 999 | 999 | // SHow page with Items |
| 1000 | 1000 | if ((int) $session_user_admin !== 1) { |
| 1001 | - include $SETTINGS['cpassman_dir'] . '/pages/items.php'; |
|
| 1001 | + include $SETTINGS['cpassman_dir'].'/pages/items.php'; |
|
| 1002 | 1002 | } elseif ((int) $session_user_admin === 1) { |
| 1003 | - include $SETTINGS['cpassman_dir'] . '/pages/admin.php'; |
|
| 1003 | + include $SETTINGS['cpassman_dir'].'/pages/admin.php'; |
|
| 1004 | 1004 | } else { |
| 1005 | 1005 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 1006 | 1006 | //not allowed page |
| 1007 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 1007 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 1008 | 1008 | } |
| 1009 | 1009 | } elseif (in_array($get['page'], array_keys($mngPages)) === true) { |
| 1010 | 1010 | // Define if user is allowed to see management pages |
| 1011 | 1011 | if ($session_user_admin === 1) { |
| 1012 | 1012 | // deepcode ignore FileInclusion: $get['page'] is secured through usage of array_keys test bellow |
| 1013 | - include $SETTINGS['cpassman_dir'] . '/pages/' . basename($mngPages[$get['page']]); |
|
| 1013 | + include $SETTINGS['cpassman_dir'].'/pages/'.basename($mngPages[$get['page']]); |
|
| 1014 | 1014 | } elseif ($session_user_manager === 1 || $session_user_human_resources === 1) { |
| 1015 | 1015 | if ($get['page'] === 'manage_main' || $get['page'] === 'manage_settings' |
| 1016 | 1016 | ) { |
| 1017 | 1017 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 1018 | 1018 | //not allowed page |
| 1019 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 1019 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 1020 | 1020 | } |
| 1021 | 1021 | } else { |
| 1022 | 1022 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 1023 | 1023 | //not allowed page |
| 1024 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 1024 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 1025 | 1025 | } |
| 1026 | - } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'] . '/pages/' . $get['page'] . '.php') === true) { |
|
| 1026 | + } elseif (empty($get['page']) === false && file_exists($SETTINGS['cpassman_dir'].'/pages/'.$get['page'].'.php') === true) { |
|
| 1027 | 1027 | // deepcode ignore FileInclusion: $get['page'] is tested against file_exists just below |
| 1028 | - include $SETTINGS['cpassman_dir'] . '/pages/' . basename($get['page'] . '.php'); |
|
| 1028 | + include $SETTINGS['cpassman_dir'].'/pages/'.basename($get['page'].'.php'); |
|
| 1029 | 1029 | } else { |
| 1030 | 1030 | $session->set('system-array_roles', ERR_NOT_EXIST); |
| 1031 | 1031 | //page doesn't exist |
@@ -1061,7 +1061,7 @@ discard block |
||
| 1061 | 1061 | <footer class="main-footer"> |
| 1062 | 1062 | <!-- To the right --> |
| 1063 | 1063 | <div class="float-right d-none d-sm-inline"> |
| 1064 | - <?php echo $lang->get('version_alone'); ?> <?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?> |
|
| 1064 | + <?php echo $lang->get('version_alone'); ?> <?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?> |
|
| 1065 | 1065 | </div> |
| 1066 | 1066 | <!-- Default to the left --> |
| 1067 | 1067 | <strong>Copyright © <?php echo TP_COPYRIGHT; ?> <a href="<?php echo TEAMPASS_URL; ?>"><?php echo TP_TOOL_NAME; ?></a>.</strong> All rights reserved. |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | echo ' |
| 1076 | 1076 | <input type="hidden" id="temps_restant" value="', $session->get('user-session_duration') ?? '', '" />'; |
| 1077 | 1077 | // display an item in the context of OTV link |
| 1078 | -} elseif ((null === $session->get('user-validite_pw')|| empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true) |
|
| 1078 | +} elseif ((null === $session->get('user-validite_pw') || empty($session->get('user-validite_pw')) === true || empty($session->get('user-id')) === true) |
|
| 1079 | 1079 | && empty($get['otv']) === false |
| 1080 | 1080 | ) { |
| 1081 | 1081 | // case where one-shot viewer |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | FILTER_SANITIZE_URL |
| 1095 | 1095 | ) |
| 1096 | 1096 | ); |
| 1097 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 1097 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 1098 | 1098 | } |
| 1099 | 1099 | } elseif (//(empty($session->get('user-id')) === false && $session->get('user-id') !== null) || |
| 1100 | 1100 | empty($session->get('user-id')) === true |
@@ -1126,7 +1126,7 @@ discard block |
||
| 1126 | 1126 | } |
| 1127 | 1127 | |
| 1128 | 1128 | // LOGIN form |
| 1129 | - include $SETTINGS['cpassman_dir'] . '/includes/core/login.php'; |
|
| 1129 | + include $SETTINGS['cpassman_dir'].'/includes/core/login.php'; |
|
| 1130 | 1130 | |
| 1131 | 1131 | } else { |
| 1132 | 1132 | // Clear session |
@@ -1159,155 +1159,155 @@ discard block |
||
| 1159 | 1159 | <!-- REQUIRED SCRIPTS --> |
| 1160 | 1160 | |
| 1161 | 1161 | <!-- Font Awesome Icons --> |
| 1162 | - <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1163 | - <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1164 | - <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1165 | - <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1166 | - <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" rel="stylesheet" /> |
|
| 1162 | + <link href="plugins/fontawesome-free-6/css/fontawesome.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1163 | + <link href="plugins/fontawesome-free-6/css/solid.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1164 | + <link href="plugins/fontawesome-free-6/css/regular.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1165 | + <link href="plugins/fontawesome-free-6/css/brands.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet"> |
|
| 1166 | + <link href="plugins/fontawesome-free-6/css/v5-font-face.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" rel="stylesheet" /> |
|
| 1167 | 1167 | <!-- jQuery --> |
| 1168 | - <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1169 | - <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1168 | + <script src="plugins/jquery/jquery.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1169 | + <script src="plugins/jquery/jquery.cookie.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1170 | 1170 | <!-- jQuery UI --> |
| 1171 | - <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1172 | - <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1171 | + <script src="plugins/jqueryUI/jquery-ui.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1172 | + <link rel="stylesheet" href="plugins/jqueryUI/jquery-ui.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1173 | 1173 | <!-- Popper --> |
| 1174 | - <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1174 | + <script src="plugins/popper/umd/popper.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1175 | 1175 | <!-- Bootstrap --> |
| 1176 | - <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1176 | + <script src="plugins/bootstrap/js/bootstrap.bundle.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1177 | 1177 | <!-- AdminLTE --> |
| 1178 | - <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1178 | + <script src="plugins/adminlte/js/adminlte.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1179 | 1179 | <!-- Altertify --> |
| 1180 | 1180 | <!--<script type="text/javascript" src="plugins/alertifyjs/alertify.min.js"></script>--> |
| 1181 | 1181 | <!-- Toastr --> |
| 1182 | - <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1182 | + <script type="text/javascript" src="plugins/toastr/toastr.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1183 | 1183 | <!-- STORE.JS --> |
| 1184 | - <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1184 | + <script type="text/javascript" src="plugins/store.js/dist/store.everything.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1185 | 1185 | <!-- cryptojs-aesphp --> |
| 1186 | - <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1187 | - <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1186 | + <script type="text/javascript" src="includes/libraries/cryptojs/crypto-js.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1187 | + <script type="text/javascript" src="includes/libraries/cryptojs/encryption.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1188 | 1188 | <!-- pace --> |
| 1189 | - <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1189 | + <script type="text/javascript" data-pace-options='{ "ajax": true, "eventLag": false }' src="plugins/pace-progress/pace.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1190 | 1190 | <!-- clipboardjs --> |
| 1191 | - <script type="text/javascript" src="plugins/clipboard/clipboard.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1191 | + <script type="text/javascript" src="plugins/clipboard/clipboard.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1192 | 1192 | <!-- select2 --> |
| 1193 | - <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1193 | + <script type="text/javascript" src="plugins/select2/js/select2.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1194 | 1194 | <!-- simplePassMeter --> |
| 1195 | - <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 1196 | - <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1195 | + <link rel="stylesheet" href="plugins/simplePassMeter/simplePassMeter.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 1196 | + <script type="text/javascript" src="plugins/simplePassMeter/simplePassMeter.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1197 | 1197 | <!-- platform --> |
| 1198 | - <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1198 | + <script type="text/javascript" src="plugins/platform/platform.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1199 | 1199 | <!-- radiobuttons --> |
| 1200 | - <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 1201 | - <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1200 | + <link rel="stylesheet" href="plugins/radioforbuttons/bootstrap-buttons.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/css" /> |
|
| 1201 | + <script type="text/javascript" src="plugins/radioforbuttons/jquery.radiosforbuttons.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1202 | 1202 | <!-- ICHECK --> |
| 1203 | 1203 | <!--<link rel="stylesheet" href="./plugins/icheck-material/icheck-material.min.css">--> |
| 1204 | - <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1205 | - <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1204 | + <link rel="stylesheet" href="./plugins/icheck/skins/all.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1205 | + <script type="text/javascript" src="./plugins/icheck/icheck.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1206 | 1206 | <!-- bootstrap-add-clear --> |
| 1207 | - <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1207 | + <script type="text/javascript" src="plugins/bootstrap-add-clear/bootstrap-add-clear.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1208 | 1208 | <!-- DOMPurify --> |
| 1209 | - <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1209 | + <script type="text/javascript" src="plugins/DOMPurify/purify.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1210 | 1210 | |
| 1211 | 1211 | <?php |
| 1212 | 1212 | $get['page'] = $request->query->filter('page', null, FILTER_SANITIZE_SPECIAL_CHARS); |
| 1213 | 1213 | if ($menuAdmin === true) { |
| 1214 | 1214 | ?> |
| 1215 | - <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1216 | - <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1217 | - <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1215 | + <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1216 | + <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1217 | + <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1218 | 1218 | <!-- InputMask --> |
| 1219 | - <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1219 | + <script src="./plugins/inputmask/jquery.inputmask.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1220 | 1220 | <!-- Sortable --> |
| 1221 | 1221 | <!--<script src="./plugins/sortable/jquery.sortable.js"></script>--> |
| 1222 | 1222 | <!-- PLUPLOAD --> |
| 1223 | - <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1223 | + <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1224 | 1224 | <!-- DataTables --> |
| 1225 | - <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1226 | - <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1227 | - <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1228 | - <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1229 | - <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1230 | - <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1231 | - <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1232 | - <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1233 | - <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1234 | - <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1225 | + <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1226 | + <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1227 | + <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1228 | + <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1229 | + <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1230 | + <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1231 | + <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1232 | + <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1233 | + <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1234 | + <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1235 | 1235 | <?php |
| 1236 | 1236 | } elseif (isset($get['page']) === true) { |
| 1237 | 1237 | if (in_array($get['page'], ['items', 'import']) === true) { |
| 1238 | 1238 | ?> |
| 1239 | - <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1240 | - <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1241 | - <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1239 | + <link rel="stylesheet" href="./plugins/jstree/themes/default/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1240 | + <link rel="stylesheet" href="./plugins/jstree/themes/default-dark/style.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1241 | + <script src="./plugins/jstree/jstree.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1242 | 1242 | <!-- countdownTimer --> |
| 1243 | - <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1243 | + <script src="./plugins/jquery.countdown360/jquery.countdown360.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1244 | 1244 | <!-- SUMMERNOTE --> |
| 1245 | - <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1246 | - <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1245 | + <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1246 | + <script src="./plugins/summernote/summernote-bs4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1247 | 1247 | <!-- date-picker --> |
| 1248 | - <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1249 | - <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1248 | + <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1249 | + <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1250 | 1250 | <!-- time-picker --> |
| 1251 | - <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1252 | - <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1251 | + <link rel="stylesheet" href="./plugins/timepicker/bootstrap-timepicker.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1252 | + <script src="./plugins/timepicker/bootstrap-timepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1253 | 1253 | <!-- PLUPLOAD --> |
| 1254 | - <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1254 | + <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1255 | 1255 | <!-- VALIDATE --> |
| 1256 | - <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1256 | + <script type="text/javascript" src="plugins/jquery-validation/jquery.validate.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1257 | 1257 | <!-- PWSTRENGHT --> |
| 1258 | - <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1259 | - <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1258 | + <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1259 | + <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1260 | 1260 | <!-- TOGGLE --> |
| 1261 | - <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1262 | - <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" /> |
|
| 1263 | - <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1261 | + <link rel="stylesheet" href="./plugins/toggles/css/toggles.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1262 | + <link rel="stylesheet" href="./plugins/toggles/css/toggles-modern.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" /> |
|
| 1263 | + <script src="./plugins/toggles/toggles.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>" type="text/javascript"></script> |
|
| 1264 | 1264 | <?php |
| 1265 | 1265 | } elseif (in_array($get['page'], ['search', 'folders', 'users', 'roles', 'utilities.deletion', 'utilities.logs', 'utilities.database', 'utilities.renewal', 'tasks']) === true) { |
| 1266 | 1266 | ?> |
| 1267 | 1267 | <!-- DataTables --> |
| 1268 | - <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1269 | - <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1270 | - <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1271 | - <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1272 | - <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1273 | - <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1274 | - <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1275 | - <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1276 | - <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1277 | - <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1268 | + <link rel="stylesheet" src="./plugins/datatables/css/jquery.dataTables.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1269 | + <link rel="stylesheet" src="./plugins/datatables/css/dataTables.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1270 | + <script type="text/javascript" src="./plugins/datatables/js/jquery.dataTables.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1271 | + <script type="text/javascript" src="./plugins/datatables/js/dataTables.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1272 | + <link rel="stylesheet" src="./plugins/datatables/extensions/Responsive-2.2.2/css/responsive.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1273 | + <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/dataTables.responsive.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1274 | + <script type="text/javascript" src="./plugins/datatables/extensions/Responsive-2.2.2/js/responsive.bootstrap4.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1275 | + <script type="text/javascript" src="./plugins/datatables/plugins/select.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1276 | + <link rel="stylesheet" src="./plugins/datatables/extensions/Scroller-1.5.0/css/scroller.bootstrap4.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1277 | + <script type="text/javascript" src="./plugins/datatables/extensions/Scroller-1.5.0/js/dataTables.scroller.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1278 | 1278 | <!-- dater picker --> |
| 1279 | - <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1280 | - <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1279 | + <link rel="stylesheet" href="./plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1280 | + <script src="./plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1281 | 1281 | <!-- daterange picker --> |
| 1282 | - <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"> |
|
| 1283 | - <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1284 | - <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1282 | + <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"> |
|
| 1283 | + <script src="./plugins/moment/moment.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1284 | + <script src="./plugins/daterangepicker/daterangepicker.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1285 | 1285 | <!-- SlimScroll --> |
| 1286 | - <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1286 | + <script src="./plugins/slimScroll/jquery.slimscroll.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1287 | 1287 | <!-- FastClick --> |
| 1288 | - <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1288 | + <script src="./plugins/fastclick/fastclick.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1289 | 1289 | <?php |
| 1290 | 1290 | } elseif ($get['page'] === 'profile') { |
| 1291 | 1291 | ?> |
| 1292 | 1292 | <!-- FILESAVER --> |
| 1293 | - <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1293 | + <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1294 | 1294 | <!-- PLUPLOAD --> |
| 1295 | - <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1295 | + <script type="text/javascript" src="plugins/plupload/js/plupload.full.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1296 | 1296 | <?php |
| 1297 | 1297 | } elseif ($get['page'] === 'export') { |
| 1298 | 1298 | ?> |
| 1299 | 1299 | <!-- FILESAVER --> |
| 1300 | - <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1300 | + <script type="text/javascript" src="plugins/downloadjs/download.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1301 | 1301 | <!-- PWSTRENGHT --> |
| 1302 | - <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1303 | - <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1302 | + <script type="text/javascript" src="plugins/zxcvbn/zxcvbn.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1303 | + <script type="text/javascript" src="plugins/jquery.pwstrength/pwstrength-bootstrap.min.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1304 | 1304 | <?php |
| 1305 | 1305 | } |
| 1306 | 1306 | } |
| 1307 | 1307 | ?> |
| 1308 | 1308 | <!-- functions --> |
| 1309 | - <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1310 | - <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION . '.' . TP_VERSION_MINOR; ?>"></script> |
|
| 1309 | + <script type="text/javascript" src="includes/js/functions.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1310 | + <script type="text/javascript" src="includes/js/CreateRandomString.js?v=<?php echo TP_VERSION.'.'.TP_VERSION_MINOR; ?>"></script> |
|
| 1311 | 1311 | <input type="hidden" id="encryptClientServerStatus" value="<?php echo $SETTINGS['encryptClientServer'] ?? 1; ?>" /> |
| 1312 | 1312 | |
| 1313 | 1313 | </body> |
@@ -1397,65 +1397,65 @@ discard block |
||
| 1397 | 1397 | |
| 1398 | 1398 | // Load links, css and javascripts |
| 1399 | 1399 | if (isset($SETTINGS['cpassman_dir']) === true) { |
| 1400 | - include_once $SETTINGS['cpassman_dir'] . '/includes/core/load.js.php'; |
|
| 1400 | + include_once $SETTINGS['cpassman_dir'].'/includes/core/load.js.php'; |
|
| 1401 | 1401 | if ($menuAdmin === true) { |
| 1402 | - include_once $SETTINGS['cpassman_dir'] . '/pages/admin.js.php'; |
|
| 1402 | + include_once $SETTINGS['cpassman_dir'].'/pages/admin.js.php'; |
|
| 1403 | 1403 | if ($get['page'] === '2fa') { |
| 1404 | - include_once $SETTINGS['cpassman_dir'] . '/pages/2fa.js.php'; |
|
| 1404 | + include_once $SETTINGS['cpassman_dir'].'/pages/2fa.js.php'; |
|
| 1405 | 1405 | } elseif ($get['page'] === 'api') { |
| 1406 | - include_once $SETTINGS['cpassman_dir'] . '/pages/api.js.php'; |
|
| 1406 | + include_once $SETTINGS['cpassman_dir'].'/pages/api.js.php'; |
|
| 1407 | 1407 | } elseif ($get['page'] === 'backups') { |
| 1408 | - include_once $SETTINGS['cpassman_dir'] . '/pages/backups.js.php'; |
|
| 1408 | + include_once $SETTINGS['cpassman_dir'].'/pages/backups.js.php'; |
|
| 1409 | 1409 | } elseif ($get['page'] === 'emails') { |
| 1410 | - include_once $SETTINGS['cpassman_dir'] . '/pages/emails.js.php'; |
|
| 1410 | + include_once $SETTINGS['cpassman_dir'].'/pages/emails.js.php'; |
|
| 1411 | 1411 | } elseif ($get['page'] === 'ldap') { |
| 1412 | - include_once $SETTINGS['cpassman_dir'] . '/pages/ldap.js.php'; |
|
| 1412 | + include_once $SETTINGS['cpassman_dir'].'/pages/ldap.js.php'; |
|
| 1413 | 1413 | } elseif ($get['page'] === 'uploads') { |
| 1414 | - include_once $SETTINGS['cpassman_dir'] . '/pages/uploads.js.php'; |
|
| 1414 | + include_once $SETTINGS['cpassman_dir'].'/pages/uploads.js.php'; |
|
| 1415 | 1415 | } elseif ($get['page'] === 'fields') { |
| 1416 | - include_once $SETTINGS['cpassman_dir'] . '/pages/fields.js.php'; |
|
| 1416 | + include_once $SETTINGS['cpassman_dir'].'/pages/fields.js.php'; |
|
| 1417 | 1417 | } elseif ($get['page'] === 'options') { |
| 1418 | - include_once $SETTINGS['cpassman_dir'] . '/pages/options.js.php'; |
|
| 1418 | + include_once $SETTINGS['cpassman_dir'].'/pages/options.js.php'; |
|
| 1419 | 1419 | } elseif ($get['page'] === 'statistics') { |
| 1420 | - include_once $SETTINGS['cpassman_dir'] . '/pages/statistics.js.php'; |
|
| 1420 | + include_once $SETTINGS['cpassman_dir'].'/pages/statistics.js.php'; |
|
| 1421 | 1421 | } elseif ($get['page'] === 'tasks') { |
| 1422 | - include_once $SETTINGS['cpassman_dir'] . '/pages/tasks.js.php'; |
|
| 1422 | + include_once $SETTINGS['cpassman_dir'].'/pages/tasks.js.php'; |
|
| 1423 | 1423 | } elseif ($get['page'] === 'oauth' && WIP === true) { |
| 1424 | - include_once $SETTINGS['cpassman_dir'] . '/pages/oauth.js.php'; |
|
| 1424 | + include_once $SETTINGS['cpassman_dir'].'/pages/oauth.js.php'; |
|
| 1425 | 1425 | } elseif ($get['page'] === 'tools') { |
| 1426 | - include_once $SETTINGS['cpassman_dir'] . '/pages/tools.js.php'; |
|
| 1426 | + include_once $SETTINGS['cpassman_dir'].'/pages/tools.js.php'; |
|
| 1427 | 1427 | } |
| 1428 | 1428 | } elseif (isset($get['page']) === true && $get['page'] !== '') { |
| 1429 | 1429 | if ($get['page'] === 'items') { |
| 1430 | - include_once $SETTINGS['cpassman_dir'] . '/pages/items.js.php'; |
|
| 1430 | + include_once $SETTINGS['cpassman_dir'].'/pages/items.js.php'; |
|
| 1431 | 1431 | } elseif ($get['page'] === 'import') { |
| 1432 | - include_once $SETTINGS['cpassman_dir'] . '/pages/import.js.php'; |
|
| 1432 | + include_once $SETTINGS['cpassman_dir'].'/pages/import.js.php'; |
|
| 1433 | 1433 | } elseif ($get['page'] === 'export') { |
| 1434 | - include_once $SETTINGS['cpassman_dir'] . '/pages/export.js.php'; |
|
| 1434 | + include_once $SETTINGS['cpassman_dir'].'/pages/export.js.php'; |
|
| 1435 | 1435 | } elseif ($get['page'] === 'offline') { |
| 1436 | - include_once $SETTINGS['cpassman_dir'] . '/pages/offline.js.php'; |
|
| 1436 | + include_once $SETTINGS['cpassman_dir'].'/pages/offline.js.php'; |
|
| 1437 | 1437 | } elseif ($get['page'] === 'search') { |
| 1438 | - include_once $SETTINGS['cpassman_dir'] . '/pages/search.js.php'; |
|
| 1438 | + include_once $SETTINGS['cpassman_dir'].'/pages/search.js.php'; |
|
| 1439 | 1439 | } elseif ($get['page'] === 'profile') { |
| 1440 | - include_once $SETTINGS['cpassman_dir'] . '/pages/profile.js.php'; |
|
| 1440 | + include_once $SETTINGS['cpassman_dir'].'/pages/profile.js.php'; |
|
| 1441 | 1441 | } elseif ($get['page'] === 'favourites') { |
| 1442 | - include_once $SETTINGS['cpassman_dir'] . '/pages/favorites.js.php'; |
|
| 1442 | + include_once $SETTINGS['cpassman_dir'].'/pages/favorites.js.php'; |
|
| 1443 | 1443 | } elseif ($get['page'] === 'folders') { |
| 1444 | - include_once $SETTINGS['cpassman_dir'] . '/pages/folders.js.php'; |
|
| 1444 | + include_once $SETTINGS['cpassman_dir'].'/pages/folders.js.php'; |
|
| 1445 | 1445 | } elseif ($get['page'] === 'users') { |
| 1446 | - include_once $SETTINGS['cpassman_dir'] . '/pages/users.js.php'; |
|
| 1446 | + include_once $SETTINGS['cpassman_dir'].'/pages/users.js.php'; |
|
| 1447 | 1447 | } elseif ($get['page'] === 'roles') { |
| 1448 | - include_once $SETTINGS['cpassman_dir'] . '/pages/roles.js.php'; |
|
| 1448 | + include_once $SETTINGS['cpassman_dir'].'/pages/roles.js.php'; |
|
| 1449 | 1449 | } elseif ($get['page'] === 'utilities.deletion') { |
| 1450 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.deletion.js.php'; |
|
| 1450 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.deletion.js.php'; |
|
| 1451 | 1451 | } elseif ($get['page'] === 'utilities.logs') { |
| 1452 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.logs.js.php'; |
|
| 1452 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.logs.js.php'; |
|
| 1453 | 1453 | } elseif ($get['page'] === 'utilities.database') { |
| 1454 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.database.js.php'; |
|
| 1454 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.database.js.php'; |
|
| 1455 | 1455 | } elseif ($get['page'] === 'utilities.renewal') { |
| 1456 | - include_once $SETTINGS['cpassman_dir'] . '/pages/utilities.renewal.js.php'; |
|
| 1456 | + include_once $SETTINGS['cpassman_dir'].'/pages/utilities.renewal.js.php'; |
|
| 1457 | 1457 | } |
| 1458 | 1458 | } else { |
| 1459 | - include_once $SETTINGS['cpassman_dir'] . '/includes/core/login.js.php'; |
|
| 1459 | + include_once $SETTINGS['cpassman_dir'].'/includes/core/login.js.php'; |
|
| 1460 | 1460 | } |
| 1461 | 1461 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | ) { |
| 77 | 77 | // Not allowed page |
| 78 | 78 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
| 79 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 79 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 80 | 80 | exit; |
| 81 | 81 | } |
| 82 | 82 | |
@@ -118,19 +118,19 @@ discard block |
||
| 118 | 118 | $get_filename = str_replace('"', '\"', $get_filename); |
| 119 | 119 | |
| 120 | 120 | // Use Content-Disposition header with double quotes around filename |
| 121 | -header('Content-Disposition: attachment; filename="' . rawurldecode($get_filename) . '"'); |
|
| 121 | +header('Content-Disposition: attachment; filename="'.rawurldecode($get_filename).'"'); |
|
| 122 | 122 | header('Content-Type: application/octet-stream'); |
| 123 | 123 | header('Cache-Control: must-revalidate, no-cache, no-store'); |
| 124 | 124 | header('Expires: 0'); |
| 125 | 125 | if (null !== $request->query->get('pathIsFiles') && (int) $get_pathIsFiles === 1) { |
| 126 | - readfile($SETTINGS['path_to_files_folder'] . '/' . basename($get_filename)); |
|
| 126 | + readfile($SETTINGS['path_to_files_folder'].'/'.basename($get_filename)); |
|
| 127 | 127 | } else { |
| 128 | 128 | // get file key |
| 129 | 129 | $file_info = DB::queryfirstrow( |
| 130 | 130 | 'SELECT f.id AS id, f.file AS file, f.name AS name, f.status AS status, f.extension AS extension, |
| 131 | 131 | s.share_key AS share_key |
| 132 | - FROM ' . prefixTable('files') . ' AS f |
|
| 133 | - INNER JOIN ' . prefixTable('sharekeys_files') . ' AS s ON (f.id = s.object_id) |
|
| 132 | + FROM ' . prefixTable('files').' AS f |
|
| 133 | + INNER JOIN ' . prefixTable('sharekeys_files').' AS s ON (f.id = s.object_id) |
|
| 134 | 134 | WHERE s.user_id = %i AND s.object_id = %i', |
| 135 | 135 | $session->get('user-id'), |
| 136 | 136 | $get_fileid |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | // if not encrypted |
| 150 | 150 | $file_info = DB::queryfirstrow( |
| 151 | 151 | 'SELECT f.id AS id, f.file AS file, f.name AS name, f.status AS status, f.extension AS extension |
| 152 | - FROM ' . prefixTable('files') . ' AS f |
|
| 152 | + FROM ' . prefixTable('files').' AS f |
|
| 153 | 153 | WHERE f.id = %i', |
| 154 | 154 | $get_fileid |
| 155 | 155 | ); |
@@ -159,25 +159,25 @@ discard block |
||
| 159 | 159 | // Set the filename of the download |
| 160 | 160 | $filename = basename($file_info['name'], '.'.$file_info['extension']); |
| 161 | 161 | $filename = isBase64($filename) === true ? base64_decode($filename) : $filename; |
| 162 | - $filename = $filename . '.' . $file_info['extension']; |
|
| 162 | + $filename = $filename.'.'.$file_info['extension']; |
|
| 163 | 163 | // Get the full path to the file to be downloaded |
| 164 | - if (file_exists($SETTINGS['path_to_upload_folder'] . '/' .TP_FILE_PREFIX . $file_info['file'])) { |
|
| 165 | - $filePath = $SETTINGS['path_to_upload_folder'] . '/' . TP_FILE_PREFIX . $file_info['file']; |
|
| 164 | + if (file_exists($SETTINGS['path_to_upload_folder'].'/'.TP_FILE_PREFIX.$file_info['file'])) { |
|
| 165 | + $filePath = $SETTINGS['path_to_upload_folder'].'/'.TP_FILE_PREFIX.$file_info['file']; |
|
| 166 | 166 | } else { |
| 167 | - $filePath = $SETTINGS['path_to_upload_folder'] . '/' . TP_FILE_PREFIX . base64_decode($file_info['file']); |
|
| 167 | + $filePath = $SETTINGS['path_to_upload_folder'].'/'.TP_FILE_PREFIX.base64_decode($file_info['file']); |
|
| 168 | 168 | } |
| 169 | 169 | $filePath = realpath($filePath); |
| 170 | 170 | |
| 171 | - if (WIP === true) error_log('downloadFile.php: filePath: ' . $filePath." - "); |
|
| 171 | + if (WIP === true) error_log('downloadFile.php: filePath: '.$filePath." - "); |
|
| 172 | 172 | |
| 173 | 173 | if ($filePath && is_readable($filePath) && strpos($filePath, realpath($SETTINGS['path_to_upload_folder'])) === 0) { |
| 174 | 174 | header('Content-Description: File Transfer'); |
| 175 | 175 | header('Content-Type: application/octet-stream'); |
| 176 | - header('Content-Disposition: attachment; filename="' . basename($filename) . '"'); |
|
| 176 | + header('Content-Disposition: attachment; filename="'.basename($filename).'"'); |
|
| 177 | 177 | header('Expires: 0'); |
| 178 | 178 | header('Cache-Control: must-revalidate'); |
| 179 | 179 | header('Pragma: public'); |
| 180 | - header('Content-Length: ' . filesize($filePath)); |
|
| 180 | + header('Content-Length: '.filesize($filePath)); |
|
| 181 | 181 | flush(); // Clear system output buffer |
| 182 | 182 | if (empty($fileContent) === true) { |
| 183 | 183 | // deepcode ignore PT: File and path are secured directly inside the function decryptFile() |