FiveWeb

Re: FiveWeb

Postby cnavarro » Mon Jan 19, 2015 8:04 pm

Suelen ser errores de botones

@ fila, col BUTTON oBtn PROMPT "jdfjkdkfkdk" ..../...

Has de seguir la sintaxis asi como te lo he puesto
y define las variables oBtn y demas como locales
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FiveWeb

Postby D.Fernandez » Mon Jan 19, 2015 8:31 pm

Funcionando...IMPRESIONANTE.

Solo colocando LOCAL las variables de los botones oBtn1, oBtn2...etc..funciona aunque haga @ 500, 850

Habra un ejemplo con dbf?

Gracias

Saludos
Dario Fernandez
FWH 22.12, Harbour, MVS2022 Community, BCC, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
D.Fernandez
 
Posts: 455
Joined: Wed Jul 31, 2013 1:14 pm
Location: Maldonado - Uruguay

Re: FiveWeb

Postby cnavarro » Mon Jan 19, 2015 8:49 pm

Adjunto un ejemplo que es del compañero Otto (asi se llama el prg) y que no se como llego a mis manos aunque se habla de el en el foro
Espero que no le importe
Antonio, si no es asi, borra el post

Code: Select all  Expand view

#include "FiveWeb.ch"


//----------------------------------------------------------------------------//

function Main( cParams )

   local oDlg, oGet1, oGet2, oGet3

   local oBtn1, oBtn2
   local cTitle := Space( 80 ), cFamilien := Space( 80 ), cVorname := Space( 80 )
   local AppName:= AppName()

   //SET BACKIMAGE TO "http://fiveweb.googlecode.com/svn/trunk/images/beach.jpg"
   
   SetTheme( "flick" )
   
   BuildMenu()

   if pcount() > 0
      Process( cParams )
      return nil
   endif

   DEFINE DIALOG oDlg TITLE "Programa de Ejemplo" SIZE 600, 400
   
   @ 12, 10 SAY "Titulo:" OF oDlg

   @ 10, 160 GET oGet1 VAR cTitle OF oDlg SIZE 300, 35

   @ 54, 10 SAY "Familia:" OF oDlg

   @ 52, 160 GET oGet2 VAR cFamilien OF oDlg SIZE 300, 35

   @ 94, 10 SAY "Usuario:" OF oDlg

   @ 90, 160 GET oGet3 VAR cVorname OF oDlg SIZE 300, 35

   @ 260, 160 BUTTON  oBtn1 PROMPT "Ok" OF oDlg ;
      ACTION document.location = "otto.exe?add:" + ;
                                 document.getElementById( "oGet1" ).value + ":" + ;
                                 document.getElementById( "oGet2" ).value + ":" + ;
                                 document.getElementById( "oGet3" ).value

   @ 260, 300 BUTTON  oBtn2 PROMPT "Cancel" OF oDlg

   ACTIVATE DIALOG oDlg NOWAIT

return nil



//----------------------------------------------------------------------------//

function BuildMenu()


   local AppName := AppName()
   local oMenu

   MENU oMenu
      MENUITEM "Clients"
      MENU
         MENUITEM "Add"    ACTION ( 'document.location = "' + appname() + '" ' )
         MENUITEM "Browse" ACTION ( 'document.location = "' + appname() + '?browse"' )
      ENDMENU

      MENUITEM "About"
      MENU
         MENUITEM "Wiki"
      ENDMENU
   ENDMENU

return oMenu

//----------------------------------------------------------------------------//

function Process( cParams )

   local i
   local aParams := hb_aTokens( cParams, ":" )
 
   do case
      case aParams[ 1 ] == "add"
           Add( aParams )

      case aParams[ 1 ] == "browse"
           Browse()
     
      case aParams[ 1 ] == "edit"
         
           Edit( aParams )
     
     case aParams[ 1 ] == "Edita"
           edita( aParams )
     
     case aParams[ 1 ] == "clickbrw"
           clickbrw (aParams )
  end case

return nil          

//----------------------------------------------------------------------------//

