mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 18:55:24 +02:00
Version 14.107.5
This commit is contained in:
parent
89396a19fe
commit
f7a7c40f95
|
@ -103,11 +103,12 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.107.4 (2015/04/03)"
|
#define Log_PLATFORM_VERSION "SWAD 14.107.5 (2015/04/03)"
|
||||||
|
|
||||||
// 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 14.107.5: Apr 03, 2015 Changes in layout of form to change photo. (183718 lines)
|
||||||
Version 14.107.4: Apr 03, 2015 Fixed bugs when changing user's ID, password and photo. (183699 lines)
|
Version 14.107.4: Apr 03, 2015 Fixed bugs when changing user's ID, password and photo. (183699 lines)
|
||||||
Version 14.107.3: Apr 02, 2015 Changes in icons in attendance events.
|
Version 14.107.3: Apr 02, 2015 Changes in icons in attendance events.
|
||||||
Fixed bug in assignments. (183702 lines)
|
Fixed bug in assignments. (183702 lines)
|
||||||
|
|
|
@ -2836,8 +2836,7 @@ static void Enr_ShowFormToEditOtherUsr (void)
|
||||||
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
|
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
|
||||||
Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password
|
Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password
|
||||||
}
|
}
|
||||||
if (Pho_CheckIfICanChangeOtherUsrPhoto (Gbl.Usrs.Other.UsrDat.UsrCod))
|
Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo
|
||||||
Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/***** User's record *****/
|
/***** User's record *****/
|
||||||
|
|
64
swad_photo.c
64
swad_photo.c
|
@ -173,13 +173,14 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
|
||||||
/***** Link for changing / uploading the photo *****/
|
/***** Link for changing / uploading the photo *****/
|
||||||
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
|
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
|
||||||
Pho_PutLinkToChangeMyPhoto ();
|
Pho_PutLinkToChangeMyPhoto ();
|
||||||
else // Not me
|
else // Not me
|
||||||
{
|
if (Pho_CheckIfICanChangeOtherUsrPhoto (Gbl.Usrs.Other.UsrDat.UsrCod))
|
||||||
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
{
|
||||||
Act_PutContextualLink (ActReqUsrPho,Usr_PutParamOtherUsrCodEncrypted,
|
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
|
||||||
"photo",PhotoExists ? Txt_Change_photo :
|
Act_PutContextualLink (ActReqUsrPho,Usr_PutParamOtherUsrCodEncrypted,
|
||||||
Txt_Upload_photo);
|
"photo",PhotoExists ? Txt_Change_photo :
|
||||||
}
|
Txt_Upload_photo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -240,6 +241,7 @@ void Pho_ReqUsrPhoto (struct UsrData *UsrDat)
|
||||||
void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *PhotoURL)
|
void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *PhotoURL)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormul[The_NUM_THEMES];
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
|
extern const char *Txt_Photo;
|
||||||
extern const char *Txt_You_can_send_a_file_with_an_image_in_jpg_format_;
|
extern const char *Txt_You_can_send_a_file_with_an_image_in_jpg_format_;
|
||||||
extern const char *Txt_File_with_the_photo;
|
extern const char *Txt_File_with_the_photo;
|
||||||
extern const char *Txt_Upload_photo;
|
extern const char *Txt_Upload_photo;
|
||||||
|
@ -248,7 +250,7 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho
|
||||||
/***** Write message about photo presence or ausence *****/
|
/***** Write message about photo presence or ausence *****/
|
||||||
if (PhotoExists) // User has photo
|
if (PhotoExists) // User has photo
|
||||||
{
|
{
|
||||||
/***** Forms to remove photo and make it public *****/
|
/***** Forms to remove photo and change privacy *****/
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
if (ItsMe)
|
if (ItsMe)
|
||||||
{
|
{
|
||||||
|
@ -258,15 +260,9 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho
|
||||||
else
|
else
|
||||||
Pho_PutLinkToRemoveOtherUsrPhoto ();
|
Pho_PutLinkToRemoveOtherUsrPhoto ();
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
/* Show photo */
|
|
||||||
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
|
|
||||||
Pho_ShowUsrPhoto (UsrDat,PhotoURL,"PHOTO150x200",Pho_ZOOM);
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
|
||||||
}
|
}
|
||||||
Lay_ShowAlert (Lay_INFO,Txt_You_can_send_a_file_with_an_image_in_jpg_format_);
|
|
||||||
|
|
||||||
/***** Form to send photo *****/
|
/***** Start form *****/
|
||||||
if (ItsMe)
|
if (ItsMe)
|
||||||
Act_FormStart (ActDetMyPho);
|
Act_FormStart (ActDetMyPho);
|
||||||
else
|
else
|
||||||
|
@ -274,13 +270,26 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho
|
||||||
Act_FormStart (ActDetUsrPho);
|
Act_FormStart (ActDetUsrPho);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto;\">"
|
|
||||||
"<tr>"
|
/***** Start frame *****/
|
||||||
|
Lay_StartRoundFrameTable10 (NULL,2,Txt_Photo);
|
||||||
|
|
||||||
|
/***** Show current photo and help message *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td colspan=\"2\" style=\"text-align:center;\">");
|
||||||
|
Pho_ShowUsrPhoto (UsrDat,PhotoURL,"PHOTO150x200",Pho_NO_ZOOM);
|
||||||
|
Lay_ShowAlert (Lay_INFO,Txt_You_can_send_a_file_with_an_image_in_jpg_format_);
|
||||||
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
"</tr>");
|
||||||
|
|
||||||
|
/***** Form to upload photo *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\" style=\"text-align:right;\">"
|
"<td class=\"%s\" style=\"text-align:right;\">"
|
||||||
"%s:"
|
"%s:"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td style=\"text-align:left;\">"
|
"<td style=\"text-align:left;\">"
|
||||||
"<input type=\"file\" name=\"%s\" size=\"40\" maxlength=\"100\" value=\"%ld.jpg\" />"
|
"<input type=\"file\" name=\"%s\""
|
||||||
|
" size=\"40\" maxlength=\"100\" value=\"%ld.jpg\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>"
|
"</tr>"
|
||||||
"<tr>"
|
"<tr>"
|
||||||
|
@ -291,8 +300,12 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho
|
||||||
UsrDat->UsrCod);
|
UsrDat->UsrCod);
|
||||||
Lay_PutCreateButton (Txt_Upload_photo);
|
Lay_PutCreateButton (Txt_Upload_photo);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>"
|
"</tr>");
|
||||||
"</table>");
|
|
||||||
|
/***** End frame *****/
|
||||||
|
Lay_EndRoundFrameTable10 ();
|
||||||
|
|
||||||
|
/***** End form *****/
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,6 +598,17 @@ void Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *UsrDat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***** Button to send another photo *****/
|
||||||
|
if (NumFacesGreen == 0)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
|
if (UsrDat->UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod)
|
||||||
|
Pho_PutLinkToChangeMyPhoto ();
|
||||||
|
else if (UsrDat->UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod)
|
||||||
|
Pho_PutLinkToChangeOtherUsrPhoto ();
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
}
|
||||||
|
|
||||||
/***** Create map *****/
|
/***** Create map *****/
|
||||||
fprintf (Gbl.F.Out,"<map name=\"faces_map\">\n");
|
fprintf (Gbl.F.Out,"<map name=\"faces_map\">\n");
|
||||||
if (NumFacesTotal)
|
if (NumFacesTotal)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user