Esempio n. 1
0
    ?>
</h2>  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
<table width="100%">  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
    <tr>
        <td colspan="5">  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
            <?php 
    echo $extraWatchHTML->renderDateControlGet('seo', $day);
    ?>
  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
        </td>
    </tr>
</table>
<br/>
<?php 
}
$extraWatchSEOHTML = new ExtraWatchSEOHTML($extraWatch);
echo $extraWatchSEOHTML->renderSEOReport($day, FALSE, !$extraWatch->config->getCheckboxValue('EXTRAWATCH_SEO_RENDER_ONLY_CHANGED'));
?>
<br/>
<br/>
<?php 
if (!$extraWatch->config->getCheckboxValue("EXTRAWATCH_SEO_SHOW_ALL_TIME_REPORT")) {
    ?>
  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
<table width="100%">  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
    <tr>
        <td colspan="5">  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
            <?php 
    echo $extraWatchHTML->renderDateControlGet('seo', $day);
    ?>
  	 	    	    		  	 	  	 	  		 	 		    	 			 	   		  	 	 		 	 	   	      	  	 		 		 				 			 		  		    	 		 		  
 function sendNightlyEmail()
 {
     ExtraWatchLog::debug("function sendNightlyEmail in stat.html.php");
     $output = $this->renderNightlyEmail();
     $email = $this->extraWatch->config->getConfigValue("EXTRAWATCH_EMAIL_REPORTS_ADDRESS");
     $projectName = "";
     if (@_EW_CLOUD_MODE) {
         $projectName = " - " . ExtraWatchHelper::getProjectNameByProjectId($this->extraWatch->database, _EW_PROJECT_ID);
     }
     $date = ExtraWatchDate::date("d.m.Y", ExtraWatchDate::getUserTimestamp() - 24 * 3600);
     // date of report from yesterday, not today);
     ExtraWatchHelper::sendEmail($this->extraWatch->env, "{$email}", "{$email}", "ExtraWatch report " . $projectName . " - {$date}", $output);
     if ($this->extraWatch->config->getCheckboxValue("EXTRAWATCH_EMAIL_SEO_REPORTS_ENABLED")) {
         // old one: $outputSEOReport = "<table>".$this->renderSEOReport($this->extraWatch->date->jwDateToday()-1, TRUE)."</table>";
         $extraWatchSEOHTML = new ExtraWatchSEOHTML($this->extraWatch);
         $day = $this->extraWatch->date->jwDateToday();
         $outputSEOReport = $extraWatchSEOHTML->renderSEOReport($day - 1, TRUE);
         if (@_EW_CLOUD_MODE) {
             $emailSender = _EW_EMAIL_SENDER;
             //only in cloud mode
         } else {
             $emailSender = $email;
             //admin email from configuration
         }
         if (@$outputSEOReport) {
             ExtraWatchHelper::sendEmail($this->extraWatch->env, "{$email}", $emailSender, "ExtraWatch SEO report - " . $projectName . " - {$date}", $outputSEOReport);
         }
     }
     ExtraWatchLog::debug("function sendNightlyEmail output rendered");
     return $output;
 }