Version 14.99
|
@ -271,7 +271,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
||||||
/********************************* Frame 10 **********************************/
|
/********************************* Frame 10 **********************************/
|
||||||
.FRAME10
|
.FRAME10
|
||||||
{
|
{
|
||||||
margin:4px 0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
background-color:white;
|
background-color:white;
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
|
@ -732,7 +732,7 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
.HEAD_REC {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:10pt;}
|
.HEAD_REC {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:10pt;}
|
||||||
.HEAD_REC_SMALL {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:9pt;}
|
.HEAD_REC_SMALL {font-family:Georgia, "DejaVu LGC Serif", "Bitstream Vera Serif", serif; color:#808080; font-size:9pt;}
|
||||||
.REC_NAME {color:#808080; font-size:16pt; font-weight:bold;}
|
.REC_NAME {color:#808080; font-size:16pt; font-weight:bold;}
|
||||||
.REC_NICK {color:#808080; font-size:14pt; font-weight:bold;}
|
.REC_NICK {color:#808080; font-size:12pt; font-weight:bold;}
|
||||||
.DAT_REC {color:#404040; font-size:9pt; line-height:110%;}
|
.DAT_REC {color:#404040; font-size:9pt; line-height:110%;}
|
||||||
.DAT_REC_SMALL {color:#808080; font-size:9pt; line-height:110%;}
|
.DAT_REC_SMALL {color:#808080; font-size:9pt; line-height:110%;}
|
||||||
.DAT_REC_SMALL_BOLD {color:#202020; font-size:9pt; line-height:110%;}
|
.DAT_REC_SMALL_BOLD {color:#202020; font-size:9pt; line-height:110%;}
|
||||||
|
@ -823,10 +823,33 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
/***************************** Public user's profile *************************/
|
/***************************** Public user's profile *************************/
|
||||||
.FOLLOW
|
.FOLLOW
|
||||||
{
|
{
|
||||||
color:#808080;
|
color:#C0C0C0;
|
||||||
font-size:24pt;
|
font-size:24pt;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
.FOLLOW_B
|
||||||
|
{
|
||||||
|
color:#404040;
|
||||||
|
font-size:24pt;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.PRF_ICON_CONTAINER
|
||||||
|
{
|
||||||
|
width:20px;
|
||||||
|
}
|
||||||
|
.PRF_ICON
|
||||||
|
{
|
||||||
|
margin:auto;
|
||||||
|
display:block;
|
||||||
|
width:16px;
|
||||||
|
height:16px;
|
||||||
|
opacity:0.33;
|
||||||
|
}
|
||||||
|
.PRF_FIG
|
||||||
|
{
|
||||||
|
text-align:left;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
.CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;}
|
.CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;}
|
||||||
.CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;}
|
.CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;}
|
||||||
|
|
|
@ -235,7 +235,7 @@ p {margin:0;}
|
||||||
/********************************* Frame 10 **********************************/
|
/********************************* Frame 10 **********************************/
|
||||||
.FRAME10
|
.FRAME10
|
||||||
{
|
{
|
||||||
margin:4px 0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
background-color:white;
|
background-color:white;
|
||||||
border-radius:8px;
|
border-radius:8px;
|
||||||
|
@ -636,10 +636,33 @@ a:hover img.CENTRE_PHOTO_SHOW
|
||||||
/***************************** Public user's profile *************************/
|
/***************************** Public user's profile *************************/
|
||||||
.FOLLOW
|
.FOLLOW
|
||||||
{
|
{
|
||||||
color:#808080;
|
color:#C0C0C0;
|
||||||
font-size:28pt;
|
font-size:28pt;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
.FOLLOW_B
|
||||||
|
{
|
||||||
|
color:#000000;
|
||||||
|
font-size:28pt;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
.PRF_ICON_CONTAINER
|
||||||
|
{
|
||||||
|
width:20px;
|
||||||
|
}
|
||||||
|
.PRF_ICON
|
||||||
|
{
|
||||||
|
margin:auto;
|
||||||
|
display:block;
|
||||||
|
width:16px;
|
||||||
|
height:16px;
|
||||||
|
opacity:0.33;
|
||||||
|
}
|
||||||
|
.PRF_FIG
|
||||||
|
{
|
||||||
|
text-align:left;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
.CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;}
|
.CON {color:#B8D070; font-size:9pt; line-height:110%; white-space:nowrap;}
|
||||||
.CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;}
|
.CON_CRS {color:#398000; font-size:9pt; line-height:110%; white-space:nowrap;}
|
||||||
|
|
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 361 B |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 365 B |
After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 702 B |
After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 433 B |
After Width: | Height: | Size: 555 B |
After Width: | Height: | Size: 776 B |
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 555 B |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 578 B |
|
@ -103,11 +103,13 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 14.98.5 (2015/03/21)"
|
#define Log_PLATFORM_VERSION "SWAD 14.99 (2015/03/21)"
|
||||||
|
|
||||||
// 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.99: Mar 21, 2015 Icons instead of text in user's profile.
|
||||||
|
Lot of changes in layout of user's profile. (183519 lines)
|
||||||
Version 14.98.5: Mar 21, 2015 New icons for some options. (183431 lines)
|
Version 14.98.5: Mar 21, 2015 New icons for some options. (183431 lines)
|
||||||
Version 14.98.4: Mar 20, 2015 Fixed bugs in marks. (183430 lines)
|
Version 14.98.4: Mar 20, 2015 Fixed bugs in marks. (183430 lines)
|
||||||
Version 14.98.3: Mar 19, 2015 Changes in user's profile to speedup page generation. (183397 lines)
|
Version 14.98.3: Mar 19, 2015 Changes in user's profile to speedup page generation. (183397 lines)
|
||||||
|
|
138
swad_follow.c
|
@ -42,7 +42,7 @@
|
||||||
/***************************** Private constants *****************************/
|
/***************************** Private constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Fol_NUM_COLUMNS_FOLLOW 3
|
#define Fol_NUM_COLUMNS_FOLLOW 5
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Internal types *******************************/
|
/****************************** Internal types *******************************/
|
||||||
|
@ -62,6 +62,10 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
||||||
|
unsigned NumUsrs,
|
||||||
|
Act_Action_t Action,
|
||||||
|
const char *Title);
|
||||||
static unsigned Fol_GetNumFollowing (long UsrCod);
|
static unsigned Fol_GetNumFollowing (long UsrCod);
|
||||||
static unsigned Fol_GetNumFollowers (long UsrCod);
|
static unsigned Fol_GetNumFollowers (long UsrCod);
|
||||||
static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat);
|
static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat);
|
||||||
|
@ -90,69 +94,87 @@ bool Fol_CheckUsrIsFollowerOf (long FollowerCod,long FollowedCod)
|
||||||
|
|
||||||
void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat)
|
void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormul[The_NUM_THEMES];
|
|
||||||
extern const char *Txt_Following;
|
extern const char *Txt_Following;
|
||||||
extern const char *Txt_Followers;
|
extern const char *Txt_Followers;
|
||||||
unsigned Following = Fol_GetNumFollowing (UsrDat->UsrCod);
|
|
||||||
unsigned Followers = Fol_GetNumFollowers (UsrDat->UsrCod);
|
|
||||||
|
|
||||||
/***** Start table *****/
|
/***** Start table *****/
|
||||||
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_4\" style=\"margin:0 auto;\">"
|
fprintf (Gbl.F.Out,"<table style=\"margin:0 auto 4px auto;\">"
|
||||||
"<tr>");
|
"<tr>");
|
||||||
|
|
||||||
/***** Followed users *****/
|
/***** Followed users *****/
|
||||||
fprintf (Gbl.F.Out,"<td style=\"min-width:100px;"
|
Fol_ShowNumberOfFollowingOrFollowers (UsrDat,
|
||||||
" text-align:center; vertical-align:top;\">"
|
Fol_GetNumFollowing (UsrDat->UsrCod),
|
||||||
"<div class=\"FOLLOW\">");
|
ActSeeFlg,Txt_Following);
|
||||||
if (Following)
|
|
||||||
{
|
|
||||||
/* Form to list followed users */
|
|
||||||
Act_FormStart (ActSeeFlg);
|
|
||||||
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
|
||||||
Act_LinkFormSubmit (Txt_Following,"FOLLOW");
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"%u",Following);
|
|
||||||
if (Following)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
|
||||||
Act_FormEnd ();
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
|
||||||
"<div class=\"%s\">"
|
|
||||||
"%s</div>"
|
|
||||||
"</td>",
|
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Following);
|
|
||||||
|
|
||||||
/***** Followers *****/
|
/***** Followers *****/
|
||||||
fprintf (Gbl.F.Out,"<td style=\"min-width:100px;"
|
Fol_ShowNumberOfFollowingOrFollowers (UsrDat,
|
||||||
" text-align:center; vertical-align:top;\">"
|
Fol_GetNumFollowers (UsrDat->UsrCod),
|
||||||
"<div class=\"FOLLOW\">");
|
ActSeeFlr,Txt_Followers);
|
||||||
if (Followers)
|
|
||||||
{
|
|
||||||
/* Form to list followers */
|
|
||||||
Act_FormStart (ActSeeFlr);
|
|
||||||
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
|
||||||
Act_LinkFormSubmit (Txt_Followers,"FOLLOW");
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"%u",Followers);
|
|
||||||
if (Followers)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
|
||||||
Act_FormEnd ();
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
|
||||||
"<div class=\"%s\">"
|
|
||||||
"%s</div>"
|
|
||||||
"</td>",
|
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Followers);
|
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
fprintf (Gbl.F.Out,"</tr>"
|
fprintf (Gbl.F.Out,"</tr>"
|
||||||
"</table>");
|
"</table>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/**************** Show following and followers of a user *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
||||||
|
unsigned NumUsrs,
|
||||||
|
Act_Action_t Action,
|
||||||
|
const char *Title)
|
||||||
|
{
|
||||||
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
|
extern const char *The_ClassFormulB[The_NUM_THEMES];
|
||||||
|
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"<td style=\"min-width:100px;"
|
||||||
|
" text-align:center; vertical-align:top;\">");
|
||||||
|
/* Number */
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||||
|
(Gbl.CurrentAct == Action) ? "FOLLOW_B" :
|
||||||
|
"FOLLOW");
|
||||||
|
if (NumUsrs)
|
||||||
|
{
|
||||||
|
/* Form to list followed users */
|
||||||
|
Act_FormStart (Action);
|
||||||
|
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
|
Act_LinkFormSubmit (Title,
|
||||||
|
(Gbl.CurrentAct == Action) ? "FOLLOW_B" :
|
||||||
|
"FOLLOW");
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"%u",NumUsrs);
|
||||||
|
if (NumUsrs)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"</a>");
|
||||||
|
Act_FormEnd ();
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
/* Text */
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||||
|
(Gbl.CurrentAct == Action) ? The_ClassFormulB[Gbl.Prefs.Theme] :
|
||||||
|
The_ClassFormul[Gbl.Prefs.Theme]);
|
||||||
|
if (NumUsrs)
|
||||||
|
{
|
||||||
|
/* Form to list followed users */
|
||||||
|
Act_FormStart (Action);
|
||||||
|
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
|
Act_LinkFormSubmit (Title,
|
||||||
|
(Gbl.CurrentAct == Action) ? The_ClassFormulB[Gbl.Prefs.Theme] :
|
||||||
|
The_ClassFormul[Gbl.Prefs.Theme]);
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"%s",Title);
|
||||||
|
if (NumUsrs)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"</a>");
|
||||||
|
Act_FormEnd ();
|
||||||
|
}
|
||||||
|
fprintf (Gbl.F.Out,"</div>"
|
||||||
|
"</td>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************************** Get number of followed **************************/
|
/*************************** Get number of followed **************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -213,7 +235,8 @@ void Fol_ListFollowing (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** Start listing *****/
|
/***** Start listing *****/
|
||||||
Lay_StartRoundFrameTable10 (NULL,2,Txt_Following);
|
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
|
||||||
|
" style=\"margin:10px auto;\">");
|
||||||
|
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0;
|
||||||
NumUsr < NumUsrs;
|
NumUsr < NumUsrs;
|
||||||
|
@ -236,7 +259,7 @@ void Fol_ListFollowing (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End listing *****/
|
/***** End listing *****/
|
||||||
Lay_EndRoundFrameTable10 ();
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
|
@ -284,7 +307,8 @@ void Fol_ListFollowers (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** Start listing *****/
|
/***** Start listing *****/
|
||||||
Lay_StartRoundFrameTable10 (NULL,2,Txt_Followers);
|
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\""
|
||||||
|
" style=\"margin:10px auto;\">");
|
||||||
|
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0;
|
||||||
NumUsr < NumUsrs;
|
NumUsr < NumUsrs;
|
||||||
|
@ -307,7 +331,7 @@ void Fol_ListFollowers (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End listing *****/
|
/***** End listing *****/
|
||||||
Lay_EndRoundFrameTable10 ();
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
|
@ -337,7 +361,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat)
|
||||||
bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod);
|
bool Visible = Pri_ShowIsAllowed (UsrDat->ProfileVisibility,UsrDat->UsrCod);
|
||||||
|
|
||||||
/***** Put form to follow / unfollow *****/
|
/***** Put form to follow / unfollow *****/
|
||||||
fprintf (Gbl.F.Out,"<td style=\"width:50px; height:50px;"
|
fprintf (Gbl.F.Out,"<td style=\"width:20px; height:50px;"
|
||||||
" text-align:right;\">");
|
" text-align:right;\">");
|
||||||
if (Visible &&
|
if (Visible &&
|
||||||
Gbl.Usrs.Me.Logged &&
|
Gbl.Usrs.Me.Logged &&
|
||||||
|
@ -350,7 +374,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat)
|
||||||
Act_LinkFormSubmit (Txt_Unfollow,NULL);
|
Act_LinkFormSubmit (Txt_Unfollow,NULL);
|
||||||
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\">"
|
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\">"
|
||||||
"<img src=\"%s/unfollow16x16.gif\""
|
"<img src=\"%s/unfollow16x16.gif\""
|
||||||
" style=\"width:16px; height:16px; padding:0 2px;\" alt=\"%s\" />"
|
" style=\"width:16px; height:16px;\" alt=\"%s\" />"
|
||||||
"</div>"
|
"</div>"
|
||||||
"</a>",
|
"</a>",
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
|
@ -388,7 +412,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat)
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Put form to go to public profile *****/
|
/***** Put form to go to public profile *****/
|
||||||
fprintf (Gbl.F.Out,"<td style=\"min-width:150px; height:50px;"
|
fprintf (Gbl.F.Out,"<td style=\"min-width:70px; height:50px;"
|
||||||
" text-align:left;\">");
|
" text-align:left;\">");
|
||||||
if (Visible &&
|
if (Visible &&
|
||||||
UsrDat->Nickname[0])
|
UsrDat->Nickname[0])
|
||||||
|
@ -396,7 +420,7 @@ static void Fol_ShowFollowedOrFollowed (const struct UsrData *UsrDat)
|
||||||
Act_FormStart (ActSeePubPrf);
|
Act_FormStart (ActSeePubPrf);
|
||||||
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamOtherUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
Act_LinkFormSubmit (Txt_View_public_profile,"DAT");
|
Act_LinkFormSubmit (Txt_View_public_profile,"DAT");
|
||||||
Usr_RestrictLengthAndWriteName (UsrDat,20);
|
Usr_RestrictLengthAndWriteName (UsrDat,8);
|
||||||
fprintf (Gbl.F.Out,"</a>");
|
fprintf (Gbl.F.Out,"</a>");
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
|
|
137
swad_profile.c
|
@ -232,22 +232,28 @@ bool Prf_ShowUserProfile (void)
|
||||||
fprintf (Gbl.F.Out,"<div style=\"margin:0 auto;\">"
|
fprintf (Gbl.F.Out,"<div style=\"margin:0 auto;\">"
|
||||||
"<table style=\"margin:0 auto;\">"
|
"<table style=\"margin:0 auto;\">"
|
||||||
"<tr>"
|
"<tr>"
|
||||||
"<td style=\"text-align:center;"
|
"<td rowspan=\"2\" style=\"text-align:center;"
|
||||||
" vertical-align:top;\">");
|
" vertical-align:top;\">");
|
||||||
|
|
||||||
/***** Common record *****/
|
/***** Common record *****/
|
||||||
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
/***** Show following and followers *****/
|
|
||||||
Fol_ShowFollowingAndFollowers (&Gbl.Usrs.Other.UsrDat);
|
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"<td style=\"text-align:left;"
|
"<td style=\"text-align:left;"
|
||||||
" vertical-align:top; padding-left:4px;\">");
|
" vertical-align:top;\">");
|
||||||
|
|
||||||
/***** Show details of user's profile *****/
|
/***** Show details of user's profile *****/
|
||||||
Prf_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
|
Prf_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
"</tr>"
|
||||||
|
"<tr>"
|
||||||
|
"</td>"
|
||||||
|
"<td style=\"vertical-align:bottom;\">");
|
||||||
|
|
||||||
|
/***** Show following and followers *****/
|
||||||
|
Fol_ShowFollowingAndFollowers (&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>"
|
"</tr>"
|
||||||
"</table>"
|
"</table>"
|
||||||
|
@ -326,7 +332,7 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
// char StrTimeGenerationInMicroseconds[64];
|
// char StrTimeGenerationInMicroseconds[64];
|
||||||
|
|
||||||
/***** Start table *****/
|
/***** Start table *****/
|
||||||
fprintf (Gbl.F.Out,"<table class=\"TABLE10 CELLS_PAD_2\">");
|
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\" style=\"margin:0 10px;\">");
|
||||||
/*
|
/*
|
||||||
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM)
|
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM)
|
||||||
{
|
{
|
||||||
|
@ -341,18 +347,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_TEACHER);
|
NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_TEACHER);
|
||||||
NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_STUDENT);
|
NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_TEACHER,Rol_ROLE_STUDENT);
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/tch64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">"
|
||||||
" style=\"text-align:left; vertical-align:top;\">"
|
"%u %s (%u %s + %u %s)"
|
||||||
"%u %s<br />"
|
|
||||||
"%u %s + %u %s"
|
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
Gbl.Prefs.IconsURL,
|
||||||
Txt_ROLES_SINGUL_Abc[Rol_ROLE_TEACHER][UsrDat->Sex],
|
Txt_ROLES_SINGUL_Abc[Rol_ROLE_TEACHER][UsrDat->Sex],
|
||||||
NumCrssUsrIsTeacher,
|
NumCrssUsrIsTeacher,
|
||||||
(NumCrssUsrIsTeacher == 1) ? Txt_course :
|
(NumCrssUsrIsTeacher == 1) ? Txt_course :
|
||||||
|
@ -367,18 +371,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_TEACHER);
|
NumTchs = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_TEACHER);
|
||||||
NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_STUDENT);
|
NumStds = Usr_GetNumUsrsInCrssOfAUsr (UsrDat->UsrCod,Rol_ROLE_STUDENT,Rol_ROLE_STUDENT);
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/std64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">"
|
||||||
" style=\"text-align:left; vertical-align:top;\">"
|
"%u %s (%u %s + %u %s)"
|
||||||
"%u %s<br />"
|
|
||||||
"%u %s + %u %s"
|
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
Gbl.Prefs.IconsURL,
|
||||||
Txt_ROLES_SINGUL_Abc[Rol_ROLE_STUDENT][UsrDat->Sex],
|
Txt_ROLES_SINGUL_Abc[Rol_ROLE_STUDENT][UsrDat->Sex],
|
||||||
NumCrssUsrIsStudent,
|
NumCrssUsrIsStudent,
|
||||||
(NumCrssUsrIsStudent == 1) ? Txt_course :
|
(NumCrssUsrIsStudent == 1) ? Txt_course :
|
||||||
|
@ -395,18 +397,16 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
else
|
else
|
||||||
NumPublicFiles = 0;
|
NumPublicFiles = 0;
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/file64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">"
|
||||||
" style=\"text-align:left; vertical-align:top;\">"
|
"%u %s (%u %s)"
|
||||||
"%u %s<br />"
|
|
||||||
"%u %s"
|
|
||||||
"</a>"
|
"</a>"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
Gbl.Prefs.IconsURL,
|
||||||
Txt_Files,
|
Txt_Files,
|
||||||
NumFiles,
|
NumFiles,
|
||||||
(NumFiles == 1) ? Txt_file :
|
(NumFiles == 1) ? Txt_file :
|
||||||
|
@ -418,20 +418,18 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/* First click time */
|
/* First click time */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/clock64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">",
|
||||||
" style=\"text-align:left; vertical-align:top;\">",
|
Gbl.Prefs.IconsURL,
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_From_TIME);
|
Txt_From_TIME);
|
||||||
if (UsrFigures.FirstClickTime.Date.Year)
|
if (UsrFigures.FirstClickTime.Date.Year)
|
||||||
{
|
{
|
||||||
Dat_WriteDate (UsrFigures.FirstClickTime.Date.YYYYMMDD);
|
Dat_WriteDate (UsrFigures.FirstClickTime.Date.YYYYMMDD);
|
||||||
if (UsrFigures.NumDays >= 0)
|
if (UsrFigures.NumDays >= 0)
|
||||||
fprintf (Gbl.F.Out,"<br />"
|
fprintf (Gbl.F.Out," (%d %s)",
|
||||||
"%d %s",
|
|
||||||
UsrFigures.NumDays,
|
UsrFigures.NumDays,
|
||||||
(UsrFigures.NumDays == 1) ? Txt_day :
|
(UsrFigures.NumDays == 1) ? Txt_day :
|
||||||
Txt_days);
|
Txt_days);
|
||||||
|
@ -452,13 +450,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/* Number of clicks */
|
/* Number of clicks */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/click64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">",
|
||||||
" style=\"text-align:left; vertical-align:top;\">",
|
Gbl.Prefs.IconsURL,
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Clicks);
|
Txt_Clicks);
|
||||||
if (UsrFigures.NumClicks >= 0)
|
if (UsrFigures.NumClicks >= 0)
|
||||||
{
|
{
|
||||||
|
@ -468,12 +465,13 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
Prf_GetNumUsrsWithFigure ("NumClicks"));
|
Prf_GetNumUsrsWithFigure ("NumClicks"));
|
||||||
if (UsrFigures.NumDays >= 0)
|
if (UsrFigures.NumDays >= 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumClicks /
|
Str_WriteFloatNum ((float) UsrFigures.NumClicks /
|
||||||
(float) (UsrFigures.NumDays + 1));
|
(float) (UsrFigures.NumDays + 1));
|
||||||
fprintf (Gbl.F.Out," / %s ",Txt_day);
|
fprintf (Gbl.F.Out," / %s ",Txt_day);
|
||||||
Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod),
|
Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod),
|
||||||
Prf_GetNumUsrsWithNumClicksPerDay ());
|
Prf_GetNumUsrsWithNumClicksPerDay ());
|
||||||
|
fprintf (Gbl.F.Out,")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of clicks is unknown
|
else // Number of clicks is unknown
|
||||||
|
@ -492,13 +490,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of file views *****/
|
/***** Number of file views *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/download64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">",
|
||||||
" style=\"text-align:left; vertical-align:top;\">",
|
Gbl.Prefs.IconsURL,
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Downloads);
|
Txt_Downloads);
|
||||||
if (UsrFigures.NumFileViews >= 0)
|
if (UsrFigures.NumFileViews >= 0)
|
||||||
{
|
{
|
||||||
|
@ -510,10 +507,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
Prf_GetNumUsrsWithFigure ("NumFileViews"));
|
Prf_GetNumUsrsWithFigure ("NumFileViews"));
|
||||||
if (UsrFigures.NumDays >= 0)
|
if (UsrFigures.NumDays >= 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumFileViews /
|
Str_WriteFloatNum ((float) UsrFigures.NumFileViews /
|
||||||
(float) (UsrFigures.NumDays + 1));
|
(float) (UsrFigures.NumDays + 1));
|
||||||
fprintf (Gbl.F.Out," / %s",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of file views is unknown
|
else // Number of file views is unknown
|
||||||
|
@ -532,13 +529,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of posts in forums *****/
|
/***** Number of posts in forums *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/forum64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">",
|
||||||
" style=\"text-align:left; vertical-align:top;\">",
|
Gbl.Prefs.IconsURL,
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Forums);
|
Txt_Forums);
|
||||||
if (UsrFigures.NumForPst >= 0)
|
if (UsrFigures.NumForPst >= 0)
|
||||||
{
|
{
|
||||||
|
@ -550,10 +546,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
Prf_GetNumUsrsWithFigure ("NumForPst"));
|
Prf_GetNumUsrsWithFigure ("NumForPst"));
|
||||||
if (UsrFigures.NumDays >= 0)
|
if (UsrFigures.NumDays >= 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumForPst /
|
Str_WriteFloatNum ((float) UsrFigures.NumForPst /
|
||||||
(float) (UsrFigures.NumDays + 1));
|
(float) (UsrFigures.NumDays + 1));
|
||||||
fprintf (Gbl.F.Out," / %s",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of forum posts is unknown
|
else // Number of forum posts is unknown
|
||||||
|
@ -572,13 +568,12 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/***** Number of messages sent *****/
|
/***** Number of messages sent *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"PRF_ICON_CONTAINER\">"
|
||||||
" style=\"text-align:right; vertical-align:top;\">"
|
"<img src=\"%s/msg64x64.gif\" title=\"%s\""
|
||||||
"%s"
|
" class=\"PRF_ICON\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"DAT\""
|
"<td class=\"PRF_FIG DAT\">",
|
||||||
" style=\"text-align:left; vertical-align:top;\">",
|
Gbl.Prefs.IconsURL,
|
||||||
The_ClassFormul[Gbl.Prefs.Theme],
|
|
||||||
Txt_Messages);
|
Txt_Messages);
|
||||||
if (UsrFigures.NumMsgSnt >= 0)
|
if (UsrFigures.NumMsgSnt >= 0)
|
||||||
{
|
{
|
||||||
|
@ -590,10 +585,10 @@ static void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||||
Prf_GetNumUsrsWithFigure ("NumMsgSnt"));
|
Prf_GetNumUsrsWithFigure ("NumMsgSnt"));
|
||||||
if (UsrFigures.NumDays >= 0)
|
if (UsrFigures.NumDays >= 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<br />");
|
fprintf (Gbl.F.Out," (");
|
||||||
Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt /
|
Str_WriteFloatNum ((float) UsrFigures.NumMsgSnt /
|
||||||
(float) (UsrFigures.NumDays + 1));
|
(float) (UsrFigures.NumDays + 1));
|
||||||
fprintf (Gbl.F.Out," / %s",Txt_day);
|
fprintf (Gbl.F.Out," / %s)",Txt_day);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Number of clicks is unknown
|
else // Number of clicks is unknown
|
||||||
|
@ -1459,7 +1454,7 @@ static void Prf_ShowUsrInRanking (const struct UsrData *UsrDat,unsigned Rank)
|
||||||
" height:40px; background-color:%s;\">"
|
" height:40px; background-color:%s;\">"
|
||||||
"#%u"
|
"#%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td style=\"width:18px; height:40px;"
|
"<td style=\"width:28px; height:40px;"
|
||||||
" background-color:%s;\">",
|
" background-color:%s;\">",
|
||||||
Gbl.ColorRows[Gbl.RowEvenOdd],
|
Gbl.ColorRows[Gbl.RowEvenOdd],
|
||||||
Rank,
|
Rank,
|
||||||
|
@ -1472,7 +1467,7 @@ static 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,
|
||||||
"PHOTO18x24",Pho_ZOOM);
|
"PHOTO24x32",Pho_ZOOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
|
146
swad_record.c
|
@ -1485,7 +1485,7 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
|
||||||
extern const char *The_ClassFormul[The_NUM_THEMES];
|
extern const char *The_ClassFormul[The_NUM_THEMES];
|
||||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY];
|
extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY];
|
||||||
extern const char *Txt_Send;
|
extern const char *Txt_Send;
|
||||||
unsigned RecordWidth = Rec_WIDTH_SHARE_RECORD_BIG;
|
unsigned RecordWidth = Rec_RECORD_WIDTH_WIDE;
|
||||||
char StrRecordWidth[10+1];
|
char StrRecordWidth[10+1];
|
||||||
unsigned FrameWidth = 10;
|
unsigned FrameWidth = 10;
|
||||||
unsigned Col1Width = 140;
|
unsigned Col1Width = 140;
|
||||||
|
@ -2012,11 +2012,6 @@ void Rec_ShowCommonRecordUnmodifiable (struct UsrData *UsrDat)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Show form or only data depending on TypeOfView
|
// Show form or only data depending on TypeOfView
|
||||||
|
|
||||||
#define C1_WIDTH 52
|
|
||||||
#define C2_WIDTH 144
|
|
||||||
#define C3_WIDTH 210
|
|
||||||
#define C4_WIDTH 154
|
|
||||||
|
|
||||||
void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
struct UsrData *UsrDat)
|
struct UsrData *UsrDat)
|
||||||
{
|
{
|
||||||
|
@ -2050,6 +2045,11 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
extern const char *Txt_Local_address;
|
extern const char *Txt_Local_address;
|
||||||
extern const char *Txt_Family_address;
|
extern const char *Txt_Family_address;
|
||||||
extern const char *Txt_USER_comments;
|
extern const char *Txt_USER_comments;
|
||||||
|
unsigned RecordWidth;
|
||||||
|
unsigned C1Width;
|
||||||
|
unsigned C2Width;
|
||||||
|
unsigned C3Width;
|
||||||
|
unsigned C4Width;
|
||||||
char StrRecordWidth[10+1];
|
char StrRecordWidth[10+1];
|
||||||
const char *ClassHead;
|
const char *ClassHead;
|
||||||
const char *ClassForm;
|
const char *ClassForm;
|
||||||
|
@ -2172,15 +2172,33 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (TypeOfView)
|
||||||
|
{
|
||||||
|
case Rec_RECORD_PUBLIC:
|
||||||
|
RecordWidth = Rec_RECORD_WIDTH_NARROW;
|
||||||
|
C1Width = Rec_C1_WIDTH_NARROW;
|
||||||
|
C2Width = Rec_C2_WIDTH_NARROW;
|
||||||
|
C3Width = Rec_C3_WIDTH_NARROW;
|
||||||
|
C4Width = Rec_C4_WIDTH_NARROW;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
RecordWidth = Rec_RECORD_WIDTH_WIDE;
|
||||||
|
C1Width = Rec_C1_WIDTH_WIDE;
|
||||||
|
C2Width = Rec_C2_WIDTH_WIDE;
|
||||||
|
C3Width = Rec_C3_WIDTH_WIDE;
|
||||||
|
C4Width = Rec_C4_WIDTH_WIDE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/***** Start frame *****/
|
/***** Start frame *****/
|
||||||
sprintf (StrRecordWidth,"%upx",Rec_WIDTH_SHARE_RECORD_BIG);
|
sprintf (StrRecordWidth,"%upx",RecordWidth);
|
||||||
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
Lay_StartRoundFrameTable10 (StrRecordWidth,2,NULL);
|
||||||
|
|
||||||
/***** Institution *****/
|
/***** Institution *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td style=\"width:%upx; height:%upx;"
|
"<td style=\"width:%upx; height:%upx;"
|
||||||
" text-align:center; vertical-align:middle;\">",
|
" text-align:center; vertical-align:middle;\">",
|
||||||
C1_WIDTH,C1_WIDTH);
|
C1Width,C1Width);
|
||||||
if (UsrDat->InsCod > 0)
|
if (UsrDat->InsCod > 0)
|
||||||
{
|
{
|
||||||
Ins.InsCod = UsrDat->InsCod;
|
Ins.InsCod = UsrDat->InsCod;
|
||||||
|
@ -2192,7 +2210,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; height:%upx;"
|
" style=\"width:%upx; height:%upx;"
|
||||||
" text-align:left; vertical-align:middle;\">",
|
" text-align:left; vertical-align:middle;\">",
|
||||||
ClassHead,C2_WIDTH + C3_WIDTH,C1_WIDTH);
|
ClassHead,C2Width + C3Width,C1Width);
|
||||||
if (UsrDat->InsCod > 0)
|
if (UsrDat->InsCod > 0)
|
||||||
fprintf (Gbl.F.Out,"%s",Ins.FullName);
|
fprintf (Gbl.F.Out,"%s",Ins.FullName);
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
@ -2201,7 +2219,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
ShowPhoto = Pho_ShowUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||||
fprintf (Gbl.F.Out,"<td rowspan=\"3\" style=\"width:%upx;"
|
fprintf (Gbl.F.Out,"<td rowspan=\"3\" style=\"width:%upx;"
|
||||||
" text-align:center; vertical-align:top;\">",
|
" text-align:center; vertical-align:top;\">",
|
||||||
C4_WIDTH);
|
C4Width);
|
||||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||||
NULL,
|
NULL,
|
||||||
"PHOTO150x200",Pho_NO_ZOOM);
|
"PHOTO150x200",Pho_NO_ZOOM);
|
||||||
|
@ -2219,7 +2237,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
CommandsRowspan += 5; // Institution, Centre, Department, Office, Phone
|
CommandsRowspan += 5; // Institution, Centre, Department, Office, Phone
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td rowspan=\"%u\" style=\"width:%upx; vertical-align:top;\">",
|
"<td rowspan=\"%u\" style=\"width:%upx; vertical-align:top;\">",
|
||||||
CommandsRowspan,C1_WIDTH);
|
CommandsRowspan,C1Width);
|
||||||
|
|
||||||
if (CommandForms)
|
if (CommandForms)
|
||||||
{
|
{
|
||||||
|
@ -2394,7 +2412,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"%s<br />%s<br />%s"
|
"%s<br />%s<br />%s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
C2_WIDTH + C3_WIDTH,
|
C2Width + C3Width,
|
||||||
UsrDat->FirstName ,
|
UsrDat->FirstName ,
|
||||||
UsrDat->Surname1,
|
UsrDat->Surname1,
|
||||||
UsrDat->Surname2);
|
UsrDat->Surname2);
|
||||||
|
@ -2403,7 +2421,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_NAME\" style=\"width:%upx;"
|
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"REC_NAME\" style=\"width:%upx;"
|
||||||
" text-align:left; vertical-align:bottom;\">"
|
" text-align:left; vertical-align:bottom;\">"
|
||||||
"<div class=\"REC_NICK\">",
|
"<div class=\"REC_NICK\">",
|
||||||
C2_WIDTH + C3_WIDTH);
|
C2Width + C3Width);
|
||||||
if (UsrDat->Nickname[0])
|
if (UsrDat->Nickname[0])
|
||||||
{
|
{
|
||||||
if (GoToPublicProfileForm)
|
if (GoToPublicProfileForm)
|
||||||
|
@ -2434,13 +2452,13 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"<td style=\"width:%upx; height:0px;\"></td>"
|
"<td style=\"width:%upx; height:0px;\"></td>"
|
||||||
"<td style=\"width:%upx; height:0px;\"></td>"
|
"<td style=\"width:%upx; height:0px;\"></td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
C2_WIDTH,C3_WIDTH,C4_WIDTH);
|
C2Width,C3Width,C4Width);
|
||||||
|
|
||||||
/***** Country *****/
|
/***** Country *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td colspan=\"2\" class=\"%s\" style=\"width:%upx;"
|
"<td colspan=\"2\" class=\"%s\" style=\"width:%upx;"
|
||||||
" text-align:left; vertical-align:top;\">",
|
" text-align:left; vertical-align:top;\">",
|
||||||
ClassData,C2_WIDTH + C3_WIDTH);
|
ClassData,C2Width + C3Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (CountryForm)
|
if (CountryForm)
|
||||||
|
@ -2455,7 +2473,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:%upx;\">"
|
fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:%upx;\">"
|
||||||
"<option value=\"-1\"> </option>"
|
"<option value=\"-1\"> </option>"
|
||||||
"<option value=\"0\"",
|
"<option value=\"0\"",
|
||||||
C2_WIDTH + C3_WIDTH - 60);
|
C2Width + C3Width - 60);
|
||||||
if (UsrDat->CtyCod == 0)
|
if (UsrDat->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);
|
||||||
|
@ -2483,7 +2501,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
/***** User's web and social networks *****/
|
/***** User's web and social networks *****/
|
||||||
fprintf (Gbl.F.Out,"<td style=\"width:%upx;\">"
|
fprintf (Gbl.F.Out,"<td style=\"width:%upx;\">"
|
||||||
"<div style=\"vertical-align:top; margin:0 auto;\">",
|
"<div style=\"vertical-align:top; margin:0 auto;\">",
|
||||||
C4_WIDTH);
|
C4Width);
|
||||||
Net_ShowWebsAndSocialNets (UsrDat);
|
Net_ShowWebsAndSocialNets (UsrDat);
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
fprintf (Gbl.F.Out,"</div>"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
@ -2499,8 +2517,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Email,
|
ClassForm,C2Width,Txt_Email,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (UsrDat->Email[0])
|
if (UsrDat->Email[0])
|
||||||
{
|
{
|
||||||
if (ShowEmail)
|
if (ShowEmail)
|
||||||
|
@ -2525,8 +2543,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_ID,
|
ClassForm,C2Width,Txt_ID,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
ID_WriteUsrIDs (UsrDat,ShowID);
|
ID_WriteUsrIDs (UsrDat,ShowID);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
@ -2537,7 +2555,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s\""
|
"<td class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:right;\">",
|
" style=\"width:%upx; text-align:right;\">",
|
||||||
ClassForm,C2_WIDTH);
|
ClassForm,C2Width);
|
||||||
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
||||||
fprintf (Gbl.F.Out,"%s*",Txt_Sex);
|
fprintf (Gbl.F.Out,"%s*",Txt_Sex);
|
||||||
else
|
else
|
||||||
|
@ -2545,7 +2563,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
fprintf (Gbl.F.Out,":</td>"
|
fprintf (Gbl.F.Out,":</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
switch (TypeOfView)
|
switch (TypeOfView)
|
||||||
{
|
{
|
||||||
case Rec_FORM_SIGN_UP: // I want to apply for enrollment
|
case Rec_FORM_SIGN_UP: // I want to apply for enrollment
|
||||||
|
@ -2671,10 +2689,10 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"%s"
|
"%s"
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
ClassForm,C2_WIDTH,
|
ClassForm,C2Width,
|
||||||
TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_Sex :
|
TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_Sex :
|
||||||
Txt_Role,
|
Txt_Role,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH,
|
ClassData,C3Width + C4Width,
|
||||||
TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_SEX_SINGULAR_Abc[UsrDat->Sex] :
|
TypeOfView == Rec_MY_COMMON_RECORD_CHECK ? Txt_SEX_SINGULAR_Abc[UsrDat->Sex] :
|
||||||
Txt_ROLES_SINGUL_Abc[UsrDat->RoleInCurrentCrsDB][UsrDat->Sex]);
|
Txt_ROLES_SINGUL_Abc[UsrDat->RoleInCurrentCrsDB][UsrDat->Sex]);
|
||||||
|
|
||||||
|
@ -2684,17 +2702,17 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"<td class=\"%s\""
|
"<td class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:right;\">"
|
" style=\"width:%upx; text-align:right;\">"
|
||||||
"%s",
|
"%s",
|
||||||
ClassForm,C2_WIDTH,Txt_Surname_1);
|
ClassForm,C2Width,Txt_Surname_1);
|
||||||
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
||||||
fprintf (Gbl.F.Out,"*");
|
fprintf (Gbl.F.Out,"*");
|
||||||
fprintf (Gbl.F.Out,":</td>"
|
fprintf (Gbl.F.Out,":</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Surname1\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Surname1\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
||||||
UsrDat->Surname1);
|
UsrDat->Surname1);
|
||||||
else if (UsrDat->Surname1[0])
|
else if (UsrDat->Surname1[0])
|
||||||
|
@ -2710,13 +2728,13 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,
|
ClassForm,C2Width,
|
||||||
Txt_Surname_2,
|
Txt_Surname_2,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Surname2\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"Surname2\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
||||||
UsrDat->Surname2);
|
UsrDat->Surname2);
|
||||||
else if (UsrDat->Surname2[0])
|
else if (UsrDat->Surname2[0])
|
||||||
|
@ -2730,17 +2748,17 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"<td class=\"%s\""
|
"<td class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:right;\">"
|
" style=\"width:%upx; text-align:right;\">"
|
||||||
"%s",
|
"%s",
|
||||||
ClassForm,C2_WIDTH,Txt_First_name);
|
ClassForm,C2Width,Txt_First_name);
|
||||||
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
if (TypeOfView == Rec_FORM_MY_COMMON_RECORD)
|
||||||
fprintf (Gbl.F.Out,"*");
|
fprintf (Gbl.F.Out,"*");
|
||||||
fprintf (Gbl.F.Out,":</td>"
|
fprintf (Gbl.F.Out,":</td>"
|
||||||
"<td class=\"%s\" colspan=\"2\""
|
"<td class=\"%s\" colspan=\"2\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FirstName\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FirstName\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
Usr_MAX_LENGTH_USR_NAME_OR_SURNAME,
|
||||||
UsrDat->FirstName);
|
UsrDat->FirstName);
|
||||||
else if (UsrDat->FirstName[0])
|
else if (UsrDat->FirstName[0])
|
||||||
|
@ -2759,14 +2777,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Place_of_origin,
|
ClassForm,C2Width,Txt_Place_of_origin,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"OriginPlace\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"OriginPlace\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Cns_MAX_LENGTH_STRING,
|
Cns_MAX_LENGTH_STRING,
|
||||||
UsrDat->OriginPlace);
|
UsrDat->OriginPlace);
|
||||||
else if (UsrDat->OriginPlace[0])
|
else if (UsrDat->OriginPlace[0])
|
||||||
|
@ -2783,8 +2801,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Date_of_birth,
|
ClassForm,C2Width,Txt_Date_of_birth,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
|
@ -2807,14 +2825,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Local_address,
|
ClassForm,C2Width,Txt_Local_address,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"LocalAddress\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"LocalAddress\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Cns_MAX_LENGTH_STRING,
|
Cns_MAX_LENGTH_STRING,
|
||||||
UsrDat->LocalAddress);
|
UsrDat->LocalAddress);
|
||||||
else if (UsrDat->LocalAddress[0])
|
else if (UsrDat->LocalAddress[0])
|
||||||
|
@ -2831,14 +2849,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Phone,
|
ClassForm,C2Width,Txt_Phone,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"LocalPhone\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"LocalPhone\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Usr_MAX_LENGTH_PHONE,
|
Usr_MAX_LENGTH_PHONE,
|
||||||
UsrDat->LocalPhone);
|
UsrDat->LocalPhone);
|
||||||
else if (UsrDat->LocalPhone[0])
|
else if (UsrDat->LocalPhone[0])
|
||||||
|
@ -2855,14 +2873,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Family_address,
|
ClassForm,C2Width,Txt_Family_address,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyAddress\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyAddress\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Cns_MAX_LENGTH_STRING,
|
Cns_MAX_LENGTH_STRING,
|
||||||
UsrDat->FamilyAddress);
|
UsrDat->FamilyAddress);
|
||||||
else if (UsrDat->FamilyAddress[0])
|
else if (UsrDat->FamilyAddress[0])
|
||||||
|
@ -2879,14 +2897,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Phone,
|
ClassForm,C2Width,Txt_Phone,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyPhone\""
|
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FamilyPhone\""
|
||||||
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
" style=\"width:%upx;\" maxlength=\"%u\" value=\"%s\" />",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
Usr_MAX_LENGTH_PHONE,
|
Usr_MAX_LENGTH_PHONE,
|
||||||
UsrDat->FamilyPhone);
|
UsrDat->FamilyPhone);
|
||||||
else if (UsrDat->FamilyPhone[0])
|
else if (UsrDat->FamilyPhone[0])
|
||||||
|
@ -2903,14 +2921,14 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\" style=\"width:%upx;"
|
"<td colspan=\"2\" class=\"%s\" style=\"width:%upx;"
|
||||||
" text-align:left; vertical-align:top;\">",
|
" text-align:left; vertical-align:top;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_USER_comments,
|
ClassForm,C2Width,Txt_USER_comments,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (DataForm)
|
if (DataForm)
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Comments\" rows=\"3\""
|
fprintf (Gbl.F.Out,"<textarea name=\"Comments\" rows=\"3\""
|
||||||
" style=\"width:%upx;\">%s</textarea>",
|
" style=\"width:%upx;\">%s</textarea>",
|
||||||
C3_WIDTH + C4_WIDTH - 60,
|
C3Width + C4Width - 60,
|
||||||
UsrDat->Comments);
|
UsrDat->Comments);
|
||||||
else if (UsrDat->Comments[0])
|
else if (UsrDat->Comments[0])
|
||||||
{
|
{
|
||||||
|
@ -2934,8 +2952,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Institution,
|
ClassForm,C2Width,Txt_Institution,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (UsrDat->InsCod > 0)
|
if (UsrDat->InsCod > 0)
|
||||||
|
@ -2959,8 +2977,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Centre,
|
ClassForm,C2Width,Txt_Centre,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (UsrDat->Tch.CtrCod > 0)
|
if (UsrDat->Tch.CtrCod > 0)
|
||||||
|
@ -2986,8 +3004,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Department,
|
ClassForm,C2Width,Txt_Department,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (UsrDat->Tch.DptCod > 0)
|
if (UsrDat->Tch.DptCod > 0)
|
||||||
|
@ -3013,8 +3031,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Office,
|
ClassForm,C2Width,Txt_Office,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office);
|
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.Office);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
@ -3028,8 +3046,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td colspan=\"2\" class=\"%s\""
|
"<td colspan=\"2\" class=\"%s\""
|
||||||
" style=\"width:%upx; text-align:left;\">",
|
" style=\"width:%upx; text-align:left;\">",
|
||||||
ClassForm,C2_WIDTH,Txt_Phone,
|
ClassForm,C2Width,Txt_Phone,
|
||||||
ClassData,C3_WIDTH + C4_WIDTH);
|
ClassData,C3Width + C4Width);
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.OfficePhone);
|
fprintf (Gbl.F.Out,"%s",UsrDat->Tch.OfficePhone);
|
||||||
fprintf (Gbl.F.Out,"</td>"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
|
|
@ -35,7 +35,17 @@
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Rec_WIDTH_SHARE_RECORD_BIG 560
|
#define Rec_RECORD_WIDTH_WIDE 560
|
||||||
|
#define Rec_C1_WIDTH_WIDE 52
|
||||||
|
#define Rec_C2_WIDTH_WIDE 144
|
||||||
|
#define Rec_C3_WIDTH_WIDE 210
|
||||||
|
#define Rec_C4_WIDTH_WIDE 154
|
||||||
|
|
||||||
|
#define Rec_RECORD_WIDTH_NARROW 460
|
||||||
|
#define Rec_C1_WIDTH_NARROW 52
|
||||||
|
#define Rec_C2_WIDTH_NARROW 94
|
||||||
|
#define Rec_C3_WIDTH_NARROW 160
|
||||||
|
#define Rec_C4_WIDTH_NARROW 154
|
||||||
|
|
||||||
#define Rec_MAX_LENGTH_NAME_FIELD 255
|
#define Rec_MAX_LENGTH_NAME_FIELD 255
|
||||||
#define Rec_MIN_LINES_IN_EDITION_FIELD 1
|
#define Rec_MIN_LINES_IN_EDITION_FIELD 1
|
||||||
|
|