Version19.42.1

This commit is contained in:
Antonio Cañas Vargas 2019-10-23 20:07:56 +02:00
parent a1feb04c56
commit d3ab3b9297
64 changed files with 769 additions and 628 deletions

View File

@ -442,3 +442,12 @@ void HTM_TD_ColouredEmpty (unsigned NumColumns)
HTM_TD_End (); HTM_TD_End ();
} }
} }
/*****************************************************************************/
/************************************ Divs ***********************************/
/*****************************************************************************/
void HTM_DIV_End (void)
{
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -62,4 +62,6 @@ void HTM_TD_End (void);
void HTM_TD_Empty (unsigned NumColumns); void HTM_TD_Empty (unsigned NumColumns);
void HTM_TD_ColouredEmpty (unsigned NumColumns); void HTM_TD_ColouredEmpty (unsigned NumColumns);
void HTM_DIV_End (void);
#endif #endif

View File

@ -35,6 +35,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_MFU.h" #include "swad_MFU.h"
#include "swad_tab.h" #include "swad_tab.h"
#include "swad_theme.h" #include "swad_theme.h"
@ -255,7 +256,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
} }
/***** End box *****/ /***** End box *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
} }
@ -319,7 +320,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
fprintf (Gbl.F.Out,"</ul>"); fprintf (Gbl.F.Out,"</ul>");
/***** End div *****/ /***** End div *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -27,6 +27,7 @@
#include "swad_action.h" #include "swad_action.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_ID.h" #include "swad_ID.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_QR.h" #include "swad_QR.h"
@ -109,14 +110,14 @@ void QR_ImageQRCode (const char *QRString)
"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s\"" "<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;" " style=\"width:%upx; height:%upx;"
" border:1px dashed silver;\" />" " border:1px dashed silver;\" />",
"</div>",
QR_CODE_SIZE, QR_CODE_SIZE,
QR_CODE_SIZE,QR_CODE_SIZE, QR_CODE_SIZE,QR_CODE_SIZE,
QRString, QRString,
QRString, QRString,
QRString, QRString,
QR_CODE_SIZE,QR_CODE_SIZE); QR_CODE_SIZE,QR_CODE_SIZE);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -152,10 +153,10 @@ void QR_ExamAnnnouncement (void)
fprintf (Gbl.F.Out,"<div class=\"CM\">" fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?crs=%ld%%26act=%ld\"" "<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?crs=%ld%%26act=%ld\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" style=\"width:250px; height:250px;\" />" " style=\"width:250px; height:250px;\" />",
"</div>",
300,300, 300,300,
Cfg_URL_SWAD_CGI,Gbl.Hierarchy.Crs.CrsCod,Act_GetActCod (ActSeeAllExaAnn), Cfg_URL_SWAD_CGI,Gbl.Hierarchy.Crs.CrsCod,Act_GetActCod (ActSeeAllExaAnn),
Txt_Link_to_announcement_of_exam, Txt_Link_to_announcement_of_exam,
Txt_Link_to_announcement_of_exam); Txt_Link_to_announcement_of_exam);
HTM_DIV_End ();
} }

View File

@ -120,7 +120,7 @@ void Acc_ShowFormMyAccount (void)
Usr_PutLinkToLogin (); Usr_PutLinkToLogin ();
Pwd_PutLinkToSendNewPasswd (); Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage (); Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/**** Show form to check if I have an account *****/ /**** Show form to check if I have an account *****/
Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered); Acc_ShowFormCheckIfIHaveAccount (Txt_Before_creating_a_new_account_check_if_you_have_been_already_registered);
@ -193,7 +193,7 @@ void Acc_CheckIfEmptyAccountExists (void)
Usr_PutLinkToLogin (); Usr_PutLinkToLogin ();
Pwd_PutLinkToSendNewPasswd (); Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage (); Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Get new user's ID from form *****/ /***** Get new user's ID from form *****/
Par_GetParToText ("ID",ID,ID_MAX_BYTES_USR_ID); Par_GetParToText ("ID",ID,ID_MAX_BYTES_USR_ID);
@ -329,7 +329,7 @@ void Acc_ShowFormCreateMyAccount (void)
Usr_PutLinkToLogin (); Usr_PutLinkToLogin ();
Pwd_PutLinkToSendNewPasswd (); Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage (); Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/**** Show form to create a new account *****/ /**** Show form to create a new account *****/
Acc_ShowFormRequestNewAccountWithParams ("",""); Acc_ShowFormRequestNewAccountWithParams ("","");
@ -492,16 +492,16 @@ void Acc_ShowFormChgMyAccount (void)
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Pwd_ShowFormChgMyPwd (); Pwd_ShowFormChgMyPwd ();
Nck_ShowFormChangeMyNickname (IMustCreateMyNicknameNow); Nck_ShowFormChangeMyNickname (IMustCreateMyNicknameNow);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show form to change my email and my ID *****/ /***** Show form to change my email and my ID *****/
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Mai_ShowFormChangeMyEmail (IMustFillInMyEmailNow,IShouldConfirmMyEmailNow); Mai_ShowFormChangeMyEmail (IMustFillInMyEmailNow,IShouldConfirmMyEmailNow);
ID_ShowFormChangeMyID (IShouldFillInMyIDNow); ID_ShowFormChangeMyID (IShouldFillInMyIDNow);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start container for this user *****/ /***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -531,16 +531,16 @@ void Acc_ShowFormChgOtherUsrAccount (void)
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Pwd_ShowFormChgOtherUsrPwd (); Pwd_ShowFormChgOtherUsrPwd ();
Nck_ShowFormChangeOtherUsrNickname (); Nck_ShowFormChangeOtherUsrNickname ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show form to change email and ID *****/ /***** Show form to change email and ID *****/
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Mai_ShowFormChangeOtherUsrEmail (); Mai_ShowFormChangeOtherUsrEmail ();
ID_ShowFormChangeOtherUsrID (); ID_ShowFormChangeOtherUsrID ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start container for this user *****/ /***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission (); Ale_ShowAlertUserNotFoundOrYouDoNotHavePermission ();

View File

@ -205,7 +205,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
Ico_PutSettingIconLink (Icon[PstFut], Ico_PutSettingIconLink (Icon[PstFut],
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]); Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -241,7 +241,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
Ico_PutSettingIconLink (Icon[PrvPub], Ico_PutSettingIconLink (Icon[PrvPub],
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]); Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -277,7 +277,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
Ico_PutSettingIconLink (Icon[HidVis], Ico_PutSettingIconLink (Icon[HidVis],
Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]); Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -772,10 +772,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
/* Location */ /* Location */
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
AgdEvent.Hidden ? "ASG_TITLE_LIGHT" : AgdEvent.Hidden ? "ASG_TITLE_LIGHT" :
"ASG_TITLE", "ASG_TITLE",
AgdEvent.Location); AgdEvent.Location);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -803,10 +805,12 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
AgdEvent.Hidden ? "DAT_LIGHT" : AgdEvent.Hidden ? "DAT_LIGHT" :
"DAT", "DAT",
Txt); Txt);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();

View File

@ -35,6 +35,7 @@
#include "swad_alert.h" #include "swad_alert.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -416,26 +417,28 @@ static void Ale_ShowFixAlertAndButton1 (Ale_AlertType_t AlertType,const char *Tx
/***** Icon to close the alert *****/ /***** Icon to close the alert *****/
if (AlertClosable[AlertType]) if (AlertClosable[AlertType])
{
fprintf (Gbl.F.Out,"<div class=\"ALERT_CLOSE\">" fprintf (Gbl.F.Out,"<div class=\"ALERT_CLOSE\">"
"<a href=\"\"" "<a href=\"\""
" onclick=\"toggleDisplay('%s');return false;\" />" " onclick=\"toggleDisplay('%s');return false;\" />"
"<img src=\"%s/close.svg\"" "<img src=\"%s/close.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />"
"</a>" "</a>",
"</div>",
IdAlert, IdAlert,
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Close,Txt_Close); Txt_Close,Txt_Close);
HTM_DIV_End ();
}
/***** Write message *****/ /***** Write message *****/
fprintf (Gbl.F.Out,"<div class=\"ALERT_TXT\""); fprintf (Gbl.F.Out,"<div class=\"ALERT_TXT\"");
if (AlertType != Ale_NONE) if (AlertType != Ale_NONE)
fprintf (Gbl.F.Out," style=\"background-image:url('%s/%s');\"", fprintf (Gbl.F.Out," style=\"background-image:url('%s/%s');\"",
Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]); Cfg_URL_ICON_PUBLIC,Ale_AlertIcons[AlertType]);
fprintf (Gbl.F.Out,">%s" fprintf (Gbl.F.Out,">%s",
"</div>",
Txt); Txt);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -465,8 +468,8 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
} }
/***** End box *****/ /***** End box *****/
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -260,7 +260,7 @@ void Ann_ShowMyAnnouncementsNotMarkedAsSeen (void)
0,false,false); 0,false,false);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -324,12 +324,16 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
} }
/***** Write the subject of the announcement *****/ /***** Write the subject of the announcement *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
SubjectClass[Status],Subject); SubjectClass[Status],Subject);
HTM_DIV_End ();
/***** Write the content of the announcement *****/ /***** Write the content of the announcement *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
ContentClass[Status],Content); ContentClass[Status],Content);
HTM_DIV_End ();
/***** Write form *****/ /***** Write form *****/
fprintf (Gbl.F.Out,"<div class=\"NOTICE_USERS %s\">",UsersClass[Status]); fprintf (Gbl.F.Out,"<div class=\"NOTICE_USERS %s\">",UsersClass[Status]);
@ -356,10 +360,10 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
"close.svg", "close.svg",
Txt_Do_not_show_again); Txt_Do_not_show_again);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End yellow note *****/ /***** End yellow note *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -443,10 +443,12 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
if (Gbl.Crs.Grps.NumGrps) if (Gbl.Crs.Grps.NumGrps)
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg); Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
Asg.Hidden ? "DAT_LIGHT" : Asg.Hidden ? "DAT_LIGHT" :
"DAT", "DAT",
Txt); Txt);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1665,7 +1667,7 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Assignment *Asg)
fprintf (Gbl.F.Out,"%s %s", fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);

View File

@ -174,14 +174,14 @@ void Att_SeeAttEvents (void)
case Rol_STD: case Rol_STD:
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Att_PutFormToListMyAttendance (); Att_PutFormToListMyAttendance ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
case Rol_NET: case Rol_NET:
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Att_PutFormToListStdsAttendance (); Att_PutFormToListStdsAttendance ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -481,10 +481,12 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("colspan=\"2\" class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
if (Gbl.Crs.Grps.NumGrps) if (Gbl.Crs.Grps.NumGrps)
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att); Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att);
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
Att->Hidden ? "DAT_LIGHT" : Att->Hidden ? "DAT_LIGHT" :
"DAT", "DAT",
Description); Description);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1562,7 +1564,7 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve
fprintf (Gbl.F.Out,"%s %s", fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -3431,7 +3433,7 @@ static void Att_PutCheckOrCross (bool Present)
"&cross;", "&cross;",
Txt_Absent); Txt_Absent);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1059,7 +1059,7 @@ void Ban_WriteMenuWithBanners (void)
Gbl.Banners.Lst[NumBan].ShrtName, Gbl.Banners.Lst[NumBan].ShrtName,
Gbl.Banners.Lst[NumBan].FullName); Gbl.Banners.Lst[NumBan].FullName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Free list of banners *****/ /***** Free list of banners *****/

View File

@ -162,7 +162,7 @@ static void Box_StartBoxInternal (const char *Width,const char *Title,
{ {
fprintf (Gbl.F.Out,"<div class=\"FRAME_ICO_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_ICO_LEFT\">");
FunctionToDrawContextualIcons (); FunctionToDrawContextualIcons ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* Icons at right: help and close */ /* Icons at right: help and close */
@ -187,19 +187,21 @@ static void Box_StartBoxInternal (const char *Width,const char *Title,
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End row for left and right icons *****/ /***** End row for left and right icons *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Frame title *****/ /***** Frame title *****/
if (Title) if (Title)
{
fprintf (Gbl.F.Out,"<div class=\"FRAME_TITLE %s\">" fprintf (Gbl.F.Out,"<div class=\"FRAME_TITLE %s\">"
"%s" "%s",
"</div>",
Gbl.Box.Nested ? "FRAME_TITLE_SMALL" : Gbl.Box.Nested ? "FRAME_TITLE_SMALL" :
"FRAME_TITLE_BIG", "FRAME_TITLE_BIG",
Title); Title);
HTM_DIV_End ();
}
} }
void Box_EndBoxTable (void) void Box_EndBoxTable (void)
@ -231,8 +233,8 @@ void Box_EndBox (void)
free (Gbl.Box.Ids[Gbl.Box.Nested]); free (Gbl.Box.Ids[Gbl.Box.Nested]);
/***** End box and box container *****/ /***** End box and box container *****/
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</div>"); HTM_DIV_End ();
/***** Decrease level of nesting *****/ /***** Decrease level of nesting *****/
Gbl.Box.Nested--; Gbl.Box.Nested--;

View File

@ -29,6 +29,7 @@
#include "swad_button.h" #include "swad_button.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
/*****************************************************************************/ /*****************************************************************************/
/************** External global variables from others modules ****************/ /************** External global variables from others modules ****************/
@ -101,9 +102,9 @@ void Btn_PutCreateButton (const char *TxtButton)
fprintf (Gbl.F.Out,"<div class=\"CM\">" fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_CREATE\">" "<button type=\"submit\" class=\"BT_SUBMIT BT_CREATE\">"
"%s" "%s"
"</button>" "</button>",
"</div>",
TxtButton); TxtButton);
HTM_DIV_End ();
} }
void Btn_PutCreateButtonInline (const char *TxtButton) void Btn_PutCreateButtonInline (const char *TxtButton)
@ -119,9 +120,9 @@ void Btn_PutConfirmButton (const char *TxtButton)
fprintf (Gbl.F.Out,"<div class=\"CM\">" fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_CONFIRM\">" "<button type=\"submit\" class=\"BT_SUBMIT BT_CONFIRM\">"
"%s" "%s"
"</button>" "</button>",
"</div>",
TxtButton); TxtButton);
HTM_DIV_End ();
} }
void Btn_PutConfirmButtonInline (const char *TxtButton) void Btn_PutConfirmButtonInline (const char *TxtButton)
@ -137,9 +138,9 @@ void Btn_PutRemoveButton (const char *TxtButton)
fprintf (Gbl.F.Out,"<div class=\"CM\">" fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\">" "<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\">"
"%s" "%s"
"</button>" "</button>",
"</div>",
TxtButton); TxtButton);
HTM_DIV_End ();
} }
void Btn_PutRemoveButtonInline (const char *TxtButton) void Btn_PutRemoveButtonInline (const char *TxtButton)
@ -149,15 +150,3 @@ void Btn_PutRemoveButtonInline (const char *TxtButton)
"</button>", "</button>",
TxtButton); TxtButton);
} }
/*
void Btn_PutCloseTabButton (const char *TxtButton)
{
fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<button type=\"submit\" class=\"BT_SUBMIT BT_REMOVE\""
" onclick=\"window.close();\">"
"%s"
"</button>"
"</div>",
TxtButton);
}
*/

View File

@ -33,6 +33,7 @@
#include "swad_exam.h" #include "swad_exam.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_setting.h" #include "swad_setting.h"
@ -131,7 +132,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (vo
FirstDayOfWeek); FirstDayOfWeek);
Ico_PutSettingIconLink (Icon,Gbl.Title); Ico_PutSettingIconLink (Icon,Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -209,8 +210,8 @@ void Cal_DrawCurrentMonth (void)
/***** Draw the month in JavaScript *****/ /***** Draw the month in JavaScript *****/
/* JavaScript will write HTML here */ /* JavaScript will write HTML here */
fprintf (Gbl.F.Out,"<div id=\"CurrentMonth\">" fprintf (Gbl.F.Out,"<div id=\"CurrentMonth\">");
"</div>"); HTM_DIV_End ();
/* Write script to draw the month */ /* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">" fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
@ -277,8 +278,8 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
/***** Draw several months *****/ /***** Draw several months *****/
/* JavaScript will write HTML here */ /* JavaScript will write HTML here */
fprintf (Gbl.F.Out,"<div id=\"calendar\">" fprintf (Gbl.F.Out,"<div id=\"calendar\">");
"</div>"); HTM_DIV_End ();
/* Write script to draw the month */ /* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">" fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"

View File

@ -343,7 +343,7 @@ static void Ctr_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ctr.FullName); fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ctr.FullName);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Centre photo *****/ /***** Centre photo *****/
if (PhotoExists) if (PhotoExists)
@ -369,7 +369,7 @@ static void Ctr_Configuration (bool PrintView)
"CENTRE_PHOTO_SHOW"); "CENTRE_PHOTO_SHOW");
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Photo attribution */ /* Photo attribution */
if (!PrintView && if (!PrintView &&
@ -387,13 +387,15 @@ static void Ctr_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",PhotoAttribution); fprintf (Gbl.F.Out,"%s",PhotoAttribution);
fprintf (Gbl.F.Out,"</textarea>"); fprintf (Gbl.F.Out,"</textarea>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else if (PhotoAttribution) else if (PhotoAttribution)
{
fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">" fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">"
"%s" "%s",
"</div>",
PhotoAttribution); PhotoAttribution);
HTM_DIV_End ();
}
/* Free memory used for photo attribution */ /* Free memory used for photo attribution */
Ctr_FreePhotoAttribution (&PhotoAttribution); Ctr_FreePhotoAttribution (&PhotoAttribution);
@ -584,13 +586,15 @@ static void Ctr_Configuration (bool PrintView)
Frm_EndForm (); Frm_EndForm ();
} }
else // I can not change centre WWW else // I can not change centre WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">" fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">" "<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Gbl.Hierarchy.Ctr.WWW, Gbl.Hierarchy.Ctr.WWW,
Gbl.Hierarchy.Ctr.WWW); Gbl.Hierarchy.Ctr.WWW);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1606,9 +1610,9 @@ static void Ctr_ListCentresForEdition (void)
"<a href=\"%s\" target=\"_blank\"" "<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">" " class=\"DAT\" title=\"%s\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Ctr->WWW,Ctr->WWW,WWW); Ctr->WWW,Ctr->WWW,WWW);
HTM_DIV_End ();
} }
HTM_TD_End (); HTM_TD_End ();

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.42 (2019-10-23)" #define Log_PLATFORM_VERSION "SWAD 19.42.1 (2019-10-23)"
#define CSS_FILE "swad19.41.3.css" #define CSS_FILE "swad19.41.3.css"
#define JS_FILE "swad19.39.js" #define JS_FILE "swad19.39.js"
/* /*
@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf
// 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.)
// TODO: Change icon to upload file in timeline to photo-video.svg // TODO: Change icon to upload file in timeline to photo-video.svg
Version 19.42.1: Oct 23, 2019 Code refactoring in HTML divs. (246088 lines)
Version 19.42: Oct 23, 2019 Module swad_table is renamed as swad_HTML. (245956 lines) Version 19.42: Oct 23, 2019 Module swad_table is renamed as swad_HTML. (245956 lines)
Version 19.41.4: Oct 23, 2019 Number of cols in match in range [1...4]. (245955 lines) Version 19.41.4: Oct 23, 2019 Number of cols in match in range [1...4]. (245955 lines)
Version 19.41.3: Oct 23, 2019 Changes in layout of matches. (245952 lines) Version 19.41.3: Oct 23, 2019 Changes in layout of matches. (245952 lines)

View File

@ -28,8 +28,8 @@
/** Uncomment one of the following installations of SWAD or create your own **/ /** Uncomment one of the following installations of SWAD or create your own **/
/*****************************************************************************/ /*****************************************************************************/
//#define LOCALHOST_UBUNTU // Comment this line if not applicable #define LOCALHOST_UBUNTU // Comment this line if not applicable
#define OPENSWAD_ORG // Comment this line if not applicable //#define OPENSWAD_ORG // Comment this line if not applicable
//#define SWAD_UGR_ES // Comment this line if not applicable //#define SWAD_UGR_ES // Comment this line if not applicable
//#define SWADBERRY_UGR_ES // Comment this line if not applicable //#define SWADBERRY_UGR_ES // Comment this line if not applicable

View File

