Example #1
0
 function ExportField(&$fld)
 {
     $this->FldCnt++;
     $ExportValue = $fld->ExportValue();
     if ($fld->FldViewTag == "IMAGE") {
         if ($fld->ImageResize) {
             $ExportValue = ew_GetFileImgTag($fld, $fld->GetTempImage());
         } elseif ($fld->HrefValue2 != "" && is_object($fld->Upload)) {
             if (!ew_Empty($fld->Upload->DbValue)) {
                 $ExportValue = ew_GetFileATag($fld, $fld->HrefValue2);
             }
         }
     } elseif (is_array($fld->HrefValue2)) {
         // Export custom view tag
         $ar = $fld->HrefValue2;
         $fn = is_array($ar) ? @$ar["exportfn"] : "";
         // Get export function name
         if (is_callable($fn)) {
             $ExportValue = $fn($ar);
         }
     }
     if ($this->Horizontal) {
         $this->ExportValueEx($fld, $ExportValue);
     } else {
         // Vertical, export as a row
         $this->RowCnt++;
         $this->Text .= "<tr class=\"" . ($this->FldCnt % 2 == 1 ? "ewExportTableRow" : "ewExportTableAltRow") . "\">" . "<td>" . $fld->ExportCaption() . "</td>";
         $this->Text .= "<td" . (EW_EXPORT_CSS_STYLES ? $fld->CellStyles() : "") . ">" . $ExportValue . "</td></tr>";
     }
 }
Example #2
0
 function ExportField(&$fld)
 {
     $this->FldCnt++;
     $ExportValue = $fld->ExportValue();
     if ($fld->FldViewTag == "IMAGE") {
         if ($fld->ImageResize) {
             $ExportValue = ew_GetFileImgTag($fld, $fld->GetTempImage());
         } elseif ($fld->HrefValue2 != "") {
             if (!ew_Empty($fld->Upload->DbValue)) {
                 $ExportValue = ew_GetFileATag($fld, $fld->HrefValue2);
             }
         }
     }
     if ($this->Horizontal) {
         $this->ExportValueEx($fld, $ExportValue);
     } else {
         // Vertical, export as a row
         $this->RowCnt++;
         $this->Text .= "<tr class=\"" . ($this->FldCnt % 2 == 1 ? "ewExportTableRow" : "ewExportTableAltRow") . "\">" . "<td>" . $fld->ExportCaption() . "</td>";
         $this->Text .= "<td" . (EW_EXPORT_CSS_STYLES ? $fld->CellStyles() : "") . ">" . $ExportValue . "</td></tr>";
     }
 }