paristemi
[ class tree: paristemi ] [ index: paristemi ] [ all elements ]

Source for file support.php

Documentation is available at support.php

  1. <?php
  2. /**
  3. * <b>Support</b><br />
  4. * The support section gives a pre-PayPal form for information from the user to support the organization.
  5. * @author Kristen O'Brien <kristen_paristemi-com>
  6. * @copyright Copyright 2004, Kristen O'Brien
  7. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  8. * @link http://www.paristemi.com Paristemi Main Site
  9. * @package paristemi
  10. * @subpackage paristemi_business_logic
  11. * @since Build 0.5
  12. * @version Build 0.7
  13. * @filesource
  14. */
  15. /**
  16. * Include the constants file and all of the files in the include list
  17. */
  18. if(ltrim(dirname($_SERVER['SCRIPT_FILENAME'])) == "" || !file_exists($_SERVER['DOCUMENT_ROOT']."/constants.php")) {
  19. if(!file_exists("../constants.php")) { require_once("../public_html/constants.php"); }
  20. else { require_once("../constants.php"); }
  21. }
  22. else { require_once($_SERVER['DOCUMENT_ROOT']."/constants.php"); }
  23. foreach($INCLUDE_LIST as $includefile) { require_once $includefile; }
  24.  
  25. $db = new Database();
  26. $smarty = UtilSmarty::createSmarty();
  27.  
  28. require_once $HTTP_DOCUMENT_ROOT.$INCLUDE_PATH.$HEADER.
  29. "?pagetitle=".str_replace(" ","%20",htmlentities($S_SUPPORT)).
  30. "&pagedesc=".str_replace(" ","%20",htmlentities($CHURCH_NAME." ".$S_DESC_SUPPORT));
  31. $smarty->assign('textsections',array(array('Title'=>$S_CHURCH." ".$S_OFFICE,'Text'=>$CONTACT_INFO)));
  32. $smarty->assign('heading',$S_SUPPORT." ".$CHURCH_NAME);
  33. if($HTTP_GET_VARS) {
  34. $action="";
  35. if(isset($HTTP_GET_VARS['action'])) {$action = $HTTP_GET_VARS['action'];}
  36. if($action == "success") {
  37. $smarty->assign('notice',$SUPPORT_SUCCESS_TEXT);
  38. $smarty->assign('returnlink',array('LinkPath'=>$HTTP_DOCUMENT_ROOT,'LinkText'=>$S_RETURN_SITE));
  39. }
  40. else if($action == "cancel") {
  41. $smarty->assign('notice',$SUPPORT_CANCEL_TEXT);
  42. $smarty->assign('returnlink',array('LinkPath'=>$HTTP_DOCUMENT_ROOT,'LinkText'=>$S_RETURN_SITE));
  43. }
  44. else if($action == "form") {
  45. $smarty->assign('text',UtilHtml::createPayPalForm($PAY_PAL_ITEM_NAME,0,$PAY_PAL_ITEM_NUMBER,$PAY_PAL_DONATION_NOTE,
  46. $HTTP_DOCUMENT_ROOT.$SUPPORT_FILE."?action=success",
  47. $HTTP_DOCUMENT_ROOT.$SUPPORT_FILE."?action=cancel",
  48. $PAY_PAL_LANG_COUNTRY,1));
  49. }
  50. }
  51. else {
  52. $smarty->assign('text',UtilBible::ParseVerses($SUPPORT_INTRO));
  53. $smarty->assign('bottomlinks',array(array('LinkPath'=>$HTTP_DOCUMENT_ROOT.$SUPPORT_FILE.
  54. "?action=form",'LinkText'=>$S_CLICK_CONTINUE)));
  55. }
  56. UtilSmarty::displaySectionPage($smarty);
  57. ?>
  58. <?php require_once $SERVER_DIRECTORY.$INCLUDE_PATH.$FOOTER; ?>

Documentation generated on Mon, 10 May 2004 12:11:00 -0700 by phpDocumentor 1.3.0RC3