@ -88,7 +88,7 @@ void Con_ShowConnectedUsrs (void)
{ {
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Sta_PutLinkToLastClicks (); Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Get scope *****/ /***** Get scope *****/
@ -195,11 +195,11 @@ void Con_ShowGlobalConnectedUsrs (void)
Role++) Role++)
Con_ShowGlobalConnectedUsrsRole (Role,NumUsrs[Role]); Con_ShowGlobalConnectedUsrsRole (Role,NumUsrs[Role]);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Container end *****/ /***** Container end *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
static void Con_ShowGlobalConnectedUsrsRole (Rol_Role_t Role,unsigned UsrsTotal) static void Con_ShowGlobalConnectedUsrsRole (Rol_Role_t Role,unsigned UsrsTotal)
@ -277,7 +277,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void)
Sco_PutSelectorScope ("ScopeCon",true); Sco_PutSelectorScope ("ScopeCon",true);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Number of teachers and students *****/ /***** Number of teachers and students *****/
HTM_TABLE_Begin ("CONNECTED_LIST"); HTM_TABLE_Begin ("CONNECTED_LIST");
@ -292,7 +292,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void)
Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs (); Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -338,7 +338,7 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
HTM_TABLE_End (); HTM_TABLE_End ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -851,8 +851,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"<div class=\"CON_NAME_NARROW\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"CON_NAME_NARROW\">"); // Limited width
Frm_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font); Frm_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();
@ -863,7 +863,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"<div id=\"hm%u\">", fprintf (Gbl.F.Out,"<div id=\"hm%u\">",
Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column
Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff); Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff);
fprintf (Gbl.F.Out,"</div>"); // Used for automatic update, only when displayed on right column HTM_DIV_End (); // Used for automatic update, only when displayed on right column
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1069,7 +1069,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
Usr_WriteFirstNameBRSurnames (&UsrDat); Usr_WriteFirstNameBRSurnames (&UsrDat);
if (PutLinkToRecord) if (PutLinkToRecord)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
if (PutLinkToRecord) if (PutLinkToRecord)
Frm_EndForm (); Frm_EndForm ();
HTM_TD_End (); HTM_TD_End ();

View File

@ -30,6 +30,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_setting.h" #include "swad_setting.h"
@ -91,7 +92,7 @@ void Coo_EditMyPrefsOnCookies (void)
Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites); Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites);
/* End container */ /* End container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End table and box *****/ /***** End table and box *****/
Box_EndBoxTable (); Box_EndBoxTable ();

View File

@ -272,7 +272,7 @@ static void Cty_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); fprintf (Gbl.F.Out,"%s",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Country map (and link to WWW if exists) *****/ /***** Country map (and link to WWW if exists) *****/
if (Cty_CheckIfCountryMapExists (&Gbl.Hierarchy.Cty)) if (Cty_CheckIfCountryMapExists (&Gbl.Hierarchy.Cty))
@ -289,7 +289,7 @@ static void Cty_Configuration (bool PrintView)
"COUNTRY_MAP_SHOW"); "COUNTRY_MAP_SHOW");
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Map attribution */ /* Map attribution */
if (!PrintView && Cty_CheckIfICanEditCountries ()) if (!PrintView && Cty_CheckIfICanEditCountries ())
@ -304,13 +304,15 @@ static void Cty_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"%s",MapAttribution); fprintf (Gbl.F.Out,"%s",MapAttribution);
fprintf (Gbl.F.Out,"</textarea>"); fprintf (Gbl.F.Out,"</textarea>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else if (MapAttribution) else if (MapAttribution)
{
fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">" fprintf (Gbl.F.Out,"<div class=\"ATTRIBUTION\">"
"%s" "%s",
"</div>",
MapAttribution); MapAttribution);
HTM_DIV_End ();
}
/* Free memory used for map attribution */ /* Free memory used for map attribution */
Cty_FreeMapAttribution (&MapAttribution); Cty_FreeMapAttribution (&MapAttribution);
@ -630,7 +632,10 @@ void Cty_ListCountries2 (void)
/***** Div for Google Geochart *****/ /***** Div for Google Geochart *****/
if (Gbl.Action.Act == ActSeeCty) if (Gbl.Action.Act == ActSeeCty)
fprintf (Gbl.F.Out,"<div id=\"chart_div\"></div>"); {
fprintf (Gbl.F.Out,"<div id=\"chart_div\">");
HTM_DIV_End ();
}
/***** Free list of countries *****/ /***** Free list of countries *****/
Cty_FreeListCountries (); Cty_FreeListCountries ();
@ -826,10 +831,10 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action,
Str_Copy (CountryName,Cty->Name[Gbl.Prefs.Language], Str_Copy (CountryName,Cty->Name[Gbl.Prefs.Language],
Cty_MAX_BYTES_NAME); Cty_MAX_BYTES_NAME);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;(%s)" fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;(%s)"
"</a>" "</a>",
"</div>",
CountryName, CountryName,
Cty->Alpha2); Cty->Alpha2);
HTM_DIV_End ();
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();

View File

@ -147,7 +147,7 @@ void Crs_ShowIntroduction (void)
/***** Course configuration *****/ /***** Course configuration *****/
fprintf (Gbl.F.Out,"<div class=\"CM\">"); fprintf (Gbl.F.Out,"<div class=\"CM\">");
Crs_Configuration (false); Crs_Configuration (false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Course introduction *****/ /***** Course introduction *****/
Inf_ShowInfo (); Inf_ShowInfo ();
@ -206,7 +206,7 @@ static void Crs_Configuration (bool PrintView)
{ {
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Enr_PutLinkToRequestSignUp (); Enr_PutLinkToRequestSignUp ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -230,9 +230,9 @@ static void Crs_Configuration (bool PrintView)
Gbl.Hierarchy.Deg.ShrtName,64,NULL,true); Gbl.Hierarchy.Deg.ShrtName,64,NULL,true);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"<br />%s" fprintf (Gbl.F.Out,"<br />%s",
"</div>",
Gbl.Hierarchy.Crs.FullName); Gbl.Hierarchy.Crs.FullName);
HTM_DIV_End ();
/***** Begin table *****/ /***** Begin table *****/
HTM_TABLE_BeginWidePadding (2); HTM_TABLE_BeginWidePadding (2);

View File

@ -320,7 +320,7 @@ void Dat_ShowClientLocalTime (void)
"</span>" "</span>"
"</a>"); "</a>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Day with link to agenda (if I am logged) */ /* Day with link to agenda (if I am logged) */
fprintf (Gbl.F.Out,"<div id=\"current_day\">"); fprintf (Gbl.F.Out,"<div id=\"current_day\">");
@ -336,14 +336,14 @@ void Dat_ShowClientLocalTime (void)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Time */ /* Time */
fprintf (Gbl.F.Out,"<div id=\"current_time\">" // JavaScript will write HTML here fprintf (Gbl.F.Out,"<div id=\"current_time\">"); // JavaScript will write HTML here
"</div>"); HTM_DIV_End ();
/* End container */ /* End container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Write script to draw the month */ /* Write script to draw the month */
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">\n" fprintf (Gbl.F.Out,"<script type=\"text/javascript\">\n"

View File

@ -332,7 +332,7 @@ static void Deg_Configuration (bool PrintView)
Gbl.Hierarchy.Deg.FullName); Gbl.Hierarchy.Deg.FullName);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Begin table *****/ /***** Begin table *****/
HTM_TABLE_BeginWidePadding (2); HTM_TABLE_BeginWidePadding (2);
@ -470,13 +470,15 @@ static void Deg_Configuration (bool PrintView)
Frm_EndForm (); Frm_EndForm ();
} }
else // I can not change degree WWW else // I can not change degree WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">" fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">" "<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Gbl.Hierarchy.Deg.WWW, Gbl.Hierarchy.Deg.WWW,
Gbl.Hierarchy.Deg.WWW); Gbl.Hierarchy.Deg.WWW);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -837,9 +839,9 @@ static void Deg_ListDegreesForEdition (void)
"<a href=\"%s\" target=\"_blank\"" "<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">" " class=\"DAT\" title=\"%s\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Deg->WWW,Deg->WWW,WWW); Deg->WWW,Deg->WWW,WWW);
HTM_DIV_End ();
} }
HTM_TD_End (); HTM_TD_End ();

View File

@ -697,7 +697,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
break; break;
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Form to send students to be enroled / removed *****/ /***** Form to send students to be enroled / removed *****/
@ -729,28 +729,28 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
/***** Step 1: List of students to be enroled / removed *****/ /***** Step 1: List of students to be enroled / removed *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">" fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s" "%s",
"</div>",
The_ClassTitle[Gbl.Prefs.Theme], The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_1_Provide_a_list_of_users); Txt_Step_1_Provide_a_list_of_users);
HTM_DIV_End ();
Ale_ShowAlert (Ale_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_); Ale_ShowAlert (Ale_INFO,Txt_Type_or_paste_a_list_of_IDs_nicks_or_emails_);
Enr_PutAreaToEnterUsrsIDs (); Enr_PutAreaToEnterUsrsIDs ();
/***** Step 2: Put different actions to register/remove users to/from current course *****/ /***** Step 2: Put different actions to register/remove users to/from current course *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">" fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s" "%s",
"</div>",
The_ClassTitle[Gbl.Prefs.Theme], The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_2_Select_the_desired_action); Txt_Step_2_Select_the_desired_action);
HTM_DIV_End ();
Enr_PutActionsRegRemSeveralUsrs (); Enr_PutActionsRegRemSeveralUsrs ();
/***** Step 3: Select groups in which register / remove users *****/ /***** Step 3: Select groups in which register / remove users *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">" fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s" "%s",
"</div>",
The_ClassTitle[Gbl.Prefs.Theme], The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_3_Optionally_select_groups); Txt_Step_3_Optionally_select_groups);
HTM_DIV_End ();
if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected if (Gbl.Hierarchy.Level == Hie_CRS) // Course selected
{ {
if (Gbl.Crs.Grps.NumGrps) // This course has groups? if (Gbl.Crs.Grps.NumGrps) // This course has groups?
@ -766,10 +766,10 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
/***** Step 4: Confirm register / remove students *****/ /***** Step 4: Confirm register / remove students *****/
fprintf (Gbl.F.Out,"<div class=\"%s LM\">" fprintf (Gbl.F.Out,"<div class=\"%s LM\">"
"%s" "%s",
"</div>",
The_ClassTitle[Gbl.Prefs.Theme], The_ClassTitle[Gbl.Prefs.Theme],
Txt_Step_4_Confirm_the_enrolment_removing); Txt_Step_4_Confirm_the_enrolment_removing);
HTM_DIV_End ();
Pwd_AskForConfirmationOnDangerousAction (); Pwd_AskForConfirmationOnDangerousAction ();
/***** Send button and end box *****/ /***** Send button and end box *****/
@ -2898,7 +2898,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
HTM_TD_Begin ("class=\"DAT LT\""); HTM_TD_Begin ("class=\"DAT LT\"");
fprintf (Gbl.F.Out,"<div class=\"REQUESTER_NAME\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"REQUESTER_NAME\">"); // Limited width
Usr_WriteFirstNameBRSurnames (&UsrDat); Usr_WriteFirstNameBRSurnames (&UsrDat);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/***** Requested role (row[3]) *****/ /***** Requested role (row[3]) *****/
@ -3099,7 +3099,7 @@ void Enr_ReqRegRemStd (void)
/* Put link to go to admin several students */ /* Put link to go to admin several students */
Enr_PutLinkToAdminSeveralUsrs (Rol_STD); Enr_PutLinkToAdminSeveralUsrs (Rol_STD);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Form to request user to be administered *****/ /***** Form to request user to be administered *****/

View File

@ -3412,7 +3412,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
UsrDat->Email,UsrDat->Email); UsrDat->Email,UsrDat->Email);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
@ -3786,7 +3786,7 @@ static void Brw_WriteTopBeforeShowingFileBrowser (void)
ZIP_PutLinkToCreateZIPAsgWrk (); ZIP_PutLinkToCreateZIPAsgWrk ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Initialize hidden levels *****/ /***** Initialize hidden levels *****/
switch (Gbl.FileBrowser.Type) switch (Gbl.FileBrowser.Type)
@ -4068,8 +4068,12 @@ static void Brw_WriteSubtitleOfFileBrowser (void)
return; return;
} }
if (Subtitle[0]) if (Subtitle[0])
fprintf (Gbl.F.Out,"<div class=\"BROWSER_SUBTITLE\">%s</div>", {
fprintf (Gbl.F.Out,"<div class=\"BROWSER_SUBTITLE\">"
"%s",
Subtitle); Subtitle);
HTM_DIV_End ();
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4133,7 +4137,7 @@ static void Brw_ShowAndStoreSizeOfFileTree (void)
else else
fprintf (Gbl.F.Out,"&nbsp;"); // Blank to occupy the same space as the text for the browser size fprintf (Gbl.F.Out,"&nbsp;"); // Blank to occupy the same space as the text for the browser size
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -5914,7 +5918,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -5946,7 +5950,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -6092,7 +6096,7 @@ static void Brw_PutIconFolderWithoutPlus (const char *FileBrowserId,const char *
Txt_Folder); Txt_Folder);
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -6117,7 +6121,7 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row
Open); Open);
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -6289,7 +6293,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
} }
/***** End cell *****/ /***** End cell *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
} }
@ -6322,7 +6326,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
Ico_PutIconOff ("unlock.svg", Ico_PutIconOff ("unlock.svg",
Txt_Public_open_educational_resource_OER_for_everyone); Txt_Public_open_educational_resource_OER_for_everyone);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
} }
} }
@ -8402,10 +8406,10 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
Brw_PutImplicitParamsFileBrowser (); Brw_PutImplicitParamsFileBrowser ();
fprintf (Gbl.F.Out,"<div class=\"dz-message\">" fprintf (Gbl.F.Out,"<div class=\"dz-message\">"
"<span class=\"DAT_LIGHT\">%s</span>" "<span class=\"DAT_LIGHT\">%s</span>",
"</div>"
"</form>",
Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here); Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here);
HTM_DIV_End ();
Frm_EndForm ();
/***** Put button to refresh file browser after upload *****/ /***** Put button to refresh file browser after upload *****/
Frm_StartForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]); Frm_StartForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]);
@ -8422,7 +8426,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -8455,7 +8459,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -138,7 +138,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Prf_PutLinkMyPublicProfile (); Prf_PutLinkMyPublicProfile ();
Prf_PutLinkRequestAnotherUserProfile (); Prf_PutLinkRequestAnotherUserProfile ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Get users *****/ /***** Get users *****/
if ((NumUsrs = Fol_GetUsrsToFollow (Fol_MAX_USRS_TO_FOLLOW_MAIN_ZONE, if ((NumUsrs = Fol_GetUsrsToFollow (Fol_MAX_USRS_TO_FOLLOW_MAIN_ZONE,
@ -245,7 +245,7 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void)
HTM_TABLE_End (); HTM_TABLE_End ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
@ -525,7 +525,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"<div id=\"follows_me\" class=\"DAT_LIGHT\">"); fprintf (Gbl.F.Out,"<div id=\"follows_me\" class=\"DAT_LIGHT\">");
if (UsrFollowsMe) if (UsrFollowsMe)
fprintf (Gbl.F.Out,"%s",Txt_FOLLOWS_YOU); fprintf (Gbl.F.Out,"%s",Txt_FOLLOWS_YOU);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Number of followed */ /* Number of followed */
Fol_ShowNumberOfFollowingOrFollowers (UsrDat, Fol_ShowNumberOfFollowingOrFollowers (UsrDat,
@ -533,8 +533,8 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
ActSeeFlg,Txt_Following); ActSeeFlg,Txt_Following);
/* End following side */ /* End following side */
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</div>"); HTM_DIV_End ();
/***** Followers *****/ /***** Followers *****/
fprintf (Gbl.F.Out,"<div id=\"followers_side\">" fprintf (Gbl.F.Out,"<div id=\"followers_side\">"
@ -559,11 +559,11 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
" style=\"display:inline;\" >" " style=\"display:inline;\" >"
"<img src=\"%s/user-check.svg\"" "<img src=\"%s/user-check.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO40x40\" />" " class=\"ICO40x40\" />",
"</div>"
"</a>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Unfollow,Txt_Following_unfollow); Txt_Unfollow,Txt_Following_unfollow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }
else // I do not follow this user else // I do not follow this user
@ -575,19 +575,19 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
" style=\"display:inline;\" >" " style=\"display:inline;\" >"
"<img src=\"%s/user-plus.svg\"" "<img src=\"%s/user-plus.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO40x40\" />" " class=\"ICO40x40\" />",
"</div>"
"</a>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Follow,Txt_Follow); Txt_Follow,Txt_Follow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* End followers side */ /* End followers side */
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</div>"); HTM_DIV_End ();
/***** End section *****/ /***** End section *****/
Lay_EndSection (); Lay_EndSection ();
@ -651,10 +651,10 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -862,8 +862,8 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_NAME\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_NAME\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL); Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }
@ -919,8 +919,8 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"CON_NAME_FOLLOW\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"CON_NAME_FOLLOW\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL); Frm_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }
HTM_TD_End (); HTM_TD_End ();
@ -957,9 +957,9 @@ static void Fol_PutInactiveIconToFollowUnfollow (void)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIDDEN\">" fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIDDEN\">"
"<img src=\"%s/user.svg\"" "<img src=\"%s/user.svg\""
" alt=\"\"" " alt=\"\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />",
"</div>",
Cfg_URL_ICON_PUBLIC); Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -977,11 +977,11 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">"
"<img src=\"%s/user-plus.svg\"" "<img src=\"%s/user-plus.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />",
"</div>"
"</a>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Follow,Txt_Follow); Txt_Follow,Txt_Follow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }
@ -1000,11 +1000,11 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"FOLLOW_USR_ICO ICO_HIGHLIGHT\">"
"<img src=\"%s/user-check.svg\"" "<img src=\"%s/user-check.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />",
"</div>"
"</a>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Unfollow,Txt_Unfollow); Txt_Unfollow,Txt_Unfollow);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
} }

View File

@ -1465,7 +1465,7 @@ static void For_WriteNumberOfPosts (long UsrCod)
fprintf (Gbl.F.Out,"[%u %s]",NumPsts,Txt_FORUM_posts); fprintf (Gbl.F.Out,"[%u %s]",NumPsts,Txt_FORUM_posts);
/***** End table cell *****/ /***** End table cell *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1777,8 +1777,8 @@ static void For_PutFormWhichForums (void)
"</li>", "</li>",
Gbl.Form.Id,Txt_FORUM_WHICH_FORUM[ForumSet]); Gbl.Form.Id,Txt_FORUM_WHICH_FORUM[ForumSet]);
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }

View File

@ -461,11 +461,13 @@ void Gam_ShowOneGame (long GamCod,
Lay_EndArticle (); Lay_EndArticle ();
/* Number of questions */ /* Number of questions */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s: %u</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s: %u",
Game.Hidden ? "ASG_GRP_LIGHT" : Game.Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP", "ASG_GRP",
Txt_No_of_questions, Txt_No_of_questions,
Game.NumQsts); Game.NumQsts);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
@ -511,10 +513,12 @@ void Gam_ShowOneGame (long GamCod,
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
Game.Hidden ? "DAT_LIGHT" : Game.Hidden ? "DAT_LIGHT" :
"DAT", "DAT",
Txt); Txt);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/***** End 2nd row of this game *****/ /***** End 2nd row of this game *****/
@ -1734,14 +1738,20 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
HTM_TD_End (); HTM_TD_End ();
/* Write number of question */
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">%s</div>",StrQstInd);
/* Write number of question */
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
"%s",
StrQstInd);
HTM_DIV_End ();
/* Write answer type (row[2]) */ /* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s",
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/* Write question code */ /* Write question code */

View File

@ -416,7 +416,7 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncParams) (void),
The_ClassFormInBoxBold[Gbl.Prefs.Theme], The_ClassFormInBoxBold[Gbl.Prefs.Theme],
"CopyMessageToHiddenFields();"); "CopyMessageToHiddenFields();");
Ico_PutCalculateIconWithText (Txt_Update_users); Ico_PutCalculateIconWithText (Txt_Update_users);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
@ -467,10 +467,10 @@ static void Grp_PutCheckboxAllGrps (Grp_WhichGroups_t GroupsSelectableByStdsOrNE
fprintf (Gbl.F.Out," />" fprintf (Gbl.F.Out," />"
"<label for=\"AllGroups\" class=\"%s\">" "<label for=\"AllGroups\" class=\"%s\">"
"&nbsp;%s" "&nbsp;%s"
"</label>" "</label>",
"</div>",
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_All_groups); Txt_All_groups);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -5019,7 +5019,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) (void))
"sitemap.svg", "sitemap.svg",
Txt_GROUP_WHICH_GROUPS[WhichGrps]); Txt_GROUP_WHICH_GROUPS[WhichGrps]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** End setting selector *****/ /***** End setting selector *****/

View File