function Add( aParams )

   if ! File( "clients.dbf" )
      DbCreate( "clients.dbf", { { "title",   "C", 10, 0 },;
                                 { "family",  "C", 80, 0 },;
                                 { "vorname", "C", 80, 0 },;
                                 { "user_ip", "C", 20, 0 } } )
   endif
   
   USE clients SHARED
   
   APPEND BLANK
   
   if RLock()
      clients->title   := aParams[ 2 ]
      clients->family  := aParams[ 3 ]
      clients->vorname := aParams[ 4 ]
      clients->user_ip := GetEnv( "REMOTE_ADDR" )
      DbUnLock()
   endif    

   Browse()

return nil

//----------------------------------------------------------------------------//

function Edit( aParams )
     
   local nRecno:=val(aParams[ 5 ])
 
   USE clients SHARED
   dbgoto( nRecno )
 
   if RLock()
      clients->title   := aParams[ 2 ]
      clients->family  := aParams[ 3 ]
      clients->vorname := aParams[ 4 ]
      clients->user_ip := GetEnv( "REMOTE_ADDR" )
      DbUnLock()
   endif    

   USE
   Browse()

return nil

//----------------------------------------------------------------------------//

Function DefineClassLine()

 ?'<style type="text/css">'
 ?'<!-- '
 ?'.linea { font-family: Verdana, Arial, Helvetica, sans-serif;'
 ?' font-size: 13px;color: #333333; background-color: transparent;'
 ?'}'
 ?'-->'
 ? '</style>'
Return nil

Function DefineClassHead()

 ?'<style type="text/css">'
 ?'<!-- '

?' .boxtitulo { '
?'  background-image: url(glbnav_background.gif);'
?'  background-position: 4px;'
?'  border-bottom-color: #333333;'
?'  border-bottom-style: solid;'
?'  border-bottom-width: 1px;'
?'  border-left-color: #333333;'
?'  border-left-style: solid;'
?'  border-left-width: 1px;'
?'  border-right-color: #000000;'
?'  border-right-style: solid;'
?'  border-right-width: 1px;'
?'  border-top-color: #333333;'
?'  border-top-style: solid;'
?'  border-top-width: 1px;'
?'  color: #333333;'
?'  background-color:#a5beb5 ;'
?'  font-family: Verdana, Arial, Helvetica, sans-serif;'
?'  font-size: 12px;'
?'  font-weight: bold;'
?'  height: 18px;'
?'  text-align: center;'

 ?'}'

 ?'-->'
 ? '</style>'

Return nil

//----------------------------------------------------------------------------//

Function clickbrw(aParams)
local aDatos:= {}
local cfun:= aParams[ 1 ]
local x:= val(aParams[ 2 ])
local n:= val(aParams[ 3 ])
local cName
local oDlg
local AppName := AppName()
local oBtn1


USE clients SHARED


aadd( aDatos, {"title","Family","Vorname"} )

go top
do while !eof()
aadd(aDatos,{clients->title, clients->family,clients->vorname })
skip
enddo

USE

cName:= aDatos[ x ,n ]

DEFINE DIALOG oDlg TITLE "Otto example" SIZE 600, 400

@ 12, 10 SAY "Title:" OF oDlg

@ 12, 80 SAY cName  OF oDlg

@ 260, 300 BUTTON  oBtn1 PROMPT "Cancel" OF oDlg ACTION ('document.location = "'+appname()+'?browse"')

ACTIVATE DIALOG oDlg NOWAIT


Return nil


//----------------------------------------------------------------------------//

function Browse()

   local oDlg, oBrw

   local aDatos:={}

   if ! File( "clients.dbf" )
      DbCreate( "clients.dbf", { { "title",   "C", 10, 0 },;
                                 { "family",  "C", 80, 0 },;
                                 { "vorname", "C", 80, 0 } } )
   endif
   
   USE clients SHARED

   aadd( aDatos, {"title","Family","Vorname"} )
   
   go top
   do while !eof()
      aadd(aDatos,{clients->title, clients->family,clients->vorname })
      skip
   enddo

   USE
 
   DefineClassLine()
   DefineClassHead()  
   
   DEFINE DIALOG oDlg TITLE "Clients browse" SIZE 800, 600
   

   @ 10, 10 BROWSE oBrw SIZE 500, 400 OF oDlg ARRAY aDatos

  //  oBrw:cAction= "clickbrw"
 
    oBrw:cAction:= "Edita"

    oBrw:cClassTable:= "" //"browse"
    oBrw:cClassLine:="linea"
    obrw:cClassHead:= "boxtitulo"
    oBrw:lZebra:= .t.

    oBrw:CreateFromCode()

   
   ACTIVATE DIALOG oDlg NOWAIT
   
   

