- <?php
- /**
- * <b>Support</b><br />
- * The support section gives a pre-PayPal form for information from the user to support the organization.
- * @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.5
- * @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; }
-
- $db = new Database();
- $smarty = UtilSmarty::createSmarty();
-
- require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
- "?pagetitle=".str_replace(" ","%20",htmlentities($S_SUPPORT)).
- "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_SUPPORT));
-
- $smarty->assign('textsections',array(array('Title'=>$S_CHURCH." ".$S_OFFICE,'Text'=>$CONTACT_INFO)));
-
- $smarty->assign('heading',$S_SUPPORT." ".$CHURCH_NAME);
-
- if($HTTP_GET_VARS) {
- $action="";
- if(isset($HTTP_GET_VARS['action'])) {$action = $HTTP_GET_VARS['action'];}
- if($action == "success") {
- $smarty->assign('notice',$SUPPORT_SUCCESS_TEXT);
- $smarty->assign('returnlink',array('LinkPath'=>$HTTP_DOCUMENT_ROOT,'LinkText'=>$S_RETURN_SITE));
- }
- else if($action == "cancel") {
- $smarty->assign('notice',$SUPPORT_CANCEL_TEXT);
- $smarty->assign('returnlink',array('LinkPath'=>$HTTP_DOCUMENT_ROOT,'LinkText'=>$S_RETURN_SITE));
- }
- else if($action == "form") {
- $smarty->assign('text',UtilHtml::createPayPalForm($PAY_PAL_ITEM_NAME,0,$PAY_PAL_ITEM_NUMBER,$PAY_PAL_DONATION_NOTE,
- $HTTP_DOCUMENT_ROOT.$SUPPORT_FILE."?action=success",
- $HTTP_DOCUMENT_ROOT.$SUPPORT_FILE."?action=cancel",
- $PAY_PAL_LANG_COUNTRY,1));
- }
- }
- else {
- $smarty->assign('text',UtilBible::ParseVerses($SUPPORT_INTRO));
- $smarty->assign('bottomlinks',array(array('LinkPath'=>$HTTP_DOCUMENT_ROOT.$SUPPORT_FILE.
- "?action=form",'LinkText'=>$S_CLICK_CONTINUE)));
- }
- UtilSmarty::displaySectionPage($smarty);
- ?>
- <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>