Beispiel #1
0
 /** 
  * Obtain a hyperlink to the appropriate display page for the table and row referenced 
  * in this action request.
  * 
  * @return a text string containing an a with href to the display page for the row  
  *   referenced by fk with a brief text description of the row, or an empty string 
  *   if there is an error condition, including the absence of an implementation for
  *   the table in this function.
  */
 public function getLinkToRow()
 {
     $result = "";
     if ($this->tablename == "omoccurrences") {
         $occ = new OmOccurrences();
         $occ->load($this->fk);
         $result = "<a href='../collections/individual/index.php?occid={$this->fk}&clid=0'>" . $occ->getinstitutionCode() . ":" . $occ->getcollectionCode() . " " . $occ->getcatalogNumber() . "</a>";
     }
     if ($this->tablename == "images") {
         $im = new ImageDetailManager($this->fk);
         $imArr = $im->getImageMetadata();
         if (isset($imArr['sciname'])) {
             $caption .= $imArr['sciname'];
         } elseif (isset($imArr['caption'])) {
             $caption .= $imArr['caption'];
         } elseif (isset($imArr['photographer'])) {
             $caption .= $imArr['photographer'];
         } else {
             $caption = $imArr['imagetype'];
         }
         $caption .= " " . $imArr['initialtimestamp'];
         $caption = trim($caption);
         $result = "<a href='../imagelib/imgdetails.php?imgid={$this->fk}'>" . $caption . "</a>";
     }
     return $result;
 }