@ -70,7 +70,7 @@ void Hie_SeePending (void)
/* Put link to remove old courses */ /* Put link to remove old courses */
Crs_PutLinkToRemoveOldCrss (); Crs_PutLinkToRemoveOldCrss ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** List countries with pending institutions *****/ /***** List countries with pending institutions *****/
Cty_SeeCtyWithPendingInss (); Cty_SeeCtyWithPendingInss ();
@ -215,7 +215,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_System); fprintf (Gbl.F.Out,"%s</a>",Txt_System);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
if (Gbl.Hierarchy.Cty.CtyCod > 0) // Country selected... if (Gbl.Hierarchy.Cty.CtyCod > 0) // Country selected...
{ {
@ -231,7 +231,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
{ {
@ -246,7 +246,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Country); fprintf (Gbl.F.Out,"%s</a>",Txt_Country);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
if (Gbl.Hierarchy.Ins.InsCod > 0) // Institution selected... if (Gbl.Hierarchy.Ins.InsCod > 0) // Institution selected...
@ -263,7 +263,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ins.ShrtName); fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ins.ShrtName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else if (Gbl.Hierarchy.Cty.CtyCod > 0) else if (Gbl.Hierarchy.Cty.CtyCod > 0)
{ {
@ -278,7 +278,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Institution); fprintf (Gbl.F.Out,"%s</a>",Txt_Institution);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
{ {
@ -290,7 +290,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden institution *****/ /***** Hidden institution *****/
fprintf (Gbl.F.Out,"%s",Txt_Institution); fprintf (Gbl.F.Out,"%s",Txt_Institution);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
if (Gbl.Hierarchy.Ctr.CtrCod > 0) // Centre selected... if (Gbl.Hierarchy.Ctr.CtrCod > 0) // Centre selected...
@ -307,7 +307,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ctr.ShrtName); fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Ctr.ShrtName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else if (Gbl.Hierarchy.Ins.InsCod > 0) else if (Gbl.Hierarchy.Ins.InsCod > 0)
{ {
@ -322,7 +322,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Centre); fprintf (Gbl.F.Out,"%s</a>",Txt_Centre);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
{ {
@ -334,7 +334,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden centre *****/ /***** Hidden centre *****/
fprintf (Gbl.F.Out,"%s",Txt_Centre); fprintf (Gbl.F.Out,"%s",Txt_Centre);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
if (Gbl.Hierarchy.Deg.DegCod > 0) // Degree selected... if (Gbl.Hierarchy.Deg.DegCod > 0) // Degree selected...
@ -351,7 +351,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Deg.ShrtName); fprintf (Gbl.F.Out,"%s</a>",Gbl.Hierarchy.Deg.ShrtName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else if (Gbl.Hierarchy.Ctr.CtrCod > 0) else if (Gbl.Hierarchy.Ctr.CtrCod > 0)
{ {
@ -366,7 +366,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
fprintf (Gbl.F.Out,"%s</a>",Txt_Degree); fprintf (Gbl.F.Out,"%s</a>",Txt_Degree);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
{ {
@ -378,7 +378,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Hidden degree *****/ /***** Hidden degree *****/
fprintf (Gbl.F.Out,"%s",Txt_Degree); fprintf (Gbl.F.Out,"%s",Txt_Degree);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
fprintf (Gbl.F.Out,"<div class=\"BC%s %s\">", fprintf (Gbl.F.Out,"<div class=\"BC%s %s\">",
@ -390,7 +390,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
/***** Separator *****/ /***** Separator *****/
fprintf (Gbl.F.Out,"&nbsp;&gt;&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;&gt;&nbsp;");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -438,39 +438,43 @@ void Hie_WriteBigNameCtyInsCtrDegCrs (void)
/***** Text *****/ /***** Text *****/
fprintf (Gbl.F.Out,"<div id=\"big_name_container\">"); fprintf (Gbl.F.Out,"<div id=\"big_name_container\">");
if (Gbl.Hierarchy.Cty.CtyCod > 0) if (Gbl.Hierarchy.Cty.CtyCod > 0)
{
fprintf (Gbl.F.Out,"<div id=\"big_full_name\">" fprintf (Gbl.F.Out,"<div id=\"big_full_name\">"
"%s" // Full name "%s", // Full name
"</div>"
"<div class=\"NOT_SHOWN\">"
" / " // To separate
"</div>"
"<div id=\"big_short_name\">"
"%s" // Short name
"</div>",
(Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.FullName : (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.FullName :
((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.FullName : ((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.FullName :
((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.FullName : ((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.FullName :
((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.FullName : ((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.FullName :
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))), Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))));
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"NOT_SHOWN\">"
" / "); // To separate
HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div id=\"big_short_name\">"
"%s", // Short name
(Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.ShrtName : (Gbl.Hierarchy.Level == Hie_CRS) ? Gbl.Hierarchy.Crs.ShrtName :
((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.ShrtName : ((Gbl.Hierarchy.Level == Hie_DEG) ? Gbl.Hierarchy.Deg.ShrtName :
((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.ShrtName : ((Gbl.Hierarchy.Level == Hie_CTR) ? Gbl.Hierarchy.Ctr.ShrtName :
((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.ShrtName : ((Gbl.Hierarchy.Level == Hie_INS) ? Gbl.Hierarchy.Ins.ShrtName :
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language])))); Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]))));
HTM_DIV_End ();
}
else // No country specified ==> home page else // No country specified ==> home page
{
fprintf (Gbl.F.Out,"<div id=\"big_full_name\">" fprintf (Gbl.F.Out,"<div id=\"big_full_name\">"
"%s: %s" // Full name "%s: %s", // Full name
"</div>" Cfg_PLATFORM_SHORT_NAME,Txt_TAGLINE);
"<div class=\"NOT_SHOWN\">" HTM_DIV_End ();
" / " // To separate fprintf (Gbl.F.Out,"<div class=\"NOT_SHOWN\">"
"</div>" " / "); // To separate
"<div id=\"big_short_name\">" HTM_DIV_End ();
"%s" // Short name fprintf (Gbl.F.Out,"<div id=\"big_short_name\">"
"</div>", "%s", // Short name
Cfg_PLATFORM_SHORT_NAME,Txt_TAGLINE,
Cfg_PLATFORM_SHORT_NAME); Cfg_PLATFORM_SHORT_NAME);
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</h1>"); }
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</h1>");
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -32,6 +32,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_icon.h" #include "swad_icon.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_parameter.h" #include "swad_parameter.h"
@ -134,7 +135,7 @@ void Ico_PutIconsToSelectIconSet (void)
Ico_IconSetId[IconSet]); Ico_IconSetId[IconSet]);
Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]); Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();
@ -334,11 +335,11 @@ void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title)
fprintf (Gbl.F.Out,"<div class=\"%s\">" fprintf (Gbl.F.Out,"<div class=\"%s\">"
"<img src=\"%s/%s\"" "<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />" " class=\"CONTEXT_ICO_16x16\" />",
"</div>",
DivClass, DivClass,
Cfg_URL_ICON_PUBLIC,Icon, Cfg_URL_ICON_PUBLIC,Icon,
Title,Title); Title,Title);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -349,7 +350,7 @@ void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title
{ {
fprintf (Gbl.F.Out,"<div class=\"%s\">",DivClass); fprintf (Gbl.F.Out,"<div class=\"%s\">",DivClass);
Ico_PutIconLink (Icon,Title); Ico_PutIconLink (Icon,Title);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -375,10 +376,10 @@ void Ico_PutIconTextLink (const char *Icon,const char *Text)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_x16\" />" " class=\"CONTEXT_ICO_x16\" />"
"&nbsp;%s" "&nbsp;%s",
"</div>",
Cfg_URL_ICON_PUBLIC,Icon,Text,Text, Cfg_URL_ICON_PUBLIC,Icon,Text,Text,
Text); Text);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -418,11 +419,12 @@ void Ico_PutCalculateIcon (const char *Title)
" class=\"CONTEXT_ICO_16x16\" />" " class=\"CONTEXT_ICO_16x16\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif "<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" style=\"display:none;\" />" // Animated icon hidden " class=\"CONTEXT_ICO_16x16\" style=\"display:none;\" />", // Animated icon hidden
"</div>"
"</a>",
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title, Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title,
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title); Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Title,Title);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
} }
/*****************************************************************************/ /*****************************************************************************/
@ -440,12 +442,13 @@ void Ico_PutCalculateIconWithText (const char *Text)
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" "<img id=\"updating_%d\" src=\"%s/working16x16.gif\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden " class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s" "&nbsp;%s",
"</div>"
"</a>",
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text, Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text,
Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text, Gbl.Form.Num,Cfg_URL_ICON_PUBLIC,Text,Text,
Text); Text);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -386,7 +386,7 @@ void Inf_ShowInfo (void)
{ {
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Inf_PutCheckboxConfirmIHaveReadInfo (); Inf_PutCheckboxConfirmIHaveReadInfo ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
break; break;
case Rol_NET: case Rol_NET:
@ -398,7 +398,7 @@ void Inf_ShowInfo (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Disabled = (Gbl.Usrs.Me.Role.Logged == Rol_NET); // Non-editing teachers can not change the status of checkbox Disabled = (Gbl.Usrs.Me.Role.Logged == Rol_NET); // Non-editing teachers can not change the status of checkbox
Inf_PutCheckboxForceStdsToReadInfo (MustBeRead,Disabled); Inf_PutCheckboxForceStdsToReadInfo (MustBeRead,Disabled);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
break; break;
default: default:
@ -617,8 +617,8 @@ void Inf_WriteMsgYouMustReadInfo (void)
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>"); HTM_DIV_End ();
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -1276,10 +1276,10 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc)
"<label class=\"%s\">" "<label class=\"%s\">"
"%s:&nbsp;" "%s:&nbsp;"
"<input type=\"file\" name=\"%s\" />" "<input type=\"file\" name=\"%s\" />"
"</label>" "</label>",
"</div>",
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_File, The_ClassFormInBox[Gbl.Prefs.Theme],Txt_File,
Fil_NAME_OF_PARAM_FILENAME_ORG); Fil_NAME_OF_PARAM_FILENAME_ORG);
HTM_DIV_End ();
/***** Send button *****/ /***** Send button *****/
Btn_PutCreateButton (Txt_Upload_file); Btn_PutCreateButton (Txt_Upload_file);
@ -1324,8 +1324,8 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc)
fprintf (Gbl.F.Out,"%s",Gbl.Crs.Info.URL); fprintf (Gbl.F.Out,"%s",Gbl.Crs.Info.URL);
} }
fprintf (Gbl.F.Out,"\" />" fprintf (Gbl.F.Out,"\" />"
"</label>" "</label>");
"</div>"); HTM_DIV_End ();
/***** Send button *****/ /***** Send button *****/
Btn_PutCreateButton (Txt_Send_URL); Btn_PutCreateButton (Txt_Send_URL);
@ -1809,7 +1809,7 @@ static bool Inf_CheckAndShowPlainTxt (void)
fprintf (Gbl.F.Out,"%s",TxtHTML); fprintf (Gbl.F.Out,"%s",TxtHTML);
/***** End box *****/ /***** End box *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
return true; return true;
@ -1946,7 +1946,7 @@ static bool Inf_CheckAndShowRichTxt (void)
unlink (PathFileHTML); unlink (PathFileHTML);
/***** End box *****/ /***** End box *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
return true; return true;
@ -2082,9 +2082,9 @@ void Inf_EditPlainTxtInfo (void)
Lay_HelpPlainEditor (); Lay_HelpPlainEditor ();
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">" fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"%s" "%s"
"</textarea>" "</textarea>",
"</div>",
TxtHTML); TxtHTML);
HTM_DIV_End ();
/***** Send button and end box *****/ /***** Send button and end box *****/
Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes); Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);
@ -2133,9 +2133,9 @@ void Inf_EditRichTxtInfo (void)
Lay_HelpRichEditor (); Lay_HelpRichEditor ();
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">" fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
"%s" "%s"
"</textarea>" "</textarea>",
"</div>",
TxtHTML); TxtHTML);
HTM_DIV_End ();
/***** Send button and end box *****/ /***** Send button and end box *****/
Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes); Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);

View File

@ -345,7 +345,7 @@ static void Ins_Configuration (bool PrintView)
fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ins.FullName); fprintf (Gbl.F.Out,"<br />%s",Gbl.Hierarchy.Ins.FullName);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Begin table *****/ /***** Begin table *****/
HTM_TABLE_BeginWidePadding (2); HTM_TABLE_BeginWidePadding (2);
@ -484,13 +484,15 @@ static void Ins_Configuration (bool PrintView)
Frm_EndForm (); Frm_EndForm ();
} }
else // I can not change institution WWW else // I can not change institution WWW
{
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">" fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW_LONG\">"
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">" "<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Gbl.Hierarchy.Ins.WWW, Gbl.Hierarchy.Ins.WWW,
Gbl.Hierarchy.Ins.WWW); Gbl.Hierarchy.Ins.WWW);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1557,9 +1559,9 @@ static void Ins_ListInstitutionsForEdition (void)
"<a href=\"%s\" target=\"_blank\"" "<a href=\"%s\" target=\"_blank\""
" class=\"DAT\" title=\"%s\">" " class=\"DAT\" title=\"%s\">"
"%s" "%s"
"</a>" "</a>",
"</div>",
Ins->WWW,Ins->WWW,WWW); Ins->WWW,Ins->WWW,WWW);
HTM_DIV_End ();
} }
HTM_TD_End (); HTM_TD_End ();

View File

@ -275,10 +275,10 @@ void Lay_WriteStartOfPage (void)
"<img id=\"zoomImg\" src=\"%s/usr_bl.jpg\"" "<img id=\"zoomImg\" src=\"%s/usr_bl.jpg\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" class=\"IMG_USR\" />" " class=\"IMG_USR\" />"
"<div id=\"zoomTxt\" class=\"CM\">" "<div id=\"zoomTxt\" class=\"CM\">",
"</div>"
"</div>",
Cfg_URL_ICON_PUBLIC); Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
HTM_DIV_End ();
break; break;
case Act_BRW_NEW_TAB: case Act_BRW_NEW_TAB:
case Act_BRW_2ND_TAB: case Act_BRW_2ND_TAB:
@ -402,18 +402,18 @@ static void Lay_WriteEndOfPage (void)
if (!Gbl.Layout.DivsEndWritten) if (!Gbl.Layout.DivsEndWritten)
{ {
/***** End of central part of main zone *****/ /***** End of central part of main zone *****/
fprintf (Gbl.F.Out,"</div>" // Canvas (main zone to output content of the current action) HTM_DIV_End (); // Canvas (main zone to output content of the current action)
"</div>" // Layout with horizontal or vertical menu HTM_DIV_End (); // Layout with horizontal or vertical menu
"</div>"); // main_zone_central_container HTM_DIV_End (); // main_zone_central_container
/***** Write page footer *****/ /***** Write page footer *****/
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB) if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
Lay_WriteFootFromHTMLFile (); Lay_WriteFootFromHTMLFile ();
/***** End of main zone and page *****/ /***** End of main zone and page *****/
fprintf (Gbl.F.Out,"</div>" // main_zone_central HTM_DIV_End (); // main_zone_central
"</div>" // main_zone HTM_DIV_End (); // main_zone
"</div>\n"); // whole_page_* (box that contains the whole page except the foot) HTM_DIV_End (); // whole_page_* (box that contains the whole page except the foot)
Gbl.Layout.DivsEndWritten = true; Gbl.Layout.DivsEndWritten = true;
} }
@ -942,8 +942,8 @@ static void Lay_WritePageTopHeading (void)
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME, Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME, Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_SMALL_WIDTH,Cfg_PLATFORM_LOGO_SMALL_HEIGHT); Cfg_PLATFORM_LOGO_SMALL_WIDTH,Cfg_PLATFORM_LOGO_SMALL_HEIGHT);
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div id=\"head_row_1_logo_big\">"); fprintf (Gbl.F.Out,"<div id=\"head_row_1_logo_big\">");
Frm_LinkFormSubmit (Txt_System,NULL,NULL); Frm_LinkFormSubmit (Txt_System,NULL,NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CM\"" " class=\"CM\""
@ -952,20 +952,20 @@ static void Lay_WritePageTopHeading (void)
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_BIG_FILENAME, Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_BIG_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME, Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_BIG_WIDTH,Cfg_PLATFORM_LOGO_BIG_HEIGHT); Cfg_PLATFORM_LOGO_BIG_WIDTH,Cfg_PLATFORM_LOGO_BIG_HEIGHT);
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div id=\"head_row_1_tagline\">"); fprintf (Gbl.F.Out,"<div id=\"head_row_1_tagline\">");
Frm_LinkFormSubmit (Txt_TAGLINE,The_ClassTagline[Gbl.Prefs.Theme],NULL); Frm_LinkFormSubmit (Txt_TAGLINE,The_ClassTagline[Gbl.Prefs.Theme],NULL);
fprintf (Gbl.F.Out,"%s" fprintf (Gbl.F.Out,"%s"
"</a>" "</a>",
"</div>", // head_row_1_tagline
Txt_TAGLINE_BR); Txt_TAGLINE_BR);
HTM_DIV_End (); // head_row_1_tagline
/* End form to go to home page */ /* End form to go to home page */
Frm_EndForm (); Frm_EndForm ();
Sch_PutFormToSearchInPageTopHeading (); Sch_PutFormToSearchInPageTopHeading ();
fprintf (Gbl.F.Out,"</div>"); // head_row_1_left HTM_DIV_End (); // head_row_1_left
/* 1st. row, 3rd. column: logged user or language selection, /* 1st. row, 3rd. column: logged user or language selection,
and link to open/close session */ and link to open/close session */
@ -980,11 +980,11 @@ static void Lay_WritePageTopHeading (void)
Usr_PutFormLogOut (); Usr_PutFormLogOut ();
else else
Usr_PutFormLogIn (); Usr_PutFormLogIn ();
fprintf (Gbl.F.Out,"</div>" // login_box HTM_DIV_End (); // login_box
"</div>"); // head_row_1_right HTM_DIV_End (); // head_row_1_right
/* End 1st. row */ /* End 1st. row */
fprintf (Gbl.F.Out,"</div>"); // head_row_1 HTM_DIV_End (); // head_row_1
/***** 2nd. row *****/ /***** 2nd. row *****/
/* Start second row */ /* Start second row */
@ -995,22 +995,22 @@ static void Lay_WritePageTopHeading (void)
Clock with hour:minute (server hour is shown) */ Clock with hour:minute (server hour is shown) */
fprintf (Gbl.F.Out,"<div id=\"head_row_2_time\">"); fprintf (Gbl.F.Out,"<div id=\"head_row_2_time\">");
Dat_ShowClientLocalTime (); Dat_ShowClientLocalTime ();
fprintf (Gbl.F.Out,"</div>"); // End first column HTM_DIV_End (); // End first column
/* 2nd. row, 2nd. column: degree and course */ /* 2nd. row, 2nd. column: degree and course */
fprintf (Gbl.F.Out,"<div id=\"head_row_2_hierarchy\">"); fprintf (Gbl.F.Out,"<div id=\"head_row_2_hierarchy\">");
Lay_WriteBreadcrumb (); Lay_WriteBreadcrumb ();
Hie_WriteBigNameCtyInsCtrDegCrs (); Hie_WriteBigNameCtyInsCtrDegCrs ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* 2nd. row, 3rd. column */ /* 2nd. row, 3rd. column */
fprintf (Gbl.F.Out,"<div id=\"msg\">"); // Used for AJAX based refresh fprintf (Gbl.F.Out,"<div id=\"msg\">"); // Used for AJAX based refresh
if (Gbl.Usrs.Me.Logged) if (Gbl.Usrs.Me.Logged)
Ntf_WriteNumberOfNewNtfs (); Ntf_WriteNumberOfNewNtfs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh HTM_DIV_End (); // Used for AJAX based refresh
/* End 2nd. row */ /* End 2nd. row */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End header *****/ /***** End header *****/
fprintf (Gbl.F.Out,"</header>"); fprintf (Gbl.F.Out,"</header>");
@ -1046,18 +1046,22 @@ static void Lay_WriteTitleAction (void)
Act_GetIcon (Act_GetSuperAction (Gbl.Action.Act))); Act_GetIcon (Act_GetSuperAction (Gbl.Action.Act)));
/***** Title *****/ /***** Title *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s &gt; %s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s &gt; %s",
The_ClassTitleAction[Gbl.Prefs.Theme], The_ClassTitleAction[Gbl.Prefs.Theme],
Txt_TABS_TXT[Act_GetTab (Gbl.Action.Act)], Txt_TABS_TXT[Act_GetTab (Gbl.Action.Act)],
Act_GetTitleAction (Gbl.Action.Act)); Act_GetTitleAction (Gbl.Action.Act));
HTM_DIV_End ();
/***** Subtitle *****/ /***** Subtitle *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
The_ClassSubtitleAction[Gbl.Prefs.Theme], The_ClassSubtitleAction[Gbl.Prefs.Theme],
Act_GetSubtitleAction (Gbl.Action.Act)); Act_GetSubtitleAction (Gbl.Action.Act));
HTM_DIV_End ();
/***** Container end *****/ /***** Container end *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1082,12 +1086,12 @@ static void Lay_ShowLeftColumn (void)
else else
/***** Institutional links *****/ /***** Institutional links *****/
Lnk_WriteMenuWithInstitutionalLinks (); Lnk_WriteMenuWithInstitutionalLinks ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Month *****/ /***** Month *****/
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">"); fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
Cal_DrawCurrentMonth (); Cal_DrawCurrentMonth ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Notices (yellow notes) *****/ /***** Notices (yellow notes) *****/
if (Gbl.Hierarchy.Level == Hie_CRS) if (Gbl.Hierarchy.Level == Hie_CRS)
@ -1095,10 +1099,10 @@ static void Lay_ShowLeftColumn (void)
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">"); fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
Not_ShowNotices (Not_LIST_BRIEF_NOTICES, Not_ShowNotices (Not_LIST_BRIEF_NOTICES,
-1L); // No notice highlighted -1L); // No notice highlighted
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1120,7 +1124,7 @@ static void Lay_ShowRightColumn (void)
fprintf (Gbl.F.Out,"<div id=\"globalconnected\"" // Used for AJAX based refresh fprintf (Gbl.F.Out,"<div id=\"globalconnected\"" // Used for AJAX based refresh
" class=\"LEFT_RIGHT_CELL\">"); " class=\"LEFT_RIGHT_CELL\">");
Con_ShowGlobalConnectedUsrs (); Con_ShowGlobalConnectedUsrs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh HTM_DIV_End (); // Used for AJAX based refresh
} }
/***** Number of connected users in the current course *****/ /***** Number of connected users in the current course *****/
@ -1130,7 +1134,7 @@ static void Lay_ShowRightColumn (void)
" class=\"LEFT_RIGHT_CELL\">"); " class=\"LEFT_RIGHT_CELL\">");
Gbl.Scope.Current = Hie_CRS; Gbl.Scope.Current = Hie_CRS;
Con_ShowConnectedUsrsBelongingToCurrentCrs (); Con_ShowConnectedUsrsBelongingToCurrentCrs ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh HTM_DIV_End (); // Used for AJAX based refresh
} }
else if (Gbl.Usrs.Me.Logged) // I am logged else if (Gbl.Usrs.Me.Logged) // I am logged
{ {
@ -1152,10 +1156,11 @@ static void Lay_ShowRightColumn (void)
" (NOW(),'Fol_SuggestUsrsToFollowMainZoneOnRightColumn: %ld us')", " (NOW(),'Fol_SuggestUsrsToFollowMainZoneOnRightColumn: %ld us')",
tv_usecs); tv_usecs);
*/ */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
if (!Gbl.Usrs.Me.Logged) if (!Gbl.Usrs.Me.Logged)
{
/***** SWADroid advertisement *****/ /***** SWADroid advertisement *****/
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">" fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">"
"<a href=\"https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid\"" "<a href=\"https://play.google.com/store/apps/details?id=es.ugr.swad.swadroid\""
@ -1163,10 +1168,11 @@ static void Lay_ShowRightColumn (void)
"<img src=\"%s/SWADroid120x200.png\"" "<img src=\"%s/SWADroid120x200.png\""
" alt=\"SWADroid\" title=\"SWADroid\"" " alt=\"SWADroid\" title=\"SWADroid\""
" style=\"width:150px; height:250px;\" />" " style=\"width:150px; height:250px;\" />"
"</a>" "</a>",
"</div>",
Txt_If_you_have_an_Android_device_try_SWADroid, Txt_If_you_have_an_Android_device_try_SWADroid,
Cfg_URL_ICON_PUBLIC); Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1304,8 +1310,8 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
Text); Text);
/***** End label and container *****/ /***** End label and container *****/
fprintf (Gbl.F.Out,"</label>" fprintf (Gbl.F.Out,"</label>");
"</div>"); HTM_DIV_End ();
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
@ -1467,21 +1473,23 @@ static void Lay_WriteAboutZone (void)
"<img src=\"%s/%s\"" "<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;\" />" " style=\"width:%upx; height:%upx;\" />"
"<div>%s</div>" "<div>"
"</a>", "%s",
Cfg_ABOUT_URL, Cfg_ABOUT_URL,
Cfg_URL_ICON_PUBLIC,Cfg_ABOUT_LOGO, Cfg_URL_ICON_PUBLIC,Cfg_ABOUT_LOGO,
Cfg_ABOUT_NAME,Cfg_ABOUT_NAME, Cfg_ABOUT_NAME,Cfg_ABOUT_NAME,
Cfg_ABOUT_LOGO_WIDTH,Cfg_ABOUT_LOGO_HEIGHT, Cfg_ABOUT_LOGO_WIDTH,Cfg_ABOUT_LOGO_HEIGHT,
Cfg_ABOUT_NAME); Cfg_ABOUT_NAME);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
/***** Questions and problems *****/ /***** Questions and problems *****/
fprintf (Gbl.F.Out,"<div>" fprintf (Gbl.F.Out,"<div>"
"%s: " "%s: "
"<a href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\">%s</a>" "<a href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\">%s</a>",
"</div>",
Txt_Questions_and_problems, Txt_Questions_and_problems,
Cfg_PLATFORM_RESPONSIBLE_EMAIL,Cfg_PLATFORM_RESPONSIBLE_EMAIL); Cfg_PLATFORM_RESPONSIBLE_EMAIL,Cfg_PLATFORM_RESPONSIBLE_EMAIL);
HTM_DIV_End ();
/***** About and time to generate and send page *****/ /***** About and time to generate and send page *****/
fprintf (Gbl.F.Out,"<div>"); fprintf (Gbl.F.Out,"<div>");
@ -1496,7 +1504,7 @@ static void Lay_WriteAboutZone (void)
/* Time to generate and send page */ /* Time to generate and send page */
Sta_WriteTimeToGenerateAndSendPage (); Sta_WriteTimeToGenerateAndSendPage ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End about zone *****/ /***** End about zone *****/
fprintf (Gbl.F.Out,"</address>"); // about_zone fprintf (Gbl.F.Out,"</address>"); // about_zone
@ -1733,7 +1741,7 @@ void Lay_AdvertisementMobile (void)
/***** End table and box *****/ /***** End table and box *****/
Box_EndBoxTable (); Box_EndBoxTable ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -1799,11 +1807,11 @@ static void Lay_HelpTextEditor (const char *Text,const char *InlineMath,const ch
" " " "
"%s: <code>%s</code>" "%s: <code>%s</code>"
" " " "
"%s: <code>%s</code>" "%s: <code>%s</code>",
"</div>",
Txt_Text,Text, Txt_Text,Text,
Txt_Inline_math,InlineMath, Txt_Inline_math,InlineMath,
Txt_Equation_centered,Equation); Txt_Equation_centered,Equation);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -172,7 +172,7 @@ void Lnk_WriteMenuWithInstitutionalLinks (void)
Frm_EndForm (); Frm_EndForm ();
Lnk_WriteListOfLinks (); Lnk_WriteListOfLinks ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Free list of links *****/ /***** Free list of links *****/

