Version 15.113

This commit is contained in:
Antonio Cañas Vargas 2016-01-14 10:31:09 +01:00
parent e100e4ba3f
commit 59b9cec6b0
48 changed files with 278 additions and 271 deletions

View File

@ -20,6 +20,8 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
"use strict";
// Global variable (string) used to write HTML // Global variable (string) used to write HTML
var Gbl_HTMLContent; var Gbl_HTMLContent;

View File

@ -4311,36 +4311,52 @@ char *Act_GetActionTextFromDB (long ActCod,char *Txt)
/******************************** Start a form *******************************/ /******************************** Start a form *******************************/
/*****************************************************************************/ /*****************************************************************************/
void Act_FormStart (Act_Action_t NextAction)
{
Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.FormId,"form_%d",Gbl.NumForm);
Act_FormStartInternal (NextAction,true,Gbl.FormId,NULL); // Do put now parameter location (if no open session)
}
void Act_FormGoToStart (Act_Action_t NextAction) void Act_FormGoToStart (Act_Action_t NextAction)
{ {
Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0 Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.FormId,"form_%d",Gbl.NumForm); sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
Act_FormStartInternal (NextAction,false,Gbl.FormId,NULL); // Do not put now parameter location Act_FormStartInternal (NextAction,false,Gbl.Form.Id,NULL); // Do not put now parameter location
}
void Act_FormStart (Act_Action_t NextAction)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
Act_FormStartInternal (NextAction,true,Gbl.Form.Id,NULL); // Do put now parameter location (if no open session)
}
void Act_FormStartUnique (Act_Action_t NextAction)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.Form.UniqueId,"form_%s_%d",
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
Act_FormStartInternal (NextAction,true,Gbl.Form.UniqueId,NULL); // Do put now parameter location (if no open session)
} }
void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor) void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor)
{ {
Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0 Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.FormId,"form_%d",Gbl.NumForm); sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
Act_FormStartInternal (NextAction,true,Gbl.FormId,Anchor); // Do put now parameter location (if no open session) Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor); // Do put now parameter location (if no open session)
}
void Act_FormStartUniqueAnchor (Act_Action_t NextAction,const char *Anchor)
{
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
sprintf (Gbl.Form.UniqueId,"form_%s_%d",
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
Act_FormStartInternal (NextAction,true,Gbl.Form.UniqueId,Anchor); // Do put now parameter location (if no open session)
} }
void Act_FormStartId (Act_Action_t NextAction,const char *Id) void Act_FormStartId (Act_Action_t NextAction,const char *Id)
{ {
Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0 Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
Act_FormStartInternal (NextAction,true,Id,NULL); // Do put now parameter location (if no open session) Act_FormStartInternal (NextAction,true,Id,NULL); // Do put now parameter location (if no open session)
} }
void Act_FormStartIdAnchor (Act_Action_t NextAction,const char *Id,const char *Anchor) void Act_FormStartIdAnchor (Act_Action_t NextAction,const char *Id,const char *Anchor)
{ {
Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0 Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
Act_FormStartInternal (NextAction,true,Id,Anchor); // Do put now parameter location (if no open session) Act_FormStartInternal (NextAction,true,Id,Anchor); // Do put now parameter location (if no open session)
} }
@ -4350,7 +4366,7 @@ static void Act_FormStartInternal (Act_Action_t NextAction,bool PutParameterLoca
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES]; extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
char Params[256+256+Ses_LENGTH_SESSION_ID+256]; char Params[256+256+Ses_LENGTH_SESSION_ID+256];
if (!Gbl.InsideForm) if (!Gbl.Form.Inside)
{ {
/* Start form */ /* Start form */
fprintf (Gbl.F.Out,"<form method=\"post\" action=\"%s/%s", fprintf (Gbl.F.Out,"<form method=\"post\" action=\"%s/%s",
@ -4377,7 +4393,7 @@ static void Act_FormStartInternal (Act_Action_t NextAction,bool PutParameterLoca
Act_SetParamsForm (Params,NextAction,PutParameterLocationIfNoSesion); Act_SetParamsForm (Params,NextAction,PutParameterLocationIfNoSesion);
fprintf (Gbl.F.Out,"%s",Params); fprintf (Gbl.F.Out,"%s",Params);
Gbl.InsideForm = true; Gbl.Form.Inside = true;
} }
} }
@ -4425,10 +4441,10 @@ void Act_SetParamsForm (char *Params,Act_Action_t NextAction,bool PutParameterLo
void Act_FormEnd (void) void Act_FormEnd (void)
{ {
if (Gbl.InsideForm) if (Gbl.Form.Inside)
{ {
fprintf (Gbl.F.Out,"</form>"); fprintf (Gbl.F.Out,"</form>");
Gbl.InsideForm = false; Gbl.Form.Inside = false;
} }
} }
@ -4439,7 +4455,12 @@ void Act_FormEnd (void)
void Act_LinkFormSubmit (const char *Title,const char *LinkStyle) void Act_LinkFormSubmit (const char *Title,const char *LinkStyle)
{ {
Act_LinkFormSubmitId (Title,LinkStyle,Gbl.FormId); Act_LinkFormSubmitId (Title,LinkStyle,Gbl.Form.Id);
}
void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle)
{
Act_LinkFormSubmitId (Title,LinkStyle,Gbl.Form.UniqueId);
} }
// Title can be NULL // Title can be NULL
@ -4474,9 +4495,9 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
"document.getElementById('updating_%d').style.display='';" // Icon to be shown on click "document.getElementById('updating_%d').style.display='';" // Icon to be shown on click
"document.getElementById('%s').submit();" "document.getElementById('%s').submit();"
"return false;\">", "return false;\">",
Gbl.NumForm, Gbl.Form.Num,
Gbl.NumForm, Gbl.Form.Num,
Gbl.FormId); Gbl.Form.Id);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1425,14 +1425,17 @@ const char *Act_GetSubtitleAction (Act_Action_t Action);
void Act_GetBreadcrumbStrForAction (Act_Action_t Action,bool HTML,char *BreadcrumbStr); void Act_GetBreadcrumbStrForAction (Act_Action_t Action,bool HTML,char *BreadcrumbStr);
char *Act_GetActionTextFromDB (long ActCod,char *Txt); char *Act_GetActionTextFromDB (long ActCod,char *Txt);
void Act_FormStart (Act_Action_t NextAction);
void Act_FormGoToStart (Act_Action_t NextAction); void Act_FormGoToStart (Act_Action_t NextAction);
void Act_FormStart (Act_Action_t NextAction);
void Act_FormStartUnique (Act_Action_t NextAction);
void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor); void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor);
void Act_FormStartUniqueAnchor (Act_Action_t NextAction,const char *Anchor);
void Act_FormStartId (Act_Action_t NextAction,const char *Id); void Act_FormStartId (Act_Action_t NextAction,const char *Id);
void Act_FormStartIdAnchor (Act_Action_t NextAction,const char *Id,const char *Anchor); void Act_FormStartIdAnchor (Act_Action_t NextAction,const char *Id,const char *Anchor);
void Act_SetParamsForm (char *Params,Act_Action_t NextAction,bool PutParameterLocationIfNoSesion); void Act_SetParamsForm (char *Params,Act_Action_t NextAction,bool PutParameterLocationIfNoSesion);
void Act_FormEnd (void); void Act_FormEnd (void);
void Act_LinkFormSubmit (const char *Title,const char *LinkStyle); void Act_LinkFormSubmit (const char *Title,const char *LinkStyle);
void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle);
void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *Id); void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *Id);
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle); void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle);

View File

@ -375,7 +375,7 @@ static void Asg_WriteAsgAuthor (struct Assignment *Asg)
/***** Show photo *****/ /***** Show photo *****/
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20",Pho_ZOOM,NULL); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
strcpy (FirstName,UsrDat.FirstName); strcpy (FirstName,UsrDat.FirstName);

View File

@ -414,7 +414,7 @@ static void Att_WriteAttEventAuthor (struct AttendanceEvent *Att)
/***** Show photo *****/ /***** Show photo *****/
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20",Pho_ZOOM,NULL); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
strcpy (FirstName,UsrDat.FirstName); strcpy (FirstName,UsrDat.FirstName);
@ -1973,7 +1973,7 @@ static void Att_WriteRowStdToCallTheRoll (unsigned NumStd,struct UsrData *UsrDat
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,NULL); "PHOTO45x60",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -3188,7 +3188,7 @@ static void Att_WriteRowStdSeveralAttEvents (unsigned NumStd,struct UsrData *Usr
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -3326,7 +3326,7 @@ static void Att_ListAttEventsForAStd (unsigned NumStd,struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write user's ID ******/ /***** Write user's ID ******/

View File

@ -359,7 +359,7 @@ static void Ban_ListBannersForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ban_MAX_LENGTH_SHORT_NAME,Ban->ShortName,Gbl.FormId); Ban_MAX_LENGTH_SHORT_NAME,Ban->ShortName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -371,7 +371,7 @@ static void Ban_ListBannersForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ban_MAX_LENGTH_FULL_NAME,Ban->FullName,Gbl.FormId); Ban_MAX_LENGTH_FULL_NAME,Ban->FullName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -382,7 +382,7 @@ static void Ban_ListBannersForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Img\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Img\""
" size=\"12\" maxlength=\"%u\" value=\"%s\"" " size=\"12\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ban_MAX_LENGTH_IMAGE,Ban->Img,Gbl.FormId); Ban_MAX_LENGTH_IMAGE,Ban->Img,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -394,7 +394,7 @@ static void Ban_ListBannersForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Ban->WWW,Gbl.FormId); Cns_MAX_LENGTH_WWW,Ban->WWW,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -351,7 +351,7 @@ static void Ctr_Configuration (bool PrintView)
Act_FormStart (ActChgCtrPhoAtt); Act_FormStart (ActChgCtrPhoAtt);
fprintf (Gbl.F.Out,"<textarea name=\"Attribution\" cols=\"50\" rows=\"2\"" fprintf (Gbl.F.Out,"<textarea name=\"Attribution\" cols=\"50\" rows=\"2\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
if (PhotoAttribution) if (PhotoAttribution)
fprintf (Gbl.F.Out,"%s",PhotoAttribution); fprintf (Gbl.F.Out,"%s",PhotoAttribution);
fprintf (Gbl.F.Out,"</textarea>"); fprintf (Gbl.F.Out,"</textarea>");
@ -1139,7 +1139,7 @@ void Ctr_WriteSelectorOfCentre (void)
fprintf (Gbl.F.Out,"<select name=\"ctr\" style=\"width:175px;\""); fprintf (Gbl.F.Out,"<select name=\"ctr\" style=\"width:175px;\"");
if (Gbl.CurrentIns.Ins.InsCod > 0) if (Gbl.CurrentIns.Ins.InsCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,"><option value=\"\"");
@ -1268,7 +1268,7 @@ static void Ctr_ListCentresForEdition (void)
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (NumIns = 0; for (NumIns = 0;
NumIns < Gbl.Inss.Num; NumIns < Gbl.Inss.Num;
NumIns++) NumIns++)
@ -1292,7 +1292,7 @@ static void Ctr_ListCentresForEdition (void)
Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"0\""); fprintf (Gbl.F.Out,"<option value=\"0\"");
if (Ctr->PlcCod == 0) if (Ctr->PlcCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
@ -1326,7 +1326,7 @@ static void Ctr_ListCentresForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ctr_MAX_LENGTH_CENTRE_SHORT_NAME,Ctr->ShortName,Gbl.FormId); Ctr_MAX_LENGTH_CENTRE_SHORT_NAME,Ctr->ShortName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -1344,7 +1344,7 @@ static void Ctr_ListCentresForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ctr_MAX_LENGTH_CENTRE_FULL_NAME,Ctr->FullName,Gbl.FormId); Ctr_MAX_LENGTH_CENTRE_FULL_NAME,Ctr->FullName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -1362,7 +1362,7 @@ static void Ctr_ListCentresForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Ctr->WWW,Gbl.FormId); Cns_MAX_LENGTH_WWW,Ctr->WWW,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1408,7 +1408,7 @@ static void Ctr_ListCentresForEdition (void)
"<option value=\"%u\" selected=\"selected\">%s</option>" "<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>" "<option value=\"%u\">%s</option>"
"</select>", "</select>",
Gbl.FormId, Gbl.Form.Id,
(unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING), (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_PENDING),
Txt_CENTRE_STATUS[Ctr_STATUS_PENDING], Txt_CENTRE_STATUS[Ctr_STATUS_PENDING],
(unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE), (unsigned) Ctr_GetStatusBitsFromStatusTxt (Ctr_STATUS_ACTIVE),

