<?php
# Define a message which is to appear at the top of any wiki.
#
# How it works:
#  1. below is a table $sitemsg which has entries for "all" (meaning all wikis and specific ones
#  2. specific entries have precedence over the "all" entry
#  3. if a message is empty, nothing will be shows, so this is the way to suppress any site message
#
#  Not yet implemented: the icon is set gloablly and cannot be specific for a wiki.
#
# You don't know the actual site name? Uncomment following line and do a "show source" in the browser.
# Don't forget to comment again as otherwise no correct HTML will be generated.
#echo "<!-- wgSitename=$wgSitename -->";

#----------------------------------------------------------------
# Some messages we had in the past
#----------------------------------------------------------------

$msg1 = '<b>Please note:</b> this wiki will be moved to a new server on <b>xx-March-14</b>.<br> During this process pages will not be editable and short interruptions of service may occur. If you need help contact [mailto:ralf.schaefer@siemens.com Ralf Schaefer].';

$msg2 = '<b>Please note:</b> this wiki has been moved to a new server and operating system. If you encounter any problems please send a notification to [mailto:ralf.schaefer@siemens.com Ralf Schaefer].';


$msg3 = 'The Kaiserslautern servers will undergo some maintenance. Although this wiki is not directly involved, some services will be limited or not available during this time. Planned timeframe is <b>Wednesday, 28. May, 16:00 - Monday, 2. June, 08:00 CET</b>. ';


$msg4 = 'Links to windows shares? See [[farm:Links to Windows shares|here]] for details!';


$msg5 = 'The infoserver (and therefore also <b>this wiki</b>) will not be available in the timeframe <b>Thursday, 26. October, 12:00 - 12:30 CET</b> due to maintenance work. ';

$msg6 ='Currently no login possible - we are working on it';

$msg7 = 'The infoserver (and therefore also <b>this wiki</b>) will undergo some maintenance activities and will occasionally not be reachable in the timeframe of <b>Monday, 5. February, 12:00 - 13:00 CET</b>. ';


#----------------------------------------------------------------
# Here we define the actual message
# - empty message -> nothing shown
# - "all" -> for all wikis unless there is a specific entry
#----------------------------------------------------------------


$sitemsg['all'] = $msg7;
$sitemsg['all'] = ''; # put this line into comments to show a sitemsg
$sitemsg['Farm'] = ''; # The Farm never has Site Messages

$msgAbandonned =  'This wiki is abandonned and will be deleted soon. Contact ralf.schaefer@siemens.com for help';
$sitemsg['TLWiki'] = 'This wiki was moved to confluence and cannot be edited anymore. See here: https://stswiki.net.plm.eds.com/display/TLWIKI';
$sitemsg['TWWiki'] = 'This wiki was moved to confluence and cannot be edited anymore. See here: https://stswiki.net.plm.eds.com/display/TWWIKI';
$sitemsg['G2Mwiki'] = $msgAbandonned; # RSC, 21-nov-2021
$sitemsg['CSwiki'] = $msgAbandonned; # RSC, 21-nov-2021
$sitemsg['systemsynthesiswiki'] = $msgAbandonned; # RSC, 21-nov-2021
#$sitemsg['LMSCorporate'] = $msgAbandonned; # RSC, 21-nov-2021 # RSC, 22-feb-22 still active, ask Peter Schaldenbrand

#echo "<pre>wgSitename=$wgSitename\n";

#----------------------------------------------------------------
# Nothing to be confugured below thsi point
#----------------------------------------------------------------


###------------ colors and borders -----------

$bgcolor = '#ffff80';	# light yellow
$bgcolor = '#ffffc0';	# light yellow
$bgcolor = 'Yellow';


###------------ icon -----------

$icon = '20px_lightbulb.png';
$icon = '20px-Attention.png';


#-----------------------------------------------------------------
# create message

$msg = $sitemsg['all'];
if (isset($sitemsg[$wgSitename]))
	$msg = $sitemsg[$wgSitename];


if ( $msg != '')
{
	$wgSiteNotice = "<table width='99%' rules='none' ".
		"bgcolor='$bgcolor' ".
		"cellpadding='1'><tr>".
		"<td> {{SERVER}}/${icon} </td>" .
		"<td  align='left' valign='middle'>$msg</td>".
		"</tr></table> ";
}

?>