View File

@ -31,6 +31,7 @@
#include "swad_box.h" #include "swad_box.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_scope.h" #include "swad_scope.h"
#include "swad_theme.h" #include "swad_theme.h"
@ -281,7 +282,7 @@ void Log_RequestLogo (Hie_Level_t Scope)
Lay_PutContextualLinkIconText (ActionRem,NULL,NULL, Lay_PutContextualLinkIconText (ActionRem,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Remove_logo); Txt_Remove_logo);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Begin form to upload logo *****/ /***** Begin form to upload logo *****/

View File

@ -975,19 +975,19 @@ static void Mai_ListEmails (void)
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
/***** End list with users' email addresses *****/ /***** End list with users' email addresses *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show a message with the number of users with email ****/ /***** Show a message with the number of users with email ****/
fprintf (Gbl.F.Out,"<div class=\"DAT CM\">"); fprintf (Gbl.F.Out,"<div class=\"DAT CM\">");
fprintf (Gbl.F.Out,Txt_X_users_who_have_email, fprintf (Gbl.F.Out,Txt_X_users_who_have_email,
NumUsrsWithEmail); NumUsrsWithEmail);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show a message with the number of users who have accepted and have email ****/ /***** Show a message with the number of users who have accepted and have email ****/
fprintf (Gbl.F.Out,"<div class=\"DAT CM\">"); fprintf (Gbl.F.Out,"<div class=\"DAT CM\">");
fprintf (Gbl.F.Out,Txt_X_users_who_have_accepted_and_who_have_email, fprintf (Gbl.F.Out,Txt_X_users_who_have_accepted_and_who_have_email,
NumAcceptedUsrsWithEmail); NumAcceptedUsrsWithEmail);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Icon to open the client email program *****/ /***** Icon to open the client email program *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">" fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"
@ -1001,8 +1001,8 @@ static void Mai_ListEmails (void)
The_ClassFormOutBoxBold[Gbl.Prefs.Theme]); The_ClassFormOutBoxBold[Gbl.Prefs.Theme]);
Ico_PutIconTextLink ("marker.svg", Ico_PutIconTextLink ("marker.svg",
Txt_Create_email_message); Txt_Create_email_message);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>");
"</div>"); HTM_DIV_End ();
/***** End the box used to list the emails *****/ /***** End the box used to list the emails *****/
Box_EndBox (); Box_EndBox ();

View File

@ -641,7 +641,7 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
fprintf (Gbl.F.Out,"%s %s", fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -672,9 +672,13 @@ static void Mch_ListOneOrMoreMatchesStatus (const struct Match *Match,unsigned N
HTM_TD_Begin ("class=\"DAT CT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"DAT CT COLOR%u\"",Gbl.RowEvenOdd);
if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished match if (Match->Status.QstInd < Mch_AFTER_LAST_QUESTION) // Unfinished match
{
/* Current question index / total of questions */ /* Current question index / total of questions */
fprintf (Gbl.F.Out,"<div class=\"DAT\">%u/%u</div>", fprintf (Gbl.F.Out,"<div class=\"DAT\">"
"%u/%u",
Match->Status.QstInd,NumQsts); Match->Status.QstInd,NumQsts);
HTM_DIV_End ();
}
switch (Gbl.Usrs.Me.Role.Logged) switch (Gbl.Usrs.Me.Role.Logged)
{ {
@ -1349,7 +1353,7 @@ void Mch_ResumeMatch (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1782,7 +1786,7 @@ void Mch_PlayPauseMatch (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1815,7 +1819,7 @@ void Mch_ChangeNumColsMch (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1847,7 +1851,7 @@ void Mch_ToggleVisibilResultsMchQst (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1876,7 +1880,7 @@ void Mch_BackMatch (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1905,7 +1909,7 @@ void Mch_ForwardMatch (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForTch (&Match); Mch_ShowMatchStatusForTch (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2112,7 +2116,7 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
fprintf (Gbl.F.Out,"<div id=\"match_left\"" fprintf (Gbl.F.Out,"<div id=\"match_left\""
" class=\"MCH_REFRESHABLE_TEACHER\">"); " class=\"MCH_REFRESHABLE_TEACHER\">");
Mch_ShowRefreshablePartTch (Match); Mch_ShowRefreshablePartTch (Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Buttons *****/ /***** Buttons *****/
Mch_PutMatchControlButtons (Match); Mch_PutMatchControlButtons (Match);
@ -2128,7 +2132,7 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
// Mch_PutCheckboxResult (Match); // Mch_PutCheckboxResult (Match);
/***** End left container *****/ /***** End left container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
static void Mch_ShowRefreshablePartTch (struct Match *Match) static void Mch_ShowRefreshablePartTch (struct Match *Match)
@ -2144,7 +2148,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
Mch_GetElapsedTimeInMatch (Match,&Time); Mch_GetElapsedTimeInMatch (Match,&Time);
Dat_WriteHoursMinutesSeconds (&Time); Dat_WriteHoursMinutesSeconds (&Time);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Write number of question *****/ /***** Write number of question *****/
Mch_ShowNumQstInMatch (Match); Mch_ShowNumQstInMatch (Match);
@ -2159,7 +2163,7 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
} }
else else
fprintf (Gbl.F.Out,"-"); fprintf (Gbl.F.Out,"-");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Number of users who have answered this question *****/ /***** Number of users who have answered this question *****/
NumAnswerersQst = Mch_GetNumUsrsWhoHaveAnswerQst (Match->MchCod, NumAnswerersQst = Mch_GetNumUsrsWhoHaveAnswerQst (Match->MchCod,
@ -2182,8 +2186,8 @@ static void Mch_ShowRefreshablePartTch (struct Match *Match)
fprintf (Gbl.F.Out,"/%u", fprintf (Gbl.F.Out,"/%u",
Match->Status.NumPlayers); Match->Status.NumPlayers);
} }
fprintf (Gbl.F.Out,"</strong>" fprintf (Gbl.F.Out,"</strong>");
"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2205,7 +2209,7 @@ static void Mch_ShowRightColumnTch (struct Match *Match)
Mch_ShowMatchScore (Match); Mch_ShowMatchScore (Match);
/***** End right container *****/ /***** End right container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2218,13 +2222,14 @@ static void Mch_ShowLeftColumnStd (struct Match *Match)
fprintf (Gbl.F.Out,"<div class=\"MCH_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"MCH_LEFT\">");
/***** Top *****/ /***** Top *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\"></div>"); fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">");
HTM_DIV_End ();
/***** Write number of question *****/ /***** Write number of question *****/
Mch_ShowNumQstInMatch (Match); Mch_ShowNumQstInMatch (Match);
/***** End left container *****/ /***** End left container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2254,14 +2259,14 @@ static void Mch_ShowRightColumnStd (struct Match *Match)
/* Show current question and possible answers */ /* Show current question and possible answers */
Mch_ShowQuestionAndAnswersStd (Match); Mch_ShowQuestionAndAnswersStd (Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
else // Not being played else // Not being played
Mch_ShowWaitImage (Txt_Please_wait_); Mch_ShowWaitImage (Txt_Please_wait_);
/***** End right container *****/ /***** End right container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2281,7 +2286,7 @@ static void Mch_ShowNumQstInMatch (struct Match *Match)
fprintf (Gbl.F.Out,"%s",Txt_MATCH_End); fprintf (Gbl.F.Out,"%s",Txt_MATCH_End);
else else
fprintf (Gbl.F.Out,"%u/%u",Match->Status.QstInd,NumQsts); fprintf (Gbl.F.Out,"%u/%u",Match->Status.QstInd,NumQsts);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2308,7 +2313,7 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put button to go back */ /* Put button to go back */
Mch_PutBigButton (ActBckMch,"backward",Match->MchCod, Mch_PutBigButton (ActBckMch,"backward",Match->MchCod,
Mch_ICON_PREVIOUS,Txt_Go_back); Mch_ICON_PREVIOUS,Txt_Go_back);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Center button *****/ /***** Center button *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CENTER_CONTAINER\">"); fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CENTER_CONTAINER\">");
@ -2327,7 +2332,7 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put disabled button to play match */ /* Put disabled button to play match */
Mch_PutBigButtonOff (Mch_ICON_PLAY); Mch_PutBigButtonOff (Mch_ICON_PLAY);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right button *****/ /***** Right button *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_RIGHT_CONTAINER\">"); fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_RIGHT_CONTAINER\">");
@ -2338,10 +2343,10 @@ static void Mch_PutMatchControlButtons (struct Match *Match)
/* Put button to show answers */ /* Put button to show answers */
Mch_PutBigButton (ActFwdMch,"forward",Match->MchCod, Mch_PutBigButton (ActFwdMch,"forward",Match->MchCod,
Mch_ICON_NEXT,Txt_Go_forward); Mch_ICON_NEXT,Txt_Go_forward);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End buttons container *****/ /***** End buttons container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2386,7 +2391,7 @@ static void Mch_ShowFormColumns (struct Match *Match)
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** End selector *****/ /***** End selector *****/
@ -2426,7 +2431,7 @@ static void Mch_ShowFormViewResult (struct Match *Match)
Frm_EndForm (); Frm_EndForm ();
/***** End selector *****/ /***** End selector *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -2437,7 +2442,10 @@ static void Mch_ShowFormViewResult (struct Match *Match)
static void Mch_ShowMatchTitle (struct Match *Match) static void Mch_ShowMatchTitle (struct Match *Match)
{ {
/***** Match title *****/ /***** Match title *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">%s</div>",Match->Title); fprintf (Gbl.F.Out,"<div class=\"MCH_TOP\">"
"%s",
Match->Title);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2514,7 +2522,7 @@ static void Mch_ShowQuestionAndAnswersTch (struct Match *Match)
break; break;
} }
fprintf (Gbl.F.Out,"</div>"); // Bottom HTM_DIV_End (); // Bottom
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2866,11 +2874,11 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id,
" onclick=\"document.getElementById('%s').submit();" " onclick=\"document.getElementById('%s').submit();"
" return false;\">" " return false;\">"
"<i class=\"%s\"></i>" "<i class=\"%s\"></i>"
"</a>" "</a>",
"</div>",
Txt, Txt,
Id, Id,
Icon); Icon);
HTM_DIV_End ();
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
@ -2881,10 +2889,10 @@ static void Mch_PutBigButtonOff (const char *Icon)
/***** Put inactive icon *****/ /***** Put inactive icon *****/
fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CONTAINER\">" fprintf (Gbl.F.Out,"<div class=\"MCH_BUTTON_CONTAINER\">"
"<div class=\"MCH_BUTTON_OFF\">" "<div class=\"MCH_BUTTON_OFF\">"
"<i class=\"%s\"></i>" "<i class=\"%s\"></i>",
"</div>"
"</div>",
Icon); Icon);
HTM_DIV_End ();
HTM_DIV_End ();
} }
static void Mch_PutBigButtonClose (void) static void Mch_PutBigButtonClose (void)
@ -2897,9 +2905,9 @@ static void Mch_PutBigButtonClose (void)
" onclick=\"window.close();" " onclick=\"window.close();"
" return false;\"\">" " return false;\"\">"
"<i class=\"%s\"></i>" "<i class=\"%s\"></i>"
"</a>" "</a>",
"</div>",
Txt_Close,Mch_ICON_CLOSE); Txt_Close,Mch_ICON_CLOSE);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2911,11 +2919,11 @@ static void Mch_ShowWaitImage (const char *Txt)
fprintf (Gbl.F.Out,"<div class=\"MCH_WAIT_CONTAINER\">" fprintf (Gbl.F.Out,"<div class=\"MCH_WAIT_CONTAINER\">"
"<img src=\"%s/wait.gif\"" "<img src=\"%s/wait.gif\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"MCH_WAIT_IMG\" />" " class=\"MCH_WAIT_IMG\" />",
"</div>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt, Txt,
Txt); Txt);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3014,7 +3022,7 @@ void Mch_JoinMatchAsStd (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForStd (&Match); Mch_ShowMatchStatusForStd (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3219,7 +3227,7 @@ void Mch_ReceiveQuestionAnswer (void)
/***** Show current match status *****/ /***** Show current match status *****/
fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">"); fprintf (Gbl.F.Out,"<div id=\"match\" class=\"MCH_CONT\">");
Mch_ShowMatchStatusForStd (&Match); Mch_ShowMatchStatusForStd (&Match);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3372,7 +3380,7 @@ static void Mch_DrawBarNumUsrs (unsigned NumAnswerersAns,unsigned NumAnswerersQs
fprintf (Gbl.F.Out,"%s",Gbl.Title); fprintf (Gbl.F.Out,"%s",Gbl.Title);
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -97,7 +97,7 @@ void McR_PutFormToViewMchResults (Act_Action_t Action)
Lay_PutContextualLinkIconText (Action,NULL,NULL, Lay_PutContextualLinkIconText (Action,NULL,NULL,
"tasks.svg", "tasks.svg",
Txt_Results); Txt_Results);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -40,10 +40,11 @@
#include "swad_config.h" #include "swad_config.h"
#include "swad_cookie.h" #include "swad_cookie.h"
#include "swad_database.h" #include "swad_database.h"
#include "swad_global.h"
#include "swad_file.h" #include "swad_file.h"
#include "swad_file_browser.h" #include "swad_file_browser.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h"
#include "swad_HTML.h"
#include "swad_media.h" #include "swad_media.h"
/*****************************************************************************/ /*****************************************************************************/
@ -359,11 +360,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"<img src=\"%s/paperclip.svg\"" "<img src=\"%s/paperclip.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />" " class=\"ICO_HIGHLIGHT ICOx16\" />"
"</a>" "</a>",
"</div>", // <id>_med_ico
Id,Id, Id,Id,
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Multimedia,Txt_Multimedia); Txt_Multimedia,Txt_Multimedia);
HTM_DIV_End (); // <id>_med_ico
/***** Start media uploader *****/ /***** Start media uploader *****/
fprintf (Gbl.F.Out,"<div id=\"%s_med_upl\"" // container <id>_med_upl fprintf (Gbl.F.Out,"<div id=\"%s_med_upl\"" // container <id>_med_upl
@ -401,8 +402,8 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"Embed"); "Embed");
/* End icons */ /* End icons */
fprintf (Gbl.F.Out,"</div>" // icons container HTM_DIV_End (); // icons container
"</div>"); // icons containers HTM_DIV_End (); // icons containers
/***** Hidden field with form type *****/ /***** Hidden field with form type *****/
/* Upload file */ /* Upload file */
@ -423,11 +424,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
"<input id=\"%s_fil\" type=\"file\"" // <id>_fil "<input id=\"%s_fil\" type=\"file\"" // <id>_fil
" name=\"%s\" accept=\"image/,video/\"" " name=\"%s\" accept=\"image/,video/\""
" class=\"%s\" disabled=\"disabled\"" " class=\"%s\" disabled=\"disabled\""
" style=\"display:none;\" />" " style=\"display:none;\" />",
"</div>", // <id>_fil
Id, Id,
ParamUploadMedia.File, ParamUploadMedia.File,
ClassInput); ClassInput);
HTM_DIV_End (); // <id>_fil
/***** Media URL *****/ /***** Media URL *****/
fprintf (Gbl.F.Out,"<div>" fprintf (Gbl.F.Out,"<div>"
@ -435,11 +436,11 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
" name=\"%s\" placeholder=\"%s\"" " name=\"%s\" placeholder=\"%s\""
" class=\"%s\" maxlength=\"%u\" value=\"\"" " class=\"%s\" maxlength=\"%u\" value=\"\""
" disabled=\"disabled\"" " disabled=\"disabled\""
" style=\"display:none;\" />" " style=\"display:none;\" />",
"</div>", // <id>_url
Id, Id,
ParamUploadMedia.URL,Txt_Link, ParamUploadMedia.URL,Txt_Link,
ClassInput,Cns_MAX_CHARS_WWW); ClassInput,Cns_MAX_CHARS_WWW);
HTM_DIV_End (); // <id>_url
/***** Media title *****/ /***** Media title *****/
fprintf (Gbl.F.Out,"<div>" fprintf (Gbl.F.Out,"<div>"
@ -447,20 +448,20 @@ void Med_PutMediaUploader (int NumMediaInForm,const char *ClassInput)
" name=\"%s\" placeholder=\"%s\"" " name=\"%s\" placeholder=\"%s\""
" class=\"%s\" maxlength=\"%u\" value=\"\"" " class=\"%s\" maxlength=\"%u\" value=\"\""
" disabled=\"disabled\"" " disabled=\"disabled\""
" style=\"display:none;\" />" " style=\"display:none;\" />",
"</div>", // <id>_tit
Id, Id,
ParamUploadMedia.Title,Txt_Title_attribution, ParamUploadMedia.Title,Txt_Title_attribution,
ClassInput,Med_MAX_CHARS_TITLE); ClassInput,Med_MAX_CHARS_TITLE);
HTM_DIV_End (); // <id>_tit
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
/***** End media uploader *****/ /***** End media uploader *****/
fprintf (Gbl.F.Out,"</div>"); // container <id>_med_upl HTM_DIV_End (); // container <id>_med_upl
/***** End media uploader container *****/ /***** End media uploader container *****/
fprintf (Gbl.F.Out,"</div>"); // container HTM_DIV_End (); // container
} }
/*****************************************************************************/ /*****************************************************************************/
@ -478,11 +479,11 @@ static void Med_PutIconMediaUploader (const char UniqueId[Frm_MAX_BYTES_ID + 1],
"<a href=\"\" onclick=\"%s('%s');return false;\">" "<a href=\"\" onclick=\"%s('%s');return false;\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx16\" />" " class=\"ICO_HIGHLIGHT ICOx16\" />"
"</a>" "</a>",
"</div>", // <id>_IdSuffix
UniqueId,IdSuffix, UniqueId,IdSuffix,
FunctionName,UniqueId, FunctionName,UniqueId,
Cfg_URL_ICON_PUBLIC,Icon,Title,Title); Cfg_URL_ICON_PUBLIC,Icon,Title,Title);
HTM_DIV_End (); // <id>_IdSuffix
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1510,7 +1511,7 @@ void Med_ShowMedia (struct Media *Media,
} }
/***** End media container *****/ /***** End media container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1642,7 +1643,7 @@ static void Med_ShowGIF (struct Media *Media,
"GIF" "GIF"
"</span>"); "</span>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
fprintf (Gbl.F.Out,"%s",Txt_File_not_found); fprintf (Gbl.F.Out,"%s",Txt_File_not_found);
@ -1734,8 +1735,8 @@ static void Med_ShowYoutube (struct Media *Media,const char *ClassMedia)
if (Media->Title[0]) if (Media->Title[0])
fprintf (Gbl.F.Out," title=\"%s\"",Media->Title); fprintf (Gbl.F.Out," title=\"%s\"",Media->Title);
fprintf (Gbl.F.Out,">" fprintf (Gbl.F.Out,">"
"</iframe>" "</iframe>");
"</div>"); HTM_DIV_End ();
} }
else else
/***** Alert to inform about third party cookies *****/ /***** Alert to inform about third party cookies *****/
@ -1773,8 +1774,8 @@ static void Med_ShowEmbed (struct Media *Media,const char *ClassMedia)
if (Media->Title[0]) if (Media->Title[0])
fprintf (Gbl.F.Out," title=\"%s\"",Media->Title); fprintf (Gbl.F.Out," title=\"%s\"",Media->Title);
fprintf (Gbl.F.Out,">" fprintf (Gbl.F.Out,">"
"</iframe>" "</iframe>");
"</div>"); HTM_DIV_End ();
} }
else else
/***** Alert to inform about third party cookies *****/ /***** Alert to inform about third party cookies *****/