View File

@ -121,18 +121,21 @@
// TODO: Limit text of post/comment in social timeline to 1000 characters? Limit textarea to 20 lines not resizeable. // TODO: Limit text of post/comment in social timeline to 1000 characters? Limit textarea to 20 lines not resizeable.
// TODO: Sinchronize timeline in other actions // TODO: Sinchronize timeline in other actions
// TODO: Optimize Javascript not concatenating big strings in new timeline // TODO: Optimize Javascript not concatenating big strings in new timeline
// TODO: Do not put divs to get new publishings in user's timeline
/*****************************************************************************/ /*****************************************************************************/
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.112 (2016-01-14)" #define Log_PLATFORM_VERSION "SWAD 15.113 (2016-01-14)"
#define CSS_FILE "swad15.111.css" #define CSS_FILE "swad15.111.css"
#define JS_FILE "swad15.111.js" #define JS_FILE "swad15.111.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/* /*
Version 15.113: Jan 14, 2016 Code refactoring related to forms with unique identifiers.
Use unique identifiers in forms of lists of connected users. (192680 lines)
Version 15.112: Jan 14, 2016 Fixed bugs in user's timeline. Version 15.112: Jan 14, 2016 Fixed bugs in user's timeline.
All forms in social timeline must have unique identifiers. (192676 lines) All forms in social timeline must have unique identifiers. (192676 lines)
Version 15.111: Jan 14, 2016 Fixed bug in user's timeline. Version 15.111: Jan 14, 2016 Fixed bug in user's timeline.

View File

@ -672,12 +672,13 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentLocationOnRightColum
/***** Write message with number of users not listed *****/ /***** Write message with number of users not listed *****/
if (Gbl.Usrs.Connected.NumUsrsToList < Gbl.Usrs.Connected.NumUsrs) if (Gbl.Usrs.Connected.NumUsrsToList < Gbl.Usrs.Connected.NumUsrs)
{ {
sprintf (Gbl.FormId,"form_con_%d",++Gbl.NumFormConnectedUsrs);
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"3\" class=\"CENTER_TOP\">"); "<td colspan=\"3\" class=\"CENTER_TOP\">");
Act_FormStartId (ActLstCon,Gbl.FormId); Act_FormStartUnique (ActLstCon); // Must be unique because
// the list of connected users
// is dynamically updated via AJAX
Sco_PutParamScope (Sco_SCOPE_CRS); Sco_PutParamScope (Sco_SCOPE_CRS);
Act_LinkFormSubmitId (Txt_Connected_users,The_ClassConnected[Gbl.Prefs.Theme],Gbl.FormId); Act_LinkFormSubmitUnique (Txt_Connected_users,The_ClassConnected[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<img src=\"%s/ellipsis32x32.gif\"" fprintf (Gbl.F.Out,"<img src=\"%s/ellipsis32x32.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICON40x40\" />" " alt=\"%s\" title=\"%s\" class=\"ICON40x40\" />"
"</a>", "</a>",
@ -1072,14 +1073,15 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
"<td class=\"LEFT_MIDDLE COLOR%u\"" "<td class=\"LEFT_MIDDLE COLOR%u\""
" style=\"width:22px;\">", " style=\"width:22px;\">",
Gbl.RowEvenOdd); Gbl.RowEvenOdd);
sprintf (Gbl.FormId,"form_con_%d",++Gbl.NumFormConnectedUsrs); Act_FormStartUnique (ActSeePubPrf); // Must be unique because
Act_FormStartId (ActSeePubPrf,Gbl.FormId); // the list of connected users
// is dynamically updated via AJAX
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Act_LinkFormSubmitId (UsrDat.FullName,NULL,Gbl.FormId); Act_LinkFormSubmitUnique (UsrDat.FullName,NULL);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1088,12 +1090,12 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\"" fprintf (Gbl.F.Out,"<td class=\"%s LEFT_MIDDLE COLOR%u\""
" style=\"width:68px;\">", " style=\"width:68px;\">",
Font,Gbl.RowEvenOdd); Font,Gbl.RowEvenOdd);
sprintf (Gbl.FormId,"form_con_%d",++Gbl.NumFormConnectedUsrs); Act_FormStartUnique ((Role == Rol_STUDENT) ? ActSeeRecOneStd :
Act_FormStartId ((Role == Rol_STUDENT) ? ActSeeRecOneStd : ActSeeRecOneTch); // Must be unique because
ActSeeRecOneTch, // the list of connected users
Gbl.FormId); // is dynamically updated via AJAX
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_record_for_this_course,Font,Gbl.FormId); Act_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
Usr_RestrictLengthAndWriteName (&UsrDat,8); Usr_RestrictLengthAndWriteName (&UsrDat,8);
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
Act_FormEnd (); Act_FormEnd ();
@ -1271,7 +1273,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write full name and link *****/ /***** Write full name and link *****/

View File

@ -275,7 +275,7 @@ static void Cty_Configuration (bool PrintView)
Act_FormStart (ActChgCtyMapAtt); Act_FormStart (ActChgCtyMapAtt);
fprintf (Gbl.F.Out,"<textarea name=\"Attribution\" cols=\"50\" rows=\"2\"" fprintf (Gbl.F.Out,"<textarea name=\"Attribution\" cols=\"50\" rows=\"2\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
if (MapAttribution) if (MapAttribution)
fprintf (Gbl.F.Out,"%s",MapAttribution); fprintf (Gbl.F.Out,"%s",MapAttribution);
fprintf (Gbl.F.Out,"</textarea>"); fprintf (Gbl.F.Out,"</textarea>");
@ -1053,7 +1053,7 @@ void Cty_WriteSelectorOfCountry (void)
fprintf (Gbl.F.Out,"<select name=\"cty\" style=\"width:175px;\"" fprintf (Gbl.F.Out,"<select name=\"cty\" style=\"width:175px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"\"", "<option value=\"\"",
Gbl.FormId); Gbl.Form.Id);
if (Gbl.CurrentCty.Cty.CtyCod < 0) if (Gbl.CurrentCty.Cty.CtyCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>", fprintf (Gbl.F.Out," disabled=\"disabled\">[%s]</option>",
@ -1106,7 +1106,7 @@ void Cty_WriteCountryName (long CtyCod,const char *Class)
/***** Get country name *****/ /***** Get country name *****/
Cty_GetCountryName (CtyCod,CtyName); Cty_GetCountryName (CtyCod,CtyName);
if (Gbl.InsideForm) // If we are writing another form if (Gbl.Form.Inside) // If we are writing another form
/***** Write country name without link *****/ /***** Write country name without link *****/
fprintf (Gbl.F.Out,"%s",CtyName); fprintf (Gbl.F.Out,"%s",CtyName);
else else
@ -1456,7 +1456,7 @@ static void Cty_ListCountriesForEdition (void)
" size=\"15\" maxlength=\"%u\" value=\"%s\"" " size=\"15\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cty_MAX_BYTES_COUNTRY_NAME, Cty_MAX_BYTES_COUNTRY_NAME,
Cty->Name[Lan],Gbl.FormId); Cty->Name[Lan],Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1470,7 +1470,7 @@ static void Cty_ListCountriesForEdition (void)
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cty_MAX_LENGTH_COUNTRY_WWW, Cty_MAX_LENGTH_COUNTRY_WWW,
Cty->WWW[Lan],Gbl.FormId); Cty->WWW[Lan],Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -892,7 +892,7 @@ void Crs_WriteSelectorOfCourse (void)
fprintf (Gbl.F.Out,"<select name=\"crs\" style=\"width:175px;\""); fprintf (Gbl.F.Out,"<select name=\"crs\" style=\"width:175px;\"");
if (Gbl.CurrentDeg.Deg.DegCod > 0) if (Gbl.CurrentDeg.Deg.DegCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,"><option value=\"\"");
@ -1090,7 +1090,7 @@ void Crs_WriteSelectorMyCourses (void)
fprintf (Gbl.F.Out,"<select name=\"CrsCod\"" fprintf (Gbl.F.Out,"<select name=\"CrsCod\""
" style=\"width:130px; margin:1px;\"" " style=\"width:130px; margin:1px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
/***** Write an option when no course selected *****/ /***** Write an option when no course selected *****/
if (Gbl.CurrentCrs.Crs.CrsCod <= 0) if (Gbl.CurrentCrs.Crs.CrsCod <= 0)
@ -1410,7 +1410,7 @@ static void Crs_ListCoursesForEdition (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Crs_LENGTH_INSTITUTIONAL_CRS_COD, Crs_LENGTH_INSTITUTIONAL_CRS_COD,
Crs->InstitutionalCrsCod, Crs->InstitutionalCrsCod,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1426,7 +1426,7 @@ static void Crs_ListCoursesForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"OthDegCod\"" fprintf (Gbl.F.Out,"<select name=\"OthDegCod\""
" class=\"INPUT_DEGREE\"" " class=\"INPUT_DEGREE\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (NumDeg = 0; for (NumDeg = 0;
NumDeg < Gbl.Usrs.Me.MyAdminDegs.Num; NumDeg < Gbl.Usrs.Me.MyAdminDegs.Num;
NumDeg++) NumDeg++)
@ -1451,7 +1451,7 @@ static void Crs_ListCoursesForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\"" fprintf (Gbl.F.Out,"<select name=\"OthCrsYear\""
" style=\"width:50px;\"" " style=\"width:50px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (YearAux = 0; for (YearAux = 0;
YearAux <= Deg_MAX_YEARS_PER_DEGREE; YearAux <= Deg_MAX_YEARS_PER_DEGREE;
YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years) YearAux++) // All the years are permitted because it's possible to move this course to another degree (with other active years)
@ -1478,7 +1478,7 @@ static void Crs_ListCoursesForEdition (void)
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Crs_MAX_LENGTH_COURSE_SHORT_NAME,Crs->ShortName, Crs_MAX_LENGTH_COURSE_SHORT_NAME,Crs->ShortName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1496,7 +1496,7 @@ static void Crs_ListCoursesForEdition (void)
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Crs_MAX_LENGTH_COURSE_FULL_NAME,Crs->FullName, Crs_MAX_LENGTH_COURSE_FULL_NAME,Crs->FullName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1528,7 +1528,7 @@ static void Crs_ListCoursesForEdition (void)
"<option value=\"%u\" selected=\"selected\">%s</option>" "<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>" "<option value=\"%u\">%s</option>"
"</select>", "</select>",
Gbl.FormId, Gbl.Form.Id,
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING), (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_PENDING),
Txt_COURSE_STATUS[Crs_STATUS_PENDING], Txt_COURSE_STATUS[Crs_STATUS_PENDING],
(unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE), (unsigned) Crs_GetStatusBitsFromStatusTxt (Crs_STATUS_ACTIVE),

View File

@ -334,7 +334,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id,Id); Id,ParamName,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Year = FirstYear; for (Year = FirstYear;
Year <= LastYear; Year <= LastYear;
@ -353,7 +353,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id,Id); Id,ParamName,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Month = 1; for (Month = 1;
Month <= 12; Month <= 12;
@ -370,7 +370,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id); Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Day = 1; for (Day = 1;
Day <= 31; Day <= 31;
@ -387,7 +387,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id); Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Hour = 0; for (Hour = 0;
Hour <= 23; Hour <= 23;
@ -404,7 +404,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id); Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Minute = 0; for (Minute = 0;
Minute <= 59; Minute <= 59;
@ -421,7 +421,7 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
Id,ParamName,Id); Id,ParamName,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
for (Second = 0; for (Second = 0;
Second <= 59; Second <= 59;
@ -581,7 +581,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
Id,Id,Id); Id,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\""); fprintf (Gbl.F.Out,"\"");
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
@ -605,7 +605,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
Id,Id,Id); Id,Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out,"document.getElementById('%s').submit();", fprintf (Gbl.F.Out,"document.getElementById('%s').submit();",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,"\""); fprintf (Gbl.F.Out,"\"");
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
@ -628,7 +628,7 @@ void Dat_WriteFormDate (unsigned FirstYear,unsigned LastYear,
Id,Id); Id,Id);
if (SubmitFormOnChange) if (SubmitFormOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
if (Disabled) if (Disabled)
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"0\">-</option>"); fprintf (Gbl.F.Out,"><option value=\"0\">-</option>");

