Hong-Dell\Hong
2024-03-20 40bf1f9cb2685c739e7aa7a56d941f09ca512882
CB_IMGPSScanImp.pas
@@ -1,5 +1,5 @@
unit CB_IMGPSScanImp;
//Test
//PRO
{$WARN SYMBOL_PLATFORM OFF}
interface
@@ -24,7 +24,7 @@
  Xmltool,inifiles,printers,IdHashMessageDigest, idHash, LogFile,ShellApi,
  SBSocket,IIS_Ftp, SBSimpleFTPS;
Type
  TTransMode =(tsHttp,tsFtp);
  TTransMode =(tsHttp,tsFtp,tsNone);
var
  Ch_WriteNote : Boolean;
@@ -6640,6 +6640,7 @@
      +'&must_formid='+must_formidStr  //擁有的 formid
      +'&last_add_formid='+last_add_formidstr   //當次新加的 formid
      +'&form_code='+ScanListStr      //scanlist.dat 表單代號
      +'&ftp_image_path='+FFtpPath   //加傳FTP目錄  HTTP上傳時會是空白
      +'&in_doc1='+HTTPEncode(UTF8Encode(In_Doc1))
      +'&in_doc2='+HTTPEncode(UTF8Encode(In_Doc2));
@@ -6930,7 +6931,7 @@
Function TCB_IMGPSScanX.DownLoadImage(Path,CaseID:String):Boolean;
begin
  Result := True;
  if not GetftpInfo(CaseID,'download') then   //取案件上傳方式
  if not GetftpInfo(CaseID,'download') then   //取案件下載方式
  begin
    DownFileErrStr := _Msg('取案件下載資訊失敗,')+HttpErrStr;
    Result := False;
@@ -10993,19 +10994,35 @@
    Result := False;
    Exit;
  end;
  IF (memo1.Lines.Strings[0] = '1') or (memo1.Lines.Strings[0] <> '0') Then
  IF (memo1.Lines.Strings[0] = '1') Then
  begin
    HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1];
    Result := False;
    Exit;
    if memo1.Lines.Strings[1]='nodata' then   //nodata 為正常可繼續的判斷
    begin
      TransMode := tsNone;
      Result := True;
      Exit;
    end
    else
    begin
      HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[1];
      Result := False;
      Exit;
    end;
  end
  Else if Pos('<script type="text/javascript" src="scripts/CW00/login.js"></script>',Memo1.Lines.Text) > 0 then
  begin
    HttpErrStr := _Msg('錯誤原因:')+_Msg('閒置過久或被登出,請重新登入');
    Result := False;
    Exit;
  end
  else if (memo1.Lines.Strings[0] <> '0') then//不認識的字串
  begin
    HttpErrStr := _Msg('錯誤原因:')+memo1.Lines.Strings[0];
    Result := False;
    Exit;
  end;
  TransMode := tsHttp;
  FFtpPath := '';
  if memo1.Lines.Strings[0] = '0' then
  begin
    if memo1.Lines.Strings[2] = 'Y' then