Great news regarding mod_harbour CGI !!!
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Great news regarding mod_harbour CGI !!!
Thanks to superb help from Lailton (big thank you Master), now mod_harbour CGI supports all these URL formats:
http://localhost/test
http://localhost/test.prg
http://localhost/test?name=fivetech&ano ... dmuch=more
http://localhost/test.prg?name=fivetech ... dmuch=more
http://localhost/cgi-bin/modharbour.exe?test.prg
http://localhost/cgi-bin/modharbour.exe ... dmuch=more
Simply copy modharbour.exe and DLLs from here to your cgi-bin folder:
https://github.com/FiveTechSoft/mod_har ... gi/windows
Copy .hcaccess to apache/htdocs:
https://github.com/FiveTechSoft/mod_har ... /.htaccess
And use this Apache configuration file:
https://github.com/FiveTechSoft/mod_har ... httpd.conf
and enjoy the power and robustness of mod_harbour CGI. Rock solid! Watch the video bellow:
https://github.com/FiveTechSoft/screens ... f?raw=true
http://localhost/test
http://localhost/test.prg
http://localhost/test?name=fivetech&ano ... dmuch=more
http://localhost/test.prg?name=fivetech ... dmuch=more
http://localhost/cgi-bin/modharbour.exe?test.prg
http://localhost/cgi-bin/modharbour.exe ... dmuch=more
Simply copy modharbour.exe and DLLs from here to your cgi-bin folder:
https://github.com/FiveTechSoft/mod_har ... gi/windows
Copy .hcaccess to apache/htdocs:
https://github.com/FiveTechSoft/mod_har ... /.htaccess
And use this Apache configuration file:
https://github.com/FiveTechSoft/mod_har ... httpd.conf
and enjoy the power and robustness of mod_harbour CGI. Rock solid! Watch the video bellow:
https://github.com/FiveTechSoft/screens ... f?raw=true
Re: Great news regarding mod_harbour CGI !!!
Estimado Antonio
Logré que funcione, pero no muestra las imágenes
Antes pasaba una variable así
Da error
Ahora cómo se hace?
Gracias por la ayuda
Logré que funcione, pero no muestra las imágenes
Antes pasaba una variable así
Code: Select all | Expand
Local cArM:="ArM"
<a href="MuestraDatos.prg?<?prg return cArM ?>">
Ahora cómo se hace?
Gracias por la ayuda
Saludos,
Adhemar C.
Adhemar C.
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Great news regarding mod_harbour CGI !!!
Que error te dá ?
Puedes proporcionar el PRG completo ?
Puedes proporcionar el PRG completo ?
Re: Great news regarding mod_harbour CGI !!!
Gracias estimado Antonio por responder
El error es que directamente descarga MuestraDatos.prg al dar click al botón
Aquí el MuestraDatos.prg
También no muestra las imágenes
Muchas gracias por la ayuda
El error es que directamente descarga MuestraDatos.prg al dar click al botón
Code: Select all | Expand
Function main
local cAyS:="AyS",cArM:="ArM",cFyH:="FyH",cAyC:="AyC",cRyD:="RyD",cTyH:="TyH",cBel:="Bel",cMed:="Med",cCla:="Cla",cOes:="Oes",cCri:="Cri",cTod:="Tod"
TEMPLATE PARAMS cAyS,cArM,cFyH,cAyC,cRyD,cTyH,cBel,cMed,cCla,cOes,cCri,cTod
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="description" content="">
<meta name="author" content="Adhemar Cuéllar R.">
<meta name="copyright" content="AcrSoft System ©2022">
<link rel="icon" href="images/MovieCenter.ico" type="image/x-icon">
<link rel="shortcut icon" href="images/MovieCenter.ico" type="image/x-icon">
<title>MovieCenter</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<center><b><h7>MOVIE CENTER La mejor opción para elegir que mirar</h7></b></center>
<div align="center"><img src="cgi-bin/images/poster.jpg" width="200" height="250"></div>
<center><b><h6>PELÍCULAS</h6></b></center>
<center>
<a href="MuestraDatos.prg?<?prg return cAyS ?>">
<img src="images/ays.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cArM ?>">
<img src="images/arm.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cFyH ?>">
<img src="images/fyh.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cAyC ?>">
<img src="images/ayc.jpg" width="90" height="60"></a>
<br>
<a href="MuestraDatos.prg?<?prg return cAyS ?>">
<button type="button" class="btn btn-sm btn-success">Acción <br> Suspenso</button></a>
<a href="MuestraDatos.prg?<?prg return cArM ?>">
<button type="button" class="btn btn-sm btn-success">Artes<br>Marciales</button></a>
<a href="MuestraDatos.prg?<?prg return cFyH ?>">
<button type="button" class="btn btn-sm btn-success">Ficción <br> Héroes</button></a>
 
