public function runAdditionalSQLScripts()
 {
     try {
         $files = scandir(ExtraWatchInput::validate(_EW_INPUT_DIR, $this->sqlScriptsModuleDir));
         ///
         foreach ($files as $file) {
             if (strstr($file, ".sql")) {
                 // should be replaced by ends with
                 if (!$this->wasAdditionalSQLScriptRun($file)) {
                     $this->runSQLscriptsFromFile($this->sqlScriptsModuleDir . DS . $file);
                     ///
                     $this->database->executeQuery(sprintf("insert into #__extrawatch_sql_scripts (scriptname) values ('%s')", $this->database->getEscaped($file)));
                     ///
                 }
             }
         }
     } catch (Exception $e) {
         ExtraWatchLog::error("An exception while running additional SQL scripts: " . $e->getMessage());
     }
 }
 /**
  * config
  */
 function activate($value)
 {
     if (@$value) {
         $domain = $this->getDomainFromLiveSite(_EW_PROJECT_ID);
         $this->saveConfigValue('EXTRAWATCH_ADFREE_' . $domain, $this->database->getEscaped($value), true);
     } else {
         ExtraWatchLog::error("License activation value is empty!");
     }
     $this->saveConfigValue('EXTRAWATCH_FRONTEND_HIDE_LOGO', "on");
     $this->saveConfigValue('EXTRAWATCH_FRONTEND_NOFOLLOW', "on");
     $this->saveConfigValue('EXTRAWATCH_FRONTEND_NO_BACKLINK', "on");
     if ($this->isAdFree()) {
         //echo("<span style='color: green'>" . _EW_CONFIG_LICENSE_ACTIVATED . "</span>");
         $ip = ExtraWatchVisit::getRemoteIPAddress();
         $market = @$this->getConfigValue("EXTRAWATCH_MARKETPLACE");
         echo "<iframe style='display:none' src='http://www.extrawatch.com/track/extrawatch/2.3/install/?domain=" . $domain . "&license=PRO&version=2.3.2572&ip=" . $ip . "&env=" . get_class($this->env) . "&key=" . $value . "&market=" . @$market . "' width='1px' frameborder='0' height='1px'>\n        </iframe>";
         $this->saveConfigValue('EXTRAWATCH_FREE', 0);
     } else {
         if (!$this->isUnregistered()) {
             echo "<span style='color: red'>" . _EW_CONFIG_LICENCE_DONT_MATCH . "</span>";
         }
     }
 }
        ///
        try {
            $extraWatch->visit->insertVisit();
        } catch (ExtraWatchIPBlockedException $e) {
            die($this->config->getConfigValue('EXTRAWATCH_BLOCKING_MESSAGE'));
        }
        /*
         * The following piece of code identifies the userAgent and inserts the backlink to extrawatch.com  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * I would really appreciate, that you would keep the this unchanged.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * It took me some time to create and maintain this component and to share it with everyone.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         * This is the least you could kindly do. Thank you.  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         *
         * CodeGravity.com  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
         */
        $output = "";
        // reset output;
        $title = "";
        if (!_EW_CLOUD_MODE) {
            $title = "Heatmap, Real-time analytics, Conversion tracking and anti-spam for Joomla, Wordpress, Drupal, Magento and Prestashop";
        }
        $output .= $extraWatch->helper->renderHTMLCodeSnippet(_EW_PROJECT_ID);
        return $output;
    }
}
try {
    if (!defined('ENV') | $env->getEnvironmentName() == "nocms") {
        echo renderExtraWatchAgent();
    }
} catch (ExtraWatchInputException $e) {
    ExtraWatchLog::error($e->getMessage());
}
 function __construct($filterName, $input)
 {
     $this->filterName = $filterName;
     $this->input = $input;
     ExtraWatchLog::error("Input Exception: " . $filterName . " input: " . $input);
 }