View File

@ -31,6 +31,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_menu.h" #include "swad_menu.h"
#include "swad_parameter.h" #include "swad_parameter.h"
@ -375,18 +376,18 @@ void Mnu_WriteMenuThisTab (void)
/***** Text *****/ /***** Text *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT %s\">" fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT %s\">"
"%s" "%s",
"</div>",
The_ClassTxtMenu[Gbl.Prefs.Theme], The_ClassTxtMenu[Gbl.Prefs.Theme],
Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]); Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
HTM_DIV_End ();
/***** End link and form *****/ /***** End link and form *****/
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</a>"); fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
/***** End container used to highlight this option *****/ /***** End container used to highlight this option *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End element *****/ /***** End element *****/
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
@ -424,7 +425,7 @@ void Mnu_PutIconsToSelectMenu (void)
Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu); Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu);
Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]); Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();

View File

@ -370,7 +370,7 @@ static void Msg_PutLinkToShowMorePotentialRecipients (void)
"users.svg", "users.svg",
Txt_Show_more_recipients, Txt_Show_more_recipients,
"CopyMessageToHiddenFields();"); "CopyMessageToHiddenFields();");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -446,13 +446,15 @@ static void Msg_ShowOneUniqueRecipient (void)
Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" : Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" :
"DAT_SMALL_NOBR"); "DAT_SMALL_NOBR");
ID_WriteUsrIDs (&Gbl.Usrs.Other.UsrDat,NULL); ID_WriteUsrIDs (&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Write user's name *****/ /***** Write user's name *****/
fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">"
"%s",
Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" : Gbl.Usrs.Other.UsrDat.Accepted ? "DAT_SMALL_NOBR_N" :
"DAT_SMALL_NOBR", "DAT_SMALL_NOBR",
Gbl.Usrs.Other.UsrDat.FullName); Gbl.Usrs.Other.UsrDat.FullName);
HTM_DIV_End ();
/***** Hidden parameter with user's nickname *****/ /***** Hidden parameter with user's nickname *****/
Msg_PutHiddenParamAnotherRecipient (&Gbl.Usrs.Other.UsrDat); Msg_PutHiddenParamAnotherRecipient (&Gbl.Usrs.Other.UsrDat);
@ -1666,7 +1668,7 @@ void Msg_ShowRecMsgs (void)
{ {
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Msg_PutLinkToViewBannedUsers (); Msg_PutLinkToViewBannedUsers ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Show the received messages *****/ /***** Show the received messages *****/
@ -1762,7 +1764,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
Msg_ShowFormSelectCourseSentOrRecMsgs (); Msg_ShowFormSelectCourseSentOrRecMsgs ();
if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED) if (Gbl.Msg.TypeOfMessages == Msg_MESSAGES_RECEIVED)
Msg_ShowFormToShowOnlyUnreadMessages (); Msg_ShowFormToShowOnlyUnreadMessages ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Msg_ShowFormToFilterMsgs (); Msg_ShowFormToFilterMsgs ();
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
@ -1770,7 +1772,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
The_ClassFormInBoxBold[Gbl.Prefs.Theme], The_ClassFormInBoxBold[Gbl.Prefs.Theme],
NULL); NULL);
Ico_PutCalculateIconWithText (Txt_Update_messages); Ico_PutCalculateIconWithText (Txt_Update_messages);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
@ -3230,7 +3232,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_2_LINES\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"AUTHOR_2_LINES\">"); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
{ {
@ -3280,10 +3282,12 @@ bool Msg_WriteCrsOrgMsg (long CrsCod)
{ {
ThereIsOrgCrs = true; ThereIsOrgCrs = true;
if ((FromThisCrs = (CrsCod == Gbl.Hierarchy.Crs.CrsCod))) // Message sent from current course if ((FromThisCrs = (CrsCod == Gbl.Hierarchy.Crs.CrsCod))) // Message sent from current course
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">" {
"(%s)" fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">"
"</div>", "(%s)",
Txt_from_this_course); Txt_from_this_course);
HTM_DIV_End ();
}
else // Message sent from another course else // Message sent from another course
{ {
/* Write course, including link */ /* Write course, including link */
@ -3295,18 +3299,20 @@ bool Msg_WriteCrsOrgMsg (long CrsCod)
Txt_Go_to_X, Txt_Go_to_X,
Crs.FullName); Crs.FullName);
Frm_LinkFormSubmit (Gbl.Title,"AUTHOR_TXT",NULL); Frm_LinkFormSubmit (Gbl.Title,"AUTHOR_TXT",NULL);
fprintf (Gbl.F.Out,"%s</a>)" fprintf (Gbl.F.Out,"%s</a>)",
"</div>",
Crs.ShrtName); Crs.ShrtName);
HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }
} }
} }
if (!ThereIsOrgCrs) // It's an old message without origin source specified, or is a message sent from none course if (!ThereIsOrgCrs) // It's an old message without origin source specified, or is a message sent from none course
{
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">" fprintf (Gbl.F.Out,"<div class=\"AUTHOR_TXT\">"
"(%s)" "(%s)",
"</div>",
Txt_no_course_of_origin); Txt_no_course_of_origin);
HTM_DIV_End ();
}
return FromThisCrs; return FromThisCrs;
} }

View File

@ -240,7 +240,7 @@ void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat)
} }
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -257,11 +257,11 @@ static void Net_ShowAWebOrSocialNet (const char *URL,
"<img src=\"%s/%s\"" "<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />"
"</a>" "</a>",
"</div>",
URL,Title, URL,Title,
Cfg_URL_ICON_PUBLIC,Icon, Cfg_URL_ICON_PUBLIC,Icon,
Title,Title); Title,Title);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -36,6 +36,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_notice.h" #include "swad_notice.h"
#include "swad_notification.h" #include "swad_notification.h"
#include "swad_parameter.h" #include "swad_parameter.h"
@ -475,9 +476,9 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
"<img src=\"%s/rss-square.svg\"" "<img src=\"%s/rss-square.svg\""
" alt=\"RSS\" title=\"RSS\"" " alt=\"RSS\" title=\"RSS\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />"
"</a>" "</a>",
"</div>",
Cfg_URL_ICON_PUBLIC); Cfg_URL_ICON_PUBLIC);
HTM_DIV_End ();
break; break;
case Not_LIST_FULL_NOTICES: case Not_LIST_FULL_NOTICES:
/***** Button to add new notice *****/ /***** Button to add new notice *****/
@ -703,15 +704,18 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
fprintf (Gbl.F.Out,"<script type=\"text/javascript\">" fprintf (Gbl.F.Out,"<script type=\"text/javascript\">"
"writeLocalDateHMSFromUTC('not_date_%u',%ld," "writeLocalDateHMSFromUTC('not_date_%u',%ld,"
"%u,'<br />','%s',true,false,0x6);" "%u,'<br />','%s',true,false,0x6);"
"</script>" "</script>",
"</div>",
UniqueId,(long) TimeUTC, UniqueId,(long) TimeUTC,
(unsigned) Gbl.Prefs.DateFormat,Txt_Today); (unsigned) Gbl.Prefs.DateFormat,Txt_Today);
HTM_DIV_End ();
/***** Write the content of the notice *****/ /***** Write the content of the notice *****/
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES) if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
{ {
fprintf (Gbl.F.Out,"<div class=\"NOTICE_TEXT_BRIEF\">%s</div>",Content); fprintf (Gbl.F.Out,"<div class=\"NOTICE_TEXT_BRIEF\">"
"%s",
Content);
HTM_DIV_End ();
/* Put form to view full notice */ /* Put form to view full notice */
fprintf (Gbl.F.Out,"<div class=\"CM\">"); fprintf (Gbl.F.Out,"<div class=\"CM\">");
@ -719,11 +723,15 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,Not_PutParams, Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,Not_PutParams,
"ellipsis-h.svg", "ellipsis-h.svg",
Txt_See_full_notice); Txt_See_full_notice);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>", {
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s",
TextClass[Status],Content); TextClass[Status],Content);
HTM_DIV_End ();
}
/***** Write the author *****/ /***** Write the author *****/
fprintf (Gbl.F.Out,"<div class=\"NOTICE_AUTHOR %s\">", // Limited width fprintf (Gbl.F.Out,"<div class=\"NOTICE_AUTHOR %s\">", // Limited width
@ -733,16 +741,16 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS)) // Get from the database the data of the autor if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS)) // Get from the database the data of the autor
Usr_WriteFirstNameBRSurnames (&UsrDat); Usr_WriteFirstNameBRSurnames (&UsrDat);
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End yellow note *****/ /***** End yellow note *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End article for this notice *****/ /***** End article for this notice *****/
if (TypeNoticesListing == Not_LIST_FULL_NOTICES) if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
{ {
if (Highlight) if (Highlight)
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Lay_EndArticle (); Lay_EndArticle ();
} }

View File

@ -380,7 +380,7 @@ void Ntf_ShowMyNotifications (void)
"envelope.svg", "envelope.svg",
Txt_Domains); Txt_Domains);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start box *****/ /***** Start box *****/
Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif, Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif,

View File

@ -32,6 +32,7 @@
#include "swad_form.h" #include "swad_form.h"
#include "swad_forum.h" #include "swad_forum.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_project.h" #include "swad_project.h"
@ -131,7 +132,7 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
Pag_WriteLinksToPages (WhatPaginate, Pag_WriteLinksToPages (WhatPaginate,
ThrCod, ThrCod,
Pagination,true,NULL,"PAG_TXT",false); Pagination,true,NULL,"PAG_TXT",false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -253,7 +254,7 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
} }
else else
fprintf (Gbl.F.Out,"</span>"); fprintf (Gbl.F.Out,"</span>");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Links to several pages start here *****/ /***** Links to several pages start here *****/

View File

@ -899,13 +899,13 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
"<input type=\"password\" name=\"OthUsrPwd\"" "<input type=\"password\" name=\"OthUsrPwd\""
" size=\"16\" maxlength=\"%u\"" " size=\"16\" maxlength=\"%u\""
" autocomplete=\"off\" required=\"required\" />" " autocomplete=\"off\" required=\"required\" />"
"</label>" "</label>",
"</div>",
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_I_understand_that_this_action_can_not_be_undone, Txt_I_understand_that_this_action_can_not_be_undone,
The_ClassFormInBox[Gbl.Prefs.Theme], The_ClassFormInBox[Gbl.Prefs.Theme],
Txt_For_security_enter_your_password, Txt_For_security_enter_your_password,
Pwd_MAX_CHARS_PLAIN_PASSWORD); Pwd_MAX_CHARS_PLAIN_PASSWORD);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -787,11 +787,11 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
fprintf (Gbl.F.Out,"<div class=\"TIT CM\">" fprintf (Gbl.F.Out,"<div class=\"TIT CM\">"
"<img src=\"%s/%s_map.jpg\"" "<img src=\"%s/%s_map.jpg\""
" usemap=\"#faces_map\"" " usemap=\"#faces_map\""
" alt=\"%s\" title=\"%s\" />" " alt=\"%s\" title=\"%s\" />",
"</div>",
Cfg_URL_PHOTO_TMP_PUBLIC, Cfg_URL_PHOTO_TMP_PUBLIC,
Gbl.UniqueNameEncrypted, Gbl.UniqueNameEncrypted,
Txt_Faces_detected,Txt_Faces_detected); Txt_Faces_detected,Txt_Faces_detected);
HTM_DIV_End ();
/***** End alert *****/ /***** End alert *****/
Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL); Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
@ -1213,22 +1213,23 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
/* First name and surnames */ /* First name and surnames */
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_N_BOLD\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_N_BOLD\">"); // Limited width
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Nickname */ /* Nickname */
if (UsrDat->Nickname[0]) if (UsrDat->Nickname[0])
{
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL_N\">" fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL_N\">"
"@%s" "@%s",
"</div>",
UsrDat->Nickname); UsrDat->Nickname);
HTM_DIV_End ();
}
/* Institution full name and institution country */ /* Institution full name and institution country */
if (UsrDat->InsCod > 0) if (UsrDat->InsCod > 0)
{ {
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">"); fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">");
Ins_WriteInstitutionNameAndCty (UsrDat->InsCod); Ins_WriteInstitutionNameAndCty (UsrDat->InsCod);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* User's country */ /* User's country */
else if (UsrDat->CtyCod > 0) else if (UsrDat->CtyCod > 0)
@ -1236,20 +1237,22 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">"); fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">");
Cty_WriteCountryName (UsrDat->CtyCod, Cty_WriteCountryName (UsrDat->CtyCod,
NULL); // Don't put link to country NULL); // Don't put link to country
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* Main degree (in which the user has more courses) short name */ /* Main degree (in which the user has more courses) short name */
Usr_GetMainDeg (UsrDat->UsrCod,MainDegreeShrtName,&MaxRole); Usr_GetMainDeg (UsrDat->UsrCod,MainDegreeShrtName,&MaxRole);
if (MainDegreeShrtName[0]) if (MainDegreeShrtName[0])
{
fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">" fprintf (Gbl.F.Out,"<div class=\"ZOOM_TXT_LINE DAT_SMALL\">"
"<div class=\"ZOOM_DEG\"" "<div class=\"ZOOM_DEG\""
" style=\"background-image:url('%s/%s');\">" " style=\"background-image:url('%s/%s');\">"
"%s" "%s",
"</div>"
"</div>",
Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole], Cfg_URL_ICON_PUBLIC,Rol_Icons[MaxRole],
MainDegreeShrtName); MainDegreeShrtName);
HTM_DIV_End ();
HTM_DIV_End ();
}
/* Following and followers */ /* Following and followers */
if (UsrDat->Nickname[0]) // Get social data only if nickname is retrieved (in some actions) if (UsrDat->Nickname[0]) // Get social data only if nickname is retrieved (in some actions)
@ -1259,13 +1262,13 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
"<span class=\"DAT_N_BOLD\">%u</span>" "<span class=\"DAT_N_BOLD\">%u</span>"
"<span class=\"DAT_SMALL\">&nbsp;%s&nbsp;</span>" "<span class=\"DAT_SMALL\">&nbsp;%s&nbsp;</span>"
"<span class=\"DAT_N_BOLD\">%u</span>" "<span class=\"DAT_N_BOLD\">%u</span>"
"<span class=\"DAT_SMALL\">&nbsp;%s</span>" "<span class=\"DAT_SMALL\">&nbsp;%s</span>",
"</div>",
NumFollowing,Txt_Following, NumFollowing,Txt_Following,
NumFollowers,Txt_Followers); NumFollowers,Txt_Followers);
HTM_DIV_End ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Start image *****/ /***** Start image *****/
@ -2053,7 +2056,7 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
/***** End selector, form and div *****/ /***** End selector, form and div *****/
fprintf (Gbl.F.Out,"</select>"); fprintf (Gbl.F.Out,"</select>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free list of all the degrees with students *****/ /***** Free list of all the degrees with students *****/
Deg_FreeListDegs (&Degs); Deg_FreeListDegs (&Degs);
@ -2490,10 +2493,10 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
Frm_SetUniqueId (IdCaption); Frm_SetUniqueId (IdCaption);
fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"NOT_SHOWN\">" fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"NOT_SHOWN\">"
"<div class=\"ZOOM_TXT_LINE DAT_N\">" "<div class=\"ZOOM_TXT_LINE DAT_N\">"
"%s" "%s",
"</div>"
"</div>",
IdCaption,PhotoCaption); IdCaption,PhotoCaption);
HTM_DIV_End ();
HTM_DIV_End ();
} }
} }
} }
@ -2520,13 +2523,13 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
"%s<br />" "%s<br />"
"%d&nbsp;%s<br />" "%d&nbsp;%s<br />"
"%d&nbsp;%s<br />" "%d&nbsp;%s<br />"
"(%d%%)" "(%d%%)",
"</div>",
Deg->ShrtName, Deg->ShrtName,
NumStds,Txt_students_ABBREVIATION, NumStds,Txt_students_ABBREVIATION,
NumStdsWithPhoto,Txt_photos, NumStdsWithPhoto,Txt_photos,
NumStds > 0 ? (int) (((NumStdsWithPhoto * 100.0) / NumStds) + 0.5) : NumStds > 0 ? (int) (((NumStdsWithPhoto * 100.0) / NumStds) + 0.5) :
0); 0);
HTM_DIV_End ();
if (SeeOrPrint == Pho_DEGREES_SEE) if (SeeOrPrint == Pho_DEGREES_SEE)
{ {
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");

View File

@ -191,7 +191,7 @@ void Prf_RequestUserProfile (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Prf_PutLinkMyPublicProfile (); Prf_PutLinkMyPublicProfile ();
Fol_PutLinkWhoToFollow (); Fol_PutLinkWhoToFollow ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Begin form *****/ /***** Begin form *****/
@ -300,7 +300,7 @@ bool Prf_ShowUserProfile (struct UsrData *UsrDat)
/* Put link to show users to follow */ /* Put link to show users to follow */
Fol_PutLinkWhoToFollow (); Fol_PutLinkWhoToFollow ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Shared record card *****/ /***** Shared record card *****/
@ -420,8 +420,8 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
Prf_ShowNumFilesCurrentlyPublished (UsrDat); Prf_ShowNumFilesCurrentlyPublished (UsrDat);
/* End left list */ /* End left list */
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>"); HTM_DIV_End ();
/***** Right list *****/ /***** Right list *****/
fprintf (Gbl.F.Out,"<div class=\"PRF_FIG_RIGHT_CONTAINER\">"); fprintf (Gbl.F.Out,"<div class=\"PRF_FIG_RIGHT_CONTAINER\">");
@ -451,7 +451,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"</ul>"); fprintf (Gbl.F.Out,"</ul>");
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1783,8 +1783,8 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
fprintf (Gbl.F.Out,"<div class=\"RANK_USR\">"); // Limited width fprintf (Gbl.F.Out,"<div class=\"RANK_USR\">"); // Limited width
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT_SMALL",NULL); Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT_SMALL",NULL);
Usr_WriteFirstNameBRSurnames (UsrDat); Usr_WriteFirstNameBRSurnames (UsrDat);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }
HTM_TD_End (); HTM_TD_End ();