View File

@ -593,7 +593,7 @@ static void Deg_WriteSelectorOfDegree (void)
fprintf (Gbl.F.Out,"<select name=\"deg\" style=\"width:175px;\""); fprintf (Gbl.F.Out,"<select name=\"deg\" style=\"width:175px;\"");
if (Gbl.CurrentCtr.Ctr.CtrCod > 0) if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,"><option value=\"\"");
@ -1277,7 +1277,7 @@ static void Deg_ListDegreeTypesForEdition (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Deg_MAX_LENGTH_DEGREE_TYPE_NAME, Deg_MAX_LENGTH_DEGREE_TYPE_NAME,
Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypName, Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1289,7 +1289,7 @@ static void Deg_ListDegreeTypesForEdition (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Gbl.Degs.DegTypes.Lst[NumDegTyp].AllowDirectLogIn ? " checked=\"checked\"" : Gbl.Degs.DegTypes.Lst[NumDegTyp].AllowDirectLogIn ? " checked=\"checked\"" :
"", "",
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1500,7 +1500,7 @@ static void Deg_ListDegreesForEdition (void)
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (Deg->DegCod);
fprintf (Gbl.F.Out,"<select name=\"OthCtrCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"OthCtrCod\" style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (NumCtr = 0; for (NumCtr = 0;
NumCtr < Gbl.Ctrs.Num; NumCtr < Gbl.Ctrs.Num;
NumCtr++) NumCtr++)
@ -1526,7 +1526,7 @@ static void Deg_ListDegreesForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Deg_MAX_LENGTH_DEGREE_SHORT_NAME,Deg->ShortName,Gbl.FormId); Deg_MAX_LENGTH_DEGREE_SHORT_NAME,Deg->ShortName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1543,7 +1543,7 @@ static void Deg_ListDegreesForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Deg_MAX_LENGTH_DEGREE_FULL_NAME,Deg->FullName,Gbl.FormId); Deg_MAX_LENGTH_DEGREE_FULL_NAME,Deg->FullName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1559,7 +1559,7 @@ static void Deg_ListDegreesForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\"" fprintf (Gbl.F.Out,"<select name=\"OthDegTypCod\""
" style=\"width:62px;\"" " style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (NumDegTyp = 0; for (NumDegTyp = 0;
NumDegTyp < Gbl.Degs.DegTypes.Num; NumDegTyp < Gbl.Degs.DegTypes.Num;
NumDegTyp++) NumDegTyp++)
@ -1590,7 +1590,7 @@ static void Deg_ListDegreesForEdition (void)
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (Deg->DegCod);
fprintf (Gbl.F.Out,"<select name=\"FirstYear\"" fprintf (Gbl.F.Out,"<select name=\"FirstYear\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Year = 0; for (Year = 0;
Year <= Deg_MAX_YEARS_PER_DEGREE; Year <= Deg_MAX_YEARS_PER_DEGREE;
Year++) Year++)
@ -1614,7 +1614,7 @@ static void Deg_ListDegreesForEdition (void)
Deg_PutParamOtherDegCod (Deg->DegCod); Deg_PutParamOtherDegCod (Deg->DegCod);
fprintf (Gbl.F.Out,"<select name=\"LastYear\"" fprintf (Gbl.F.Out,"<select name=\"LastYear\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Year = 0; for (Year = 0;
Year <= Deg_MAX_YEARS_PER_DEGREE; Year <= Deg_MAX_YEARS_PER_DEGREE;
Year++) Year++)
@ -1640,7 +1640,7 @@ static void Deg_ListDegreesForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Deg->WWW,Gbl.FormId); Cns_MAX_LENGTH_WWW,Deg->WWW,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1675,7 +1675,7 @@ static void Deg_ListDegreesForEdition (void)
"<option value=\"%u\" selected=\"selected\">%s</option>" "<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>" "<option value=\"%u\">%s</option>"
"</select>", "</select>",
Gbl.FormId, Gbl.Form.Id,
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING), (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_PENDING),
Txt_DEGREE_STATUS[Deg_STATUS_PENDING], Txt_DEGREE_STATUS[Deg_STATUS_PENDING],
(unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE), (unsigned) Deg_GetStatusBitsFromStatusTxt (Deg_STATUS_ACTIVE),

View File

@ -531,7 +531,7 @@ static void Dpt_ListDepartmentsForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:62px;\""
"onchange=\"document.getElementById('%s').submit();\">" "onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"0\"", "<option value=\"0\"",
Gbl.FormId); Gbl.Form.Id);
if (Dpt->InsCod == 0) if (Dpt->InsCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution); fprintf (Gbl.F.Out,">%s</option>",Txt_Another_institution);
@ -555,7 +555,7 @@ static void Dpt_ListDepartmentsForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
MAX_LENGTH_DEPARTMENT_SHORT_NAME,Dpt->ShortName,Gbl.FormId); MAX_LENGTH_DEPARTMENT_SHORT_NAME,Dpt->ShortName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -567,7 +567,7 @@ static void Dpt_ListDepartmentsForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
MAX_LENGTH_DEPARTMENT_FULL_NAME,Dpt->FullName,Gbl.FormId); MAX_LENGTH_DEPARTMENT_FULL_NAME,Dpt->FullName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -579,7 +579,7 @@ static void Dpt_ListDepartmentsForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Dpt->WWW,Gbl.FormId); Cns_MAX_LENGTH_WWW,Dpt->WWW,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -2785,7 +2785,7 @@ void Enr_ShowEnrollmentRequests (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** User name *****/ /***** User name *****/

View File

@ -3124,7 +3124,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s" "%s"
"</li>", "</li>",
Gbl.FormId, Gbl.Form.Id,
Gbl.CurrentCrs.Crs.FullName); Gbl.CurrentCrs.Crs.FullName);
/***** List my groups for unique selection *****/ /***** List my groups for unique selection *****/
@ -3157,7 +3157,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s %s" "%s %s"
"</li>", "</li>",
Gbl.FormId, Gbl.Form.Id,
GrpDat.GrpTypName,GrpDat.GrpName); GrpDat.GrpTypName,GrpDat.GrpName);
} }
@ -3213,7 +3213,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO93x124",Pho_ZOOM,NULL); "PHOTO93x124",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Start form to send a message to this user *****/ /***** Start form to send a message to this user *****/
@ -4425,7 +4425,7 @@ static void Brw_WriteFormFullTree (void)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
" %s", " %s",
Gbl.FormId, Gbl.Form.Id,
Txt_Show_all_files); Txt_Show_all_files);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -5700,7 +5700,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,Brw_FileType_t FileT
FileName,Gbl.FileBrowser.InputStyle, FileName,Gbl.FileBrowser.InputStyle,
Gbl.FileBrowser.Clipboard.IsThisFile ? "LIGHT_GREEN" : Gbl.FileBrowser.Clipboard.IsThisFile ? "LIGHT_GREEN" :
Gbl.ColorRows[Gbl.RowEvenOdd], Gbl.ColorRows[Gbl.RowEvenOdd],
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -5958,7 +5958,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,unsigned long UsrCod)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20B",Pho_ZOOM,NULL); "PHOTO15x20B",Pho_ZOOM,false);
} }
else else
fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\"" fprintf (Gbl.F.Out,"<img src=\"%s/usr_bl.jpg\""
@ -7835,7 +7835,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
/***** Form to upload files using the library Dropzone.js *****/ /***** Form to upload files using the library Dropzone.js *****/
// Use min-height:125px; or other number to stablish the height? // Use min-height:125px; or other number to stablish the height?
Gbl.NumForm++; Gbl.Form.Num++;
fprintf (Gbl.F.Out,"<form method=\"post\" action=\"%s/%s\"" fprintf (Gbl.F.Out,"<form method=\"post\" action=\"%s/%s\""
" class=\"dropzone\"" " class=\"dropzone\""
" enctype=\"multipart/form-data\"" " enctype=\"multipart/form-data\""
@ -9051,7 +9051,7 @@ void Brw_ShowFileMetadata (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&PublisherUsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&PublisherUsrDat,PhotoURL);
Pho_ShowUsrPhoto (&PublisherUsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&PublisherUsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20",Pho_ZOOM,NULL); "PHOTO15x20",Pho_ZOOM,false);
/* Write name */ /* Write name */
fprintf (Gbl.F.Out,"%s", fprintf (Gbl.F.Out,"%s",

View File

@ -488,7 +488,7 @@ static void Fol_ShowFollowedOrFollower (const struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,NULL); "PHOTO45x60",Pho_ZOOM,false);
} }
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -1786,7 +1786,7 @@ static void For_PutFormWhichForums (void)
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s" "%s"
"</li>", "</li>",
Gbl.FormId,Txt_FORUM_WHICH_FORUM[WhichForums]); Gbl.Form.Id,Txt_FORUM_WHICH_FORUM[WhichForums]);
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>"
"</div>"); "</div>");

View File

@ -108,9 +108,8 @@ void Gbl_InitializeGlobals (void)
Gbl.F.Tmp = NULL; Gbl.F.Tmp = NULL;
Gbl.F.XML = NULL; Gbl.F.XML = NULL;
Gbl.InsideForm = false; // Set to true inside a form to avoid nested forms Gbl.Form.Num = -1; // Number of form. It's increased by 1 at the begin of each form
Gbl.NumForm = -1; // Number of form. It's increased by 1 at the begin of each form Gbl.Form.Inside = false; // Set to true inside a form to avoid nested forms
Gbl.NumFormConnectedUsrs = -1; // Number of form in list of connected users. It's increased by 1 at the begin of each form
Gbl.Error = false; Gbl.Error = false;

View File

