parriba
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package Dojo::Controller::Home;
|
||||
use Mojo::Base 'Mojolicious::Controller';
|
||||
use Mojo::Template;
|
||||
use Dojo::Support qw{ log get_names};
|
||||
use Dojo::Support qw{send_mail log get_names};
|
||||
use JSON;
|
||||
use Data::Dumper;
|
||||
#=========================
|
||||
@@ -127,52 +127,5 @@ sub candy{
|
||||
|
||||
#==============================================================================
|
||||
|
||||
|
||||
# Admin =======================================================================
|
||||
sub admin{
|
||||
my $c= shift;
|
||||
$c->redirect_to('/admin/home');
|
||||
}
|
||||
sub admin_home{
|
||||
my $c=shift;
|
||||
$c->dbv->umod($c->param('link'),$c->param('update'))
|
||||
if (($c->param("hup") // " " )=~/Cambiar/);
|
||||
$c->stash(template=>"home/admin/home");
|
||||
$c->stash(layout=>"admin");
|
||||
$c->stash( $c->dbv->mod);
|
||||
}
|
||||
|
||||
sub admin_radio{
|
||||
my $c=shift;
|
||||
$c->dbv->umod($c->param('link'),'rmod')
|
||||
if (($c->param("hup") // " " )=~/Cambiar/);
|
||||
$c->dbg->ugrulla_pass($c->param('gpass'))
|
||||
if (($c->param("pup") // " " )=~/Cambiar/);
|
||||
$c->stash($c->dbv->mod);
|
||||
$c->stash($c->dbg->grulla_pass);
|
||||
$c->stash(apend => ["home/admin/candySwitch"]);
|
||||
$c->stash(template=>"home/admin/radio");
|
||||
$c->stash(layout=>"admin");
|
||||
}
|
||||
|
||||
sub admin_mensajes{
|
||||
my $c=shift;
|
||||
$c->stash( h=>$c->dbv->msg_heads);
|
||||
$c->stash(template=>"home/admin/mensajes");
|
||||
$c->stash(layout=>"admin");
|
||||
}
|
||||
|
||||
sub admin_json{
|
||||
my $c=shift;
|
||||
my $id = $c->param('id');
|
||||
my $req = $c->param('dreq');
|
||||
my $json = "304";
|
||||
$json = $c->dbv->msg($id) if $req=~/mensaje/;
|
||||
$json = $c->dbv->user($id) if $req=~/usuarios/;
|
||||
$c->render(json=>$json);
|
||||
}
|
||||
|
||||
|
||||
#==============================================================================
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user