View File

@ -434,7 +434,7 @@ static void Prj_ShowFormToFilterByMy_All (void)
Ico_PutSettingIconLink (WhoseProjectsIcon[My_All], Ico_PutSettingIconLink (WhoseProjectsIcon[My_All],
Txt_PROJECT_MY_ALL_PROJECTS[My_All]); Txt_PROJECT_MY_ALL_PROJECTS[My_All]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -470,7 +470,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
Ico_PutSettingIconLink (PreassignedNonpreassigImage[PreNon], Ico_PutSettingIconLink (PreassignedNonpreassigImage[PreNon],
Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]); Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -511,7 +511,7 @@ static void Prj_ShowFormToFilterByHidden (void)
Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis], Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis],
Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]); Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -552,7 +552,7 @@ static void Prj_ShowFormToFilterByWarning (void)
Ico_PutSettingIconLink (FaultinessIcon[Faultiness], Ico_PutSettingIconLink (FaultinessIcon[Faultiness],
Txt_PROJECT_FAULTY_FAULTLESS_PROJECTS[Faultiness]); Txt_PROJECT_FAULTY_FAULTLESS_PROJECTS[Faultiness]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
} }
@ -589,7 +589,7 @@ static void Prj_ShowFormToFilterByDpt (void)
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2516,7 +2516,7 @@ static void Prj_PutFormsToRemEditOnePrj (const struct Project *Prj,
/* Put form to lock/unlock project edition */ /* Put form to lock/unlock project edition */
fprintf (Gbl.F.Out,"<div id=\"prj_lck_%ld\">",Prj->PrjCod); fprintf (Gbl.F.Out,"<div id=\"prj_lck_%ld\">",Prj->PrjCod);
Prj_FormLockUnlock (Prj); Prj_FormLockUnlock (Prj);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else else
/* Put icon toinform about locked/unlocked project edition */ /* Put icon toinform about locked/unlocked project edition */

View File

@ -983,7 +983,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
Usr_PutHiddenParSelectedUsrsCods (); Usr_PutHiddenParSelectedUsrsCods ();
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
@ -1020,10 +1020,10 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
/* Shared record */ /* Shared record */
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId); Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* End container for this user */ /* End container for this user */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Lay_EndSection (); Lay_EndSection ();
NumUsr++; NumUsr++;
@ -1083,7 +1083,7 @@ static void Rec_ShowRecordOneStdCrs (void)
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show optional alert (result of editing data in course record) *****/ /***** Show optional alert (result of editing data in course record) *****/
Ale_ShowAlerts (NULL); Ale_ShowAlerts (NULL);
@ -1094,7 +1094,7 @@ static void Rec_ShowRecordOneStdCrs (void)
/***** Shared record *****/ /***** Shared record *****/
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL); Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Record of the student in the course *****/ /***** Record of the student in the course *****/
if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record
@ -1107,7 +1107,7 @@ static void Rec_ShowRecordOneStdCrs (void)
{ {
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (Rec_CRS_MY_RECORD_AS_STUDENT_FORM,&Gbl.Usrs.Other.UsrDat,NULL); Rec_ShowCrsRecord (Rec_CRS_MY_RECORD_AS_STUDENT_FORM,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
break; break;
case Rol_NET: case Rol_NET:
@ -1115,7 +1115,7 @@ static void Rec_ShowRecordOneStdCrs (void)
case Rol_SYS_ADM: case Rol_SYS_ADM:
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (Rec_CRS_LIST_ONE_RECORD,&Gbl.Usrs.Other.UsrDat,NULL); Rec_ShowCrsRecord (Rec_CRS_LIST_ONE_RECORD,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -1123,7 +1123,7 @@ static void Rec_ShowRecordOneStdCrs (void)
} }
/***** End container for this user *****/ /***** End container for this user *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free list of fields of records *****/ /***** Free list of fields of records *****/
Rec_FreeListFields (); Rec_FreeListFields ();
@ -1183,7 +1183,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
Usr_PutHiddenParSelectedUsrsCods (); Usr_PutHiddenParSelectedUsrsCods ();
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
@ -1222,7 +1222,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
/* Shared record */ /* Shared record */
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (ShaTypeOfView,&UsrDat,RecordSectionId); Rec_ShowSharedUsrRecord (ShaTypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Record of the student in the course */ /* Record of the student in the course */
if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record if (Gbl.Crs.Records.LstFields.Num) // There are fields in the record
@ -1236,12 +1236,12 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
{ {
fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_RIGHT\">");
Rec_ShowCrsRecord (CrsTypeOfView,&UsrDat,RecordSectionId); Rec_ShowCrsRecord (CrsTypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
/* End container for this user */ /* End container for this user */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Lay_EndSection (); Lay_EndSection ();
NumUsr++; NumUsr++;
@ -1315,7 +1315,7 @@ static void Rec_ShowRecordOneTchCrs (void)
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start container for this user *****/ /***** Start container for this user *****/
fprintf (Gbl.F.Out,"<div class=\"REC_USR\">"); fprintf (Gbl.F.Out,"<div class=\"REC_USR\">");
@ -1323,7 +1323,7 @@ static void Rec_ShowRecordOneTchCrs (void)
/***** Shared record *****/ /***** Shared record *****/
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL); Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST,&Gbl.Usrs.Other.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Office hours *****/ /***** Office hours *****/
if (ShowOfficeHours) if (ShowOfficeHours)
@ -1334,11 +1334,11 @@ static void Rec_ShowRecordOneTchCrs (void)
Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE); Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE);
TT_ShowTimeTable (Gbl.Usrs.Other.UsrDat.UsrCod); TT_ShowTimeTable (Gbl.Usrs.Other.UsrDat.UsrCod);
Box_EndBox (); Box_EndBox ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Start container for this user *****/ /***** Start container for this user *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1404,7 +1404,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
Rec_ShowLinkToPrintPreviewOfRecords (); Rec_ShowLinkToPrintPreviewOfRecords ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Initialize structure with user's data *****/ /***** Initialize structure with user's data *****/
@ -1443,7 +1443,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
/* Shared record */ /* Shared record */
fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">"); fprintf (Gbl.F.Out,"<div class=\"REC_LEFT\">");
Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId); Rec_ShowSharedUsrRecord (TypeOfView,&UsrDat,RecordSectionId);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Office hours */ /* Office hours */
if (ShowOfficeHours) if (ShowOfficeHours)
@ -1454,11 +1454,11 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE); Hlp_USERS_Teachers_timetable,Box_NOT_CLOSABLE);
TT_ShowTimeTable (UsrDat.UsrCod); TT_ShowTimeTable (UsrDat.UsrCod);
Box_EndBox (); Box_EndBox ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* End container for this user */ /* End container for this user */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Lay_EndSection (); Lay_EndSection ();
NumUsr++; NumUsr++;
@ -2106,7 +2106,7 @@ void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat)
/***** Show user's record *****/ /***** Show user's record *****/
fprintf (Gbl.F.Out,"<div class=\"CM\">"); fprintf (Gbl.F.Out,"<div class=\"CM\">");
Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_USR_CHECK,UsrDat,NULL); Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_USR_CHECK,UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2631,7 +2631,7 @@ static void Rec_PutIconsCommands (void)
Acc_PutIconToChangeUsrAccount (); Acc_PutIconToChangeUsrAccount ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -2757,7 +2757,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat)
/***** Surname 2 *****/ /***** Surname 2 *****/
fprintf (Gbl.F.Out,"%s",UsrDat->Surname2); fprintf (Gbl.F.Out,"%s",UsrDat->Surname2);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
} }
@ -2792,7 +2792,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
Frm_EndForm (); Frm_EndForm ();
} }
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
} }
@ -2849,7 +2849,7 @@ static void Rec_ShowEmail (struct UsrData *UsrDat,const char *ClassForm)
UsrDat->Email); UsrDat->Email);
else else
fprintf (Gbl.F.Out,"********"); fprintf (Gbl.F.Out,"********");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
HTM_TD_End (); HTM_TD_End ();
@ -3766,10 +3766,10 @@ static void Rec_WriteLinkToDataProtectionClause (void)
extern const char *Txt_DATA_PROTECTION_CLAUSE; extern const char *Txt_DATA_PROTECTION_CLAUSE;
fprintf (Gbl.F.Out,"<div class=\"CM\">" fprintf (Gbl.F.Out,"<div class=\"CM\">"
"<a class=\"TIT\" href=\"%s/\" target=\"_blank\">%s</a>" "<a class=\"TIT\" href=\"%s/\" target=\"_blank\">%s</a>",
"</div>",
Cfg_URL_DATA_PROTECTION_PUBLIC, Cfg_URL_DATA_PROTECTION_PUBLIC,
Txt_DATA_PROTECTION_CLAUSE); Txt_DATA_PROTECTION_CLAUSE);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3971,7 +3971,7 @@ void Rec_ShowMySharedRecordAndMore (void)
/* My shared record card */ /* My shared record card */
Rec_ShowSharedUsrRecord (Rec_SHA_MY_RECORD_FORM,&Gbl.Usrs.Me.UsrDat,NULL); Rec_ShowSharedUsrRecord (Rec_SHA_MY_RECORD_FORM,&Gbl.Usrs.Me.UsrDat,NULL);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right part *****/ /***** Right part *****/
/* Start container for right part */ /* Start container for right part */
@ -3984,10 +3984,10 @@ void Rec_ShowMySharedRecordAndMore (void)
Net_ShowFormMyWebsAndSocialNets (); Net_ShowFormMyWebsAndSocialNets ();
/* End container for right part */ /* End container for right part */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Data protection clause *****/ /***** Data protection clause *****/
Rec_WriteLinkToDataProtectionClause (); Rec_WriteLinkToDataProtectionClause ();

View File

@ -32,6 +32,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_ID.h" #include "swad_ID.h"
#include "swad_profile.h" #include "swad_profile.h"
#include "swad_tab.h" #include "swad_tab.h"
@ -279,15 +280,17 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report)
"<img src=\"%s/file-alt.svg\" alt=\"%s\"" "<img src=\"%s/file-alt.svg\" alt=\"%s\""
" class=\"ICO64x64\" /><br />" " class=\"ICO64x64\" /><br />"
"%s" "%s"
"</a>" "</a>",
"</div>",
Report->Permalink, Report->Permalink,
Txt_Report, Txt_Report,
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Report, Txt_Report,
Report->FilenameReport); Report->FilenameReport);
fprintf (Gbl.F.Out,"<div class=\"DAT_LIGHT\">%s</div>", HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"DAT_LIGHT\">"
"%s",
Txt_This_link_will_remain_active_as_long_as_your_user_s_account_exists); Txt_This_link_will_remain_active_as_long_as_your_user_s_account_exists);
HTM_DIV_End ();
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -318,7 +321,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
CurrentTimeUTC->StrDate, CurrentTimeUTC->StrDate,
CurrentTimeUTC->StrTime); CurrentTimeUTC->StrTime);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -32,6 +32,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_parameter.h" #include "swad_parameter.h"
@ -154,8 +155,8 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
Gbl.Scope.Default = DefaultScope; Gbl.Scope.Default = DefaultScope;
Sco_GetScope ("ScopeSch"); Sco_GetScope ("ScopeSch");
Sco_PutSelectorScope ("ScopeSch",false); Sco_PutSelectorScope ("ScopeSch",false);
fprintf (Gbl.F.Out,"</label>" fprintf (Gbl.F.Out,"</label>");
"</div>"); HTM_DIV_End ();
/***** String to find *****/ /***** String to find *****/
Sch_PutInputStringToSearch (NULL); Sch_PutInputStringToSearch (NULL);
@ -191,7 +192,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -234,7 +235,7 @@ void Sch_PutFormToSearchInPageTopHeading (void)
Sch_PutInputStringToSearch ("head_search_text"); Sch_PutInputStringToSearch ("head_search_text");
Sch_PutMagnifyingGlassButton ("search-white.svg"); Sch_PutMagnifyingGlassButton ("search-white.svg");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); // head_row_1_search HTM_DIV_End (); // head_row_1_search
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -38,6 +38,7 @@
#include "swad_date.h" #include "swad_date.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_language.h" #include "swad_language.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_notification.h" #include "swad_notification.h"
@ -80,13 +81,13 @@ void Set_EditSettings (void)
Hlp_PROFILE_Settings_internationalization,Box_NOT_CLOSABLE); Hlp_PROFILE_Settings_internationalization,Box_NOT_CLOSABLE);
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Lan_PutBoxToSelectLanguage (); // 1. Language Lan_PutBoxToSelectLanguage (); // 1. Language
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Dat_PutBoxToSelectDateFormat (); // 3. Date format Dat_PutBoxToSelectDateFormat (); // 3. Date format
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
/***** Design: icon set, menu, theme, side columns *****/ /***** Design: icon set, menu, theme, side columns *****/
@ -94,16 +95,16 @@ void Set_EditSettings (void)
Hlp_PROFILE_Settings_design,Box_NOT_CLOSABLE); Hlp_PROFILE_Settings_design,Box_NOT_CLOSABLE);
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Ico_PutIconsToSelectIconSet (); // 4. Icon set Ico_PutIconsToSelectIconSet (); // 4. Icon set
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Mnu_PutIconsToSelectMenu (); // 5. Menu Mnu_PutIconsToSelectMenu (); // 5. Menu
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
The_PutIconsToSelectTheme (); // 6. Theme The_PutIconsToSelectTheme (); // 6. Theme
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"<div class=\"FRAME_INLINE\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
Set_PutIconsToSelectSideCols (); // 7. Side columns Set_PutIconsToSelectSideCols (); // 7. Side columns
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
if (Gbl.Usrs.Me.Logged) if (Gbl.Usrs.Me.Logged)
@ -255,7 +256,7 @@ static void Set_PutIconsToSelectSideCols (void)
SideCols >> 1,SideCols & 1); SideCols >> 1,SideCols & 1);
Ico_PutSettingIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]); Ico_PutSettingIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();
@ -390,7 +391,7 @@ void Set_StartSettingsHead (void)
void Set_EndSettingsHead (void) void Set_EndSettingsHead (void)
{ {
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
void Set_StartOneSettingSelector (void) void Set_StartOneSettingSelector (void)
@ -400,5 +401,5 @@ void Set_StartOneSettingSelector (void)
void Set_EndOneSettingSelector (void) void Set_EndOneSettingSelector (void)
{ {
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }

View File

@ -324,7 +324,7 @@ void Sta_AskShowCrsHits (void)
/* Link to show last clicks in real time */ /* Link to show last clicks in real time */
Sta_PutLinkToLastClicks (); Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Get and update type of list, /***** Get and update type of list,
number of columns in class photo number of columns in class photo
@ -531,7 +531,7 @@ void Sta_AskShowGblHits (void)
/* Link to show last clicks in real time */ /* Link to show last clicks in real time */
Sta_PutLinkToLastClicks (); Sta_PutLinkToLastClicks ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Begin form *****/ /***** Begin form *****/
Frm_StartFormAnchor (ActSeeAccGbl,Sta_STAT_RESULTS_SECTION_ID); Frm_StartFormAnchor (ActSeeAccGbl,Sta_STAT_RESULTS_SECTION_ID);
@ -4003,7 +4003,7 @@ void Sta_ShowLastClicks (void)
/* Put form to go to test edition and configuration */ /* Put form to go to test edition and configuration */
Sta_PutLinkToCourseHits (); Sta_PutLinkToCourseHits ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start box *****/ /***** Start box *****/
Box_StartBox (NULL,Txt_Last_clicks_in_real_time,NULL, Box_StartBox (NULL,Txt_Last_clicks_in_real_time,NULL,
@ -4013,7 +4013,7 @@ void Sta_ShowLastClicks (void)
fprintf (Gbl.F.Out,"<div id=\"lastclicks\"" // Used for AJAX based refresh fprintf (Gbl.F.Out,"<div id=\"lastclicks\"" // Used for AJAX based refresh
" class=\"CM\">"); " class=\"CM\">");
Sta_GetAndShowLastClicks (); Sta_GetAndShowLastClicks ();
fprintf (Gbl.F.Out,"</div>"); // Used for AJAX based refresh HTM_DIV_End (); // Used for AJAX based refresh
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();

View File

@ -537,13 +537,15 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
Lay_EndArticle (); Lay_EndArticle ();
/* Number of questions and number of distinct users who have already answered this survey */ /* Number of questions and number of distinct users who have already answered this survey */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s: %u; %s: %u</div>", fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s: %u; %s: %u",
Svy.Status.Visible ? "ASG_GRP" : Svy.Status.Visible ? "ASG_GRP" :
"ASG_GRP_LIGHT", "ASG_GRP_LIGHT",
Txt_No_of_questions, Txt_No_of_questions,
Svy.NumQsts, Svy.NumQsts,
Txt_No_of_users, Txt_No_of_users,
Svy.NumUsrs); Svy.NumUsrs);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/* Status of the survey */ /* Status of the survey */
@ -568,7 +570,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
Btn_PutCreateButtonInline (Txt_Answer_survey); Btn_PutCreateButtonInline (Txt_Answer_survey);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* Possible button to see the result of the survey */ /* Possible button to see the result of the survey */
else if (Svy.Status.ICanViewResults) else if (Svy.Status.ICanViewResults)
@ -583,7 +585,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
Btn_PutConfirmButtonInline (Txt_View_survey_results); Btn_PutConfirmButtonInline (Txt_View_survey_results);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -636,7 +638,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
fprintf (Gbl.F.Out,"%s %s",Txt_Course,Gbl.Hierarchy.Crs.ShrtName); fprintf (Gbl.F.Out,"%s %s",Txt_Course,Gbl.Hierarchy.Crs.ShrtName);
break; break;
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Users' roles who can answer the survey */ /* Users' roles who can answer the survey */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s:<br />", fprintf (Gbl.F.Out,"<div class=\"%s\">%s:<br />",
@ -648,7 +650,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
1 << Rol_TCH, 1 << Rol_TCH,
Svy.Roles, Svy.Roles,
true,false); true,false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Groups whose users can answer this survey */ /* Groups whose users can answer this survey */
if (Svy.Scope == Hie_CRS) if (Svy.Scope == Hie_CRS)
@ -660,10 +662,12 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<div class=\"PAR %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"PAR %s\">"
"%s",
Svy.Status.Visible ? "DAT" : Svy.Status.Visible ? "DAT" :
"DAT_LIGHT", "DAT_LIGHT",
Txt); Txt);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -2476,7 +2480,7 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Survey *Svy)
fprintf (Gbl.F.Out,"%s %s", fprintf (Gbl.F.Out,"%s %s",
Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName); Txt_The_whole_course,Gbl.Hierarchy.Crs.ShrtName);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);

