2015-03-14 17:39:04 +01:00
|
|
|
|
// swad_profile.h: user's public profile
|
|
|
|
|
|
|
|
|
|
#ifndef _SWAD_PRF
|
|
|
|
|
#define _SWAD_PRF
|
|
|
|
|
/*
|
|
|
|
|
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
|
2015-03-14 17:39:04 +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 **********************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2021-10-13 10:42:08 +02:00
|
|
|
|
#include <time.h> // For time
|
|
|
|
|
|
|
|
|
|
#include "swad_user.h"
|
|
|
|
|
|
2015-03-14 17:39:04 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/******************************** Public types *******************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2021-10-13 10:42:08 +02:00
|
|
|
|
struct Prf_UsrFigures
|
2016-09-11 14:28:32 +02:00
|
|
|
|
{
|
2021-04-17 01:08:48 +02:00
|
|
|
|
time_t FirstClickTimeUTC; // 0 ==> unknown first click time of user never logged
|
|
|
|
|
int NumDays; // -1 ==> not applicable
|
|
|
|
|
int NumClicks; // -1 ==> unknown number of clicks
|
2021-10-07 01:21:23 +02:00
|
|
|
|
int NumTimelinePubs; // -1 ==> unknown number of timeline publications
|
2021-04-17 01:08:48 +02:00
|
|
|
|
int NumFileViews; // -1 ==> unknown number of file views
|
2021-10-07 01:21:23 +02:00
|
|
|
|
int NumForumPosts; // -1 ==> unknown number of forum posts
|
|
|
|
|
int NumMessagesSent; // -1 ==> unknown number of messages sent
|
2016-09-11 14:28:32 +02:00
|
|
|
|
};
|
|
|
|
|
|
2015-03-14 17:39:04 +01:00
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/****************************** Public prototypes ****************************/
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2016-02-06 13:45:33 +01:00
|
|
|
|
void Prf_SeeSocialProfiles (void);
|
|
|
|
|
|
2024-04-23 23:54:23 +02:00
|
|
|
|
char *Prf_GetURLPublicProfile (char URL[WWW_MAX_BYTES_WWW + 1],
|
2021-02-15 22:49:44 +01:00
|
|
|
|
const char *NickWithoutArr);
|
2017-02-17 01:59:58 +01:00
|
|
|
|
void Prf_PutLinkMyPublicProfile (void);
|
2023-10-27 13:54:14 +02:00
|
|
|
|
void Prf_PutLinkReqAnotherUsrProfile (void);
|
2023-03-17 12:51:11 +01:00
|
|
|
|
void Prf_ReqUserProfile (void);
|
2016-01-14 01:39:02 +01:00
|
|
|
|
void Prf_GetUsrDatAndShowUserProfile (void);
|
|
|
|
|
|
2023-10-27 13:54:14 +02:00
|
|
|
|
bool Prf_ShowUsrProfile (struct Usr_Data *UsrDat);
|
2019-03-22 15:21:46 +01:00
|
|
|
|
void Prf_ChangeBasicProfileVis (void);
|
|
|
|
|
void Prf_ChangeExtendedProfileVis (void);
|
2016-06-17 11:13:11 +02:00
|
|
|
|
|
2022-09-24 18:30:26 +02:00
|
|
|
|
void Prf_ShowDetailsUserProfile (const struct Usr_Data *UsrDat);
|
2021-10-13 10:42:08 +02:00
|
|
|
|
void Prf_GetUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
|
2016-10-03 18:16:05 +02:00
|
|
|
|
void Prf_CalculateFigures (void);
|
2021-10-13 10:42:08 +02:00
|
|
|
|
bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
|
2015-03-28 18:34:08 +01:00
|
|
|
|
|
2023-05-30 22:29:29 +02:00
|
|
|
|
void Prf_CreateNewUsrFigures (long UsrCod,Usr_MeOrOther_t MeOrOther);
|
2015-03-14 17:39:04 +01:00
|
|
|
|
|
2015-03-16 14:05:16 +01:00
|
|
|
|
void Prf_GetAndShowRankingClicks (void);
|
2021-10-07 01:21:23 +02:00
|
|
|
|
void Prf_GetAndShowRankingTimelinePubs (void);
|
2015-03-16 17:46:32 +01:00
|
|
|
|
void Prf_GetAndShowRankingFileViews (void);
|
2021-10-07 01:21:23 +02:00
|
|
|
|
void Prf_GetAndShowRankingForPsts (void);
|
|
|
|
|
void Prf_GetAndShowRankingMsgsSnt (void);
|
2018-11-01 19:23:52 +01:00
|
|
|
|
void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs);
|
2015-03-16 14:05:16 +01:00
|
|
|
|
void Prf_GetAndShowRankingClicksPerDay (void);
|
|
|
|
|
|
2015-03-14 17:39:04 +01:00
|
|
|
|
#endif
|