notification-center.pl 625 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/local/cpanel/3rdparty/bin/perl
  2. package WHM::Plugin::NotificationCenter;
  3. use strict;
  4. use warnings;
  5. use CGI qw/:standard/;
  6. print header(-charset => 'UTF-8');
  7. use Cpanel::Template;
  8. use lib '/var/cpanel/perl';
  9. use Cpanel::iContact::Provider::Local::Getter;
  10. main() unless caller;
  11. sub main {
  12. my %notices = Cpanel::iContact::Provider::Local::Getter::get_all_notices( user => $ENV{REMOTE_USER} || 'root' );
  13. my $vars = {
  14. notifications => \%notices,
  15. };
  16. Cpanel::Template::process_template( 'whostmgr', { template_file => 'addon_notification-center.tmpl', data => $vars } );
  17. return 0;
  18. }
  19. 1;