/**
  * Used by both - save anti-spam and save settings  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
  * @param  $checkboxNamesArray  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
  * @param  $post
  * @return void
  */
 function saveConfigValues($checkboxNamesArray, $post)
 {
     if (@$post) {
         foreach ($post as $key => $value) {
             if (strstr($key, "EXTRAWATCH_")) {
                 $this->saveConfigValue(ExtraWatchInput::validate(_EW_INPUT_ONE_STRING, $key), trim($value));
             }
         }
     }
     //hack :( explicitly save checkbox values
     foreach (@$checkboxNamesArray as $key => $value) {
         if (@(!$post[$value])) {
             //if there is no value - checkbox unchecked
             $this->saveConfigValue($value, "Off");
         }
     }
     // explicitly reset chache because of frontend settings
     ExtraWatchCache::clearCache($this->database);
     $this->reloadConfigValues();
 }
 static function checkIfRequestPathAllowed($extraWatch, $env, $task)
 {
     if ($extraWatch->config->getLiveSite() != $env->getRootSite()) {
         $extraWatch->config->setLiveSite($env->getRootSite());
         ExtraWatchCache::clearCache($extraWatch->database);
     } else {
         if ($task != "js" && $task != "ajax") {
             if ($extraWatch->config->getLiveSite() && !ExtraWatchHelper::startsWith(ExtraWatchInput::validate(_EW_INPUT_URI, @$_SERVER['REQUEST_URI']), $extraWatch->config->getLiveSite() . $env->getAdminDir())) {
                 ///
                 die("Restricted access - live site mismatch");
             }
         }
     }
 }