hola wenos dias
con la clase tsocket puedes hacer la transmision ( reportes, consultas , actualizaciones ) tanto directamente de un programa en windows con fivewin y tambien lo puedes conectar con php para la we o cgi
en este ejemplo del prg recibo la petecion de la web al servidor dbf que tengo construido
case cToken == "PHP>BASES" 聽 聽 聽 // reciviendo la peticion we 聽 聽ME GENERA N ARHIVO WE MAS COMODO PERO SE PIERDE AL INICIO
聽 聽 聽 聽 聽 聽 聽 聽 oStru:=direc() 聽 聽// funcion que regresa la informacion de las bases de datos
聽 聽 聽 聽 聽 聽 聽 聽 cCuantos:=len(oStru) 聽 // cuantos archivos son
聽 聽 聽 聽 聽 聽 聽 聽 empieza= alltrim(StrToken( cData, 2 ))
聽 聽 聽 聽 聽 聽 聽 聽 xfilename:=substr(empieza,2,len(empieza)-1)
聽 聽 聽 聽 聽 聽 聽 聽 xtipo:=substr(empieza,1,2)
聽 聽 聽 聽 聽 聽 聽 聽 cfilename:=substr(cdata,11,len(cdata)-10)
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 axfiles:=obtfiles(cfilename) 聽 聽 //1 archivo 聽 2 聽indice 聽 3 聽 filtro1 聽 4 filtro2 聽8 renglon, 6 tipo
聽 聽 聽 聽 聽 聽 聽 聽 xtipo:=axfiles[6]
聽 聽 聽 聽 聽 聽 聽 聽 i:=0
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 if xtipo="-i"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽i:=1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xaccion:="Inicio de pagina" 聽
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 if xtipo="-f"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽i:=2
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xaccion:="Fin de pagina"
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 if xtipo="-a"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽i:=3
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xaccion:="avanze de pagina"
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 if xtipo="-r"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽i:=4
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xaccion:="Regreso de pagina"
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 if i=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽i:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xaccion:="busqueda incremental we" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 cfilename:=substr(cdata,11,len(cdata)-10)
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 axfiles:=obtfiles(cfilename) 聽 聽 //1 archivo 聽 2 聽indice 聽 3 聽 filtro1 聽 4 filtro2 聽8 renglon, 6 tipo
聽 聽 聽 聽 聽 聽 聽 聽 carchivo:=axfiles[1]
聽 聽 聽 聽 聽 聽 聽 聽 cindice :=axfiles[2]
聽 聽 聽 聽 聽 聽 聽 聽 cfiltro1:=axfiles[3]
聽 聽 聽 聽 聽 聽 聽 聽 cfiltro2:=axfiles[4]
聽 聽 聽 聽 聽 聽 聽 聽 crenglon:=axfiles[5]
聽 聽 聽 聽 聽 聽 聽 聽 ctipon 聽:=axfiles[6]
聽 聽 聽 聽 聽 聽 聽 聽 xbusqueda:=axfiles[7]
聽 聽 聽 聽 聽 聽 聽 聽 xusuario:=axfiles[8]
聽 聽 聽 聽 聽 聽 聽 聽 if i=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 ctipon:="--" 聽 // busqueda incremental we
聽 聽 聽 聽 聽 聽 聽 聽 eNdif
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽select (0)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽use (carchivo) alias (carchivo) 聽 index (carchivo) 聽VIA "DBFCDX" NEW SHARED 聽 聽 聽 //abrimo el archivo de la peticion k
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DATABASE oRegi
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cAlias:=ALIAS()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oStru:=DBSTRUCT() 聽 聽 聽 聽 聽/// copia la estructura
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cCuantos:=oRegi:fcount() 聽 ///numero de campos
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cusuario:="perla"+strzero(narchi,3)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽narchi:=narchi+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// no me lo crea de nuevo si ya esta creado benito
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SELECT (CARCHIVO) 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽// 聽HFILTRO(cfiltro1, cfiltro2, cindice) 聽 聽 // REALIZA EL FILTRO DE LA CONDICION QUE SE ESTA MANDANDO DEPENDIENDO DEL INDICE DADO OK
聽 聽 聽 聽 聽 聽 聽 聽 聽 // msginfo("ulitma posicion del archiv "+carchivo+"/"+str(d_bandera(osocket:nsocket, carchivo)))
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽if ctipoN="--" 聽 聽 聽// BUSQUEDA INCREMENTAL 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//CON LA CLASE DATABASE EL LOAD, SAVE SE ME PERDIA MEJOR LO HACEMOS DE VUELTA OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SET SOFTSEEK ON
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(CARCHIVO)->(DBSEEK(UPPER(XBUSQUEDA)))
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SET SOFTSEEK OFF
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cvan:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PAS:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=""
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽bandera:=1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 manda:="<body>"
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+ "<table STYLE="+chr(34)+"position:absolute;top:40 ;left: 80 px"+chr(34)+" CELLPADDING='1' CELLSPACING='1' BORDER='1' WIDTH='80%' id='browse1'>"
聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+ "<tr 聽bgcolor='#00FFFF'>";
聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 聽//CCUANTOS
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MANDA:=MANDA+"<TD> <font color='#006600'> <b>"+ostru[n][1]+"</B></td>"
聽 聽 聽 聽 聽 聽 聽 聽 NEXT N
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DO WHILE .NOT. EOF()
聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 select (carchivo)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 聽 ///cCUANTOS 聽//para irlo metiendo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ccampo :=carchivo+"->"+alltrim(oStru[N][1]) 聽 聽 //el campo ya modificado
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=&ccampo 聽 聽 聽 // toma el valor del campo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=convierte(xdatos,ostru,n) 聽 聽 聽 聽// convierte el tipo de datos a texto
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"<td onmouseover="+chr(34)+"bgColor='blue'"+chr(34)+" onmouseout="+chr(34)+"bgColor='#FFFFFF'"+chr(34)+" style='cursor:hand' onclick="+chr(34)+"recorrer('browse1',this, $num)"+chr(34)+" <font color='#006600'> <b> "+xdatos+" </b></td>" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Next n
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"</tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (CARCHIVO)->(DBSKIP())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cvan:=cvan+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 bandera:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if cvan>=crenglon 聽// los reglones solicitados
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // esto para probar que tan rapido seria el pagineo okidoki
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ENDDO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</table>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</body>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽c_bandera(xusuario,carchivo,bandera-1) 聽 // con esta funcion llevamos el control de las peticiones y asi mismo el puntero del socket y archivo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽ENDIF 聽 聽// PAGINEO DEL INICIO OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽///////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽if ctipoN="-i" 聽 聽 聽// SI ES EL INICIO ESTA ES LA FORMA OK 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//CON LA CLASE DATABASE EL LOAD, SAVE SE ME PERDIA MEJOR LO HACEMOS DE VUELTA OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(CARCHIVO)->(DBGOTOP())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cvan:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PAS:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=""
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽bandera:=1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 manda:="<body>"
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+ "<table STYLE="+chr(34)+"position:absolute;top:40 ;left: 80 px"+chr(34)+" CELLPADDING='1' CELLSPACING='1' BORDER='1' WIDTH='80%' id='browse1'>"
聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+ "<tr 聽bgcolor='#00FFFF'>";
聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 聽//CCUANTOS
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MANDA:=MANDA+"<TD> <font color='#006600'> <b>"+ostru[n][1]+"</B></td>"
聽 聽 聽 聽 聽 聽 聽 聽 NEXT N
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DO WHILE .NOT. EOF()
聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 select (carchivo)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 聽 ///cCUANTOS 聽//para irlo metiendo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ccampo :=carchivo+"->"+alltrim(oStru[N][1]) 聽 聽 //el campo ya modificado
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=&ccampo 聽 聽 聽 // toma el valor del campo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=convierte(xdatos,ostru,n) 聽 聽 聽 聽// convierte el tipo de datos a texto
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"<td onmouseover="+chr(34)+"bgColor='blue'"+chr(34)+" onmouseout="+chr(34)+"bgColor='#FFFFFF'"+chr(34)+" style='cursor:hand' onclick="+chr(34)+"recorrer('browse1',this, $num)"+chr(34)+" <font color='#006600'> <b> "+xdatos+" </b></td>" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Next n
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (CARCHIVO)->(DBSKIP())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cvan:=cvan+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 bandera:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if cvan>=crenglon 聽// los reglones solicitados
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // esto para probar que tan rapido seria el pagineo okidoki
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ENDDO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</table>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</body>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽c_bandera(xusuario,carchivo,bandera) 聽 // con esta funcion llevamos el control de las peticiones y asi mismo el puntero del socket y archivo
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽ENDIF 聽 聽// PAGINEO DEL INICIO OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽///////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽if ctipoN="-f" 聽 聽 // SI ES EL final del browse
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//CON LA CLASE DATABASE EL LOAD, SAVE SE ME PERDIA MEJOR LO HACEMOS DE VUELTA OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(caRCHIVO)->(dbgotop())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cregistro:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(CARCHIVO)->(DBGOBOTTOM()) 聽 聽//AL FINAL DEL ARCHIVO
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cvan:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PAS:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽bandera:=RECNO()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// o lo metemos a un arreglo o mejor hacemos el recorrido para tras
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(carchivo)->(dbskip(-crenglon+1)) 聽 聽 聽 聽// despues validamos si se pasa del principio
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:="<body>"
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<table STYLE="+chr(34)+"position:absolute;top:40 ;left: 80 px"+chr(34)+" CELLPADDING='1' CELLSPACING='1' BORDER='1' WIDTH='80%' id='browse1'>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<tr 聽bgcolor='#00FFFF'>";
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽FOR N:=1 TO 4 聽//CCUANTOS
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MANDA:=MANDA+"<TD> <font color='#006600'> <b>"+ostru[n][1]+"</B></td>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽NEXT N
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DO WHILE .NOT. EOF()
聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 //cCUANTOS 聽//para irlo metiendo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ccampo :=carchivo+"->"+alltrim(oStru[N][1]) 聽 聽 //el campo ya modificado
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=&ccampo 聽 聽 聽 // toma el valor del campo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=convierte(xdatos,ostru,n) 聽 聽 聽 聽// convierte el tipo de datos a texto
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"<td onmouseover="+chr(34)+"bgColor='blue'"+chr(34)+" onmouseout="+chr(34)+"bgColor='#FFFFFF'"+chr(34)+" style='cursor:hand' onclick="+chr(34)+"recorrer('browse1',this, $num)"+chr(34)+" <font color='#006600'> <b> "+xdatos+" </b></td>" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Next n
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 bandera:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (CARCHIVO)->(DBSKIP())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cvan:=cvan+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ENDDO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</table>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</body>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽c_bandera(xusuario,carchivo,bandera)
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽ENDIF 聽 聽// PAGINEO DEL FINAL OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽/////////////////////////////////////////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽if ctipoN="-a" 聽 聽 // SI ES EL AVANZE DE PAGINA WE
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//CON LA CLASE DATABASE EL LOAD, SAVE SE ME PERDIA MEJOR LO HACEMOS DE VUELTA OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cvan:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PAS:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽bandera:=d_bandera(xusuario, carchivo) 聽 // ESTO NOS DA EL PUNTERO OK
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽GO BANDERA 聽 聽//NOS POSICIONAMOS EN EL ULTIMO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(CARCHIVO)->(DBSKIP()) 聽 // LISTO SEGUIMOS CON EL AVANZE DE PAGINA
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽if eof() // si es final del archivo pues no tenemos mas que poner asi que le restamo al bandera algunos skip ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽// msginfo("es el final de la pagina ok")
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (carchivo)->(dbskip(-crenglon)) 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:="<body>"
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<table STYLE="+chr(34)+"position:absolute;top:40 ;left: 80 px"+chr(34)+" CELLPADDING='1' CELLSPACING='1' BORDER='1' WIDTH='80%' id='browse1'>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<tr 聽bgcolor='#00FFFF'>";
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽FOR N:=1 TO 4 聽//CCUANTOS
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MANDA:=MANDA+"<TD> <font color='#006600'> <b>"+ostru[n][1]+"</B></td>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽NEXT N
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DO WHILE .NOT. EOF()
聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 select (carchivo)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 聽 聽//cCUANTOS 聽//para irlo metiendo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽if n=ccuantos
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cultimo:=""
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ccampo :=carchivo+"->"+alltrim(oStru[N][1]) 聽 聽 //el campo ya modificado
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=&ccampo 聽 聽 聽 // toma el valor del campo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=convierte(xdatos,ostru,n) 聽 聽 聽 聽// convierte el tipo de datos a texto
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"<td onmouseover="+chr(34)+"bgColor='blue'"+chr(34)+" onmouseout="+chr(34)+"bgColor='#FFFFFF'"+chr(34)+" style='cursor:hand' onclick="+chr(34)+"recorrer('browse1',this, $num)"+chr(34)+" <font color='#006600'> <b> "+xdatos+" </b></td>" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Next n
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"</tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 bandera:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if recno()=cregistro 聽 聽// si el resgitro es el primero de la tabla pues finalizalo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (CARCHIVO)->(DBSKIP())
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cvan:=cvan+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if cvan>=crenglon 聽// los reglones solicitados
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // esto para probar que tan rapido seria el pagineo okidoki
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ENDDO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</table>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</body>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽c_bandera(xusuario,carchivo,bandera) 聽 聽 聽// AQUI MANDAMOS LA ULTIMA POSICION OK PARA EL PUNTERO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽ENDIF 聽 聽// PAGINEO DEL FINAL OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽///////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽if ctipoN="-r" 聽 聽 // SI ES EL REGRESO DE PAGINA WE
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//CON LA CLASE DATABASE EL LOAD, SAVE SE ME PERDIA MEJOR LO HACEMOS DE VUELTA OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cvan:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽PAS:=0
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽bandera:=d_bandera(xusuario, carchivo) 聽 // ESTO NOS DA EL PUNTERO OK
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽GO BANDERA 聽 聽//NOS POSICIONAMOS EN EL ULTIMO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽(CARCHIVO)->(DBSKIP(-(crenglon*2-1))) 聽 // LISTO SEGUIMOS CON EL REGRESO DE PAGINA
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:="<body>"
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<table STYLE="+chr(34)+"position:absolute;top:40 ;left: 80 px"+chr(34)+" CELLPADDING='1' CELLSPACING='1' BORDER='1' WIDTH='80%' id='browse1'>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+ "<tr 聽bgcolor='#00FFFF'>";
聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽FOR N:=1 TO 4 聽//CCUANTOS
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 MANDA:=MANDA+"<TD> <font color='#006600'> <b>"+ostru[n][1]+"</B></td>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽NEXT N
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽DO WHILE .NOT. EOF()
聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 select (carchivo)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"<tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 FOR N:=1 TO 4 //cCUANTOS 聽//para irlo metiendo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽if n=ccuantos
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cultimo:=""
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ccampo :=carchivo+"->"+alltrim(oStru[N][1]) 聽 聽 //el campo ya modificado
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=&ccampo 聽 聽 聽 // toma el valor del campo
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽xdatos:=convierte(xdatos,ostru,n) 聽 聽 聽 聽// convierte el tipo de datos a texto
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"<td onmouseover="+chr(34)+"bgColor='blue'"+chr(34)+" onmouseout="+chr(34)+"bgColor='#FFFFFF'"+chr(34)+" style='cursor:hand' onclick="+chr(34)+"recorrer('browse1',this, $num)"+chr(34)+" <font color='#006600'> <b> "+xdatos+" </b></td>" 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Next n
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 manda:=manda+"</tr>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 bandera:=recno()
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if recno()=cregistro 聽 聽// si el resgitro es el primero de la tabla pues finalizalo ok
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 SELECT (CARCHIVO)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 (CARCHIVO)->(DBSKIP(1))
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 cvan:=cvan+1
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 if cvan>=crenglon 聽// los reglones solicitados
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽exit
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 // esto para probar que tan rapido seria el pagineo okidoki
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ENDDO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</table>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽manda:=manda+"</body>"
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽c_bandera(xusuario,carchivo,bandera) 聽 聽 聽// AQUI MANDAMOS LA ULTIMA POSICION OK PARA EL PUNTERO
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽ENDIF 聽 聽// PAGINEO DEL FINAL OKIDOKI
聽 聽 聽 聽 聽 聽 聽 聽///////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽
聽 聽 聽 聽 聽 聽 聽 聽/////////////////////////////////////////////////////////////////////////////////////
聽 聽 聽 聽 聽 聽 聽 聽close (carchivo)
聽 聽 聽 聽 聽 聽 聽 聽oClient:SendData( MANDA, msoc ) 聽 聽// ay que mandale el tama帽o si no se pierde 聽 el mendigo desgraciado
聽 聽 聽 聽 聽 聽 聽 聽oclient:end()
y asi lo pido en la pagina php
<?php
$tipoDato=$_POST['d'];
$cadena=$_POST['d'];
echo $_POST['d'];
if($tipoDato=='-i')
聽 聽{ $tipoDato="-i";
聽 聽 聽echo 'Inicio de pagina we ';
聽 聽}
elseif($tipoDato=="-f")
聽 聽{ $tipoDato="-f";
聽 聽 聽echo 'Final de pagina ';
聽 聽 聽}
if($tipoDato=='-a')
聽 聽{ $tipoDato="-a";
聽 聽 聽echo 'Avance de pagina ';
聽 聽 }
elseif($tipoDato=="-r")
聽 聽{ $tipoDato="-r";
聽 聽 聽echo 'Regreso de pagina ';
聽 聽} 聽
聽else
聽 聽{
聽 聽 聽echo "ninguna we";
聽 聽 聽
聽 聽}
/* Obtener el puerto para el servicio WWW. */
$service_port = 3850;
/* Obtener la direcci贸n IP para el host objetivo. */
$address = gethostbyname('192.168.1.64');
/* Crear un socket TCP/IP. */
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket === false) {
聽 聽 echo "socket_create() fall贸: raz贸n: " . socket_strerror(socket_last_error()) . "\n";
} else {
聽
}
$result = socket_connect($socket, $address, $service_port);
if ($result === false) {
聽 聽 echo "socket_connect() fall贸.\nRaz贸n: ($result) " . socket_strerror(socket_last_error($socket)) . "\n";
} else {
}
$usuario = "Benjamino";
$in = "PHP>BASES produ,1,fitrol1,filtro2,15,$tipoDato,$cadena,$usuario";
$out = '';
socket_write($socket, $in, strlen($in));
while ($out = socket_read($socket, 4048)) {
聽 聽 echo $out;
}
socket_close($socket);
echo "hola we que ondas ";
echo "<script> alert('hola we 聽kkdkkf') </script>"
?>
y este mismo tengo una clase para php,, para el llamado simplificado
que con este codigo ,, puedes generar cualquier tipo de consulta -- reportes --actualizaciones asi mismo realizar un rutina de sincronizacion
todo esto sin depender de advante server, ni sql ni msql
simplemente puro dbf/cdx /ntx
si te fijas en en codigo abre x archivo abre su archivo indexe y automaticamente tu ya puedes hacer consultas de cualquier tipo
este codigo que manda con los sockets genera un codigo html que muestra en la web un browse del archivo seleccionando dinamicamente
y solamante manda los registros que le indiques ,, y hace un pagineo y una busqueda incremental en la web que con ajax y php se ve de pelos
saludos
Benjamin Casarrubias Moreno
Cd. Obreg贸n, Sonora, M茅xico
chino72vale@hotmail.com
Fivewin 24.04, Harbour 3.3, xharbour 1.2.1, Fivelinux, Visual Estudio 2022
Oracle Api Rest, SDK Contpaq, Facturaci贸n Electr贸nica, XML DIOT 2025