Version19.31.30

This commit is contained in:
Antonio Cañas Vargas 2019-10-09 17:38:50 +02:00
parent 3d75c62e19
commit f7133e504e
9 changed files with 156 additions and 162 deletions

View File

@ -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.29 (2019-10-08)"
#define Log_PLATFORM_VERSION "SWAD 19.31.30 (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.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.28: Oct 08, 2019 Code refactoring in HTML tables. (246783 lines)
Version 19.31.27: Oct 08, 2019 Code refactoring in HTML tables. (246823 lines)

View File

@ -511,7 +511,7 @@ static bool Mch_CheckIfICanEditThisMatch (const struct Match *Match)
static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match)
{
fprintf (Gbl.F.Out,"<td class=\"BT%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"BT%u\"",Gbl.RowEvenOdd);
/***** Put icon to remove the match *****/
if (Mch_CheckIfICanEditThisMatch (Match))
@ -536,7 +536,7 @@ static void Mch_ListOneOrMoreMatchesIcons (const struct Match *Match)
static void Mch_ListOneOrMoreMatchesAuthor (const struct Match *Match)
{
/***** Match author (teacher) *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
Usr_WriteAuthor1Line (Match->UsrCod,false);
Tbl_EndCell ();
}
@ -554,12 +554,11 @@ static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned Un
StartEndTime <= (Dat_StartEndTime_t) (Dat_NUM_START_END_TIME - 1);
StartEndTime++)
{
fprintf (Gbl.F.Out,"<td id=\"mch_time_%u_%u\""
" class=\"%s LEFT_TOP COLOR%u\">",
(unsigned) StartEndTime,UniqueId,
Match->Status.QstInd >= Mch_AFTER_LAST_QUESTION ? "DATE_RED" :
"DATE_GREEN",
Gbl.RowEvenOdd);
Tbl_StartCellAttr ("id=\"mch_time_%u_%u\" class=\"%s LEFT_TOP COLOR%u\"",
(unsigned) StartEndTime,UniqueId,
Match->Status.QstInd >= Mch_AFTER_LAST_QUESTION ? "DATE_RED" :
"DATE_GREEN",
Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('mch_time_%u_%u',"
"%ld,%u,'<br />','%s',true,true,0x7);"
@ -577,7 +576,7 @@ static void Mch_ListOneOrMoreMatchesTimes (const struct Match *Match,unsigned Un
static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Match *Match)
{
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
/***** Title *****/
fprintf (Gbl.F.Out,"<span class=\"ASG_TITLE\">%s</span>",Match->Title);
@ -660,7 +659,7 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
static void Mch_ListOneOrMoreMatchesNumPlayers (const struct Match *Match)
{
/***** Number of players who have answered any question in the match ******/
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%u",Mch_GetNumUsrsWhoHaveAnswerMch (Match->MchCod));
Tbl_EndCell ();
}
@ -675,7 +674,7 @@ static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned N
extern const char *Txt_Play;
extern const char *Txt_Resume;
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished match
/* Current question index / total of questions */
@ -728,7 +727,7 @@ static void Mch_ListOneOrMoreMatchesResult (const struct Match *Match,
extern const char *Txt_Hidden_result;
extern const char *Txt_Visible_result;
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT CENTER_TOP COLOR%u\"",Gbl.RowEvenOdd);
switch (Gbl.Usrs.Me.Role.Logged)
{
@ -1194,12 +1193,12 @@ static void Mch_PutFormNewMatch (struct Game *Game)
/***** Match title *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Title\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Title);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"text\" id=\"Title\" name=\"Title\""
" size=\"45\" maxlength=\"%u\" value=\"%s\""
" required=\"required\" />",
@ -1251,18 +1250,17 @@ static void Mch_ShowLstGrpsToCreateMatch (void)
/***** Start box and table *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",
The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_Groups);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
Box_StartBoxTable ("95%",NULL,NULL,
NULL,Box_NOT_CLOSABLE,0);
/***** First row: checkbox to select the whole course *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"7\" class=\"DAT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("colspan=\"7\" class=\"DAT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label>"
"<input type=\"checkbox\""
" id=\"WholeCrs\" name=\"WholeCrs\" value=\"Y\""
@ -2494,7 +2492,7 @@ static void Mch_ShowQuestionAndAnswersStd (struct Match *Match)
/***** Write letter for this option *****/
/* Start table cell */
fprintf (Gbl.F.Out,"<td class=\"MATCH_STD_CELL\">");
Tbl_StartCellAttr ("class=\"MATCH_STD_CELL\"");
/* Form with button.
Sumitting onmousedown instead of default onclick
@ -3154,10 +3152,10 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs
i < 100;
i++)
{
fprintf (Gbl.F.Out,"<td class=\"%s\">",
(i < BarWidth) ? (Correct ? "MATCH_RES_CORRECT" :
"MATCH_RES_WRONG") :
"MATCH_RES_VOID");
Tbl_StartCellAttr ("class=\"%s\"",
(i < BarWidth) ? (Correct ? "MATCH_RES_CORRECT" :
"MATCH_RES_WRONG") :
"MATCH_RES_VOID");
Tbl_EndCell ();
}
Tbl_EndRow ();

View File

@ -207,12 +207,11 @@ void McR_SelUsrsToViewUsrsMchResults (void)
Tbl_StartTableCenterPadding (2);
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_Users);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"%s LEFT_TOP\">",
The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartCellAttr ("colspan=\"2\" class=\"%s LEFT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartTablePadding (2);
Usr_ListUsersToSelect (Rol_TCH);
Usr_ListUsersToSelect (Rol_NET);
@ -454,10 +453,9 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
{
TimeUTC[StartEndTime] = Dat_GetUNIXTimeFromStr (row[1 + StartEndTime]);
UniqueId++;
fprintf (Gbl.F.Out,"<td id =\"mch_time_%u_%u\""
" class=\"DAT LEFT_TOP COLOR%u\">",
(unsigned) StartEndTime,UniqueId,
Gbl.RowEvenOdd);
Tbl_StartCellAttr ("id =\"mch_time_%u_%u\" class=\"DAT LEFT_TOP COLOR%u\"",
(unsigned) StartEndTime,UniqueId,
Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('mch_time_%u_%u',"
"%ld,%u,'<br />','%s',true,false,0x7);"
@ -469,7 +467,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
}
/* Write match title */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%s",Match.Title);
Tbl_EndCell ();
@ -494,24 +492,24 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
}
/* Write number of questions */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%u",NumQstsInThisResult);
Tbl_EndCell ();
/* Write number of questions not blank */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%u",NumQstsNotBlankInThisResult);
Tbl_EndCell ();
/* Write score */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (ShowResultThisMatch)
fprintf (Gbl.F.Out,"%.2lf",
ScoreInThisResult);
Tbl_EndCell ();
/* Write average score per question */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (ShowResultThisMatch)
fprintf (Gbl.F.Out,"%.2lf",
NumQstsInThisResult ? ScoreInThisResult / (double) NumQstsInThisResult :
@ -519,7 +517,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
Tbl_EndCell ();
/* Write score over Tst_SCORE_MAX */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (ShowResultThisMatch)
fprintf (Gbl.F.Out,"%.2lf",
NumQstsInThisResult ? ScoreInThisResult * Tst_SCORE_MAX /
@ -528,7 +526,7 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther)
Tbl_EndCell ();
/* Link to show this result */
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"RIGHT_TOP COLOR%u\"",Gbl.RowEvenOdd);
if (ShowResultThisMatch)
{
Gam_SetParamCurrentGamCod (Match.GamCod); // Used to pass parameter
@ -589,30 +587,30 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults,
Tbl_StartRow ();
/***** Row title *****/
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("colspan=\"3\" class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%s: %u",Txt_Matches,NumResults);
Tbl_EndCell ();
/***** Write total number of questions *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (NumResults)
fprintf (Gbl.F.Out,"%u",NumTotalQsts);
Tbl_EndCell ();
/***** Write total number of questions not blank *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (NumResults)
fprintf (Gbl.F.Out,"%u",NumTotalQstsNotBlank);
Tbl_EndCell ();
/***** Write total score *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (ShowSummaryResults)
fprintf (Gbl.F.Out,"%.2lf",TotalScoreOfAllResults);
Tbl_EndCell ();
/***** Write average score per question *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (ShowSummaryResults)
fprintf (Gbl.F.Out,"%.2lf",
NumTotalQsts ? TotalScoreOfAllResults / (double) NumTotalQsts :
@ -620,7 +618,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults,
Tbl_EndCell ();
/***** Write score over Tst_SCORE_MAX *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (ShowSummaryResults)
fprintf (Gbl.F.Out,"%.2lf",
NumTotalQsts ? TotalScoreOfAllResults * Tst_SCORE_MAX /
@ -629,7 +627,7 @@ static void McR_ShowMchResultsSummaryRow (bool ShowSummaryResults,
Tbl_EndCell ();
/***** Last cell *****/
fprintf (Gbl.F.Out,"<td class=\"DAT_N_LINE_TOP COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT_N_LINE_TOP COLOR%u\"",Gbl.RowEvenOdd);
Tbl_EndCell ();
/***** End row *****/
@ -779,11 +777,11 @@ void McR_ShowOneMchResult (void)
/* User */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"%s:",Txt_ROLES_SINGUL_Abc[UsrDat->Roles.InCurrentCrs.Role][UsrDat->Sex]);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
ID_WriteUsrIDs (UsrDat,NULL);
fprintf (Gbl.F.Out," %s",
UsrDat->Surname1);
@ -809,12 +807,12 @@ void McR_ShowOneMchResult (void)
{
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"%s:",Txt_START_END_TIME[StartEndTime]);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td id=\"match_%u\" class=\"DAT LEFT_TOP\">",
(unsigned) StartEndTime);
Tbl_StartCellAttr ("id=\"match_%u\" class=\"DAT LEFT_TOP\"",
(unsigned) StartEndTime);
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('match_%u',%ld,"
"%u,',&nbsp;','%s',true,true,0x7);"
@ -830,11 +828,11 @@ void McR_ShowOneMchResult (void)
/* Number of questions */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"%s:",Txt_Questions);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
fprintf (Gbl.F.Out,"%u (%u %s)",
NumQsts,NumQstsNotBlank,Txt_non_blank_QUESTIONS);
Tbl_EndCell ();
@ -844,11 +842,11 @@ void McR_ShowOneMchResult (void)
/* Score */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"%s:",Txt_Score);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
if (ICanViewScore)
fprintf (Gbl.F.Out,"%.2lf (%.2lf",
TotalScore,
@ -865,11 +863,11 @@ void McR_ShowOneMchResult (void)
/* Tags present in this result */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT_N RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT_N RIGHT_TOP\"");
fprintf (Gbl.F.Out,"%s:",Txt_Tags);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_TOP\"");
Gam_ShowTstTagsPresentInAGame (Match.GamCod);
Tbl_EndCell ();

