if (isset($file)) { // // Specify the content type to be ICS header("Content-Type: application/vnd.SwiftView-ICS"); // // select the markup string based on the filename $fileurl = "http://".$HTTP_HOST."/tech/".$file; if ($file == "1page.hpg") { $markstr = "STATUS: NOT Released"; } else if ($file == "2pages.hpg") { $markstr = "STATUS: Released to Manufacturing"; } else { $markstr = "STATUS: Unknown"; $fileurl = $file; } // // First line in an ICS file must be "ICS" echo "ICS\n"; // // Specify the document to be viewed echo "ldoc ".$fileurl."\n"; // // The markup: // Set transparency on. echo "onpage all markup attributes drawmode transparent\n"; // Create "yellow sticky note" echo "onpage all markup attributes fgcolor rgb:ff/ff/88\n"; echo "onpage all markup filledrectangle 0.25 0.25 4.75 1.20\n"; // Add "shadow" for a raised effect echo "onpage all markup attributes fgcolor rgb:aa/aa/aa\n"; echo "onpage all markup filledpolygon 0.30 1.20 4.75 1.20 4.75 0.30 4.80 0.30 4.80 1.25 0.30 1.25\n"; // Draw the text on the "yellow sticky note" echo "onpage all markup attributes fgcolor rgb:00/00/99\n"; echo "onpage all markup text font \"face cour size 12 pitchcpi 8\"\n"; echo "onpage all markup text rxloc 0.4 ryloc 0.70 string \"".$markstr."\"\n"; echo "onpage all markup text rxloc 0.4 ryloc 1.00 string \"Viewed on \$strftime(%x) at \$strftime(%X)\"\n"; echo "draw widetop\n"; } else { echo "\n"; echo "
\n"; echo "Error: A file has not been specified.\n"; echo "\n"; echo "\n"; } ?>