<?php
header("Content-type: image/svg+xml");
echo '<?xml version="1.0" encoding="iso-8859-1"?>';

$taille_svg 	= 45; // c'est forcément carré
$taille 	= $_GET['taille'];
$scale 		= $taille / $taille_svg; 
	
$SVG = <<<EOF
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg	
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="{$taille}"
   height="{$taille}"
   id="svg3128"
   sodipodi:version="0.32"
   inkscape:version="0.44.1"
   version="1.0"
   sodipodi:docbase="/home/cburnett/wikipedia/images/chess"
   sodipodi:docname="Chess rdl45.svg">
  <defs
     id="defs3130" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     gridtolerance="10000"
     guidetolerance="10"
     objecttolerance="10"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="16"
     inkscape:cx="19.736579"
     inkscape:cy="22.06684"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     height="45px"
     width="45px"
     inkscape:grid-points="true"
     showgrid="true"
     inkscape:window-width="977"
     inkscape:window-height="852"
     inkscape:window-x="0"
     inkscape:window-y="31"
     gridspacingx="0.5px"
     gridspacingy="0.5px" />
  <metadata
     id="metadata3133">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />

      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     style="display:inline"
     transform="scale({$scale}, {$scale})">
    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z "
       id="path3119"
       sodipodi:nodetypes="ccccc" />
    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z "
       id="path3123"
       sodipodi:nodetypes="ccccc" />
    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z "
       id="path3121"
       sodipodi:nodetypes="ccccc" />
    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z "
       id="path3125"
       sodipodi:nodetypes="ccccc" />

    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z "
       id="path3127"
       sodipodi:nodetypes="ccccc" />
    <path
       style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
       d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z "
       id="path3129"
       sodipodi:nodetypes="ccccccccccccc" />
    <path
       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
       d="M 12,35.5 L 33,35.5 L 33,35.5"
       id="path4967" />
    <path
       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
       d="M 13,31.5 L 32,31.5"
       id="path4969" />
    <path
       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
       d="M 14,29.5 L 31,29.5"
       id="path4971" />
    <path
       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
       d="M 14,16.5 L 31,16.5"
       id="path5050" />
    <path
       style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
       d="M 11,14 L 34,14"
       id="path5052" />
  </g>
</svg>
EOF;

echo $SVG;

?>