function getCookieDomain() { $domain = parse_url_compat(URL, PHP_URL_PATH); $domain = '/' . trim($domain, '/'); return $domain; }
function __construct() { $this->constructRun = true; $database = JFactory::getDBO(); $mainframe = JFactory::getApplication(); global $mosConfig_dbprefix; $sql = "select value from #__" . "docmanpaypalconfig where name = 'live_site' limit 1"; $live_site = $this->singleResult($sql); //echo "MY SITE IS: $live_site"; $this->mydomain = parse_url_compat($live_site, PHP_URL_HOST); $this->mydomain = str_replace('www.', '', strtolower($this->mydomain)); $this->hasLicense = true; $this->docman_path = JPATH_SITE . '/' . docmanpaypal::singleResult('select path from #__files_containers where slug = \'docman-files\' limit 1'); $this->cfg = $this->getConfig(); $this->isTrial = 0; /* $installDate = base64_decode(file_get_contents(JPATH_SITE . DS . 'libraries' . DS . 'dtd.xml')); $expDate = strtotime("+2 weeks",strtotime($installDate)); if (time() > $expDate && $this->isTrial) { $this->expired = 1; } else { $this->expired = 0; }*/ }