} } function img_line($image, $in, $out, $clr) { $tc = map::getinstance()->taille / 100; list($sX, $sY) = map::ss2xy($in); list($sX2, $sY2) = map::ss2xy($out); $x1 = floor($tc * $sX - $tc / 2); $y1 = floor($tc * ($sY + 1) - $tc / 2); $x2 = floor($tc * $sX2 - $tc / 2); $y2 = floor($tc * ($sY2 + 1) - $tc / 2); imageline($image, $x1, $y1, $x2, $y2, $clr); } function img_dot($image, $coord, $clr) { $tc = map::getinstance()->taille / 100; $td = floor($tc / 2); $td = $td % 2 ? $td + 3 : $td + 2; list($sX, $sY) = map::ss2xy($coord); $x1 = floor($tc * $sX - $tc / 2); $y1 = floor($tc * ($sY + 1) - $tc / 2); imagefilledellipse($image, $x1, $y1, $td, $td, $clr); } DataEngine::sql_log(); header('Content-type: image/png'); header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date dans le passé imagepng($image); imagedestroy($image);
public static function _DoOutput($data) { DataEngine::sql_log(); // Remplacement de variable... $data = str_replace('%ROOT_URL%', ROOT_URL, $data); $data = str_replace('%INCLUDE_URL%', INCLUDE_URL, $data); $data = str_replace('%IMAGES_URL%', IMAGES_URL, $data); $data = str_replace('%TEMPLATE_URL%', TEMPLATE_URL, $data); $data = str_replace('%ADDONS_URL%', ADDONS_URL, $data); $data = str_replace('%LNG_URL%', TEMPLATE_URL . 'lng/' . LNG_CODE . '/', $data); $data = str_replace('%BTN_URL%', BTN_URL, $data); header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Expires: Mon, 16 Jul 2008 04:21:44 GMT'); // HTTP/1.0 Date dans le passé if (DEBUG_PLAIN) { header('Content-Type: text/plain;charset=utf-8'); echo $data; } else { if (USE_AJAX) { header('Content-Type: text/xml;charset=utf-8'); echo $data; } else { if (IS_IMG) { if (DEBUG_IMG) { header('Content-Type: text/plain;charset=utf-8'); echo $data; } else { header('Content-Type: image/png'); imagepng($GLOBALS['image']); } imagedestroy($GLOBALS['image']); } else { header('Content-Type: text/html;charset=utf-8'); echo $data; } } } exit(0); }