Version 16.91

This commit is contained in:
Antonio Cañas Vargas 2016-12-07 00:41:36 +01:00
parent c12f74e6e2
commit 98d7f9dc67
9 changed files with 69 additions and 8 deletions

View File

@ -112,21 +112,19 @@ void QR_PrintQRCode (void)
static void QR_ImageQRCode (const char *QRString)
{
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\" style=\"width:%upx;\">"
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\""
" style=\"margin:0 auto; width:%upx;\">"
"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s\""
" alt=\"%s\" title=\"%s\""
" style=\"width:%upx; height:%upx;"
" border:1px dashed silver;\" />"
"<br />"
"<span class=\"DAT\">%s</span>"
"</div>",
QR_CODE_SIZE,
QR_CODE_SIZE,QR_CODE_SIZE,
QRString,
QRString,
QRString,
QR_CODE_SIZE,QR_CODE_SIZE,
QRString);
QR_CODE_SIZE,QR_CODE_SIZE);
}
/*****************************************************************************/

View File

@ -40,6 +40,7 @@
/*****************************************************************************/
void QR_PutLinkToPrintQRCode (Act_Action_t Action,bool PrintText);
void QR_PrintQRCode (void);
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);

View File

@ -2817,7 +2817,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActPrvEvtMyAgd */{1609,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_MakeEventPrivate ,NULL},
/* ActPubEvtMyAgd */{1610,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_MakeEventPublic ,NULL},
/* ActSeeMyPubAgd */{1617,-1,TabUnk,ActSeeMyAgd ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Agd_ShowMyPublicAgenda ,NULL},
/* ActPrnAgdQR */{1618,-1,TabUnk,ActSeeMyAgd ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,QR_PrintQRCode ,NULL},
/* ActPrnAgdQR */{1618,-1,TabUnk,ActSeeMyAgd ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Agd_PrintAgdQRCode ,NULL},
/* ActChkUsrAcc */{1584,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_CheckIfEmptyAccountExists ,NULL},
/* ActCreUsrAcc */{1163,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Acc_AfterCreationNewAccount ,NULL},
@ -2874,7 +2874,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActChgMnu */{1243,-1,TabUnk,ActEdiPrf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_THIS_WINDOW,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL},
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActEdiPrf ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL},
/* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,QR_PrintQRCode ,NULL},
/* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Usr_PrintUsrQRCode ,NULL},
/* ActPrnMyTT */{ 409,-1,TabUnk,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,TT_ShowClassTimeTable ,NULL},
/* ActEdiTut */{ 65,-1,TabUnk,ActSeeMyTT ,0x1FE,0x1FE,0x1FE,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,TT_EditMyTutTimeTable ,NULL},

View File

@ -1757,3 +1757,22 @@ unsigned Agd_GetNumEvents (Sco_Scope_t Scope)
return NumEvents;
}
/*****************************************************************************/
/************************** Show an agenda QR code ***************************/
/*****************************************************************************/
void Agd_PrintAgdQRCode (void)
{
extern const char *Txt_Where_s_USER;
/***** Start frame *****/
sprintf (Gbl.Title,Txt_Where_s_USER,Gbl.Usrs.Me.UsrDat.FullName);
Lay_StartRoundFrame (NULL,Gbl.Title,NULL,NULL);
/***** Print QR code ****/
QR_PrintQRCode ();
/***** End frame *****/
Lay_EndRoundFrame ();
}

View File

@ -105,4 +105,6 @@ unsigned Agd_GetNumEventsFromUsr (long UsrCod);
unsigned Agd_GetNumUsrsWithEvents (Sco_Scope_t Scope);
unsigned Agd_GetNumEvents (Sco_Scope_t Scope);
void Agd_PrintAgdQRCode (void);
#endif

View File

@ -183,13 +183,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.90.3 (2016-12-06)"
#define Log_PLATFORM_VERSION "SWAD 16.91 (2016-12-06)"
#define CSS_FILE "swad16.86.5.css"
#define JS_FILE "swad16.90.2.js"
// 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
/*
Version 16.91: Dec 06, 2016 Changes in QR codes. (210204 lines)
Version 16.90.3: Dec 06, 2016 Changes related with agenda QR. (210156 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1618','es','N','Imprimir c&oacute;digo QR agenda');

View File

@ -51029,6 +51029,27 @@ const char *Txt_What_would_you_like_to_do =
"O que voc&ecirc; faria?";
#endif
const char *Txt_Where_s_USER =
#if L==1
"On &eacute;s %s?";
#elif L==2
"Wo ist %s?";
#elif L==3
"Where's %s";
#elif L==4
"&iquest;D&oacute;nde est&aacute; %s?";
#elif L==5
"O&ugrave; est %s?";
#elif L==6
"&iquest;D&oacute;nde est&aacute; %s?"; // Okoteve traducción
#elif L==7
"Dove &egrave; %s?";
#elif L==8
"Gdzie jest %s?";
#elif L==9
"Onde est&aacute; %s?";
#endif
const char *Txt_Who_to_follow =
#if L==1
"A qui seguir";

View File

@ -54,6 +54,7 @@
#include "swad_parameter.h"
#include "swad_password.h"
#include "swad_preference.h"
#include "swad_QR.h"
#include "swad_record.h"
#include "swad_tab.h"
#include "swad_user.h"
@ -8095,3 +8096,19 @@ void Usr_RemoveUsrFromUsrBanned (long UsrCod)
UsrCod);
DB_QueryDELETE (Query,"can not remove user from users banned");
}
/*****************************************************************************/
/**************************** Show a user QR code ****************************/
/*****************************************************************************/
void Usr_PrintUsrQRCode (void)
{
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Gbl.Usrs.Me.UsrDat.FullName,NULL,NULL);
/***** Print QR code ****/
QR_PrintQRCode ();
/***** End frame *****/
Lay_EndRoundFrame ();
}

View File

@ -386,4 +386,6 @@ void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role);
bool Usr_CheckIfUsrBanned (long UsrCod);
void Usr_RemoveUsrFromUsrBanned (long UsrCod);
void Usr_PrintUsrQRCode (void);
#endif