Cheetah
All Classes Namespaces Files Functions Variables Pages
ChMbpConfig.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbConfig');
9 
10 class ChMbpConfig extends ChWsbConfig
11 {
12  var $_oDb;
19 
24 
29  {
30  parent::__construct($aModule);
31 
32  $this->_oDb = null;
33  $this->_bDisableFreeJoin = false;
34  $this->_bEnableStandardOnPaidJoin = true;
35  $this->_bEnableCaptchaOnPaidJoin = true;
36  $this->_sIconsFolder = 'media/images/membership/';
37 
38  $this->_aJsClasses = array(
39  'join' => 'ChMbpJoin',
40  );
41  $this->_aJsObjects = array(
42  'join' => 'oMbpJoin',
43  );
44 
45  $this->_sAnimationEffect = 'fade';
46  $this->_iAnimationSpeed = 'slow';
47  }
48  function init(&$oDb)
49  {
50  $this->_oDb = &$oDb;
51 
52  $this->_bDisableFreeJoin = $this->_oDb->getParam('mbp_disable_free_join') == 'on';
53  $this->_bEnableStandardOnPaidJoin = $this->_oDb->getParam('mbp_enable_standard_for_paid_join') == 'on';
54  $this->_bEnableCaptchaOnPaidJoin = $this->_oDb->getParam('mbp_enable_captcha_for_paid_join') == 'on';
55 
56  ch_import('ChWsbPayments');
57  $oPayment = ChWsbPayments::getInstance();
58 
59  $this->_sCurrencySign = $oPayment->getOption('default_currency_sign');
60  $this->_sCurrencyCode = $oPayment->getOption('default_currency_code');
61  }
62 
63  function isDisableFreeJoin()
64  {
66  }
68  {
70  }
72  {
74  }
75  function getCurrencySign()
76  {
77  return $this->_sCurrencySign;
78  }
79  function getCurrencyCode()
80  {
81  return $this->_sCurrencyCode;
82  }
83  function getIconsUrl()
84  {
85  return CH_WSB_URL_ROOT . $this->_sIconsFolder;
86  }
87  function getIconsPath()
88  {
89  return CH_DIRECTORY_PATH_ROOT . $this->_sIconsFolder;
90  }
91  function getJsClass($sType = '')
92  {
93  if(empty($sType))
94  return $this->_aJsClasses;
95 
96  return isset($this->_aJsClasses[$sType]) ? $this->_aJsClasses[$sType] : '';
97  }
98  function getJsObject($sType = '')
99  {
100  if(empty($sType))
101  return $this->_aJsClasses;
102 
103  return isset($this->_aJsObjects[$sType]) ? $this->_aJsObjects[$sType] : '';
104  }
106  {
108  }
109  function getAnimationSpeed()
110  {
112  }
114  {
115  return MEMBERSHIP_ID_STANDARD;
116  }
117 }
ChMbpConfig\getCurrencyCode
getCurrencyCode()
Definition: ChMbpConfig.php:79
ChMbpConfig\getJsClass
getJsClass($sType='')
Definition: ChMbpConfig.php:91
ChMbpConfig\$_sAnimationEffect
$_sAnimationEffect
Definition: ChMbpConfig.php:22
ChMbpConfig\$_bEnableCaptchaOnPaidJoin
$_bEnableCaptchaOnPaidJoin
Definition: ChMbpConfig.php:15
ChMbpConfig\getAnimationSpeed
getAnimationSpeed()
Definition: ChMbpConfig.php:109
ChMbpConfig\__construct
__construct($aModule)
Definition: ChMbpConfig.php:28
ChMbpConfig\getCurrencySign
getCurrencySign()
Definition: ChMbpConfig.php:75
$aModule
$aModule
Definition: classifieds.php:21
ChMbpConfig\$_bDisableFreeJoin
$_bDisableFreeJoin
Definition: ChMbpConfig.php:13
ChMbpConfig\$_sCurrencySign
$_sCurrencySign
Definition: ChMbpConfig.php:16
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
ChMbpConfig\getIconsPath
getIconsPath()
Definition: ChMbpConfig.php:87
php
ChMbpConfig\getAnimationEffect
getAnimationEffect()
Definition: ChMbpConfig.php:105
MEMBERSHIP_ID_STANDARD
const MEMBERSHIP_ID_STANDARD
Definition: membership_levels.inc.php:49
ChMbpConfig\init
init(&$oDb)
Definition: ChMbpConfig.php:48
ChMbpConfig\getStandardDescriptor
getStandardDescriptor()
Definition: ChMbpConfig.php:113
ChMbpConfig\$_aJsClasses
$_aJsClasses
Definition: ChMbpConfig.php:20
ChWsbPayments\getInstance
static getInstance()
Definition: ChWsbPayments.php:31
$sType
$sType
Definition: actions.inc.php:11
ChMbpConfig\$_bEnableStandardOnPaidJoin
$_bEnableStandardOnPaidJoin
Definition: ChMbpConfig.php:14
ChMbpConfig
Definition: ChMbpConfig.php:11
ChMbpConfig\isCaptchaOnPaidJoin
isCaptchaOnPaidJoin()
Definition: ChMbpConfig.php:71
ChMbpConfig\$_iAnimationSpeed
$_iAnimationSpeed
Definition: ChMbpConfig.php:23
$oDb
global $oDb
Definition: db.inc.php:39
ChMbpConfig\getJsObject
getJsObject($sType='')
Definition: ChMbpConfig.php:98
ChMbpConfig\getIconsUrl
getIconsUrl()
Definition: ChMbpConfig.php:83
ChWsbConfig
Definition: ChWsbConfig.php:38
ChMbpConfig\$_sIconsFolder
$_sIconsFolder
Definition: ChMbpConfig.php:18
ChMbpConfig\$_oDb
$_oDb
Definition: ChMbpConfig.php:12
ChMbpConfig\isDisableFreeJoin
isDisableFreeJoin()
Definition: ChMbpConfig.php:63
ChMbpConfig\isStandardOnPaidJoin
isStandardOnPaidJoin()
Definition: ChMbpConfig.php:67
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChMbpConfig\$_aJsObjects
$_aJsObjects
Definition: ChMbpConfig.php:21
ChMbpConfig\$_sCurrencyCode
$_sCurrencyCode
Definition: ChMbpConfig.php:17