View File

@ -292,11 +292,11 @@ static void Msg_PutFormMsgUsrs (char Content[Cns_MAX_BYTES_LONG_TEXT + 1])
/***** "To:" section (recipients) *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_TOP\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartCellAttr ("class=\"%s RIGHT_TOP\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_MSG_To);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">");
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
if (Gbl.Msg.ShowOnlyOneRecipient)
/***** Show only one user as recipient *****/
Msg_ShowOneUniqueRecipient ();
@ -495,9 +495,9 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
Tbl_StartRow ();
if (Colspan > 1)
fprintf (Gbl.F.Out,"<td colspan=\"%u\" class=\"LEFT_MIDDLE\">",Colspan);
Tbl_StartCellAttr ("colspan=\"%u\" class=\"LEFT_MIDDLE\"",Colspan);
else
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<textarea id=\"OtherRecipients\" name=\"OtherRecipients\""
" class=\"MSG_RECIPIENTS\" rows=\"2\""
" placeholder=\"%s\">",
@ -537,7 +537,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
/***** Message subject *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"MsgSubject\" class=\"%s\">"
"%s:"
"</label>",
@ -545,7 +545,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
Txt_MSG_Subject);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<textarea id=\"MsgSubject\" name=\"Subject\""
" class=\"MSG_SUBJECT\" rows=\"2\">");
@ -590,14 +590,14 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
/***** Message content *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"MsgContent\" class=\"%s\">"
"%s:"
"</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_Content);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<textarea id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\">");
@ -625,7 +625,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
/***** Message content *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"MsgContent\" class=\"%s\">"
"%s:"
"</label>",
@ -633,7 +633,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
Txt_MSG_Content);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<textarea id=\"MsgContent\" name=\"Content\""
" class=\"MSG_CONTENT\" rows=\"20\">");
@ -2659,7 +2659,7 @@ void Msg_ShowFormToFilterMsgs (void)
Tbl_StartRow ();
/***** Filter authors/recipients *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label class=\"%s\">"
"%s:&nbsp;"
"<input type=\"search\" name=\"FilterFromTo\""
@ -2671,7 +2671,7 @@ void Msg_ShowFormToFilterMsgs (void)
Tbl_EndCell ();
/***** Filter message content *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label class=\"%s\">"
"%s:&nbsp;"
"<input type=\"search\" name=\"FilterContent\""
@ -2967,10 +2967,10 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"CONTEXT_COL %s\">",
Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? "BG_MSG_BLUE" :
"BG_MSG_GREEN") :
"BG_MSG_BLUE");
Tbl_StartCellAttr ("class=\"CONTEXT_COL %s\"",
Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Open ? "BG_MSG_BLUE" :
"BG_MSG_GREEN") :
"BG_MSG_BLUE");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
@ -2994,9 +2994,8 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write message author *****/
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS);
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
Open ? "MSG_AUT_BG" :
"MSG_AUT_BG_NEW");
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",Open ? "MSG_AUT_BG" :
"MSG_AUT_BG_NEW");
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
Tbl_EndCell ();
@ -3013,19 +3012,19 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
{
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td rowspan=\"3\" colspan=\"2\" class=\"LEFT_TOP\">");
Tbl_StartCellAttr ("rowspan=\"3\" colspan=\"2\" class=\"LEFT_TOP\"");
Tbl_StartTablePadding (2);
/***** Write course origin of message *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
FromThisCrs = Msg_WriteCrsOrgMsg (CrsCod);
Tbl_EndCell ();
Tbl_EndRow ();
/***** Form to reply message *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED &&
Gbl.Usrs.Me.Role.Logged >= Rol_USR)
// Guests (users without courses) can read messages but not reply them
@ -3037,11 +3036,11 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
Tbl_EndCell ();
/***** Write "From:" *****/
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP MSG_TIT\">");
Tbl_StartCellAttr ("class=\"RIGHT_TOP MSG_TIT\"");
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_MSG_From);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP\">");
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
Msg_WriteMsgFrom (&UsrDat,Deleted);
Tbl_EndCell ();
@ -3050,20 +3049,20 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write "To:" *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP MSG_TIT\">");
Tbl_StartCellAttr ("class=\"RIGHT_TOP MSG_TIT\"");
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_MSG_To);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP\">");
Tbl_StartCellAttr ("colspan=\"2\" class=\"LEFT_TOP\"");
Msg_WriteMsgTo (MsgCod);
Tbl_EndCell ();
Tbl_EndRow ();
/***** Write "Content:" *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP MSG_TIT\">");
/***** Write "Content:" *****/
Tbl_StartCellAttr ("class=\"RIGHT_TOP MSG_TIT\"");
fprintf (Gbl.F.Out,"%s:&nbsp;",Txt_MSG_Content);
Tbl_EndCell ();
@ -3074,11 +3073,12 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
Msg_GetMsgContent (MsgCod,Content,&Media);
/***** Show content and image *****/
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"MSG_TXT LEFT_TOP\">");
Tbl_StartCellAttr ("colspan=\"2\" class=\"MSG_TXT LEFT_TOP\"");
if (Content[0])
Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false);
Med_ShowMedia (&Media,"MSG_IMG_CONTAINER","MSG_IMG");
Tbl_EndCell ();
Tbl_EndRow ();
/***** Free image *****/
@ -3147,9 +3147,9 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg)
{
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\" style=\"width:45px;\">",
NewMsg ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
Tbl_StartCellAttr ("class=\"%s CENTER_TOP\" style=\"width:45px;\"",
NewMsg ? "MSG_TIT_BG_NEW" :
"MSG_TIT_BG");
fprintf (Gbl.F.Out,"%lu:",MsgNum);
Tbl_EndCell ();
}
@ -3165,9 +3165,8 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b
extern const char *Txt_no_subject;
/***** Start cell *****/
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
Open ? "MSG_TIT_BG" :
"MSG_TIT_BG_NEW");
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",Open ? "MSG_TIT_BG" :
"MSG_TIT_BG_NEW");
/***** Start form to expand/contract the message *****/
Frm_StartForm (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED ? (Expanded ? ActConRcvMsg :
@ -3210,12 +3209,13 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
/***** Start table *****/
Tbl_StartTablePadding (2);
/***** Start first column *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP");
/***** Start first column *****/
if (BgColor)
fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\" style=\"width:30px;\">");
Tbl_StartCellAttr ("class=\"CENTER_TOP %s\" style=\"width:30px;\"",BgColor);
else
Tbl_StartCellAttr ("class=\"CENTER_TOP\" style=\"width:30px;\"");
/***** Write author name or don't write it? *****/
if (Enabled)
@ -3232,11 +3232,11 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
Tbl_EndCell ();
/***** Second column with user name (if author has a web page, put a link to it) *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
if (BgColor)
fprintf (Gbl.F.Out," %s",BgColor);
fprintf (Gbl.F.Out,"\">"
"<div class=\"AUTHOR_2_LINES\">"); // Limited width
Tbl_StartCellAttr ("class=\"LEFT_TOP %s\"",BgColor);
else
Tbl_StartCellAttr ("class=\"LEFT_TOP\"");
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_2_LINES\">"); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</div>");
}
@ -3251,9 +3251,9 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
Tbl_EndCell ();
if (BgColor)
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE %s\">",BgColor);
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE %s\"",BgColor);
else
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
}
/***** End second column *****/
@ -3371,7 +3371,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
Tbl_StartRow ();
/***** Put an icon to show if user has read the message *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:20px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
@ -3385,7 +3385,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
Tbl_EndCell ();
/***** Put user's photo *****/
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\" style=\"width:30px;\">");
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\" style=\"width:30px;\"");
ShowPhoto = (Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL));
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -3393,7 +3393,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
Tbl_EndCell ();
/***** Write user's name *****/
fprintf (Gbl.F.Out,"<td class=\"AUTHOR_TXT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"AUTHOR_TXT LEFT_MIDDLE\"");
if (UsrDat->UsrCod > 0)
{
fprintf (Gbl.F.Out,"%s",UsrDat->FullName);
@ -3534,7 +3534,7 @@ static void Msg_WriteMsgTo (long MsgCod)
Txt_MSG_Unopened);
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:20px;\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:20px;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Cfg_URL_ICON_PUBLIC,
@ -3546,7 +3546,7 @@ static void Msg_WriteMsgTo (long MsgCod)
Tbl_EndCell ();
/* Put user's photo */
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\" style=\"width:30px;\">");
Tbl_StartCellAttr ("class=\"CENTER_TOP\" style=\"width:30px;\"");
ShowPhoto = (UsrValid ? Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL) :
false);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
@ -3555,9 +3555,8 @@ static void Msg_WriteMsgTo (long MsgCod)
Tbl_EndCell ();
/* Write user's name */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE\">",
OpenByDst ? "AUTHOR_TXT" :
"AUTHOR_TXT_NEW");
Tbl_StartCellAttr ("class=\"%s LEFT_MIDDLE\"",OpenByDst ? "AUTHOR_TXT" :
"AUTHOR_TXT_NEW");
if (UsrValid)
fprintf (Gbl.F.Out,"%s",UsrDat.FullName);
else
@ -3573,7 +3572,7 @@ static void Msg_WriteMsgTo (long MsgCod)
/***** Start form to show all the users *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"AUTHOR_TXT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("colspan=\"3\" class=\"AUTHOR_TXT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"[%u %s]",
NumRecipientsUnknown,
(NumRecipientsUnknown == 1) ? Txt_unknown_recipient :
@ -3589,7 +3588,7 @@ static void Msg_WriteMsgTo (long MsgCod)
/***** Start form to show all the users *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"AUTHOR_TXT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("colspan=\"3\" class=\"AUTHOR_TXT LEFT_MIDDLE\"");
Frm_StartForm (ActionSee[Gbl.Msg.TypeOfMessages]);
Gbl.Msg.MsgCod = MsgCod; // Message to be expanded with all recipients visible
Msg_PutHiddenParamsOneMsg ();
@ -3628,8 +3627,8 @@ void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground)
UniqueId++;
/***** Start cell *****/
fprintf (Gbl.F.Out,"<td id=\"msg_date_%u\" class=\"%s RIGHT_TOP\" style=\"width:106px;\">",
UniqueId,ClassBackground);
Tbl_StartCellAttr ("id=\"msg_date_%u\" class=\"%s RIGHT_TOP\" style=\"width:106px;\"",
UniqueId,ClassBackground);
/***** Write date and time *****/
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
@ -3877,7 +3876,7 @@ void Msg_ListBannedUsrs (void)
Tbl_StartRow ();
/* Put form to unban user */
fprintf (Gbl.F.Out,"<td class=\"BM\">");
Tbl_StartCellAttr ("class=\"BM\"");
Frm_StartForm (ActUnbUsrLst);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
@ -3885,7 +3884,7 @@ void Msg_ListBannedUsrs (void)
Tbl_EndCell ();
/* Show photo */
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\" style=\"width:30px;\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\" style=\"width:30px;\"");
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL,
@ -3893,7 +3892,7 @@ void Msg_ListBannedUsrs (void)
Tbl_EndCell ();
/* Write user's full name */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"%s",UsrDat.FullName);
Tbl_EndCell ();

