Version 14.57.2

This commit is contained in:
Antonio Cañas Vargas 2015-01-18 11:46:39 +01:00
parent c9e40b1ce1
commit bd0d37e78a
19 changed files with 77 additions and 58 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 367 B

View File

@ -173,7 +173,8 @@ void Ctr_SeeCtrWithPendingDegs (void)
" vertical-align:middle; background-color:%s;\">" " vertical-align:middle; background-color:%s;\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">", "<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
BgColor,Ctr.WWW,Ctr.FullName); BgColor,Ctr.WWW,Ctr.FullName);
Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr.CtrCod,Ctr.ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr.CtrCod,Ctr.ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -290,7 +291,7 @@ static void Ctr_Configuration (bool PrintView)
Gbl.CurrentCtr.Ctr.WWW, Gbl.CurrentCtr.Ctr.WWW,
Gbl.CurrentCtr.Ctr.FullName); Gbl.CurrentCtr.Ctr.FullName);
Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod, Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod,
Gbl.CurrentCtr.Ctr.ShortName,64,NULL); Gbl.CurrentCtr.Ctr.ShortName,64,NULL,true);
fprintf (Gbl.F.Out,"<br />%s",Gbl.CurrentCtr.Ctr.FullName); fprintf (Gbl.F.Out,"<br />%s",Gbl.CurrentCtr.Ctr.FullName);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
@ -594,7 +595,8 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">", "<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
TxtClass,BgColor, TxtClass,BgColor,
Ctr->WWW,Ctr->FullName); Ctr->WWW,Ctr->FullName);
Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr->CtrCod,Ctr->ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr->CtrCod,Ctr->ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -1137,7 +1139,7 @@ static void Ctr_ListCentresForEdition (void)
fprintf (Gbl.F.Out,"<td title=\"%s\"" fprintf (Gbl.F.Out,"<td title=\"%s\""
" style=\"width:20px; text-align:left;\">", " style=\"width:20px; text-align:left;\">",
Ctr->FullName); Ctr->FullName);
Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr->CtrCod,Ctr->ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr->CtrCod,Ctr->ShortName,16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Institution */ /* Institution */
@ -1922,7 +1924,7 @@ static void Ctr_PutFormToCreateCentre (void)
/***** Centre logo *****/ /***** Centre logo *****/
fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">"); fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">");
Log_DrawLogo (Sco_SCOPE_CENTRE,-1L,"",16,NULL); Log_DrawLogo (Sco_SCOPE_CENTRE,-1L,"",16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Institution *****/ /***** Institution *****/

View File

@ -39,11 +39,12 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.57.1 (2015/01/17)" #define Log_PLATFORM_VERSION "SWAD 14.57.2 (2015/01/18)"
// 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 | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h | tail -1
/* /*
Version 14.57.2: Jan 18, 2015 Icon of institution, centre or degree is not drawn on title when logo does not exist. (173693 lines)
Version 14.57.1: Jan 17, 2015 Code refactoring related to logos of institutions, centres and degrees. (173674 lines) Version 14.57.1: Jan 17, 2015 Code refactoring related to logos of institutions, centres and degrees. (173674 lines)
Version 14.57: Jan 17, 2015 New option to upload logo of degree. (173720 lines) Version 14.57: Jan 17, 2015 New option to upload logo of degree. (173720 lines)
3 changes necessary in database: 3 changes necessary in database:

View File

@ -185,7 +185,7 @@ void Cht_ShowListOfAvailableChatRooms (void)
sprintf (ThisRoomShortName,"%s",Deg.ShortName); sprintf (ThisRoomShortName,"%s",Deg.ShortName);
sprintf (ThisRoomFullName,"%s %s",Txt_Degree,Deg.ShortName); sprintf (ThisRoomFullName,"%s %s",Txt_Degree,Deg.ShortName);
Cht_WriteLinkToChat1 (ThisRoomCode,ThisRoomShortName,ThisRoomFullName,1,IsLastItemInLevel); Cht_WriteLinkToChat1 (ThisRoomCode,ThisRoomShortName,ThisRoomFullName,1,IsLastItemInLevel);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,NULL,true);
Cht_WriteLinkToChat2 (ThisRoomCode,ThisRoomFullName); Cht_WriteLinkToChat2 (ThisRoomCode,ThisRoomFullName);
/* Get my courses in this degree from database */ /* Get my courses in this degree from database */

View File

@ -212,7 +212,8 @@ static void Crs_Configuration (bool PrintView)
" class=\"TITLE_LOCATION\" title=\"%s\">", " class=\"TITLE_LOCATION\" title=\"%s\">",
Gbl.CurrentDeg.Deg.WWW, Gbl.CurrentDeg.Deg.WWW,
Gbl.CurrentDeg.Deg.FullName); Gbl.CurrentDeg.Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentDeg.Deg.ShortName,64,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,64,NULL,true);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
fprintf (Gbl.F.Out,"<br />%s" fprintf (Gbl.F.Out,"<br />%s"
@ -669,7 +670,8 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Ins_PutParamInsCod (Ins.InsCod); Ins_PutParamInsCod (Ins.InsCod);
Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeInsInf].ActCod,ActTxt), Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeInsInf].ActCod,ActTxt),
The_ClassFormul[Gbl.Prefs.Theme]); The_ClassFormul[Gbl.Prefs.Theme]);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,16,"vertical-align:middle;"); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,
16,NULL,true);
Highlight = (Gbl.CurrentCtr.Ctr.CtrCod <= 0 && Highlight = (Gbl.CurrentCtr.Ctr.CtrCod <= 0 &&
Gbl.CurrentIns.Ins.InsCod == Ins.InsCod); Gbl.CurrentIns.Ins.InsCod == Ins.InsCod);
if (Highlight) if (Highlight)
@ -706,7 +708,8 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Ctr_PutParamCtrCod (Ctr.CtrCod); Ctr_PutParamCtrCod (Ctr.CtrCod);
Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeCtrInf].ActCod,ActTxt), Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeCtrInf].ActCod,ActTxt),
The_ClassFormul[Gbl.Prefs.Theme]); The_ClassFormul[Gbl.Prefs.Theme]);
Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr.CtrCod,Ctr.ShortName,16,"vertical-align:middle;"); Log_DrawLogo (Sco_SCOPE_CENTRE,Ctr.CtrCod,Ctr.ShortName,
16,NULL,true);
Highlight = (Gbl.CurrentDeg.Deg.DegCod <= 0 && Highlight = (Gbl.CurrentDeg.Deg.DegCod <= 0 &&
Gbl.CurrentCtr.Ctr.CtrCod == Ctr.CtrCod); Gbl.CurrentCtr.Ctr.CtrCod == Ctr.CtrCod);
if (Highlight) if (Highlight)
@ -743,7 +746,8 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Deg_PutParamDegCod (Deg.DegCod); Deg_PutParamDegCod (Deg.DegCod);
Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeDegInf].ActCod,ActTxt), Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_Actions[ActSeeDegInf].ActCod,ActTxt),
The_ClassFormul[Gbl.Prefs.Theme]); The_ClassFormul[Gbl.Prefs.Theme]);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,
16,NULL,true);
Highlight = (Gbl.CurrentCrs.Crs.CrsCod <= 0 && Highlight = (Gbl.CurrentCrs.Crs.CrsCod <= 0 &&
Gbl.CurrentDeg.Deg.DegCod == Deg.DegCod); Gbl.CurrentDeg.Deg.DegCod == Deg.DegCod);
if (Highlight) if (Highlight)
@ -3315,7 +3319,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
Deg_PutParamDegCod (Deg.DegCod); Deg_PutParamDegCod (Deg.DegCod);
sprintf (Gbl.Title,Txt_Go_to_X,row[2]); sprintf (Gbl.Title,Txt_Go_to_X,row[2]);
Act_LinkFormSubmit (Gbl.Title,StyleNoBR); Act_LinkFormSubmit (Gbl.Title,StyleNoBR);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,64,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,64,NULL,true);
fprintf (Gbl.F.Out," %s (%s)" fprintf (Gbl.F.Out," %s (%s)"
"</a>" "</a>"
"</form>" "</form>"

View File

@ -223,7 +223,8 @@ void Deg_SeeDegWithPendingCrss (void)
"<a href=\"%s\" title=\"%s\" class=\"DAT\"" "<a href=\"%s\" title=\"%s\" class=\"DAT\""
" target=\"_blank\">", " target=\"_blank\">",
BgColor,Deg.WWW,Deg.FullName); BgColor,Deg.WWW,Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -325,7 +326,7 @@ static void Deg_Configuration (bool PrintView)
Gbl.CurrentDeg.Deg.WWW, Gbl.CurrentDeg.Deg.WWW,
Gbl.CurrentDeg.Deg.FullName); Gbl.CurrentDeg.Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod, Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,64,NULL); Gbl.CurrentDeg.Deg.ShortName,64,NULL,true);
fprintf (Gbl.F.Out,"<br />%s", fprintf (Gbl.F.Out,"<br />%s",
Gbl.CurrentDeg.Deg.FullName); Gbl.CurrentDeg.Deg.FullName);
if (PutLink) if (PutLink)
@ -728,21 +729,20 @@ void Deg_WriteBigNameCtyInsCtrDegCrs (void)
Str_LimitLengthHTMLStr (FullName,Deg_MAX_LENGTH_FULL_NAME_ON_PAGE_HEAD); Str_LimitLengthHTMLStr (FullName,Deg_MAX_LENGTH_FULL_NAME_ON_PAGE_HEAD);
fprintf (Gbl.F.Out,"<div class=\"%s\">", fprintf (Gbl.F.Out,"<div class=\"%s\">",
The_ClassCourse[Gbl.Prefs.Theme]); The_ClassCourse[Gbl.Prefs.Theme]);
if (Gbl.CurrentCrs.Crs.CrsCod <= 0 && if (Gbl.CurrentCrs.Crs.CrsCod <= 0)
Gbl.Prefs.Theme == The_THEME_WHITE) // TODO: Remove this line
{ {
if (Gbl.CurrentDeg.Deg.DegCod > 0) if (Gbl.CurrentDeg.Deg.DegCod > 0)
Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod, Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,32, Gbl.CurrentDeg.Deg.ShortName,32,
"vertical-align:top; margin-right:8px;"); "vertical-align:top; margin-right:8px;",false);
else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) else if (Gbl.CurrentCtr.Ctr.CtrCod > 0)
Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod, Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.CurrentCtr.Ctr.CtrCod,
Gbl.CurrentCtr.Ctr.ShortName,32, Gbl.CurrentCtr.Ctr.ShortName,32,
"vertical-align:top; margin-right:8px;"); "vertical-align:top; margin-right:8px;",false);
else if (Gbl.CurrentIns.Ins.InsCod > 0) else if (Gbl.CurrentIns.Ins.InsCod > 0)
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod, Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentIns.Ins.ShortName,32, Gbl.CurrentIns.Ins.ShortName,32,
"vertical-align:top; margin-right:8px;"); "vertical-align:top; margin-right:8px;",false);
else if (Gbl.CurrentCty.Cty.CtyCod > 0) else if (Gbl.CurrentCty.Cty.CtyCod > 0)
if (Cty_CheckIfCountryMapExists (&Gbl.CurrentCty.Cty)) if (Cty_CheckIfCountryMapExists (&Gbl.CurrentCty.Cty))
Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE"); Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE");
@ -1270,7 +1270,8 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">", "<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
TxtClass,BgColor, TxtClass,BgColor,
Deg->WWW,Deg->FullName); Deg->WWW,Deg->FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg->DegCod,Deg->ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg->DegCod,Deg->ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -1413,7 +1414,7 @@ static void Deg_ListDegreesForEdition (void)
fprintf (Gbl.F.Out,"<td title=\"%s\"" fprintf (Gbl.F.Out,"<td title=\"%s\""
" style=\"width:20px; text-align:left;\">", " style=\"width:20px; text-align:left;\">",
Deg->FullName); Deg->FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg->DegCod,Deg->ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg->DegCod,Deg->ShortName,16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Centre */ /* Centre */
@ -1820,7 +1821,7 @@ static void Deg_PutFormToCreateDegree (void)
/***** Degree logo *****/ /***** Degree logo *****/
fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">"); fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">");
Log_DrawLogo (Sco_SCOPE_DEGREE,-1L,"",16,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,-1L,"",16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Centre *****/ /***** Centre *****/
@ -3920,7 +3921,8 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan)
Deg_PutParamDegCod (DegCod); Deg_PutParamDegCod (DegCod);
sprintf (Gbl.Title,Txt_Go_to_X,row[2]); sprintf (Gbl.Title,Txt_Go_to_X,row[2]);
Act_LinkFormSubmit (Gbl.Title,"DAT_SMALL_NOBR"); Act_LinkFormSubmit (Gbl.Title,"DAT_SMALL_NOBR");
Log_DrawLogo (Sco_SCOPE_DEGREE,DegCod,row[1],16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,DegCod,row[1],
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"&nbsp;%s</a>" fprintf (Gbl.F.Out,"&nbsp;%s</a>"
"</form>", "</form>",
row[2]); row[2]);

