From 4f0061cd7d1a8a293913149a877d08aa72da9d23 Mon Sep 17 00:00:00 2001 From: mynah Date: Wed, 18 Jul 2018 04:28:26 -0500 Subject: [PATCH] updatedb --- lib/Dojo.pm | 2 + lib/Dojo/Controller/Home.pm | 62 ++++--- lib/Dojo/Controller/Users.pm | 3 +- lib/Dojo/Model/Vuelo.pm | 32 +++- lib/Dojo/Support.pm | 5 +- public/home/admin/cssAdmin.css | 41 +++++ public/home/admin/event/SCHEDULE COMPLETE - , | 0 ... students: \\n\\n\\n\\nHave a nice day..." | 0 public/home/admin/event/[ | 0 "public/home/admin/event/admin\\@," | 0 public/home/admin/event/cssEvent.css | 89 ++++++++++ public/home/admin/event/htmlEvent.html | 155 ++++++++++++++++++ .../home/admin/event/i.h4d35\\@gmail.com," | 0 public/home/admin/event/jsEvent.js | 74 +++++++++ public/home/admin/event/json/qCourse.q | 17 ++ public/home/admin/event/json/qEvent.q | 29 ++++ public/home/admin/event/json/qPlace.q | 22 +++ public/home/admin/event/listImages.pl | 25 +++ public/home/admin/event/qCprev.q | 15 ++ public/home/admin/event/qEcourse.q | 12 ++ public/home/admin/event/qEmend.q | 13 ++ public/home/admin/event/qEmini.q | 14 ++ public/home/admin/event/qEplace.q | 13 ++ public/home/admin/event/qEprev.q | 18 ++ public/home/admin/event/qPprev.q | 15 ++ public/home/admin/event/update/add/qCup.q | 20 +++ public/home/admin/event/update/add/qEup.q | 24 +++ public/home/admin/event/update/add/qPup.q | 23 +++ public/home/admin/event/update/change/qCdel.q | 12 ++ public/home/admin/event/update/change/qCup.q | 18 ++ public/home/admin/event/update/change/qEdel.q | 12 ++ public/home/admin/event/update/change/qEup.q | 22 +++ public/home/admin/event/update/change/qPdel.q | 13 ++ public/home/admin/event/update/change/qPup.q | 20 +++ public/home/admin/home/cssAdmin.css | 71 ++++++++ public/home/admin/home/jsButtons.js | 20 +++ public/home/admin/home/jsFb.js | 16 ++ public/home/admin/home/qAdmin.q | 11 ++ public/home/admin/home/update/qUpdate.q | 2 + public/home/admin/mensajes/cssMsg.css | 27 +++ public/home/admin/mensajes/htmlMensajes.html | 23 +++ public/home/admin/mensajes/jsMsg.js | 11 ++ public/home/admin/mensajes/json/qGetInfo.q | 19 +++ public/home/admin/mensajes/qEntries.q | 13 ++ .../home/admin/radio/candySwitch/cssMain.css | 27 +++ .../admin/radio/candySwitch/cssSwitch.css | 68 ++++++++ .../admin/radio/candySwitch/htmlCSwitch.html | 15 ++ .../home/admin/radio/candySwitch/jsCSwitch.js | 41 +++++ public/home/admin/radio/cssAdmin.css | 74 +++++++++ public/home/admin/radio/htmlAdmin.html | 24 +++ public/home/admin/radio/jsLoadInfo.js | 19 +++ public/home/admin/radio/qAdmin.q | 12 ++ public/home/admin/radio/update/qUpdate.q | 10 ++ .../{contact => contact2}/cssContact2.css | 0 templates/home/admin.html.ep | 9 + templates/home/admin/home.html.ep | 61 +++++++ templates/home/contact.html.ep | 2 +- templates/home/home.html.ep | 4 +- templates/home/htmlNav.html.ep | 2 +- templates/layouts/default.html.ep | 8 +- templates/layouts/defaultContact.html.ep | 30 ++++ 61 files changed, 1396 insertions(+), 43 deletions(-) create mode 100755 public/home/admin/cssAdmin.css create mode 100644 public/home/admin/event/SCHEDULE COMPLETE - , create mode 100644 "public/home/admin/event/Student schedule for today, completed for the following students: \\n\\n\\n\\nHave a nice day..." create mode 100644 public/home/admin/event/[ create mode 100644 "public/home/admin/event/admin\\@," create mode 100755 public/home/admin/event/cssEvent.css create mode 100755 public/home/admin/event/htmlEvent.html create mode 100644 "public/home/admin/event/i.h4d35\\@gmail.com," create mode 100755 public/home/admin/event/jsEvent.js create mode 100755 public/home/admin/event/json/qCourse.q create mode 100755 public/home/admin/event/json/qEvent.q create mode 100755 public/home/admin/event/json/qPlace.q create mode 100755 public/home/admin/event/listImages.pl create mode 100755 public/home/admin/event/qCprev.q create mode 100755 public/home/admin/event/qEcourse.q create mode 100755 public/home/admin/event/qEmend.q create mode 100755 public/home/admin/event/qEmini.q create mode 100755 public/home/admin/event/qEplace.q create mode 100755 public/home/admin/event/qEprev.q create mode 100755 public/home/admin/event/qPprev.q create mode 100755 public/home/admin/event/update/add/qCup.q create mode 100755 public/home/admin/event/update/add/qEup.q create mode 100755 public/home/admin/event/update/add/qPup.q create mode 100755 public/home/admin/event/update/change/qCdel.q create mode 100755 public/home/admin/event/update/change/qCup.q create mode 100755 public/home/admin/event/update/change/qEdel.q create mode 100755 public/home/admin/event/update/change/qEup.q create mode 100755 public/home/admin/event/update/change/qPdel.q create mode 100755 public/home/admin/event/update/change/qPup.q create mode 100755 public/home/admin/home/cssAdmin.css create mode 100755 public/home/admin/home/jsButtons.js create mode 100755 public/home/admin/home/jsFb.js create mode 100755 public/home/admin/home/qAdmin.q create mode 100755 public/home/admin/home/update/qUpdate.q create mode 100755 public/home/admin/mensajes/cssMsg.css create mode 100755 public/home/admin/mensajes/htmlMensajes.html create mode 100755 public/home/admin/mensajes/jsMsg.js create mode 100755 public/home/admin/mensajes/json/qGetInfo.q create mode 100755 public/home/admin/mensajes/qEntries.q create mode 100755 public/home/admin/radio/candySwitch/cssMain.css create mode 100755 public/home/admin/radio/candySwitch/cssSwitch.css create mode 100755 public/home/admin/radio/candySwitch/htmlCSwitch.html create mode 100755 public/home/admin/radio/candySwitch/jsCSwitch.js create mode 100755 public/home/admin/radio/cssAdmin.css create mode 100755 public/home/admin/radio/htmlAdmin.html create mode 100755 public/home/admin/radio/jsLoadInfo.js create mode 100755 public/home/admin/radio/qAdmin.q create mode 100755 public/home/admin/radio/update/qUpdate.q rename public/home/{contact => contact2}/cssContact2.css (100%) create mode 100755 templates/home/admin.html.ep create mode 100755 templates/home/admin/home.html.ep create mode 100644 templates/layouts/defaultContact.html.ep diff --git a/lib/Dojo.pm b/lib/Dojo.pm index 145d936..63a2e89 100644 --- a/lib/Dojo.pm +++ b/lib/Dojo.pm @@ -33,6 +33,8 @@ sub startup { $r->any('/json/:dreq')->to('data#simple'); $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('/logout')->to('users#logout'); diff --git a/lib/Dojo/Controller/Home.pm b/lib/Dojo/Controller/Home.pm index f083b5b..6296466 100644 --- a/lib/Dojo/Controller/Home.pm +++ b/lib/Dojo/Controller/Home.pm @@ -1,32 +1,36 @@ package Dojo::Controller::Home; use Mojo::Base 'Mojolicious::Controller'; +use Mojo::Template; use Dojo::Support qw{ dmph merge_hash load_module }; use Dojo::Conf; sub tst{ my $c=shift; - my ($v,$w)= load_module($c); - # $c->stash($v); - $c->stash(d =>$v); - + # $c->stash( merge_hash( + # (load_module("home/tst"))[0], + # (load_module("home/contact"))[0] + #)); + # $c->stash(apend => ["home/contact"]); + $c->stash( (load_module("home/tst"))[0] ); + $c->stash(layout=> "defaultContact"); } sub home { my $c = shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("home/home"))[0]); $c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod}); } sub pang { my $c = shift; - my ($v,$w)=load_module($c); + my ($v,$w)=load_module("home/pang"); $c->stash($v); $c->stash( $c->dbv->pang($w) ); } sub cal { my $c = shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("home/cal"))[0]); my ($data,$block)=$c->dbv->cal; my %hdata; map{ push @{ $hdata{$_->{bid}} },$_; }(@$data); @@ -35,65 +39,75 @@ sub cal { sub event{ 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(layout=> "defaultContact"); } + sub contact{ my $c = shift; if ($c->param("mup")){ $c->flash(mname => $c->param("mname")); $c->redirect_to('contact2'); }else{ - my $dir= "/$c->{stash}{controller}/$c->{stash}{action}"; - $c->stash( css=>["$dir/cssContact1.css"], js=>[]); - $c->stash( layout=>"default"); + $c->stash((load_module("home/contact"))[0]); } } sub contact2{ my $c = shift; $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((load_module("home/contact2"))[0]); } sub store{ my $c = shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("home/store"))[0]); $c->stash( r=>$c->dbv->store); + $c->stash(layout=> "defaultContact"); } sub tv{ my $c = shift; $c->stash( merge_hash( - (load_module($c))[0], - (load_module($c,"home/tv/trans"))[0] + (load_module("home/tv"))[0], + (load_module("home/tv/trans"))[0] )); my ($series,$table)=$c->dbv->tv; $c->stash( series=>$series, table=>$table); + $c->stash(layout=> "defaultContact"); } sub podcast{ my $c = shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("home/podcast"))[0]); my ($txt,$h)=$c->dbv->podcast; $c->stash( t=>$txt, pod=>$h,); + $c->stash(layout=> "defaultContact"); } sub radio{ my $c=shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("home/radio"))[0]); $c->stash(%{($c->dbv->radio)->[0]}); $c->stash($Dojo::Conf::radio); $c->stash(nick=>$c->session("nick")); } - - #$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]"); +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}); + + +} + 1; diff --git a/lib/Dojo/Controller/Users.pm b/lib/Dojo/Controller/Users.pm index a5054b3..62f73dc 100644 --- a/lib/Dojo/Controller/Users.pm +++ b/lib/Dojo/Controller/Users.pm @@ -5,9 +5,10 @@ use Dojo::Support qw{ merge_hash load_module }; sub login { my $c = shift; - $c->stash((load_module($c))[0]); + $c->stash((load_module("users/login"))[0]); my $user = $c->param('uname') // ''; my $pass = $c->param('pass') //''; + $c->stash(layout=>"defaultContact"); return $c->render unless my $pmid = $c->dbg->check($user, $pass); $c->session(user => $user, pmid=>$pmid, nick=> $c->param('nick')); $c->redirect_to('radio'); diff --git a/lib/Dojo/Model/Vuelo.pm b/lib/Dojo/Model/Vuelo.pm index 910b2bf..c5b367c 100644 --- a/lib/Dojo/Model/Vuelo.pm +++ b/lib/Dojo/Model/Vuelo.pm @@ -14,31 +14,36 @@ sub new { bless {}, shift }; sub mod{ 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{ my ($c,$q)=@_; return {map { basename($_,".md") => load_md("public/$_")}@{$q->{md}}}; } sub cal { - my $block=_read (path("public/home/cal/q1Block.q")->slurp,$vuelo); - my $data=_read (path("public/home/cal/q3Event.q")->slurp,$vuelo); + my $block=_read (path("public/home/cal/q1Block.q")->slurp); + my $data=_read (path("public/home/cal/q3Event.q")->slurp); return ($data,$block); } sub event{ 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{ - return _read (path("public/home/store/qStore.q")->slurp,$vuelo); + return _read (path("public/home/store/qStore.q")->slurp); } sub tv{ - my $series = _read (path("public/home/tv/qSeries.q")->slurp,$vuelo); #group,name - my $table = _read (path("public/home/tv/qTable.q")->slurp,$vuelo); #name,order,group + my $series = _read (path("public/home/tv/qSeries.q")->slurp); #group,name + my $table = _read (path("public/home/tv/qTable.q")->slurp); #name,order,group return ($series,$table); } @@ -50,11 +55,11 @@ sub podcast{ sub radio{ my $q="select contenido as rmod from casa where nombre='rmod';"; - return _read($q,$vuelo); + return _read($q); } sub _read{ - my ($q,$d,@bind)=@_; + my ($q,@bind)=@_; my (@empty,$arr); 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); @@ -64,6 +69,15 @@ sub _read{ $dbh->disconnect(); 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{ return "" unless diff --git a/lib/Dojo/Support.pm b/lib/Dojo/Support.pm index bed0889..19c9d1b 100644 --- a/lib/Dojo/Support.pm +++ b/lib/Dojo/Support.pm @@ -34,10 +34,9 @@ sub merge_hash{ } sub load_module{ - my $c=shift; - my $dir=shift //"$c->{stash}{controller}/$c->{stash}{action}"; + my $dir=shift; my $lpath= Dojo::Conf::MOD."/$dir"; - my $h; $h->{js}=[]; $h->{css}=[]; #no me gusta!!! + my $h; $h->{layout} = "default"; my $q; my @s= get_names($lpath); diff --git a/public/home/admin/cssAdmin.css b/public/home/admin/cssAdmin.css new file mode 100755 index 0000000..3f39030 --- /dev/null +++ b/public/home/admin/cssAdmin.css @@ -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; + +} diff --git a/public/home/admin/event/SCHEDULE COMPLETE - , b/public/home/admin/event/SCHEDULE COMPLETE - , new file mode 100644 index 0000000..e69de29 diff --git "a/public/home/admin/event/Student schedule for today, completed for the following students: \\n\\n\\n\\nHave a nice day..." "b/public/home/admin/event/Student schedule for today, completed for the following students: \\n\\n\\n\\nHave a nice day..." new file mode 100644 index 0000000..e69de29 diff --git a/public/home/admin/event/[ b/public/home/admin/event/[ new file mode 100644 index 0000000..e69de29 diff --git "a/public/home/admin/event/admin\\@," "b/public/home/admin/event/admin\\@," new file mode 100644 index 0000000..e69de29 diff --git a/public/home/admin/event/cssEvent.css b/public/home/admin/event/cssEvent.css new file mode 100755 index 0000000..447efcf --- /dev/null +++ b/public/home/admin/event/cssEvent.css @@ -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; +} diff --git a/public/home/admin/event/htmlEvent.html b/public/home/admin/event/htmlEvent.html new file mode 100755 index 0000000..bd6594b --- /dev/null +++ b/public/home/admin/event/htmlEvent.html @@ -0,0 +1,155 @@ +
+

Editar Eventos

+
+ +
+
+
    +
  • Evento
  • +
  • Curso
  • +
  • Lugar
  • +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + + +
+
+ + + + +
+
+ +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + + + + +
+
+ +
+
+ + +
+ + +
+ + +
+ + +
+ + + + + +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + +
+ + + + + +
+
+
+
diff --git "a/public/home/admin/event/i.h4d35\\@gmail.com," "b/public/home/admin/event/i.h4d35\\@gmail.com," new file mode 100644 index 0000000..e69de29 diff --git a/public/home/admin/event/jsEvent.js b/public/home/admin/event/jsEvent.js new file mode 100755 index 0000000..951c352 --- /dev/null +++ b/public/home/admin/event/jsEvent.js @@ -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; }); }); +} diff --git a/public/home/admin/event/json/qCourse.q b/public/home/admin/event/json/qCourse.q new file mode 100755 index 0000000..1f12c85 --- /dev/null +++ b/public/home/admin/event/json/qCourse.q @@ -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 ; + + diff --git a/public/home/admin/event/json/qEvent.q b/public/home/admin/event/json/qEvent.q new file mode 100755 index 0000000..8b9dab9 --- /dev/null +++ b/public/home/admin/event/json/qEvent.q @@ -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 ; + + diff --git a/public/home/admin/event/json/qPlace.q b/public/home/admin/event/json/qPlace.q new file mode 100755 index 0000000..8e1c039 --- /dev/null +++ b/public/home/admin/event/json/qPlace.q @@ -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 ; + + diff --git a/public/home/admin/event/listImages.pl b/public/home/admin/event/listImages.pl new file mode 100755 index 0000000..66f8854 --- /dev/null +++ b/public/home/admin/event/listImages.pl @@ -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__ + diff --git a/public/home/admin/event/qCprev.q b/public/home/admin/event/qCprev.q new file mode 100755 index 0000000..b72bd8b --- /dev/null +++ b/public/home/admin/event/qCprev.q @@ -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; + diff --git a/public/home/admin/event/qEcourse.q b/public/home/admin/event/qEcourse.q new file mode 100755 index 0000000..5b1e231 --- /dev/null +++ b/public/home/admin/event/qEcourse.q @@ -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; diff --git a/public/home/admin/event/qEmend.q b/public/home/admin/event/qEmend.q new file mode 100755 index 0000000..4b90bba --- /dev/null +++ b/public/home/admin/event/qEmend.q @@ -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; diff --git a/public/home/admin/event/qEmini.q b/public/home/admin/event/qEmini.q new file mode 100755 index 0000000..17cc96e --- /dev/null +++ b/public/home/admin/event/qEmini.q @@ -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; diff --git a/public/home/admin/event/qEplace.q b/public/home/admin/event/qEplace.q new file mode 100755 index 0000000..0a705e7 --- /dev/null +++ b/public/home/admin/event/qEplace.q @@ -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; diff --git a/public/home/admin/event/qEprev.q b/public/home/admin/event/qEprev.q new file mode 100755 index 0000000..e743b31 --- /dev/null +++ b/public/home/admin/event/qEprev.q @@ -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; + diff --git a/public/home/admin/event/qPprev.q b/public/home/admin/event/qPprev.q new file mode 100755 index 0000000..3372a4e --- /dev/null +++ b/public/home/admin/event/qPprev.q @@ -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; + diff --git a/public/home/admin/event/update/add/qCup.q b/public/home/admin/event/update/add/qCup.q new file mode 100755 index 0000000..b0e608f --- /dev/null +++ b/public/home/admin/event/update/add/qCup.q @@ -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); + + + + diff --git a/public/home/admin/event/update/add/qEup.q b/public/home/admin/event/update/add/qEup.q new file mode 100755 index 0000000..87014e3 --- /dev/null +++ b/public/home/admin/event/update/add/qEup.q @@ -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); + + + diff --git a/public/home/admin/event/update/add/qPup.q b/public/home/admin/event/update/add/qPup.q new file mode 100755 index 0000000..5f7dea1 --- /dev/null +++ b/public/home/admin/event/update/add/qPup.q @@ -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); + + diff --git a/public/home/admin/event/update/change/qCdel.q b/public/home/admin/event/update/change/qCdel.q new file mode 100755 index 0000000..35ec3f6 --- /dev/null +++ b/public/home/admin/event/update/change/qCdel.q @@ -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 ; + + diff --git a/public/home/admin/event/update/change/qCup.q b/public/home/admin/event/update/change/qCup.q new file mode 100755 index 0000000..e8d0577 --- /dev/null +++ b/public/home/admin/event/update/change/qCup.q @@ -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 ; + + diff --git a/public/home/admin/event/update/change/qEdel.q b/public/home/admin/event/update/change/qEdel.q new file mode 100755 index 0000000..1f419d6 --- /dev/null +++ b/public/home/admin/event/update/change/qEdel.q @@ -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 ; + diff --git a/public/home/admin/event/update/change/qEup.q b/public/home/admin/event/update/change/qEup.q new file mode 100755 index 0000000..b4fce88 --- /dev/null +++ b/public/home/admin/event/update/change/qEup.q @@ -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 ; + diff --git a/public/home/admin/event/update/change/qPdel.q b/public/home/admin/event/update/change/qPdel.q new file mode 100755 index 0000000..747a10e --- /dev/null +++ b/public/home/admin/event/update/change/qPdel.q @@ -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 ; + + + diff --git a/public/home/admin/event/update/change/qPup.q b/public/home/admin/event/update/change/qPup.q new file mode 100755 index 0000000..5424d34 --- /dev/null +++ b/public/home/admin/event/update/change/qPup.q @@ -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 ; + diff --git a/public/home/admin/home/cssAdmin.css b/public/home/admin/home/cssAdmin.css new file mode 100755 index 0000000..6696afe --- /dev/null +++ b/public/home/admin/home/cssAdmin.css @@ -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 ; +} diff --git a/public/home/admin/home/jsButtons.js b/public/home/admin/home/jsButtons.js new file mode 100755 index 0000000..1fcc552 --- /dev/null +++ b/public/home/admin/home/jsButtons.js @@ -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; + } diff --git a/public/home/admin/home/jsFb.js b/public/home/admin/home/jsFb.js new file mode 100755 index 0000000..8c9879d --- /dev/null +++ b/public/home/admin/home/jsFb.js @@ -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')); diff --git a/public/home/admin/home/qAdmin.q b/public/home/admin/home/qAdmin.q new file mode 100755 index 0000000..d111be2 --- /dev/null +++ b/public/home/admin/home/qAdmin.q @@ -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; + diff --git a/public/home/admin/home/update/qUpdate.q b/public/home/admin/home/update/qUpdate.q new file mode 100755 index 0000000..1dead18 --- /dev/null +++ b/public/home/admin/home/update/qUpdate.q @@ -0,0 +1,2 @@ + update casa set contenido=? where nombre=?; + diff --git a/public/home/admin/mensajes/cssMsg.css b/public/home/admin/mensajes/cssMsg.css new file mode 100755 index 0000000..778641e --- /dev/null +++ b/public/home/admin/mensajes/cssMsg.css @@ -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; +} diff --git a/public/home/admin/mensajes/htmlMensajes.html b/public/home/admin/mensajes/htmlMensajes.html new file mode 100755 index 0000000..a39359f --- /dev/null +++ b/public/home/admin/mensajes/htmlMensajes.html @@ -0,0 +1,23 @@ +
+
+ +
+
+

fecha

+
+

nombre

+
+

correo

+
+

mensaje

+
+ +
diff --git a/public/home/admin/mensajes/jsMsg.js b/public/home/admin/mensajes/jsMsg.js new file mode 100755 index 0000000..dc8dbed --- /dev/null +++ b/public/home/admin/mensajes/jsMsg.js @@ -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); + }}}); +}); diff --git a/public/home/admin/mensajes/json/qGetInfo.q b/public/home/admin/mensajes/json/qGetInfo.q new file mode 100755 index 0000000..656b8b9 --- /dev/null +++ b/public/home/admin/mensajes/json/qGetInfo.q @@ -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 "; + diff --git a/public/home/admin/mensajes/qEntries.q b/public/home/admin/mensajes/qEntries.q new file mode 100755 index 0000000..ae215ea --- /dev/null +++ b/public/home/admin/mensajes/qEntries.q @@ -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; + diff --git a/public/home/admin/radio/candySwitch/cssMain.css b/public/home/admin/radio/candySwitch/cssMain.css new file mode 100755 index 0000000..e4ab1e0 --- /dev/null +++ b/public/home/admin/radio/candySwitch/cssMain.css @@ -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; + +} + diff --git a/public/home/admin/radio/candySwitch/cssSwitch.css b/public/home/admin/radio/candySwitch/cssSwitch.css new file mode 100755 index 0000000..c841b4d --- /dev/null +++ b/public/home/admin/radio/candySwitch/cssSwitch.css @@ -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; +} + diff --git a/public/home/admin/radio/candySwitch/htmlCSwitch.html b/public/home/admin/radio/candySwitch/htmlCSwitch.html new file mode 100755 index 0000000..f296dbd --- /dev/null +++ b/public/home/admin/radio/candySwitch/htmlCSwitch.html @@ -0,0 +1,15 @@ +
+

