package cPanel::Guest_Books::Advanced_Guestbook;

use strict;
use warnings;

our $VERSION = 0.1;
my $pkg = __PACKAGE__;

our $meta_info = {
    setphpsuexecvar => 1,
   adminuser_pass => 1,
   installdir => 'guestbook',
   description => 'PHP/MySQL based Guest book',
   security => 'Do not allow users to post HTML (set in admin area) when posting or you will be hacked!!! By default html posts are not allowed so if you turn it on you have been warned :) Also has a low security rating since it relies on directories being 777.',
   version => '2.4.4',
   security_rank => 1,
   support_url => 'http://proxy2.de/',
   config_files => ['admin/config.inc.php'], 
   mysql => ['agbook'], 
   chmod => {
      '0777' => [qw(public templates templates/admin_enter.php templates/aim.php templates/body.php templates/com.php templates/com_pass.php templates/comment.php templates/email.php templates/entry.php templates/error.php templates/footer.php templates/form.php templates/form_aim.php templates/form_gender.php templates/form_icq.php templates/form_image.php templates/header.php templates/icq.php templates/index.html templates/preview.php templates/preview_entry.php templates/success.php templates/url.php templates/user_pic.php tmp)],
   },
   table_prefix => 'agb',
   admin_email => 1, 
};

if ( defined &Cpanel::cPAddons::proc_keys_named_after_version ) {
   Cpanel::cPAddons::proc_keys_named_after_version( $meta_info, __PACKAGE__ );
}

#### action functions ##
sub install { 
    my $cpo = shift;
    $cpo->stdinstall(@_);
    $cpo->_do_phpsuexec_perms();
}
sub upgrade { shift->stdupgrade(@_) }
sub uninstall { shift->stduninstall(@_) }

#### non action functions ##
sub installform { print shift->{installform} }
sub upgradeform { print shift->{upgradeform} }
sub uninstallform { print shift->{uninstallform} }

1;