View File

@ -791,7 +791,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
else else
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"%s\">", fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"%s\">",
Ins.WWW,StyleTitle); Ins.WWW,StyleTitle);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.FullName,64,NULL); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.FullName,64,NULL,true);
fprintf (Gbl.F.Out,"<br />%s%s" \ fprintf (Gbl.F.Out,"<br />%s%s" \
"</td>" \ "</td>" \
"</tr>", "</tr>",

View File

@ -9563,7 +9563,8 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Deg_PutParamDegCod (DegCod); Deg_PutParamDegCod (DegCod);
sprintf (Gbl.Title,Txt_Go_to_X,row[5]); sprintf (Gbl.Title,Txt_Go_to_X,row[5]);
Act_LinkFormSubmit (Gbl.Title,"DAT"); Act_LinkFormSubmit (Gbl.Title,"DAT");
Log_DrawLogo (Sco_SCOPE_DEGREE,DegCod,row[4],16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,DegCod,row[4],
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"&nbsp;%s (%s)</a>" fprintf (Gbl.F.Out,"&nbsp;%s (%s)</a>"
"</form>", "</form>",
row[4],row[5]); row[4],row[5]);

View File

@ -2148,17 +2148,17 @@ static void For_WriteLinkToForum (For_ForumType_t ForumType,Act_Action_t NextAct
case For_FORUM_INSTITUTION_USRS: case For_FORUM_INSTITUTION_USRS:
case For_FORUM_INSTITUTION_TCHS: case For_FORUM_INSTITUTION_TCHS:
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.Forum.Ins.InsCod,ForumName, Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.Forum.Ins.InsCod,ForumName,
16,"vertical-align:middle;"); 16,NULL,true);
break; break;
case For_FORUM_CENTRE_USRS: case For_FORUM_CENTRE_USRS:
case For_FORUM_CENTRE_TCHS: case For_FORUM_CENTRE_TCHS:
Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.Forum.Ctr.CtrCod,ForumName, Log_DrawLogo (Sco_SCOPE_CENTRE,Gbl.Forum.Ctr.CtrCod,ForumName,
16,"vertical-align:middle;"); 16,NULL,true);
break; break;
case For_FORUM_DEGREE_USRS: case For_FORUM_DEGREE_USRS:
case For_FORUM_DEGREE_TCHS: case For_FORUM_DEGREE_TCHS:
Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.Forum.Deg.DegCod,ForumName, Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.Forum.Deg.DegCod,ForumName,
16,"vertical-align:middle;"); 16,NULL,true);
break; break;
default: default:
fprintf (Gbl.F.Out,"%s",Icon); fprintf (Gbl.F.Out,"%s",Icon);

