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?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>
<a href="muestradatos.prg?tipo=<?prg return cAyS ?>">
<button type="button" class="btn btn-sm btn-success">Acción <br> Suspenso</button></a>
<a href="muestradatos.prg?tipo=<?prg return cArM ?>">
<button type="button" class="btn btn-sm btn-success">Artes<br>Marciales</button></a>
<a href="muestradatos.prg?tipo=<?prg return cFyH ?>">
<button type="button" class="btn btn-sm btn-success">Ficción <br> Héroes</button></a>
 
<a href="muestradatos.prg?tipo=<?prg return cAyC ?>">
<button type="button" class="btn btn-sm btn-success">Aventuras <br> Comedias</button></a>
<br><br>
<a href="muestradatos.prg?tipo=<?prg return cRyD ?>">
<img src="images/ryd.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cTyH ?>">
<img src="images/tyh.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cBel ?>">
<img src="images/bel.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cMed ?>">
<img src="images/med.jpg" width="90" height="60"></a>
<br>
<a href="muestradatos.prg?tipo=<?prg return cRyD ?>">
<button type="button" class="btn btn-sm btn-success">Romance <br> Drama</button></a>
<a href="muestradatos.prg?tipo=<?prg return cTyH ?>">
<button type="button" class="btn btn-sm btn-success">Terror <br> Horror</button></a>
<a href="muestradatos.prg?tipo=<?prg return cBel ?>">
<button type="button" class="btn btn-sm btn-success">Bélicas <br> Guerra </button></a>
<a href="muestradatos.prg?tipo=<?prg return cMed ?>">
<button type="button" class="btn btn-sm btn-success">Medieval <br> Ed.Media</button></a>
<br><br>
<a href="muestradatos.prg?tipo=<?prg return cCla ?>">
<img src="images/cla.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cOes ?>">
<img src="images/oes.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cCri ?>">
<img src="images/cri.jpg" width="90" height="60"></a>
<a href="muestradatos.prg?tipo=<?prg return cTod ?>">
<img src="images/todas.jpg" width="90" height="60"></a>
<br>
<a href="muestradatos.prg?tipo=<?prg return cCla ?>">
<button type="button" class="btn btn-sm btn-success">Clásicas</button></a>
<a href="muestradatos.prg?tipo=<?prg return cOes ?>">
<button type="button" class="btn btn-sm btn-success">Oeste</button></a>
<a href="muestradatos.prg?tipo=<?prg return cCri ?>">
<button type="button" class="btn btn-sm btn-success">Cristianas</button></a>
<a href="muestradatos.prg?tipo=<?prg return cTod ?>">
<button type="button" class="btn btn-sm btn-success">Todas</button></a></center>
<br>
<center><b><h6>TV-SERIES - TELENOVELAS</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
#define PATH_DATA HB_GetEnv( "PRGPATH" ) + '/data/'
REQUEST HB_CODEPAGE_ES850
REQUEST DBFCDX
REQUEST DBFFPT
Function Main()
Local cAlias,aRows := {},cRows,cTit:="TODAS"
local hHash := AP_GetPairs()
local cTipo := ""
? ValToChar( hHash )
? hb_HGetDef(hHash,"tipo", "no" )
logline( "hHash", ValToChar( hHash ) )
logline( "hHash-key", hb_HGetDef(hHash,"tipo", "no" ) )
cTipo := hb_HGetDef(hHash,"tipo", "no" )
If cTipo="AyS"
cTit:="ACCI�N - SUSPENSO"
ElseIf cTipo="FyH"
cTit:="FICCI�N - H�ROES"
ElseIf cTipo="ArM"
cTit:="ARTES MARCIALES"
ElseIf cTipo="AyC"
cTit:="AVENTURA - COMEDIA"
ElseIf cTipo="RyD"
cTit:="ROMANCE - DRAMA"
ElseIf cTipo="TyH"
cTit:="TERROR - HORROR"
ElseIf cTipo="Bel"
cTit:="B�LICAS - GUERRA"
ElseIf cTipo="Med"
cTit:="MEDIEVALES - EDAD MEDIA"
ElseIf cTipo="Cla"
cTit:="CL�SICAS - ANTIGUAS"
ElseIf cTipo="Oes"
cTit:="OESTE - PISTOLEROS"
ElseIf cTipo="Cri"
cTit:="CRISTIANAS - RELIGIOSAS"
ElseIf cTipo="Tod"
cTit:="MUESTRA TODAS"
Endif
USE ( PATH_DATA+'movies.dbf' ) SHARED NEW VIA 'DBFCDX'
If cTipo="Tod"
INDEX ON field->nombre TAG "nombre" MEMORY
Else
INDEX ON field->nombre TAG "nombre" FOR field->tipo=cTipo 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
function logline( cText, cWert )
local cLog
cLog := memoread( hb_GetEnv( "PRGPATH" ) + "/prg.log" )
if VALTYPE(cText) = "U"
cText := ""
endif
if VALTYPE(cWert) = "U"
cWert := ""
endif
cLog += ALLTRIM( str(procline(1)) ) + " " + PadR( cText, 60 ) + ": " + cWert + CRLF
MEMOWRIT( hb_GetEnv( "PRGPATH" ) + "/prg.log" , cLog, .f. )
return nil
//----------------------------------------------------------------------------//
"AyS" $ AP_Args() //Funciona Perfecto.
500
Internal Server Error
VersionHTTP/1.1
Übertragen1,03 kB (1,17 kB Größe)
Referrer Policystrict-origin-when-cross-origin
Anfrage-PrioritätHigh
Accept-Ranges
bytes
Connection
close
Content-Encoding
gzip
Content-Language
de
Content-Length
694
Content-Type
text/html; charset=utf-8
Date
Thu, 24 Nov 2022 16:00:23 GMT
Server
Apache/2.4.43 (Win64) OpenSSL/1.1.1b PHP/7.4.5
Vary
accept-language,accept-charset,Accept-Encoding
Accept
image/avif,image/webp,*/*
Accept-Encoding
gzip, deflate, br
Accept-Language
de,en-US;q=0.7,en;q=0.3
Connection
keep-alive
Host
xxxxx.com
Referer
https://xxxxx.com/cgi-bin/moviecenter/main.prg
Sec-Fetch-Dest
image
Sec-Fetch-Mode
no-cors
Sec-Fetch-Site
same-origin
User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
C:\Apache24\htdocs\images
Users browsing this forum: No registered users and 8 guests