@ -86,10 +86,13 @@ struct Globals
struct Files F; struct Files F;
MYSQL mysql; MYSQL mysql;
pid_t PID; // PID of current process pid_t PID; // PID of current process
bool InsideForm; // Set to true inside a form to avoid nested forms struct
int NumForm; // Number of form, used in form submit links {
int NumFormConnectedUsrs; // Number of form in list of connected users, used in form submit links int Num; // Number of form, used in form submit links
char FormId[32]; // Identifier string used in forms char Id[32]; // Identifier string used in forms
char UniqueId[32+Cry_LENGTH_ENCRYPTED_STR_SHA256_BASE64+10+1]; // Unique identifier string used in forms
bool Inside; // Set to true inside a form to avoid nested forms
} Form;
bool Error; bool Error;
bool GetMethod; // Am I accessed using GET method? bool GetMethod; // Am I accessed using GET method?
struct soap *soap; // gSOAP runtime environment struct soap *soap; // gSOAP runtime environment

View File

@ -1153,7 +1153,7 @@ static void Grp_ListGroupTypesForEdition (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
MAX_LENGTH_GROUP_TYPE_NAME, MAX_LENGTH_GROUP_TYPE_NAME,
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1165,7 +1165,7 @@ static void Grp_ListGroupTypesForEdition (void)
" style=\"width:150px;\"" " style=\"width:150px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"N\"", "<option value=\"N\"",
Gbl.FormId); Gbl.Form.Id);
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrollment) if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MandatoryEnrollment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"
@ -1187,7 +1187,7 @@ static void Grp_ListGroupTypesForEdition (void)
" style=\"width:150px;\"" " style=\"width:150px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"N\"", "<option value=\"N\"",
Gbl.FormId); Gbl.Form.Id);
if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment) if (!Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>" fprintf (Gbl.F.Out,">%s</option>"
@ -1371,7 +1371,7 @@ static void Grp_ListGroupsForEdition (void)
Grp_PutParamGrpCod (Grp->GrpCod); Grp_PutParamGrpCod (Grp->GrpCod);
fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\"" fprintf (Gbl.F.Out,"<select name=\"GrpTypCod\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (NumTipGrpAux = 0; for (NumTipGrpAux = 0;
NumTipGrpAux < Gbl.CurrentCrs.Grps.GrpTypes.Num; NumTipGrpAux < Gbl.CurrentCrs.Grps.GrpTypes.Num;
NumTipGrpAux++) NumTipGrpAux++)
@ -1393,7 +1393,7 @@ static void Grp_ListGroupsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"GrpName\""
" size=\"40\" maxlength=\"%u\" value=\"%s\"" " size=\"40\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
MAX_LENGTH_GROUP_NAME,Grp->GrpName,Gbl.FormId); MAX_LENGTH_GROUP_NAME,Grp->GrpName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1405,7 +1405,7 @@ static void Grp_ListGroupsForEdition (void)
" size=\"3\" maxlength=\"10\" value=\""); " size=\"3\" maxlength=\"10\" value=\"");
Grp_WriteMaxStdsGrp (Grp->MaxStudents); Grp_WriteMaxStdsGrp (Grp->MaxStudents);
fprintf (Gbl.F.Out,"\" onchange=\"document.getElementById('%s').submit();\" />", fprintf (Gbl.F.Out,"\" onchange=\"document.getElementById('%s').submit();\" />",
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -4179,7 +4179,7 @@ void Grp_ShowSelectorWhichGrps (void)
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
" %s" " %s"
"</li>", "</li>",
Gbl.FormId,Txt_Show_WHICH_groups[WhichGrps]); Gbl.Form.Id,Txt_Show_WHICH_groups[WhichGrps]);
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>"
"</div>"); "</div>");

View File

@ -508,7 +508,7 @@ static void Hld_ListHolidaysForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"PlcCod\" style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"", "<option value=\"-1\"",
Gbl.FormId); Gbl.Form.Id);
if (Hld->PlcCod <= 0) if (Hld->PlcCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_All_places); fprintf (Gbl.F.Out,">%s</option>",Txt_All_places);
@ -530,7 +530,7 @@ static void Hld_ListHolidaysForEdition (void)
Hld_PutParamHldCod (Hld->HldCod); Hld_PutParamHldCod (Hld->HldCod);
fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\"" fprintf (Gbl.F.Out,"<select name=\"HldTyp\" style=\"width:62px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (HolidayType = (Hld_HolidayType_t) 0; for (HolidayType = (Hld_HolidayType_t) 0;
HolidayType < Hld_NUM_TYPES_HOLIDAY; HolidayType < Hld_NUM_TYPES_HOLIDAY;
HolidayType++) HolidayType++)
@ -574,7 +574,7 @@ static void Hld_ListHolidaysForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
" size=\"20\" maxlength=\"%u\" value=\"%s\"" " size=\"20\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Hld_MAX_LENGTH_HOLIDAY_NAME,Hld->Name,Gbl.FormId); Hld_MAX_LENGTH_HOLIDAY_NAME,Hld->Name,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -440,7 +440,7 @@ static void Inf_PutFormToForceStdsToReadInfo (Inf_InfoType_t InfoType,bool MustB
fprintf (Gbl.F.Out," name=\"MustBeRead\" value=\"Y\"" fprintf (Gbl.F.Out," name=\"MustBeRead\" value=\"Y\""
" onchange=\"document.getElementById('%s').submit();\" />" " onchange=\"document.getElementById('%s').submit();\" />"
" %s", " %s",
Gbl.FormId, Gbl.Form.Id,
Txt_Force_students_to_read_this_information); Txt_Force_students_to_read_this_information);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -465,7 +465,7 @@ static void Inf_PutFormToConfirmIHaveReadInfo (Inf_InfoType_t InfoType)
fprintf (Gbl.F.Out," name=\"IHaveRead\" value=\"Y\"" fprintf (Gbl.F.Out," name=\"IHaveRead\" value=\"Y\""
" onchange=\"document.getElementById('%s').submit();\" />" " onchange=\"document.getElementById('%s').submit();\" />"
"%s", "%s",
Gbl.FormId, Gbl.Form.Id,
Txt_I_have_read_this_information); Txt_I_have_read_this_information);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -952,7 +952,7 @@ void Inf_FormsToSelSendInfo (void)
if (InfoSrc == InfoSrcSelected) if (InfoSrc == InfoSrcSelected)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />", fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -1055,7 +1055,7 @@ void Ins_WriteSelectorOfInstitution (void)
fprintf (Gbl.F.Out,"<select name=\"ins\" style=\"width:175px;\""); fprintf (Gbl.F.Out,"<select name=\"ins\" style=\"width:175px;\"");
if (Gbl.CurrentCty.Cty.CtyCod > 0) if (Gbl.CurrentCty.Cty.CtyCod > 0)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
else else
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
fprintf (Gbl.F.Out,"><option value=\"\""); fprintf (Gbl.F.Out,"><option value=\"\"");
@ -1181,7 +1181,7 @@ static void Ins_ListInstitutionsForEdition (void)
fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:40px;\"" fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:40px;\""
" onchange=\"document.getElementById('%s').submit();\" />" " onchange=\"document.getElementById('%s').submit();\" />"
"<option value=\"0\"", "<option value=\"0\"",
Gbl.FormId); Gbl.Form.Id);
if (Ins->CtyCod == 0) if (Ins->CtyCod == 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_country); fprintf (Gbl.F.Out,">%s</option>",Txt_Another_country);
@ -1213,7 +1213,7 @@ static void Ins_ListInstitutionsForEdition (void)
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ins_MAX_LENGTH_INSTITUTION_SHORT_NAME,Ins->ShortName, Ins_MAX_LENGTH_INSTITUTION_SHORT_NAME,Ins->ShortName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1231,7 +1231,7 @@ static void Ins_ListInstitutionsForEdition (void)
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Ins_MAX_LENGTH_INSTITUTION_FULL_NAME,Ins->FullName, Ins_MAX_LENGTH_INSTITUTION_FULL_NAME,Ins->FullName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
else else
@ -1249,7 +1249,7 @@ static void Ins_ListInstitutionsForEdition (void)
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Ins->WWW, Cns_MAX_LENGTH_WWW,Ins->WWW,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -1296,7 +1296,7 @@ static void Ins_ListInstitutionsForEdition (void)
"<option value=\"%u\" selected=\"selected\">%s</option>" "<option value=\"%u\" selected=\"selected\">%s</option>"
"<option value=\"%u\">%s</option>" "<option value=\"%u\">%s</option>"
"</select>", "</select>",
Gbl.FormId, Gbl.Form.Id,
(unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING), (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_PENDING),
Txt_INSTITUTION_STATUS[Ins_STATUS_PENDING], Txt_INSTITUTION_STATUS[Ins_STATUS_PENDING],
(unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_ACTIVE), (unsigned) Ins_GetStatusBitsFromStatusTxt (Ins_STATUS_ACTIVE),

View File

@ -1073,8 +1073,8 @@ void Lay_PutCalculateIconWithText (const char *Alt,const char *Text)
"&nbsp;%s" "&nbsp;%s"
"</div>" "</div>"
"</a>", "</a>",
Gbl.NumForm,Gbl.Prefs.IconsURL,Alt,Text, Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Gbl.NumForm,Gbl.Prefs.IconsURL,Alt,Text, Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Text); Text);
} }

View File

