revolucion

This commit is contained in:
mynah
2019-03-14 03:19:54 -06:00
parent fa0fbe9eb4
commit 26523cdca2
59 changed files with 156 additions and 169 deletions

View File

@@ -31,7 +31,7 @@ use Dojo::Model::Users;
# =============================================================================
# json ========================================================================
$r->any('/json/:dreq')->to('data#simple');
$r->any('/json/*dreq')->to('data#simple');
# =============================================================================
# candy =======================================================================

View File

@@ -1,16 +1,21 @@
package Dojo::Controller::Data;
use Mojo::File 'path';
use Mojo::JSON qw(decode_json encode_json);
use Mojo::Base 'Mojolicious::Controller';
use Dojo::Support qw{ dmph merge_hash load_module };
use Net::Telnet;
my $server_name = "";
our $t; #telnet server object
my $data_path = path('lib/Dojo/Model/Data')->make_path;
sub simple{
my $c=shift;
my $n=$c->param("dreq")//"";
my $json = {status => "304"};
$json = { srv =>$c->config->{radio_server} } if $n =~m/^radio$/ ;
$json = candy() if $n =~m/^candy$/ ;
$json = decode_json($data_path->child("$n")->slurp)
if $n=~m/^podcast\/podcast.json$/;
$c->render(json=>$json);
}

View File

