noche, actualiza tablas eventos

This commit is contained in:
mynah
2018-07-19 03:45:46 -05:00
parent 5a7566eaf7
commit e25fc46010
31 changed files with 207 additions and 258 deletions

View File

@@ -19,7 +19,10 @@ sub admin{
my $c=shift; my $c=shift;
my $n=$c->param("dreq")//""; my $n=$c->param("dreq")//"";
my $json = {status => "304"}; my $json = {status => "304"};
$json= ($c->dbv->rmsgid($c->param('id')))[0] if ($n =~m/^mensajes$/); $json = ($c->dbv->rmsgid ($c->param('id')))[0] if ($n =~m/^mensajes$/);
$json = ($c->dbv->ecourse($c->param('id')))[0] if ($n =~m/^ecourse$/);
$json = ($c->dbv->qcourse($c->param('id')))[0] if ($n =~m/^qcourse$/);
$json = ($c->dbv->qplace ($c->param('id')))[0] if ($n =~m/^qplace$/);
$c->render(json=>$json); $c->render(json=>$json);
} }
#==== candy ===================================================== #==== candy =====================================================

View File

@@ -1,7 +1,7 @@
package Dojo::Controller::Home; package Dojo::Controller::Home;
use Mojo::Base 'Mojolicious::Controller'; use Mojo::Base 'Mojolicious::Controller';
use Mojo::Template; use Mojo::Template;
use Dojo::Support qw{ dmph merge_hash load_module }; use Dojo::Support qw{ log dmph merge_hash load_module get_names};
use Dojo::Conf; use Dojo::Conf;
sub tst{ sub tst{
@@ -13,6 +13,10 @@ sub tst{
# $c->stash(apend => ["home/contact"]); # $c->stash(apend => ["home/contact"]);
$c->stash( (load_module("home/tst"))[0] ); $c->stash( (load_module("home/tst"))[0] );
$c->stash(layout=> "defaultContact"); $c->stash(layout=> "defaultContact");
my $x = [get_names("public/home/cal/img/")];
log("@$x");
$c->stash( ilist => $x);
} }
sub home { sub home {
@@ -98,9 +102,24 @@ sub radio{
sub admin{ sub admin{
my $c=shift; my $c=shift;
if ($c->param("hup")=~/Cambiar/){ if (($c->param("hup") // " " )=~/Cambiar/){
$c->dbv->umod($c->param('link'),$c->param('update')); $c->dbv->umod($c->param('link'),$c->param('update'));
}; }
### ¡¡aqui me quede!! puedo hacerlo mas facil con router!!!! ###
if ( $c->param("update") // 0 ) ==1 ){
if ($c->param("id") // 1 ) == 0) ){
$c->dbv->eup($c) if (($c->param("eup") // " " )=~/Aceptar/)
elsif(($c->param("cup") // " " )=~/Aceptar/){ $c->dbv->cup($c); }
elsif(($c->param("pup") // " " )=~/Aceptar/){ $c->dbv->pup($c); }
else{
elsif(($c->param("eup") // " " )=~/Aceptar/){ $c->dbv->ech($c); }
elsif(($c->param("cup") // " " )=~/Aceptar/){ $c->dbv->cch($c); }
elsif(($c->param("pup") // " " )=~/Aceptar/){ $c->dbv->pch($c); }
elsif(($c->param("edel") // " " )=~/Eliminar/){ $c->dbv->edel($c); }
elsif(($c->param("cdel") // " " )=~/Eliminar/){ $c->dbv->cdel($c); }
elsif(($c->param("pdel") // " " )=~/Eliminar/){ $c->dbv->pdel($c); };
}
if ($c->param("section")=~/home/){ if ($c->param("section")=~/home/){
my $v=(load_module("home/admin"))[0]; my $v=(load_module("home/admin"))[0];
my ($x,$w)= load_module("home/admin/home"); my ($x,$w)= load_module("home/admin/home");
@@ -109,17 +128,15 @@ sub admin{
$c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod}); $c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod});
} }
elsif ( $c->param("section")=~/radio/ ){ elsif ( $c->param("section")=~/radio/ ){
$c->stash( $c->stash( merge_hash(
merge_hash( (load_module("home/admin"))[0], (load_module("home/admin"))[0],
merge_hash( (load_module("home/admin/candySwitch"))[0],
(load_module("home/admin/radio"))[0], (load_module("home/admin/radio"))[0],
))); (load_module("home/admin/candySwitch"))[0],
));
$c->stash(apend => ["home/admin/radio","home/admin/candySwitch"]); $c->stash(apend => ["home/admin/radio","home/admin/candySwitch"]);
$c->stash(%{($c->dbv->radio)->[0]}); $c->stash(%{($c->dbv->radio)->[0]});
$c->stash($Dojo::Conf::radio); $c->stash($Dojo::Conf::radio);
} }
elsif ( $c->param("section")=~/event/ ){
}
elsif ( $c->param("section")=~/mensajes/ ){ elsif ( $c->param("section")=~/mensajes/ ){
$c->stash(merge_hash( $c->stash(merge_hash(
(load_module("home/admin"))[0], (load_module("home/admin"))[0],
@@ -130,6 +147,14 @@ sub admin{
$c->stash( h=>$h ); $c->stash( h=>$h );
} }
elsif ( $c->param("section")=~/event/ ){
$c->stash(merge_hash(
(load_module("home/admin"))[0],
(load_module("home/admin/event"))[0]
));
$c->stash(apend => ["home/admin/event"]);
$c->stash( $c->dbv->admevent );
}
} }

View File

@@ -1,7 +1,7 @@
package Dojo::Model::Vuelo; package Dojo::Model::Vuelo;
use Mojo::File 'path'; use Mojo::File 'path';
use Mojo::JSON qw(decode_json encode_json); use Mojo::JSON qw(decode_json encode_json);
use Dojo::Support qw{ dmph merge_hash load_module }; use Dojo::Support qw{ dmph merge_hash load_module get_names};
use File::Basename; use File::Basename;
use Text::Markdown qw{ markdown }; use Text::Markdown qw{ markdown };
@@ -53,12 +53,13 @@ sub radio{
return _read($q); return _read($q);
} }
sub umod{ sub umod{
my $c=shift; my $c=shift;
my $q="update casa set contenido = ? where nombre = ? ;"; my $q="update casa set contenido = ? where nombre = ? ;";
return _write($q,@_); return _write($q,@_);
} }
# admin =================================0
sub urmod{ sub urmod{
my $c=shift; my $c=shift;
my $q="update casa set contenido = ? where nombre = ? ;"; my $q="update casa set contenido = ? where nombre = ? ;";
@@ -85,7 +86,36 @@ sub rmsgid{
$dbh->disconnect(); $dbh->disconnect();
return $h; return $h;
} }
sub admevent{
my $h = {
ecourse=>_read("select nombre as name, id from curso;"),
eplace =>_read("select nombre as name, id from lugar;"),
emini =>_read("select nombre as name, id from mes;"),
ilist => [get_names("public/home/cal/img/")],
eprev =>_read(path("public/home/admin/event/qEprev.q")->slurp),
};
return $h
}
# json ======
sub ecourse{
my ($c,@id)=@_;
return _read(path("public/home/admin/event/json/qEvent.q")->slurp,@id);
}
sub qcourse{
my ($c,@id)=@_;
return _read(path("public/home/admin/event/json/qCourse.q")->slurp,@id);
}
sub qplace{
my ($c,@id)=@_;
return _read(path("public/home/admin/event/json/qPlace.q")->slurp,@id);
}
#============
#Change =====
#============
#ayudas =====================================
sub _read{ sub _read{
my ($q,@bind)=@_; my ($q,@bind)=@_;
my (@empty,$arr); my (@empty,$arr);

View File

@@ -2,7 +2,7 @@ package Dojo::Support;
use strict; use strict;
use warnings; use warnings;
use Exporter 'import'; use Exporter 'import';
our @EXPORT = qw/ dmph merge_hash load_module /; our @EXPORT = qw/ log dmph merge_hash load_module get_names /;
use Mojo::Base 'Mojolicious'; use Mojo::Base 'Mojolicious';
use File::Basename; use File::Basename;
@@ -11,9 +11,12 @@ use Path::Class;
use Encode qw{ decode_utf8 }; use Encode qw{ decode_utf8 };
use Hash::Merge; use Hash::Merge;
use Dojo::Conf; use Dojo::Conf;
use Mojo::Log;
sub log{
my $log = Mojo::Log->new;
$log->debug(shift);
}
sub get_names{ sub get_names{
my $dir = shift; my $dir = shift;
my @file_name; my @file_name;
@@ -28,9 +31,13 @@ sub get_names{
}; };
sub merge_hash{ sub merge_hash{
my ($v,$w)=@_; #my ($v,$w)=@_;
my $h={};
my $merger = Hash::Merge->new('LEFT_PRECEDENT'); my $merger = Hash::Merge->new('LEFT_PRECEDENT');
return $merger->merge( $v, $w ); foreach (@_){
$h= $merger->merge($h,$_);
}
return $h;
} }
sub load_module{ sub load_module{

View File

@@ -1,7 +1,7 @@
d3.select("#clink").on("click",function(){ d3.select("#clink").on("click",function(){
var newWindow = window.open('candy','_blank'); var newWindow = window.open('candy','_blank');
}); });
// revisa que llama dos veces a la pagina
var ciface =" #exec candy_loader/candyInterface.pl&v="; var ciface =" #exec candy_loader/candyInterface.pl&v=";
d3.json(ciface+"isOn" ,function(d){ d3.json(ciface+"isOn" ,function(d){
if(d != undefined){ if(d != undefined){

View File

@@ -0,0 +1,12 @@
insert into curso
(nombre,temario,servicios,estado)
values(
?, # cname
?, # csubjects
?, # cservices
case ? when "on" then 1 else 0 end #cen
);

View File

@@ -0,0 +1,14 @@
insert into evento
(lugar_id, fecha_inicio, fecha_fin,precio,curso_id,imagen_chica,estado,promocion,promo_estado)
values(
?, # eplace
" ?-?-? ", # yini - mini - dini
" ?-?-? ", # yend - mend - dend
?, # cost ,
?, # ecourse ,
?, # eimg ,
case ? when "on" then 1 else 0 end, # een
?, # promo ,
case ? when "on" then 1 else 0 end # pen
);

View File

@@ -0,0 +1,15 @@
insert into lugar
(nombre,direccion,observacion,municipio,federativa,pais,lat,lng,estado)
values(
?, # pname
?, # paddr
?, # pobs
?, # pto
?, # pst
?, # pco
?, # lat
?, # lng
case ? when "on" then 1 else 0 end #pen
);

View File

@@ -0,0 +1,3 @@
delete from curso where id = ? ; # cprev

View File

@@ -0,0 +1,6 @@
update curso set
nombre = ?, # cname
temario = ?, # csubjects
servicios = ?, # cservices
estado = case ? when "on" then 1 else 0 end # cen
where id = ? ; # cprev

View File

@@ -0,0 +1,2 @@
delete from evento where id = ? ; # eprev

View File

@@ -0,0 +1,12 @@
update evento set
lugar_id = ?, # eplace ,
fecha_inicio='?-?-?', # yini - mini - dini ',
fecha_fin='?-?-?', # yend - mend - dend ',
precio= ?, # cost ,
promocion= ?, # promo ,
promo_estado = case ? when "on" then 1 else 0 end, #pen
curso_id= ?, # ecourse ,
imagen_chica= ?, # eimg ,
estado = case ? when "on" then 1 else 0 end # een
where id = ?; # eprev ;

View File

@@ -0,0 +1,4 @@
delete from lugar where id = ?; # pprev ;

View File

@@ -0,0 +1,12 @@
update lugar set
nombre= ?, # pname
direccion= ?, # paddr
observacion= ?,# pobs
municipio= ?, # pto
federativa= ?, # pst
pais= ?, # pco
lat=?, # plat
lng=?, # plng
estado = case ? when "on" then 1 else 0 end # pen
where id = ?; # pprev ;

View File

@@ -1,7 +1,7 @@
d3.select("li#evento").style("background-color","#cedeef"); d3.select("li#evento").style("background-color","#cedeef");
var li = d3.select("article.label","ul").selectAll("li"); var li = d3.select("article.label","ul").selectAll("li");
var img_path = " #path ../../cal/img/"; var img_path = "/home/cal/img/";
var json_path = " #data admin/event/json/"; var json_path = "/admin/json/";
/* menu hide and show edit window*/ /* menu hide and show edit window*/
li.on("click",function(){ li.on("click",function(){
li.style("background-color","#e6eeff"); li.style("background-color","#e6eeff");
@@ -22,7 +22,7 @@ d3.select("select#eimg").on("change",updateImage);
/*preload form contents for event*/ /*preload form contents for event*/
d3.select("select#eprev").on("change",function(){ d3.select("select#eprev").on("change",function(){
var eprev_id=d3.select("select#eprev").node().value; var eprev_id=d3.select("select#eprev").node().value;
d3.json( json_path+"qEvent.q&ecourse="+eprev_id ,function(d){ d3.json( json_path+"ecourse/"+eprev_id ,function(d){
if(d[0] !=undefined) {if(d[0].cid != 0){ if(d[0] !=undefined) {if(d[0].cid != 0){
dropdownUpdate("ecourse",d[0].cid); dropdownUpdate("ecourse",d[0].cid);
dropdownUpdate("eplace",d[0].pid); dropdownUpdate("eplace",d[0].pid);
@@ -43,7 +43,7 @@ d3.select("select#eprev").on("change",function(){
/*preload form content for course*/ /*preload form content for course*/
d3.select("select#cprev").on("change",function(){ d3.select("select#cprev").on("change",function(){
var cprev_id=d3.select("select#cprev").node().value; var cprev_id=d3.select("select#cprev").node().value;
d3.json(json_path+"qCourse.q&course="+cprev_id ,function(d){ d3.json(json_path+"qcourse/"+cprev_id ,function(d){
if(d[0]!=undefined){if(d[0].cid != 0){ if(d[0]!=undefined){if(d[0].cid != 0){
d3.select("input#cname").attr("value",d[0].cname); d3.select("input#cname").attr("value",d[0].cname);
d3.select("textarea#csubjects").text(d[0].csubjects); d3.select("textarea#csubjects").text(d[0].csubjects);
@@ -53,7 +53,7 @@ d3.select("select#cprev").on("change",function(){
/*preload form content for place*/ /*preload form content for place*/
d3.select("select#pprev").on("change",function(){ d3.select("select#pprev").on("change",function(){
var pprev_id=d3.select("select#pprev").node().value; var pprev_id=d3.select("select#pprev").node().value;
d3.json(json_path+"qPlace.q&course="+pprev_id ,function(d){ d3.json(json_path+"qplace/"+pprev_id ,function(d){
if(d[0]!=undefined){if(d[0].pid != 0){ if(d[0]!=undefined){if(d[0].pid != 0){
d3.select("input#pname").attr("value",d[0].pname); d3.select("input#pname").attr("value",d[0].pname);
d3.select("input#paddr").attr("value",d[0].paddr); d3.select("input#paddr").attr("value",d[0].paddr);

View File

@@ -1,17 +1,9 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select select
id as "cid", id as "cid",
nombre as "cname", nombre as "cname",
temario as "csubjects", temario as "csubjects",
servicios as "cservices" servicios as "cservices"
from curso from curso
where id= #course ; where id= ? ; #course ;

View File

@@ -1,11 +1,3 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select select
"event" as "tag", "event" as "tag",
id, id,
@@ -24,6 +16,6 @@ select
estado as "een" estado as "een"
from evento from evento
where id= #ecourse ; where id= ? ; # ecourse ;

View File

@@ -1,10 +1,3 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select select
id as "pid", id as "pid",
nombre as "pname", nombre as "pname",
@@ -17,6 +10,6 @@ select
lng as "plng", lng as "plng",
estado as "pen" estado as "pen"
from lugar from lugar
where id= #course ; where id= ? ; # course ;

View File

@@ -1,13 +1,4 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select select
"eprev" as "tag",
concat(day(e.fecha_inicio)," de ",m.nombre," ",l.nombre) as "name", concat(day(e.fecha_inicio)," de ",m.nombre," ",l.nombre) as "name",
e.id as id e.id as id
from evento as e from evento as e

View File

@@ -1,20 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
insert into curso
(nombre,temario,servicios,estado)
values(
q#cname ,
q#csubjects ,
q#cservices ,
case q#cen when "on" then 1 else 0 end);

View File

@@ -1,24 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
insert into evento
(lugar_id, fecha_inicio, fecha_fin,precio,curso_id,imagen_chica,estado,promocion,promo_estado)
values(
q#eplace ,
" #yini - #mini - #dini ",
" #yend - #mend - #dend ",
q#cost ,
q#ecourse ,
q#eimg ,
case q#een when "on" then 1 else 0 end,
q#promo ,
case q#pen when "on" then 1 else 0 end);

View File

@@ -1,23 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
insert into lugar
(nombre,direccion,observacion,municipio,federativa,pais,lat,lng,estado)
values(
q#pname ,
q#paddr ,
q#pobs ,
q#pto ,
q#pst ,
q#pco ,
q#lat ,
q#lng ,
case q#pen when "on" then 1 else 0 end);

View File

@@ -1,12 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
delete from curso
where id = q#cprev ;

View File

@@ -1,18 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
update curso set
nombre = q#cname ,
temario= q#csubjects ,
servicios= q#cservices ,
estado = case q#cen when "on" then 1 else 0 end
where id = q#cprev ;

View File

@@ -1,12 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
delete from evento
where id = q#eprev ;

View File

@@ -1,22 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
update evento set
lugar_id = q#eplace ,
fecha_inicio=' #yini - #mini - #dini ',
fecha_fin= ' #yend - #mend - #dend ',
precio= q#cost ,
promocion= q#promo ,
promo_estado = case q#pen when "on" then 1 else 0 end,
curso_id= q#ecourse ,
imagen_chica= q#eimg ,
estado = case q#een when "on" then 1 else 0 end
where id = q#eprev ;

View File

@@ -1,13 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
delete from lugar
where id = q#pprev ;

View File

@@ -1,20 +0,0 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_w */
/* c#password #dbdata_wp */
/* c#write write*/
update lugar set
nombre= q#pname ,
direccion= q#paddr ,
observacion= q#pobs ,
municipio= q#pto ,
federativa= q#pst ,
pais= q#pco ,
lat= q#plat ,
lng= q#plng ,
estado = case q#pen when "on" then 1 else 0 end
where id = q#pprev ;

View File

@@ -16,30 +16,27 @@
<div class="ehide" id="event"> <form action=" #nav admine" method="POST"> <div class="ehide" id="event"> <form action=" #nav admine" method="POST">
<div class="flex field"> <div class="flex field">
<label>Curso</label> <label>Curso</label>
<select id="ecourse" name="ecourse"> <!-- a#dropvar --> <select id="ecourse" name="ecourse">
<!-- ##ecourse --> <!-- r##hide --> <% map{ %>
<!-- c#ecourse <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('ecourse')}) %><% if defined(stash('ecourse')); %>
--> <!-- rr#hide -->
</select> </select>
</div> </div>
<div class="flex field"> <div class="flex field">
<label>Lugar</label> <!-- dropdown --> <label>Lugar</label> <!-- dropdown -->
<select id="eplace" name="eplace"> <!-- a#dropvar --> <select id="eplace" name="eplace"> <!-- a#dropvar -->
<!-- ##eplace --> <!-- r##hide --> <% map{ %>
<!-- c#eplace <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('eplace')}) %><% if defined(stash('eplace')); %>
--> <!-- rr#hide -->
</select> </select>
</div> </div>
<div class="flex field"> <div class="flex field">
<label>Fecha inicio</label> <!-- dropdown --> <label>Fecha inicio</label> <!-- dropdown -->
<input id="dini" type="number" min="1" max="31" name="dini" value="1"/> <!-- a#dropvar --> <input id="dini" type="number" min="1" max="31" name="dini" value="1"/> <!-- a#dropvar -->
<select id="mini" name="mini"> <!-- a#dropvar --> <select id="mini" name="mini"> <!-- a#dropvar -->
<!-- ##emini --> <!-- r##hide --> <% map{ %>
<!-- c#emini <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('emini')}) %><% if defined(stash('emini')); %>
--> <!-- rr#hide -->
</select> </select>
<input id="yini" type="number" min="2017" max="2050" name="yini" value="2017"/> <!-- a#dropvar --> <input id="yini" type="number" min="2017" max="2050" name="yini" value="2017"/> <!-- a#dropvar -->
</div> </div>
@@ -47,6 +44,9 @@
<label>Fecha fin</label> <!-- dropdown --> <label>Fecha fin</label> <!-- dropdown -->
<input id="dend" type="number" min="1" max="31" name="dend" value="1"/> <!-- a#dropvar --> <input id="dend" type="number" min="1" max="31" name="dend" value="1"/> <!-- a#dropvar -->
<select id="mend" name="mend"> <!-- a#dropvar --> <select id="mend" name="mend"> <!-- a#dropvar -->
<% map{ %>
<option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<% } %><% (@{stash('emini')}) %><% if defined(stash('emini')); %>
<!-- ##emini --> <!-- ##emini -->
</select> </select>
<input id="yend" type="number" min="2017" max="2050" name="yend" value="2017"/> <!-- a#dropvar --> <input id="yend" type="number" min="2017" max="2050" name="yend" value="2017"/> <!-- a#dropvar -->
@@ -62,10 +62,9 @@
<label>Imagen</label> <!-- dropdown --> <label>Imagen</label> <!-- dropdown -->
<select id="eimg" name="eimg"> <!-- a#dropvar --> <select id="eimg" name="eimg"> <!-- a#dropvar -->
<option value="0" selected> -- Elegir imagen -- </option> <option value="0" selected> -- Elegir imagen -- </option>
<!-- ##ilist --> <!-- r##hide --> <% map{ %>
<!-- c#ilist <option value="<%= $_ %>"><%= $_ %></option>
<option value=" #name "> #name </option> <% } %><% (@{stash('ilist')}) %><% if defined(stash('ilist')); %>
--> <!-- rr#hide -->
</select> </select>
<div id=esimg></div> <div id=esimg></div>
</div> </div>
@@ -73,10 +72,9 @@
<label>Existente</label> <label>Existente</label>
<select id="eprev" name="eprev"> <!-- a#dropvar --> <select id="eprev" name="eprev"> <!-- a#dropvar -->
<option value="0">-- Nuevo --</option> <option value="0">-- Nuevo --</option>
<!-- ##eprev --> <!-- r##hide --> <% map{ %>
<!-- c#eprev <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('eprev')}) %><% if defined(stash('eprev')); %>
--> <!-- rr#hide -->
</select> </select>
</div> </div>
<div class="flex field update"> <div class="flex field update">
@@ -88,7 +86,7 @@
</div> </div>
</form> </div> </form> </div>
<!-- Curso ====================================================== --> <!-- Curso ====================================================== -->
<div class="ehide" id="course"><form id="fcourse" action=" #nav admine" <div class="ehide" id="course"><form id="fcourse" action="/admin/event"
method="POST"> method="POST">
<div class="flex field"> <div class="flex field">
<label>Nombre</label> <label>Nombre</label>
@@ -103,10 +101,9 @@
<label>Existente</label> <label>Existente</label>
<select id="cprev" name="cprev"> <!-- a#dropvar --> <select id="cprev" name="cprev"> <!-- a#dropvar -->
<option value="0">-- Nuevo --</option> <option value="0">-- Nuevo --</option>
<!-- ##cprev --> <!-- r##hide --> <% map{ %>
<!-- c#cprev <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('ecourse')}) %><% if defined(stash('ecourse')); %>
--> <!-- rr#hide -->
</select> </select>
</div> <div class="flex field update"> </div> <div class="flex field update">
<input type="hidden" name="update" value="1"> <!-- a#dropvar --> <input type="hidden" name="update" value="1"> <!-- a#dropvar -->
@@ -116,8 +113,8 @@
<input type="checkbox" checked="checked" id="cen" name="cen" > <!-- a#dropvar --> <input type="checkbox" checked="checked" id="cen" name="cen" > <!-- a#dropvar -->
</div> </div>
</form> </div> </form> </div>
<!-- Lugar --> <!-- Lugar ====================================================== -->
<div class="ehide" id="place"><form action=" #nav admine" method="POST"> <div class="ehide" id="place"><form action="/admin/event" method="POST">
<div class="flex field"> <div class="flex field">
<label>Nombre</label><input type="text" id= "pname" name="pname"> <!-- a#dropvar --> <label>Nombre</label><input type="text" id= "pname" name="pname"> <!-- a#dropvar -->
</div> <div class="flex field"> </div> <div class="flex field">
@@ -138,10 +135,9 @@
<label>Existente</label> <label>Existente</label>
<select id="pprev" name="pprev"> <!-- a#dropvar --> <select id="pprev" name="pprev"> <!-- a#dropvar -->
<option value="0">-- Nuevo --</option> <option value="0">-- Nuevo --</option>
<!-- ##pprev --> <!-- r##hide --> <% map{ %>
<!-- c#pprev <option value="<%= $_->{'id'} %>"><%= $_->{'name'} %></option>
<option value=" #id "> #name </option> <% } %><% (@{stash('eplace')}) %><% if defined(stash('eplace')); %>
--> <!-- rr#hide -->
</select> </select>
</div> <div class="flex field update"> </div> <div class="flex field update">
<input type="hidden" name="update" value="1"> <!-- a#dropvar --> <input type="hidden" name="update" value="1"> <!-- a#dropvar -->

View File

@@ -1,9 +1,7 @@
<section class="flex messages"> <section class="flex messages">
<article class="select"> <article class="select">
<select id="sentry" class="entry" size=10> <select id="sentry" class="entry" size=10>
% foreach (@{stash('h')}){ <% map{ %> <option value="<%= $_->{'mid'} %>" class="entry" ><%= $_->{'entry'} %> </option> <% } %><% (@{stash('h')}); %>
<option value="<%= $_->{'mid'} %>" class=entry"> <%= $_->{'entry'} %></option>
% }
</select> </select>
</article> </article>
<article class="view"> <article class="view">

View File

@@ -1,4 +1,10 @@
<p> <%= url_for("$controller/$action/img") %> </p> <p> <%= url_for("$controller/$action/img") %> </p>
<p> <p>
%= url_for->path('/meself') %= url_for->path('/meself')
</p>
<p>
% foreach (@{$ilist}) {
<%= $_ %>
% }
</p> </p>