コード例 #1
0
ファイル: phpfn12.php プロジェクト: NaurozAhmad/Senho
 function GetTempImage()
 {
     if ($this->FldDataType == EW_DATATYPE_BLOB) {
         $wrkdata = $this->Upload->DbValue;
         if (!empty($wrkdata)) {
             if ($this->ImageResize) {
                 $wrkwidth = $this->ImageWidth;
                 $wrkheight = $this->ImageHeight;
                 ew_ResizeBinary($wrkdata, $wrkwidth, $wrkheight);
             }
             return ew_TmpImage($wrkdata);
         }
     } else {
         $wrkfile = $this->Upload->DbValue;
         if (empty($wrkfile)) {
             $wrkfile = $this->CurrentValue;
         }
         if (!empty($wrkfile)) {
             if (!$this->UploadMultiple) {
                 $imagefn = ew_UploadPathEx(TRUE, $this->UploadPath) . $wrkfile;
                 if ($this->ImageResize) {
                     $wrkwidth = $this->ImageWidth;
                     $wrkheight = $this->ImageHeight;
                     $wrkdata = ew_ResizeFileToBinary($imagefn, $wrkwidth, $wrkheight);
                     return ew_TmpImage($wrkdata);
                 } else {
                     return $imagefn;
                 }
             } else {
                 $tmpfiles = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $wrkfile);
                 $tmpimage = "";
                 foreach ($tmpfiles as $tmpfile) {
                     if ($tmpfile != "") {
                         $imagefn = ew_UploadPathEx(TRUE, $this->UploadPath) . $tmpfile;
                         if ($this->ImageResize) {
                             $wrkwidth = $this->ImageWidth;
                             $wrkheight = $this->ImageHeight;
                             $wrkdata = ew_ResizeFileToBinary($imagefn, $wrkwidth, $wrkheight);
                             if ($tmpimage != "") {
                                 $tmpimage .= ",";
                             }
                             $tmpimage .= ew_TmpImage($wrkdata);
                         } else {
                             if ($tmpimage != "") {
                                 $tmpimage .= ",";
                             }
                             $tmpimage .= ew_ConvertFullUrl($this->UploadPath . $tmpfile);
                         }
                     }
                 }
                 return $tmpimage;
             }
         }
     }
 }
コード例 #2
0
ファイル: phpfn8.php プロジェクト: Razinsky/echaude-com
 function ExportValue($Export, $Original)
 {
     $ExportValue = $Original ? $this->CurrentValue : $this->ViewValue;
     if ($Export == "xml" && is_null($ExportValue)) {
         $ExportValue = "<Null>";
     }
     if ($Export == "pdf") {
         if ($this->FldViewTag == "IMAGE") {
             if ($this->FldDataType == EW_DATATYPE_BLOB) {
                 $wrkdata = $this->Upload->DbValue;
                 if (!empty($wrkdata)) {
                     if ($this->ImageResize) {
                         $wrkwidth = $this->ImageWidth;
                         $wrkheight = $this->ImageHeight;
                         ew_ResizeBinary($wrkdata, $wrkwidth, $wrkheight, $this->ResizeQuality);
                     }
                     $imagefn = ew_TmpImage($wrkdata);
                     if ($imagefn != "") {
                         $ExportValue = "<img src=\"" . $imagefn . "\">";
                     }
                 }
             } else {
                 $wrkfile = $this->Upload->DbValue;
                 if (empty($wrkfile)) {
                     $wrkfile = $this->CurrentValue;
                 }
                 if (!empty($wrkfile)) {
                     $imagefn = ew_UploadPathEx(TRUE, $this->UploadPath) . $wrkfile;
                     if ($this->ImageResize) {
                         $wrkwidth = $this->ImageWidth;
                         $wrkheight = $this->ImageHeight;
                         $wrkdata = ew_ResizeFileToBinary($imagefn, $wrkwidth, $wrkheight, $this->ResizeQuality);
                         $imagefn = ew_TmpImage($wrkdata);
                     } else {
                         $imagefn = ew_TmpFile($imagefn);
                     }
                     if ($imagefn != "") {
                         $ExportValue = "<img src=\"" . $imagefn . "\">";
                     }
                 }
             }
         } else {
             $ExportValue = str_replace("<br>", "\r\n", $ExportValue);
             $ExportValue = strip_tags($ExportValue);
             $ExportValue = str_replace("\r\n", "<br>", $ExportValue);
         }
     }
     return $ExportValue;
 }
コード例 #3
0
ファイル: phpfn9.php プロジェクト: Rastrian/RBAC_Manager
 function GetTempImage()
 {
     if ($this->FldDataType == EW_DATATYPE_BLOB) {
         $wrkdata = $this->Upload->DbValue;
         if (!empty($wrkdata)) {
             if ($this->ImageResize) {
                 $wrkwidth = $this->ImageWidth;
                 $wrkheight = $this->ImageHeight;
                 ew_ResizeBinary($wrkdata, $wrkwidth, $wrkheight, $this->ResizeQuality);
             }
             return ew_TmpImage($wrkdata);
         }
     } else {
         $wrkfile = $this->Upload->DbValue;
         if (empty($wrkfile)) {
             $wrkfile = $this->CurrentValue;
         }
         if (!empty($wrkfile)) {
             $imagefn = ew_UploadPathEx(TRUE, $this->UploadPath) . $wrkfile;
             if ($this->ImageResize) {
                 $wrkwidth = $this->ImageWidth;
                 $wrkheight = $this->ImageHeight;
                 $wrkdata = ew_ResizeFileToBinary($imagefn, $wrkwidth, $wrkheight, $this->ResizeQuality);
                 return ew_TmpImage($wrkdata);
             } else {
                 return $imagefn;
             }
         }
     }
 }