@ -356,7 +356,7 @@ static void Lnk_ListLinksForEdition (void)
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Lnk_MAX_LENGTH_LINK_SHORT_NAME,Lnk->ShortName, Lnk_MAX_LENGTH_LINK_SHORT_NAME,Lnk->ShortName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -369,7 +369,7 @@ static void Lnk_ListLinksForEdition (void)
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Lnk_MAX_LENGTH_LINK_FULL_NAME,Lnk->FullName, Lnk_MAX_LENGTH_LINK_FULL_NAME,Lnk->FullName,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -382,7 +382,7 @@ static void Lnk_ListLinksForEdition (void)
" class=\"INPUT_WWW\"" " class=\"INPUT_WWW\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Lnk->WWW, Cns_MAX_LENGTH_WWW,Lnk->WWW,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -424,7 +424,7 @@ static void Mai_ListMailDomainsForEdition (void)
" size=\"15\" maxlength=\"%u\" value=\"%s\"" " size=\"15\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Mai_MAX_LENGTH_MAIL_DOMAIN,Mai->Domain, Mai_MAX_LENGTH_MAIL_DOMAIN,Mai->Domain,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -436,7 +436,7 @@ static void Mai_ListMailDomainsForEdition (void)
" size=\"40\" maxlength=\"%u\" value=\"%s\"" " size=\"40\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Mai_MAX_LENGTH_MAIL_INFO,Mai->Info, Mai_MAX_LENGTH_MAIL_INFO,Mai->Info,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -143,7 +143,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType,
Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header, Mrk_HeadOrFootStr[Brw_HEADER],Marks.Header,
Gbl.FileBrowser.InputStyle, Gbl.FileBrowser.InputStyle,
Gbl.RowEvenOdd, Gbl.RowEvenOdd,
Gbl.FormId); Gbl.Form.Id);
Brw_ParamListFiles (FileType,PathInTree,FileName); Brw_ParamListFiles (FileType,PathInTree,FileName);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -170,7 +170,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType,
Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer, Mrk_HeadOrFootStr[Brw_FOOTER],Marks.Footer,
Gbl.FileBrowser.InputStyle, Gbl.FileBrowser.InputStyle,
Gbl.RowEvenOdd, Gbl.RowEvenOdd,
Gbl.FormId); Gbl.Form.Id);
Brw_ParamListFiles (FileType,PathInTree,FileName); Brw_ParamListFiles (FileType,PathInTree,FileName);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -469,7 +469,7 @@ static void Msg_ShowOneUniqueRecipient (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Other.UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Other.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
/****** Write user's IDs ******/ /****** Write user's IDs ******/
fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">", fprintf (Gbl.F.Out,"<div class=\"MSG_TO_ONE_RCP %s\">",
@ -2973,7 +2973,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO30x40",Pho_ZOOM,NULL); "PHOTO30x40",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Second column with user name (if author has a web page, put a link to it) *****/ /***** Second column with user name (if author has a web page, put a link to it) *****/
@ -3136,7 +3136,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
ShowPhoto = (Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL)); ShowPhoto = (Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL));
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
/***** Write user's name *****/ /***** Write user's name *****/
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
@ -3282,7 +3282,7 @@ static void Msg_WriteMsgTo (Msg_TypeOfMessages_t TypeOfMessages,long MsgCod)
false); false);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
/* Write user's name */ /* Write user's name */
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
@ -3655,7 +3655,7 @@ void Msg_ListBannedUsrs (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write user's full name */ /* Write user's full name */

View File

@ -335,7 +335,7 @@ void Net_ShowFormMyWebsAndSocialNets (void)
" style=\"width:500px;\" maxlength=\"%u\" value=\"%s\"" " style=\"width:500px;\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_URL,URL, Cns_MAX_LENGTH_URL,URL,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -616,7 +616,7 @@ static void Ntf_WriteFormAllNotifications (bool AllNotifications)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
" %s", " %s",
Gbl.FormId, Gbl.Form.Id,
Txt_Show_all_notifications); Txt_Show_all_notifications);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -637,7 +637,7 @@ static bool Ntf_GetAllNotificationsFromForm (void)
/*****************************************************************************/ /*****************************************************************************/
/*********** Put form to go to an action depending on the event **************/ /*********** Put form to go to an action depending on the event **************/
/*****************************************************************************/ /*****************************************************************************/
// Return the value of Gbl.InsideForm (true if form is started) // Return the value of Gbl.Form.Inside (true if form is started)
static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
long CrsCod,long Cod) long CrsCod,long Cod)
@ -712,7 +712,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
} }
/***** Parameter to go to another course/degree/centre/institution *****/ /***** Parameter to go to another course/degree/centre/institution *****/
if (Gbl.InsideForm) if (Gbl.Form.Inside)
{ {
if (CrsCod > 0) // Course specified if (CrsCod > 0) // Course specified
{ {
@ -736,7 +736,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
} }
} }
return Gbl.InsideForm; return Gbl.Form.Inside;
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -312,7 +312,8 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\">"); "<td colspan=\"2\">");
// if (PhotoExists) // if (PhotoExists)
Pho_ShowUsrPhoto (UsrDat,PhotoURL,"PHOTO186x248",Pho_NO_ZOOM,NULL); Pho_ShowUsrPhoto (UsrDat,PhotoURL,
"PHOTO186x248",Pho_NO_ZOOM,false);
Lay_ShowAlert (Lay_INFO,Txt_You_can_send_a_file_with_an_image_in_jpg_format_); Lay_ShowAlert (Lay_INFO,Txt_You_can_send_a_file_with_an_image_in_jpg_format_);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -550,7 +551,7 @@ void Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *UsrDat)
Lay_ShowErrorAndExit ("Can not read text file with coordinates of detected faces."); Lay_ShowErrorAndExit ("Can not read text file with coordinates of detected faces.");
/***** Read file with coordinates for image map and compute the number of faces *****/ /***** Read file with coordinates for image map and compute the number of faces *****/
NumLastForm = Gbl.NumForm; NumLastForm = Gbl.Form.Num;
while (!feof (FileTxtMap)) while (!feof (FileTxtMap))
{ {
if (fscanf (FileTxtMap,"%u %u %u %u %s\n",&X,&Y,&Radius,&BackgroundCode,StrFileName) != 5) // Example of StrFileName = "4924a838630e_016" if (fscanf (FileTxtMap,"%u %u %u %u %s\n",&X,&Y,&Radius,&BackgroundCode,StrFileName) != 5) // Example of StrFileName = "4924a838630e_016"
@ -1028,13 +1029,13 @@ void Pho_UpdatePhotoName (struct UsrData *UsrDat)
void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom, const char *ClassPhoto,Pho_Zoom_t Zoom,
const char *Id) bool FormUnique)
{ {
char SpecialFullName [3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1]; char SpecialFullName [3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];
char SpecialShortName[3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+6]; char SpecialShortName[3*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+6];
char SpecialSurnames [2*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1]; char SpecialSurnames [2*(Usr_MAX_BYTES_NAME_SPEC_CHAR+1)+1];
bool PhotoExists; bool PhotoExists;
bool PutLinkToPublicProfile = !Gbl.InsideForm && // Only if not inside another form bool PutLinkToPublicProfile = !Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW; // Only in main window Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW; // Only in main window
bool PutZoomCode = PhotoURL && // Photo exists bool PutZoomCode = PhotoURL && // Photo exists
Zoom == Pho_ZOOM && // Make zoom Zoom == Pho_ZOOM && // Make zoom
@ -1049,13 +1050,13 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
/***** Start form to go to public profile *****/ /***** Start form to go to public profile *****/
if (PutLinkToPublicProfile) if (PutLinkToPublicProfile)
{ {
if (Id) if (FormUnique)
Act_FormStartId (ActSeePubPrf,Id); Act_FormStartUnique (ActSeePubPrf);
else else
Act_FormStart (ActSeePubPrf); Act_FormStart (ActSeePubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
if (Id) if (FormUnique)
Act_LinkFormSubmitId (NULL,NULL,Id); Act_LinkFormSubmitUnique (NULL,NULL);
else else
Act_LinkFormSubmit (NULL,NULL); Act_LinkFormSubmit (NULL,NULL);
} }
@ -1570,7 +1571,7 @@ static void Pho_PutSelectorForTypeOfAvg (void)
Usr_PutParamColsClassPhoto (); Usr_PutParamColsClassPhoto ();
fprintf (Gbl.F.Out,"<select name=\"AvgType\"" fprintf (Gbl.F.Out,"<select name=\"AvgType\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0; for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0;
TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES; TypeOfAvg < Pho_NUM_AVERAGE_PHOTO_TYPES;
TypeOfAvg++) TypeOfAvg++)
@ -1639,7 +1640,7 @@ static void Pho_PutSelectorForHowComputePhotoSize (void)
Usr_PutParamColsClassPhoto (); Usr_PutParamColsClassPhoto ();
fprintf (Gbl.F.Out,"<select name=\"PhotoSize\"" fprintf (Gbl.F.Out,"<select name=\"PhotoSize\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (PhoSi = (Pho_HowComputePhotoSize_t) 0; for (PhoSi = (Pho_HowComputePhotoSize_t) 0;
PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES; PhoSi < Pho_NUM_HOW_COMPUTE_PHOTO_SIZES;
PhoSi++) PhoSi++)
@ -1708,7 +1709,7 @@ static void Pho_PutSelectorForHowOrderDegrees (void)
Usr_PutParamColsClassPhoto (); Usr_PutParamColsClassPhoto ();
fprintf (Gbl.F.Out,"<select name=\"OrdDeg\"" fprintf (Gbl.F.Out,"<select name=\"OrdDeg\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Order = (Pho_HowOrderDegrees_t) 0; for (Order = (Pho_HowOrderDegrees_t) 0;
Order < Pho_NUM_HOW_ORDER_DEGREES; Order < Pho_NUM_HOW_ORDER_DEGREES;
Order++) Order++)

View File

@ -108,7 +108,7 @@ bool Pho_RemovePhoto (struct UsrData *UsrDat);
void Pho_UpdatePhotoName (struct UsrData *UsrDat); void Pho_UpdatePhotoName (struct UsrData *UsrDat);
void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
const char *ClassPhoto,Pho_Zoom_t Zoom, const char *ClassPhoto,Pho_Zoom_t Zoom,
const char *Id); bool FormUnique);
void Pho_ChangePhotoVisibility (void); void Pho_ChangePhotoVisibility (void);

View File

@ -464,7 +464,7 @@ static void Plc_ListPlacesForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\"" " class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plc_MAX_LENGTH_PLACE_SHORT_NAME,Plc->ShortName,Gbl.FormId); Plc_MAX_LENGTH_PLACE_SHORT_NAME,Plc->ShortName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -476,7 +476,7 @@ static void Plc_ListPlacesForEdition (void)
" maxlength=\"%u\" value=\"%s\"" " maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_FULL_NAME\"" " class=\"INPUT_FULL_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plc_MAX_LENGTH_PLACE_FULL_NAME,Plc->FullName,Gbl.FormId); Plc_MAX_LENGTH_PLACE_FULL_NAME,Plc->FullName,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -401,7 +401,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Name\""
" size=\"10\" maxlength=\"%u\" value=\"%s\"" " size=\"10\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plg_MAX_LENGTH_PLUGIN_NAME,Plg->Name,Gbl.FormId); Plg_MAX_LENGTH_PLUGIN_NAME,Plg->Name,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -412,7 +412,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Description\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Description\""
" size=\"30\" maxlength=\"%u\" value=\"%s\"" " size=\"30\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plg_MAX_LENGTH_PLUGIN_DESCRIPTION,Plg->Description,Gbl.FormId); Plg_MAX_LENGTH_PLUGIN_DESCRIPTION,Plg->Description,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -423,7 +423,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Logo\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Logo\""
" size=\"4\" maxlength=\"%u\" value=\"%s\"" " size=\"4\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plg_MAX_LENGTH_PLUGIN_LOGO,Plg->Logo,Gbl.FormId); Plg_MAX_LENGTH_PLUGIN_LOGO,Plg->Logo,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -434,7 +434,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AppKey\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"AppKey\""
" size=\"16\" maxlength=\"%u\" value=\"%s\"" " size=\"16\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Plg_MAX_LENGTH_PLUGIN_APP_KEY,Plg->AppKey,Gbl.FormId); Plg_MAX_LENGTH_PLUGIN_APP_KEY,Plg->AppKey,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -445,7 +445,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"URL\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"URL\""
" size=\"15\" maxlength=\"%u\" value=\"%s\"" " size=\"15\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_WWW,Plg->URL,Gbl.FormId); Cns_MAX_LENGTH_WWW,Plg->URL,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -456,7 +456,7 @@ static void Plg_ListPluginsForEdition (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"IP\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"IP\""
" size=\"10\" maxlength=\"%u\" value=\"%s\"" " size=\"10\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_IP,Plg->IP,Gbl.FormId); Cns_MAX_LENGTH_IP,Plg->IP,Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -244,7 +244,7 @@ void Pre_PutSelectorToSelectLanguage (void)
fprintf (Gbl.F.Out,"<select name=\"Lan\"" fprintf (Gbl.F.Out,"<select name=\"Lan\""
" style=\"width:112px; margin:0;\"" " style=\"width:112px; margin:0;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Lan = (Txt_Language_t) 1; for (Lan = (Txt_Language_t) 1;
Lan <= Txt_NUM_LANGUAGES; Lan <= Txt_NUM_LANGUAGES;
Lan++) Lan++)

View File

@ -161,7 +161,7 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
fprintf (Gbl.F.Out," disabled=\"disabled\""); fprintf (Gbl.F.Out," disabled=\"disabled\"");
else else
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out," />" fprintf (Gbl.F.Out," />"
"%s" "%s"
"</li>", "</li>",

View File

@ -1447,7 +1447,7 @@ void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO30x40",Pho_ZOOM,NULL); "PHOTO30x40",Pho_ZOOM,false);
} }
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"

View File