<a href="MuestraDatos.prg?<?prg return cAyC ?>">
<button type="button" class="btn btn-sm btn-success">Aventuras <br> Comedias</button></a>
<br><br>
<a href="MuestraDatos.prg?<?prg return cRyD ?>">
<img src="images/ryd.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cTyH ?>">
<img src="images/tyh.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cBel ?>">
<img src="images/bel.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cMed ?>">
<img src="images/med.jpg" width="90" height="60"></a>
<br>
<a href="MuestraDatos.prg?<?prg return cRyD ?>">
<button type="button" class="btn btn-sm btn-success">Romance <br> Drama</button></a>
<a href="MuestraDatos.prg?<?prg return cTyH ?>">
<button type="button" class="btn btn-sm btn-success">Terror <br> Horror</button></a>
<a href="MuestraDatos.prg?<?prg return cBel ?>">
<button type="button" class="btn btn-sm btn-success">Bélicas <br> Guerra </button></a>
<a href="MuestraDatos.prg?<?prg return cMed ?>">
<button type="button" class="btn btn-sm btn-success">Medieval <br> Ed.Media</button></a>
<br><br>
<a href="MuestraDatos.prg?<?prg return cCla ?>">
<img src="images/cla.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cOes ?>">
<img src="images/oes.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cCri ?>">
<img src="images/cri.jpg" width="90" height="60"></a>
<a href="MuestraDatos.prg?<?prg return cTod ?>">
<img src="images/todas.jpg" width="90" height="60"></a>
<br>
<a href="MuestraDatos.prg?<?prg return cCla ?>">
<button type="button" class="btn btn-sm btn-success">Clásicas</button></a>
<a href="MuestraDatos.prg?<?prg return cOes ?>">
<button type="button" class="btn btn-sm btn-success">Oeste</button></a>
<a href="MuestraDatos.prg?<?prg return cCri ?>">
<button type="button" class="btn btn-sm btn-success">Cristianas</button></a>
<a href="MuestraDatos.prg?<?prg return cTod ?>">
<button type="button" class="btn btn-sm btn-success">Todas</button></a></center>
<br>
<center><b><h6></h6></b></center>
<br><br><br>
<a href="https://adhemarcr.github.io/acrsoft/"> <img
src="images/lAcrSoft.jpg" align="left"> <br> Soluciones Informáticas
<br> Analista de Sistemas-FRELANCE</a>
</div>
</div>
</body>
</html>
ENDTEXT
return
Code: Select all | Expand
#define PATH_DATA HB_GetEnv( "PRGPATH" ) + '/data/'
REQUEST HB_CODEPAGE_ES850
REQUEST DBFCDX
REQUEST DBFFPT
Function Main()
Local cAlias,aRows := {},cRows,cTit:="TODAS"
If AP_Args()="AyS"
cTit:="ACCIÓN - SUSPENSO"
ElseIf AP_Args()="FyH"
cTit:="FICCIÓN - HÉROES"
ElseIf AP_Args()="ArM"
cTit:="ARTES MARCIALES"
ElseIf AP_Args()="AyC"
cTit:="AVENTURA - COMEDIA"
ElseIf AP_Args()="RyD"
cTit:="ROMANCE - DRAMA"
ElseIf AP_Args()="TyH"
cTit:="TERROR - HORROR"
ElseIf AP_Args()="Bel"
cTit:="BÉLICAS - GUERRA"
ElseIf AP_Args()="Med"
cTit:="MEDIEVALES - EDAD MEDIA"
ElseIf AP_Args()="Cla"
cTit:="CLÁSICAS - ANTIGUAS"
ElseIf AP_Args()="Oes"
cTit:="OESTE - PISTOLEROS"
ElseIf AP_Args()="Cri"
cTit:="CRISTIANAS - RELIGIOSAS"
ElseIf AP_Args()="Tod"
cTit:="MUESTRA TODAS"
Endif
USE ( PATH_DATA+'movies.dbf' ) SHARED NEW VIA 'DBFCDX'
If AP_Args()="Tod"
INDEX ON field->nombre TAG "nombre" FOR !Empty(field->ext) MEMORY
Else
INDEX ON field->nombre TAG "nombre" FOR field->tipo=AP_Args() .and. !Empty(field->ext) MEMORY
Endif
cAlias := Alias()
Do While !Eof()
Aadd( aRows, { 'nombre' => (cAlias)->nombre ,;
'duracion' => (cAlias)->duracion ,;
'reparto' => (cAlias)->reparto ,;
'nomchar' => (cAlias)->nomchar })
(cAlias)->( dbskip() )
EndDo
USE
cRows:=hb_jsonencode(aRows)
TEMPLATE PARAMS cRows,cTit
<!DOCTYPE html>
<html lang="es">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=0.7">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<link rel="icon" href="images/admcon.ico" type="image/x-icon">
<link rel="shortcut icon" href="admcon.ico" type="image/x-icon">
<title>Movie Center</title>
<div class="container">
<center><b><h5> <?prg return cTit ?> </h5></b></center>
</div>
<style>
.fixed-height {
height: 200px;
overflow-y: auto;
}
thead {
background-color: Grey;
color: white;
}
</style>
</head>
<body>
<div class="container ">
<div class="fixed-table-container fixed-height" style="height: 350px; padding-bottom: 35.5938px;">
<table id="table" table-bordered data-toggle="table" data-show-footer="true" data-search="true">
<thead>
<tr>
<th data-field="nombre" data-footer-formatter="totalFormatter" data-sortable="true">NOMBRE</th>
<th data-field="duracion" data-footer-formatter="cuantosFormatter">DURA</th>
<th data-field="reparto" data-sortable="true" >REPARTO</th>
<th data-field="nomchar" </th>
</tr>
</thead>
</table>
</div>
</div>
<script>
var picture = new Intl.NumberFormat('en-US');
function totalFormatter() {
return 'Totales '
}
function cuantosFormatter(data) {
return picture.format(data.length)
}
var $table = $('#table')
$(function() {
var data = <?prg return cRows ?>
$table.bootstrapTable({data: data})
$table.bootstrapTable('hideColumn', 'nomchar')
})
</script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/print/bootstrap-table-print.min.js"></script>
</body>
<div class="container">
<center><a href="javascript: history.go(-1)">Volver</a></center>
<br>
<a href="https://adhemarcr.github.io/acrsoft/"> <img
src="images/lAcrSoft.jpg" align="left"> <br> Soluciones Informáticas
<br> Analista de Sistemas-FRELANCE</a>
</div>
</html>
ENDTEXT
Return
*
INIT PROCEDURE PrgInit
HB_SetCodePage("ESWIN");HB_CDPSELECT("ESWIN")
rddSetDefault( "DBFCDX" )
SET CENTURY OFF
SET EPOCH TO YEAR(DATE())-50
SET DELETED ON
SET EXCLUSIVE OFF
SET DATE TO FREN
SET( _SET_SOFTSEEK, .T. )
EXTERN DESCEND
Return
Muchas gracias por la ayuda
Saludos,
Adhemar C.
Adhemar C.
Re: Great news regarding mod_harbour CGI !!!
Adhemar, I installed your program.
What should I test?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: Great news regarding mod_harbour CGI !!!
Adhemar,
is this the error?
Best regards,
Otto
https://w ..........g/cgi-bin/adhemar/images/lAcrSoft.jpg
Server error!
The request cannot be answered because an internal error occurred in the server. The server is either overloaded or an error occurred in a CGI script.
If you think this is a server malfunction, please inform the webmaster about this.
Error 500
Apache/2.4.43 (Win64) OpenSSL/1.1.1b PHP/7.4.5
is this the error?
Best regards,
Otto
https://w ..........g/cgi-bin/adhemar/images/lAcrSoft.jpg
Server error!
The request cannot be answered because an internal error occurred in the server. The server is either overloaded or an error occurred in a CGI script.
If you think this is a server malfunction, please inform the webmaster about this.
Error 500
Apache/2.4.43 (Win64) OpenSSL/1.1.1b PHP/7.4.5
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Great news regarding mod_harbour CGI !!!
Estimado Adhemar,
Prueba a hacerlo asi:
http://localhost/muestradatos?tipo=AyS
<a href="MuestraDatos.prg?tipo=<?prg return cAyS ?>">
ó
<a href="MuestraDatos?tipo=<?prg return cAyS ?>">
Aquí funciona bien usando ese modo
Prueba a hacerlo asi:
http://localhost/muestradatos?tipo=AyS
<a href="MuestraDatos.prg?tipo=<?prg return cAyS ?>">
ó
<a href="MuestraDatos?tipo=<?prg return cAyS ?>">
Aquí funciona bien usando ese modo
Re: Great news regarding mod_harbour CGI !!!
Thanks dear Otto
please download the full project
https://drive.google.com/file/d/1d2efdc ... TuW-y/view
Try
http://localhost/MovieCenter/main
Thanks for your help
please download the full project
https://drive.google.com/file/d/1d2efdc ... TuW-y/view
Try
http://localhost/MovieCenter/main
Thanks for your help
Saludos,
Adhemar C.
Adhemar C.
Re: Great news regarding mod_harbour CGI !!!
Dear Adhemar,
I have the same problem with images.
https://myserver.com/cgi-bin/moviecente ... poster.jpg
These errors out.
Here I think we need Antonio's help.
Best regards,
Otto
PS: Great APP!
I have the same problem with images.
https://myserver.com/cgi-bin/moviecente ... poster.jpg
These errors out.
Here I think we need Antonio's help.
Best regards,
Otto
PS: Great APP!
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: Great news regarding mod_harbour CGI !!!
Dear Adhemar,
what Antonio suggests for link is working fine for me:
But JPG is not working.
Best regards,
Otto
PS: If you have some time, I will show you my patcher and preprocessor.
what Antonio suggests for link is working fine for me:
Code: Select all | Expand
<a href="muestradatos.prg?tipo=<?prg return cAyS ?>">
<img src="images/ays.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cArM ?>">
<img src="images/arm.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cFyH ?>">
<img src="images/fyh.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cAyC ?>">
<img src="images/ayc.jpg" width="90" height="60"></a>
<br>
Best regards,
Otto
PS: If you have some time, I will show you my patcher and preprocessor.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: Great news regarding mod_harbour CGI !!!
Dear Adhemar,
It is a very simple system but makes the source code much clearer.
It is similar to the Inklude files. But here I have a patcher that publishes the prg file.
Also included is a preprocessor.
Here we have for example |tipo| as placeholder. You can make as many placeholders as you want.
Write me if you are interested.
Best regards,
Otto
It is a very simple system but makes the source code much clearer.
It is similar to the Inklude files. But here I have a patcher that publishes the prg file.
Also included is a preprocessor.
Here we have for example |tipo| as placeholder. You can make as many placeholders as you want.
Write me if you are interested.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: Great news regarding mod_harbour CGI !!!
Estimado Antonio
De ésta manera abre Muestradatos.prg
En muestradatos AP_Args() ya no recibe la variable
Cómo tengo que preguntar?
AP_Args()="AyS" no pasa nada
Si coloco
tipo="AyS" dice no existe la variable tipo
Muchas gracias por la ayuda
De ésta manera abre Muestradatos.prg
Code: Select all | Expand
<a href="MuestraDatos?tipo=<?prg return cAyS ?>">
Cómo tengo que preguntar?
AP_Args()="AyS" no pasa nada
Si coloco
tipo="AyS" dice no existe la variable tipo
Muchas gracias por la ayuda
Saludos,
Adhemar C.
Adhemar C.
Re: Great news regarding mod_harbour CGI !!!
This should be:
Code: Select all | Expand
<a href="MuestraDatos.prg?tipo=<?prg return cAyS ?>">
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Great news regarding mod_harbour CGI !!!
Prueba con este muestradatos.prg
salida:
Code: Select all | Expand
function Main()
? AP_GetPairs()
return nil
{
"tipo": "AyS"
}
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Great news regarding mod_harbour CGI !!!
Revísalo o copialo aqui completo para ver donde tienes el error. Aqui AP_Args() devuelve esto:acuellar wrote:Estimado Antonio
De ésta manera abre Muestradatos.prgEn muestradatos AP_Args() ya no recibe la variableCode: Select all | Expand
<a href="MuestraDatos?tipo=<?prg return cAyS ?>">
Cómo tengo que preguntar?
AP_Args()="AyS" no pasa nada
Si coloco
tipo="AyS" dice no existe la variable tipo
Muchas gracias por la ayuda
Luego tendrias que usar:muestradatos.prg&tipo=AyS
if "AyS" $ AP_Args()