- <?php
- /**
- * <b>About Section</b><br />
- * The about section lists the mission statement, minitries, and main contacts.
- * @author Kristen O'Brien <kristen_paristemi-com>
- * @copyright Copyright 2004, Kristen O'Brien
- * @license http://opensource.org/licenses/gpl-license.php GNU Public License
- * @link http://www.paristemi.com Paristemi Main Site
- * @package paristemi
- * @subpackage paristemi_business_logic
- * @since Build 0.3
- * @version Build 0.7
- * @filesource
- */
- /**
- * Include the constants file and all of the files in the include list
- */
- if(ltrim(dirname($_SERVER['SCRIPT_FILENAME'])) == "" || !file_exists($_SERVER['DOCUMENT_ROOT']."/constants.php")) {
- if(!file_exists("../constants.php")) { require_once("../public_html/constants.php"); }
- else { require_once("../constants.php"); }
- }
- else { require_once($_SERVER['DOCUMENT_ROOT']."/constants.php"); }
- foreach($INCLUDE_LIST as $includefile) { require_once $includefile; }
- require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$CONTACT_INCLUDE;
-
- $db = new Database();
- $db_about = $db->GetClass('about');
- $db_multimedia = $db->GetClass('multimedia');
- $db_contact = $db->GetClass('contact');
- $data =& $db_about->GetAllMinistries();
- $smarty = UtilSmarty::createSmarty();
-
- $id = ""; $con = ""; $pagesubtitle = ""; $value = "";
- if(getenv("QUERY_STRING")) {
- if(isset( $HTTP_GET_VARS['id'])) { $id = $HTTP_GET_VARS['id']; }
- if(isset( $HTTP_GET_VARS['contact'])) { $con = $HTTP_GET_VARS['contact']; }
- if($id != null && $con != "yes") { $value =& $db_about->GetMinistryData($id); $pagesubtitle = $value->Title; }
- if($id != null && $con == "yes") { $value =& $db_contact->GetContactData($id);
- $full_name = "";
- if($value->ShowMainTitle) { $full_name .= $value->Title; }
- if($value->ShowMainFirstName) { $full_name .= " ".$value->First; }
- if($value->Middle != null) { $full_name .= " ".$value->Middle; }
- if($value->ShowMainLastName) { $full_name .= " ".$value->Last; }
- $pagesubtitle = $full_name;
- }
- }
-
- require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
- "?pagetitle=".str_replace(" ","%20",htmlentities($S_ABOUT))."&pagesubtitle=".str_replace(" ","%20",htmlentities($pagesubtitle)).
- "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_ABOUT));
-
- $sidesections = array();
- $sidesection = array();
- $sidesection['Title'] = $S_MINISTRY;
- $sidesection['Links'] = array();
- foreach ($data as $value) {
- $sidesection['Links'][] = array(
- 'LinkPath' => $GLOBALS['HTTP_DOCUMENT_ROOT'].$GLOBALS['MINISTRY_DIR'].
- $GLOBALS['MINISTRY_FILE']."?id=".$value->ID,
- 'LinkText' => $value->Title);
- }
- $sidesections[] = $sidesection;
-
- $con_inc = new Contact();
- $sidesections[] = $con_inc->conSmallHeader("min");
-
- $smarty->assign('sidesections',$sidesections);
-
- $smarty->assign('textsections',array(array('Title'=>$S_OFFICE,'Text'=>$CONTACT_INFO)));
-
- $smarty->assign('icondescriptions',
- array(array('src' => $HTTP_DOCUMENT_ROOT.$IMAGE_PATH.$PDF_IMG,
- 'alt' => 'PDF', 'desc' => 'PDF')));
-
- $data =& $db_about->GetAllMinistries();
- if($data != null) {
- if(getenv("QUERY_STRING")) {
- if($id != null && $con != "yes") {
- $value =& $db_about->GetMinistryData($id);
- $tblarr = array();
- $tblclass = "tbl-listing";
- $tblheader = "<h2>".$value->Title."</h2>";
- $tbltdclass = array("tbl-listing-title-lined","tbl-listing-item-lined");
- array_push($tblarr,array($S_DESC,stripslashes($value->Description)));
- if($value->Services != null) {
- array_push($tblarr,array($S_SERVICES,stripslashes($value->Services)));
- }
- if($value->Notes != null) {
- array_push($tblarr,array($S_NOTES,stripslashes($value->Notes)));
- }
- array_push($tblarr,array($S_CONTACT,"<a href=\"".$GLOBALS['HTTP_DOCUMENT_ROOT'].
- $GLOBALS['CONTACT_FORM']."?id=".$value->CID."\">".
- UtilFiles::createImageText($value->CID,'contact')."</a>"));
- $smarty->assign('printtable',UtilHtml::createTable($tblarr,$tblheader,$tblclass,"","",$tbltdclass));
- }
- if($id != null && $con == "yes") {
- $smarty->assign('printtable',$con_inc->ContactData($id));
- }
-
- }
- else {
- $smarty->assign('introstatements',array(
- array('Title'=>$S_ABOUT." ".$CHURCH_NAME,
- 'Text'=>$ABOUT_CHURCH),
- array('Title'=>$S_MISSION,
- 'Text'=>$MISSION_STATEMENT)));
- }
- }
- else { $smarty->assign('notice',$N_MINISTRY_NONE); }
-
- $smarty->assign('bottomnote',$S_FREE_PDF.
- '<a href="http://www.adobe.com/products/acrobat/readstep2.html">Adobe</a>.');
-
- UtilSmarty::displaySectionPage($smarty);
- ?>
- <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>