View File

@ -325,7 +325,7 @@ void Net_ShowFormMyWebsAndSocialNets (void)
/***** Row for this web / social network *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"URL%u\" class=\"%s\">"
"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
@ -340,7 +340,7 @@ void Net_ShowFormMyWebsAndSocialNets (void)
Net_WebsAndSocialNetworksTitle[NumURL]);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"url\" id=\"URL%u\" name=\"URL%u\""
" maxlength=\"%u\" value=\"%s\""
" class=\"REC_C2_BOT_INPUT\" />",
@ -594,7 +594,7 @@ void Net_ShowWebAndSocialNetworksStats (void)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\""
@ -606,11 +606,11 @@ void Net_ShowWebAndSocialNetworksStats (void)
Net_WebsAndSocialNetworksTitle[Web]);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"%u",NumUsrs);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"%.2f%%",
NumUsrsTotal ? 100.0 * (float) NumUsrs / (float) NumUsrsTotal :
0.0);

View File

@ -272,7 +272,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
if (NumNick == 1)
{
/* The first nickname is the current one */
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"Nick\" class=\"%s\">"
"%s:"
"</label>",
@ -280,14 +280,14 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
Txt_Current_nickname);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_TOP USR_ID\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP USR_ID\"");
}
else // NumNick >= 2
{
if (NumNick == 2)
{
fprintf (Gbl.F.Out,"<td rowspan=\"%u\" class=\"REC_C1_BOT RIGHT_TOP\">",
NumNicks - 1);
Tbl_StartCellAttr ("rowspan=\"%u\" class=\"REC_C1_BOT RIGHT_TOP\"",
NumNicks - 1);
fprintf (Gbl.F.Out,"<label for=\"Nick\" class=\"%s\">"
"%s:"
"</label>",
@ -296,7 +296,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
Tbl_EndCell ();
}
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_TOP DAT\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP DAT\"");
/* Form to remove old nickname */
if (ItsMe)
@ -371,7 +371,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
/***** Form to enter new nickname *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_TOP\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_TOP\"");
fprintf (Gbl.F.Out,"<label for=\"NewNick\" class=\"%s\">"
"%s:"
"</label>",
@ -380,7 +380,7 @@ static void Nck_ShowFormChangeUsrNickname (const struct UsrData *UsrDat,bool Its
Txt_Nickname); // The first nickname
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_TOP DAT\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_TOP DAT\"");
if (ItsMe)
Frm_StartFormAnchor (ActChgMyNck,Nck_NICKNAME_SECTION_ID);
else

View File

@ -493,8 +493,8 @@ void Ntf_ShowMyNotifications (void)
/***** Write row for this notification *****/
/* Write event icon */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\" style=\"width:25px;\">",
ClassBackground);
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\" style=\"width:25px;\"",ClassBackground);
if (PutLink)
PutLink = Ntf_StartFormGoToAction (NotifyEvent,Crs.CrsCod,&UsrDat,Cod);
@ -510,7 +510,7 @@ void Ntf_ShowMyNotifications (void)
Tbl_EndCell ();
/* Write event type */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassBackground);
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",ClassBackground);
if (PutLink)
PutLink = Ntf_StartFormGoToAction (NotifyEvent,Crs.CrsCod,&UsrDat,Cod);
@ -527,12 +527,12 @@ void Ntf_ShowMyNotifications (void)
Tbl_EndCell ();
/* Write user (from) */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassAuthorBg);
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",ClassAuthorBg);
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
Tbl_EndCell ();
/* Write location */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassBackground);
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",ClassBackground);
if (NotifyEvent == Ntf_EVENT_FORUM_POST_COURSE ||
NotifyEvent == Ntf_EVENT_FORUM_REPLY)
{
@ -587,7 +587,7 @@ void Ntf_ShowMyNotifications (void)
Msg_WriteMsgDate (DateTimeUTC,ClassBackground);
/* Write status (sent by email / pending to be sent by email) */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassBackground);
Tbl_StartCellAttr ("class=\"%s LEFT_TOP\"",ClassBackground);
fprintf (Gbl.F.Out,"%s",Txt_NOTIFICATION_STATUS[StatusTxt]);
Tbl_EndCell ();
@ -603,11 +603,10 @@ void Ntf_ShowMyNotifications (void)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"2\">");
Tbl_StartCellAttr ("colspan=\"2\"");
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td colspan=\"4\" class=\"DAT LEFT_TOP\""
" style=\"padding-bottom:12px;\">");
Tbl_StartCellAttr ("colspan=\"4\" class=\"DAT LEFT_TOP\" style=\"padding-bottom:12px;\"");
fprintf (Gbl.F.Out,"%s",SummaryStr);
Tbl_EndCell ();
@ -1962,11 +1961,11 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
{
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE\">",The_ClassFormInBox[Gbl.Prefs.Theme]);
Tbl_StartCellAttr ("class=\"%s RIGHT_MIDDLE\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s:",Txt_NOTIFY_EVENTS_PLURAL[NotifyEvent]);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"%s\" value=\"Y\"",
Ntf_ParamNotifMeAboutNotifyEvents[NotifyEvent]);
if ((Gbl.Usrs.Me.UsrDat.NtfEvents.CreateNotif & (1 << NotifyEvent)))
@ -1974,7 +1973,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
fprintf (Gbl.F.Out," />");
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"CENTER_MIDDLE\">");
Tbl_StartCellAttr ("class=\"CENTER_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"checkbox\" name=\"%s\" value=\"Y\"",
Ntf_ParamEmailMeAboutNotifyEvents[NotifyEvent]);
if ((Gbl.Usrs.Me.UsrDat.NtfEvents.SendEmail & (1 << NotifyEvent)))

