mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 18:55:24 +02:00
Version 15.64.14
This commit is contained in:
parent
52d9ebe3c3
commit
5fa5e515ed
28
swad_QR.c
28
swad_QR.c
|
@ -63,27 +63,35 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
|
||||||
/***************************** Internal prototypes ***************************/
|
/***************************** Internal prototypes ***************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void QR_PutParamQRString (void);
|
||||||
|
|
||||||
static void QR_ImageQRCode (const char *QRString);
|
static void QR_ImageQRCode (const char *QRString);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Put a link to a print view of a QR code *******************/
|
/***************** Put a link to a print view of a QR code *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void QR_PutLinkToPrintQRCode (struct UsrData *UsrDat,bool PrintText)
|
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
|
||||||
extern const char *Txt_QR_code;
|
extern const char *Txt_QR_code;
|
||||||
|
|
||||||
|
/***** Link to print QR *****/
|
||||||
|
Gbl.Usrs.NicknameForQR = Nickname;
|
||||||
|
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,"qr64x64.gif",
|
||||||
|
Txt_QR_code,PrintText ? Txt_QR_code :
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Put parameter QR string ***************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void QR_PutParamQRString (void)
|
||||||
|
{
|
||||||
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
|
||||||
|
|
||||||
/***** Link to print view *****/
|
sprintf (NicknameWithArroba,"@%s",Gbl.Usrs.NicknameForQR);
|
||||||
Act_FormStart (ActPrnUsrQR);
|
|
||||||
sprintf (NicknameWithArroba,"@%s",UsrDat->Nickname);
|
|
||||||
Par_PutHiddenParamString ("QRString",NicknameWithArroba);
|
Par_PutHiddenParamString ("QRString",NicknameWithArroba);
|
||||||
Act_LinkFormSubmit (Txt_QR_code,The_ClassFormBold[Gbl.Prefs.Theme]);
|
|
||||||
Lay_PutIconWithText ("qr64x64.gif",Txt_QR_code,PrintText ? Txt_QR_code :
|
|
||||||
NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
|
||||||
Act_FormEnd ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void QR_PutLinkToPrintQRCode (struct UsrData *UsrDat,bool PrintText);
|
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText);
|
||||||
void QR_PrintQRCode (void);
|
void QR_PrintQRCode (void);
|
||||||
|
|
||||||
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
|
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
|
||||||
|
|
|
@ -163,7 +163,7 @@ void Att_SeeAttEvents (void)
|
||||||
|
|
||||||
/* Put link to my QR code */
|
/* Put link to my QR code */
|
||||||
if (Gbl.Usrs.Me.UsrDat.Nickname[0])
|
if (Gbl.Usrs.Me.UsrDat.Nickname[0])
|
||||||
QR_PutLinkToPrintQRCode (&Gbl.Usrs.Me.UsrDat,true);
|
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,true);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
|
|
@ -117,12 +117,13 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.64.13 (2015/12/13)"
|
#define Log_PLATFORM_VERSION "SWAD 15.64.14 (2015/12/13)"
|
||||||
#define CSS_FILE "swad15.64.5.css"
|
#define CSS_FILE "swad15.64.5.css"
|
||||||
|
|
||||||
// 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.64.14: Dec 13, 2015 Code refactoring in contextual links. (187037 lines)
|
||||||
Version 15.64.13: Dec 13, 2015 Code refactoring in contextual links. (187031 lines)
|
Version 15.64.13: Dec 13, 2015 Code refactoring in contextual links. (187031 lines)
|
||||||
Version 15.64.12: Dec 13, 2015 Code refactoring in contextual links. (187061 lines)
|
Version 15.64.12: Dec 13, 2015 Code refactoring in contextual links. (187061 lines)
|
||||||
Version 15.64.11: Dec 13, 2015 Code refactoring in contextual links. (187056 lines)
|
Version 15.64.11: Dec 13, 2015 Code refactoring in contextual links. (187056 lines)
|
||||||
|
|
|
@ -381,6 +381,7 @@ struct Globals
|
||||||
} Connected;
|
} Connected;
|
||||||
char FileNamePhoto[NAME_MAX+1]; // File name (with no path and no .jpg) of the temporary file with the selected face
|
char FileNamePhoto[NAME_MAX+1]; // File name (with no path and no .jpg) of the temporary file with the selected face
|
||||||
bool Error; // To signal that an error has happened
|
bool Error; // To signal that an error has happened
|
||||||
|
const char *NicknameForQR; // Used as parameter in contextual links
|
||||||
} Usrs;
|
} Usrs;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -250,7 +250,7 @@ void Nck_ShowFormChangeUsrNickname (void)
|
||||||
|
|
||||||
/* Link to QR code */
|
/* Link to QR code */
|
||||||
if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0])
|
if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0])
|
||||||
QR_PutLinkToPrintQRCode (&Gbl.Usrs.Me.UsrDat,false);
|
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,false);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
|
|
@ -2406,7 +2406,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
|
||||||
/* Link to QR code */
|
/* Link to QR code */
|
||||||
QR_PutLinkToPrintQRCode (UsrDat,false);
|
QR_PutLinkToPrintQRCode (UsrDat->Nickname,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
fprintf (Gbl.F.Out,"</div>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user