<?php
/*
 * fred-updates.php
 */ 
 
 /*** UPDATE STUFF BELOW! *****/

//SCHEDULE STUFF
$nextServiceDate = "Wed. August 10, 2016";		// Put When the service is to be
$nextServiceWeek = "August 07 - August 13";		// What week the service falls on
//List out the schedule
$nextServiceWeekSchedule = "
				<li><b>Saturday</b> 7 PM - Worship service</li>
				<li><b>Tuesday</b> 7 PM - Prayer</li>
				<li><b>Wednesday</b> 8 PM - Renewal of Vows for the Otter Family</li>
				<li><b>Thursday</b> 7 PM - Bible Study</li>
				<li><b>Saturday</b> 7 PM - Worship service</li>
				";
				
// SERMON STUFF		
$nextServiceBulletin = "02031"; 						// This changes the image number in the bulletin image archive!
$featuredServiceHymn = ""; 	//What's the title of the hymn? Make sure not to break any quotes by using a backslash! /
$featuredServiceHymnNo = "";					// Corresponding number of that hymn
$nextSermonTitle = "";						// What the sermon is titled
$servicePassage = "";							// What Bible passage is used
$invocationBy = "";				// If picked, who's doing the invocation
$benedictionBy = "";			// If picked, who's doing the benediction
$announcementsEtc = "";			// If picked, Who's doing the announcements
$prayerBy = "Elders";			// Who's participating in the prayer time
$praiseBy = "Congregation";		// Who's  participating in the praise time


// CORKBOARD TEXT
$corkboardText = "No new information as of yet! Stay tuned!";



/* END UPDATES */
/* BEGIN FUNCTIONS */
 
 
 
 function DisplayBulletinPrev($nextServiceBulletin,$bulletinFolder){
	if ($BulletinNumber == NAN ||  $nextServiceBulletin < 1 )
	{
		$filename_fixed = FindImg($bulletinFolder, $BulletinFilename);
		if (!$filename_fixed){
			 echo "<br/><span class=\"err\">Error: \"" . $nextServiceBulletin . "\" is not a valid image number.</span>"; //Display an error if not a number AND couldn't find the image.
		}
		else
		{
			echo "<img src=\"" . $bulletinFolder . $filename_fixed . "\" alt=\"Go to Bulletin\" border=\"1\" class=\"bulletinprev\" />"; //display the image
		}
	}
	else {
	 $BulletinFilename = "bulletin" . add_leading_zeros($nextServiceBulletin,4); //assemble the name of the file, and correct for leading zeros
 	 $filename_fixed = FindImg($bulletinFolder, $BulletinFilename);							//look for the file and attach the found extention.
	 if (!$filename_fixed){
		echo "<span class=\"err\">Error: Could not find image \"" . $BulletinFilename .  "\"!</span>";	//display and exit if the image can't be found
		return false;
	}
	 echo "<img src=\"" . $bulletinFolder . $filename_fixed . "\" alt=\"Go to Bulletin\" border=\"1\" class=\"bulletinprev\" />"; //display the image
	}
}//Endfn
 function DisplayBulletin($nextServiceBulletin,$bulletinFolder){
	if ($BulletinNumber == NAN ||  $nextServiceBulletin < 1 )
	 echo "<br/><span class=\"err\">Error: \"" . $nextServiceBulletin . "\" is not a valid image number.</span>"; //Display an error if the number is bad
	else {
	 $BulletinFilename = "bulletin" . add_leading_zeros($nextServiceBulletin,4); //assemble the name of the file, and correct for leading zeros
 	 $filename_fixed = FindImg($bulletinFolder, $BulletinFilename);							//look for the file and attach the found extention.
	 if (!$filename_fixed){
		echo "<span class=\"err\">Error: Could not find image \"" . $BulletinFilename .  "\"!</span>";	//display and exit if the image can't be found
		return false;
	}
	 echo "<img src=\"" . $bulletinFolder . $filename_fixed . "\" alt=\"Go to Bulletin\" border=\"1\" class=\"bulletinImg\" />"; //display the image
	}
}//Endfn
$bulletinFolder = "./bulletins/archive/";



			
			
			
?>