@ -219,7 +219,7 @@ void Rec_ListFieldsRecordsForEdition (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Rec_MAX_LENGTH_NAME_FIELD, Rec_MAX_LENGTH_NAME_FIELD,
Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Name, Gbl.CurrentCrs.Records.LstFields.Lst[NumField].Name,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -231,7 +231,7 @@ void Rec_ListFieldsRecordsForEdition (void)
" size=\"2\" maxlength=\"2\" value=\"%u\"" " size=\"2\" maxlength=\"2\" value=\"%u\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Gbl.CurrentCrs.Records.LstFields.Lst[NumField].NumLines, Gbl.CurrentCrs.Records.LstFields.Lst[NumField].NumLines,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -241,7 +241,7 @@ void Rec_ListFieldsRecordsForEdition (void)
Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod); Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod);
fprintf (Gbl.F.Out,"<select name=\"Visibility\"" fprintf (Gbl.F.Out,"<select name=\"Visibility\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Vis = (Rec_VisibilityRecordFields_t) 0; for (Vis = (Rec_VisibilityRecordFields_t) 0;
Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY; Vis < (Rec_VisibilityRecordFields_t) Rec_NUM_TYPES_VISIBILITY;
Vis++) Vis++)
@ -1382,7 +1382,7 @@ static void Rec_WriteFormShowOfficeHours (bool ShowOfficeHours,const char *ListU
" class=\"ICON20x20\" />" " class=\"ICON20x20\" />"
"<span class=\"%s\">&nbsp;%s</span>" "<span class=\"%s\">&nbsp;%s</span>"
"</div>", "</div>",
Gbl.FormId, Gbl.Form.Id,
Gbl.Prefs.IconsURL, Gbl.Prefs.IconsURL,
Txt_Show_office_hours, Txt_Show_office_hours,
Txt_Show_office_hours, Txt_Show_office_hours,
@ -2075,7 +2075,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
break; break;
} }
PutFormLinks = !Gbl.InsideForm && // Only if not inside another form PutFormLinks = !Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW; // Only in main window Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW; // Only in main window
/***** Start frame *****/ /***** Start frame *****/
@ -2136,7 +2136,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
Rec_C3_TOP); Rec_C3_TOP);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO186x248",Pho_NO_ZOOM,NULL); "PHOTO186x248",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -3376,7 +3376,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:500px;\"" fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:500px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"", "<option value=\"-1\"",
Gbl.FormId); Gbl.Form.Id);
if (Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0) if (Gbl.Usrs.Me.UsrDat.InsCtyCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"); fprintf (Gbl.F.Out," disabled=\"disabled\"></option>");
@ -3415,7 +3415,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:500px;\"" fprintf (Gbl.F.Out,"<select name=\"OthInsCod\" style=\"width:500px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"", "<option value=\"-1\"",
Gbl.FormId); Gbl.Form.Id);
if (Gbl.Usrs.Me.UsrDat.InsCod < 0) if (Gbl.Usrs.Me.UsrDat.InsCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>" fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"
@ -3461,7 +3461,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
fprintf (Gbl.F.Out,"<select name=\"OthCtrCod\" style=\"width:500px;\"" fprintf (Gbl.F.Out,"<select name=\"OthCtrCod\" style=\"width:500px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"", "<option value=\"-1\"",
Gbl.FormId); Gbl.Form.Id);
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0) if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>" fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"
@ -3505,7 +3505,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
fprintf (Gbl.F.Out,"<select name=\"DptCod\" style=\"width:500px;\"" fprintf (Gbl.F.Out,"<select name=\"DptCod\" style=\"width:500px;\""
" onchange=\"document.getElementById('%s').submit();\">" " onchange=\"document.getElementById('%s').submit();\">"
"<option value=\"-1\"", "<option value=\"-1\"",
Gbl.FormId); Gbl.Form.Id);
if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0) if (Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out," disabled=\"disabled\"></option>" fprintf (Gbl.F.Out," disabled=\"disabled\"></option>"
@ -3545,7 +3545,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Cns_MAX_LENGTH_STRING, Cns_MAX_LENGTH_STRING,
Gbl.Usrs.Me.UsrDat.Tch.Office, Gbl.Usrs.Me.UsrDat.Tch.Office,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -3565,7 +3565,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Usr_MAX_LENGTH_PHONE, Usr_MAX_LENGTH_PHONE,
Gbl.Usrs.Me.UsrDat.Tch.OfficePhone, Gbl.Usrs.Me.UsrDat.Tch.OfficePhone,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -293,7 +293,7 @@ void Rol_PutFormToChangeMyRole (bool FormInHead)
if (FormInHead) if (FormInHead)
fprintf (Gbl.F.Out," style=\"width:130px;\""); fprintf (Gbl.F.Out," style=\"width:130px;\"");
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\">", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (Role = Rol__GUEST_; for (Role = Rol__GUEST_;
Role < Rol_NUM_ROLES; Role < Rol_NUM_ROLES;
Role++) Role++)

View File

@ -87,7 +87,7 @@ void Sco_PutSelectorScope (bool SendOnChange)
fprintf (Gbl.F.Out,"<select name=\"Scope\""); fprintf (Gbl.F.Out,"<select name=\"Scope\"");
if (SendOnChange) if (SendOnChange)
fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"", fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
Gbl.FormId); Gbl.Form.Id);
fprintf (Gbl.F.Out,">"); fprintf (Gbl.F.Out,">");
for (Scope = (Sco_Scope_t) 0; for (Scope = (Sco_Scope_t) 0;

View File

@ -63,7 +63,7 @@
// Number of old publishings got and shown when I want to see old publishings // Number of old publishings got and shown when I want to see old publishings
#define Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW 10 // If you change this number, set also this constant to the new value in JavaScript #define Soc_MAX_OLD_PUBS_TO_GET_AND_SHOW 10 // If you change this number, set also this constant to the new value in JavaScript
#define Soc_MAX_LENGTH_ID (256+Cry_LENGTH_ENCRYPTED_STR_SHA256_BASE64+10+1) #define Soc_MAX_LENGTH_ID (32+Cry_LENGTH_ENCRYPTED_STR_SHA256_BASE64+10+1)
typedef enum typedef enum
{ {
@ -882,7 +882,6 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
char SummaryStr[Cns_MAX_BYTES_TEXT+1]; char SummaryStr[Cns_MAX_BYTES_TEXT+1];
unsigned NumComments; unsigned NumComments;
char IdNewComment[Soc_MAX_LENGTH_ID]; char IdNewComment[Soc_MAX_LENGTH_ID];
char IdForm[Soc_MAX_LENGTH_ID];
/***** Start frame ****/ /***** Start frame ****/
if (ShowNoteAlone) if (ShowNoteAlone)
@ -929,11 +928,10 @@ static void Soc_WriteSocialNote (const struct SocialNote *SocNot,
/***** Left: write author's photo *****/ /***** Left: write author's photo *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_LEFT_PHOTO\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_LEFT_PHOTO\">");
Soc_SetUniqueId (IdForm);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,IdForm); "PHOTO45x60",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** Right: author's name, time, summary and buttons *****/ /***** Right: author's name, time, summary and buttons *****/
@ -1121,7 +1119,6 @@ static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub)
extern const char *Txt_SOCIAL_USER_has_shared; extern const char *Txt_SOCIAL_USER_has_shared;
extern const char *Txt_SOCIAL_USER_has_commented; extern const char *Txt_SOCIAL_USER_has_commented;
struct UsrData UsrDat; struct UsrData UsrDat;
char IdForm[Soc_MAX_LENGTH_ID];
if (SocPub) if (SocPub)
if (SocPub->PubType == Soc_PUB_SHARED_NOTE || if (SocPub->PubType == Soc_PUB_SHARED_NOTE ||
@ -1137,10 +1134,9 @@ static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub)
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_TOP_CONTAINER SOCIAL_TOP_PUBLISHER\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_TOP_CONTAINER SOCIAL_TOP_PUBLISHER\">");
/***** Show user's name inside form to go to user's public profile *****/ /***** Show user's name inside form to go to user's public profile *****/
Soc_SetUniqueId (IdForm); Act_FormStartUnique (ActSeePubPrf);
Act_FormStartId (ActSeePubPrf,IdForm);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_public_profile,"SOCIAL_TOP_PUBLISHER",IdForm); Act_LinkFormSubmitUnique (Txt_View_public_profile,"SOCIAL_TOP_PUBLISHER");
Str_LimitLengthHTMLStr (UsrDat.FullName,40); Str_LimitLengthHTMLStr (UsrDat.FullName,40);
fprintf (Gbl.F.Out,"%s</a>",UsrDat.FullName); fprintf (Gbl.F.Out,"%s</a>",UsrDat.FullName);
Act_FormEnd (); Act_FormEnd ();
@ -1166,24 +1162,21 @@ static void Soc_WriteTopPublisher (const struct SocialPublishing *SocPub)
static void Soc_WriteAuthorNote (struct UsrData *UsrDat) static void Soc_WriteAuthorNote (struct UsrData *UsrDat)
{ {
extern const char *Txt_View_public_profile; extern const char *Txt_View_public_profile;
char IdForm[Soc_MAX_LENGTH_ID];
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_RIGHT_AUTHOR\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_RIGHT_AUTHOR\">");
/***** Show user's name inside form to go to user's public profile *****/ /***** Show user's name inside form to go to user's public profile *****/
Soc_SetUniqueId (IdForm); Act_FormStartUnique (ActSeePubPrf);
Act_FormStartId (ActSeePubPrf,IdForm);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_public_profile,"DAT_N_BOLD",IdForm); Act_LinkFormSubmitUnique (Txt_View_public_profile,"DAT_N_BOLD");
Str_LimitLengthHTMLStr (UsrDat->FullName,16); Str_LimitLengthHTMLStr (UsrDat->FullName,16);
fprintf (Gbl.F.Out,"%s</a>",UsrDat->FullName); fprintf (Gbl.F.Out,"%s</a>",UsrDat->FullName);
Act_FormEnd (); Act_FormEnd ();
/***** Show user's nickname inside form to go to user's public profile *****/ /***** Show user's nickname inside form to go to user's public profile *****/
Soc_SetUniqueId (IdForm); Act_FormStartUnique (ActSeePubPrf);
Act_FormStartId (ActSeePubPrf,IdForm);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_public_profile,"DAT_LIGHT",IdForm); Act_LinkFormSubmitUnique (Txt_View_public_profile,"DAT_LIGHT");
fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname); fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname);
Act_FormEnd (); Act_FormEnd ();
@ -1266,10 +1259,9 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
extern const char *Txt_SOCIAL_NOTE[Soc_NUM_NOTE_TYPES]; extern const char *Txt_SOCIAL_NOTE[Soc_NUM_NOTE_TYPES];
extern const char *Txt_not_available; extern const char *Txt_not_available;
char Class[64]; char Class[64];
char IdForm[Soc_MAX_LENGTH_ID];
if (SocNot->Unavailable || // File/notice... pointer by this social note is unavailable if (SocNot->Unavailable || // File/notice... pointer by this social note is unavailable
Gbl.InsideForm) // Inside another form Gbl.Form.Inside) // Inside another form
{ {
/***** Do not put form *****/ /***** Do not put form *****/
fprintf (Gbl.F.Out,"<span class=\"DAT_LIGHT\">%s", fprintf (Gbl.F.Out,"<span class=\"DAT_LIGHT\">%s",
@ -1280,41 +1272,39 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
} }
else // Not inside another form else // Not inside another form
{ {
Soc_SetUniqueId (IdForm);
/***** Parameters depending on the type of note *****/ /***** Parameters depending on the type of note *****/
switch (SocNot->NoteType) switch (SocNot->NoteType)
{ {
case Soc_NOTE_INS_DOC_PUB_FILE: case Soc_NOTE_INS_DOC_PUB_FILE:
case Soc_NOTE_INS_SHA_PUB_FILE: case Soc_NOTE_INS_SHA_PUB_FILE:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Brw_PutHiddenParamFilCod (SocNot->Cod); Brw_PutHiddenParamFilCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentIns.Ins.InsCod) // Not the current institution if (SocNot->HieCod != Gbl.CurrentIns.Ins.InsCod) // Not the current institution
Ins_PutParamInsCod (SocNot->HieCod); // Go to another institution Ins_PutParamInsCod (SocNot->HieCod); // Go to another institution
break; break;
case Soc_NOTE_CTR_DOC_PUB_FILE: case Soc_NOTE_CTR_DOC_PUB_FILE:
case Soc_NOTE_CTR_SHA_PUB_FILE: case Soc_NOTE_CTR_SHA_PUB_FILE:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Brw_PutHiddenParamFilCod (SocNot->Cod); Brw_PutHiddenParamFilCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentCtr.Ctr.CtrCod) // Not the current centre if (SocNot->HieCod != Gbl.CurrentCtr.Ctr.CtrCod) // Not the current centre
Ctr_PutParamCtrCod (SocNot->HieCod); // Go to another centre Ctr_PutParamCtrCod (SocNot->HieCod); // Go to another centre
break; break;
case Soc_NOTE_DEG_DOC_PUB_FILE: case Soc_NOTE_DEG_DOC_PUB_FILE:
case Soc_NOTE_DEG_SHA_PUB_FILE: case Soc_NOTE_DEG_SHA_PUB_FILE:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Brw_PutHiddenParamFilCod (SocNot->Cod); Brw_PutHiddenParamFilCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentDeg.Deg.DegCod) // Not the current degree if (SocNot->HieCod != Gbl.CurrentDeg.Deg.DegCod) // Not the current degree
Deg_PutParamDegCod (SocNot->HieCod); // Go to another degree Deg_PutParamDegCod (SocNot->HieCod); // Go to another degree
break; break;
case Soc_NOTE_CRS_DOC_PUB_FILE: case Soc_NOTE_CRS_DOC_PUB_FILE:
case Soc_NOTE_CRS_SHA_PUB_FILE: case Soc_NOTE_CRS_SHA_PUB_FILE:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Brw_PutHiddenParamFilCod (SocNot->Cod); Brw_PutHiddenParamFilCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course
break; break;
case Soc_NOTE_EXAM_ANNOUNCEMENT: case Soc_NOTE_EXAM_ANNOUNCEMENT:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Not_PutHiddenParamNotCod (SocNot->Cod); Not_PutHiddenParamNotCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course
@ -1322,13 +1312,13 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
case Soc_NOTE_SOCIAL_POST: // Not applicable case Soc_NOTE_SOCIAL_POST: // Not applicable
return; return;
case Soc_NOTE_FORUM_POST: case Soc_NOTE_FORUM_POST:
Act_FormStartId (For_ActionsSeeFor[Gbl.Forum.ForumType],IdForm); Act_FormStartUnique (For_ActionsSeeFor[Gbl.Forum.ForumType]);
For_PutAllHiddenParamsForum (); For_PutAllHiddenParamsForum ();
if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course
break; break;
case Soc_NOTE_NOTICE: case Soc_NOTE_NOTICE:
Act_FormStartId (Soc_DefaultActions[SocNot->NoteType],IdForm); Act_FormStartUnique (Soc_DefaultActions[SocNot->NoteType]);
Not_PutHiddenParamNotCod (SocNot->Cod); Not_PutHiddenParamNotCod (SocNot->Cod);
if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course if (SocNot->HieCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course
Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course Crs_PutParamCrsCod (SocNot->HieCod); // Go to another course
@ -1339,8 +1329,7 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
/***** Link and end form *****/ /***** Link and end form *****/
sprintf (Class,"%s ICON_HIGHLIGHT",The_ClassFormBold[Gbl.Prefs.Theme]); sprintf (Class,"%s ICON_HIGHLIGHT",The_ClassFormBold[Gbl.Prefs.Theme]);
Act_LinkFormSubmitId (Txt_SOCIAL_NOTE[SocNot->NoteType], Act_LinkFormSubmitUnique (Txt_SOCIAL_NOTE[SocNot->NoteType],Class);
Class,IdForm);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICON20x20\" />" " class=\"ICON20x20\" />"
@ -1636,7 +1625,7 @@ static void Soc_PutHiddenFormToWriteNewPost (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,NULL); "PHOTO45x60",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** Right: author's name, time, summary and buttons *****/ /***** Right: author's name, time, summary and buttons *****/
@ -1784,7 +1773,6 @@ static void Soc_PutHiddenFormToWriteNewCommentToSocialNote (long NotCod,
const char UniqueId[Soc_MAX_LENGTH_ID]) const char UniqueId[Soc_MAX_LENGTH_ID])
{ {
extern const char *Txt_Send_comment; extern const char *Txt_Send_comment;
char IdForm[Soc_MAX_LENGTH_ID];
/***** Start container *****/ /***** Start container *****/
fprintf (Gbl.F.Out,"<div id=\"%s\"" fprintf (Gbl.F.Out,"<div id=\"%s\""
@ -1793,14 +1781,13 @@ static void Soc_PutHiddenFormToWriteNewCommentToSocialNote (long NotCod,
UniqueId); UniqueId);
/***** Start form to write the post *****/ /***** Start form to write the post *****/
Soc_SetUniqueId (IdForm);
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
Act_FormStartIdAnchor (ActRcvSocComUsr,IdForm,"timeline"); Act_FormStartUniqueAnchor (ActRcvSocComUsr,"timeline");
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
else else
Act_FormStartId (ActRcvSocComGbl,IdForm); Act_FormStartUnique (ActRcvSocComGbl);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<textarea name=\"Comment\" cols=\"45\" rows=\"3\">" fprintf (Gbl.F.Out,"<textarea name=\"Comment\" cols=\"45\" rows=\"3\">"
"</textarea>"); "</textarea>");
@ -1910,7 +1897,6 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
bool IAmTheAuthor; bool IAmTheAuthor;
bool ShowPhoto = false; bool ShowPhoto = false;
char PhotoURL[PATH_MAX+1]; char PhotoURL[PATH_MAX+1];
char IdForm[Soc_MAX_LENGTH_ID];
if (ShowCommentAlone) if (ShowCommentAlone)
{ {
@ -1942,11 +1928,10 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
/***** Left: write author's photo *****/ /***** Left: write author's photo *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_PHOTO\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_PHOTO\">");
Soc_SetUniqueId (IdForm);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO30x40",Pho_ZOOM,IdForm); "PHOTO30x40",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** Right: author's name, time, summary and buttons *****/ /***** Right: author's name, time, summary and buttons *****/
@ -1990,24 +1975,21 @@ static void Soc_WriteSocialComment (struct SocialComment *SocCom,
static void Soc_WriteAuthorComment (struct UsrData *UsrDat) static void Soc_WriteAuthorComment (struct UsrData *UsrDat)
{ {
extern const char *Txt_View_public_profile; extern const char *Txt_View_public_profile;
char IdForm[Soc_MAX_LENGTH_ID];
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_RIGHT_AUTHOR\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_COMMENT_RIGHT_AUTHOR\">");
/***** Show user's name inside form to go to user's public profile *****/ /***** Show user's name inside form to go to user's public profile *****/
Soc_SetUniqueId (IdForm); Act_FormStartUnique (ActSeePubPrf);
Act_FormStartId (ActSeePubPrf,IdForm);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_public_profile,"DAT_BOLD",IdForm); Act_LinkFormSubmitUnique (Txt_View_public_profile,"DAT_BOLD");
Str_LimitLengthHTMLStr (UsrDat->FullName,12); Str_LimitLengthHTMLStr (UsrDat->FullName,12);
fprintf (Gbl.F.Out,"%s</a>",UsrDat->FullName); fprintf (Gbl.F.Out,"%s</a>",UsrDat->FullName);
Act_FormEnd (); Act_FormEnd ();
/***** Show user's nickname inside form to go to user's public profile *****/ /***** Show user's nickname inside form to go to user's public profile *****/
Soc_SetUniqueId (IdForm); Act_FormStartUnique (ActSeePubPrf);
Act_FormStartId (ActSeePubPrf,IdForm);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Act_LinkFormSubmitId (Txt_View_public_profile,"DAT_LIGHT",IdForm); Act_LinkFormSubmitUnique (Txt_View_public_profile,"DAT_LIGHT");
fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname); fprintf (Gbl.F.Out," @%s</a>",UsrDat->Nickname);
Act_FormEnd (); Act_FormEnd ();
@ -2022,17 +2004,15 @@ static void Soc_WriteAuthorComment (struct UsrData *UsrDat)
static void Soc_PutFormToRemoveComment (long ComCod) static void Soc_PutFormToRemoveComment (long ComCod)
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;
char IdForm[Soc_MAX_LENGTH_ID];
/***** Form to remove social publishing *****/ /***** Form to remove social publishing *****/
Soc_SetUniqueId (IdForm);
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
Act_FormStartIdAnchor (ActReqRemSocComUsr,IdForm,"timeline"); Act_FormStartUniqueAnchor (ActReqRemSocComUsr,"timeline");
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
else else
Act_FormStartId (ActReqRemSocComGbl,IdForm); Act_FormStartUnique (ActReqRemSocComGbl);
Soc_PutHiddenParamComCod (ComCod); Soc_PutHiddenParamComCod (ComCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_REMOVE ICON_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_REMOVE ICON_HIGHLIGHT\">"
"<input type=\"image\"" "<input type=\"image\""
@ -2078,17 +2058,15 @@ static void Soc_PutDisabledIconShare (unsigned NumShared)
static void Soc_PutFormToShareSocialNote (long NotCod) static void Soc_PutFormToShareSocialNote (long NotCod)
{ {
extern const char *Txt_Share; extern const char *Txt_Share;
char IdForm[Soc_MAX_LENGTH_ID];
/***** Form to share social note *****/ /***** Form to share social note *****/
Soc_SetUniqueId (IdForm);
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
Act_FormStartIdAnchor (ActShaSocNotUsr,IdForm,"timeline"); Act_FormStartUniqueAnchor (ActShaSocNotUsr,"timeline");
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
else else
Act_FormStartId (ActShaSocNotGbl,IdForm); Act_FormStartUnique (ActShaSocNotGbl);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_SHARE ICON_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_SHARE ICON_HIGHLIGHT\">"
"<input type=\"image\"" "<input type=\"image\""
@ -2110,17 +2088,15 @@ static void Soc_PutFormToShareSocialNote (long NotCod)
static void Soc_PutFormToUnshareSocialPublishing (long NotCod) static void Soc_PutFormToUnshareSocialPublishing (long NotCod)
{ {
extern const char *Txt_Unshare; extern const char *Txt_Unshare;
char IdForm[Soc_MAX_LENGTH_ID];
/***** Form to share social publishing *****/ /***** Form to share social publishing *****/
Soc_SetUniqueId (IdForm);
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
Act_FormStartIdAnchor (ActUnsSocPubUsr,IdForm,"timeline"); Act_FormStartUniqueAnchor (ActUnsSocPubUsr,"timeline");
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
else else
Act_FormStartId (ActUnsSocPubGbl,IdForm); Act_FormStartUnique (ActUnsSocPubGbl);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_SHARE ICON_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_SHARE ICON_HIGHLIGHT\">"
"<input type=\"image\"" "<input type=\"image\""
@ -2141,16 +2117,15 @@ static void Soc_PutFormToUnshareSocialPublishing (long NotCod)
static void Soc_PutFormToRemoveSocialPublishing (long NotCod) static void Soc_PutFormToRemoveSocialPublishing (long NotCod)
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;
char IdForm[Soc_MAX_LENGTH_ID];
/***** Form to remove social publishing *****/ /***** Form to remove social publishing *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
{ {
Act_FormStartIdAnchor (ActReqRemSocPubUsr,IdForm,"timeline"); Act_FormStartUniqueAnchor (ActReqRemSocPubUsr,"timeline");
Usr_PutParamOtherUsrCodEncrypted (); Usr_PutParamOtherUsrCodEncrypted ();
} }
else else
Act_FormStartId (ActReqRemSocPubGbl,IdForm); Act_FormStartUnique (ActReqRemSocPubGbl);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_REMOVE ICON_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICON_REMOVE ICON_HIGHLIGHT\">"
"<input type=\"image\"" "<input type=\"image\""
@ -2964,7 +2939,6 @@ static void Soc_ShowUsrsWhoHaveSharedSocialNote (const struct SocialNote *SocNot
struct UsrData UsrDat; struct UsrData UsrDat;
bool ShowPhoto; bool ShowPhoto;
char PhotoURL[PATH_MAX+1]; char PhotoURL[PATH_MAX+1];
char IdForm[Soc_MAX_LENGTH_ID];
/* Show number of users who have shared this social note */ /* Show number of users who have shared this social note */
fprintf (Gbl.F.Out,"<span class=\"SOCIAL_NUM_SHARES\"> %u</span>", fprintf (Gbl.F.Out,"<span class=\"SOCIAL_NUM_SHARES\"> %u</span>",
@ -3004,11 +2978,10 @@ static void Soc_ShowUsrsWhoHaveSharedSocialNote (const struct SocialNote *SocNot
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat))
{ {
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_SHARER\">"); fprintf (Gbl.F.Out,"<div class=\"SOCIAL_SHARER\">");
Soc_SetUniqueId (IdForm);
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO18x24",Pho_ZOOM,IdForm); "PHOTO18x24",Pho_ZOOM,true); // Use unique id
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
NumUsrsShown++; NumUsrsShown++;

View File

@ -1808,7 +1808,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20",Pho_ZOOM,NULL); "PHOTO15x20",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write the user's ID if user is a student in current course */ /* Write the user's ID if user is a student in current course */
@ -2053,7 +2053,7 @@ static void Sta_ShowDistrAccessesPerDaysAndHour (unsigned long NumRows,MYSQL_RES
fprintf (Gbl.F.Out,"%s: ",Txt_Color_of_the_graphic); fprintf (Gbl.F.Out,"%s: ",Txt_Color_of_the_graphic);
fprintf (Gbl.F.Out,"<select name=\"ColorType\"" fprintf (Gbl.F.Out,"<select name=\"ColorType\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (ColorType = (Sta_ColorType_t) 0; for (ColorType = (Sta_ColorType_t) 0;
ColorType < Sta_NUM_COLOR_TYPES; ColorType < Sta_NUM_COLOR_TYPES;
ColorType++) ColorType++)

View File

@ -569,7 +569,7 @@ static void Svy_WriteAuthor (struct Survey *Svy)
/***** Show photo *****/ /***** Show photo *****/
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO15x20",Pho_ZOOM,NULL); "PHOTO15x20",Pho_ZOOM,false);
/***** Write name *****/ /***** Write name *****/
strcpy (FirstName,UsrDat.FirstName); strcpy (FirstName,UsrDat.FirstName);

View File

@ -153,7 +153,7 @@ void Syl_PutFormWhichSyllabus (void)
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"%s" "%s"
"</li>", "</li>",
Gbl.FormId,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]); Gbl.Form.Id,Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyllabus]);
} }
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>"
"</div>"); "</div>");
@ -918,7 +918,7 @@ static void Syl_PutFormItemSyllabus (Inf_InfoType_t InfoType,bool NewItem,unsign
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Syl_MAX_LENGTH_TEXT_ITEM,Text, Syl_MAX_LENGTH_TEXT_ITEM,Text,
Txt_Enter_a_new_item_here, Txt_Enter_a_new_item_here,
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }

View File

@ -1525,7 +1525,7 @@ static void Tst_ShowFormEditTags (void)
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewTagTxt\"" fprintf (Gbl.F.Out,"<input type=\"text\" name=\"NewTagTxt\""
" size=\"36\" maxlength=\"%u\" value=\"%s\"" " size=\"36\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Tst_MAX_TAG_LENGTH,row[1],Gbl.FormId); Tst_MAX_TAG_LENGTH,row[1],Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -2588,7 +2588,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
if (Str_ConvertToUpperLetter (row[3][0]) == 'Y') if (Str_ConvertToUpperLetter (row[3][0]) == 'Y')
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />", fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
Gbl.FormId); Gbl.Form.Id);
Act_FormEnd (); Act_FormEnd ();
} }
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -6461,7 +6461,7 @@ static void Tst_ShowDataUsr (struct UsrData *UsrDat,unsigned NumExams)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,NULL); "PHOTO45x60",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Start form to go to user's record card *****/ /***** Start form to go to user's record card *****/
@ -6597,7 +6597,7 @@ void Tst_ShowOneTestExam (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Other.UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Other.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO45x60",Pho_ZOOM,NULL); "PHOTO45x60",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");

View File

@ -1207,7 +1207,7 @@ static void TT_TimeTableDrawCell (TT_TimeTableType_t TimeTableType,
/***** Class type *****/ /***** Class type *****/
fprintf (Gbl.F.Out,"<select name=\"ModTTCellType\" style=\"width:68px;\"" fprintf (Gbl.F.Out,"<select name=\"ModTTCellType\" style=\"width:68px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (CT = (TT_ClassType_t) 0; for (CT = (TT_ClassType_t) 0;
CT < (TT_ClassType_t) TT_NUM_CLASS_TYPES; CT < (TT_ClassType_t) TT_NUM_CLASS_TYPES;
CT++) CT++)
@ -1245,7 +1245,7 @@ static void TT_TimeTableDrawCell (TT_TimeTableType_t TimeTableType,
/***** Class duration *****/ /***** Class duration *****/
fprintf (Gbl.F.Out,"<select name=\"ModTTDur\" style=\"width:57px;\"" fprintf (Gbl.F.Out,"<select name=\"ModTTDur\" style=\"width:57px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
for (H = Hour + TimeTable[Day][Hour].Columns[Column].Duration; for (H = Hour + TimeTable[Day][Hour].Columns[Column].Duration;
H < TT_HOURS_PER_DAY * 2; H < TT_HOURS_PER_DAY * 2;
H++) H++)
@ -1275,7 +1275,7 @@ static void TT_TimeTableDrawCell (TT_TimeTableType_t TimeTableType,
"<select name=\"ModTTGrpCod\"" "<select name=\"ModTTGrpCod\""
" style=\"width:110px;\"" " style=\"width:110px;\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Txt_Group,Gbl.FormId); Txt_Group,Gbl.Form.Id);
fprintf (Gbl.F.Out,"<option value=\"-1\""); fprintf (Gbl.F.Out,"<option value=\"-1\"");
if (GrpCod <= 0) if (GrpCod <= 0)
fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out," selected=\"selected\"");
@ -1304,7 +1304,7 @@ static void TT_TimeTableDrawCell (TT_TimeTableType_t TimeTableType,
"<input type=\"text\" name=\"ModHorLugar\"" "<input type=\"text\" name=\"ModHorLugar\""
" size=\"1\" maxlength=\"%u\" value=\"%s\"" " size=\"1\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Txt_Classroom,TT_MAX_LENGTH_PLACE,Place,Gbl.FormId); Txt_Classroom,TT_MAX_LENGTH_PLACE,Place,Gbl.Form.Id);
} }
else // TimeTableView == TT_TUT_EDIT else // TimeTableView == TT_TUT_EDIT
{ {
@ -1314,7 +1314,7 @@ static void TT_TimeTableDrawCell (TT_TimeTableType_t TimeTableType,
"<input type=\"text\" name=\"ModHorLugar\"" "<input type=\"text\" name=\"ModHorLugar\""
" size=\"12\" maxlength=\"%u\" value=\"%s\"" " size=\"12\" maxlength=\"%u\" value=\"%s\""
" onchange=\"document.getElementById('%s').submit();\" />", " onchange=\"document.getElementById('%s').submit();\" />",
Txt_Place,TT_MAX_LENGTH_PLACE,Place,Gbl.FormId); Txt_Place,TT_MAX_LENGTH_PLACE,Place,Gbl.Form.Id);
} }
} }
fprintf (Gbl.F.Out,"</span>"); fprintf (Gbl.F.Out,"</span>");

View File

@ -1651,7 +1651,7 @@ void Usr_WriteLoggedUsrHead (void)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO18x24",Pho_ZOOM,NULL); "PHOTO18x24",Pho_ZOOM,false);
/***** User's name *****/ /***** User's name *****/
fprintf (Gbl.F.Out,"<span class=\"%s\">&nbsp;", fprintf (Gbl.F.Out,"<span class=\"%s\">&nbsp;",
@ -2705,7 +2705,7 @@ static void Usr_WriteRowGstMainData (unsigned NumUsr,struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -2807,7 +2807,7 @@ void Usr_WriteRowStdMainData (unsigned NumUsr,struct UsrData *UsrDat,bool PutChe
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -2861,7 +2861,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_NO_ZOOM,NULL); "PHOTO21x28",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -2963,7 +2963,7 @@ void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_NO_ZOOM,NULL); "PHOTO21x28",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -3118,7 +3118,7 @@ static void Usr_WriteRowTchMainData (unsigned NumUsr,struct UsrData *UsrDat,bool
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -3174,7 +3174,7 @@ void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_NO_ZOOM,NULL); "PHOTO21x28",Pho_NO_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -3252,7 +3252,7 @@ void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
"PHOTO21x28",Pho_ZOOM,NULL); "PHOTO21x28",Pho_ZOOM,false);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -5203,7 +5203,7 @@ static void Usr_PutCheckboxListWithPhotos (void)
fprintf (Gbl.F.Out," checked=\"checked\""); fprintf (Gbl.F.Out," checked=\"checked\"");
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />" fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />"
"<span class=\"%s\">%s</span>", "<span class=\"%s\">%s</span>",
Gbl.FormId, Gbl.Form.Id,
The_ClassForm[Gbl.Prefs.Theme],Txt_Display_photos); The_ClassForm[Gbl.Prefs.Theme],Txt_Display_photos);
} }
@ -7311,7 +7311,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL); ShowPhoto = Pho_ShowUsrPhotoIsAllowed (&UsrDat,PhotoURL);
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
NULL, NULL,
ClassPhoto,Pho_ZOOM,NULL); ClassPhoto,Pho_ZOOM,false);
/***** Photo foot *****/ /***** Photo foot *****/
fprintf (Gbl.F.Out,"<br />"); fprintf (Gbl.F.Out,"<br />");
@ -7391,7 +7391,7 @@ void Usr_PutSelectorNumColsClassPhoto (void)
/***** Start selector *****/ /***** Start selector *****/
fprintf (Gbl.F.Out,"<select name=\"ColsClassPhoto\"" fprintf (Gbl.F.Out,"<select name=\"ColsClassPhoto\""
" onchange=\"document.getElementById('%s').submit();\">", " onchange=\"document.getElementById('%s').submit();\">",
Gbl.FormId); Gbl.Form.Id);
/***** Put a row in selector for every number from 1 to Usr_CLASS_PHOTO_COLS_MAX *****/ /***** Put a row in selector for every number from 1 to Usr_CLASS_PHOTO_COLS_MAX *****/
for (Cols = 1; for (Cols = 1;