| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
// $Id: fee.module,v 1.1.2.1 2007/09/17 02:17:59 kbahey Exp $ |
// $Id: fee.module,v 1.1.2.2 2007/09/17 13:52:07 kbahey Exp $ |
| 4 |
|
|
| 5 |
// Variables |
// Variables |
| 6 |
define('FEE_EMAIL', 'fee_email'); |
define('FEE_EMAIL', 'fee_email'); |
| 49 |
} |
} |
| 50 |
|
|
| 51 |
function fee_perm() { |
function fee_perm() { |
| 52 |
return array('administer fees', 'view receipt', 'pay fee'); |
return array('administer fees', 'view receipt', 'pay fee', 'view fee list'); |
| 53 |
} |
} |
| 54 |
|
|
| 55 |
function fee_settings() { |
function fee_settings() { |
| 94 |
|
|
| 95 |
function fee_init() { |
function fee_init() { |
| 96 |
static $pass = FALSE; |
static $pass = FALSE; |
| 97 |
if (!$pass && !fee_check_fee()) { |
if (user_access('pay fee') && !$pass && !fee_check_fee()) { |
| 98 |
// If you are having a problem where the message below appears twice, and you find the |
// If you are having a problem where the message below appears twice, and you find the |
| 99 |
// message in the session column of the sessions table, then uncomment the line below. |
// message in the session column of the sessions table, then uncomment the line below. |
| 100 |
// unset ($_SESSION['messages']['error']); |
// unset ($_SESSION['messages']['error']); |
| 145 |
$items = array(); |
$items = array(); |
| 146 |
|
|
| 147 |
if ($may_cache) { |
if ($may_cache) { |
| 148 |
$access = user_access('administer site configuration'); |
$access = user_access('administer fees'); |
| 149 |
|
|
| 150 |
$items[] = array( |
$items[] = array( |
| 151 |
'path' => 'ipn/fee', |
'path' => 'ipn/fee', |
| 211 |
$items[] = array( |
$items[] = array( |
| 212 |
'path' => 'fees', |
'path' => 'fees', |
| 213 |
'title' => t('Fees'), |
'title' => t('Fees'), |
| 214 |
'access' => TRUE, |
'access' => user_access('view files'), |
| 215 |
'callback' => 'fee_public_page', |
'callback' => 'fee_public_page', |
| 216 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 217 |
); |
); |
| 225 |
$items[] = array( |
$items[] = array( |
| 226 |
'path' => 'fee/thanks', |
'path' => 'fee/thanks', |
| 227 |
'title' => t('Thanks'), |
'title' => t('Thanks'), |
| 228 |
'access' => TRUE, |
'access' => user_access('pay fee'), |
| 229 |
'callback' => 'fee_thanks', |
'callback' => 'fee_thanks', |
| 230 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 231 |
); |
); |