View File

@ -687,13 +687,13 @@ void Pwd_ShowFormChgMyPwd (void)
{
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"UsrPwd\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Current_password);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"password\""
" id=\"UsrPwd\" name=\"UsrPwd\""
" size=\"18\" maxlength=\"%u\""
@ -706,7 +706,7 @@ void Pwd_ShowFormChgMyPwd (void)
/***** Help message *****/
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td colspan=\"2\">");
Tbl_StartCellAttr ("colspan=\"2\"");
Ale_ShowAlert (Ale_INFO,Txt_Your_password_must_be_at_least_X_characters_and_can_not_contain_spaces_,
Pwd_MIN_CHARS_PLAIN_PASSWORD);
Tbl_EndCell ();
@ -740,13 +740,13 @@ void Pwd_PutFormToGetNewPasswordOnce (void)
Tbl_StartRow ();
/***** Start form element ****/
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Passwd\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Password);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Passwd\" name=\"Paswd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"",
Pwd_MAX_CHARS_PLAIN_PASSWORD);
@ -777,21 +777,20 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Start form element */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Paswd1\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_New_password);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Paswd1\" name=\"Paswd1\""
" size=\"18\" maxlength=\"%u\""
" placeholder=\"",
Pwd_MAX_CHARS_PLAIN_PASSWORD);
/* Placeholder */
fprintf (Gbl.F.Out,Txt_HELP_password,
Pwd_MIN_CHARS_PLAIN_PASSWORD);
fprintf (Gbl.F.Out,Txt_HELP_password,Pwd_MIN_CHARS_PLAIN_PASSWORD);
/* End form element */
fprintf (Gbl.F.Out,"\" required=\"required\" />");
@ -803,13 +802,13 @@ void Pwd_PutFormToGetNewPasswordTwice (void)
/* Start form element */
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"REC_C1_BOT RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C1_BOT RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Paswd2\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_Retype_new_password);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"REC_C2_BOT LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"REC_C2_BOT LEFT_MIDDLE\"");
fprintf (Gbl.F.Out,"<input type=\"password\" id=\"Paswd2\" name=\"Paswd2\""
" size=\"18\" maxlength=\"%u\""
" placeholder=\"",

View File

@ -897,7 +897,7 @@ static void Pho_UpdatePhoto2 (void)
NumPhoto < 3;
NumPhoto++)
{
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP\" style=\"width:33%%;\">");
Tbl_StartCellAttr ("class=\"DAT CENTER_TOP\" style=\"width:33%%;\"");
fprintf (Gbl.F.Out,"<img src=\"%s/%s_paso%u.jpg\""
" alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;\" />"
@ -1790,12 +1790,12 @@ static void Pho_PutSelectorForTypeOfAvg (void)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"AvgType\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Average_type);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartForm (ActSeePhoDeg);
Pho_PutHiddenParamPhotoSize ();
Pho_PutHiddenParamOrderDegrees ();
@ -1854,12 +1854,12 @@ static void Pho_PutSelectorForHowComputePhotoSize (void)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"PhotoSize\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Size_of_photos);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartForm (ActSeePhoDeg);
Pho_PutHiddenParamTypeOfAvg ();
Pho_PutHiddenParamOrderDegrees ();
@ -1918,12 +1918,12 @@ static void Pho_PutSelectorForHowOrderDegrees (void)
Tbl_StartRow ();
fprintf (Gbl.F.Out,"<td class=\"RIGHT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"RIGHT_MIDDLE\"");
fprintf (Gbl.F.Out,"<label for=\"Order\" class=\"%s\">%s:</label>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Sort_degrees_by);
Tbl_EndCell ();
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">");
Tbl_StartCellAttr ("class=\"LEFT_MIDDLE\"");
Frm_StartForm (ActSeePhoDeg);
Pho_PutHiddenParamTypeOfAvg ();
Pho_PutHiddenParamPhotoSize ();
@ -2161,7 +2161,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin
}
/***** Show average photo of students belonging to this degree *****/
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_MIDDLE\">");
Tbl_StartCellAttr ("class=\"CLASSPHOTO CENTER_MIDDLE\"");
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Usr_SEX_ALL,NumStds,NumStdsWithPhoto);
Tbl_EndCell ();
@ -2252,12 +2252,12 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
Tbl_StartRow ();
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT RIGHT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"%u",++NumDegsNotEmpty);
Tbl_EndCell ();
/***** Show logo and name of this degree *****/
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"DAT LEFT_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (SeeOrPrint == Pho_DEGREES_SEE)
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,
"DAT","CENTER_TOP");
@ -2274,7 +2274,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
{
/***** Show average photo of students belonging to this degree *****/
Pho_GetNumStdsInDegree (Deg.DegCod,Sex,&NumStds,&NumStdsWithPhoto);
fprintf (Gbl.F.Out,"<td class=\"CLASSPHOTO CENTER_MIDDLE COLOR%u\">",Gbl.RowEvenOdd);
Tbl_StartCellAttr ("class=\"CLASSPHOTO CENTER_MIDDLE COLOR%u\"",Gbl.RowEvenOdd);
if (Gbl.Usrs.Listing.WithPhotos)
Pho_ShowDegreeAvgPhotoAndStat (&Deg,SeeOrPrint,Sex,NumStds,NumStdsWithPhoto);
else