mirror of https://github.com/acanas/swad-core.git
Version 14.99.2
This commit is contained in:
parent
1f43e35c9d
commit
e78ecbae0e
Binary file not shown.
After Width: | Height: | Size: 350 B |
|
@ -10531,6 +10531,9 @@ Hecho:
|
||||||
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM forum_post WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM forum_post))) AS FP SET usr_figures.NumForPst=FP.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumForPst<0 AND usr_figures.UsrCod=FP.UsrCod;
|
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM forum_post WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM forum_post))) AS FP SET usr_figures.NumForPst=FP.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumForPst<0 AND usr_figures.UsrCod=FP.UsrCod;
|
||||||
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM log WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM log))) AS NC SET usr_figures.NumClicks=NC.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumClicks<0 AND usr_figures.UsrCod=NC.UsrCod;
|
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM log WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM log))) AS NC SET usr_figures.NumClicks=NC.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumClicks<0 AND usr_figures.UsrCod=NC.UsrCod;
|
||||||
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM msg_snt WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM msg_snt))) AS MS,((SELECT UsrCod,COUNT(*) AS N FROM msg_snt_deleted WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM msg_snt_deleted))) AS MSD SET usr_figures.NumMsgSnt=MS.N+MSD.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumMsgSnt<0 AND usr_figures.UsrCod=MS.UsrCod AND usr_figures.UsrCod=MSD.UsrCod;
|
UPDATE usr_figures,((SELECT UsrCod,COUNT(*) AS N FROM msg_snt WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM msg_snt))) AS MS,((SELECT UsrCod,COUNT(*) AS N FROM msg_snt_deleted WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM msg_snt_deleted))) AS MSD SET usr_figures.NumMsgSnt=MS.N+MSD.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumMsgSnt<0 AND usr_figures.UsrCod=MS.UsrCod AND usr_figures.UsrCod=MSD.UsrCod;
|
||||||
|
SET @USRCODMIN=1;
|
||||||
|
SET @USRCODMAX=500000;
|
||||||
|
UPDATE usr_figures,((SELECT UsrCod,SUM(NumViews) AS N FROM file_view WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM file_view))) AS FV SET usr_figures.NumFileViews=FV.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumFileViews<0 AND usr_figures.UsrCod=FV.UsrCod;
|
||||||
|
|
||||||
Haciendo:
|
Haciendo:
|
||||||
SET @USRCODMIN=0;
|
SET @USRCODMIN=0;
|
||||||
|
@ -10538,12 +10541,13 @@ SET @USRCODMAX=1000;
|
||||||
UPDATE usr_figures,((SELECT UsrCod,MIN(ClickTime) AS FCT FROM log WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,0 AS FCT FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM log))) AS CT SET usr_figures.FirstClickTime=CT.FCT WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.FirstClickTime=0 AND usr_figures.UsrCod=CT.UsrCod;
|
UPDATE usr_figures,((SELECT UsrCod,MIN(ClickTime) AS FCT FROM log WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,0 AS FCT FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM log))) AS CT SET usr_figures.FirstClickTime=CT.FCT WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.FirstClickTime=0 AND usr_figures.UsrCod=CT.UsrCod;
|
||||||
|
|
||||||
|
|
||||||
SET @USRCODMIN=0;
|
|
||||||
SET @USRCODMAX=1000;
|
|
||||||
UPDATE usr_figures,((SELECT UsrCod,SUM(NumViews) AS N FROM file_view WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX GROUP BY UsrCod) UNION (SELECT UsrCod,'0' AS N FROM usr_figures WHERE UsrCod>=@USRCODMIN AND UsrCod<=@USRCODMAX AND UsrCod NOT IN (SELECT UsrCod FROM file_view))) AS FV SET usr_figures.NumFileViews=FV.N WHERE usr_figures.UsrCod>=@USRCODMIN AND usr_figures.UsrCod<=@USRCODMAX AND usr_figures.NumFileViews<0 AND usr_figures.UsrCod=FV.UsrCod;
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS usr_follow (FollowerCod INT NOT NULL,FollowedCod NIT NOT NULL,FollowTime DATETIME NOT NULL,UNIQUE INDEX (FollowerCod,FollowedCod),UNIQUE INDEX (FollowedCod,FollowerCod),INDEX (FollowTime));
|
CREATE TABLE IF NOT EXISTS usr_follow (FollowerCod INT NOT NULL,FollowedCod NIT NOT NULL,FollowTime DATETIME NOT NULL,UNIQUE INDEX (FollowerCod,FollowedCod),UNIQUE INDEX (FollowedCod,FollowerCod),INDEX (FollowTime));
|
||||||
|
|
||||||
|
---------------
|
||||||
|
|
||||||
|
CREATE INDEX UsrCod ON file_view (UsrCod);
|
||||||
|
|
||||||
|
SELECT FollowedCod,COUNT(FollowerCod) AS N FROM usr_follow GROUP BY FollowedCod ORDER BY N DESC,FollowedCod LIMIT 100;
|
||||||
|
|
|
@ -491,7 +491,7 @@ CREATE TABLE IF NOT EXISTS file_view (
|
||||||
FilCod INT NOT NULL,
|
FilCod INT NOT NULL,
|
||||||
UsrCod INT NOT NULL,
|
UsrCod INT NOT NULL,
|
||||||
NumViews INT NOT NULL DEFAULT 0,
|
NumViews INT NOT NULL DEFAULT 0,
|
||||||
UNIQUE INDEX(FilCod,UsrCod));
|
UNIQUE INDEX(FilCod,UsrCod),INDEX(UsrCod));
|
||||||
--
|
--
|
||||||
-- Table files: stores metadata about each file
|
-- Table files: stores metadata about each file
|
||||||
--
|
--
|
||||||
|
|
|
@ -103,11 +103,16 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.99 (2015/03/21)"
|
#define Log_PLATFORM_VERSION "SWAD 14.99.2 (2015/03/23)"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 14.99.2: Mar 23, 2015 Ranking attending to number of followers. (183614 lines)
|
||||||
|
Version 14.99.1: Mar 21, 2015 Change in file_view to accelerate queries. (183521 lines)
|
||||||
|
1 change necessary in Makefile:
|
||||||
|
CREATE INDEX UsrCod ON file_view (UsrCod);
|
||||||
|
|
||||||
Version 14.99: Mar 21, 2015 Icons instead of text in user's profile.
|
Version 14.99: Mar 21, 2015 Icons instead of text in user's profile.
|
||||||
Lot of changes in layout of user's profile. (183519 lines)
|
Lot of changes in layout of user's profile. (183519 lines)
|
||||||
Version 14.98.5: Mar 21, 2015 New icons for some options. (183431 lines)
|
Version 14.98.5: Mar 21, 2015 New icons for some options. (183431 lines)
|
||||||
|
|
|
@ -1027,10 +1027,10 @@ mysql> DESCRIBE file_view;
|
||||||
3 rows in set (0.00 sec)
|
3 rows in set (0.00 sec)
|
||||||
*/
|
*/
|
||||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_view ("
|
DB_CreateTable ("CREATE TABLE IF NOT EXISTS file_view ("
|
||||||
"FilCod INT NOT NULL,"
|
"FilCod INT NOT NULL,"
|
||||||
"UsrCod INT NOT NULL,"
|
"UsrCod INT NOT NULL,"
|
||||||
"NumViews INT NOT NULL DEFAULT 0,"
|
"NumViews INT NOT NULL DEFAULT 0,"
|
||||||
"UNIQUE INDEX(FilCod,UsrCod))");
|
"UNIQUE INDEX(FilCod,UsrCod),INDEX(UsrCod))");
|
||||||
|
|
||||||
/***** Table files *****/
|
/***** Table files *****/
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -499,3 +499,82 @@ void Fol_UnfollowUsr (void)
|
||||||
if (Error)
|
if (Error)
|
||||||
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
Lay_ShowAlert (Lay_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****** Get and show ranking of users attending to number of followers *******/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Fol_GetAndShowRankingFollowers (void)
|
||||||
|
{
|
||||||
|
char Query[512];
|
||||||
|
|
||||||
|
/***** Get ranking from database *****/
|
||||||
|
switch (Gbl.Scope.Current)
|
||||||
|
{
|
||||||
|
case Sco_SCOPE_SYS:
|
||||||
|
sprintf (Query,"SELECT FollowedCod,COUNT(FollowerCod) AS N"
|
||||||
|
" FROM usr_follow"
|
||||||
|
" GROUP BY FollowedCod"
|
||||||
|
" ORDER BY N DESC,FollowedCod LIMIT 100");
|
||||||
|
break;
|
||||||
|
case Sco_SCOPE_CTY:
|
||||||
|
sprintf (Query,"SELECT DISTINCTROW usr_follow.FollowedCod,COUNT(usr_follow.FollowerCod) AS N"
|
||||||
|
" FROM institutions,centres,degrees,courses,crs_usr,usr_follow"
|
||||||
|
" WHERE institutions.CtyCod='%ld'"
|
||||||
|
" AND institutions.InsCod=centres.InsCod"
|
||||||
|
" AND centres.CtrCod=degrees.CtrCod"
|
||||||
|
" AND degrees.DegCod=courses.DegCod"
|
||||||
|
" AND courses.CrsCod=crs_usr.CrsCod"
|
||||||
|
" AND crs_usr.UsrCod=usr_follow.FollowedCod"
|
||||||
|
" GROUP BY usr_follow.FollowedCod"
|
||||||
|
" ORDER BY N DESC,usr_follow.FollowedCod LIMIT 100",
|
||||||
|
Gbl.CurrentCty.Cty.CtyCod);
|
||||||
|
break;
|
||||||
|
case Sco_SCOPE_INS:
|
||||||
|
sprintf (Query,"SELECT DISTINCTROW usr_follow.FollowedCod,COUNT(usr_follow.FollowerCod) AS N"
|
||||||
|
" FROM centres,degrees,courses,crs_usr,usr_follow"
|
||||||
|
" WHERE centres.InsCod='%ld'"
|
||||||
|
" AND centres.CtrCod=degrees.CtrCod"
|
||||||
|
" AND degrees.DegCod=courses.DegCod"
|
||||||
|
" AND courses.CrsCod=crs_usr.CrsCod"
|
||||||
|
" AND crs_usr.UsrCod=usr_follow.FollowedCod"
|
||||||
|
" GROUP BY usr_follow.FollowedCod"
|
||||||
|
" ORDER BY N DESC,usr_follow.FollowedCod LIMIT 100",
|
||||||
|
Gbl.CurrentIns.Ins.InsCod);
|
||||||
|
break;
|
||||||
|
case Sco_SCOPE_CTR:
|
||||||
|
sprintf (Query,"SELECT DISTINCTROW usr_follow.FollowedCod,COUNT(usr_follow.FollowerCod) AS N"
|
||||||
|
" FROM degrees,courses,crs_usr,usr_follow"
|
||||||
|
" WHERE degrees.CtrCod='%ld'"
|
||||||
|
" AND degrees.DegCod=courses.DegCod"
|
||||||
|
" AND courses.CrsCod=crs_usr.CrsCod"
|
||||||
|
" AND crs_usr.UsrCod=usr_follow.FollowedCod"
|
||||||
|
" GROUP BY usr_follow.FollowedCod"
|
||||||
|
" ORDER BY N DESC,usr_follow.FollowedCod LIMIT 100",
|
||||||
|
Gbl.CurrentCtr.Ctr.CtrCod);
|
||||||
|
break;
|
||||||
|
case Sco_SCOPE_DEG:
|
||||||
|
sprintf (Query,"SELECT DISTINCTROW usr_follow.FollowedCod,COUNT(usr_follow.FollowerCod) AS N"
|
||||||
|
" FROM courses,crs_usr,usr_follow"
|
||||||
|
" WHERE courses.DegCod='%ld'"
|
||||||
|
" AND courses.CrsCod=crs_usr.CrsCod"
|
||||||
|
" AND crs_usr.UsrCod=usr_follow.FollowedCod"
|
||||||
|
" GROUP BY usr_follow.FollowedCod"
|
||||||
|
" ORDER BY N DESC,usr_follow.FollowedCod LIMIT 100",
|
||||||
|
Gbl.CurrentDeg.Deg.DegCod);
|
||||||
|
break;
|
||||||
|
case Sco_SCOPE_CRS:
|
||||||
|
sprintf (Query,"SELECT DISTINCTROW usr_follow.FollowedCod,COUNT(usr_follow.FollowerCod) AS N"
|
||||||
|
" FROM crs_usr,usr_follow"
|
||||||
|
" WHERE crs_usr.CrsCod='%ld'"
|
||||||
|
" AND crs_usr.UsrCod=usr_follow.FollowedCod"
|
||||||
|
" GROUP BY usr_follow.FollowedCod"
|
||||||
|
" ORDER BY N DESC,usr_follow.FollowedCod LIMIT 100",
|
||||||
|
Gbl.CurrentCrs.Crs.CrsCod);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Lay_ShowErrorAndExit ("Wrong scope.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Prf_ShowRankingFigure (Query);
|
||||||
|
}
|
||||||
|
|
|
@ -49,4 +49,6 @@ void Fol_ListFollowers (void);
|
||||||
void Fol_FollowUsr (void);
|
void Fol_FollowUsr (void);
|
||||||
void Fol_UnfollowUsr (void);
|
void Fol_UnfollowUsr (void);
|
||||||
|
|
||||||
|
void Fol_GetAndShowRankingFollowers (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -100,7 +100,6 @@ static void Prf_CreateUsrFigures (long UsrCod,const struct UsrFigures *UsrFigure
|
||||||
static bool Prf_CheckIfUsrFiguresExists (long UsrCod);
|
static bool Prf_CheckIfUsrFiguresExists (long UsrCod);
|
||||||
|
|
||||||
static void Prf_GetAndShowRankingFigure (const char *FieldName);
|
static void Prf_GetAndShowRankingFigure (const char *FieldName);
|
||||||
static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank);
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************************** Get public profile URL ***************************/
|
/************************** Get public profile URL ***************************/
|
||||||
|
@ -1163,14 +1162,6 @@ void Prf_GetAndShowRankingMsgSnt (void)
|
||||||
static void Prf_GetAndShowRankingFigure (const char *FieldName)
|
static void Prf_GetAndShowRankingFigure (const char *FieldName)
|
||||||
{
|
{
|
||||||
char Query[512];
|
char Query[512];
|
||||||
MYSQL_RES *mysql_res;
|
|
||||||
MYSQL_ROW row;
|
|
||||||
unsigned NumUsrs;
|
|
||||||
unsigned NumUsr;
|
|
||||||
unsigned Rank;
|
|
||||||
struct UsrData UsrDat;
|
|
||||||
long FigureHigh = LONG_MAX;
|
|
||||||
long Figure;
|
|
||||||
|
|
||||||
/***** Get ranking from database *****/
|
/***** Get ranking from database *****/
|
||||||
switch (Gbl.Scope.Current)
|
switch (Gbl.Scope.Current)
|
||||||
|
@ -1252,6 +1243,20 @@ static void Prf_GetAndShowRankingFigure (const char *FieldName)
|
||||||
Lay_ShowErrorAndExit ("Wrong scope.");
|
Lay_ShowErrorAndExit ("Wrong scope.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Prf_ShowRankingFigure (Query);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Prf_ShowRankingFigure (const char *Query)
|
||||||
|
{
|
||||||
|
MYSQL_RES *mysql_res;
|
||||||
|
MYSQL_ROW row;
|
||||||
|
unsigned NumUsrs;
|
||||||
|
unsigned NumUsr;
|
||||||
|
unsigned Rank;
|
||||||
|
struct UsrData UsrDat;
|
||||||
|
long FigureHigh = LONG_MAX;
|
||||||
|
long Figure;
|
||||||
|
|
||||||
NumUsrs = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get ranking");
|
NumUsrs = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get ranking");
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
|
@ -1442,15 +1447,14 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
||||||
/************** Show user's photo and nickname in ranking list ***************/
|
/************** Show user's photo and nickname in ranking list ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
|
void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
|
||||||
{
|
{
|
||||||
extern const char *Txt_View_public_profile;
|
extern const char *Txt_View_public_profile;
|
||||||
bool ShowPhoto;
|
bool ShowPhoto;
|
||||||
char PhotoURL[PATH_MAX+1];
|
char PhotoURL[PATH_MAX+1];
|
||||||
bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod);
|
bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<td class=\"RANK\" style=\"text-align:right;"
|
||||||
"<td class=\"RANK\" style=\"text-align:right;"
|
|
||||||
" height:40px; background-color:%s;\">"
|
" height:40px; background-color:%s;\">"
|
||||||
"#%u"
|
"#%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
|
|
@ -59,6 +59,8 @@ void Prf_GetAndShowRankingClicks (void);
|
||||||
void Prf_GetAndShowRankingFileViews (void);
|
void Prf_GetAndShowRankingFileViews (void);
|
||||||
void Prf_GetAndShowRankingForPst (void);
|
void Prf_GetAndShowRankingForPst (void);
|
||||||
void Prf_GetAndShowRankingMsgSnt (void);
|
void Prf_GetAndShowRankingMsgSnt (void);
|
||||||
|
void Prf_ShowRankingFigure (const char *Query);
|
||||||
void Prf_GetAndShowRankingClicksPerDay (void);
|
void Prf_GetAndShowRankingClicksPerDay (void);
|
||||||
|
void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "swad_course.h"
|
#include "swad_course.h"
|
||||||
#include "swad_database.h"
|
#include "swad_database.h"
|
||||||
#include "swad_file_browser.h"
|
#include "swad_file_browser.h"
|
||||||
|
#include "swad_follow.h"
|
||||||
#include "swad_forum.h"
|
#include "swad_forum.h"
|
||||||
#include "swad_global.h"
|
#include "swad_global.h"
|
||||||
#include "swad_ID.h"
|
#include "swad_ID.h"
|
||||||
|
@ -3809,6 +3810,7 @@ static void Sta_GetAndShowUsersRanking (void)
|
||||||
extern const char *Txt_Downloads;
|
extern const char *Txt_Downloads;
|
||||||
extern const char *Txt_Forums;
|
extern const char *Txt_Forums;
|
||||||
extern const char *Txt_Messages;
|
extern const char *Txt_Messages;
|
||||||
|
extern const char *Txt_Followers;
|
||||||
|
|
||||||
Lay_StartRoundFrameTable10 (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_USRS_RANKING]);
|
Lay_StartRoundFrameTable10 (NULL,2,Txt_STAT_USE_STAT_TYPES[Sta_USRS_RANKING]);
|
||||||
|
|
||||||
|
@ -3829,12 +3831,16 @@ static void Sta_GetAndShowUsersRanking (void)
|
||||||
"<th class=\"TIT_TBL\" style=\"text-align:center;\">"
|
"<th class=\"TIT_TBL\" style=\"text-align:center;\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
|
"<th class=\"TIT_TBL\" style=\"text-align:center;\">"
|
||||||
|
"%s"
|
||||||
|
"</th>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Clicks,
|
Txt_Clicks,
|
||||||
Txt_Clicks_per_day,
|
Txt_Clicks_per_day,
|
||||||
Txt_Downloads,
|
Txt_Downloads,
|
||||||
Txt_Forums,
|
Txt_Forums,
|
||||||
Txt_Messages);
|
Txt_Messages,
|
||||||
|
Txt_Followers);
|
||||||
|
|
||||||
/***** Rankings *****/
|
/***** Rankings *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
@ -3857,6 +3863,10 @@ static void Sta_GetAndShowUsersRanking (void)
|
||||||
"<td class=\"DAT\" style=\"text-align:left;"
|
"<td class=\"DAT\" style=\"text-align:left;"
|
||||||
" vertical-align:top;\">");
|
" vertical-align:top;\">");
|
||||||
Prf_GetAndShowRankingMsgSnt ();
|
Prf_GetAndShowRankingMsgSnt ();
|
||||||
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
"<td class=\"DAT\" style=\"text-align:left;"
|
||||||
|
" vertical-align:top;\">");
|
||||||
|
Fol_GetAndShowRankingFollowers ();
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue