Jump to content

brunotoira

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by brunotoira

  1. i cant solve the problem... With DLL example: http://serverweb01:8091 - works perfectly http://serverweb01:8091/?function=ws&UserId=test@company.pt - error 500 - internal server error If i compile exe file, it works well, in 2 cases...
  2. Hello, If someone needs a freelancer, please talk to me. I Have many years of experience working with UniGui and +/- 10 years with Delphi and MS SQL, MySQL, Firebird and other RMDB Thanks from Portugal
  3. Hello,

    can you send or upload again the Webcmd.zip file?

     

    thanks

  4. How you solve the problem? I cant solve, please give-me some help
  5. I have the same problem... ISAPI dont catch the URI for example. My website work's fine localhost:8077/api for example But when convert into ISAPI, i cant call "api" give-me error My code: procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); var field_name,nomeDaColuna,valorDaColuna : String; I: Integer; Resultado:String; begin if (ARequestInfo.Params.Values['funcao']<>'sibsref-todos') and (ARequestInfo.Params.Values['funcao']<>'sibsref-lista') and (ARequestInfo.Params.Values['funcao']<>'sibsref-insere') then exit; if ARequestInfo.Params.Values['funcao']='sibsref-todos' then begin //showmessage('1'); AResponseInfo.ContentType := 'text/html'; if ARequestInfo.Params.Count<>3 then begin AResponseInfo.ContentText:='error 401'; exit; end; ZQueryAPI.Close; ZQueryAPI.SQL.Clear; ZQueryAPI.SQL.Text :='select sibs_meps1_id as id,sibs_meps1_meps0id as meps0id, sibs_meps1_dthn as data '+ ',sibs_meps1_ref as referencia, sibs_meps1_psc as valor'+ ' from sibs_meps1 where dataficheiro>=:Data1 and dataficheiro<=:data2'; ZQueryAPI.ParamByName('Data1').AsString:=copy(ARequestInfo.Params.Values['datainicio'],1,10); ZQueryAPI.ParamByName('Data2').AsString:=copy(ARequestInfo.Params.Values['datafim'],1,10); ZQueryAPI.Active := True; ZQueryAPI.First; end; if ARequestInfo.Params.ValueFromIndex[0]='sibsref-lista' then begin AResponseInfo.ContentType := 'text/html'; if ARequestInfo.Params.Count<>2 then begin AResponseInfo.ContentText:='error 402'; exit; end; ZQueryAPI.Close; ZQueryAPI.SQL.Clear; ZQueryAPI.SQL.Text :='select sibs_meps1_id as id,sibs_meps1_meps0id as meps0id, sibs_meps1_dthn as data '+ ',sibs_meps1_ref as referencia, sibs_meps1_psc as valor'+ ' from sibs_meps1 where sibs_meps1_ref=:Data1'; ZQueryAPI.ParamByName('Data1').AsString:=copy(ARequestInfo.Params.Values['ref'],1,10); ZQueryAPI.Active := True; ZQueryAPI.First; end; if ARequestInfo.Params.ValueFromIndex[0]='sibsref-insere' then begin AResponseInfo.ContentType := 'text/html'; //showmessage('3'); if ARequestInfo.Params.Count<>8 then begin AResponseInfo.ContentText:='error 404'; exit; end; ZQueryAPI.Close; ZQueryAPI.SQL.Clear; ZQueryAPI.SQL.Text :='DELETE FROM sibs_entidades WHERE CODIGO=:CODIGO'; ZQueryAPI.ParamByName('CODIGO').AsString:=ARequestInfo.Params.Values['codigo']; ZQueryAPI.ExecSQL; ZQueryAPI.Close; ZQueryAPI.SQL.Clear; ZQueryAPI.SQL.Text :='INSERT INTO sibs_entidades (CODIGO,TELEMOVEL,EMAIL,NOME,APELIDO,ENTTRAB,CARTAO,REFERENCIA) '+ 'VALUES (:CODIGO,:TELEMOVEL,:EMAIL,:NOME,:APELIDO,:ENTTRAB,:CARTAO,:REFERENCIA)'; ZQueryAPI.ParamByName('CODIGO').AsString:=ARequestInfo.Params.Values['codigo']; ZQueryAPI.ParamByName('TELEMOVEL').AsString:=ARequestInfo.Params.Values['telemovel']; ZQueryAPI.ParamByName('EMAIL').AsString:=ARequestInfo.Params.Values['email']; ZQueryAPI.ParamByName('NOME').AsString:=ARequestInfo.Params.Values['nome']; ZQueryAPI.ParamByName('APELIDO').AsString:=ARequestInfo.Params.Values['apelido']; ZQueryAPI.ParamByName('ENTTRAB').AsString:=ARequestInfo.Params.Values['EntTrab']; ZQueryAPI.ParamByName('CARTAO').AsString:=ARequestInfo.Params.Values['cartao']; ZQueryAPI.ParamByName('REFERENCIA').AsString:=ReferenciaMultibanco(ARequestInfo.Params.ValueFromIndex[1],15); ZQueryAPI.ExecSQL; ZQueryAPI.Close; ZQueryAPI.SQL.Clear; ZQueryAPI.SQL.Text :='select CODIGO,REFERENCIA from sibs_entidades where codigo=:codigo'; ZQueryAPI.ParamByName('codigo').AsString:=ARequestInfo.Params.ValueFromIndex[1]; ZQueryAPI.Active := True; ZQueryAPI.First; end; if ZQueryAPI.IsEmpty then exit; Resultado := '['; while (not ZQueryAPI.EOF) do begin Resultado := Resultado+'{'; for I := 0 to ZQueryAPI.FieldDefs.Count-1 do begin nomeDaColuna := ZQueryAPI.FieldDefs[I].Name; valorDaColuna := ZQueryAPI.FieldByName(nomeDaColuna).AsString; Resultado := Resultado+'"'+nomeDaColuna+'":"'+valorDaColuna+'",'; end; Delete(Resultado, Length(Resultado), 1); Resultado := Resultado+'},'; ZQueryAPI.Next; end; ZQueryAPI.Refresh; Delete(Resultado, Length(Resultado), 1); Resultado := Resultado+']'; AResponseInfo.ContentText:=Resultado; //AResponseInfo.WriteContent; Handled := true; //else // Handled := False; end;
  6. I have the same problem... ISAPI dont catch the URI for example. My website work's fine localhost:8077/api for example But when convert into ISAPI, i cant call "api" give-me error
  7. procedure TDropbox.Upload(const AFileName: String); const API_URL = 'https://api-content.dropbox.com/1/files_put/sandbox/'; var URL: String; https: TIdHTTP; SslIoHandler: TIdSSLIOHandlerSocket; begin URL := API_URL+ExtractFileName(AFileName) + '?oauth_signature_method=PLAINTEXT&oauth_consumer_key=' + FAppKey + '&oauth_token=' + FOAuth.AccessToken + '&oauth_signature=' + FAppSecret + '%26' + FOAuth.AccessTokenSecret; https := TIdHTTP.Create(nil); try SslIoHandler := TIdSSLIOHandlerSocket.Create(https); SslIoHandler.SSLOptions.Method := sslvTLSv1; SslIoHandler.SSLOptions.Mode := sslmUnassigned; https.IOHandler := SslIoHandler; https.Post(URL, AFileName); finally FreeAndNil(https); end; end;
  8. Sim claro! http://lmgtfy.com/?q=create+service+windows
  9. yes i know retrieve IP address, but other information is impossible?
  10. Hello, I need to create an application to retrieve informations of Client Computer like: IP, Logon name, Computer Name and manufacturer of board... I was think to use Jedi JvComputerInfo... but i only retrieve server information. Anyone knows who do this?!
  11. what is "straight" for you? can explain?
  12. Hello, I need to setup UniEdit to accept only chars: 0..9 and "," Backspace and "-" to negative numbers. i create this function, but if i press "." (point) doesnt change to "," (comma) Anyway to do this? procedure TDataModule1.AllowedChars(Sender: TObject; var Key: Char); begin If sender is TUniEdit then Begin if charinset(Key,[backspace, '0'..'9'])=True then exit; if ((Key = '.')OR(Key = ',')) and (Pos(',', TUniEdit(sender).Text) = 0) {and (TUniEdit(sender).s <> 0)} then BEGIN KEY:=','; exit; END; if (Key = '-') {and (TUniEdit(sender).SelStart = 0)} and (pos('-',TUniEdit(sender).text)=0) then exit; Key := #0; end; end;
  13. Há muita coisa já aqui feita,... Dá para fazer em FastReports, Report Builder etc. Eu pessoalmente uso o FastReports
  14. Dont work... Put in ServerModule ext-4.2.1.883/resources/ext-theme-azzurra/js/azzurra.js Extract files to ...FMSoft\Framework\uniGUI\ext-4.2.1.883\resources And when i run app, dont change to azzurra theme...
  15. Só com o UniFrame File->New->UniFrame
  16. solved! http://forums.unigui.com/index.php?/topic/2210-uniurlframe-in-webmode-with-localfile/?hl=uniurlframe1.url
  17. this is possible a bug... UniURLFrame1.URL:='http://forums.unigui.com/'; ->this works well but if i'm using UniURLFrame1.URL:='C:\test.html' this dont work... what i'm doing wrong?
×
×
  • Create New...