Apagar / Encender Chat

+
+
+ + + +
+
+ +
diff --git a/public/home/admin/radio/candySwitch/jsCSwitch.js b/public/home/admin/radio/candySwitch/jsCSwitch.js new file mode 100755 index 0000000..85aabcc --- /dev/null +++ b/public/home/admin/radio/candySwitch/jsCSwitch.js @@ -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"); +}}); } + + + + diff --git a/public/home/admin/radio/cssAdmin.css b/public/home/admin/radio/cssAdmin.css new file mode 100755 index 0000000..beb953d --- /dev/null +++ b/public/home/admin/radio/cssAdmin.css @@ -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; +} + diff --git a/public/home/admin/radio/htmlAdmin.html b/public/home/admin/radio/htmlAdmin.html new file mode 100755 index 0000000..c39ba9b --- /dev/null +++ b/public/home/admin/radio/htmlAdmin.html @@ -0,0 +1,24 @@ +
+

Radio

+
+ +
+
+

Estado:

+

+
+

En línea:

Max:

+
+
grafiquita
+
+ +
+
+ + + + +
+
+
+ diff --git a/public/home/admin/radio/jsLoadInfo.js b/public/home/admin/radio/jsLoadInfo.js new file mode 100755 index 0000000..954afef --- /dev/null +++ b/public/home/admin/radio/jsLoadInfo.js @@ -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); +}; + diff --git a/public/home/admin/radio/qAdmin.q b/public/home/admin/radio/qAdmin.q new file mode 100755 index 0000000..7b2d22b --- /dev/null +++ b/public/home/admin/radio/qAdmin.q @@ -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"; + diff --git a/public/home/admin/radio/update/qUpdate.q b/public/home/admin/radio/update/qUpdate.q new file mode 100755 index 0000000..f34dfbf --- /dev/null +++ b/public/home/admin/radio/update/qUpdate.q @@ -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 ; + diff --git a/public/home/contact/cssContact2.css b/public/home/contact2/cssContact2.css similarity index 100% rename from public/home/contact/cssContact2.css rename to public/home/contact2/cssContact2.css diff --git a/templates/home/admin.html.ep b/templates/home/admin.html.ep new file mode 100755 index 0000000..7acdddf --- /dev/null +++ b/templates/home/admin.html.ep @@ -0,0 +1,9 @@ +
+