View File

@ -160,8 +160,8 @@ void Syl_PutFormWhichSyllabus (void)
"</li>", "</li>",
Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]); Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>"); HTM_DIV_End ();
Frm_EndForm (); Frm_EndForm ();
} }

View File

@ -27,6 +27,7 @@
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_tab.h" #include "swad_tab.h"
@ -138,8 +139,8 @@ void Tab_DrawTabs (void)
The_ClassTxtTabOff[Gbl.Prefs.Theme],NULL); The_ClassTxtTabOff[Gbl.Prefs.Theme],NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"TAB_ICO\" />" " class=\"TAB_ICO\" />"
"<div class=\"TAB_TXT %s\">%s</div>" "<div class=\"TAB_TXT %s\">"
"</a>", "%s",
Gbl.Prefs.URLIconSet, Gbl.Prefs.URLIconSet,
Tab_GetIcon (NumTab), Tab_GetIcon (NumTab),
Txt_TABS_TXT[NumTab], Txt_TABS_TXT[NumTab],
@ -147,17 +148,19 @@ void Tab_DrawTabs (void)
NumTab == Gbl.Action.Tab ? The_ClassTxtTabOn[Gbl.Prefs.Theme] : NumTab == Gbl.Action.Tab ? The_ClassTxtTabOn[Gbl.Prefs.Theme] :
The_ClassTxtTabOff[Gbl.Prefs.Theme], The_ClassTxtTabOff[Gbl.Prefs.Theme],
Txt_TABS_TXT[NumTab]); Txt_TABS_TXT[NumTab]);
HTM_DIV_End ();
fprintf (Gbl.F.Out,"</a>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</li>"); fprintf (Gbl.F.Out,"</li>");
} }
} }
/***** End tabs container *****/ /***** End tabs container *****/
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>"
"</nav>" "</nav>");
"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -409,7 +409,7 @@ static void Tst_PutFormToViewTstResults (Act_Action_t Action)
Lay_PutContextualLinkIconText (Action,NULL,NULL, Lay_PutContextualLinkIconText (Action,NULL,NULL,
"tasks.svg", "tasks.svg",
Txt_Results); Txt_Results);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -478,9 +478,9 @@ void Tst_ShowNewTest (void)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," />" fprintf (Gbl.F.Out," />"
"&nbsp;%s" "&nbsp;%s"
"</label>" "</label>",
"</div>",
Txt_Allow_teachers_to_consult_this_test); Txt_Allow_teachers_to_consult_this_test);
HTM_DIV_End ();
/***** End form *****/ /***** End form *****/
Btn_PutConfirmButton (Txt_Done_assess_test); Btn_PutConfirmButton (Txt_Done_assess_test);
@ -560,7 +560,7 @@ void Tst_AssessTest (void)
{ {
fprintf (Gbl.F.Out,"<div class=\"TEST_SUBTITLE\">"); fprintf (Gbl.F.Out,"<div class=\"TEST_SUBTITLE\">");
fprintf (Gbl.F.Out,Txt_Test_No_X_that_you_make_in_this_course,NumTst); fprintf (Gbl.F.Out,Txt_Test_No_X_that_you_make_in_this_course,NumTst);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Write answers and solutions *****/ /***** Write answers and solutions *****/
@ -642,13 +642,13 @@ void Tst_ShowTstTotalMark (unsigned NumQsts,double TotalScore)
/***** Write total mark ****/ /***** Write total mark ****/
fprintf (Gbl.F.Out,"<div class=\"DAT CM\">" fprintf (Gbl.F.Out,"<div class=\"DAT CM\">"
"%s: <span class=\"%s\">%.2lf (%.2lf %s %u)</span>" "%s: <span class=\"%s\">%.2lf (%.2lf %s %u)</span>",
"</div>",
Txt_Score, Txt_Score,
(TotalScoreOverSCORE_MAX >= (double) TotalScoreOverSCORE_MAX / 2.0) ? "ANS_OK" : (TotalScoreOverSCORE_MAX >= (double) TotalScoreOverSCORE_MAX / 2.0) ? "ANS_OK" :
"ANS_BAD", "ANS_BAD",
TotalScore, TotalScore,
TotalScoreOverSCORE_MAX,Txt_out_of_PART_OF_A_SCORE,Tst_SCORE_MAX); TotalScoreOverSCORE_MAX,Txt_out_of_PART_OF_A_SCORE,Tst_SCORE_MAX);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1036,15 +1036,21 @@ static void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWith
Gbl.Test.QstCod = QstCod; Gbl.Test.QstCod = QstCod;
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
/***** Write number of question *****/ /***** Write number of question *****/
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">%u</div>",NumQst + 1); "%u",
NumQst + 1);
HTM_DIV_End ();
/***** Write answer type (row[2]) *****/ /***** Write answer type (row[2]) *****/
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">"
"%s",
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/***** Write stem (row[4]) *****/ /***** Write stem (row[4]) *****/
@ -1102,9 +1108,9 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
/***** Write the stem *****/ /***** Write the stem *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">" fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s" "%s",
"</div>",
ClassStem,StemRigorousHTML); ClassStem,StemRigorousHTML);
HTM_DIV_End ();
/***** Free memory allocated for the stem *****/ /***** Free memory allocated for the stem *****/
free ((void *) StemRigorousHTML); free ((void *) StemRigorousHTML);
@ -1177,7 +1183,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT"); Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT");
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else // No current image else // No current image
/***** Attached media *****/ /***** Attached media *****/
@ -1207,9 +1213,9 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback)
/***** Write the feedback *****/ /***** Write the feedback *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">" fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s" "%s",
"</div>",
ClassFeedback,FeedbackRigorousHTML); ClassFeedback,FeedbackRigorousHTML);
HTM_DIV_End ();
/***** Free memory allocated for the feedback *****/ /***** Free memory allocated for the feedback *****/
free ((void *) FeedbackRigorousHTML); free ((void *) FeedbackRigorousHTML);
@ -1285,7 +1291,7 @@ void Tst_ShowFormAskEditTsts (void)
/***** Contextual menu *****/ /***** Contextual menu *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
TsI_PutFormToImportQuestions (); // Put link (form) to import questions from XML file TsI_PutFormToImportQuestions (); // Put link (form) to import questions from XML file
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Start box *****/ /***** Start box *****/
Box_StartBox (NULL,Txt_List_edit_questions,Tst_PutIconsTests, Box_StartBox (NULL,Txt_List_edit_questions,Tst_PutIconsTests,
@ -2410,7 +2416,7 @@ void Tst_ListQuestionsToEdit (void)
else else
/* Button to export questions */ /* Button to export questions */
TsI_PutFormToExportQuestions (); TsI_PutFormToExportQuestions ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Show the table with the questions */ /* Show the table with the questions */
Tst_ListOneOrMoreQuestionsForEdition (NumRows,mysql_res); Tst_ListOneOrMoreQuestionsForEdition (NumRows,mysql_res);
@ -2912,14 +2918,21 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
HTM_TD_End (); HTM_TD_End ();
/* Write number of question */
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">%lu</div>",NumRow + 1);
/* Write number of question */
fprintf (Gbl.F.Out,"<div class=\"BIG_INDEX\">"
"%lu",
NumRow + 1);
HTM_DIV_End ();
/* Write answer type (row[2]) */ /* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">"
"%s",
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/* Write question code */ /* Write question code */
@ -3411,13 +3424,13 @@ void Tst_WriteAnswersEdit (long QstCod)
Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media, Med_ShowMedia (&Gbl.Test.Answer.Options[NumOpt].Media,
"TEST_MED_EDIT_LIST_CONTAINER", "TEST_MED_EDIT_LIST_CONTAINER",
"TEST_MED_EDIT_LIST"); "TEST_MED_EDIT_LIST");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Write the text of the feedback */ /* Write the text of the feedback */
fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">");
if (LengthFeedback) if (LengthFeedback)
fprintf (Gbl.F.Out,"%s",Feedback); fprintf (Gbl.F.Out,"%s",Feedback);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -3881,14 +3894,16 @@ static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
Med_ShowMedia (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Media, Med_ShowMedia (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Media,
"TEST_MED_SHOW_CONTAINER", "TEST_MED_SHOW_CONTAINER",
"TEST_MED_SHOW"); "TEST_MED_SHOW");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback) if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback)
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback[0]) if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback[0])
{
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">" fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">"
"%s" "%s",
"</div>",
Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -4187,10 +4202,10 @@ void Tst_WriteChoiceAnsViewMatch (long MchCod,unsigned QstInd,long QstCod,
/***** Write letter for this option *****/ /***** Write letter for this option *****/
HTM_TD_Begin ("class=\"MCH_TCH_BUTTON_TD\""); HTM_TD_Begin ("class=\"MCH_TCH_BUTTON_TD\"");
fprintf (Gbl.F.Out,"<div class=\"MCH_TCH_BUTTON BT_%c\">" fprintf (Gbl.F.Out,"<div class=\"MCH_TCH_BUTTON BT_%c\">"
"%c" "%c",
"</div>",
'A' + (char) NumOpt, 'A' + (char) NumOpt,
'a' + (char) NumOpt); 'a' + (char) NumOpt);
HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
/***** Write the option text and the result *****/ /***** Write the option text and the result *****/
@ -4369,16 +4384,18 @@ static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat,
/* Answer text and feedback */ /* Answer text and feedback */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
fprintf (Gbl.F.Out,"<div class=\"ANS_0\">" fprintf (Gbl.F.Out,"<div class=\"ANS_0\">"
"%s" "%s",
"</div>",
Gbl.Test.Answer.Options[NumOpt].Text); Gbl.Test.Answer.Options[NumOpt].Text);
HTM_DIV_End ();
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
if (Gbl.Test.Answer.Options[NumOpt].Feedback) if (Gbl.Test.Answer.Options[NumOpt].Feedback)
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0]) if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
{
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">" fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">"
"%s" "%s",
"</div>",
Gbl.Test.Answer.Options[NumOpt].Feedback); Gbl.Test.Answer.Options[NumOpt].Feedback);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -5395,7 +5412,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
"</label>"); "</label>");
/* End of right column */ /* End of right column */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();

View File

@ -514,8 +514,8 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
" spellcheck=\"false\" readonly>", " spellcheck=\"false\" readonly>",
Txt_XML_file_content); Txt_XML_file_content);
XML_PrintTree (RootElem); XML_PrintTree (RootElem);
fprintf (Gbl.F.Out,"</textarea>" fprintf (Gbl.F.Out,"</textarea>");
"</div>"); HTM_DIV_End ();
/***** Get questions from XML tree and print them *****/ /***** Get questions from XML tree and print them *****/
/* Go to <test> element */ /* Go to <test> element */
@ -1153,14 +1153,16 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
/* Write the text and the feedback of the answer */ /* Write the text and the feedback of the answer */
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
fprintf (Gbl.F.Out,"<div class=\"%s\">" fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s" "%s",
"</div>",
ClassStem,AnswerText); ClassStem,AnswerText);
HTM_DIV_End ();
if (AnswerFeedbackLength) if (AnswerFeedbackLength)
{
fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">" fprintf (Gbl.F.Out,"<div class=\"TEST_EDI_LIGHT\">"
"%s" "%s",
"</div>",
AnswerFeedback); AnswerFeedback);
HTM_DIV_End ();
}
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();

View File

@ -33,6 +33,7 @@
#include "swad_database.h" #include "swad_database.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_parameter.h" #include "swad_parameter.h"
#include "swad_setting.h" #include "swad_setting.h"
@ -285,7 +286,7 @@ void The_PutIconsToSelectTheme (void)
The_ThemeId[Theme]); The_ThemeId[Theme]);
Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]); Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();

View File