return nil

//----------------------------------------------------------------------------//                                  

function Edita(aParams)
 local nRecno:= val(aParams[ 2 ])-1
 local oDlg, oGet1, oGet2, oGet3 ,oGet4
 local cTitle , cFamilien , cVorname
 local cRecno:= alltrim(str(nRecno))
 local oBtn1, oBtn2
   
   USE clients SHARED
   dbgoto(nRecno)
     
   cTitle:=   clients->title
   cFamilien := clients->family
   cVorname  := clients->vorname
   
     
   DEFINE DIALOG oDlg TITLE "Edición registros" SIZE 600, 400
   
   @ 12, 10 SAY "Title:" OF oDlg

   @ 10, 160 GET oGet1 VAR cTitle OF oDlg SIZE 300, 35

   @ 54, 10 SAY "FamilienName:" OF oDlg

   @ 52, 160 GET oGet2 VAR cFamilien OF oDlg SIZE 300, 35

   @ 94, 10 SAY "Vorname:" OF oDlg

   @ 90, 160 GET oGet3 VAR cVorname OF oDlg SIZE 300, 35
   
    @ 9, 190 GET oGet4 VAR cRecno OF oDlg SIZE 300, 35 HIDE
   

   @ 260, 160 BUTTON  oBtn1 PROMPT "Ok" OF oDlg ;
      ACTION ('document.location = "'+appname()+'?edit:"+' + ;
                                  'document.getElementById( "oGet1" ).value.trim() + ":" + '+ ;
                                  'document.getElementById( "oGet2" ).value.trim() + ":" + '+ ;
                                  'document.getElementById( "oGet3" ).value.trim() + ":" + '+ ;
                                  'document.getElementById( "oGet4" ).value.trim() ' )


 
   @ 260, 300 BUTTON  oBtn2 PROMPT "Cancel" OF oDlg ACTION ( oDlg:close() )
   

   ACTIVATE DIALOG oDlg NOWAIT
   
           
   USE

return nil

//----------------------------------------------------------------------------//      

 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FiveWeb

Postby D.Fernandez » Mon Jan 19, 2015 8:56 pm

Gracias...probando.

El ejemplo Otto.prg esta en fiveweb.

Saludos

Gracias.
Dario Fernandez
FWH 22.12, Harbour, MVS2022 Community, BCC, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
D.Fernandez
 
Posts: 455
Joined: Wed Jul 31, 2013 1:14 pm
Location: Maldonado - Uruguay

Re: FiveWeb

Postby cnavarro » Mon Jan 19, 2015 9:10 pm

Ok, mas tranquilo me quedo
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FiveWeb

Postby cdmmaui » Tue Jan 20, 2015 3:39 am

Hi Antonio,

Agreed! I need to use MS SQL.

I would like to convert a Clipweb / xBase++ application to FiveWeb.
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: FiveWeb

Postby Antonio Linares » Tue Jan 20, 2015 6:50 am

Darrell,

Have you been able to successfully run my tutorial ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb

Postby hmpaquito » Tue Jan 20, 2015 8:16 am

Antonio Linares wrote:Paco, Me parece bien. Si nos ponemos de acuerdo en las opciones básicas que se necesitan, yo me comprometo a ir construyéndolo :-)



Para mi un buen ejemplo de programa seria un formulario de pedidos de venta que coja los datos de articulos y clientes. Esos articulos y clientes tendrian su formularios de nuevo-borrar-modificacion. Habria un login de usuario al principio y una impresion del documento "pedido" a pdf. Este es un ejemplo que ya hace algo en concreto.


For me a good example of program would be a form of sales orders that take articles and data customers. These articles and customers would have their forms new-delete-modification. There would be a user login at the beginning and an impression of "order" a pdf document. This is an example that already does something specific.

Regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: FiveWeb

Postby RAMESHBABU » Tue Jan 20, 2015 2:14 pm

Mr.Antonio,

Your tutorial on FiveWeb is excellent. And I could build and test TUTOR01.EXE
Within 15 Mins. from '127.0.0.1/cgi-bin/tutor01.exe', following it.

To test it practically, I copied TUTOR01.EXE to my Website's CGI-BIN Folder and
tried to execute. But failed to get it executed.

My Website is hosted on Windows Server.

Can you please guide me that what are the basic requirements I have to have to
run these .EXE files from my Website (from Windows/Linex Servers).

Regards,

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: FiveWeb

Postby Antonio Linares » Tue Jan 20, 2015 3:46 pm

Ramesh,

I have done all my tests from a Linux server, and never used FiveWeb from a Microsoft IIS server .

But these guides from Microsoft may help you:

http://technet.microsoft.com/en-us/library/cc753077(WS.10).aspx

http://www.wrensoft.com/zoom/support/faq_cgi_iis.html

From a Linux server with Apache, FiveWeb CGI-BIN setup and execution is really straightforward.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb

Postby RAMESHBABU » Wed Jan 21, 2015 12:02 am

Mr.Antonio,

Thank you very much.

I have already gone through the links you have provided and did all my tests without success.

As you have told, Linux is the easiest way to run these CGI Files.

Regards,

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: FiveWeb

Postby joseluisysturiz » Wed Jan 21, 2015 1:13 am

D.Fernandez wrote:Gracias...probando.

El ejemplo Otto.prg esta en fiveweb.

Saludos

Gracias.

Podria poner imagen de ese sample haber que tal se ve.? gracias, saludos... :shock:
Dios no está muerto...

Gracias a mi Dios ante todo!
User avatar
joseluisysturiz
 
Posts: 2064
Joined: Fri Jan 06, 2006 9:28 pm
Location: Guatire - Caracas - Venezuela

Re: FiveWeb

Postby Randal » Wed Jan 21, 2015 4:13 am

Darrell:

Where can I find clipweb? Is this product still for sale?

Thanks,
Randal


cdmmaui wrote:Dear Antonio,

I wanted to find if there has been any progress on FiveWeb? We have customers demanding a web solution and we really need to provide a solid answer on whether we can convert a FiveWin application to FiveWeb. I have developed an application back in early 2000s using xBase++ (1.90) with Clipweb & CSS which has worked very well. With the release of xBase++ (2.0) which allows for SQL integration I need to make a decision on moving to xBase++ 2.0 or FiveWeb. If you could provide some direction I would greatly appreciate it as I need to make a decision by the end of the month.

Thank you in advance for your assistance.

Sincerely,
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: FiveWeb

Postby Antonio Linares » Wed Jan 21, 2015 4:26 am

Randal,

FiveWeb and clipweb basically do the same. They translate portions of your PRGs to HTML. That simple.

If you install FiveWeb as I have explained on this thread and run tutor01.exe and then inspect the HMTL source file that you get on your web browser, you will see that FiveWeb just translates FiveWin alike syntax to HTML + javascript code. So a FiveWeb app is a Harbour EXE that generates HTML + javascript output.

That said, using FiveWeb you have full control on the source code and you can modify and enhance it the way you may needed it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FiveWeb

Postby Antonio Linares » Wed Jan 21, 2015 4:33 am

Ramesh,

I have done some tests with IIS and CGI support on my Windows 8.1 pc. Not sure if it will behave the same on a Windows server:

1. Look for "Turn Windows features on and off" (on Windows 8.1, bottom right corner, then type "turn windows features...")

2. Select Internet Information Services and CGI:

Image

3. Start the IIS service executing: (or simply go to "Administrative Tools", "IIS manager" )

c:\Windows\System32\inetsrv\iis.msc

4. Go to your browser and navigate to 127.0.0.1

5. Go to c:\inetpub\wwwroot\cgi\ and place your FiveWeb EXE there

6. Try to execute 127.0.0.1/cgi-bin/tutor01.exe

http://www.iis.net/configreference/system.webserver/cgi
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests

cron