Administracion

+ +
diff --git a/templates/home/admin/home.html.ep b/templates/home/admin/home.html.ep new file mode 100755 index 0000000..daa1650 --- /dev/null +++ b/templates/home/admin/home.html.ep @@ -0,0 +1,61 @@ +
+

Editar Casa

+
+ +
+
+ + + + +
+
+ +
+
+
+ <%== $sc %> +
+
+
+ + + + +
+
+ + +
+
+
+
+
+ + + + +
+
+
+ +
+
+
+ +
+
+
+
+ + + + +
+
+
+
+ diff --git a/templates/home/contact.html.ep b/templates/home/contact.html.ep index 8abcc7a..70e38a7 100755 --- a/templates/home/contact.html.ep +++ b/templates/home/contact.html.ep @@ -12,7 +12,7 @@
-
+ diff --git a/templates/home/home.html.ep b/templates/home/home.html.ep index 97fa342..5f19a68 100755 --- a/templates/home/home.html.ep +++ b/templates/home/home.html.ep @@ -21,14 +21,14 @@
-
diff --git a/templates/home/htmlNav.html.ep b/templates/home/htmlNav.html.ep index f0730cc..912245d 100644 --- a/templates/home/htmlNav.html.ep +++ b/templates/home/htmlNav.html.ep @@ -1,6 +1,6 @@