"; $myFile = "mds.txt.meta"; $fh = fopen($myFile, 'r'); $theData = fread($fh,filesize($myFile)); fclose($fh); $x1 = strtok($theData," \n\t"); $y1 = strtok(" \n\t"); $x2 = strtok(" \n\t"); $y2 = strtok(" \n\t"); //echo "You clicked ".$pt_x." ".$pt_y."
and mode is ".$mode."
"; // Zoom in (CURRENT PIXEL SIZE = 250 x 250) $imgX = 640; $imgY = 640; // relative to whole image $xcenter = $pt_x / $imgX; $ycenter = $pt_y / $imgY; // relative to current windo $xcenter = $x1 + $xcenter * ( $x2 - $x1 ) ; $ycenter = $y1 + $ycenter * ( $y2 - $y1 ) ; $xwidth = $x2 - $x1; $ywidth = $y2 - $y1; $xwidth *= 0.85; $ywidth *= 0.85; $x1 = $xcenter - $xwidth/2; $x2 = $xcenter + $xwidth/2; $y1 = $ycenter - $ywidth/2; $y2 = $ycenter + $ywidth/2; //echo "xcenter = ".$xcenter."
"; //echo "ycenter = ".$ycenter."
"; //echo "xwidth = ".$xwidth."
"; //echo "ywidth = ".$ywidth."
"; // Write Window location $filename = "mds.txt.meta"; $handle = fopen($filename, 'w'); fwrite($handle, $x1." "); fwrite($handle, $y1." "); fwrite($handle, $x2." "); fwrite($handle, $y2." "); fclose($handle); echo "
"; echo ""; echo "
"; echo "
"; echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; if ($mode == 1) echo ""; else echo ""; echo "
"; echo "
"; echo "
"; echo "
"; // Make combo box that contains list of IDs $myFile = "id.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo ""; echo "
"; echo "
"; ?>
Choose a file to upload: