function __construct(&$db, $prod = false) { parent::__construct($db); $this->activity_date = date('d-M-Y H:i:s'); $this->entry_date = date('d-M-Y H:i:s'); $this->effective_date = date('d-M-Y'); $this->trans_date = date('d-M-Y'); $this->prod = $prod; $this->pass_phrase = $this->prod ? $this->_prod_pass_phrase : $this->_test_pass_phrase; $this->directory = $this->base_dir . '/' . ($this->prod ? 'prod' : 'test'); $this->user = $_SESSION['username'] ? $_SESSION['username'] : '******'; }
/** *__construct * *contructs the information required for this class to interact with the db and other informational servers * *@param string $db *@param mixed $prod *@param string $type */ function __construct(&$db, $prod = false, $type = 'commerce_manager') { parent::__construct($db); if ($prod) { $this->shared_secret = $this->db->GetOne("SELECT gxvsecr_code FROM gxvsecr WHERE gxvsecr_status_ind IS NULL"); $this->base_url = $this->_prod_base_url; } else { $this->shared_secret = $this->db->GetOne("SELECT gxvsecr_code FROM gxvsecr WHERE gxvsecr_status_ind = 'D'"); $this->base_url = $this->_test_base_url; } //end else $this->base_url = str_replace('{TYPE}', $type, $this->base_url); $this->init(); }