notification-center.pl 632 B

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