Esempio n. 1
0
 /**
  * Class constructor
  *
  * @param string $accountId If null, the current account ID is used
  * @param string $accountType If null, the current account type is used
  * @return OA_Central_M2M
  */
 function OA_Central_M2M($accountId = null)
 {
     parent::OA_Central_Common();
     $currentId = OA_Permission::getAccountId();
     if (is_null($accountId)) {
         $this->accountId = $currentId;
     } else {
         $this->accountId = $accountId;
     }
     if ($this->accountId == $currentId) {
         $this->accountType = OA_Permission::getAccountType();
     } else {
         $doAccounts = OA_Dal::factoryDO('accounts');
         $doAccounts->account_id = $this->accountId;
         $doAccounts->find();
         if ($doAccounts->fetch()) {
             $this->accountType = $doAccounts->account_type;
         } else {
             Max::raiseError('Unexisting account ID', null, PEAR_ERROR_DIE);
         }
     }
     if ($this->accountType == OA_ACCOUNT_ADMIN) {
         $this->accountId = 0;
     }
 }
Esempio n. 2
0
 function _function_oac_captcha()
 {
     require_once MAX_PATH . '/lib/OA/Central/Common.php';
     return OA_Central_Common::getCaptchaUrl();
 }
Esempio n. 3
0
 /**
  * Class constructor
  *
  * @return OA_Central_AdNetworks
  */
 function OA_Central_AdNetworks()
 {
     parent::OA_Central_Common();
     $this->oDal = new OA_Dal_Central_AdNetworks();
 }