2014-12-01 23:55:08 +01:00
|
|
|
|
// swad_user.h: users
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_USR
|
|
|
|
|
#define _SWAD_USR
|
|
|
|
|
/*
|
|
|
|
|
SWAD (Shared Workspace At a Distance in Spanish),
|
|
|
|
|
is a web platform developed at the University of Granada (Spain),
|
|
|
|
|
and used to support university teaching.
|
|
|
|
|
|
|
|
|
|
This file is part of SWAD core.
|
2024-02-07 00:40:28 +01:00
|
|
|
|
Copyright (C) 1999-2024 Antonio Ca<EFBFBD>as Vargas
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Affero General Public License as
|
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/********************************** Headers **********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <mysql/mysql.h> // To access MySQL databases
|
|
|
|
|
|
|
|
|
|
#include "swad_action.h"
|
|
|
|
|
#include "swad_constant.h"
|
2023-06-07 00:51:41 +02:00
|
|
|
|
#include "swad_cookie.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_cryptography.h"
|
|
|
|
|
#include "swad_date.h"
|
|
|
|
|
#include "swad_degree.h"
|
2024-05-09 19:11:16 +02:00
|
|
|
|
#include "swad_forum.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_icon.h"
|
2024-04-23 23:54:23 +02:00
|
|
|
|
#include "swad_language.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_layout.h"
|
2015-01-02 01:19:27 +01:00
|
|
|
|
#include "swad_menu.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_nickname.h"
|
2017-03-13 13:33:45 +01:00
|
|
|
|
#include "swad_password.h"
|
2021-12-02 08:39:18 +01:00
|
|
|
|
#include "swad_photo_shape.h"
|
2016-12-09 13:59:33 +01:00
|
|
|
|
#include "swad_privacy_visibility_type.h"
|
2016-12-13 13:32:19 +01:00
|
|
|
|
#include "swad_role_type.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_scope.h"
|
|
|
|
|
#include "swad_search.h"
|
2021-12-01 01:43:13 +01:00
|
|
|
|
#include "swad_setting.h"
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#include "swad_string.h"
|
|
|
|
|
#include "swad_theme.h"
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************************** Public types *******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
// Related with user's data
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_Data
|
2014-12-01 23:55:08 +01:00
|
|
|
|
{
|
|
|
|
|
long UsrCod;
|
2021-02-15 16:25:55 +01:00
|
|
|
|
char EnUsrCod [Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
2021-09-30 00:04:29 +02:00
|
|
|
|
char UsrIDNickOrEmail[Cns_MAX_BYTES_USR_LOGIN + 1]; // String to store the ID, nickname or email
|
2014-12-01 23:55:08 +01:00
|
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
struct ListIDs *List;
|
|
|
|
|
unsigned Num;
|
|
|
|
|
} IDs;
|
2021-09-30 20:11:00 +02:00
|
|
|
|
char Nickname [Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1];
|
2017-03-13 14:22:36 +01:00
|
|
|
|
char Password [Pwd_BYTES_ENCRYPTED_PASSWORD + 1];
|
2017-06-04 14:22:04 +02:00
|
|
|
|
struct
|
|
|
|
|
{
|
2021-04-24 15:10:07 +02:00
|
|
|
|
Rol_Role_t InCurrentCrs; // Role in current course (Rol_UNK is not filled/calculated or no course selected)
|
2017-06-08 15:32:33 +02:00
|
|
|
|
int InCrss; // Roles in all his/her courses
|
|
|
|
|
// Check always if filled/calculated
|
|
|
|
|
// >=0 ==> filled/calculated
|
|
|
|
|
// <0 ==> not yet filled/calculated
|
|
|
|
|
} Roles;
|
2014-12-01 23:55:08 +01:00
|
|
|
|
bool Accepted; // User has accepted joining to current course?
|
2017-03-07 19:55:29 +01:00
|
|
|
|
char Surname1 [Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
|
|
|
|
char Surname2 [Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
2021-02-15 16:25:55 +01:00
|
|
|
|
char FrstName [Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
2017-01-15 18:02:52 +01:00
|
|
|
|
char FullName [Usr_MAX_BYTES_FULL_NAME + 1];
|
2014-12-01 23:55:08 +01:00
|
|
|
|
Usr_Sex_t Sex;
|
2017-03-13 13:17:53 +01:00
|
|
|
|
char Email [Cns_MAX_BYTES_EMAIL_ADDRESS + 1];
|
2014-12-01 23:55:08 +01:00
|
|
|
|
bool EmailConfirmed;
|
2017-03-07 01:56:41 +01:00
|
|
|
|
char Photo [Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Name of public link to photo
|
2015-03-06 22:36:29 +01:00
|
|
|
|
Pri_Visibility_t PhotoVisibility; // Who can see user's photo
|
2019-03-22 15:21:46 +01:00
|
|
|
|
Pri_Visibility_t BaPrfVisibility; // Who can see user's basic public profile (minimal record card)
|
|
|
|
|
Pri_Visibility_t ExPrfVisibility; // Who can see user's extended public profile (figures, follow)
|
2014-12-01 23:55:08 +01:00
|
|
|
|
long CtyCod; // Country
|
2021-09-20 19:49:00 +02:00
|
|
|
|
struct Dat_Date Birthday;
|
2017-03-07 11:03:05 +01:00
|
|
|
|
char StrBirthday [Cns_MAX_BYTES_DATE + 1];
|
2020-04-29 16:43:07 +02:00
|
|
|
|
char Phone [2][Usr_MAX_BYTES_PHONE + 1];
|
2014-12-01 23:55:08 +01:00
|
|
|
|
char *Comments;
|
|
|
|
|
long InsCtyCod; // Country of the institution
|
|
|
|
|
long InsCod; // Institution
|
|
|
|
|
struct
|
|
|
|
|
{
|
2021-03-07 21:21:04 +01:00
|
|
|
|
long CtrCod; // Center
|
2014-12-01 23:55:08 +01:00
|
|
|
|
long DptCod; // Department
|
2017-03-08 14:12:33 +01:00
|
|
|
|
char Office [Usr_MAX_BYTES_ADDRESS + 1];
|
2017-01-13 10:49:56 +01:00
|
|
|
|
char OfficePhone [Usr_MAX_BYTES_PHONE + 1];
|
2014-12-01 23:55:08 +01:00
|
|
|
|
} Tch;
|
2019-03-19 13:22:14 +01:00
|
|
|
|
struct
|
|
|
|
|
{
|
|
|
|
|
unsigned CreateNotif; // One bit activated for each type of event
|
|
|
|
|
unsigned SendEmail; // One bit activated for each type of event
|
|
|
|
|
} NtfEvents;
|
2014-12-01 23:55:08 +01:00
|
|
|
|
struct
|
|
|
|
|
{
|
2018-12-08 16:43:13 +01:00
|
|
|
|
Lan_Language_t Language;
|
2015-11-21 20:23:28 +01:00
|
|
|
|
unsigned FirstDayOfWeek;
|
2017-05-04 02:19:23 +02:00
|
|
|
|
Dat_Format_t DateFormat;
|
2014-12-01 23:55:08 +01:00
|
|
|
|
The_Theme_t Theme;
|
|
|
|
|
Ico_IconSet_t IconSet;
|
2015-01-02 01:19:27 +01:00
|
|
|
|
Mnu_Menu_t Menu;
|
|
|
|
|
unsigned SideCols;
|
2021-12-31 14:51:44 +01:00
|
|
|
|
PhoSha_Shape_t PhotoShape;
|
2023-06-07 00:51:41 +02:00
|
|
|
|
Coo_RefuseAccept_t RefuseAcceptCookies; // User has accepted third party cookies
|
2014-12-01 23:55:08 +01:00
|
|
|
|
} Prefs;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_Last
|
2014-12-01 23:55:08 +01:00
|
|
|
|
{
|
|
|
|
|
Sch_WhatToSearch_t WhatToSearch; // Search courses, teachers, documents...?
|
2019-04-01 23:15:17 +02:00
|
|
|
|
struct
|
|
|
|
|
{
|
2023-09-22 14:47:56 +02:00
|
|
|
|
Hie_Level_t Level; // Course, degree, center, etc.
|
2023-07-11 19:12:24 +02:00
|
|
|
|
long HieCod; // Course code, degree code, center code, etc.
|
2019-04-01 23:15:17 +02:00
|
|
|
|
} LastHie;
|
2019-04-01 13:15:15 +02:00
|
|
|
|
Act_Action_t LastAct;
|
|
|
|
|
Rol_Role_t LastRole;
|
2019-04-03 21:49:10 +02:00
|
|
|
|
long LastTime;
|
2014-12-01 23:55:08 +01:00
|
|
|
|
long LastAccNotif;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_InList
|
2014-12-01 23:55:08 +01:00
|
|
|
|
{
|
|
|
|
|
long UsrCod;
|
2021-02-15 16:25:55 +01:00
|
|
|
|
char EnUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
2017-03-13 14:22:36 +01:00
|
|
|
|
char Password[Pwd_BYTES_ENCRYPTED_PASSWORD + 1];
|
2023-07-11 19:12:24 +02:00
|
|
|
|
char Surname1[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
|
|
|
|
char Surname2[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
2021-02-15 16:25:55 +01:00
|
|
|
|
char FrstName[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1];
|
2014-12-01 23:55:08 +01:00
|
|
|
|
Usr_Sex_t Sex;
|
2017-03-07 01:56:41 +01:00
|
|
|
|
char Photo[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]; // Name of public link to photo
|
2016-07-25 20:24:07 +02:00
|
|
|
|
Pri_Visibility_t PhotoVisibility; // Who can see user's photo
|
2017-03-01 14:53:18 +01:00
|
|
|
|
long CtyCod; // Country
|
2016-07-25 20:24:07 +02:00
|
|
|
|
long InsCod; // Institution
|
2016-07-26 01:03:41 +02:00
|
|
|
|
Rol_Role_t RoleInCurrentCrsDB; // Role in current course in database
|
2014-12-01 23:55:08 +01:00
|
|
|
|
bool Accepted; // User has accepted joining to one/all courses?
|
|
|
|
|
bool Remove; // A boolean associated with each user that indicates if it must be removed
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_ListUsrs
|
2014-12-01 23:55:08 +01:00
|
|
|
|
{
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_InList *Lst; // List of users
|
2014-12-01 23:55:08 +01:00
|
|
|
|
unsigned NumUsrs; // Number of users in the list
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-04 14:17:40 +02:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
Usr_DONT_USE_LIST_SELECTED_USERS,
|
|
|
|
|
Usr_USE_LIST_SELECTED_USERS,
|
|
|
|
|
} Usr_UseListSelectedUsrs;
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_SelectedUsrs
|
2019-11-15 03:34:48 +01:00
|
|
|
|
{
|
|
|
|
|
char *List[Rol_NUM_ROLES]; // Lists of encrypted codes of users selected from a form
|
|
|
|
|
bool Filled; // If lists are already filled/readed
|
2023-03-10 00:13:55 +01:00
|
|
|
|
char *ParSuffix;
|
2019-11-15 03:34:48 +01:00
|
|
|
|
Usr_ListUsrsOption_t Option; // What option I have selected to do with these selected users
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_ListUsrCods
|
2014-12-01 23:55:08 +01:00
|
|
|
|
{
|
|
|
|
|
long *Lst; // List of users' codes
|
|
|
|
|
unsigned NumUsrs; // Number of users in the list
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
void Usr_InformAboutNumClicksBeforePhoto (void);
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_UsrDataConstructor (struct Usr_Data *UsrDat);
|
|
|
|
|
void Usr_ResetUsrDataExceptUsrCodAndIDs (struct Usr_Data *UsrDat);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_ResetMyLastData (void);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_UsrDataDestructor (struct Usr_Data *UsrDat);
|
|
|
|
|
void Usr_GetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
2021-04-24 15:10:07 +02:00
|
|
|
|
Usr_GetPrefs_t GetPrefs,
|
|
|
|
|
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_AllocateListUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
|
|
|
|
void Usr_FreeListUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
2023-04-04 13:46:51 +02:00
|
|
|
|
Usr_MeOrOther_t Usr_ItsMe (long UsrCod);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_GetUsrCodFromEncryptedUsrCod (struct Usr_Data *UsrDat);
|
|
|
|
|
void Usr_GetUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
2021-04-24 15:10:07 +02:00
|
|
|
|
Usr_GetPrefs_t GetPrefs,
|
|
|
|
|
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_BuildFullName (struct Usr_Data *UsrDat);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_WriteFirstNameBRSurnames (const struct Usr_Data *UsrDat);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2017-07-02 20:36:15 +02:00
|
|
|
|
void Usr_FlushCachesUsr (void);
|
|
|
|
|
|
2017-06-20 14:43:26 +02:00
|
|
|
|
void Usr_FlushCacheUsrIsSuperuser (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
bool Usr_CheckIfUsrIsSuperuser (long UsrCod);
|
2016-06-16 18:05:23 +02:00
|
|
|
|
|
2024-04-19 12:00:30 +02:00
|
|
|
|
Usr_Can_t Usr_ICanChangeOtherUsrData (const struct Usr_Data *UsrDat);
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanEditOtherUsr (const struct Usr_Data *UsrDat);
|
|
|
|
|
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanViewRecordStd (const struct Usr_Data *UsrDat);
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanViewRecordTch (struct Usr_Data *UsrDat);
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanViewTstExaMchResult (const struct Usr_Data *UsrDat);
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanViewAsgWrk (const struct Usr_Data *UsrDat);
|
|
|
|
|
Usr_Can_t Usr_CheckIfICanViewAtt (const struct Usr_Data *UsrDat);
|
2017-06-23 15:12:49 +02:00
|
|
|
|
|
2016-03-01 03:16:29 +01:00
|
|
|
|
void Usr_WriteLandingPage (void);
|
|
|
|
|
void Usr_WriteFormLogout (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_Logout (void);
|
2016-02-29 16:22:11 +01:00
|
|
|
|
void Usr_PutLinkToLogin (void);
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncPars) (void));
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_WelcomeUsr (void);
|
2016-05-01 01:52:35 +02:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_CreateBirthdayStrDB (const struct Usr_Data *UsrDat,
|
2017-01-15 22:58:26 +01:00
|
|
|
|
char BirthdayStrDB[Usr_BIRTHDAY_STR_DB_LENGTH + 1]);
|
2021-09-20 19:49:00 +02:00
|
|
|
|
void Usr_FilterUsrBirthday (struct Dat_Date *Birthday);
|
2016-05-01 01:52:35 +02:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_PutFormLogIn (void);
|
|
|
|
|
void Usr_WriteLoggedUsrHead (void);
|
|
|
|
|
void Usr_PutFormLogOut (void);
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void Usr_GetParUsrIdLogin (void);
|
|
|
|
|
unsigned Usr_GetParOtherUsrIDNickOrEMailAndGetUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
2015-04-02 18:39:49 +02:00
|
|
|
|
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void Usr_PutParMyUsrCodEncrypted (void *EncryptedUsrCod);
|
|
|
|
|
void Usr_PutParOtherUsrCodEncrypted (void *EncryptedUsrCod);
|
|
|
|
|
void Usr_PutParUsrCodEncrypted (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]);
|
|
|
|
|
void Usr_GetParOtherUsrCodEncrypted (struct Usr_Data *UsrDat);
|
|
|
|
|
void Usr_GetParOtherUsrCodEncryptedAndGetListIDs (void);
|
|
|
|
|
bool Usr_GetParOtherUsrCodEncryptedAndGetUsrData (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
void Usr_ChkUsrAndGetUsrData (void);
|
|
|
|
|
|
2015-04-02 13:38:05 +02:00
|
|
|
|
void Usr_ShowFormsLogoutAndRole (void);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
bool Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
2021-04-24 15:10:07 +02:00
|
|
|
|
Usr_GetPrefs_t GetPrefs,
|
|
|
|
|
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_UpdateMyLastData (void);
|
|
|
|
|
void Usr_InsertMyLastCrsTabAndTime (void);
|
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
2019-11-15 03:34:48 +01:00
|
|
|
|
bool PutCheckBoxToSelectUsr,Rol_Role_t Role,
|
2022-09-24 18:30:26 +02:00
|
|
|
|
struct Usr_SelectedUsrs *SelectedUsrs);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
2023-09-22 14:47:56 +02:00
|
|
|
|
void Usr_GetListUsrs (Hie_Level_t Level,Rol_Role_t Role);
|
2016-06-23 11:31:51 +02:00
|
|
|
|
|
2016-06-29 18:27:49 +02:00
|
|
|
|
void Usr_SearchListUsrs (Rol_Role_t Role);
|
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_GetUnorderedStdsCodesInDeg (long DegCod);
|
2016-07-25 20:55:25 +02:00
|
|
|
|
|
2023-09-22 14:47:56 +02:00
|
|
|
|
void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,Hie_Level_t Level);
|
2021-11-06 21:54:35 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_CopyBasicUsrDataFromList (struct Usr_Data *UsrDat,
|
|
|
|
|
const struct Usr_InList *UsrInList);
|
2016-06-23 13:10:43 +02:00
|
|
|
|
void Usr_FreeUsrsList (Rol_Role_t Role);
|
2016-07-25 20:55:25 +02:00
|
|
|
|
|
2019-04-11 09:55:35 +02:00
|
|
|
|
bool Usr_GetIfShowBigList (unsigned NumUsrs,
|
2024-03-08 10:33:08 +01:00
|
|
|
|
Act_Action_t NextAction,
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void (*FuncPars) (void *Args),void *Args,
|
2019-04-11 09:55:35 +02:00
|
|
|
|
const char *OnSubmit);
|
2016-12-27 22:48:49 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct Usr_SelectedUsrs *SelectedUsrs);
|
2024-07-04 00:25:58 +02:00
|
|
|
|
void Usr_PutParSelectedUsrsCods (const struct Usr_SelectedUsrs *SelectedUsrs);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_GetListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
2019-11-15 03:34:48 +01:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs);
|
2019-11-13 21:31:06 +01:00
|
|
|
|
|
2024-04-30 11:00:46 +02:00
|
|
|
|
bool Usr_FindEncUsrCodInListOfSelectedEncUsrCods (const char *EncryptedUsrCodToFind,
|
|
|
|
|
struct Usr_SelectedUsrs *SelectedUsrs);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
|
|
|
|
unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
|
|
|
|
void Usr_FreeListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
2019-11-13 21:31:06 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_GetListSelectedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
2019-11-15 03:34:48 +01:00
|
|
|
|
unsigned NumUsrsInList,
|
|
|
|
|
long **LstSelectedUsrCods);
|
2019-11-13 21:31:06 +01:00
|
|
|
|
void Usr_FreeListSelectedUsrCods (long *LstSelectedUsrCods);
|
|
|
|
|
|
2024-03-22 09:59:20 +01:00
|
|
|
|
void Usr_CreateSubqueryUsrCods (long *LstSelectedUsrCods,
|
2019-11-13 21:31:06 +01:00
|
|
|
|
unsigned NumUsrsInList,
|
2019-11-14 02:29:18 +01:00
|
|
|
|
char **SubQueryUsrs);
|
|
|
|
|
void Usr_FreeSubqueryUsrCods (char *SubQueryUsrs);
|
2019-11-13 21:31:06 +01:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_FreeListOtherRecipients (void);
|
|
|
|
|
|
2024-03-08 10:33:08 +01:00
|
|
|
|
void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction,
|
|
|
|
|
void (*FuncPars) (void *Args),void *Args,
|
|
|
|
|
const char *OnSubmit);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
unsigned Usr_GetColumnsForSelectUsrs (void);
|
2016-06-16 14:34:17 +02:00
|
|
|
|
void Usr_SetUsrDatMainFieldNames (void);
|
2016-06-16 18:32:12 +02:00
|
|
|
|
void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr);
|
2016-06-16 14:34:17 +02:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_PutFormToSelectUsrsToGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
2020-03-26 02:54:30 +01:00
|
|
|
|
Act_Action_t NextAction,
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void (*FuncPars) (void *Args),void *Args,
|
2019-04-11 23:15:40 +02:00
|
|
|
|
const char *Title,
|
2019-04-10 19:19:34 +02:00
|
|
|
|
const char *HelpLink,
|
2019-12-09 11:50:03 +01:00
|
|
|
|
const char *TxtButton,
|
2023-11-06 00:32:41 +01:00
|
|
|
|
Frm_PutForm_t PutFormDateRange);
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_GetSelectedUsrsAndGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
2020-04-06 16:00:06 +02:00
|
|
|
|
void (*FuncWhenUsrsSelected) (void *ArgsSelected),void *ArgsSelected,
|
|
|
|
|
void (*FuncWhenNoUsrsSelected) (void *ArgsNoSelected),void *ArgsNoSelected);
|
2024-01-30 14:12:03 +01:00
|
|
|
|
void Usr_ListUsersToSelect (struct Usr_SelectedUsrs *SelectedUsrs);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
void Usr_ListAllDataGsts (void);
|
|
|
|
|
void Usr_ListAllDataStds (void);
|
|
|
|
|
void Usr_ListAllDataTchs (void);
|
2017-05-22 20:37:46 +02:00
|
|
|
|
unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
2023-02-08 14:25:42 +01:00
|
|
|
|
const char SearchQuery[Sch_MAX_BYTES_SEARCH_QUERY + 1]);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_ListDataAdms (void);
|
|
|
|
|
|
|
|
|
|
void Usr_SeeGuests (void);
|
|
|
|
|
void Usr_SeeStudents (void);
|
2019-03-11 13:33:34 +01:00
|
|
|
|
void Usr_SeeTeachers (void);
|
2019-03-11 00:51:54 +01:00
|
|
|
|
|
2024-04-23 23:54:23 +02:00
|
|
|
|
void Usr_DoActionOnUsrs1 (void);
|
|
|
|
|
void Usr_DoActionOnUsrs2 (void);
|
2019-03-11 00:51:54 +01:00
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
void Usr_SeeGstClassPhotoPrn (void);
|
|
|
|
|
void Usr_SeeStdClassPhotoPrn (void);
|
|
|
|
|
void Usr_SeeTchClassPhotoPrn (void);
|
|
|
|
|
void Usr_PutSelectorNumColsClassPhoto (void);
|
|
|
|
|
|
2023-02-08 14:25:42 +01:00
|
|
|
|
void Usr_ConstructPathUsr (long UsrCod,char PathUsr[PATH_MAX + 1]);
|
2014-12-01 23:55:08 +01:00
|
|
|
|
|
|
|
|
|
void Usr_ShowWarningNoUsersFound (Rol_Role_t Role);
|
|
|
|
|
|
2021-03-30 14:45:37 +02:00
|
|
|
|
unsigned Usr_GetTotalNumberOfUsers (void);
|
2016-12-07 00:41:36 +01:00
|
|
|
|
|
2024-05-09 19:11:16 +02:00
|
|
|
|
void Usr_WriteAuthor (struct Usr_Data *UsrDat,For_Disabled_t Disabled);
|
2023-06-06 22:18:31 +02:00
|
|
|
|
void Usr_WriteAuthor1Line (long UsrCod,HidVis_HiddenOrVisible_t HiddenOrVisible);
|
2017-03-04 01:59:27 +01:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows);
|
2019-09-22 19:50:24 +02:00
|
|
|
|
|
2019-11-11 15:46:54 +01:00
|
|
|
|
void Usr_PutWhoIcon (Usr_Who_t Who);
|
2023-03-10 00:13:55 +01:00
|
|
|
|
void Usr_PutParWho (Usr_Who_t Who);
|
|
|
|
|
Usr_Who_t Usr_GetParWho (void);
|
2019-11-11 15:46:54 +01:00
|
|
|
|
|
2022-01-02 23:44:27 +01:00
|
|
|
|
//-------------------------------- Figures ------------------------------------
|
|
|
|
|
void Usr_GetAndShowUsersStats (void);
|
|
|
|
|
void Usr_GetAndShowUsersRanking (void);
|
|
|
|
|
|
2014-12-01 23:55:08 +01:00
|
|
|
|
#endif
|