@@ -1,99 +1,97 @@
package Dojo::Controller::Home;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::Template;
use Dojo::Support qw{ log dmph merge_hash load_module get_names};
#use Dojo::Support qw{ log dmph merge_hash load_module get_names};
use Dojo::Support qw{ log get_names};
sub tst{
my $c=shift;
$c->render(text=> $c->config->{radio}{'channel'});
}
# User ========================================================================
sub home_ {
my $c = shift;
$c->redirect_to("/home") ;
}
sub home_ {
my $c = shift;
$c->redirect_to("/home") ;
}
sub home {
my $c = shift;
$c->stash( $c->dbv->mod) ;
sub home {
my $c = shift;
$c->stash( $c->dbv->mod) ;
$c->stash(layout=>'default');
}
sub pang {
my $c = shift;
my $h=$c->dbv->pang_md;
map { $c->stash( $_ => $h->{$_}) } keys %$h;
$c->stash(layout=>'default');
}
sub cal {
my $c = shift;
my $data=$c->dbv->calendar_events;
my $block=$c->dbv->calendar_monthblock;
my %h;
map{ push @{ $h{$_->{bid}} },$_; }(@$data);
$c->stash( r=>\%h, b=>$block);
$c->stash(layout=>'default');
}
sub event{
my $c = shift;
$c->stash($c->dbv->event($c->param("id")));
$c->stash(layout=> "defaultContact");
}
sub contact{
my $c = shift;
if ($c->param("mup")){
$c->flash(mname => $c->param("mname"));
$c->dbv->contact(
$c->param("mname"),
$c->param("mail"),
$c->match->stack->[-1]{action},
$c->param("msg")
);
$c->redirect_to('contact2');
}else{
$c->stash(layout=>'default');
}
}
sub pang {
my $c = shift;
my $h=$c->dbv->pang_md;
map { $c->stash( $_ => $h->{$_}) } keys %$h;
$c->stash(layout=>'default');
}
sub contact2{
my $c = shift;
$c->redirect_to("home") unless $c->flash('mname');
$c->stash( mname=>$c->flash('mname'));
$c->stash(layout=>'default');
}
sub cal {
my $c = shift;
my $data=$c->dbv->calendar_events;
my $block=$c->dbv->calendar_monthblock;
my %h;
map{ push @{ $h{$_->{bid}} },$_; }(@$data);
$c->stash( r=>\%h, b=>$block);
$c->stash(layout=>'default');
}
sub store{
my $c = shift;
$c->stash( r=>$c->dbv->store);
$c->stash(layout=> "defaultContact");
}
sub event{
my $c = shift;
$c->stash($c->dbv->event($c->param("id")));
$c->stash(layout=> "defaultContact");
}
sub tv{
my $c = shift;
$c->stash( videos=>$c->dbv->tv_videos, table=>$c->dbv->tv_series);
$c->stash(layout=> "defaultContact");
}
sub contact{
my $c = shift;
if ($c->param("mup")){
$c->flash(mname => $c->param("mname"));
$c->dbv->contact(
$c->param("mname"),
$c->param("mail"),
$c->match->stack->[-1]{action},
$c->param("msg")
);
$c->redirect_to('contact2');
}else{
$c->stash(layout=>'default');
}
}
sub podcast{
my $c = shift;
$c->stash(layout=> "defaultContact");
$c->stash( t=>$c->dbv->podcast_txt, pod=>$c->dbv->podcast_infoHash);
}
sub contact2{
my $c = shift;
$c->redirect_to("home") unless $c->flash('mname');
$c->stash( mname=>$c->flash('mname'));
$c->stash(layout=>'default');
}
sub store{
my $c = shift;
$c->stash( r=>$c->dbv->store);
$c->stash(layout=> "defaultContact");
}
sub tv{
my $c = shift;
$c->stash( videos=>$c->dbv->tv_videos, table=>$c->dbv->tv_series);
$c->stash(layout=> "defaultContact");
}
sub podcast{
my $c = shift;
$c->stash((load_module("home/podcast"))[0]);
$c->stash(layout=> "defaultContact");
$c->stash( t=>$c->dbv->podcast_txt, pod=>$c->dbv->podcast_infoHash);
}
sub bcast{
my $c = shift;
$c->stash((load_module("home/bcast"))[0]);
}
sub bcast{
my $c = shift;
$c->stash(layout=> "defaultContact");
}
sub radio{
my $c=shift;
$c->stash((load_module("home/radio"))[0]);
$c->stash(layout=> "defaultContact");
$c->stash($c->dbv->mod);
$c->stash(nick=>$c->session("nick"));
@@ -120,7 +118,6 @@ sub tst{
my $c=shift;
$c->dbv->umod($c->param('link'),$c->param('update'))
if (($c->param("hup") // " " )=~/Cambiar/);
$c->stash((load_module("home/admin/home"))[0]);
$c->stash(template=>"home/admin/home");
$c->stash(layout=>"admin");
$c->stash( $c->dbv->mod);
@@ -134,10 +131,6 @@ sub tst{
if (($c->param("pup") // " " )=~/Cambiar/);
$c->stash($c->dbv->mod);
$c->stash($c->dbg->grulla_pass);
$c->stash( merge_hash(
(load_module("home/admin/radio"))[0],
(load_module("home/admin/candySwitch"))[0],
));
$c->stash(apend => ["home/admin/candySwitch"]);
$c->stash(template=>"home/admin/radio");
$c->stash(layout=>"admin");
@@ -145,7 +138,6 @@ sub tst{
sub admin_mensajes{
my $c=shift;
$c->stash((load_module("home/admin/mensajes"))[0]);
$c->stash( h=>$c->dbv->msg_heads);
$c->stash(template=>"home/admin/mensajes");
$c->stash(layout=>"admin");
@@ -177,14 +169,9 @@ sub tst{
$c->dbv->place_up(@list) if ($id ==0);
$c->dbv->place_ch(@list) if ($id >0);
}
}
$c->redirect_to("/admin/eventos");
}
$c->stash(
courses=>$c->dbv->courses,
@@ -193,7 +180,6 @@ sub tst{
events=>$c->dbv->events,
img=>$c->dbv->eimgList,
);
$c->stash((load_module("home/admin/event"))[0]);
$c->stash(template=>"home/admin/event");
$c->stash(layout=>"admin");
}

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, promocion, promo_estado, curso_id, imagen_chica, estado)
values(
?, # eplace
concat(?,"-",?,"-",?), # yini - mini - dini
concat(?,"-",?,"-",?), # yend - mend - dend
?, # cost ,
?, # promo ,
case ? when "on" then 1 else 0 end, # pen
?, # ecourse ,
?, # eimg ,
case ? when "on" then 1 else 0 end # een
);

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
?, # plat
?, # plng
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 = concat(?,"-",?,"-",?), # yini - mini - dini
fecha_fin = concat(?,"-",?,"-",?), # 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

@@ -0,0 +1,9 @@
select
id as "cid",
nombre as "cname",
temario as "csubjects",
servicios as "cservices"
from curso
where id= ? ; #course ;

View File

@@ -0,0 +1,21 @@
select
"event" as "tag",
id,
lugar_id as "pid",
curso_id as "cid",
precio as "cost",
promocion as "promo",
promo_estado as "pen",
day(fecha_inicio) as "dini",
month(fecha_inicio) as "mini",
year(fecha_inicio) as "yini",
day(fecha_fin) as "dend",
month(fecha_fin) as "mend",
year(fecha_fin) as "yend",
coalesce(imagen_chica,0) as "eimg",
estado as "een"
from evento
where id= ? ; # ecourse ;

View File

@@ -0,0 +1,15 @@
select
id as "pid",
nombre as "pname",
direccion as "paddr",
observacion as "pobs",
municipio as "pto",
federativa as "pst",
pais as "pco",
lat as "plat",
lng as "plng",
estado as "pen"
from lugar
where id= ? ; # course ;

View File

@@ -0,0 +1,15 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"cprev" as "tag",
nombre as "name",
id
from curso
order by nombre asc;

View File

@@ -0,0 +1,12 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"ecourse" as "tag",
nombre as "name",
id
from curso where estado=1;

View File

@@ -0,0 +1,13 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"emend" as "tag",
nombre as "name",
id
from mes;

View File

@@ -0,0 +1,14 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"emini" as "tag",
nombre as "name",
id
from mes;

View File

@@ -0,0 +1,13 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"eplace" as "tag",
nombre as "name",
id
from lugar where estado=1;

View File

@@ -0,0 +1,9 @@
select
concat(day(e.fecha_inicio)," de ",m.nombre," ",l.nombre) as "name",
e.id as id
from evento as e
inner join lugar as l on e.lugar_id=l.id
inner join mes as m on month(e.fecha_inicio)=m.id
where e.estado=1
order by e.fecha_inicio desc;

View File

@@ -0,0 +1,15 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
"pprev" as "tag",
nombre as "name",
id
from lugar
order by nombre asc;

View File

@@ -0,0 +1,2 @@
update casa set contenido=? where nombre=?;

View File

@@ -0,0 +1,11 @@
select
e.id as imid,
concat(day(e.fecha)," de ",m.nombre," ", year(e.fecha)) as imdate,
e.nombre as imname,
e.correo as imail,
e.texto as immsg
from entrada as e
inner join vuelo.mes as m on m.id=month(e.fecha)
where e.id= ? ; #imid

View File

@@ -0,0 +1,7 @@
select
id as mid,
concat(nombre," ",date(fecha)) as "entry"
from entrada
order by fecha desc
limit 100;

View File

@@ -0,0 +1,12 @@
/* c#host localhost*/
/* c#database #dbdata */
/* c#user #dbdata_user */
/* c#password #dbdata_pass */
select
contenido as "rContent"
from casa where nombre="rmod";

View File

@@ -0,0 +1,3 @@
# update casa set contenido= q#link where nombre = q#update ;
update casa set contenido= ? where nombre = ? ;

View File

@@ -0,0 +1,100 @@
[
{
"tag":"podcast",
"id":"1",
"ptitle":"1. ZuChangFa - Las 8 frases explicadas",
"ptext":"Método de ZhiNeng QiGong para la Orgnanización del Campo",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/221858279&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"2",
"ptitle":"2. Dian Tian Li Di - Las 8 frases con música",
"ptext":"Método de ZhiNeng QiGong para la Organización del Campo, música con letra original compuesta por el maestro Pang He Ming.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/224314693&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"3",
"ptitle":"3. Din Tian Li Di - Grabación original del centro Huaxia (Chino)",
"ptext":"Método de ZhiNeng QiGong para la Organización del Campo. Con música y letra original compuesta por el maestro Pang He Ming, grabación original del Centro Huaxia (hospital más grande del mundo sin medicamentos).",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/224980950&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"4",
"ptitle":"4. La Teoría del HunYuan - ZhiNeng QiGong",
"ptext":"Este Podcast que contiene una mirada de los fundamentos teóricos de ZhiNeng QiGong. Con base en esta teoría, buscamos profundizar posteriormente en algunos conceptos muy importantes.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/226460492&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"5",
"ptitle":"5. Yi Yuan Ti - ZhiNeng QiGong",
"ptext":"Analizamos el recurso más importante que tiene el ser humano para transformarse a sí mismo: su propia mente.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/227191181&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"6",
"ptitle":"6. Explicación de HunHua - ZhiNeng QiGong",
"ptext":"En esta sexta entrega hablamos sobre el fenómeno de HunHua, como parte fundamental de la teoría de ZhiNeng QiGong.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/228450367&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"7",
"ptitle":"7. HunYuan LingTong - ZhiNeng QiGong",
"ptext":"La explicación de un concepto central de ZhiNeng QiGong, lleno de sabiduría y compromiso con nosotros mismos, con HunYuan LingTong TODO es posible.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/230195055&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"8",
"ptitle":"8. De Gao Qi Chun ( El cambio verdadero) - ZhiNeng QiGong",
"ptext":"De Gao Qi Chun, un concepto muy profundo que nos lleva al cambio verdadero. Alcanzar la más alta moral es llegar a un nivel congruencia y de respeto...",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/231667352&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"9",
"ptitle":"9. Mantener la mente simple",
"ptext":"Algunas recomendaciones para ayudarnos a mantener la mente simple.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/233739996&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"10",
"ptitle":"10. Amor al paso y al cambio.",
"ptext":"Estudiamos la necesidad de amar cada paso que damos para acercarnos a cumplir nuestros más bellos sueños y exploramos la importancia de aprender de los cambios que ocurren en nuestro camino.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/239091582&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"11",
"ptitle":"11. Cómo mejorar nuestra concentración - YiShou, DingLi",
"ptext":"¿Cómo puedo concentrarme mejor? En esta entrega de Podcast, abordamos dos conceptos que nos ayudan a mejorar nuestro enfoque y nuestra capacidad de concentración.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/244060912&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"12",
"ptitle":"12. Admira el GongFu",
"ptext":"De los campeones debemos admirar el gran esfuerzo que han realizado para lograr sus objetivos. Porque triunfan sólo cuando se convierten en la mejor versión de sí mismos, cuando recorren miles de veces el camino que los lleva a lograr lo que en verdad quieren.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/246592916&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"13",
"ptitle":"13. La voluntad",
"ptext":"Cuando analizamos qué tan lejos estamos de donde queremos llegar, nos damos cuenta de que es muy importante desarrollar una fuerza de voluntad indomable para lograr nuestros más bellos sueños...",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/250019055&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
},
{
"tag":"podcast",
"id":"14",
"ptitle":"14. El Aprendiz de Mago (Oropel)",
"ptext":"En esta 14a entrega del Podcast de ZhiNeng QiGong, contamos una historia diseñada por nuestro amigo Fernando Filippis, un instructor argentino que ha creado un relato muy bello con un mensaje increíble.",
"source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/263699943&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"
}
]

View File

@@ -0,0 +1 @@
Hemos desarrollado con mucho cariño ejercicios gratuitos y descargables que pueden ser practicados por cualquier persona aún antes de asistir a uno de los cursos de instrucción.

View File

@@ -1,5 +1,4 @@
package Dojo::Model::Vuelo;
use Mojo::File 'path';
package Dojo::Model::Vuelo; use Mojo::File 'path';
use Mojo::JSON qw(decode_json encode_json);
use Dojo::Support qw{ log dmph merge_hash load_module get_names};
use Mojo::Base 'Mojolicious::Controller';
@@ -25,8 +24,9 @@ sub mod{
sub pang_md{
my $c=shift;
my %h = map {$_=> markdown(decode_utf8($data_path->child('pang/'.$_.'.md')->slurp))}
("pang","helen","benjamin");
my %h = map {
$_=> markdown(decode_utf8($data_path->child('pang/'.$_.'.md')->slurp))
} ("pang","helen","benjamin");
return \%h;
}
@@ -50,13 +50,12 @@ sub tv_videos{
sub tv_series{
return _read ($data_path->child("/tv/qTable.q")->slurp); #name,order,group
}
sub podcast_txt{
# return "Hemos desarrollado con mucho cariño ejercicios gratuitos y descargables que pueden ser practicados por cualquier persona aún antes de asistir a uno de los cursos de instrucción.";
return decode_utf8(path("public/home/podcast/text.txt")->slurp);
}
sub podcast_infoHash{
return decode_json path("public/home/podcast/jsonPod.json")->slurp;
}
sub podcast_txt{
return decode_utf8($data_path->child("/podcast/text.txt")->slurp);
}
sub podcast_infoHash{
return decode_json $data_path->child("/podcast/podcast.json")->slurp;
}
#==============================================================================
@@ -64,7 +63,7 @@ sub tv_series{
sub msg_heads{
my ($self,@bind)=@_;
my @empty;
my $q= path("public/home/admin/mensajes/qEntries.q")->slurp;
my $q= $data_path->child("/admin/mensajes/qEntries.q")->slurp;
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::MSGDB.":".Dojo::Conf::MSGDB_H,Dojo::Conf::MSGDB_UR,Dojo::Conf::MSGDB_URP,{mysql_enable_utf8 => 1});
return \@empty unless($dbh);
my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind)//"error";
@@ -76,7 +75,7 @@ sub tv_series{
sub msg{
my ($c,@bind)=@_;
my @empty;
my $q= path("public/home/admin/mensajes/json/qGetInfo.q")->slurp;
my $q= $data_path->child("/admin/mensajes/json/qGetInfo.q")->slurp;
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::MSGDB.":".Dojo::Conf::MSGDB_H,Dojo::Conf::MSGDB_UR,Dojo::Conf::MSGDB_URP,{mysql_enable_utf8 => 1});
return \@empty unless($dbh);
my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind)//\@empty;
@@ -85,12 +84,12 @@ sub tv_series{
return shift @$h;
}
sub courses{ return _read("select nombre as name, id from curso;")}
sub course { return shift @{_read(path("public/home/admin/event/json/qCourse.q")->slurp,pop)}}
sub course { return shift @{_read($data_path->child("/admin/event/json/qCourse.q")->slurp,pop)}}
sub places { return _read("select nombre as name, id from lugar;")}
sub place { return shift @{_read(path("public/home/admin/event/json/qPlace.q")->slurp,pop)}}
sub place { return shift @{_read($data_path->child("/admin/event/json/qPlace.q")->slurp,pop)}}
sub months { return _read("select nombre as name, id from mes;")};
sub events { return _read(path("public/home/admin/event/qEprev.q")->slurp)}
sub eventa { return shift @{_read(path("public/home/admin/event/json/qEvent.q")->slurp,pop)}}
sub events { return _read($data_path->child("/admin/event/qEprev.q")->slurp)}
sub eventa { return shift @{_read($data_path->child("/admin/event/json/qEvent.q")->slurp,pop)}}
sub eimgList{ return [get_names("public/home/cal/img/")] }
#==============================================================================
# Write vdg user ==============================================================
@@ -104,40 +103,40 @@ sub contact{
}
#==============================================================================
# Write vdg admin ==============================================================
sub umod{
my $c=shift;
my $q="update casa set contenido = ? where nombre = ? ;";
return _write($q,@_);
}
sub umod{
my $c=shift;
my $q="update casa set contenido = ? where nombre = ? ;";
return _write($q,@_);
}
sub event_del { return _write("delete from evento where id = ?;",pop);}
sub course_del{ return _write("delete from curso where id = ?;",pop); }
sub place_del { return _write("delete from lugar where id = ?;",pop); }
sub event_up{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/add/qEup.q")->slurp,@bind);
}
sub course_up{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/add/qCup.q")->slurp,@bind);
}
sub place_up{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/add/qPup.q")->slurp,@bind);
}
sub event_ch{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/change/qEup.q")->slurp,@bind);
}
sub course_ch{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/change/qCup.q")->slurp,@bind);
}
sub place_ch{
my ($self,@bind)=@_;
return _write(path("public/home/admin/event/change/qPup.q")->slurp,@bind);
}
sub event_del { return _write("delete from evento where id = ?;",pop);}
sub course_del{ return _write("delete from curso where id = ?;",pop); }
sub place_del { return _write("delete from lugar where id = ?;",pop); }
sub event_up{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/add/qEup.q")->slurp,@bind);
}
sub course_up{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/add/qCup.q")->slurp,@bind);
}
sub place_up{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/add/qPup.q")->slurp,@bind);
}
sub event_ch{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/change/qEup.q")->slurp,@bind);
}
sub course_ch{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/change/qCup.q")->slurp,@bind);
}
sub place_ch{
my ($self,@bind)=@_;
return _write($data_path->child("/admin/event/change/qPup.q")->slurp,@bind);
}
#==============================================================================