$x=$points[$j][$i]; $y=$points[$j][$i+1]; $x=$x/$maxw;
$y=$y/$maxh; $x=$x*($W-10); $y=$y*($H-10); $y=$H-$y;
$poly[]=$x; $poly[]=$y; }
imagepolygon($im, $poly, count($poly)/2, $ink); }
$color=Array(); $color["black"]=$ink;
$color[0]=imagecolorallocate($im,0,0,255);
$q=mysql_query("SELECT dom.id, dom.coords FROM dom WHERE dom.coords IS
NOT NULL");
$num_q= MYSQL_NUM_ROWS($q); for ($i=0;$i<$num_q;$i++){
$yles=mysql_fetch_array($q); $co="$yles[id]";
if ($col[$co]=="1"){ $color[0]=imagecolorallocate($im,0,140,0);}
if ($col[$co]=="2"){ $color[0]=imagecolorallocate($im,0,180,0);}
if ($col[$co]=="3"){ $color[0]=imagecolorallocate($im,0,200,0);}
if ($col[$co]=="4"){ $color[0]=imagecolorallocate($im,0,220,0);}
if ($col[$co]=="green"){ $color[0]=imagecolorallocate($im,0,255,0);}
if ($col[$co]=="red"){ $color[0]=imagecolorallocate($im,220,220,220);}
DrawIllustratorFile($im,$yles,$maxw,$maxh,$color[0]); }
imagepng($im);
imagedestroy($im);
?>
4. Исходный код переменной части - per.php
<?PHP
INCLUDE("./../../INCLUDE/CONFIG.INC.PHP");
$FILE=ARRAY();
$FILE[POLY]=FOPEN("POLY.PHP","W");
$FILE[ALT]=FOPEN("ALT.PHP","W");
FWRITE($FILE[POLY],"<?PHP
\$COL=ARRAY(); ");
FWRITE($FILE[ALT],"<?PHP
UNSET(\$ALT);
\$ALT=ARRAY(); ");
$Q=MYSQL_QUERY("SELECT DOM.ID, DOM.COORDS, DOM.NUM, STREET.NAME FROM
DOM, STREET WHERE DOM.COORDS IS NOT NULL AND STREET.ID=DOM.STREET_ID");
$NUM_Q= MYSQL_NUM_ROWS($Q);
FOR ($I=0;$I<$NUM_Q;$I++){