PARAMETERS cBdd, cIdView, cIdServ


SET TALK off
SET STATUS BAR OFF
SET SYSMENU off
SET DELETED on
SET CONFIRM OFF
SET NOTIFY off
SET SAFETY off
SET CENTURY ON
SET DATE TO DMY
SET FIXED OFF
SET DECIMALS TO 5
SET ESCAPE On


IF EMPTY(cIdServ)
	cIdServ = '1'
ENDIF


_screen.Caption = 'Ghost-Server '+cIdServ
_screen.AutoCenter= .T.
_screen.Icon = 'procesos.ICO'
_screen.Width  = 500
_screen.height = 120

_screen.Closable = .f.
*_screen.AutoCenter = .t.
_screen.Show
_screen.BorderStyle=3
_screen.MaxButton= .F.



PUBLIC lSalir

lSalir=.F.

ON ESCAPE lSalir=.t.


IF EMPTY(cBdd)
	cBdd='fss1'
ENDIF

DECLARE Sleep IN Win32API INTEGER   


*** Clases para el manejo de Web
SET PATH TO ".\classes" ADDITIVE

SET PROCEDURE TO wwHTTP ADDITIVE   
SET PROCEDURE TO wwAPI ADDITIVE
SET PROCEDURE TO wwFTP ADDITIVE
SET PROCEDURE TO wwUtils ADDITIVE

DO source\app.prg WITH cBdd

DO source\invoicer.prg

*SET PATH TO ".\json\boleteria" ADDITIVE
SET PATH TO ".\json\" ADDITIVE


DO json\js.prg WITH cbdd, cIdView, cIdServ


DO json\json_cliente.prg

IF oJs.ltest
	_screen.WindowState = 2	
ELSE
	_screen.WindowState = 1
ENDIF


DO stock.prg

DO FORM json

Read Events

_SCREEN.WindowState = 2
CLEAR ALL
CLOSE ALL
SET SYSMENU TO defa
On SHUTDOWN 
Clear Events 
IF _vfp.StartMode > 0
	QUIT 
ENDIF


_screen.ControlBox= .T.
_screen.MaxButton= .T.
_screen.Closable = .T.

