params= new JRegistry(); $this->params->loadString($plugin->params, 'JSON'); $this->_cacheEnabled = $this->params->get('cache_enabled'); if ($this->_cacheEnabled === null) $this->_cacheEnabled == 1; $this->_autoflush = $this->params->get('autoFlush'); if ($this->_autoflush === null) $this->_autoflush = 1; $this->_autoflush3rdParty = $this->params->get('autoFlush-ThirdParty'); if ($this->_autoflush3rdParty === null) $this->_autoflush3rdParty = 1; $this->_autoflushClientSide = $this->params->get('autoFlush-ClientSide'); if ($this->_autoflushClientSide === null) $this->_autoflushClientSide = 0; } /** * Heartbeat cache checking function. Will also monitor $_GET for the jSGCache parameter * (pressing the purge cache button in admin) * * * @access public * @return null */ public function onAfterInitialise() { if (!$this->_cacheEnabled || $this->_isBlacklisted($this->_applicationPath)) { JResponse::setHeader('X-Cache-Enabled','False',true); return; } if ($this->_cacheEnabled) { JResponse::setHeader('X-Cache-Enabled','True',true); } //Init the application url $this->_applicationPath = str_replace(array('administrator/index.php','index.php'),'',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME'])); //Check for any admin action and proceed to flushMonitor and 3rd party plugins if ( isset($_POST['task']) || isset($_GET['task']) || isset($_GET['cart_virtuemart_product_id'])) { $this->_flushMonitor(); if ($this->_autoflush3rdParty) $this->_monitorThirdPartyPlugins(); } //Check if we have a logged in user and enable cache bypass cookie 'task' => string 'user.login' $user = JFactory::getUser(); if (!$user->guest || (isset($_POST['task']) && preg_match('/login/i', $_POST['task']))) { $_POST[JSession::getFormToken()] = 1; //Force the correct token, since the login box on the page is cached with the 1st visitors' token //Enable the cache bypass for logged users by setting a cache bypass cookie setcookie('jSGCacheBypass',1,time() + 6000,'/'); } if ($user->guest || (isset($_POST['task']) && $_POST['task'] == 'user.logout')) { //Remove the bypass cookie if not a logged user if (isset($_COOKIE['jSGCacheBypass'])) setcookie('jSGCacheBypass',0, time() - 3600,'/'); } // Handle purge button press when get has jSGCache=purge, but only in admin with a logged user if(isset($_GET['jSGCache']) && $_GET['jSGCache'] == 'purge' && JFactory::getApplication()->isAdmin() && !$user->guest ) $this->_purgeCache(true); } /** * Admin panel icon display * * @access public * @param string $context * @return array */ public function onGetIcons( $context ) { return array(array( 'link'=>'?jSGCache=purge', 'image'=>'header/icon-48-purge.png', 'text'=>JText::_('Purge jSGCache'), 'id'=>'jSGCache' )); } /** * Calls the cache server to purge the cache * * @access public * @param string|bool $message Message to be displayed if purge is successful. If this param is false no output would be done * @return null */ private function _purgeCache( $message = true ) { $purgeRequest = $this->_applicationPath . '(.*)'; // Check if caching server is varnish or nginx. $sgcache_ip = '/etc/sgcache_ip'; $hostname = $_SERVER['SERVER_ADDR']; $purge_method = "PURGE"; if (file_exists($sgcache_ip)) { $hostname = trim( file_get_contents( $sgcache_ip, true ) ); $purge_method = "BAN"; } $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); if(!$cacheServerSocket) { JError::raise(E_ERROR,500,JText::_('Connection to cache server failed!')); JError::raise(E_ERROR,500,JText::_($errstr ($errno))); return; } $request = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; if (preg_match('/^www\./',$_SERVER['SERVER_NAME'])) { $domain_no_www = preg_replace('/^www\./', '', $_SERVER['SERVER_NAME']); $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: {$domain_no_www}\r\nConnection: Close\r\n\r\n"; } else $request2 = "$purge_method {$purgeRequest} HTTP/1.0\r\nHost: www.{$_SERVER['SERVER_NAME']}\r\nConnection: Close\r\n\r\n"; fwrite($cacheServerSocket, $request); $response = fgets($cacheServerSocket); fclose($cacheServerSocket); $cacheServerSocket = fsockopen($hostname, 80, $errno, $errstr, 2); fwrite($cacheServerSocket, $request2); fclose($cacheServerSocket); if($message !== false) { if(preg_match('/200/',$response)) { if ($message === true) JFactory::getApplication()->enqueueMessage(JText::_('SG Cache Successfully Purged!')); else JFactory::getApplication()->enqueueMessage(JText::_( $message )); } else { JError::raise(E_NOTICE,501, JText::_('SG Cache: Purge was not successful!')); JError::raise(E_NOTICE,501, jText::_('Error: ' . $response)); } } } /** * Check if url is in caching blacklist * * @param string $applicationPath * * @return bool */ private function _isBlacklisted($applicationPath) { $blacklistArray = explode("\n",$this->params->get('blacklist')); $blacklistRegexArray = array(); $indexIsBlacklisted = false; foreach($blacklistArray as $key=>$row) { $row = trim($row); if ($row != '/' && $quoted = preg_quote($row,'/')) $blacklistRegexArray[$key] = $quoted; if ($row == '/') $indexIsBlacklisted = true; } if ($indexIsBlacklisted && $_SERVER['REQUEST_URI'] == $applicationPath) return true; if (empty($blacklistRegexArray)) return false; $blacklistRegex = '/('.implode('|',$blacklistRegexArray) . ')/i'; return preg_match($blacklistRegex, $_SERVER['REQUEST_URI']); } /** * 3rd party plugin monitor * * @access private * @return null */ private function _monitorThirdPartyPlugins() { // Kunena & K2 if ($this->params->get('autoFlush-ThirdParty') == 1 && isset($_POST['option']) && ($_POST['option']=='com_k2' || $_POST['option' ]== 'com_kunena')) { $this->_purgeCache(false); } // VirtueMart if ( (isset($_POST['option']) && $_POST['option'] == 'com_virtuemart') || ( isset($_GET['option']) && $_GET['option'] == 'com_virtuemart' ) || isset($_GET['cart_virtuemart_product_id']) ) { if($this->params->get('autoFlush-ThirdParty') == 1) $this->_purgeCache(false); } } /** * Action monitor * * @access private * @return null */ private function _flushMonitor() { $user = JFactory::getUser(); if ((!JFactory::getApplication()->isAdmin() && !$this->_autoflushClientSide) || $user->guest) return; $autoflush = $this->params->get('autoFlush'); if ($autoflush === null) $autoflush = 1; if (isset($_POST['task']) && $_POST['task'] && !in_array($_POST['task'],self::$_ignoreTasks) && $autoflush == 1) $this->_purgeCache(false); } } Privacy Policy
::cck::62::/cck::
::introtext::

Privacy Policy

The following statements will help you understand how EventDunia.com collects, uses, and safeguards the personally identifying information you give us when you use this website to inquire about advertising options, register with us, send feedback about our services, or otherwise communicate with us through email.

We define "personally identifying information" as information–such as name, address, telephone number, and email address–that can help to locate or identify individuals. "Personally identifying information". Protecting the privacy of personally identifying information is important to us.

What Information we collect from you?

When you browse this website, you browse anonymously, unless you request a user account, submit an inquiry form or communicating through email. We do not collect or store any personal information–such as your name, address, phone number, or email address–unless you knowingly and willingly provide it.

When you place request a user account, or submit an inquiry form, we collect only information–such as name, company, telephone numbers, email address etc.You may request information, make a suggestion, or ask us a question by email. We ask you to provide certain information–your name, title, company, type of business, address, telephone and fax numbers, and email address–so that we can respond to your request.

How we use the information?

We may use the personal information you provide to send an email to contact you about your registration, to provide announcements about our new service launches, to respond to your inquiries and suggestions, and to contact you for other reasons. We may use and share all of this information, subject to applicable law, with our ventured portals, or our sponsors that wish to offer products and services in which our visitors may be interested.

EventDunia.com keeps your information strictly confidential, and does not sell, rent, share to third parties, or otherwise disclose any personally identifiable information that you directly provide, except as required by law.

We do not permit other persons, companies or entities to collect personal information through our website.

Note:We send users newsletters and updates upon registration. We send newsletters and/or promotional emails on behalf of our alliance clients or partners.

Cookies

Our Web server may write a "cookie," a small computer file, to your hard drive. We may use cookies to enhance your on-line experience, to facilitate your use of our site, and to collect statistics about your visit to the site. The cookies used by this site do not contain personally identifying information, such as your name, address, telephone number, email address, or credit card information.

If you reject cookies, you may still use our site, but your ability to use some areas of our site, such as polls will be limited. Some of our business partners (e.g., advertisers) set cookies while delivering banners on our site. We have no access to or control over these cookies.

This privacy statement covers the use of cookies by this site and all our ventured sites such as EventDunia.com and does not cover the use of cookies by any advertisers.

Security

The security of our site visitor information is very important to us, and we take a number of steps to safeguard it. After receiving your personally identifying information, we maintain reasonable physical, electronic, and procedural safeguards to protect it from unauthorized access, use, disclosure, loss, or destruction. We limit access to those employees, ventured sites, affiliates and other business partners who assist us in providing the services we provide.

Linked Internet Sites

We may establish relationships with subsidiaries, affiliates and other business partners by creating a link between our sites. Although we choose our sites carefully, we are not responsible for the content, maintenance, or privacy policies of those sites. Once you click over to a third-party site, we encourage you to check that site's privacy policy.

We respect your Privacy Concerns

Our privacy and security policies demonstrate our responsibility to the individuals from and about whom we receive and report information, and to our visitors, who rely on us to safeguard the information they report. If you have any questions or concerns about our privacy and security policies, please contact us.

Policy updates:

We reserve the right to change or update this policy at any time by placing a prominent notice on our site. Such changes shall be effective immediately upon posting to this site.You are can offer your views, suggestions, if any, by submitting the filled in online.

 

 

::/introtext::
::fulltext::::/fulltext:: ::cck::62::/cck::