예제 #1
0
파일: get.php 프로젝트: rolwi/koala
     exit;
 }
 if (!$object instanceof steam_document) {
     echo "Kein gültiges Dokument.";
     security_log("get.php Kein Dokument");
     exit;
 }
 // store object data in array below
 // (makes future usage of disk cache mechanisms easier too)
 $data = array();
 if (isset($_GET["mode"]) && $_GET["mode"] == "thumbnail" && isset($_GET["width"]) && isset($_GET["height"])) {
     $width = (int) $_GET["width"];
     $height = (int) $_GET["height"];
     if (PHP_THUMBNAIL) {
         $thumbnail = new thumbnail();
         $data = $thumbnail->get_thumbnail($object->get_id(), $width, $height);
     } else {
         $object->get_attributes(array("OBJ_NAME", "DOC_MIME_TYPE", "DOC_LAST_MODIFIED"), TRUE);
         if ($debug_log) {
             debug_log("getting thumbnail for object: " . $object->get_id());
         }
         $tnr_imagecontent = $object->get_thumbnail_data($width, $height, 0, TRUE);
         $result = $steam->buffer_flush();
         $data["mimetype"] = $result[$tnr_imagecontent]["mimetype"];
         $data["lastmodified"] = $result[$tnr_imagecontent]["timestamp"];
         $data["name"] = $result[$tnr_imagecontent]["name"];
         $data["content"] = $result[$tnr_imagecontent]["content"];
         $data["contentsize"] = $result[$tnr_imagecontent]["contentsize"];
         // For debug issues:
         //error_log("get.php: thumbnail name=" . $data["name"] . " width=". $width . " height=" . $height);
     }