| | |
| | | unit CB_IMGPSScanImp; |
| | | //Test |
| | | //PRO |
| | | {$WARN SYMBOL_PLATFORM OFF} |
| | | |
| | | interface |
| | |
| | | Xmltool,inifiles,printers,IdHashMessageDigest, idHash, LogFile,ShellApi, |
| | | SBSocket,IIS_Ftp, SBSimpleFTPS; |
| | | Type |
| | | TTransMode =(tsHttp,tsFtp); |
| | | TTransMode =(tsHttp,tsFtp,tsNone); |
| | | |
| | | var |
| | | Ch_WriteNote : Boolean; |
| | |
| | | +'&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)); |
| | | |
| | |
| | | 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; |
| | |
| | | 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 |