$Update_time){ if($date_format == "2"){ $month = monthname_to_translate(date("F",$Graph_time));//translation of monthname $Title_text = $Graph_Title.$month.date(" d ",$Graph_time).date(" Y",$Graph_time).date( $hour_format,$Graph_time); } else{ $month = monthname_to_translate(date("F",$Graph_time));//translation of monthname $Title_text = $Graph_Title.date("d ",$Graph_time).$month.date(" Y",$Graph_time).date( $hour_format,$Graph_time); } } //Create the new image $im = imagecreatefromgif("$graph"); //allocate the colors we are using include ("./inc/colors.inc"); //first we cover the Day xx text imagefilledrectangle($im,1,530,463,550,$background_color);//BOTTOM imagefilledrectangle($im,1,224,463,232,$background_color);//ABOVE WIND DIRECTION //calculation for the positions of the Dayxx-text(do not change this) $x_position_day7 = 430-(395/168)*((date("H",time()))); $x_position_day6 = $x_position_day7-57; $x_position_day5 = $x_position_day6-57; $x_position_day4 = $x_position_day5-57; $x_position_day3 = $x_position_day4-57; $x_position_day2 = $x_position_day3-57; $x_position_day1 = $x_position_day2-57; $x_position_day = $x_position_day1-57; //Now we write our own text include ("./inc/new_text.inc"); imagettftext($im, 8, 0, $x_position_day7, 540, $day_xx_color, $font, $Day_text.date("d ",time()));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day6, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-86400)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day5, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-172800)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day4, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-259200)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day3, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-345600)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day2, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-432000)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day1, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-518400)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day, 540, $day_xx_color, $font, $Day_text.(date("d ",time()-604800)));// Dayxx bottom imagettftext($im, 8, 0, $x_position_day7, 232, $day_xx_color, $font, $Day_text.date("d ",time()));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day6, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-86400)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day5, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-172800)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day4, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-259200)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day3, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-345600)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day2, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-432000)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day1, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-518400)));// Dayxx above winddirection imagettftext($im, 8, 0, $x_position_day, 232, $day_xx_color, $font, $Day_text.(date("d ",time()-604800)));// Dayxx above winddirection imagefilledrectangle($im,1,530,32,553,$background_color);//BOTTOM LEFT (to clean-up) imagefilledrectangle($im,430,530,463,553,$background_color);//BOTTOM RIGHT (to clean-up) imagefilledrectangle($im,1,223,32,239,$background_color);//Above winddirection LEFT (to clean-up) imagefilledrectangle($im,430,223,463,239,$background_color);//Above winddirection RIGHT (to clean-up) //Now we send the image to the browser header("Content-Type: image/gif"); imagegif($im); imagedestroy($im); ?>