header("Content-type: image/jpeg");
$g_db->query("SELECT go.mpt_id, go.mpt_x, go.mpt_y, gs.mpd_sindex
FROM myost_map_dependence gs
LEFT JOIN myost_map_points go ON (go.mpt_id = gs.mpd_ptid)
WHERE (gs.mpd_objid=0)
ORDER BY gs.mpd_sindex ASC
");
$OBJECT = $g_db->get_result();
$width = 500;
$height = 500;
$img = ImageCreate($width, $height);
if (!$img) die('Êàðòà íå ìîæåò áûòü ñîçäàíà');
$bg = imagecolorallocate($img,255,255,255);
$color = imagecolorallocate($img,255,0,0);
imageline($img, 0, 0, 300, 300, $color);
imagejpeg($img);
imagedestroy($img);