@ -40,6 +40,7 @@
#include "swad_follow.h" #include "swad_follow.h"
#include "swad_form.h" #include "swad_form.h"
#include "swad_global.h" #include "swad_global.h"
#include "swad_HTML.h"
#include "swad_layout.h" #include "swad_layout.h"
#include "swad_media.h" #include "swad_media.h"
#include "swad_notice.h" #include "swad_notice.h"
@ -1176,7 +1177,7 @@ static void TL_PutFormWhichUsrs (void)
Par_PutHiddenParamUnsigned ("WhichUsrs",WhichUsrs); Par_PutHiddenParamUnsigned ("WhichUsrs",WhichUsrs);
Ico_PutSettingIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]); Ico_PutSettingIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();
@ -1289,7 +1290,7 @@ static void TL_ShowWarningYouDontFollowAnyUser (void)
/***** Put link to show users to follow *****/ /***** Put link to show users to follow *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Fol_PutLinkWhoToFollow (); Fol_PutLinkWhoToFollow ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -1397,10 +1398,10 @@ static void TL_PutLinkToViewNewPublications (void)
"<a href=\"\" class=\"%s\"" "<a href=\"\" class=\"%s\""
" onclick=\"moveNewTimelineToTimeline(); return false;\" />" " onclick=\"moveNewTimelineToTimeline(); return false;\" />"
"%s (<span id=\"view_new_posts_count\">0</span>)" "%s (<span id=\"view_new_posts_count\">0</span>)"
"</a>" "</a>",
"</div>",
The_ClassFormInBoxBold[Gbl.Prefs.Theme], The_ClassFormInBoxBold[Gbl.Prefs.Theme],
Txt_See_new_activity); Txt_See_new_activity);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1427,12 +1428,12 @@ static void TL_PutLinkToViewOldPublications (void)
" src=\"%s/working16x16.gif\" alt=\"%s\" title=\"%s\"" " src=\"%s/working16x16.gif\" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden " class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s" "&nbsp;%s"
"</a>" "</a>",
"</div>",
The_ClassFormInBoxBold[Gbl.Prefs.Theme], The_ClassFormInBoxBold[Gbl.Prefs.Theme],
Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more, Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more,
Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more, Cfg_URL_ICON_PUBLIC,Txt_See_more,Txt_See_more,
Txt_See_more); Txt_See_more);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1510,7 +1511,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,true); // Use unique id "PHOTO45x60",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right: author's name, time, summary and buttons *****/ /***** Right: author's name, time, summary and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">"); fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">");
@ -1577,33 +1578,43 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
case TL_NOTE_INS_DOC_PUB_FILE: case TL_NOTE_INS_DOC_PUB_FILE:
case TL_NOTE_INS_SHA_PUB_FILE: case TL_NOTE_INS_SHA_PUB_FILE:
/* Write location (institution) in hierarchy */ /* Write location (institution) in hierarchy */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>", fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Institution,Ins.ShrtName); Txt_Institution,Ins.ShrtName);
HTM_DIV_End ();
break; break;
case TL_NOTE_CTR_DOC_PUB_FILE: case TL_NOTE_CTR_DOC_PUB_FILE:
case TL_NOTE_CTR_SHA_PUB_FILE: case TL_NOTE_CTR_SHA_PUB_FILE:
/* Write location (centre) in hierarchy */ /* Write location (centre) in hierarchy */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>", fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Centre,Ctr.ShrtName); Txt_Centre,Ctr.ShrtName);
HTM_DIV_End ();
break; break;
case TL_NOTE_DEG_DOC_PUB_FILE: case TL_NOTE_DEG_DOC_PUB_FILE:
case TL_NOTE_DEG_SHA_PUB_FILE: case TL_NOTE_DEG_SHA_PUB_FILE:
/* Write location (degree) in hierarchy */ /* Write location (degree) in hierarchy */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>", fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Degree,Deg.ShrtName); Txt_Degree,Deg.ShrtName);
HTM_DIV_End ();
break; break;
case TL_NOTE_CRS_DOC_PUB_FILE: case TL_NOTE_CRS_DOC_PUB_FILE:
case TL_NOTE_CRS_SHA_PUB_FILE: case TL_NOTE_CRS_SHA_PUB_FILE:
case TL_NOTE_EXAM_ANNOUNCEMENT: case TL_NOTE_EXAM_ANNOUNCEMENT:
case TL_NOTE_NOTICE: case TL_NOTE_NOTICE:
/* Write location (course) in hierarchy */ /* Write location (course) in hierarchy */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>", fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Course,Crs.ShrtName); Txt_Course,Crs.ShrtName);
HTM_DIV_End ();
break; break;
case TL_NOTE_FORUM_POST: case TL_NOTE_FORUM_POST:
/* Write forum name */ /* Write forum name */
fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">%s: %s</div>", fprintf (Gbl.F.Out,"<div class=\"TL_LOC\">"
"%s: %s",
Txt_Forum,ForumName); Txt_Forum,ForumName);
HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -1611,11 +1622,14 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
/* Write note summary */ /* Write note summary */
TL_GetNoteSummary (SocNot,SummaryStr); TL_GetNoteSummary (SocNot,SummaryStr);
fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">%s</div>",SummaryStr); fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">"
"%s",
SummaryStr);
HTM_DIV_End ();
} }
/* End of right part */ /* End of right part */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Create unique id for new comment */ /* Create unique id for new comment */
Frm_SetUniqueId (IdNewComment); Frm_SetUniqueId (IdNewComment);
@ -1629,7 +1643,7 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
TL_PutIconCommentDisabled (); TL_PutIconCommentDisabled ();
else else
TL_PutIconToToggleCommentNote (IdNewComment); TL_PutIconToToggleCommentNote (IdNewComment);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Start container for buttons and comments */ /* Start container for buttons and comments */
fprintf (Gbl.F.Out,"<div class=\"TL_BOTTOM_RIGHT TL_RIGHT_WIDTH\">"); fprintf (Gbl.F.Out,"<div class=\"TL_BOTTOM_RIGHT TL_RIGHT_WIDTH\">");
@ -1642,30 +1656,30 @@ static void TL_WriteNote (const struct TL_Note *SocNot,
" class=\"TL_FAV_NOT TL_FAV_NOT_WIDTH\">", " class=\"TL_FAV_NOT TL_FAV_NOT_WIDTH\">",
Gbl.UniqueNameEncrypted,NumDiv); Gbl.UniqueNameEncrypted,NumDiv);
TL_PutFormToFavUnfNote (SocNot,TL_SHOW_A_FEW_USRS); TL_PutFormToFavUnfNote (SocNot,TL_SHOW_A_FEW_USRS);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Foot column 2: Share zone */ /* Foot column 2: Share zone */
fprintf (Gbl.F.Out,"<div id=\"sha_not_%s_%u\"" fprintf (Gbl.F.Out,"<div id=\"sha_not_%s_%u\""
" class=\"TL_SHA_NOT TL_SHA_NOT_WIDTH\">", " class=\"TL_SHA_NOT TL_SHA_NOT_WIDTH\">",
Gbl.UniqueNameEncrypted,NumDiv); Gbl.UniqueNameEncrypted,NumDiv);
TL_PutFormToShaUnsNote (SocNot,TL_SHOW_A_FEW_USRS); TL_PutFormToShaUnsNote (SocNot,TL_SHOW_A_FEW_USRS);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Foot column 3: Icon to remove this note */ /* Foot column 3: Icon to remove this note */
fprintf (Gbl.F.Out,"<div class=\"TL_REM\">"); fprintf (Gbl.F.Out,"<div class=\"TL_REM\">");
if (IAmTheAuthor) if (IAmTheAuthor)
TL_PutFormToRemovePublication (SocNot->NotCod); TL_PutFormToRemovePublication (SocNot->NotCod);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* End foot container */ /* End foot container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Show comments */ /* Show comments */
if (NumComments) if (NumComments)
TL_WriteCommentsInNote (SocNot); TL_WriteCommentsInNote (SocNot);
/* End container for buttons and comments */ /* End container for buttons and comments */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Put hidden form to write a new comment */ /* Put hidden form to write a new comment */
TL_PutHiddenFormToWriteNewCommentToNote (SocNot->NotCod,IdNewComment); TL_PutHiddenFormToWriteNewCommentToNote (SocNot->NotCod,IdNewComment);
@ -1719,8 +1733,8 @@ static void TL_WriteTopMessage (TL_TopMessage_t TopMessage,long UsrCod)
Frm_EndForm (); Frm_EndForm ();
/***** Show action made *****/ /***** Show action made *****/
fprintf (Gbl.F.Out," %s:</div>", fprintf (Gbl.F.Out," %s:",Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]);
Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]); HTM_DIV_End ();
} }
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
@ -1758,7 +1772,7 @@ static void TL_WriteAuthorNote (const struct UsrData *UsrDat)
fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname); fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1775,9 +1789,9 @@ static void TL_WriteDateTime (time_t TimeUTC)
Frm_SetUniqueId (IdDateTime); Frm_SetUniqueId (IdDateTime);
/***** Container where the date-time is written *****/ /***** Container where the date-time is written *****/
fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"TL_RIGHT_TIME DAT_LIGHT\">" fprintf (Gbl.F.Out,"<div id=\"%s\" class=\"TL_RIGHT_TIME DAT_LIGHT\">",
"</div>",
IdDateTime); IdDateTime);
HTM_DIV_End ();
/***** Script to write date and time in browser local time *****/ /***** Script to write date and time in browser local time *****/
// This must be out of the div where the output is written // This must be out of the div where the output is written
@ -1838,7 +1852,7 @@ static void TL_GetAndWritePost (long PstCod)
{ {
fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">"); fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">");
Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false); Msg_WriteMsgContent (Content,Cns_MAX_BYTES_LONG_TEXT,true,false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Show image *****/ /***** Show image *****/
@ -1945,7 +1959,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
Txt_TIMELINE_NOTE[SocNot->NoteType]); Txt_TIMELINE_NOTE[SocNot->NoteType]);
if (SocNot->Unavailable) if (SocNot->Unavailable)
fprintf (Gbl.F.Out," (%s)",Txt_not_available); fprintf (Gbl.F.Out," (%s)",Txt_not_available);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
else // Not inside another form else // Not inside another form
{ {
@ -2034,7 +2048,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
Txt_TIMELINE_NOTE[SocNot->NoteType]); Txt_TIMELINE_NOTE[SocNot->NoteType]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
} }
@ -2319,7 +2333,7 @@ static void TL_PutFormToWriteNewPost (void)
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,false); "PHOTO45x60",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right: author's name, time, summary and buttons *****/ /***** Right: author's name, time, summary and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">"); fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">");
@ -2327,9 +2341,9 @@ static void TL_PutFormToWriteNewPost (void)
/* Write author's full name and nickname */ /* Write author's full name and nickname */
fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH\">" fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH\">"
"<span class=\"DAT_N_BOLD\">%s</span>" "<span class=\"DAT_N_BOLD\">%s</span>"
"<span class=\"DAT_LIGHT\"> @%s</span>" "<span class=\"DAT_LIGHT\"> @%s</span>",
"</div>",
Gbl.Usrs.Me.UsrDat.FullName,Gbl.Usrs.Me.UsrDat.Nickname); Gbl.Usrs.Me.UsrDat.FullName,Gbl.Usrs.Me.UsrDat.Nickname);
HTM_DIV_End ();
/***** Form to write the post *****/ /***** Form to write the post *****/
/* Start container */ /* Start container */
@ -2346,7 +2360,7 @@ static void TL_PutFormToWriteNewPost (void)
Frm_EndForm (); Frm_EndForm ();
/* End container */ /* End container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End list *****/ /***** End list *****/
fprintf (Gbl.F.Out,"</li>" fprintf (Gbl.F.Out,"</li>"
@ -2393,7 +2407,7 @@ static void TL_PutTextarea (const char *Placeholder,const char *ClassTextArea)
Txt_Post); Txt_Post);
/***** End hidden div *****/ /***** End hidden div *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2498,11 +2512,11 @@ static void TL_PutIconToToggleCommentNote (const char UniqueId[Frm_MAX_BYTES_ID
" onclick=\"toggleNewComment ('%s');return false;\">" " onclick=\"toggleNewComment ('%s');return false;\">"
"<img src=\"%s/edit.svg\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/edit.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />" " class=\"CONTEXT_ICO_16x16\" />"
"</a>" "</a>",
"</div>",
UniqueId,UniqueId, UniqueId,UniqueId,
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Comment,Txt_Comment); Txt_Comment,Txt_Comment);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2517,10 +2531,10 @@ static void TL_PutIconCommentDisabled (void)
fprintf (Gbl.F.Out,"<div class=\"TL_ICO_COM_OFF TL_ICO_DISABLED\">" fprintf (Gbl.F.Out,"<div class=\"TL_ICO_COM_OFF TL_ICO_DISABLED\">"
"<img src=\"%s/edit.svg\"" "<img src=\"%s/edit.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />" " class=\"ICO16x16\" />",
"</div>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Comment,Txt_Comment); Txt_Comment,Txt_Comment);
HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2546,7 +2560,7 @@ static void TL_PutHiddenFormToWriteNewCommentToNote (long NotCod,
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO30x40",Pho_ZOOM,true); // Use unique id "PHOTO30x40",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right: form to write the comment *****/ /***** Right: form to write the comment *****/
/* Start right container */ /* Start right container */
@ -2564,10 +2578,10 @@ static void TL_PutHiddenFormToWriteNewCommentToNote (long NotCod,
Frm_EndForm (); Frm_EndForm ();
/* End right container */ /* End right container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2631,7 +2645,7 @@ static void TL_WriteCommentsInNote (const struct TL_Note *SocNot)
IdComments); IdComments);
TL_PutIconToToggleComments (IdComments,"angle-down.svg", TL_PutIconToToggleComments (IdComments,"angle-down.svg",
Txt_See_only_the_latest_COMMENTS); Txt_See_only_the_latest_COMMENTS);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** First list with comments initially hidden *****/ /***** First list with comments initially hidden *****/
fprintf (Gbl.F.Out,"<ul id=\"com_%s\" class=\"LIST_LEFT\"" fprintf (Gbl.F.Out,"<ul id=\"com_%s\" class=\"LIST_LEFT\""
@ -2651,7 +2665,7 @@ static void TL_WriteCommentsInNote (const struct TL_Note *SocNot)
Txt_See_the_previous_X_COMMENTS, Txt_See_the_previous_X_COMMENTS,
NumCommentsInitiallyHidden); NumCommentsInitiallyHidden);
TL_PutIconToToggleComments (IdComments,"angle-up.svg",Gbl.Title); TL_PutIconToToggleComments (IdComments,"angle-up.svg",Gbl.Title);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Second list with comments initially visible *****/ /***** Second list with comments initially visible *****/
@ -2736,9 +2750,9 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
/***** Write sharer/commenter if distinct to author *****/ /***** Write sharer/commenter if distinct to author *****/
TL_WriteTopMessage (TopMessage,UsrCod); TL_WriteTopMessage (TopMessage,UsrCod);
fprintf (Gbl.F.Out,"<div class=\"TL_LEFT_PHOTO\">" fprintf (Gbl.F.Out,"<div class=\"TL_LEFT_PHOTO\">");
"</div>" HTM_DIV_End ();
"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">" fprintf (Gbl.F.Out,"<div class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\">"
"<ul class=\"LIST_LEFT\">"); "<ul class=\"LIST_LEFT\">");
} }
@ -2766,7 +2780,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO30x40",Pho_ZOOM,true); // Use unique id "PHOTO30x40",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Right: author's name, time, content, image and buttons *****/ /***** Right: author's name, time, content, image and buttons *****/
fprintf (Gbl.F.Out,"<div class=\"TL_COM_CONT TL_COMM_WIDTH\">"); fprintf (Gbl.F.Out,"<div class=\"TL_COM_CONT TL_COMM_WIDTH\">");
@ -2782,7 +2796,7 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
{ {
fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">"); fprintf (Gbl.F.Out,"<div class=\"TL_TXT\">");
Msg_WriteMsgContent (SocCom->Content,Cns_MAX_BYTES_LONG_TEXT,true,false); Msg_WriteMsgContent (SocCom->Content,Cns_MAX_BYTES_LONG_TEXT,true,false);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/* Show image */ /* Show image */
@ -2797,16 +2811,16 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
" class=\"TL_FAV_COM TL_FAV_WIDTH\">", " class=\"TL_FAV_COM TL_FAV_WIDTH\">",
Gbl.UniqueNameEncrypted,NumDiv); Gbl.UniqueNameEncrypted,NumDiv);
TL_PutFormToFavUnfComment (SocCom,TL_SHOW_A_FEW_USRS); TL_PutFormToFavUnfComment (SocCom,TL_SHOW_A_FEW_USRS);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* Put icon to remove this comment */ /* Put icon to remove this comment */
fprintf (Gbl.F.Out,"<div class=\"TL_REM\">"); fprintf (Gbl.F.Out,"<div class=\"TL_REM\">");
if (IAmTheAuthor && !ShowCommentAlone) if (IAmTheAuthor && !ShowCommentAlone)
TL_PutFormToRemoveComment (SocCom->PubCod); TL_PutFormToRemoveComment (SocCom->PubCod);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/* End foot container */ /* End foot container */
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);
@ -2817,8 +2831,8 @@ static void TL_WriteComment (struct TL_Comment *SocCom,
if (ShowCommentAlone) if (ShowCommentAlone)
{ {
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>");
"</div>"); HTM_DIV_End ();
Box_EndBox (); Box_EndBox ();
} }
} }
@ -2855,7 +2869,7 @@ static void TL_WriteAuthorComment (struct UsrData *UsrDat)
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3277,7 +3291,7 @@ static void TL_PutFormToShaUnsNote (const struct TL_Note *SocNot,
else // I have not shared this note else // I have not shared this note
TL_PutFormToShaNote (SocNot); TL_PutFormToShaNote (SocNot);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show who have shared this note *****/ /***** Show who have shared this note *****/
TL_ShowUsrsWhoHaveSharedNote (SocNot,HowMany); TL_ShowUsrsWhoHaveSharedNote (SocNot,HowMany);
@ -3407,7 +3421,7 @@ static void TL_PutFormToFavUnfNote (const struct TL_Note *SocNot,
else // I am not a faver of this note else // I am not a faver of this note
TL_PutFormToFavNote (SocNot); TL_PutFormToFavNote (SocNot);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show who have marked this note as favourite *****/ /***** Show who have marked this note as favourite *****/
TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,HowMany); TL_ShowUsrsWhoHaveMarkedNoteAsFav (SocNot,HowMany);
@ -3576,7 +3590,7 @@ static void TL_PutFormToFavUnfComment (const struct TL_Comment *SocCom,
/* Put icon to fav this publication and list of users */ /* Put icon to fav this publication and list of users */
TL_PutFormToFavComment (SocCom); TL_PutFormToFavComment (SocCom);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Show who have marked this comment as favourite *****/ /***** Show who have marked this comment as favourite *****/
TL_ShowUsrsWhoHaveMarkedCommAsFav (SocCom,HowMany); TL_ShowUsrsWhoHaveMarkedCommAsFav (SocCom,HowMany);
@ -4515,13 +4529,13 @@ static void TL_ShowUsrsWhoHaveSharedNote (const struct TL_Note *SocNot,
/***** Show users *****/ /***** Show users *****/
fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocNot->NumShared); TL_ShowNumSharersOrFavers (SocNot->NumShared);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumShared,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,SocNot->NumShared,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumShared) if (NumFirstUsrs < SocNot->NumShared)
TL_PutFormToSeeAllSharersNote (SocNot,HowMany); TL_PutFormToSeeAllSharersNote (SocNot,HowMany);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocNot->NumShared) if (SocNot->NumShared)
@ -4557,13 +4571,13 @@ static void TL_ShowUsrsWhoHaveMarkedNoteAsFav (const struct TL_Note *SocNot,
/***** Show users *****/ /***** Show users *****/
fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocNot->NumFavs); TL_ShowNumSharersOrFavers (SocNot->NumFavs);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,SocNot->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown if (NumFirstUsrs < SocNot->NumFavs) // Not all are shown
TL_PutFormToSeeAllFaversNote (SocNot,HowMany); TL_PutFormToSeeAllFaversNote (SocNot,HowMany);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocNot->NumFavs) if (SocNot->NumFavs)
@ -4597,13 +4611,13 @@ static void TL_ShowUsrsWhoHaveMarkedCommAsFav (const struct TL_Comment *SocCom,
/***** Show users *****/ /***** Show users *****/
fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_NUM_USRS\">");
TL_ShowNumSharersOrFavers (SocCom->NumFavs); TL_ShowNumSharersOrFavers (SocCom->NumFavs);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">"); fprintf (Gbl.F.Out,"<div class=\"TL_USRS\">");
TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs); TL_ShowSharersOrFavers (&mysql_res,SocCom->NumFavs,NumFirstUsrs);
if (NumFirstUsrs < SocCom->NumFavs) if (NumFirstUsrs < SocCom->NumFavs)
TL_PutFormToSeeAllFaversComment (SocCom,HowMany); TL_PutFormToSeeAllFaversComment (SocCom,HowMany);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
if (SocCom->NumFavs) if (SocCom->NumFavs)
@ -4657,7 +4671,7 @@ static void TL_ShowSharersOrFavers (MYSQL_RES **mysql_res,
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO12x16",Pho_ZOOM,true); // Use unique id "PHOTO12x16",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
NumUsrsShown++; NumUsrsShown++;
} }

View File

@ -243,7 +243,7 @@ static void TT_ShowTimeTableGrpsSelected (void)
fprintf (Gbl.F.Out,"%s",Txt_All_groups); fprintf (Gbl.F.Out,"%s",Txt_All_groups);
break; break;
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1579,7 +1579,7 @@ static void TT_TimeTableDrawCell (unsigned Weekday,unsigned Interval,unsigned Co
fprintf (Gbl.F.Out,"<br />%s",Info); fprintf (Gbl.F.Out,"<br />%s",Info);
/***** End cell *****/ /***** End cell *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
break; break;
case TT_CRS_EDIT: case TT_CRS_EDIT:

View File

@ -2594,7 +2594,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
Pwd_PutLinkToSendNewPasswd (); Pwd_PutLinkToSendNewPasswd ();
Lan_PutLinkToChangeLanguage (); Lan_PutLinkToChangeLanguage ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
fprintf (Gbl.F.Out,"<div class=\"CM\">"); fprintf (Gbl.F.Out,"<div class=\"CM\">");
@ -2616,14 +2616,14 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
"<input type=\"text\" id=\"UsrId\" name=\"UsrId\"" "<input type=\"text\" id=\"UsrId\" name=\"UsrId\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\"" " size=\"18\" maxlength=\"%u\" placeholder=\"%s\""
" value=\"%s\"" " value=\"%s\""
" autofocus=\"autofocus\" required=\"required\" />" " autofocus=\"autofocus\" required=\"required\" />",
"</div>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_User[Usr_SEX_UNKNOWN], Txt_User[Usr_SEX_UNKNOWN],
Txt_User[Usr_SEX_UNKNOWN], Txt_User[Usr_SEX_UNKNOWN],
Cns_MAX_CHARS_EMAIL_ADDRESS, Cns_MAX_CHARS_EMAIL_ADDRESS,
Txt_nick_email_or_ID, Txt_nick_email_or_ID,
Gbl.Usrs.Me.UsrIdLogin); Gbl.Usrs.Me.UsrIdLogin);
HTM_DIV_End ();
/***** User's password *****/ /***** User's password *****/
fprintf (Gbl.F.Out,"<div class=\"LM\">" fprintf (Gbl.F.Out,"<div class=\"LM\">"
@ -2632,13 +2632,13 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
" class=\"CONTEXT_ICO_16x16\" />" " class=\"CONTEXT_ICO_16x16\" />"
"</label>" "</label>"
"<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\"" "<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />" " size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />",
"</div>",
Cfg_URL_ICON_PUBLIC, Cfg_URL_ICON_PUBLIC,
Txt_Password, Txt_Password,
Txt_Password, Txt_Password,
Pwd_MAX_CHARS_PLAIN_PASSWORD, Pwd_MAX_CHARS_PLAIN_PASSWORD,
Txt_password); Txt_password);
HTM_DIV_End ();
/***** End table, send button and end box *****/ /***** End table, send button and end box *****/
Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Log_in); Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Log_in);
@ -2646,7 +2646,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2841,7 +2841,7 @@ void Usr_WriteLoggedUsrHead (void)
if (Gbl.Usrs.Me.UsrDat.FirstName[0]) if (Gbl.Usrs.Me.UsrDat.FirstName[0])
fprintf (Gbl.F.Out,"&nbsp;%s",Gbl.Usrs.Me.UsrDat.FirstName); fprintf (Gbl.F.Out,"&nbsp;%s",Gbl.Usrs.Me.UsrDat.FirstName);
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4141,7 +4141,7 @@ static void Usr_WriteUsrData (const char *BgColor,
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
/***** End container and table cell *****/ /***** End container and table cell *****/
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
} }
@ -6097,7 +6097,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void))
if (FuncParams) if (FuncParams)
FuncParams (); FuncParams ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Select Usr_LIST_AS_LISTING *****/ /***** Select Usr_LIST_AS_LISTING *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">", fprintf (Gbl.F.Out,"<div class=\"%s\">",
@ -6114,7 +6114,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void))
FuncParams (); FuncParams ();
Usr_PutCheckboxListWithPhotos (); Usr_PutCheckboxListWithPhotos ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
Set_EndOneSettingSelector (); Set_EndOneSettingSelector ();
Set_EndSettingsHead (); Set_EndSettingsHead ();
@ -7315,7 +7315,7 @@ void Usr_ListDataAdms (void)
/* Put link to remove old users */ /* Put link to remove old users */
Enr_PutLinkToRemOldUsrs (); Enr_PutLinkToRemOldUsrs ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -7360,7 +7360,7 @@ void Usr_ListDataAdms (void)
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>"); fprintf (Gbl.F.Out,"</label>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
if (Gbl.Usrs.LstUsrs[Rol_DEG_ADM].NumUsrs) if (Gbl.Usrs.LstUsrs[Rol_DEG_ADM].NumUsrs)
{ {
@ -7371,8 +7371,8 @@ void Usr_ListDataAdms (void)
Sco_PutParamCurrentScope (); Sco_PutParamCurrentScope ();
Usr_PutCheckboxListWithPhotos (); Usr_PutCheckboxListWithPhotos ();
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>" HTM_DIV_End ();
"</div>"); HTM_DIV_End ();
/***** Heading row with column names *****/ /***** Heading row with column names *****/
HTM_TABLE_Begin (NULL); HTM_TABLE_Begin (NULL);
@ -7805,7 +7805,7 @@ void Usr_SeeGuests (void)
/* Put link to remove old users */ /* Put link to remove old users */
Enr_PutLinkToRemOldUsrs (); Enr_PutLinkToRemOldUsrs ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Get and update type of list, /***** Get and update type of list,
number of columns in class photo number of columns in class photo
@ -7834,7 +7834,7 @@ void Usr_SeeGuests (void)
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>"); fprintf (Gbl.F.Out,"</label>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
} }
/***** Start section with user list *****/ /***** Start section with user list *****/
@ -7944,7 +7944,7 @@ void Usr_SeeStudents (void)
Rec_PutLinkToEditRecordFields (); Rec_PutLinkToEditRecordFields ();
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -7985,7 +7985,7 @@ void Usr_SeeStudents (void)
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>"); fprintf (Gbl.F.Out,"</label>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
break; break;
@ -8113,7 +8113,7 @@ void Usr_SeeTeachers (void)
Enr_PutLinkToAdminSeveralUsrs (Rol_TCH); Enr_PutLinkToAdminSeveralUsrs (Rol_TCH);
} }
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
break; break;
default: default:
@ -8163,7 +8163,7 @@ void Usr_SeeTeachers (void)
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
fprintf (Gbl.F.Out,"</label>"); fprintf (Gbl.F.Out,"</label>");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** Form to select groups *****/ /***** Form to select groups *****/
if (Gbl.Scope.Current == Hie_CRS) if (Gbl.Scope.Current == Hie_CRS)
@ -8971,7 +8971,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
else else
fprintf (Gbl.F.Out,"&nbsp;"); fprintf (Gbl.F.Out,"&nbsp;");
fprintf (Gbl.F.Out,"</div>"); HTM_DIV_End ();
/***** End user's cell *****/ /***** End user's cell *****/
HTM_TD_End (); HTM_TD_End ();
@ -9713,10 +9713,12 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
"PHOTO15x20",Pho_ZOOM,false); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
fprintf (Gbl.F.Out,"<div class=\"AUTHOR_1_LINE %s\">%s</div>", fprintf (Gbl.F.Out,"<div class=\"AUTHOR_1_LINE %s\">"
"%s",
Hidden ? "AUTHOR_TXT_LIGHT" : Hidden ? "AUTHOR_TXT_LIGHT" :
"AUTHOR_TXT", "AUTHOR_TXT",
UsrDat.FullName); UsrDat.FullName);
HTM_DIV_End ();
/***** Free memory used for user's data *****/ /***** Free memory used for user's data *****/
Usr_UsrDataDestructor (&UsrDat); Usr_UsrDataDestructor (&UsrDat);