This commit is contained in:
mynah
2018-08-15 05:07:04 +00:00
parent dad034eed3
commit 96764c0847
2 changed files with 24 additions and 1 deletions

View File

@@ -88,6 +88,13 @@ sub new { bless {}, shift };
sub eventa { return shift @{_read(path("public/home/admin/event/json/qEvent.q")->slurp,pop)}}
sub eimgList{ return [get_names("public/home/cal/img/")] }
#==============================================================================
# Write vdg user ==============================================================
sub contact{
my $c=shift;
my $q="insert into entrada (nombre,correo,pagina,texto,fecha) values(?,?,?,?,now() )" ;
return _writemsg($q,@_);
}
#==============================================================================
# Write vdg admin ==============================================================
sub umod{
my $c=shift;
@@ -159,6 +166,17 @@ sub _write{
return $h;
}
sub _writemsg{
my ($q,@bind)=@_;
my (@empty);
my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::MSGDB.":".Dojo::Conf::MSGDB_H,Dojo::Conf::MSGDB_UW,Dojo::Conf::MSGDB_UWP);
return 0 unless($dbh);
my $h=$dbh->do($q,{ Slice => {} },@bind);
$dbh->disconnect();
log("db write: $h");
return $h;
}
sub load_md{
return "" unless
my $text = path(shift)->slurp;