showdoc.inc 790 B

123456789101112131415
  1. <?php
  2. // Using googgle docs until a decent PDF viewer actually exists
  3. // PDFObject would be nice if it didn't require a browser plugin
  4. $statz = stat($post);
  5. $uid = $statz['uid'];
  6. $udata = posix_getpwuid($uid);
  7. $user = $udata['name'];
  8. $date = date("F d Y H:i:s", filemtime($post));
  9. $title = basename($post);
  10. $parent = dirname($post);
  11. echo "<a title=back href=\"index.php?nav=1&dir=$parent\"><img alt=back src=img/mime/tsfolder-up.gif />$parent</a><hr />";
  12. echo "<h3 class=blogtitles><a title=permalink href=\"$post\">$title</a></h3>\n";
  13. echo "<em class=blogdetail>Last modified on $date UTC by $user</em><br /><br />\n";
  14. echo "<iframe src=\"http://docs.google.com/gview?url=http://teodesian.net/$post&embedded=true\" style=\"width:100%; min-height:500px;\" frameborder=\"0\"></iframe>";
  15. ?>