View File

@ -163,7 +163,8 @@ void Ins_SeeInsWithPendingCtrs (void)
" vertical-align:middle; background-color:%s;\">" " vertical-align:middle; background-color:%s;\">"
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">", "<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
BgColor,Ins.WWW,Ins.FullName); BgColor,Ins.WWW,Ins.FullName);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -267,7 +268,7 @@ static void Ins_Configuration (bool PrintView)
Gbl.CurrentIns.Ins.WWW, Gbl.CurrentIns.Ins.WWW,
Gbl.CurrentIns.Ins.FullName); Gbl.CurrentIns.Ins.FullName);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod, Log_DrawLogo (Sco_SCOPE_INSTITUTION,Gbl.CurrentIns.Ins.InsCod,
Gbl.CurrentIns.Ins.ShortName,64,NULL); Gbl.CurrentIns.Ins.ShortName,64,NULL,true);
fprintf (Gbl.F.Out,"<br />%s",Gbl.CurrentIns.Ins.FullName); fprintf (Gbl.F.Out,"<br />%s",Gbl.CurrentIns.Ins.FullName);
if (PutLink) if (PutLink)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
@ -529,7 +530,8 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu
"<a href=\"%s\" target=\"_blank\" title=\"%s\">", "<a href=\"%s\" target=\"_blank\" title=\"%s\">",
BgColor, BgColor,
Ins->WWW,Ins->FullName); Ins->WWW,Ins->FullName);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins->InsCod,Ins->ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins->InsCod,Ins->ShortName,
16,NULL,true);
fprintf (Gbl.F.Out,"</a>" fprintf (Gbl.F.Out,"</a>"
"</td>"); "</td>");
@ -1113,7 +1115,8 @@ static void Ins_ListInstitutionsForEdition (void)
fprintf (Gbl.F.Out,"<td title=\"%s\"" fprintf (Gbl.F.Out,"<td title=\"%s\""
" style=\"width:20px; text-align:left;\">", " style=\"width:20px; text-align:left;\">",
Ins->FullName); Ins->FullName);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins->InsCod,Ins->ShortName,16,NULL); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins->InsCod,Ins->ShortName,
16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Country */ /* Country */
@ -1732,7 +1735,7 @@ static void Ins_PutFormToCreateInstitution (void)
/***** Institution logo *****/ /***** Institution logo *****/
fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">"); fprintf (Gbl.F.Out,"<td style=\"width:20px; text-align:left;\">");
Log_DrawLogo (Sco_SCOPE_INSTITUTION,-1L,"",16,NULL); Log_DrawLogo (Sco_SCOPE_INSTITUTION,-1L,"",16,NULL,true);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Country *****/ /***** Country *****/

