Version19.31.32

This commit is contained in:
Antonio Cañas Vargas 2019-10-09 21:50:28 +02:00
parent 470331d39c
commit 0db0eb335e
3 changed files with 240 additions and 286 deletions

View File

@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.31.31 (2019-10-08)" #define Log_PLATFORM_VERSION "SWAD 19.31.32 (2019-10-08)"
#define CSS_FILE "swad19.29.css" #define CSS_FILE "swad19.29.css"
#define JS_FILE "swad19.30.js" #define JS_FILE "swad19.30.js"
/* /*
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo // TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
Version 19.31.32: Oct 08, 2019 Code refactoring in HTML tables. (246718 lines)
Version 19.31.31: Oct 08, 2019 Code refactoring in HTML tables. (246762 lines) Version 19.31.31: Oct 08, 2019 Code refactoring in HTML tables. (246762 lines)
Version 19.31.30: Oct 08, 2019 Code refactoring in HTML tables. (246731 lines) Version 19.31.30: Oct 08, 2019 Code refactoring in HTML tables. (246731 lines)
Version 19.31.29: Oct 08, 2019 Code refactoring in HTML tables. (246740 lines) Version 19.31.29: Oct 08, 2019 Code refactoring in HTML tables. (246740 lines)

View File

@ -383,24 +383,24 @@ void Rec_ShowFormCreateRecordField (void)
Tbl_EndCell (); Tbl_EndCell ();
/***** Field name *****/ /***** Field name *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
"<input type=\"text\" name=\"FieldName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FieldName\""
" style=\"width:500px;\" maxlength=\"%u\" value=\"%s\"" " style=\"width:500px;\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />", " required=\"required\" />",
Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name); Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name);
Tbl_EndCell (); Tbl_EndCell ();
/***** Number of lines in form ******/ /***** Number of lines in form ******/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
"<input type=\"text\" name=\"NumLines\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NumLines\""
" size=\"2\" maxlength=\"2\" value=\"%u\"" " size=\"2\" maxlength=\"2\" value=\"%u\""
" required=\"required\" />", " required=\"required\" />",
Gbl.Crs.Records.Field.NumLines); Gbl.Crs.Records.Field.NumLines);
Tbl_EndCell (); Tbl_EndCell ();
/***** Visibility to students *****/ /***** Visibility to students *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
"<select name=\"Visibility\">"); fprintf (Gbl.F.Out,"<select name=\"Visibility\">");
for (Vis = (Rec_VisibilityRecordFields_t) 0; for (Vis = (Rec_VisibilityRecordFields_t) 0;
Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY; Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY;
Vis++) Vis++)
@ -1759,8 +1759,8 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
Gbl.Hierarchy.Deg.ShrtName,Rec_DEGREE_LOGO_SIZE,NULL,true); Gbl.Hierarchy.Deg.ShrtName,Rec_DEGREE_LOGO_SIZE,NULL,true);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_HEAD CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_HEAD CENTER_MIDDLE\">");
"%s<br />%s<br />%s", fprintf (Gbl.F.Out,"%s<br />%s<br />%s",
Gbl.Hierarchy.Deg.FullName,Gbl.Hierarchy.Crs.FullName, Gbl.Hierarchy.Deg.FullName,Gbl.Hierarchy.Crs.FullName,
UsrDat->FullName); UsrDat->FullName);
Tbl_EndCell (); Tbl_EndCell ();
@ -1800,12 +1800,11 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
/* Name of the field */ /* Name of the field */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT %s RIGHT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT %s RIGHT_TOP COLOR%u\">",
"%s:",
ICanEditThisField ? The_ClassFormInBox[Gbl.Prefs.Theme] : ICanEditThisField ? The_ClassFormInBox[Gbl.Prefs.Theme] :
"REC_DAT_SMALL", "REC_DAT_SMALL",
Gbl.RowEvenOdd, Gbl.RowEvenOdd);
Gbl.Crs.Records.LstFields.Lst[NumField].Name); fprintf (Gbl.F.Out,"%s:",Gbl.Crs.Records.LstFields.Lst[NumField].Name);
if (TypeOfView == Rec_CRS_LIST_ONE_RECORD || if (TypeOfView == Rec_CRS_LIST_ONE_RECORD ||
TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS) TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\"> (%s)</span>", fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\"> (%s)</span>",
@ -2752,8 +2751,8 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat)
static void Rec_ShowFullName (struct UsrData *UsrDat) static void Rec_ShowFullName (struct UsrData *UsrDat)
{ {
fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_TOP\">");
"<div class=\"REC_NAME\">"); fprintf (Gbl.F.Out,"<div class=\"REC_NAME\">");
/***** First name *****/ /***** First name *****/
fprintf (Gbl.F.Out,"%s<br />",UsrDat->FirstName); fprintf (Gbl.F.Out,"%s<br />",UsrDat->FirstName);
@ -2778,8 +2777,8 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
extern const char *Txt_Another_user_s_profile; extern const char *Txt_Another_user_s_profile;
bool ItsMe; bool ItsMe;
fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_BOTTOM\">" fprintf (Gbl.F.Out,"<td class=\"REC_C2_MID LEFT_BOTTOM\">");
"<div class=\"REC_NICK\">"); fprintf (Gbl.F.Out,"<div class=\"REC_NICK\">");
if (UsrDat->Nickname[0]) if (UsrDat->Nickname[0])
{ {
if (PutFormLinks) if (PutFormLinks)
@ -2840,9 +2839,8 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm)
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Email);
ClassForm,Txt_Email);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -2875,9 +2873,8 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *ClassForm,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_ID);
ClassForm,Txt_ID);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_TOP\">");
@ -2916,8 +2913,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
/* Get user's roles if not got */ /* Get user's roles if not got */
Rol_GetRolesInAllCrssIfNotYetGot (UsrDat); Rol_GetRolesInAllCrssIfNotYetGot (UsrDat);
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"Role\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"Role\" class=\"%s\">%s:</label>",
ClassForm,Txt_Role); ClassForm,Txt_Role);
Tbl_EndCell (); Tbl_EndCell ();
@ -3114,9 +3111,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
else if (SexForm) else if (SexForm)
{ {
/***** Form to select a sex *****/ /***** Form to select a sex *****/
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s*:", fprintf (Gbl.F.Out,"%s*:",Txt_Sex);
ClassForm,Txt_Sex);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
@ -3139,14 +3135,12 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
else // RoleForm == false, SexForm == false else // RoleForm == false, SexForm == false
{ {
/***** No form, only text *****/ /***** No form, only text *****/
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Role);
ClassForm,
Txt_Role);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
"%s", fprintf (Gbl.F.Out,"%s",
Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]); Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]);
Tbl_EndCell (); Tbl_EndCell ();
} }
@ -3166,8 +3160,8 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,
extern const char *Txt_Surname_1; extern const char *Txt_Surname_1;
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"Surname1\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"Surname1\" class=\"%s\">"
"%s", "%s",
ClassForm,Txt_Surname_1); ClassForm,Txt_Surname_1);
if (TypeOfView == Rec_SHA_MY_RECORD_FORM) if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
@ -3208,8 +3202,8 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"Surname2\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"Surname2\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Surname_2); ClassForm,Txt_Surname_2);
@ -3243,8 +3237,8 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"FirstName\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"FirstName\" class=\"%s\">"
"%s", "%s",
ClassForm,Txt_First_name); ClassForm,Txt_First_name);
if (TypeOfView == Rec_SHA_MY_RECORD_FORM) if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
@ -3253,8 +3247,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,
"</label>"); "</label>");
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\"" fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
" class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
if (ICanEdit) if (ICanEdit)
{ {
fprintf (Gbl.F.Out,"<input type=\"text\"" fprintf (Gbl.F.Out,"<input type=\"text\""
@ -3295,16 +3288,15 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OthCtyCod\" class=\"%s\">%s", fprintf (Gbl.F.Out,"<label for=\"OthCtyCod\" class=\"%s\">%s",
ClassForm,Txt_Country); ClassForm,Txt_Country);
if (TypeOfView == Rec_SHA_MY_RECORD_FORM) if (TypeOfView == Rec_SHA_MY_RECORD_FORM)
fprintf (Gbl.F.Out,"*"); fprintf (Gbl.F.Out,"*");
fprintf (Gbl.F.Out,":</label>"); fprintf (Gbl.F.Out,":</label>");
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\"" fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_C2_BOT LEFT_MIDDLE\">");
" class=\"REC_C2_BOT LEFT_MIDDLE\">");
/***** Selector of country *****/ /***** Selector of country *****/
fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\"" fprintf (Gbl.F.Out,"<select id=\"OthCtyCod\" name=\"OthCtyCod\""
@ -3344,8 +3336,8 @@ static void Rec_ShowOriginPlace (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OriginPlace\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"OriginPlace\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Place_of_origin); ClassForm,Txt_Place_of_origin);
@ -3381,9 +3373,8 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Date_of_birth);
ClassForm,Txt_Date_of_birth);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -3415,8 +3406,8 @@ static void Rec_ShowLocalAddress (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"LocalAddress\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"LocalAddress\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Local_address); ClassForm,Txt_Local_address);
@ -3452,8 +3443,8 @@ static void Rec_ShowLocalPhone (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"LocalPhone\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"LocalPhone\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Phone); ClassForm,Txt_Phone);
@ -3491,8 +3482,8 @@ static void Rec_ShowFamilyAddress (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"FamilyAddress\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"FamilyAddress\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Family_address); ClassForm,Txt_Family_address);
@ -3528,8 +3519,8 @@ static void Rec_ShowFamilyPhone (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"FamilyPhone\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"FamilyPhone\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Phone); ClassForm,Txt_Phone);
@ -3567,8 +3558,8 @@ static void Rec_ShowComments (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">");
"<label for=\"Comments\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"Comments\" class=\"%s\">%s:</label>",
ClassForm,Txt_USER_comments); ClassForm,Txt_USER_comments);
Tbl_EndCell (); Tbl_EndCell ();
@ -3628,9 +3619,8 @@ static void Rec_ShowInstitution (struct Instit *Ins,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Institution);
ClassForm,Txt_Institution);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -3662,9 +3652,8 @@ static void Rec_ShowCentre (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Centre);
ClassForm,Txt_Centre);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -3700,9 +3689,8 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Department);
ClassForm,Txt_Department);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -3737,9 +3725,8 @@ static void Rec_ShowOffice (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Office);
ClassForm,Txt_Office);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -3761,9 +3748,8 @@ static void Rec_ShowOfficePhone (struct UsrData *UsrDat,
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE %s\">",ClassForm);
"%s:", fprintf (Gbl.F.Out,"%s:",Txt_Phone);
ClassForm,Txt_Phone);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT REC_DAT_BOLD LEFT_MIDDLE\">");
@ -4049,8 +4035,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Country *****/ /***** Country *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OthCtyCod\" class=\"%s\">%s*:</label>", fprintf (Gbl.F.Out,"<label for=\"OthCtyCod\" class=\"%s\">%s*:</label>",
ClassForm,Txt_Country); ClassForm,Txt_Country);
Tbl_EndCell (); Tbl_EndCell ();
@ -4093,8 +4079,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Institution *****/ /***** Institution *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OthInsCod\" class=\"%s\">%s*:</label>", fprintf (Gbl.F.Out,"<label for=\"OthInsCod\" class=\"%s\">%s*:</label>",
ClassForm,Txt_Institution); ClassForm,Txt_Institution);
Tbl_EndCell (); Tbl_EndCell ();
@ -4142,8 +4128,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Centre *****/ /***** Centre *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OthCtrCod\" class=\"%s\">%s*:</label>", fprintf (Gbl.F.Out,"<label for=\"OthCtrCod\" class=\"%s\">%s*:</label>",
ClassForm,Txt_Centre); ClassForm,Txt_Centre);
Tbl_EndCell (); Tbl_EndCell ();
@ -4189,8 +4175,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Department *****/ /***** Department *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"%s\" class=\"%s\">%s*:</label>", fprintf (Gbl.F.Out,"<label for=\"%s\" class=\"%s\">%s*:</label>",
Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department); Dpt_PARAM_DPT_COD_NAME,ClassForm,Txt_Department);
Tbl_EndCell (); Tbl_EndCell ();
@ -4210,8 +4196,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Office *****/ /***** Office *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"Office\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"Office\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Office); ClassForm,Txt_Office);
@ -4234,8 +4220,8 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher)
/***** Phone *****/ /***** Phone *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
"<label for=\"OfficePhone\" class=\"%s\">" fprintf (Gbl.F.Out,"<label for=\"OfficePhone\" class=\"%s\">"
"%s:" "%s:"
"</label>", "</label>",
ClassForm,Txt_Phone); ClassForm,Txt_Phone);

View File

@ -378,8 +378,8 @@ void Sta_AskShowCrsHits (void)
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP %s\">%s:", fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP %s\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users); fprintf (Gbl.F.Out,"%s:",Txt_Users);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"%s LEFT_TOP\">", fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"%s LEFT_TOP\">",
@ -402,8 +402,8 @@ void Sta_AskShowCrsHits (void)
/***** Option a) Listing of clicks distributed by some metric *****/ /***** Option a) Listing of clicks distributed by some metric *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE %s\">%s:", fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE %s\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show); fprintf (Gbl.F.Out,"%s:",Txt_Show);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">"); fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
@ -547,13 +547,13 @@ void Sta_AskShowGblHits (void)
/***** Users' roles whose accesses we want to see *****/ /***** Users' roles whose accesses we want to see *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
"<label for=\"Role\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"Role\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Users);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
"<select id=\"Role\" name=\"Role\">"); fprintf (Gbl.F.Out,"<select id=\"Role\" name=\"Role\">");
for (RoleStat = (Sta_Role_t) 0; for (RoleStat = (Sta_Role_t) 0;
RoleStat < Sta_NUM_ROLES_STAT; RoleStat < Sta_NUM_ROLES_STAT;
RoleStat++) RoleStat++)
@ -574,8 +574,8 @@ void Sta_AskShowGblHits (void)
/***** Clicks made from anywhere, current centre, current degree or current course *****/ /***** Clicks made from anywhere, current centre, current degree or current course *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
"<label for=\"ScopeSta\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"ScopeSta\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope);
Tbl_EndCell (); Tbl_EndCell ();
@ -596,8 +596,8 @@ void Sta_AskShowGblHits (void)
/***** Count type for the statistic *****/ /***** Count type for the statistic *****/
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
"<label for=\"CountType\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"CountType\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Show);
Tbl_EndCell (); Tbl_EndCell ();
@ -716,13 +716,13 @@ static void Sta_WriteSelectorAction (void)
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
"<label for=\"StatAct\" class=\"%s\">%s:</label>", fprintf (Gbl.F.Out,"<label for=\"StatAct\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Action); The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Action);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_MIDDLE\">");
"<select id=\"StatAct\" name=\"StatAct\"" fprintf (Gbl.F.Out,"<select id=\"StatAct\" name=\"StatAct\""
" style=\"width:375px;\">"); " style=\"width:375px;\">");
for (Action = (Act_Action_t) 0; for (Action = (Act_Action_t) 0;
Action < Act_NUM_ACTIONS; Action < Act_NUM_ACTIONS;
@ -1626,8 +1626,8 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
Frm_EndForm (); Frm_EndForm ();
/* Write number of current page */ /* Write number of current page */
fprintf (Gbl.F.Out,"<td class=\"DAT_N CENTER_MIDDLE\" style=\"width:60%%;\">" fprintf (Gbl.F.Out,"<td class=\"DAT_N CENTER_MIDDLE\" style=\"width:60%%;\">");
"<strong>" fprintf (Gbl.F.Out,"<strong>"
"%s %lu-%lu %s %lu (%s %ld %s %lu)" "%s %lu-%lu %s %lu (%s %ld %s %lu)"
"</strong>", "</strong>",
Txt_Clicks, Txt_Clicks,
@ -1720,39 +1720,35 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
/* Write the number of row */ /* Write the number of row */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%ld&nbsp;", fprintf (Gbl.F.Out,"%ld&nbsp;",NumRow);
Gbl.RowEvenOdd,NumRow);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the user's ID if user is a student */ /* Write the user's ID if user is a student */
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL); ID_WriteUsrIDs (&UsrDat,NULL);
fprintf (Gbl.F.Out,"&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;");
Tbl_EndCell (); Tbl_EndCell ();
/* Write the first name and the surnames */ /* Write the first name and the surnames */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",UsrDat.FullName);
Gbl.RowEvenOdd,UsrDat.FullName);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the user's role */ /* Write the user's role */
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",
Gbl.RowEvenOdd,
RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] : RoleFromLog < Rol_NUM_ROLES ? Txt_ROLES_SINGUL_Abc[RoleFromLog][UsrDat.Sex] :
"?"); "?");
Tbl_EndCell (); Tbl_EndCell ();
/* Write the date-time (row[3]) */ /* Write the date-time (row[3]) */
fprintf (Gbl.F.Out,"<td id=\"log_date_%u\" class=\"LOG RIGHT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td id=\"log_date_%u\" class=\"LOG RIGHT_TOP COLOR%u\">",
"<script type=\"text/javascript\">" UniqueId,Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('log_date_%u',%ld," "writeLocalDateHMSFromUTC('log_date_%u',%ld,"
"%u,',&nbsp;','%s',true,false,0x7);" "%u,',&nbsp;','%s',true,false,0x7);"
"</script>", "</script>",
UniqueId,Gbl.RowEvenOdd,
UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]), UniqueId,(long) Dat_GetUNIXTimeFromStr (row[3]),
(unsigned) Gbl.Prefs.DateFormat,Txt_Today); (unsigned) Gbl.Prefs.DateFormat,Txt_Today);
Tbl_EndCell (); Tbl_EndCell ();
@ -1761,19 +1757,19 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
if (sscanf (row[4],"%ld",&ActCod) != 1) if (sscanf (row[4],"%ld",&ActCod) != 1)
Lay_ShowErrorAndExit ("Wrong action code."); Lay_ShowErrorAndExit ("Wrong action code.");
if (ActCod >= 0) if (ActCod >= 0)
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">" {
"%s&nbsp;", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd, fprintf (Gbl.F.Out,"%s&nbsp;",Act_GetActionTextFromDB (ActCod,ActTxt));
Act_GetActionTextFromDB (ActCod,ActTxt)); }
else else
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">" {
"?&nbsp;", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"?&nbsp;");
}
Tbl_EndCell (); Tbl_EndCell ();
/* Write the comments of the access */ /* Write the comments of the access */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
Sta_WriteLogComments (LogCod); Sta_WriteLogComments (LogCod);
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();
@ -1872,14 +1868,12 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
Tbl_StartRow (); Tbl_StartRow ();
/* Write the number of row */ /* Write the number of row */
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%ld&nbsp;", fprintf (Gbl.F.Out,"%ld&nbsp;",NumRow);
Gbl.RowEvenOdd,NumRow);
Tbl_EndCell (); Tbl_EndCell ();
/* Show the photo */ /* Show the photo */
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
@ -1887,22 +1881,19 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
Tbl_EndCell (); Tbl_EndCell ();
/* Write the user's ID if user is a student in current course */ /* Write the user's ID if user is a student in current course */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
ID_WriteUsrIDs (&UsrDat,NULL); ID_WriteUsrIDs (&UsrDat,NULL);
fprintf (Gbl.F.Out,"&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;");
Tbl_EndCell (); Tbl_EndCell ();
/* Write the name and the surnames */ /* Write the name and the surnames */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",UsrDat.FullName);
Gbl.RowEvenOdd,UsrDat.FullName);
Tbl_EndCell (); Tbl_EndCell ();
/* Write user's role */ /* Write user's role */
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">" fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",
Gbl.RowEvenOdd,
Txt_ROLES_SINGUL_Abc[UsrDat.Roles.InCurrentCrs.Role][UsrDat.Sex]); Txt_ROLES_SINGUL_Abc[UsrDat.Roles.InCurrentCrs.Role][UsrDat.Sex]);
Tbl_EndCell (); Tbl_EndCell ();
@ -1918,8 +1909,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
} }
else else
BarWidth = 0; BarWidth = 0;
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Gbl.RowEvenOdd);
if (BarWidth) if (BarWidth)
fprintf (Gbl.F.Out,"<img src=\"%s/%c1x1.png\"" // Background fprintf (Gbl.F.Out,"<img src=\"%s/%c1x1.png\"" // Background
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
@ -2013,19 +2003,17 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
/* Write the date */ /* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate); Dat_ConvDateToDateStr (&Date,StrDate);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
StrDate); fprintf (Gbl.F.Out,"%s&nbsp;",StrDate);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the day of the week */ /* Write the day of the week */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
Txt_DAYS_SMALL[NumDayWeek]); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_DAYS_SMALL[NumDayWeek]);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2056,19 +2044,17 @@ static void Sta_ShowNumHitsPerDay (unsigned long NumRows,MYSQL_RES *mysql_res)
/* Write the date */ /* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate); Dat_ConvDateToDateStr (&Date,StrDate);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
StrDate); fprintf (Gbl.F.Out,"%s&nbsp;",StrDate);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the day of the week */ /* Write the day of the week */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
Txt_DAYS_SMALL[NumDayWeek]); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_DAYS_SMALL[NumDayWeek]);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2189,8 +2175,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
Tbl_EndRow (); Tbl_EndRow ();
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"24\" class=\"LEFT_TOP\"" fprintf (Gbl.F.Out,"<td colspan=\"24\" class=\"LEFT_TOP\" style=\"width:%upx;\">",
" style=\"width:%upx;\">",
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH); GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH);
Sta_DrawBarColors (SelectedColorType,Hits.Max); Sta_DrawBarColors (SelectedColorType,Hits.Max);
Tbl_EndCell (); Tbl_EndCell ();
@ -2201,9 +2186,9 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
Hour < 24; Hour < 24;
Hour++) Hour++)
{ {
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\" style=\"width:%upx;\">" fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\" style=\"width:%upx;\">",
"%02uh", GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH);
GRAPH_DISTRIBUTION_PER_HOUR_HOUR_WIDTH,Hour); fprintf (Gbl.F.Out,"%02uh",Hour);
Tbl_EndCell (); Tbl_EndCell ();
} }
Tbl_EndRow (); Tbl_EndRow ();
@ -2250,19 +2235,17 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
/* Write the date */ /* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate); Dat_ConvDateToDateStr (&Date,StrDate);
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
StrDate); fprintf (Gbl.F.Out,"%s&nbsp;",StrDate);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the day of the week */ /* Write the day of the week */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
Txt_DAYS_SMALL[NumDayWeek]); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_DAYS_SMALL[NumDayWeek]);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw a cell with the color proportional to the number of clicks */ /* Draw a cell with the color proportional to the number of clicks */
@ -2301,19 +2284,17 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
/* Write the date */ /* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate); Dat_ConvDateToDateStr (&Date,StrDate);
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
StrDate); fprintf (Gbl.F.Out,"%s&nbsp;",StrDate);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the day of the week */ /* Write the day of the week */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
Txt_DAYS_SMALL[NumDayWeek]); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_DAYS_SMALL[NumDayWeek]);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw the color proporcional al number of clicks */ /* Draw the color proporcional al number of clicks */
@ -2341,19 +2322,17 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
/* Write the date */ /* Write the date */
Dat_ConvDateToDateStr (&Date,StrDate); Dat_ConvDateToDateStr (&Date,StrDate);
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
StrDate); fprintf (Gbl.F.Out,"%s&nbsp;",StrDate);
Tbl_EndCell (); Tbl_EndCell ();
/* Write the day of the week */ /* Write the day of the week */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
"%s&nbsp;",
NumDayWeek == 6 ? "LOG_R" : NumDayWeek == 6 ? "LOG_R" :
"LOG", "LOG");
Txt_DAYS_SMALL[NumDayWeek]); fprintf (Gbl.F.Out,"%s&nbsp;",Txt_DAYS_SMALL[NumDayWeek]);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw the color proportional to number of clicks */ /* Draw the color proportional to number of clicks */
@ -2404,26 +2383,23 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
Tbl_StartTableWide (); Tbl_StartTableWide ();
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG LEFT_BOTTOM\"" fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG LEFT_BOTTOM\" style=\"width:%upx;\">",
" style=\"width:%upx;\">"
"0",
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2, (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2); (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
fprintf (Gbl.F.Out,"0");
Tbl_EndCell (); Tbl_EndCell ();
for (Interval = 1; for (Interval = 1;
Interval <= 4; Interval <= 4;
Interval++) Interval++)
{ {
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG CENTER_BOTTOM\"" fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\">",
" style=\"width:%upx;\">",
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5, GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5); GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
Str_WriteFloatNum (Gbl.F.Out,(float) Interval * HitsMax / 5.0); Str_WriteFloatNum (Gbl.F.Out,(float) Interval * HitsMax / 5.0);
Tbl_EndCell (); Tbl_EndCell ();
} }
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG RIGHT_BOTTOM\"" fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LOG RIGHT_BOTTOM\" style=\"width:%upx;\">",
" style=\"width:%upx;\">",
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2, (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2); (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
Str_WriteFloatNum (Gbl.F.Out,HitsMax); Str_WriteFloatNum (Gbl.F.Out,HitsMax);
@ -2439,10 +2415,10 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,float HitsMax)
{ {
Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B); Sta_SetColor (ColorType,(float) NumColor,(float) GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH,&R,&G,&B);
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:1px;" fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:1px;"
" background-color:#%02X%02X%02X;\">" " background-color:#%02X%02X%02X;\">",
"<img src=\"%s/tr1x14.gif\"" R,G,B);
" alt=\"\" title=\"\" />", fprintf (Gbl.F.Out,"<img src=\"%s/tr1x14.gif\" alt=\"\" title=\"\" />",
R,G,B,Cfg_URL_ICON_PUBLIC); Cfg_URL_ICON_PUBLIC);
Tbl_EndCell (); Tbl_EndCell ();
} }
Tbl_EndRow (); Tbl_EndRow ();
@ -2611,9 +2587,8 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write week */ /* Write week */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u-%02u&nbsp;", fprintf (Gbl.F.Out,"%04u-%02u&nbsp;",Date.Year,Date.Week);
Date.Year,Date.Week);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2641,9 +2616,8 @@ static void Sta_ShowNumHitsPerWeek (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write week */ /* Write week */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u-%02u&nbsp;", fprintf (Gbl.F.Out,"%04u-%02u&nbsp;",Date.Year,Date.Week);
Date.Year,Date.Week);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2718,9 +2692,8 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write the month */ /* Write the month */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u-%02u&nbsp;", fprintf (Gbl.F.Out,"%04u-%02u&nbsp;",Date.Year,Date.Month);
Date.Year,Date.Month);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2747,9 +2720,8 @@ static void Sta_ShowNumHitsPerMonth (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write the month */ /* Write the month */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u-%02u&nbsp;", fprintf (Gbl.F.Out,"%04u-%02u&nbsp;",Date.Year,Date.Month);
Date.Year,Date.Month);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2824,9 +2796,8 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write the year */ /* Write the year */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u&nbsp;", fprintf (Gbl.F.Out,"%04u&nbsp;",Date.Year);
Date.Year);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2853,9 +2824,8 @@ static void Sta_ShowNumHitsPerYear (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
/* Write the year */ /* Write the year */
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%04u&nbsp;", fprintf (Gbl.F.Out,"%04u&nbsp;",Date.Year);
Date.Year);
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -2941,8 +2911,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
{ {
unsigned BarHeight; unsigned BarHeight;
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_BOTTOM\"" fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_BOTTOM\" style=\"width:%upx;\">",
" style=\"width:%upx;\">",
ColumnWidth); ColumnWidth);
/* Draw bar with a height porportional to the number of clicks */ /* Draw bar with a height porportional to the number of clicks */
@ -3058,11 +3027,12 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
Tbl_StartRow (); Tbl_StartRow ();
/* First division (left) */ /* First division (left) */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
"<img src=\"%s/ejexizq24x1.gif\"" Sta_WIDTH_SEMIDIVISION_GRAPHIC);
fprintf (Gbl.F.Out,"<img src=\"%s/ejexizq24x1.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" style=\"display:block; width:%upx; height:1px;\" />", " style=\"display:block; width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC); Sta_WIDTH_SEMIDIVISION_GRAPHIC);
Tbl_EndCell (); Tbl_EndCell ();
@ -3071,22 +3041,24 @@ static void Sta_ShowAverageAccessesPerMinute (unsigned long NumRows,MYSQL_RES *m
i < Sta_NUM_DIVISIONS_X * 2; i < Sta_NUM_DIVISIONS_X * 2;
i++) i++)
{ {
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
"<img src=\"%s/ejex24x1.gif\"" Sta_WIDTH_SEMIDIVISION_GRAPHIC);
fprintf (Gbl.F.Out,"<img src=\"%s/ejex24x1.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" style=\"display:block;" " style=\"display:block;"
" width:%upx; height:1px;\" />", " width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC); Sta_WIDTH_SEMIDIVISION_GRAPHIC);
Tbl_EndCell (); Tbl_EndCell ();
} }
/* Last division (right) */ /* Last division (right) */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:%upx;\">",
"<img src=\"%s/tr24x1.gif\"" Sta_WIDTH_SEMIDIVISION_GRAPHIC);
fprintf (Gbl.F.Out,"<img src=\"%s/tr24x1.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" style=\"display:block; width:%upx; height:1px;\" />", " style=\"display:block; width:%upx; height:1px;\" />",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Sta_WIDTH_SEMIDIVISION_GRAPHIC); Sta_WIDTH_SEMIDIVISION_GRAPHIC);
Tbl_EndCell (); Tbl_EndCell ();
@ -3113,8 +3085,7 @@ static void Sta_WriteLabelsXAxisAccMin (float IncX,const char *Format)
i <= Sta_NUM_DIVISIONS_X; i <= Sta_NUM_DIVISIONS_X;
i++, NumX += IncX) i++, NumX += IncX)
{ {
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LOG CENTER_BOTTOM\"" fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LOG CENTER_BOTTOM\" style=\"width:%upx;\">",
" style=\"width:%upx;\">",
Sta_WIDTH_DIVISION_GRAPHIC); Sta_WIDTH_DIVISION_GRAPHIC);
fprintf (Gbl.F.Out,Format,NumX); fprintf (Gbl.F.Out,Format,NumX);
Tbl_EndCell (); Tbl_EndCell ();
@ -3143,9 +3114,9 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
" style=\"width:%upx;" " style=\"width:%upx;"
" background-image:url('%s/ejey24x30.gif');" " background-image:url('%s/ejey24x30.gif');"
" background-size:30px 30px;" " background-size:30px 30px;"
" background-repeat:repeat;\">" " background-repeat:repeat;\">",
"00h",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC); Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
fprintf (Gbl.F.Out,"00h");
Tbl_EndCell (); Tbl_EndCell ();
} }
else if (Minute == (Sta_NUM_MINUTES_PER_DAY - 30)) else if (Minute == (Sta_NUM_MINUTES_PER_DAY - 30))
@ -3155,9 +3126,9 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
" style=\"width:%upx;" " style=\"width:%upx;"
" background-image:url('%s/ejey24x30.gif');" " background-image:url('%s/ejey24x30.gif');"
" background-size:30px 30px;" " background-size:30px 30px;"
" background-repeat:repeat;\">" " background-repeat:repeat;\">",
"24h",
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC); Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
fprintf (Gbl.F.Out,"24h");
Tbl_EndCell (); Tbl_EndCell ();
} }
else if (!(Minute % 30) && (Minute % 60)) else if (!(Minute % 30) && (Minute % 60))
@ -3167,9 +3138,9 @@ static void Sta_WriteAccessMinute (unsigned Minute,float HitsNum,float MaxX)
" style=\"width:%upx;" " style=\"width:%upx;"
" background-image:url('%s/ejey24x60.gif');" " background-image:url('%s/ejey24x60.gif');"
" background-size:30px 60px;" " background-size:30px 60px;"
" background-repeat:repeat;\">" " background-repeat:repeat;\">",
"%02uh", Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC);
Sta_WIDTH_SEMIDIVISION_GRAPHIC,Cfg_URL_ICON_PUBLIC,(Minute + 30) / 60); fprintf (Gbl.F.Out,"%02uh",(Minute + 30) / 60);
Tbl_EndCell (); Tbl_EndCell ();
} }
@ -3244,12 +3215,15 @@ static void Sta_ShowNumHitsPerAction (unsigned long NumRows,
Tbl_StartRow (); Tbl_StartRow ();
if (ActCod >= 0) if (ActCod >= 0)
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">" {
"%s&nbsp;", fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
Act_GetActionTextFromDB (ActCod,ActTxt)); fprintf (Gbl.F.Out,"%s&nbsp;",Act_GetActionTextFromDB (ActCod,ActTxt));
}
else else
fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">" {
"?&nbsp;"); fprintf (Gbl.F.Out,"<td class=\"LOG RIGHT_TOP\">");
fprintf (Gbl.F.Out,"?&nbsp;");
}
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -3363,9 +3337,8 @@ static void Sta_ShowNumHitsPerWSFunction (unsigned long NumRows,
if (sscanf (row[0],"%ld",&FunCod) != 1) if (sscanf (row[0],"%ld",&FunCod) != 1)
Lay_ShowErrorAndExit ("Wrong function code."); Lay_ShowErrorAndExit ("Wrong function code.");
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",API_GetFunctionNameFromFunCod (FunCod));
API_GetFunctionNameFromFunCod (FunCod));
Tbl_EndCell (); Tbl_EndCell ();
/* Draw bar proportional to number of hits */ /* Draw bar proportional to number of hits */
@ -3433,8 +3406,8 @@ static void Sta_ShowNumHitsPerBanner (unsigned long NumRows,
if (sscanf (row[0],"%ld",&(Ban.BanCod)) != 1) if (sscanf (row[0],"%ld",&(Ban.BanCod)) != 1)
Lay_ShowErrorAndExit ("Wrong banner code."); Lay_ShowErrorAndExit ("Wrong banner code.");
Ban_GetDataOfBannerByCod (&Ban); Ban_GetDataOfBannerByCod (&Ban);
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_TOP\">");
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">" fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">"
"<img src=\"%s/%s\"" "<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"BANNER_SMALL\"" " class=\"BANNER_SMALL\""
@ -3628,8 +3601,6 @@ static void Sta_WriteInstitution (long InsCod)
struct Instit Ins; struct Instit Ins;
/***** Start cell *****/ /***** Start cell *****/
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\"");
if (InsCod > 0) // Hit with an institution selected if (InsCod > 0) // Hit with an institution selected
{ {
/***** Get data of institution *****/ /***** Get data of institution *****/
@ -3637,7 +3608,7 @@ static void Sta_WriteInstitution (long InsCod)
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA); Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_BASIC_DATA);
/***** Title in cell *****/ /***** Title in cell *****/
fprintf (Gbl.F.Out,"title=\"%s\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
Ins.FullName); Ins.FullName);
/***** Form to go to institution *****/ /***** Form to go to institution *****/
@ -3645,8 +3616,11 @@ static void Sta_WriteInstitution (long InsCod)
"LOG","CENTER_TOP"); "LOG","CENTER_TOP");
} }
else // Hit with no institution selected else // Hit with no institution selected
{
/***** No institution selected *****/ /***** No institution selected *****/
fprintf (Gbl.F.Out,">&nbsp;-&nbsp;"); fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
fprintf (Gbl.F.Out,"&nbsp;-&nbsp;");
}
/***** End cell *****/ /***** End cell *****/
Tbl_EndCell (); Tbl_EndCell ();
@ -3727,8 +3701,6 @@ static void Sta_WriteCentre (long CtrCod)
struct Centre Ctr; struct Centre Ctr;
/***** Start cell *****/ /***** Start cell *****/
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\"");
if (CtrCod > 0) // Hit with a centre selected if (CtrCod > 0) // Hit with a centre selected
{ {
/***** Get data of centre *****/ /***** Get data of centre *****/
@ -3736,7 +3708,7 @@ static void Sta_WriteCentre (long CtrCod)
Ctr_GetDataOfCentreByCod (&Ctr); Ctr_GetDataOfCentreByCod (&Ctr);
/***** Title in cell *****/ /***** Title in cell *****/
fprintf (Gbl.F.Out,"title=\"%s\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
Ctr.FullName); Ctr.FullName);
/***** Form to go to centre *****/ /***** Form to go to centre *****/
@ -3744,8 +3716,11 @@ static void Sta_WriteCentre (long CtrCod)
"LOG","CENTER_TOP"); "LOG","CENTER_TOP");
} }
else // Hit with no centre selected else // Hit with no centre selected
{
/***** No centre selected *****/ /***** No centre selected *****/
fprintf (Gbl.F.Out,">&nbsp;-&nbsp;"); fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
fprintf (Gbl.F.Out,"&nbsp;-&nbsp;");
}
/***** End cell *****/ /***** End cell *****/
Tbl_EndCell (); Tbl_EndCell ();
@ -3826,8 +3801,6 @@ static void Sta_WriteDegree (long DegCod)
struct Degree Deg; struct Degree Deg;
/***** Start cell *****/ /***** Start cell *****/
fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\"");
if (DegCod > 0) // Hit with a degree selected if (DegCod > 0) // Hit with a degree selected
{ {
/***** Get data of degree *****/ /***** Get data of degree *****/
@ -3835,7 +3808,7 @@ static void Sta_WriteDegree (long DegCod)
Deg_GetDataOfDegreeByCod (&Deg); Deg_GetDataOfDegreeByCod (&Deg);
/***** Title in cell *****/ /***** Title in cell *****/
fprintf (Gbl.F.Out,"title=\"%s\">", fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\" title=\"%s\">",
Deg.FullName); Deg.FullName);
/***** Form to go to degree *****/ /***** Form to go to degree *****/
@ -3843,8 +3816,11 @@ static void Sta_WriteDegree (long DegCod)
"LOG","CENTER_TOP"); "LOG","CENTER_TOP");
} }
else // Hit with no degree selected else // Hit with no degree selected
{
/***** No degree selected *****/ /***** No degree selected *****/
fprintf (Gbl.F.Out,">&nbsp;-&nbsp;"); fprintf (Gbl.F.Out,"<td class=\"LOG LEFT_MIDDLE\">");
fprintf (Gbl.F.Out,"&nbsp;-&nbsp;");
}
/***** End cell *****/ /***** End cell *****/
Tbl_EndCell (); Tbl_EndCell ();
@ -3926,8 +3902,8 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
Sta_WriteDegree (Crs.DegCod); Sta_WriteDegree (Crs.DegCod);
/* Write degree year */ /* Write degree year */
fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LOG CENTER_TOP\">");
"%s&nbsp;", fprintf (Gbl.F.Out,"%s&nbsp;",
CrsOK ? Txt_YEAR_OF_DEGREE[Crs.Year] : CrsOK ? Txt_YEAR_OF_DEGREE[Crs.Year] :
"-"); "-");
Tbl_EndCell (); Tbl_EndCell ();
@ -4300,48 +4276,39 @@ void Sta_GetAndShowLastClicks (void)
/* Print table row */ /* Print table row */
Tbl_StartRow (); Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Click fprintf (Gbl.F.Out,"%s",row[0]); // Click
ClassRow,row[0]);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">" // Elapsed time fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">",ClassRow); // Elapsed time
"",
ClassRow);
Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Role fprintf (Gbl.F.Out,"%s", // Role
ClassRow,
Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]); Txt_ROLES_SINGUL_Abc[Rol_ConvertUnsignedStrToRole (row[3])][Usr_SEX_UNKNOWN]);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Country fprintf (Gbl.F.Out,"%s",Cty.Name[Gbl.Prefs.Language]); // Country
ClassRow,Cty.Name[Gbl.Prefs.Language]);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Institution fprintf (Gbl.F.Out,"%s",Ins.ShrtName); // Institution
ClassRow,Ins.ShrtName);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Centre fprintf (Gbl.F.Out,"%s",Ctr.ShrtName); // Centre
ClassRow,Ctr.ShrtName);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
"%s", // Degree fprintf (Gbl.F.Out,"%s",Deg.ShrtName); // Degree
ClassRow,Deg.ShrtName);
Tbl_EndCell (); Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">", fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",ClassRow);
ClassRow);
if (row[8]) if (row[8])
if (row[8][0]) if (row[8][0])
fprintf (Gbl.F.Out,"%s",row[8]); // Action fprintf (Gbl.F.Out,"%s",row[8]); // Action
Tbl_EndCell (); Tbl_EndCell ();
Tbl_EndRow (); Tbl_EndRow ();