| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | CiviCRM version 4.3 | |
| 6 | +--------------------------------------------------------------------+ |
| 7 | | Copyright CiviCRM LLC (c) 2004-2013 | |
| 8 | +--------------------------------------------------------------------+ |
| 9 | | This file is a part of CiviCRM. | |
| 10 | | | |
| 11 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 12 | | under the terms of the GNU Affero General Public License | |
| 13 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 14 | | | |
| 15 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 16 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 18 | | See the GNU Affero General Public License for more details. | |
| 19 | | | |
| 20 | | You should have received a copy of the GNU Affero General Public | |
| 21 | | License and the CiviCRM Licensing Exception along | |
| 22 | | with this program; if not, contact CiviCRM LLC | |
| 23 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 24 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 25 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 26 | +--------------------------------------------------------------------+ |
| 27 | */ |
| 28 | |
| 29 | /** |
| 30 | * |
| 31 | * @package CRM |
| 32 | * @copyright CiviCRM LLC (c) 2004-2013 |
| 33 | * $Id$ |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | require_once 'CRM/Core/Page.php'; |
| 38 | require_once 'CRM/Grant/BAO/GrantProgram.php'; |
| 39 | |
| 40 | |
| 41 | /** |
| 42 | * Page for displaying list of contribution types |
| 43 | */ |
| 44 | class CRM_Grant_Page_Payment extends CRM_Core_Page |
| 45 | { |
| 46 | |
| 47 | |
| 48 | function run( ) |
| 49 | { |
| 50 | $action = CRM_Utils_Request::retrieve('action', 'String', |
| 51 | $this, false, 0 ); |
| 52 | if ( $action & CRM_Core_Action::VIEW ) { |
| 53 | $this->view( $action ); |
| 54 | } elseif ( $action & ( CRM_Core_Action::STOP) ) { |
| 55 | $this->stop( $action ); |
| 56 | } elseif ( $action & ( CRM_Core_Action::REPRINT ) ) { |
| 57 | $this->reprint( $action ); |
| 58 | } else { |
| 59 | $this->withdraw( $action ); |
| 60 | } |
| 61 | $this->assign('action', $action); |
| 62 | return parent::run( ); |
| 63 | } |
| 64 | |
| 65 | |
| 66 | function view( $action ) |
| 67 | { |
| 68 | $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); |
| 69 | $controller->setEmbedded( true ); |
| 70 | $result = $controller->process(); |
| 71 | $result = $controller->run(); |
| 72 | } |
| 73 | |
| 74 | function stop( $action ) |
| 75 | { |
| 76 | $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); |
| 77 | $controller->setEmbedded( true ); |
| 78 | $result = $controller->process(); |
| 79 | $result = $controller->run(); |
| 80 | } |
| 81 | |
| 82 | function reprint( $action ) |
| 83 | { |
| 84 | $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); |
| 85 | $controller->setEmbedded( true ); |
| 86 | $result = $controller->process(); |
| 87 | $result = $controller->run(); |
| 88 | } |
| 89 | |
| 90 | function withdraw( $action ) |
| 91 | { |
| 92 | $controller = new CRM_Core_Controller_Simple( 'CRM_Grant_Form_Payment_View', ts(''), $action ); |
| 93 | $controller->setEmbedded( true ); |
| 94 | $result = $controller->process(); |
| 95 | $result = $controller->run(); |
| 96 | } |
| 97 | } |