View File

@ -1279,7 +1279,8 @@ void Lay_WriteHeaderClassPhoto (unsigned NumColumns,bool PrintView,bool DrawingC
{ {
if (!PrintView) if (!PrintView)
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\">",Ins.WWW); fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\">",Ins.WWW);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,Size,NULL); Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,
Size,NULL,true);
if (!PrintView) if (!PrintView)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
} }
@ -1328,7 +1329,7 @@ void Lay_WriteHeaderClassPhoto (unsigned NumColumns,bool PrintView,bool DrawingC
if (!PrintView) if (!PrintView)
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"TIT_CLASSPHOTO\">", fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"TIT_CLASSPHOTO\">",
Deg.WWW); Deg.WWW);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,Size,NULL); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,Size,NULL,true);
if (!PrintView) if (!PrintView)
fprintf (Gbl.F.Out,"</a>"); fprintf (Gbl.F.Out,"</a>");
} }

View File

@ -63,7 +63,7 @@ extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText, void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
unsigned Size,const char *Style) unsigned Size,const char *Style,bool PutIconIfNotExists)
{ {
const char *Folder; const char *Folder;
const char *Icon; const char *Icon;
@ -102,23 +102,26 @@ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
else else
LogoExists = false; LogoExists = false;
/***** Draw logo *****/ if (LogoExists || PutIconIfNotExists)
fprintf (Gbl.F.Out,"<img src=\""); {
if (LogoExists) /***** Draw logo *****/
fprintf (Gbl.F.Out,"%s/%s/%02u/%u/logo/%u.png", fprintf (Gbl.F.Out,"<img src=\"");
Cfg_HTTPS_URL_SWAD_PUBLIC,Folder, if (LogoExists)
(unsigned) (Cod % 100), fprintf (Gbl.F.Out,"%s/%s/%02u/%u/logo/%u.png",
(unsigned) Cod, Cfg_HTTPS_URL_SWAD_PUBLIC,Folder,
(unsigned) Cod); (unsigned) (Cod % 100),
else (unsigned) Cod,
fprintf (Gbl.F.Out,"%s/%s64x64.gif", (unsigned) Cod);
Gbl.Prefs.IconsURL,Icon); else
fprintf (Gbl.F.Out,"\" alt=\"%s\" class=\"ICON%ux%u\"", fprintf (Gbl.F.Out,"%s/%s64x64.gif",
AltText,Size,Size); Gbl.Prefs.IconsURL,Icon);
if (Style) fprintf (Gbl.F.Out,"\" alt=\"%s\" class=\"ICON%ux%u\"",
if (Style[0]) AltText,Size,Size);
fprintf (Gbl.F.Out," style=\"%s\"",Style); if (Style)
fprintf (Gbl.F.Out," />"); if (Style[0])
fprintf (Gbl.F.Out," style=\"%s\"",Style);
fprintf (Gbl.F.Out," />");
}
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -40,7 +40,7 @@
/*****************************************************************************/ /*****************************************************************************/
void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText, void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText,
unsigned Size,const char *Style); unsigned Size,const char *Style,bool PutIconIfNotExists);
void Log_PutFormToChangeLogo (Sco_Scope_t Scope); void Log_PutFormToChangeLogo (Sco_Scope_t Scope);
void Log_RequestLogo (Sco_Scope_t Scope); void Log_RequestLogo (Sco_Scope_t Scope);
void Log_ReceiveLogo (Sco_Scope_t Scope); void Log_ReceiveLogo (Sco_Scope_t Scope);

