From 82d003ba6de06dab35991ebfd1b311c544918337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 8 Oct 2019 00:26:14 +0200 Subject: [PATCH] Version19.31.21 --- swad_changelog.h | 3 +- swad_chat.c | 10 +- swad_classroom.c | 80 +++++++------- swad_connected.c | 43 ++++---- swad_country.c | 279 +++++++++++++++++++---------------------------- 5 files changed, 178 insertions(+), 237 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 59efa51b4..02cbdd330 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.31.20 (2019-10-07)" +#define Log_PLATFORM_VERSION "SWAD 19.31.21 (2019-10-08)" #define CSS_FILE "swad19.29.css" #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: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.31.21: Oct 08, 2019 Code refactoring in HTML tables. (247124 lines) Version 19.31.20: Oct 07, 2019 Code refactoring in HTML tables. (247192 lines) Version 19.31.19: Oct 07, 2019 Code refactoring in HTML tables. (247211 lines) Version 19.31.18: Oct 07, 2019 Code refactoring in HTML tables. (247239 lines) diff --git a/swad_chat.c b/swad_chat.c index 08f36ffcf..077038ecc 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -304,14 +304,12 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s", - row[0]); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",row[0]); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%s", - row[1]); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",row[1]); Tbl_EndCell (); Tbl_EndRow (); diff --git a/swad_classroom.c b/swad_classroom.c index a3e000833..39cdfe55f 100644 --- a/swad_classroom.c +++ b/swad_classroom.c @@ -143,31 +143,24 @@ void Cla_SeeClassrooms (void) Tbl_StartRow (); /* Short name */ - fprintf (Gbl.F.Out,"" - "%s", - Gbl.ColorRows[RowEvenOdd], - Gbl.Classrooms.Lst[NumCla].ShrtName); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE %s\"",Gbl.ColorRows[RowEvenOdd]); + fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].ShrtName); + Tbl_EndCell (); /* Full name */ - fprintf (Gbl.F.Out,"" - "%s", - Gbl.ColorRows[RowEvenOdd], - Gbl.Classrooms.Lst[NumCla].FullName); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE %s\"",Gbl.ColorRows[RowEvenOdd]); + fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].FullName); + Tbl_EndCell (); /* Capacity */ - fprintf (Gbl.F.Out,"", - Gbl.ColorRows[RowEvenOdd]); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",Gbl.ColorRows[RowEvenOdd]); Cla_WriteCapacity (Gbl.Classrooms.Lst[NumCla].Capacity); Tbl_EndCell (); /* Location */ - fprintf (Gbl.F.Out,"" - "%s", - Gbl.ColorRows[RowEvenOdd], - Gbl.Classrooms.Lst[NumCla].Location); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE %s\"",Gbl.ColorRows[RowEvenOdd]); + fprintf (Gbl.F.Out,"%s",Gbl.Classrooms.Lst[NumCla].Location); + Tbl_EndCell (); Tbl_EndRow (); } @@ -486,9 +479,10 @@ static void Cla_ListClassroomsForEdition (void) { Cla = &Gbl.Classrooms.Lst[NumCla]; - /* Put icon to remove classroom */ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + /* Put icon to remove classroom */ + Tbl_StartCellAttr ("class=\"BM\""); Frm_StartForm (ActRemCla); Cla_PutParamClaCod (Cla->ClaCod); Ico_PutIconRemove (); @@ -496,13 +490,12 @@ static void Cla_ListClassroomsForEdition (void) Tbl_EndCell (); /* Classroom code */ - fprintf (Gbl.F.Out,"" - "%ld", - Cla->ClaCod); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%ld",Cla->ClaCod); + Tbl_EndCell (); /* Classroom short name */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Frm_StartForm (ActRenClaSho); Cla_PutParamClaCod (Cla->ClaCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Frm_StartForm (ActRenClaFul); Cla_PutParamClaCod (Cla->ClaCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Frm_StartForm (ActChgClaMaxStd); Cla_PutParamClaCod (Cla->ClaCod); fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Frm_StartForm (ActRenClaLoc); Cla_PutParamClaCod (Cla->ClaCod); fprintf (Gbl.F.Out,"Location,Gbl.Form.Id); Frm_EndForm (); Tbl_EndCell (); + Tbl_EndRow (); } @@ -905,46 +899,46 @@ static void Cla_PutFormToCreateClassroom (void) Tbl_StartRow (); /***** Column to remove classroom, disabled here *****/ - fprintf (Gbl.F.Out,""); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"BM\""); + Tbl_EndCell (); /***** Classroom code *****/ - fprintf (Gbl.F.Out,""); - Tbl_EndRow (); + Tbl_StartCellAttr ("class=\"CODE\""); + Tbl_EndCell (); /***** Classroom short name *****/ - fprintf (Gbl.F.Out,"" - "", Cla_MAX_CHARS_SHRT_NAME,Cla_EditingCla->ShrtName); - Tbl_EndRow (); + Tbl_EndCell (); /***** Classroom full name *****/ - fprintf (Gbl.F.Out,"" - "", Cla_MAX_CHARS_FULL_NAME,Cla_EditingCla->FullName); - Tbl_EndRow (); + Tbl_EndCell (); /***** Seating capacity *****/ - fprintf (Gbl.F.Out,"" - "Capacity); fprintf (Gbl.F.Out,"\" />"); - Tbl_EndRow (); + Tbl_EndCell (); /***** Classroom location *****/ - fprintf (Gbl.F.Out,"" - "", Cla_MAX_CHARS_LOCATION,Cla_EditingCla->Location); - Tbl_EndRow (); + Tbl_EndCell (); Tbl_EndRow (); diff --git a/swad_connected.c b/swad_connected.c index 66176c871..6a484d049 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -358,12 +358,12 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnMainZone ( if (Usrs.NumUsrs) { Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%u %s", + Tbl_StartCellAttr ("colspan=\"3\" class=\"CENTER_TOP\""); + fprintf (Gbl.F.Out,"%u %s", Usrs.NumUsrs, (Usrs.NumUsrs == 1) ? Txt_ROLES_SINGUL_abc[Role][Usrs.Sex] : Txt_ROLES_PLURAL_abc[Role][Usrs.Sex]); - Tbl_EndRow (); + Tbl_EndCell (); Tbl_EndRow (); /***** I can see connected users *****/ @@ -392,12 +392,14 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro Gbl.Usrs.Connected.NumUsrsToList = Cfg_MAX_CONNECTED_SHOWN; Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%u %s", + + Tbl_StartCellAttr ("colspan=\"3\" class=\"CON_USR_NARROW_TIT\""); + fprintf (Gbl.F.Out,"%u %s", NumUsrsThisRole, (NumUsrsThisRole == 1) ? Txt_ROLES_SINGUL_abc[Role][UsrSex] : Txt_ROLES_PLURAL_abc[Role][UsrSex]); - Tbl_EndRow (); + Tbl_EndCell (); + Tbl_EndRow (); /***** I can see connected users *****/ @@ -407,7 +409,8 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro if (Gbl.Usrs.Connected.NumUsrsToList < Gbl.Usrs.Connected.NumUsrs) { Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + + Tbl_StartCellAttr ("colspan=\"3\" class=\"CENTER_TOP\""); Frm_StartFormUnique (ActLstCon); // Must be unique because // the list of connected users // is dynamically updated via AJAX @@ -420,6 +423,7 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro Txt_Connected_users,Txt_Connected_users); Frm_EndForm (); Tbl_EndCell (); + Tbl_EndRow (); } } @@ -815,10 +819,10 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) UsrDat = &OtherUsrDat; } - /***** Show photo *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + + /***** Show photo *****/ + Tbl_StartCellAttr ("class=\"CON_PHOTO COLOR%u\"",Gbl.RowEvenOdd); ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : NULL, @@ -828,8 +832,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) /***** Write full name and link *****/ Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_NAME_NARROW CON_CRS" : "CON_NAME_NARROW CON_NO_CRS"); - fprintf (Gbl.F.Out,"", - Font,Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd); // The form must be unique because // the list of connected users // is dynamically updated via AJAX @@ -859,8 +862,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_SINCE CON_CRS" : "CON_SINCE CON_NO_CRS"); - fprintf (Gbl.F.Out,"", - Font,Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"
", Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column @@ -1035,10 +1037,10 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R if (sscanf (row[2],"%ld",&TimeDiff) != 1) TimeDiff = (time_t) 0; - /***** Show photo *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"", - Gbl.RowEvenOdd); + + /***** Show photo *****/ + Tbl_StartCellAttr ("class=\"CON_PHOTO COLOR%u\"",Gbl.RowEvenOdd); ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL); Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : NULL, @@ -1048,8 +1050,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R /***** Write full name and link *****/ Font = (ThisCrs ? "CON_NAME_WIDE CON_CRS" : "CON_NAME_WIDE CON_NO_CRS"); - fprintf (Gbl.F.Out,"", - Font,Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd); if (PutLinkToRecord) { switch (Role) @@ -1080,10 +1081,10 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R /***** Write time from last access *****/ Font = (ThisCrs ? "CON_SINCE CON_CRS" : "CON_SINCE CON_NO_CRS"); - fprintf (Gbl.F.Out,"", - Font,Gbl.RowEvenOdd); + Tbl_StartCellAttr ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd); Dat_WriteHoursMinutesSecondsFromSeconds (TimeDiff); Tbl_EndCell (); + Tbl_EndRow (); Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; diff --git a/swad_country.c b/swad_country.c index c8fce1fb7..b5b506000 100644 --- a/swad_country.c +++ b/swad_country.c @@ -185,8 +185,7 @@ void Cty_SeeCtyWithPendingInss (void) Tbl_StartRow (); /* Country map */ - fprintf (Gbl.F.Out,"", - BgColor); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE %s\"",BgColor); Cty_DrawCountryMapAndNameWithLink (&Cty,ActSeeIns, "COUNTRY_SMALL", "COUNTRY_MAP_SMALL", @@ -194,9 +193,8 @@ void Cty_SeeCtyWithPendingInss (void) Tbl_EndCell (); /* Number of pending institutions (row[1]) */ - fprintf (Gbl.F.Out,"" - "%s", - BgColor,row[1]); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%s",row[1]); Tbl_EndCell (); Tbl_EndRow (); @@ -328,13 +326,11 @@ static void Cty_Configuration (bool PrintView) /***** Country name (an link to WWW if exists) *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Country); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Country); Tbl_EndCell (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"DAT_N LEFT_MIDDLE\""); if (!PrintView && Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language][0]) fprintf (Gbl.F.Out,"", Gbl.Hierarchy.Cty.WWW[Gbl.Prefs.Language]); @@ -348,14 +344,12 @@ static void Cty_Configuration (bool PrintView) /***** Link to the country inside platform *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Shortcut); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Shortcut); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "" + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"" "%s/%s?cty=%ld", Cfg_URL_SWAD_CGI, Lan_STR_LANG_ID[Gbl.Prefs.Language], @@ -372,13 +366,11 @@ static void Cty_Configuration (bool PrintView) /***** QR code with link to the country *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_QR_code); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_QR_code); Tbl_EndCell (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); QR_LinkTo (250,"cty",Gbl.Hierarchy.Cty.CtyCod); Tbl_EndCell (); @@ -389,14 +381,12 @@ static void Cty_Configuration (bool PrintView) /***** Number of users who claim to belong to this country *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Users_of_the_country); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Users_of_the_country); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u", Usr_GetNumUsrsWhoClaimToBelongToCty (Gbl.Hierarchy.Cty.CtyCod)); Tbl_EndCell (); @@ -405,14 +395,12 @@ static void Cty_Configuration (bool PrintView) /***** Number of institutions *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Institutions); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Institutions); Tbl_EndCell (); /* Form to go to see institutions of this country */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\""); Frm_StartFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); snprintf (Gbl.Title,sizeof (Gbl.Title), @@ -429,15 +417,12 @@ static void Cty_Configuration (bool PrintView) /***** Number of centres *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Centres); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Centres); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ctr_GetNumCtrsInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ctr_GetNumCtrsInCty (Gbl.Hierarchy.Cty.CtyCod)); Tbl_EndCell (); Tbl_EndRow (); @@ -445,15 +430,13 @@ static void Cty_Configuration (bool PrintView) /***** Number of degrees *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:", Txt_Degrees); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Deg_GetNumDegsInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Deg_GetNumDegsInCty (Gbl.Hierarchy.Cty.CtyCod)); Tbl_EndCell (); Tbl_EndRow (); @@ -461,15 +444,12 @@ static void Cty_Configuration (bool PrintView) /***** Number of courses *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Courses); + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:",Txt_Courses); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Crs_GetNumCrssInCty (Gbl.Hierarchy.Cty.CtyCod)); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Crs_GetNumCrssInCty (Gbl.Hierarchy.Cty.CtyCod)); Tbl_EndCell (); Tbl_EndRow (); @@ -509,15 +489,14 @@ static void Cty_ShowNumUsrsInCrssOfCty (Rol_Role_t Role) Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - "%s:", - The_ClassFormInBox[Gbl.Prefs.Theme], + Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]); + fprintf (Gbl.F.Out,"%s:", (Role == Rol_UNK) ? Txt_Users_in_courses : Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN]); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u", Usr_GetNumUsrsInCrssOfCty (Role,Gbl.Hierarchy.Cty.CtyCod)); Tbl_EndCell (); @@ -573,50 +552,43 @@ void Cty_ListCountries2 (void) /***** Separation row *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,"" - " "); + Tbl_StartCellAttr ("colspan=\"8\" class=\"DAT CENTER_MIDDLE\""); + fprintf (Gbl.F.Out," "); Tbl_EndCell (); Tbl_EndRow (); /***** Write users and institutions in other countries *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%s", - Txt_Other_countries); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",Txt_Other_countries); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Cty_GetNumUsrsWhoClaimToBelongToCty (0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Cty_GetNumUsrsWhoClaimToBelongToCty (0)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ins_GetNumInssInCty (0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ins_GetNumInssInCty (0)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ctr_GetNumCtrsInCty (0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ctr_GetNumCtrsInCty (0)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Deg_GetNumDegsInCty (0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Deg_GetNumDegsInCty (0)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Crs_GetNumCrssInCty (0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Crs_GetNumCrssInCty (0)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Usr_GetNumUsrsInCrssOfCty (Rol_TCH,0)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Usr_GetNumUsrsInCrssOfCty (Rol_TCH,0)); Tbl_EndCell (); Tbl_EndRow (); @@ -624,41 +596,35 @@ void Cty_ListCountries2 (void) /***** Write users and institutions with unknown country *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%s", - Txt_Country_unspecified); + Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s",Txt_Country_unspecified); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Cty_GetNumUsrsWhoClaimToBelongToCty (-1L)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Cty_GetNumUsrsWhoClaimToBelongToCty (-1L)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ins_GetNumInssInCty (-1L)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ins_GetNumInssInCty (-1L)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Ctr_GetNumCtrsInCty (-1L)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Ctr_GetNumCtrsInCty (-1L)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Deg_GetNumDegsInCty (-1L)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Deg_GetNumDegsInCty (-1L)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - Crs_GetNumCrssInCty (-1L)); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%u",Crs_GetNumCrssInCty (-1L)); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "0"); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"0"); Tbl_EndCell (); Tbl_EndRow (); @@ -760,13 +726,12 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) Tbl_StartRow (); /***** Number of country in this list *****/ - fprintf (Gbl.F.Out,"" - "%u", - BgColor,NumCty); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",NumCty); Tbl_EndCell (); /***** Country map (and link to WWW if exists) *****/ - fprintf (Gbl.F.Out,"",BgColor); + Tbl_StartCellAttr ("class=\"LEFT_MIDDLE %s\"",BgColor); Cty_DrawCountryMapAndNameWithLink (Cty,ActSeeIns, "COUNTRY_SMALL", "COUNTRY_MAP_SMALL", @@ -774,34 +739,28 @@ static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty) Tbl_EndCell (); /* Write stats of this country */ - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->NumUsrsWhoClaimToBelongToCty); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->NumUsrsWhoClaimToBelongToCty); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->Inss.Num); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->Inss.Num); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->NumCtrs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->NumCtrs); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->NumDegs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->NumDegs); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->NumCrss); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->NumCrss); Tbl_EndCell (); - fprintf (Gbl.F.Out,"" - "%u", - BgColor,Cty->NumUsrs); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE %s\"",BgColor); + fprintf (Gbl.F.Out,"%u",Cty->NumUsrs); Tbl_EndCell (); Tbl_EndRow (); @@ -1666,8 +1625,7 @@ static void Cty_ListCountriesForEdition (void) Tbl_StartRow (); /* Put icon to remove country */ - fprintf (Gbl.F.Out,"", - 1 + Lan_NUM_LANGUAGES); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES); if (Cty->Inss.Num || Cty->NumUsrsWhoClaimToBelongToCty || Cty->NumUsrs) // Country has institutions or users ==> deletion forbidden @@ -1682,29 +1640,25 @@ static void Cty_ListCountriesForEdition (void) Tbl_EndCell (); /* Numerical country code (ISO 3166-1) */ - fprintf (Gbl.F.Out,"" - "%03ld", - 1 + Lan_NUM_LANGUAGES,Cty->CtyCod); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"%03ld",Cty->CtyCod); Tbl_EndCell (); /* Alphabetic country code with 2 letters (ISO 3166-1) */ - fprintf (Gbl.F.Out,"" - "%s", - 1 + Lan_NUM_LANGUAGES,Cty->Alpha2); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"%s",Cty->Alpha2); Tbl_EndCell (); Tbl_PutEmptyCells (3); /* Number of users */ - fprintf (Gbl.F.Out,"" - "%u", - 1 + Lan_NUM_LANGUAGES,Cty->NumUsrsWhoClaimToBelongToCty); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"%u",Cty->NumUsrsWhoClaimToBelongToCty); Tbl_EndCell (); /* Number of institutions */ - fprintf (Gbl.F.Out,"" - "%u", - 1 + Lan_NUM_LANGUAGES,Cty->Inss.Num); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"%u",Cty->Inss.Num); Tbl_EndCell (); Tbl_EndRow (); @@ -1717,13 +1671,12 @@ static void Cty_ListCountriesForEdition (void) Tbl_StartRow (); /* Language */ - fprintf (Gbl.F.Out,"" - "%s:", - Txt_STR_LANG_NAME[Lan]); + Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\""); + fprintf (Gbl.F.Out,"%s:",Txt_STR_LANG_NAME[Lan]); Tbl_EndCell (); /* Name */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); Frm_StartForm (ActRenCty); Cty_PutParamOtherCtyCod (Cty->CtyCod); Par_PutHiddenParamUnsigned ("Lan",(unsigned) Lan); @@ -1736,7 +1689,7 @@ static void Cty_ListCountriesForEdition (void) Tbl_EndCell (); /* WWW */ - fprintf (Gbl.F.Out,""); + Tbl_StartCellAttr ("class=\"LEFT_TOP\""); Frm_StartForm (ActChgCtyWWW); Cty_PutParamOtherCtyCod (Cty->CtyCod); Par_PutHiddenParamUnsigned ("Lan",(unsigned) Lan); @@ -2106,40 +2059,35 @@ static void Cty_PutFormToCreateCountry (void) Tbl_StartRow (); /***** Column to remove country, disabled here *****/ - fprintf (Gbl.F.Out,"", - 1 + Lan_NUM_LANGUAGES); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES); Tbl_EndCell (); /***** Numerical country code (ISO 3166-1) *****/ - fprintf (Gbl.F.Out,"" - "CtyCod > 0) fprintf (Gbl.F.Out,"%03ld",Cty_EditingCty->CtyCod); fprintf (Gbl.F.Out,"\" required=\"required\" />"); Tbl_EndCell (); /***** Alphabetic country code with 2 letters (ISO 3166-1) *****/ - fprintf (Gbl.F.Out,"" - "", - 1 + Lan_NUM_LANGUAGES,Cty_EditingCty->Alpha2); + " required=\"required\" />",Cty_EditingCty->Alpha2); Tbl_EndCell (); Tbl_PutEmptyCells (3); /***** Number of users *****/ - fprintf (Gbl.F.Out,"" - "0", - 1 + Lan_NUM_LANGUAGES); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"0"); Tbl_EndCell (); /***** Number of institutions *****/ - fprintf (Gbl.F.Out,"" - "0", - 1 + Lan_NUM_LANGUAGES); + Tbl_StartCellAttr ("rowspan=\"%u\" class=\"DAT RIGHT_TOP\"",1 + Lan_NUM_LANGUAGES); + fprintf (Gbl.F.Out,"0"); Tbl_EndCell (); Tbl_EndRow (); @@ -2152,14 +2100,13 @@ static void Cty_PutFormToCreateCountry (void) Tbl_StartRow (); /* Language */ - fprintf (Gbl.F.Out,"" - "%s", - Txt_STR_LANG_NAME[Lan]); + Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP\""); + fprintf (Gbl.F.Out,"%s",Txt_STR_LANG_NAME[Lan]); Tbl_EndCell (); /* Name */ - fprintf (Gbl.F.Out,"" - "", Lan_STR_LANG_ID[Lan], @@ -2168,8 +2115,8 @@ static void Cty_PutFormToCreateCountry (void) Tbl_EndCell (); /* WWW */ - fprintf (Gbl.F.Out,"" - "", Lan_STR_LANG_ID[Lan],