updatedb
This commit is contained in:
@@ -34,6 +34,8 @@ sub startup {
|
|||||||
$r->any('/json/:dreq')->to('data#simple');
|
$r->any('/json/:dreq')->to('data#simple');
|
||||||
$r->any('/json/candy/:command')->to('data#candy');
|
$r->any('/json/candy/:command')->to('data#candy');
|
||||||
|
|
||||||
|
$r->any('/admin/:section'=> {section =>'home'})->to('home#admin');
|
||||||
|
|
||||||
$r->any('/login')->to('users#login');
|
$r->any('/login')->to('users#login');
|
||||||
$r->any('/logout')->to('users#logout');
|
$r->any('/logout')->to('users#logout');
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,36 @@
|
|||||||
package Dojo::Controller::Home;
|
package Dojo::Controller::Home;
|
||||||
use Mojo::Base 'Mojolicious::Controller';
|
use Mojo::Base 'Mojolicious::Controller';
|
||||||
|
use Mojo::Template;
|
||||||
use Dojo::Support qw{ dmph merge_hash load_module };
|
use Dojo::Support qw{ dmph merge_hash load_module };
|
||||||
use Dojo::Conf;
|
use Dojo::Conf;
|
||||||
|
|
||||||
sub tst{
|
sub tst{
|
||||||
my $c=shift;
|
my $c=shift;
|
||||||
my ($v,$w)= load_module($c);
|
# $c->stash( merge_hash(
|
||||||
# $c->stash($v);
|
# (load_module("home/tst"))[0],
|
||||||
$c->stash(d =>$v);
|
# (load_module("home/contact"))[0]
|
||||||
|
#));
|
||||||
|
# $c->stash(apend => ["home/contact"]);
|
||||||
|
$c->stash( (load_module("home/tst"))[0] );
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub home {
|
sub home {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/home"))[0]);
|
||||||
$c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod});
|
$c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod});
|
||||||
}
|
}
|
||||||
|
|
||||||
sub pang {
|
sub pang {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
my ($v,$w)=load_module($c);
|
my ($v,$w)=load_module("home/pang");
|
||||||
$c->stash($v);
|
$c->stash($v);
|
||||||
$c->stash( $c->dbv->pang($w) );
|
$c->stash( $c->dbv->pang($w) );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub cal {
|
sub cal {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/cal"))[0]);
|
||||||
my ($data,$block)=$c->dbv->cal;
|
my ($data,$block)=$c->dbv->cal;
|
||||||
my %hdata;
|
my %hdata;
|
||||||
map{ push @{ $hdata{$_->{bid}} },$_; }(@$data);
|
map{ push @{ $hdata{$_->{bid}} },$_; }(@$data);
|
||||||
@@ -35,65 +39,75 @@ sub cal {
|
|||||||
|
|
||||||
sub event{
|
sub event{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/event"))[0]);
|
||||||
$c->stash(%{($c->dbv->event($c->param("id")))->[0]});
|
$c->stash(%{($c->dbv->event($c->param("id")))->[0]});
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub contact{
|
sub contact{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
if ($c->param("mup")){
|
if ($c->param("mup")){
|
||||||
$c->flash(mname => $c->param("mname"));
|
$c->flash(mname => $c->param("mname"));
|
||||||
$c->redirect_to('contact2');
|
$c->redirect_to('contact2');
|
||||||
}else{
|
}else{
|
||||||
my $dir= "/$c->{stash}{controller}/$c->{stash}{action}";
|
$c->stash((load_module("home/contact"))[0]);
|
||||||
$c->stash( css=>["$dir/cssContact1.css"], js=>[]);
|
|
||||||
$c->stash( layout=>"default");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub contact2{
|
sub contact2{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->redirect_to("home") unless $c->flash('mname');
|
$c->redirect_to("home") unless $c->flash('mname');
|
||||||
my $dir= "/$c->{stash}{controller}/contact";
|
|
||||||
$c->stash( css=>["$dir/cssContact2.css"], js=>[]);
|
|
||||||
$c->stash( layout=>"default");
|
|
||||||
$c->stash( mname=>$c->flash('mname'));
|
$c->stash( mname=>$c->flash('mname'));
|
||||||
|
$c->stash((load_module("home/contact2"))[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub store{
|
sub store{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/store"))[0]);
|
||||||
$c->stash( r=>$c->dbv->store);
|
$c->stash( r=>$c->dbv->store);
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub tv{
|
sub tv{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash( merge_hash(
|
$c->stash( merge_hash(
|
||||||
(load_module($c))[0],
|
(load_module("home/tv"))[0],
|
||||||
(load_module($c,"home/tv/trans"))[0]
|
(load_module("home/tv/trans"))[0]
|
||||||
));
|
));
|
||||||
my ($series,$table)=$c->dbv->tv;
|
my ($series,$table)=$c->dbv->tv;
|
||||||
$c->stash( series=>$series, table=>$table);
|
$c->stash( series=>$series, table=>$table);
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub podcast{
|
sub podcast{
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/podcast"))[0]);
|
||||||
|
|
||||||
my ($txt,$h)=$c->dbv->podcast;
|
my ($txt,$h)=$c->dbv->podcast;
|
||||||
$c->stash( t=>$txt, pod=>$h,);
|
$c->stash( t=>$txt, pod=>$h,);
|
||||||
|
$c->stash(layout=> "defaultContact");
|
||||||
}
|
}
|
||||||
|
|
||||||
sub radio{
|
sub radio{
|
||||||
my $c=shift;
|
my $c=shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("home/radio"))[0]);
|
||||||
$c->stash(%{($c->dbv->radio)->[0]});
|
$c->stash(%{($c->dbv->radio)->[0]});
|
||||||
$c->stash($Dojo::Conf::radio);
|
$c->stash($Dojo::Conf::radio);
|
||||||
$c->stash(nick=>$c->session("nick"));
|
$c->stash(nick=>$c->session("nick"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub admin{
|
||||||
|
my $c=shift;
|
||||||
|
if ($c->param("hup")=~/Cambiar/){
|
||||||
|
$c->dbv->umod($c->param('link'),$c->param('update'));
|
||||||
|
};
|
||||||
|
my $v=(load_module("home/admin"))[0];
|
||||||
|
my ($x,$w)= load_module("home/admin/home");
|
||||||
|
$c->stash( merge_hash($x,$v) );
|
||||||
|
$c->stash(apend => ["home/admin/home"]);
|
||||||
|
$c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#$c->render(text =>"$c->{match}->position");
|
|
||||||
#$c->render(text=>"$c->{stash}{controller}");
|
|
||||||
#$c->render(text=>"$c->{match}{stack}->[0]{controller}");
|
|
||||||
#$c->render(text=>"$h->{css}[0]");
|
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ use Dojo::Support qw{ merge_hash load_module };
|
|||||||
|
|
||||||
sub login {
|
sub login {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->stash((load_module($c))[0]);
|
$c->stash((load_module("users/login"))[0]);
|
||||||
my $user = $c->param('uname') // '';
|
my $user = $c->param('uname') // '';
|
||||||
my $pass = $c->param('pass') //'';
|
my $pass = $c->param('pass') //'';
|
||||||
|
$c->stash(layout=>"defaultContact");
|
||||||
return $c->render unless my $pmid = $c->dbg->check($user, $pass);
|
return $c->render unless my $pmid = $c->dbg->check($user, $pass);
|
||||||
$c->session(user => $user, pmid=>$pmid, nick=> $c->param('nick'));
|
$c->session(user => $user, pmid=>$pmid, nick=> $c->param('nick'));
|
||||||
$c->redirect_to('radio');
|
$c->redirect_to('radio');
|
||||||
|
|||||||
@@ -14,31 +14,36 @@ sub new { bless {}, shift };
|
|||||||
|
|
||||||
sub mod{
|
sub mod{
|
||||||
my $q="select nombre,contenido from casa;";
|
my $q="select nombre,contenido from casa;";
|
||||||
return \@{_read($q,$vuelo)};
|
return \@{_read($q)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub umod{
|
||||||
|
my $c=shift;
|
||||||
|
my $q="update casa set contenido = ? where nombre = 'mod' ;";
|
||||||
|
return _write($q,@_);
|
||||||
|
}
|
||||||
sub pang{
|
sub pang{
|
||||||
my ($c,$q)=@_;
|
my ($c,$q)=@_;
|
||||||
return {map { basename($_,".md") => load_md("public/$_")}@{$q->{md}}};
|
return {map { basename($_,".md") => load_md("public/$_")}@{$q->{md}}};
|
||||||
}
|
}
|
||||||
sub cal {
|
sub cal {
|
||||||
my $block=_read (path("public/home/cal/q1Block.q")->slurp,$vuelo);
|
my $block=_read (path("public/home/cal/q1Block.q")->slurp);
|
||||||
my $data=_read (path("public/home/cal/q3Event.q")->slurp,$vuelo);
|
my $data=_read (path("public/home/cal/q3Event.q")->slurp);
|
||||||
return ($data,$block);
|
return ($data,$block);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub event{
|
sub event{
|
||||||
my ($self,$id)=@_;
|
my ($self,$id)=@_;
|
||||||
return _read (path("public/home/event/qEvent.q")->slurp,$vuelo,$id);
|
return _read (path("public/home/event/qEvent.q")->slurp,$id);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub store{
|
sub store{
|
||||||
return _read (path("public/home/store/qStore.q")->slurp,$vuelo);
|
return _read (path("public/home/store/qStore.q")->slurp);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub tv{
|
sub tv{
|
||||||
my $series = _read (path("public/home/tv/qSeries.q")->slurp,$vuelo); #group,name
|
my $series = _read (path("public/home/tv/qSeries.q")->slurp); #group,name
|
||||||
my $table = _read (path("public/home/tv/qTable.q")->slurp,$vuelo); #name,order,group
|
my $table = _read (path("public/home/tv/qTable.q")->slurp); #name,order,group
|
||||||
return ($series,$table);
|
return ($series,$table);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,11 +55,11 @@ sub podcast{
|
|||||||
|
|
||||||
sub radio{
|
sub radio{
|
||||||
my $q="select contenido as rmod from casa where nombre='rmod';";
|
my $q="select contenido as rmod from casa where nombre='rmod';";
|
||||||
return _read($q,$vuelo);
|
return _read($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _read{
|
sub _read{
|
||||||
my ($q,$d,@bind)=@_;
|
my ($q,@bind)=@_;
|
||||||
my (@empty,$arr);
|
my (@empty,$arr);
|
||||||
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::VUELODB.":".Dojo::Conf::VUELODB_H,Dojo::Conf::VUELODB_UR,Dojo::Conf::VUELODB_URP);
|
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::VUELODB.":".Dojo::Conf::VUELODB_H,Dojo::Conf::VUELODB_UR,Dojo::Conf::VUELODB_URP);
|
||||||
return \@empty unless($dbh);
|
return \@empty unless($dbh);
|
||||||
@@ -64,6 +69,15 @@ sub _read{
|
|||||||
$dbh->disconnect();
|
$dbh->disconnect();
|
||||||
return $h;
|
return $h;
|
||||||
}
|
}
|
||||||
|
sub _write{
|
||||||
|
my $q=shift;
|
||||||
|
my (@empty);
|
||||||
|
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::VUELODB.":".Dojo::Conf::VUELODB_H,Dojo::Conf::VUELODB_UW,Dojo::Conf::VUELODB_UWP);
|
||||||
|
return 0 unless($dbh);
|
||||||
|
my $h=$dbh->do($q,{ Slice => {} },@_);
|
||||||
|
$dbh->disconnect();
|
||||||
|
return $h;
|
||||||
|
}
|
||||||
|
|
||||||
sub load_md{
|
sub load_md{
|
||||||
return "" unless
|
return "" unless
|
||||||
|
|||||||
@@ -34,10 +34,9 @@ sub merge_hash{
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub load_module{
|
sub load_module{
|
||||||
my $c=shift;
|
my $dir=shift;
|
||||||
my $dir=shift //"$c->{stash}{controller}/$c->{stash}{action}";
|
|
||||||
my $lpath= Dojo::Conf::MOD."/$dir";
|
my $lpath= Dojo::Conf::MOD."/$dir";
|
||||||
my $h; $h->{js}=[]; $h->{css}=[]; #no me gusta!!!
|
my $h;
|
||||||
$h->{layout} = "default";
|
$h->{layout} = "default";
|
||||||
my $q;
|
my $q;
|
||||||
my @s= get_names($lpath);
|
my @s= get_names($lpath);
|
||||||
|
|||||||
41
public/home/admin/cssAdmin.css
Executable file
41
public/home/admin/cssAdmin.css
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
/*global------------------------------------ */
|
||||||
|
div.cont{
|
||||||
|
display: -webkit-box; display: -moz-box; display: -ms-flexbox;
|
||||||
|
display: -webkit-flex; display: flex;
|
||||||
|
}
|
||||||
|
/*seccion header------------------------------ */
|
||||||
|
section.header{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
background-color:black;
|
||||||
|
position:relative;
|
||||||
|
padding-top:80px;
|
||||||
|
min-height:7vh
|
||||||
|
}
|
||||||
|
article.header{
|
||||||
|
flex:4;
|
||||||
|
}
|
||||||
|
article.header > p {
|
||||||
|
font-size:4em;
|
||||||
|
color:white;
|
||||||
|
font-weight:bold;
|
||||||
|
margin-left:20px;
|
||||||
|
}
|
||||||
|
article.anav{
|
||||||
|
flex:1;
|
||||||
|
|
||||||
|
}
|
||||||
|
article.anav p {
|
||||||
|
font-size:2em;
|
||||||
|
color:white;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
article.anav p:hover {
|
||||||
|
color:#eaebf2;
|
||||||
|
background-color:#330000;
|
||||||
|
border-radius:5px;
|
||||||
|
|
||||||
|
}
|
||||||
0
public/home/admin/event/SCHEDULE COMPLETE - ,
Normal file
0
public/home/admin/event/SCHEDULE COMPLETE - ,
Normal file
0
public/home/admin/event/[
Normal file
0
public/home/admin/event/[
Normal file
0
public/home/admin/event/admin\@,
Normal file
0
public/home/admin/event/admin\@,
Normal file
89
public/home/admin/event/cssEvent.css
Executable file
89
public/home/admin/event/cssEvent.css
Executable file
@@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
p.title{
|
||||||
|
font-size:3em;
|
||||||
|
color:black;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:10px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
section.event{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
}
|
||||||
|
article.label{
|
||||||
|
flex:1;
|
||||||
|
min-width:100px;
|
||||||
|
max-width:130px;
|
||||||
|
background-color:#e6eeff; /*js*/
|
||||||
|
}
|
||||||
|
article.label > ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 10px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
article.label > ul > li{
|
||||||
|
margin:5px 0px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
article.label > ul > li:hover{
|
||||||
|
background-color:#cedeef;
|
||||||
|
}
|
||||||
|
article.edit{
|
||||||
|
flex:5;
|
||||||
|
max-width:530px;
|
||||||
|
min-width:200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.edit label{
|
||||||
|
padding:5px 30px 5px 10px;
|
||||||
|
min-width:130px;
|
||||||
|
}
|
||||||
|
div#event{display:block;}
|
||||||
|
div#course{display:none;}
|
||||||
|
div#place{display:none;}
|
||||||
|
|
||||||
|
div.field{
|
||||||
|
justify-content:baseline;
|
||||||
|
-webkit-justify-content:baseline;
|
||||||
|
margin:5px;
|
||||||
|
}
|
||||||
|
article.edit select{
|
||||||
|
flex:3;
|
||||||
|
max-width:400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.edit input[type=text] {
|
||||||
|
flex:3;
|
||||||
|
max-width:400px;
|
||||||
|
}
|
||||||
|
article.edit input[name=cost]{
|
||||||
|
width:100px;
|
||||||
|
}
|
||||||
|
article.edit input[type=number]{
|
||||||
|
width:60px;
|
||||||
|
}
|
||||||
|
article.edit textarea{
|
||||||
|
flex:3;
|
||||||
|
max-width:400px;
|
||||||
|
min-height:150px;
|
||||||
|
border: 3px solid #cccccc;
|
||||||
|
}
|
||||||
|
div.update{
|
||||||
|
background-color:#f2f5fc;
|
||||||
|
}
|
||||||
|
article.edit input[type=submit]{
|
||||||
|
margin:15px;
|
||||||
|
}
|
||||||
|
div#esimg{
|
||||||
|
height:180px;
|
||||||
|
width:180px;
|
||||||
|
background-color:gray;
|
||||||
|
background-position:center;
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-size:contain;
|
||||||
|
}
|
||||||
|
select#eimg{
|
||||||
|
height:30px;
|
||||||
|
}
|
||||||
155
public/home/admin/event/htmlEvent.html
Executable file
155
public/home/admin/event/htmlEvent.html
Executable file
@@ -0,0 +1,155 @@
|
|||||||
|
<section class="name" flex> <article class="user">
|
||||||
|
<p class="title">Editar Eventos</p>
|
||||||
|
</article> </section>
|
||||||
|
|
||||||
|
<section class="event flex">
|
||||||
|
<article class="label">
|
||||||
|
<ul>
|
||||||
|
<li id="evento" value="event">Evento</li>
|
||||||
|
<li id="curso" value="course">Curso</li>
|
||||||
|
<li id="lugar" value="place">Lugar</li>
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="edit">
|
||||||
|
<!-- Evento ======================================================= -->
|
||||||
|
<div class="ehide" id="event"> <form action=" #nav admine" method="POST">
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Curso</label>
|
||||||
|
<select id="ecourse" name="ecourse"> <!-- a#dropvar -->
|
||||||
|
<!-- ##ecourse --> <!-- r##hide -->
|
||||||
|
<!-- c#ecourse
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Lugar</label> <!-- dropdown -->
|
||||||
|
<select id="eplace" name="eplace"> <!-- a#dropvar -->
|
||||||
|
<!-- ##eplace --> <!-- r##hide -->
|
||||||
|
<!-- c#eplace
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Fecha inicio</label> <!-- dropdown -->
|
||||||
|
<input id="dini" type="number" min="1" max="31" name="dini" value="1"/> <!-- a#dropvar -->
|
||||||
|
<select id="mini" name="mini"> <!-- a#dropvar -->
|
||||||
|
<!-- ##emini --> <!-- r##hide -->
|
||||||
|
<!-- c#emini
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
<input id="yini" type="number" min="2017" max="2050" name="yini" value="2017"/> <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Fecha fin</label> <!-- dropdown -->
|
||||||
|
<input id="dend" type="number" min="1" max="31" name="dend" value="1"/> <!-- a#dropvar -->
|
||||||
|
<select id="mend" name="mend"> <!-- a#dropvar -->
|
||||||
|
<!-- ##emini -->
|
||||||
|
</select>
|
||||||
|
<input id="yend" type="number" min="2017" max="2050" name="yend" value="2017"/> <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Costo</label> <input id="cost" type="text" name="cost"/> <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Promoción</label><input id="promo" type="text" name="promo"/> <!-- a#dropvar -->
|
||||||
|
<label>Habilitar</label><input type="checkbox" checked="checked" id="pen" name="pen"/> <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Imagen</label> <!-- dropdown -->
|
||||||
|
<select id="eimg" name="eimg"> <!-- a#dropvar -->
|
||||||
|
<option value="0" selected> -- Elegir imagen -- </option>
|
||||||
|
<!-- ##ilist --> <!-- r##hide -->
|
||||||
|
<!-- c#ilist
|
||||||
|
<option value=" #name "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
<div id=esimg></div>
|
||||||
|
</div>
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Existente</label>
|
||||||
|
<select id="eprev" name="eprev"> <!-- a#dropvar -->
|
||||||
|
<option value="0">-- Nuevo --</option>
|
||||||
|
<!-- ##eprev --> <!-- r##hide -->
|
||||||
|
<!-- c#eprev
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="flex field update">
|
||||||
|
<input type="hidden" name="update" value="1"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="eup" value="Aceptar"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="edel" value="Eliminar"> <!-- a#dropvar -->
|
||||||
|
<label>Habilitar</label>
|
||||||
|
<input id="een" type="checkbox" checked="checked" name="een" > <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
</form> </div>
|
||||||
|
<!-- Curso ====================================================== -->
|
||||||
|
<div class="ehide" id="course"><form id="fcourse" action=" #nav admine"
|
||||||
|
method="POST">
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Nombre</label>
|
||||||
|
<input id="cname" type="text" name="cname"/> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Temario</label>
|
||||||
|
<textarea form="fcourse" id="csubjects" name="csubjects"></textarea> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Servicios</label>
|
||||||
|
<textarea form="fcourse" id="cservices" name="cservices"></textarea> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Existente</label>
|
||||||
|
<select id="cprev" name="cprev"> <!-- a#dropvar -->
|
||||||
|
<option value="0">-- Nuevo --</option>
|
||||||
|
<!-- ##cprev --> <!-- r##hide -->
|
||||||
|
<!-- c#cprev
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
</div> <div class="flex field update">
|
||||||
|
<input type="hidden" name="update" value="1"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="cup" value="Aceptar"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="cdel" value="Eliminar"> <!-- a#dropvar -->
|
||||||
|
<label>Habilitar</label>
|
||||||
|
<input type="checkbox" checked="checked" id="cen" name="cen" > <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
</form> </div>
|
||||||
|
<!-- Lugar -->
|
||||||
|
<div class="ehide" id="place"><form action=" #nav admine" method="POST">
|
||||||
|
<div class="flex field">
|
||||||
|
<label>Nombre</label><input type="text" id= "pname" name="pname"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Direccion</label> <input type="text" id="paddr" name="paddr"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Observación</label> <input type="text" id="pobs" name="pobs"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Municipio</label> <input type="text" id="pto" name="pto"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Entidad</label> <input type="text" id="pst" name="pst"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>País</label> <input type="text" id="pco" name="pco"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Latitud</label> <input type="text"id="plat" name="plat"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Longitud</label> <input type="text" id="plng" name="plng"> <!-- a#dropvar -->
|
||||||
|
</div> <div class="flex field">
|
||||||
|
<label>Existente</label>
|
||||||
|
<select id="pprev" name="pprev"> <!-- a#dropvar -->
|
||||||
|
<option value="0">-- Nuevo --</option>
|
||||||
|
<!-- ##pprev --> <!-- r##hide -->
|
||||||
|
<!-- c#pprev
|
||||||
|
<option value=" #id "> #name </option>
|
||||||
|
--> <!-- rr#hide -->
|
||||||
|
</select>
|
||||||
|
</div> <div class="flex field update">
|
||||||
|
<input type="hidden" name="update" value="1"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="pup" value="Aceptar"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="pdel" value="Eliminar"> <!-- a#dropvar -->
|
||||||
|
<label>Habilitar</label>
|
||||||
|
<input id="pen" type="checkbox" checked="checked" name="pen" > <!-- a#dropvar -->
|
||||||
|
</div>
|
||||||
|
</form> <div class="mapa"></div>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
0
public/home/admin/event/i.h4d35\@gmail.com,
Normal file
0
public/home/admin/event/i.h4d35\@gmail.com,
Normal file
74
public/home/admin/event/jsEvent.js
Executable file
74
public/home/admin/event/jsEvent.js
Executable file
@@ -0,0 +1,74 @@
|
|||||||
|
d3.select("li#evento").style("background-color","#cedeef");
|
||||||
|
var li = d3.select("article.label","ul").selectAll("li");
|
||||||
|
var img_path = " #path ../../cal/img/";
|
||||||
|
var json_path = " #data admin/event/json/";
|
||||||
|
/* menu hide and show edit window*/
|
||||||
|
li.on("click",function(){
|
||||||
|
li.style("background-color","#e6eeff");
|
||||||
|
d3.select(this).style("background-color","#cedeef");
|
||||||
|
d3.selectAll("div.ehide").style("display","none");
|
||||||
|
d3.select( "div#"+d3.select(this).attr("value") ).style("display","block");
|
||||||
|
});
|
||||||
|
|
||||||
|
/*preview event image*/
|
||||||
|
function updateImage(){
|
||||||
|
var iname=d3.select("select#eimg").node().value;
|
||||||
|
if(iname != 0){
|
||||||
|
d3.select("div#esimg").style("background-image","url("+img_path+iname+")");}
|
||||||
|
else{ d3.select("div#esimg").style("background-image","none"); }
|
||||||
|
}
|
||||||
|
d3.select("select#eimg").on("change",updateImage);
|
||||||
|
|
||||||
|
/*preload form contents for event*/
|
||||||
|
d3.select("select#eprev").on("change",function(){
|
||||||
|
var eprev_id=d3.select("select#eprev").node().value;
|
||||||
|
d3.json( json_path+"qEvent.q&ecourse="+eprev_id ,function(d){
|
||||||
|
if(d[0] !=undefined) {if(d[0].cid != 0){
|
||||||
|
dropdownUpdate("ecourse",d[0].cid);
|
||||||
|
dropdownUpdate("eplace",d[0].pid);
|
||||||
|
d3.select("input#dini").attr("value",d[0].dini);
|
||||||
|
dropdownUpdate("mini",d[0].mini);
|
||||||
|
dropdownUpdate("yini",d[0].yini);
|
||||||
|
d3.select("input#dend").attr("value",d[0].dend);
|
||||||
|
dropdownUpdate("mend",d[0].mend);
|
||||||
|
dropdownUpdate("yend",d[0].yend);
|
||||||
|
d3.select("input#cost").attr("value",d[0].cost);
|
||||||
|
d3.select("input#promo").attr("value",d[0].promo);
|
||||||
|
d3.select("input#pen").attr("checked",d[0].pen);
|
||||||
|
d3.select("input#een").attr("checked",d[0].een);
|
||||||
|
dropdownUpdate("eimg",d[0].eimg);
|
||||||
|
updateImage();
|
||||||
|
}} }); });
|
||||||
|
|
||||||
|
/*preload form content for course*/
|
||||||
|
d3.select("select#cprev").on("change",function(){
|
||||||
|
var cprev_id=d3.select("select#cprev").node().value;
|
||||||
|
d3.json(json_path+"qCourse.q&course="+cprev_id ,function(d){
|
||||||
|
if(d[0]!=undefined){if(d[0].cid != 0){
|
||||||
|
d3.select("input#cname").attr("value",d[0].cname);
|
||||||
|
d3.select("textarea#csubjects").text(d[0].csubjects);
|
||||||
|
d3.select("textarea#cservices").text(d[0].cservices);
|
||||||
|
}} }); });
|
||||||
|
|
||||||
|
/*preload form content for place*/
|
||||||
|
d3.select("select#pprev").on("change",function(){
|
||||||
|
var pprev_id=d3.select("select#pprev").node().value;
|
||||||
|
d3.json(json_path+"qPlace.q&course="+pprev_id ,function(d){
|
||||||
|
if(d[0]!=undefined){if(d[0].pid != 0){
|
||||||
|
d3.select("input#pname").attr("value",d[0].pname);
|
||||||
|
d3.select("input#paddr").attr("value",d[0].paddr);
|
||||||
|
d3.select("input#pobs").attr("value",d[0].pobs);
|
||||||
|
d3.select("input#pto").attr("value",d[0].pto);
|
||||||
|
d3.select("input#pst").attr("value",d[0].pst);
|
||||||
|
d3.select("input#pco").attr("value",d[0].pco);
|
||||||
|
d3.select("input#plat").attr("value",d[0].plat);
|
||||||
|
d3.select("input#plng").attr("value",d[0].plng);
|
||||||
|
d3.select("input#pen").attr("checked",d[0].pen);
|
||||||
|
}} }); });
|
||||||
|
|
||||||
|
/*support "selected" option on other drop down*/
|
||||||
|
function dropdownUpdate(name,value){
|
||||||
|
d3.select("select#"+name).selectAll("option").each(function(d,i) {
|
||||||
|
d3.select(this).attr("selected",function(){
|
||||||
|
return this.value == value? "selected":null; }); });
|
||||||
|
}
|
||||||
17
public/home/admin/event/json/qCourse.q
Executable file
17
public/home/admin/event/json/qCourse.q
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_user */
|
||||||
|
/* c#password #dbdata_pass */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select
|
||||||
|
id as "cid",
|
||||||
|
nombre as "cname",
|
||||||
|
temario as "csubjects",
|
||||||
|
servicios as "cservices"
|
||||||
|
from curso
|
||||||
|
where id= #course ;
|
||||||
|
|
||||||
|
|
||||||
29
public/home/admin/event/json/qEvent.q
Executable file
29
public/home/admin/event/json/qEvent.q
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_user */
|
||||||
|
/* c#password #dbdata_pass */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
|
||||||
|
|
||||||
22
public/home/admin/event/json/qPlace.q
Executable file
22
public/home/admin/event/json/qPlace.q
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_user */
|
||||||
|
/* c#password #dbdata_pass */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 ;
|
||||||
|
|
||||||
|
|
||||||
25
public/home/admin/event/listImages.pl
Executable file
25
public/home/admin/event/listImages.pl
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
use JSON;
|
||||||
|
use Cwd 'abs_path';
|
||||||
|
use lib abs_path("../../")."/sibelius2/conf";
|
||||||
|
use Paths;
|
||||||
|
#-------------------------
|
||||||
|
print getNames( Paths::MOD ."/cal/img");
|
||||||
|
sub getNames{
|
||||||
|
my $dir = shift;
|
||||||
|
my @file_name;
|
||||||
|
opendir(DIR, $dir) or die "error opening dir: $dir \n$!";
|
||||||
|
while (my $file = readdir(DIR)) {
|
||||||
|
next unless ( $file =~m/^[\w\d]/);
|
||||||
|
next unless (-f "$dir/$file");
|
||||||
|
push(@file_name,{name=>$file,tag=>"ilist"});
|
||||||
|
}
|
||||||
|
closedir(DIR);
|
||||||
|
return encode_json( \@file_name );
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
__END__
|
||||||
|
|
||||||
15
public/home/admin/event/qCprev.q
Executable file
15
public/home/admin/event/qCprev.q
Executable 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;
|
||||||
|
|
||||||
12
public/home/admin/event/qEcourse.q
Executable file
12
public/home/admin/event/qEcourse.q
Executable 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;
|
||||||
13
public/home/admin/event/qEmend.q
Executable file
13
public/home/admin/event/qEmend.q
Executable 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;
|
||||||
14
public/home/admin/event/qEmini.q
Executable file
14
public/home/admin/event/qEmini.q
Executable 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;
|
||||||
13
public/home/admin/event/qEplace.q
Executable file
13
public/home/admin/event/qEplace.q
Executable 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;
|
||||||
18
public/home/admin/event/qEprev.q
Executable file
18
public/home/admin/event/qEprev.q
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_user */
|
||||||
|
/* c#password #dbdata_pass */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select
|
||||||
|
"eprev" as "tag",
|
||||||
|
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;
|
||||||
|
|
||||||
15
public/home/admin/event/qPprev.q
Executable file
15
public/home/admin/event/qPprev.q
Executable 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;
|
||||||
|
|
||||||
20
public/home/admin/event/update/add/qCup.q
Executable file
20
public/home/admin/event/update/add/qCup.q
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
24
public/home/admin/event/update/add/qEup.q
Executable file
24
public/home/admin/event/update/add/qEup.q
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
23
public/home/admin/event/update/add/qPup.q
Executable file
23
public/home/admin/event/update/add/qPup.q
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
/* 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);
|
||||||
|
|
||||||
|
|
||||||
12
public/home/admin/event/update/change/qCdel.q
Executable file
12
public/home/admin/event/update/change/qCdel.q
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_w */
|
||||||
|
/* c#password #dbdata_wp */
|
||||||
|
/* c#write write*/
|
||||||
|
|
||||||
|
|
||||||
|
delete from curso
|
||||||
|
where id = q#cprev ;
|
||||||
|
|
||||||
|
|
||||||
18
public/home/admin/event/update/change/qCup.q
Executable file
18
public/home/admin/event/update/change/qCup.q
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
/* 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 ;
|
||||||
|
|
||||||
|
|
||||||
12
public/home/admin/event/update/change/qEdel.q
Executable file
12
public/home/admin/event/update/change/qEdel.q
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_w */
|
||||||
|
/* c#password #dbdata_wp */
|
||||||
|
/* c#write write*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
delete from evento
|
||||||
|
where id = q#eprev ;
|
||||||
|
|
||||||
22
public/home/admin/event/update/change/qEup.q
Executable file
22
public/home/admin/event/update/change/qEup.q
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
/* 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 ;
|
||||||
|
|
||||||
13
public/home/admin/event/update/change/qPdel.q
Executable file
13
public/home/admin/event/update/change/qPdel.q
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_w */
|
||||||
|
/* c#password #dbdata_wp */
|
||||||
|
/* c#write write*/
|
||||||
|
|
||||||
|
|
||||||
|
delete from lugar
|
||||||
|
where id = q#pprev ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
20
public/home/admin/event/update/change/qPup.q
Executable file
20
public/home/admin/event/update/change/qPup.q
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
/* 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 ;
|
||||||
|
|
||||||
71
public/home/admin/home/cssAdmin.css
Executable file
71
public/home/admin/home/cssAdmin.css
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
div.cont{
|
||||||
|
display: -webkit-box; display: -moz-box; display: -ms-flexbox;
|
||||||
|
display: -webkit-flex; display: flex;
|
||||||
|
}
|
||||||
|
/*seccion radio------------------------------ */
|
||||||
|
section.title{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
}
|
||||||
|
article.title > p {
|
||||||
|
font-size:3em;
|
||||||
|
color:black;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:10px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*de la pagina ----------------------------*/
|
||||||
|
|
||||||
|
section.home{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
background-color:white;
|
||||||
|
position:relative;
|
||||||
|
min-height:50vh;
|
||||||
|
}
|
||||||
|
section.col2{
|
||||||
|
flex:2;
|
||||||
|
margin:15px;
|
||||||
|
max-width:500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* mensaje ---------------------------------*/
|
||||||
|
section.mod{
|
||||||
|
margin:10px auto ;
|
||||||
|
max-width:600px;
|
||||||
|
}
|
||||||
|
.mod label{ margin:15px; color:black; width:100%; display:block;}
|
||||||
|
.mod textarea{ width:100%; height:5em ;display:block;}
|
||||||
|
.mod input[type=button] { width:100%; height:10vh;display:block;}
|
||||||
|
|
||||||
|
/* facebook ---------------------------------*/
|
||||||
|
article.mfb{
|
||||||
|
width:470px;
|
||||||
|
height:180px;
|
||||||
|
margin:15px 15px 1px 15px;
|
||||||
|
background-color:#1d86d0;
|
||||||
|
overflow: auto;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
div.fb-post{ background-color:white;}
|
||||||
|
article.mfbl{
|
||||||
|
flex:1;
|
||||||
|
background-color:#1d86d0;
|
||||||
|
margin:auto 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* youtube ---------------------------------*/
|
||||||
|
div#ytbox{
|
||||||
|
min-width:300px;
|
||||||
|
height:400px;
|
||||||
|
}
|
||||||
|
iframe#evideo{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
/* soundcloud ------------------------------*/
|
||||||
|
article.msc{
|
||||||
|
flex:1;
|
||||||
|
margin:auto 5px ;
|
||||||
|
}
|
||||||
20
public/home/admin/home/jsButtons.js
Executable file
20
public/home/admin/home/jsButtons.js
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
document.getElementById("yview").onclick=updateyLink;
|
||||||
|
document.getElementById("fview").onclick=updatefLink;
|
||||||
|
document.getElementById("sview").onclick=updatesLink;
|
||||||
|
|
||||||
|
function updateyLink(){
|
||||||
|
var T = document.getElementById("ylink").value;
|
||||||
|
document.getElementById("evideo") .src="https://www.youtube.com/embed/"+T;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatefLink(){
|
||||||
|
document.getElementById("fbdiv").setAttribute(
|
||||||
|
'data-href',
|
||||||
|
document.getElementById("flink").value);
|
||||||
|
FB.XFBML.parse();
|
||||||
|
}
|
||||||
|
function updatesLink(){
|
||||||
|
var node = document.getElementById("msc");
|
||||||
|
while (node.firstChild) { node.removeChild(node.firstChild); }
|
||||||
|
node.innerHTML=document.getElementById("slink").value;
|
||||||
|
}
|
||||||
16
public/home/admin/home/jsFb.js
Executable file
16
public/home/admin/home/jsFb.js
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
window.fbAsyncInit = function() {
|
||||||
|
FB.init({
|
||||||
|
appId : '339e',
|
||||||
|
xfbml : true,
|
||||||
|
version : 'v2.8'
|
||||||
|
});
|
||||||
|
FB.AppEvents.logPageView();
|
||||||
|
};
|
||||||
|
|
||||||
|
(function(d, s, id){
|
||||||
|
var js, fjs = d.getElementsByTagName(s)[0];
|
||||||
|
if (d.getElementById(id)) {return;}
|
||||||
|
js = d.createElement(s); js.id = id;
|
||||||
|
js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.8";
|
||||||
|
fjs.parentNode.insertBefore(js, fjs);
|
||||||
|
}(document, 'script', 'facebook-jssdk'));
|
||||||
11
public/home/admin/home/qAdmin.q
Executable file
11
public/home/admin/home/qAdmin.q
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_user */
|
||||||
|
/* c#password #dbdata_pass */
|
||||||
|
|
||||||
|
select
|
||||||
|
nombre as "tag",
|
||||||
|
contenido as "admContent"
|
||||||
|
from casa where 1=1;
|
||||||
|
|
||||||
2
public/home/admin/home/update/qUpdate.q
Executable file
2
public/home/admin/home/update/qUpdate.q
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
update casa set contenido=? where nombre=?;
|
||||||
|
|
||||||
27
public/home/admin/mensajes/cssMsg.css
Executable file
27
public/home/admin/mensajes/cssMsg.css
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
section.messages{
|
||||||
|
justify-content:end;
|
||||||
|
}
|
||||||
|
article.select{
|
||||||
|
flex:1;
|
||||||
|
overflow:auto;
|
||||||
|
min-width:200px;
|
||||||
|
max-width:400px;
|
||||||
|
|
||||||
|
}
|
||||||
|
select.entry{
|
||||||
|
margin:10px;
|
||||||
|
}
|
||||||
|
option.entry{
|
||||||
|
margin:10px;
|
||||||
|
}
|
||||||
|
article.view{
|
||||||
|
flex:1;
|
||||||
|
min-width:200px;
|
||||||
|
max-width:500px;
|
||||||
|
}
|
||||||
|
article.view p{}
|
||||||
|
div.spcr{
|
||||||
|
background-color:gray;
|
||||||
|
height:3px;
|
||||||
|
width:30px;
|
||||||
|
}
|
||||||
23
public/home/admin/mensajes/htmlMensajes.html
Executable file
23
public/home/admin/mensajes/htmlMensajes.html
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
<section class="flex messages">
|
||||||
|
<article class="select">
|
||||||
|
<select id="sentry" class="entry" size=10>
|
||||||
|
|
||||||
|
<!-- ##mlist -->
|
||||||
|
|
||||||
|
<!-- r##hide -->
|
||||||
|
<!-- c#mlist <option value=" #mid " class="entry"> #entry </option> -->
|
||||||
|
<!-- rr#hide -->
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</article>
|
||||||
|
<article class="view">
|
||||||
|
<p id="fecha">fecha</p>
|
||||||
|
<div class="spcr"></div>
|
||||||
|
<p id="nombre">nombre</p>
|
||||||
|
<div class="spcr"></div>
|
||||||
|
<p id="correo">correo</p>
|
||||||
|
<div class="spcr"></div>
|
||||||
|
<p id="mensaje">mensaje</p>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</section>
|
||||||
11
public/home/admin/mensajes/jsMsg.js
Executable file
11
public/home/admin/mensajes/jsMsg.js
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
d3.select("select#sentry").on("change",function(){
|
||||||
|
var msg_id=d3.select("select#sentry").node().value;
|
||||||
|
d3.json(" #data admin/mensajes/json/qGetInfo.q&imid="+msg_id ,function(d){
|
||||||
|
if(d[0] !=undefined) {if(d[0] != 0){
|
||||||
|
d3.select("p#fecha").text(d[0].imdate);
|
||||||
|
d3.select("p#correo").text(d[0].imail);
|
||||||
|
d3.select("p#nombre").text(d[0].imname);
|
||||||
|
d3.select("p#mensaje").text(d[0].immsg);
|
||||||
|
}}});
|
||||||
|
});
|
||||||
19
public/home/admin/mensajes/json/qGetInfo.q
Executable file
19
public/home/admin/mensajes/json/qGetInfo.q
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbmsg */
|
||||||
|
/* c#user #dbmsg_user */
|
||||||
|
/* c#password #dbmsg_pass */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 ";
|
||||||
|
|
||||||
13
public/home/admin/mensajes/qEntries.q
Executable file
13
public/home/admin/mensajes/qEntries.q
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbmsg */
|
||||||
|
/* c#user #dbmsg_user */
|
||||||
|
/* c#password #dbmsg_pass */
|
||||||
|
|
||||||
|
select
|
||||||
|
"mlist" as tag,
|
||||||
|
id as mid,
|
||||||
|
concat(nombre," ",date(fecha)) as "entry"
|
||||||
|
from entrada
|
||||||
|
order by fecha;
|
||||||
|
|
||||||
27
public/home/admin/radio/candySwitch/cssMain.css
Executable file
27
public/home/admin/radio/candySwitch/cssMain.css
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
article#achat{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
article#achat > div{
|
||||||
|
margin:10px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
div.chat{
|
||||||
|
background-color: var(--red-color,#c22a39);
|
||||||
|
padding:20px 0px;
|
||||||
|
margin:15px 0px;
|
||||||
|
border-radius:5px;
|
||||||
|
min-width:200px;
|
||||||
|
color:white;
|
||||||
|
text-align:center;
|
||||||
|
max-width:250px;
|
||||||
|
}
|
||||||
|
div.chat:hover{
|
||||||
|
font-size:1.2em;
|
||||||
|
padding:22px 3px;
|
||||||
|
margin:13px -3px;
|
||||||
|
cursor:pointer;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
68
public/home/admin/radio/candySwitch/cssSwitch.css
Executable file
68
public/home/admin/radio/candySwitch/cssSwitch.css
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
/*from i dont know what web page*/
|
||||||
|
.onoffswitch {
|
||||||
|
position: relative;
|
||||||
|
width: 90px;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.onoffswitch-label {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid #999999;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner {
|
||||||
|
display: block; width: 200%; margin-left: -100%;
|
||||||
|
transition: margin 0.3s ease-in 0s;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
height: 30px;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 26px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: white;
|
||||||
|
font-family: Trebuchet, Arial, sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:before {
|
||||||
|
content: "ON";
|
||||||
|
padding-left: 10px;
|
||||||
|
background-color: #186578;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.onoffswitch-inner:after {
|
||||||
|
content: "OFF";
|
||||||
|
padding-right: 10px;
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
color: #999999;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.onoffswitch-switch {
|
||||||
|
display: block;
|
||||||
|
width: 18px;
|
||||||
|
margin: 0px;
|
||||||
|
background: #000000;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 72px;
|
||||||
|
transition: all 0.3s ease-in 0s;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
15
public/home/admin/radio/candySwitch/htmlCSwitch.html
Executable file
15
public/home/admin/radio/candySwitch/htmlCSwitch.html
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
<article id="achat" class="std3">
|
||||||
|
<h2> Apagar / Encender Chat </h2>
|
||||||
|
<div class="onoffswitch">
|
||||||
|
<form action="" method="post">
|
||||||
|
<input type="checkbox" name="onoffswitch"
|
||||||
|
class="onoffswitch-checkbox" id="myonoffswitch" checked>
|
||||||
|
<label class="onoffswitch-label" for="myonoffswitch">
|
||||||
|
<span class="onoffswitch-inner"></span>
|
||||||
|
<span class="onoffswitch-switch"></span>
|
||||||
|
</label>
|
||||||
|
<input type="hidden" id="tooglechat" name="x" value="disable.sh">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="clink" class="chat">Entra al Chat</div>
|
||||||
|
</article>
|
||||||
41
public/home/admin/radio/candySwitch/jsCSwitch.js
Executable file
41
public/home/admin/radio/candySwitch/jsCSwitch.js
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
d3.select("#clink").on("click",function(){
|
||||||
|
var newWindow = window.open(' #nav candy','_blank');
|
||||||
|
});
|
||||||
|
|
||||||
|
var ciface =" #exec candy_loader/candyInterface.pl&v=";
|
||||||
|
d3.json(ciface+"isOn" ,function(d){
|
||||||
|
if(d != undefined){
|
||||||
|
if (d.a==1) { on(); }
|
||||||
|
else if (d.a==0) { off(); }}
|
||||||
|
else {console.error(ciface+"isOn");}
|
||||||
|
});
|
||||||
|
|
||||||
|
d3.select("#myonoffswitch")
|
||||||
|
.on("change",function(){
|
||||||
|
if (this.checked) { on();}
|
||||||
|
else {off();}
|
||||||
|
});
|
||||||
|
|
||||||
|
function on(){
|
||||||
|
d3.select("#clink").style("visibility","visible");
|
||||||
|
d3.json(ciface+"on",function(d){
|
||||||
|
if (d.a==1){
|
||||||
|
d3.select("#clink").style("visibility","visible");
|
||||||
|
d3.select("#myonoffswitch").property("checked","checked"); }
|
||||||
|
else {
|
||||||
|
d3.select("#myonoffswitch").property("checked","");
|
||||||
|
}}); }
|
||||||
|
|
||||||
|
function off(){
|
||||||
|
d3.select("#clink").style("visibility","hidden");
|
||||||
|
d3.json(ciface+"off",function(d){
|
||||||
|
if (d.a==1){
|
||||||
|
d3.select("#clink").style("visibility","hidden");
|
||||||
|
d3.select("#myonoffswitch").property("checked",""); }
|
||||||
|
else {
|
||||||
|
d3.select("#myonoffswitch").property("checked","checked");
|
||||||
|
}}); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
74
public/home/admin/radio/cssAdmin.css
Executable file
74
public/home/admin/radio/cssAdmin.css
Executable file
@@ -0,0 +1,74 @@
|
|||||||
|
/*seccion radio------------------------------ */
|
||||||
|
section.title{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
}
|
||||||
|
article.title> p {
|
||||||
|
font-size:3em;
|
||||||
|
color:black;;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:10px;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
section.radio{
|
||||||
|
justify-content:center;
|
||||||
|
-webkit-justify-content:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.info{
|
||||||
|
flex:1;
|
||||||
|
border: 1px solid red;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin:30px;
|
||||||
|
min-width:260px;
|
||||||
|
background-color:black;
|
||||||
|
}
|
||||||
|
article.info p {
|
||||||
|
font-size:1em;
|
||||||
|
color:white;
|
||||||
|
font-weight:lighter;
|
||||||
|
margin:10px;
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
div#histg{
|
||||||
|
height:100px;
|
||||||
|
background-color:white;
|
||||||
|
margin:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.cont{
|
||||||
|
display: -webkit-box; display: -moz-box; display: -ms-flexbox;
|
||||||
|
display: -webkit-flex; display: flex;
|
||||||
|
margin:5px;
|
||||||
|
}
|
||||||
|
div.cont p{
|
||||||
|
margin:1px 3px;;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
article.rmod{
|
||||||
|
flex:1;
|
||||||
|
margin:30px;
|
||||||
|
background-color:black;
|
||||||
|
}
|
||||||
|
.rmod label{
|
||||||
|
color:white;
|
||||||
|
display:block;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.3em;
|
||||||
|
margin: 3vh 0vh;
|
||||||
|
}
|
||||||
|
.rmod textarea{ width:100%; height:15vh;display:block;}
|
||||||
|
.rmod input[type=submit] { width:100%; height:10vh;display:block;}
|
||||||
|
|
||||||
|
div#onAir{
|
||||||
|
border-radius: 6px;
|
||||||
|
background-color:red;
|
||||||
|
margin: auto;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
24
public/home/admin/radio/htmlAdmin.html
Executable file
24
public/home/admin/radio/htmlAdmin.html
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
<section class="title flex">
|
||||||
|
<article class="title"> <p>Radio</p> </article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="radio flex">
|
||||||
|
<article class="info">
|
||||||
|
<div class="cont"><p id="rhead">Estado:</p> <div id="onAir"></div></div>
|
||||||
|
<div class="cont"><p id="now"></p></div>
|
||||||
|
<div class="cont">
|
||||||
|
<p>En línea:</p><p id="online"></p><p>Max:</p><p id="onmax"></p>
|
||||||
|
</div>
|
||||||
|
<div id="histg">grafiquita</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="rmod">
|
||||||
|
<form action=" #nav adminr" method="POST">
|
||||||
|
<label>Aviso para el radio</label>
|
||||||
|
<textarea name="link" id="tmod" class="rmod"> #rContent </textarea> <!-- a#dropvar -->
|
||||||
|
<input type="hidden" name="update" value="rmod"> <!-- a#dropvar -->
|
||||||
|
<input type="submit" name="hup" value="Cambiar"> <!-- a#dropvar -->
|
||||||
|
</form>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
19
public/home/admin/radio/jsLoadInfo.js
Executable file
19
public/home/admin/radio/jsLoadInfo.js
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
dataUpdate();
|
||||||
|
|
||||||
|
function dataUpdate(){
|
||||||
|
d3.json(" #radio_server /status-json.xsl",function(d){
|
||||||
|
if (d.icestats.source != undefined){
|
||||||
|
d3.select("#now").text(d.icestats.source.title);
|
||||||
|
d3.select("#onAir").style("background-color","green");
|
||||||
|
d3.select("#onmax").text(d.icestats.source.listener_peak);
|
||||||
|
d3.select("#online").text(d.icestats.source.listeners);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
d3.select("#now").text("offline");
|
||||||
|
d3.select("#onAir").style("background-color","red");
|
||||||
|
d3.select("#onmax").text("--");
|
||||||
|
d3.select("#online").text("--");
|
||||||
|
} });
|
||||||
|
d3.select("#onAir").transition().on("end",dataUpdate).delay(60000);
|
||||||
|
};
|
||||||
|
|
||||||
12
public/home/admin/radio/qAdmin.q
Executable file
12
public/home/admin/radio/qAdmin.q
Executable 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";
|
||||||
|
|
||||||
10
public/home/admin/radio/update/qUpdate.q
Executable file
10
public/home/admin/radio/update/qUpdate.q
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
/* c#host localhost*/
|
||||||
|
/* c#database #dbdata */
|
||||||
|
/* c#user #dbdata_w */
|
||||||
|
/* c#password #dbdata_wp */
|
||||||
|
/* c#write write*/
|
||||||
|
|
||||||
|
|
||||||
|
update casa set contenido= q#link where nombre = q#update ;
|
||||||
|
|
||||||
9
templates/home/admin.html.ep
Executable file
9
templates/home/admin.html.ep
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
<section class="header flex">
|
||||||
|
<article class="header"> <p>Administracion</p> </article>
|
||||||
|
<article class="anav">
|
||||||
|
<a href="admin/casa"><p>Casa</p></a>
|
||||||
|
<a href="admin/radio"><p>Radio</p></a>
|
||||||
|
<a href="admin/evn"><p>Eventos</p></a>
|
||||||
|
<a href="admin/msg"><p>Mensajes</p></a>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
61
templates/home/admin/home.html.ep
Executable file
61
templates/home/admin/home.html.ep
Executable file
@@ -0,0 +1,61 @@
|
|||||||
|
<section class="title flex">
|
||||||
|
<article class="title"> <p>Editar Casa</p> </article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="mod">
|
||||||
|
<form action="/admin/home" method="POST">
|
||||||
|
<label>Mensaje del día</label>
|
||||||
|
<textarea name="link" id="tmod" class="mod"><%= $mod %></textarea>
|
||||||
|
<input type="hidden" name="update" value="mod">
|
||||||
|
<input type="submit" name="hup" value="Cambiar" >
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="home flex"> <!-- col2 -->
|
||||||
|
<section class="col2"> <!-- col2 -->
|
||||||
|
<article id="msc" class="msc">
|
||||||
|
<%== $sc %>
|
||||||
|
</article>
|
||||||
|
<article class="mscl">
|
||||||
|
<form action="/admin/home" method="POST">
|
||||||
|
<input type="text" id="slink" name="link" value="">
|
||||||
|
<input type="button" id="sview" name="view" value="Ver">
|
||||||
|
<input type="submit" name="hup" value="Cambiar" >
|
||||||
|
<input type="hidden" name="update" value="sc">
|
||||||
|
</form>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<!-- face -->
|
||||||
|
<article class="mfb" id="amfb">
|
||||||
|
<div class="fb-post" id="fbdiv" data-href="<%= $fb %>"
|
||||||
|
data-width="450" data-show-text="true"></div>
|
||||||
|
</article>
|
||||||
|
<article class="mfbl">
|
||||||
|
<form action="/admin/home" method="POST">
|
||||||
|
<input type="text" id="flink" name="link" value="">
|
||||||
|
<input type="button" id="fview" name="view" value="Ver">
|
||||||
|
<input type="submit" name="hup" value="Cambiar" >
|
||||||
|
<input type="hidden" name="update" value="fb">
|
||||||
|
</form>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="col2"> <!-- col2 --> <!-- yt -->
|
||||||
|
<article class="myt">
|
||||||
|
<div id="ytbox">
|
||||||
|
<iframe id="evideo"
|
||||||
|
src="https://www.youtube.com/embed/<%= $yt %> "
|
||||||
|
allowfullscreen></iframe>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
<article class="mytl">
|
||||||
|
<form action="/admin/home" method="POST">
|
||||||
|
<input type="text" id="ylink" name="link">
|
||||||
|
<input type="button" id="yview" value="Ver">
|
||||||
|
<input type="submit" name="hup" value="Cambiar" >
|
||||||
|
<input type="hidden" name="update" value="yt">
|
||||||
|
</form>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<section class="cform " >
|
<section class="cform " >
|
||||||
<article class="cform">
|
<article class="cform">
|
||||||
<form action="" class="cform" method="post">
|
<form action="contact" class="cform" method="post">
|
||||||
<label>Nombre</label> <input class="bsmall" id="mname" type="text" name="mname">
|
<label>Nombre</label> <input class="bsmall" id="mname" type="text" name="mname">
|
||||||
<label>Correo</label> <input class="" type="email" name="mail">
|
<label>Correo</label> <input class="" type="email" name="mail">
|
||||||
<label>Mensaje</label>
|
<label>Mensaje</label>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<section id="snav" class="flex nav anav">
|
<section id="snav" class="flex nav anav">
|
||||||
<article class="lhome">
|
<article class="lhome">
|
||||||
<a id="hhome" href="home"></a>
|
<a id="hhome" href="/home"></a>
|
||||||
</article>
|
</article>
|
||||||
<article class="tel">
|
<article class="tel">
|
||||||
<div id="tel" class="icon"></div>
|
<div id="tel" class="icon"></div>
|
||||||
|
|||||||
@@ -10,15 +10,19 @@
|
|||||||
<%= stylesheet "/global/nav/cssSide.css" %>
|
<%= stylesheet "/global/nav/cssSide.css" %>
|
||||||
<%= stylesheet "/global/nav/cssNav.css" %>
|
<%= stylesheet "/global/nav/cssNav.css" %>
|
||||||
<%= stylesheet "/global/chaos/c.css" %>
|
<%= stylesheet "/global/chaos/c.css" %>
|
||||||
<%foreach my $v ( @{ stash('css') } ) {%><%= stylesheet "$v";%><%}%>
|
<% map{%><%= stylesheet "$_"%><%}(@{stash('css')}) if defined(stash('css'));%>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%= include 'home/htmlNav'
|
%= include 'home/htmlNav'
|
||||||
%= include 'home/htmlSide'
|
%= include 'home/htmlSide'
|
||||||
|
<% map{%><%= include "$_"%><%}(@{stash('prepend')})
|
||||||
|
if defined(stash('prepend'));%>
|
||||||
<%= content %>
|
<%= content %>
|
||||||
|
<% map{%><%= include "$_"%><%}(@{stash('apend')})
|
||||||
|
if defined(stash('apend'));%>
|
||||||
%= include 'home/htmlChaos'
|
%= include 'home/htmlChaos'
|
||||||
<%= javascript "/global/nav/d3Side.js"; %>
|
<%= javascript "/global/nav/d3Side.js"; %>
|
||||||
<%foreach my $v ( @{ stash('js') } ) {%><%= javascript "$v";%><%}%>
|
<% map{%><%= javascript "$_"%><%}(@{stash('js')}) if defined(stash('js'));%>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
30
templates/layouts/defaultContact.html.ep
Normal file
30
templates/layouts/defaultContact.html.ep
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><%= title %></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<!-- <script src="https://d3js.org/d3.v4.min.js" charset="utf-8"></script> -->
|
||||||
|
<%= javascript "/ext/d3.v4.min.js"; %>
|
||||||
|
<%= stylesheet "/global/layout.css" %>
|
||||||
|
<%= stylesheet "/global/nav/cssSide.css" %>
|
||||||
|
<%= stylesheet "/global/nav/cssNav.css" %>
|
||||||
|
<%= stylesheet "/global/chaos/c.css" %>
|
||||||
|
<%= stylesheet "/home/contact/cssContact1.css" %>
|
||||||
|
<% map{%><%= stylesheet "$_"%><%}(@{stash('css')}) if defined(stash('css'));%>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
%= include 'home/htmlNav'
|
||||||
|
%= include 'home/htmlSide'
|
||||||
|
<% map{%><%= include "$_"%><%}(@{stash('prepend')})
|
||||||
|
if defined(stash('prepend'));%>
|
||||||
|
<%= content %>
|
||||||
|
<% map{%><%= include "$_"%><%}(@{stash('apend')})
|
||||||
|
if defined(stash('apend'));%>
|
||||||
|
%= include 'home/contact'
|
||||||
|
%= include 'home/htmlChaos'
|
||||||
|
<%= javascript "/global/nav/d3Side.js"; %>
|
||||||
|
<% map{%><%= javascript "$_"%><%}(@{stash('js')}) if defined(stash('js'));%>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
Reference in New Issue
Block a user