View File

@ -1984,7 +1984,8 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint)
if (SeeOrPrint == Pho_DEGREES_SEE) if (SeeOrPrint == Pho_DEGREES_SEE)
fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">", fprintf (Gbl.F.Out,"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">",
Deg.WWW,Deg.FullName); Deg.WWW,Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;", fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;",
Deg.ShortName); Deg.ShortName);
if (SeeOrPrint == Pho_DEGREES_SEE) if (SeeOrPrint == Pho_DEGREES_SEE)

View File

@ -1531,7 +1531,7 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat)
"<td style=\"width:%upx; text-align:left;\">", "<td style=\"width:%upx; text-align:left;\">",
Rec_DEGREE_LOGO_SIZE); Rec_DEGREE_LOGO_SIZE);
Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod, Log_DrawLogo (Sco_SCOPE_DEGREE,Gbl.CurrentDeg.Deg.DegCod,
Gbl.CurrentDeg.Deg.ShortName,Rec_DEGREE_LOGO_SIZE,NULL); Gbl.CurrentDeg.Deg.ShortName,Rec_DEGREE_LOGO_SIZE,NULL,true);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"<td class=\"%s\" style=\"text-align:center;\">" "<td class=\"%s\" style=\"text-align:center;\">"
"%s<br />%s<br />%s" "%s<br />%s<br />%s"
@ -2144,7 +2144,7 @@ void Rec_ShowCommonRecord (Rec_RecordViewType_t TypeOfView,
Ins.InsCod = UsrDat->InsCod; Ins.InsCod = UsrDat->InsCod;
Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA); Ins_GetDataOfInstitutionByCod (&Ins,Ins_GET_MINIMAL_DATA);
Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName, Log_DrawLogo (Sco_SCOPE_INSTITUTION,Ins.InsCod,Ins.ShortName,
Rec_INSTITUTION_LOGO_SIZE,NULL); Rec_INSTITUTION_LOGO_SIZE,NULL,true);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"<td class=\"%s\" style=\"text-align:left;" "<td class=\"%s\" style=\"text-align:left;"
" vertical-align:middle;\">" " vertical-align:middle;\">"

View File

@ -3487,7 +3487,8 @@ static void Sta_WriteDegree (long DegCod)
fprintf (Gbl.F.Out,"%s\">" fprintf (Gbl.F.Out,"%s\">"
"<a href=\"%s\" class=\"LOG\" target=\"_blank\">", "<a href=\"%s\" class=\"LOG\" target=\"_blank\">",
Deg.WWW,Deg.FullName); Deg.WWW,Deg.FullName);
Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,16,"vertical-align:top;"); Log_DrawLogo (Sco_SCOPE_DEGREE,Deg.DegCod,Deg.ShortName,
16,"vertical-align:top;",true);
fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;</a>", fprintf (Gbl.F.Out,"&nbsp;%s&nbsp;</a>",
Deg.ShortName); Deg.ShortName);
} }