revolucion
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
chat_channel => 'Grullas@radio.chat.vuelodegrulla.com',
|
||||
|
||||
#Radio =====================================================
|
||||
radio_server_name=>"http://chaos.foundation:8000/p",
|
||||
radio_server_name=>"http://radio.chaos.foundation:8000/q",
|
||||
radio_server =>"https://radio.chaos.foundation",
|
||||
radio_channel => "/p",
|
||||
radio_listen_url =>"https://chaos.foundation/p",
|
||||
radio_channel => "/q",
|
||||
radio_listen_url =>"http://radio.chaos.foundation:8000/q",
|
||||
|
||||
#RTPM =======================================================
|
||||
rtmp_server =>"rtmp://chaos.foundation/steam",
|
||||
|
||||
@@ -31,7 +31,7 @@ use Dojo::Model::Users;
|
||||
# =============================================================================
|
||||
|
||||
# json ========================================================================
|
||||
$r->any('/json/:dreq')->to('data#simple');
|
||||
$r->any('/json/*dreq')->to('data#simple');
|
||||
# =============================================================================
|
||||
|
||||
# candy =======================================================================
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
package Dojo::Controller::Data;
|
||||
use Mojo::File 'path';
|
||||
use Mojo::JSON qw(decode_json encode_json);
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
use Dojo::Support qw{ dmph merge_hash load_module };
|
||||
use Net::Telnet;
|
||||
|
||||
my $server_name = "";
|
||||
our $t; #telnet server object
|
||||
my $data_path = path('lib/Dojo/Model/Data')->make_path;
|
||||
sub simple{
|
||||
my $c=shift;
|
||||
my $n=$c->param("dreq")//"";
|
||||
my $json = {status => "304"};
|
||||
$json = { srv =>$c->config->{radio_server} } if $n =~m/^radio$/ ;
|
||||
$json = candy() if $n =~m/^candy$/ ;
|
||||
$json = decode_json($data_path->child("$n")->slurp)
|
||||
if $n=~m/^podcast\/podcast.json$/;
|
||||
$c->render(json=>$json);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package Dojo::Controller::Home;
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
use Mojo::Template;
|
||||
use Dojo::Support qw{ log dmph merge_hash load_module get_names};
|
||||
#use Dojo::Support qw{ log dmph merge_hash load_module get_names};
|
||||
use Dojo::Support qw{ log get_names};
|
||||
sub tst{
|
||||
my $c=shift;
|
||||
$c->render(text=> $c->config->{radio}{'channel'});
|
||||
@@ -80,20 +81,17 @@ sub tst{
|
||||
|
||||
sub podcast{
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/podcast"))[0]);
|
||||
$c->stash(layout=> "defaultContact");
|
||||
$c->stash( t=>$c->dbv->podcast_txt, pod=>$c->dbv->podcast_infoHash);
|
||||
}
|
||||
|
||||
sub bcast{
|
||||
my $c = shift;
|
||||
$c->stash((load_module("home/bcast"))[0]);
|
||||
|
||||
$c->stash(layout=> "defaultContact");
|
||||
}
|
||||
|
||||
sub radio{
|
||||
my $c=shift;
|
||||
$c->stash((load_module("home/radio"))[0]);
|
||||
$c->stash(layout=> "defaultContact");
|
||||
$c->stash($c->dbv->mod);
|
||||
$c->stash(nick=>$c->session("nick"));
|
||||
@@ -120,7 +118,6 @@ sub tst{
|
||||
my $c=shift;
|
||||
$c->dbv->umod($c->param('link'),$c->param('update'))
|
||||
if (($c->param("hup") // " " )=~/Cambiar/);
|
||||
$c->stash((load_module("home/admin/home"))[0]);
|
||||
$c->stash(template=>"home/admin/home");
|
||||
$c->stash(layout=>"admin");
|
||||
$c->stash( $c->dbv->mod);
|
||||
@@ -134,10 +131,6 @@ sub tst{
|
||||
if (($c->param("pup") // " " )=~/Cambiar/);
|
||||
$c->stash($c->dbv->mod);
|
||||
$c->stash($c->dbg->grulla_pass);
|
||||
$c->stash( merge_hash(
|
||||
(load_module("home/admin/radio"))[0],
|
||||
(load_module("home/admin/candySwitch"))[0],
|
||||
));
|
||||
$c->stash(apend => ["home/admin/candySwitch"]);
|
||||
$c->stash(template=>"home/admin/radio");
|
||||
$c->stash(layout=>"admin");
|
||||
@@ -145,7 +138,6 @@ sub tst{
|
||||
|
||||
sub admin_mensajes{
|
||||
my $c=shift;
|
||||
$c->stash((load_module("home/admin/mensajes"))[0]);
|
||||
$c->stash( h=>$c->dbv->msg_heads);
|
||||
$c->stash(template=>"home/admin/mensajes");
|
||||
$c->stash(layout=>"admin");
|
||||
@@ -177,15 +169,10 @@ sub tst{
|
||||
$c->dbv->place_up(@list) if ($id ==0);
|
||||
$c->dbv->place_ch(@list) if ($id >0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$c->redirect_to("/admin/eventos");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$c->stash(
|
||||
courses=>$c->dbv->courses,
|
||||
places=>$c->dbv->places,
|
||||
@@ -193,7 +180,6 @@ sub tst{
|
||||
events=>$c->dbv->events,
|
||||
img=>$c->dbv->eimgList,
|
||||
);
|
||||
$c->stash((load_module("home/admin/event"))[0]);
|
||||
$c->stash(template=>"home/admin/event");
|
||||
$c->stash(layout=>"admin");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package Dojo::Model::Vuelo;
|
||||
use Mojo::File 'path';
|
||||
package Dojo::Model::Vuelo; use Mojo::File 'path';
|
||||
use Mojo::JSON qw(decode_json encode_json);
|
||||
use Dojo::Support qw{ log dmph merge_hash load_module get_names};
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
@@ -25,8 +24,9 @@ sub mod{
|
||||
|
||||
sub pang_md{
|
||||
my $c=shift;
|
||||
my %h = map {$_=> markdown(decode_utf8($data_path->child('pang/'.$_.'.md')->slurp))}
|
||||
("pang","helen","benjamin");
|
||||
my %h = map {
|
||||
$_=> markdown(decode_utf8($data_path->child('pang/'.$_.'.md')->slurp))
|
||||
} ("pang","helen","benjamin");
|
||||
return \%h;
|
||||
}
|
||||
|
||||
@@ -51,11 +51,10 @@ sub tv_series{
|
||||
return _read ($data_path->child("/tv/qTable.q")->slurp); #name,order,group
|
||||
}
|
||||
sub podcast_txt{
|
||||
# return "Hemos desarrollado con mucho cariño ejercicios gratuitos y descargables que pueden ser practicados por cualquier persona aún antes de asistir a uno de los cursos de instrucción.";
|
||||
return decode_utf8(path("public/home/podcast/text.txt")->slurp);
|
||||
return decode_utf8($data_path->child("/podcast/text.txt")->slurp);
|
||||
}
|
||||
sub podcast_infoHash{
|
||||
return decode_json path("public/home/podcast/jsonPod.json")->slurp;
|
||||
return decode_json $data_path->child("/podcast/podcast.json")->slurp;
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
@@ -64,7 +63,7 @@ sub tv_series{
|
||||
sub msg_heads{
|
||||
my ($self,@bind)=@_;
|
||||
my @empty;
|
||||
my $q= path("public/home/admin/mensajes/qEntries.q")->slurp;
|
||||
my $q= $data_path->child("/admin/mensajes/qEntries.q")->slurp;
|
||||
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::MSGDB.":".Dojo::Conf::MSGDB_H,Dojo::Conf::MSGDB_UR,Dojo::Conf::MSGDB_URP,{mysql_enable_utf8 => 1});
|
||||
return \@empty unless($dbh);
|
||||
my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind)//"error";
|
||||
@@ -76,7 +75,7 @@ sub tv_series{
|
||||
sub msg{
|
||||
my ($c,@bind)=@_;
|
||||
my @empty;
|
||||
my $q= path("public/home/admin/mensajes/json/qGetInfo.q")->slurp;
|
||||
my $q= $data_path->child("/admin/mensajes/json/qGetInfo.q")->slurp;
|
||||
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::MSGDB.":".Dojo::Conf::MSGDB_H,Dojo::Conf::MSGDB_UR,Dojo::Conf::MSGDB_URP,{mysql_enable_utf8 => 1});
|
||||
return \@empty unless($dbh);
|
||||
my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind)//\@empty;
|
||||
@@ -85,12 +84,12 @@ sub tv_series{
|
||||
return shift @$h;
|
||||
}
|
||||
sub courses{ return _read("select nombre as name, id from curso;")}
|
||||
sub course { return shift @{_read(path("public/home/admin/event/json/qCourse.q")->slurp,pop)}}
|
||||
sub course { return shift @{_read($data_path->child("/admin/event/json/qCourse.q")->slurp,pop)}}
|
||||
sub places { return _read("select nombre as name, id from lugar;")}
|
||||
sub place { return shift @{_read(path("public/home/admin/event/json/qPlace.q")->slurp,pop)}}
|
||||
sub place { return shift @{_read($data_path->child("/admin/event/json/qPlace.q")->slurp,pop)}}
|
||||
sub months { return _read("select nombre as name, id from mes;")};
|
||||
sub events { return _read(path("public/home/admin/event/qEprev.q")->slurp)}
|
||||
sub eventa { return shift @{_read(path("public/home/admin/event/json/qEvent.q")->slurp,pop)}}
|
||||
sub events { return _read($data_path->child("/admin/event/qEprev.q")->slurp)}
|
||||
sub eventa { return shift @{_read($data_path->child("/admin/event/json/qEvent.q")->slurp,pop)}}
|
||||
sub eimgList{ return [get_names("public/home/cal/img/")] }
|
||||
#==============================================================================
|
||||
# Write vdg user ==============================================================
|
||||
@@ -116,27 +115,27 @@ sub contact{
|
||||
|
||||
sub event_up{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/add/qEup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/add/qEup.q")->slurp,@bind);
|
||||
}
|
||||
sub course_up{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/add/qCup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/add/qCup.q")->slurp,@bind);
|
||||
}
|
||||
sub place_up{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/add/qPup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/add/qPup.q")->slurp,@bind);
|
||||
}
|
||||
sub event_ch{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/change/qEup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/change/qEup.q")->slurp,@bind);
|
||||
}
|
||||
sub course_ch{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/change/qCup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/change/qCup.q")->slurp,@bind);
|
||||
}
|
||||
sub place_ch{
|
||||
my ($self,@bind)=@_;
|
||||
return _write(path("public/home/admin/event/change/qPup.q")->slurp,@bind);
|
||||
return _write($data_path->child("/admin/event/change/qPup.q")->slurp,@bind);
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/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__
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var sources;
|
||||
d3.json( "home/podcast/jsonPod.json",function(d){
|
||||
d3.json( "/json/podcast/podcast.json",function(d){
|
||||
d3.select("#audioframe").attr("src",d[0].source);
|
||||
sources=d;
|
||||
});
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/admin/admin.css","/home/admin/event/event.css"];
|
||||
% stash js=>["/home/admin/event/event.js"];
|
||||
<section class="name" flex> <article class="user">
|
||||
<p class="title">Editar Eventos</p>
|
||||
</article> </section>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/admin/admin.css","/home/admin/home/admin.css"];
|
||||
% stash js=>["/home/admin/home/buttons.js","/home/admin/home/fb.js"];
|
||||
<section class="title flex">
|
||||
<article class="title"> <p>Editar Casa</p> </article>
|
||||
</section>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/admin/admin.css","/home/admin/mensajes/msg.css"];
|
||||
% stash js=>["/home/admin/mensajes/msg.js"];
|
||||
<section class="flex messages">
|
||||
<article class="select">
|
||||
<select id="sentry" class="entry" size=10>
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
% stash css=>[
|
||||
% "/home/admin/admin.css",
|
||||
% "/home/admin/radio/admin.css",
|
||||
% "/home/admin/candySwitch/main.css",
|
||||
% "/home/admin/candySwitch/switch.css"
|
||||
% ];
|
||||
% stash js=>[
|
||||
% "/home/admin/radio/loadInfo.js",
|
||||
% "/home/admin/candySwitch/cSwitch.js"
|
||||
% ];
|
||||
<section class="title flex">
|
||||
<article class="title"> <p>Radio</p> </article>
|
||||
<article class="bcast"> <form action="/admin/radio" method="post">
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/bcast/cast.css"];
|
||||
|
||||
<link rel="stylesheet" href="//releases.flowplayer.org/7.2.1/skin/skin.css">
|
||||
<script src="//releases.flowplayer.org/7.2.1/flowplayer.min.js"></script>
|
||||
<script src="//releases.flowplayer.org/dashjs/flowplayer.dashjs.min.js"></script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%stash css=>[ "/home/home/animation.css", "/home/home/grid.css", "/home/home/head.css", "/home/home/osc.css", "/home/home/trans.css" ];
|
||||
%stash js=>["/home/home/d3_tras.js","/home/home/fb.js"];
|
||||
%stash js=>["/home/home/d3_tras.js","/home/home/fb.js","/home/home/bcast.js"];
|
||||
<section id="ihead">
|
||||
<div id="courtain">
|
||||
<div class="logo"></div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/podcast/podcast.css"];
|
||||
% stash js=>["/home/podcast/podcast.js"];
|
||||
<section id="stitle" class="title">
|
||||
<p class="title"> Podcast de ZhiNeng QiGong </p>
|
||||
</section>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
% stash css=>["/home/radio/radio.css"];
|
||||
% stash js=>["/home/radio/link,js","/home/radio/radio.js"];
|
||||
<section class="flex title">
|
||||
<article class="title"> <p>Radio Vuelo de grulla</p> </article>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user