DNS Hooks
dns_serial_update (run by Add New DNS Zone, New Subdomain, Remove Subdomain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_serial_update.php

dns_new_zone_add (run by Add New DNS Zone)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_new_zone_add.php

dns_new_subdomain_add (run by Add New SubDomain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_new_subdomain_add.php

dns_zone_remove (run by DNS Domain Delete)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_zone_remove.php

dns_subdomain_remove (run by SubDomain Delete)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_subdomain_remove.php

Example available data from the array:

Regular Acount
Array ( [domain] => centos-webpanel.com [status] => OK [username] => someuser1 )

Reseller SubAccount
Array ( [domain] => centos-webpanel.com [status] => OK [username] => someuser1 [reseller] => somereseller1 )

Reseller Account
Array ( [domain] => centos-webpanel.com [status] => OK [username] => someuser1 [reseller] => 1 )

Usage:
Create file and add content to it with the same function of the filename without .php part.

Example for DNS Serial Update
FILE: /usr/local/cwpsrv/htdocs/resources/admin/hooks/dns/dns_serial_update.php

<?php

function dns_serial_update($array){
    echo "Hello World ..{$array['domain']}..";
}

?>

** functions are automatically run by the CWP!

Account Hooks
account_new (VALUES: username,domain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_new.php

account_remove (VALUES:username)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_remove.php

account_suspend (VALUES:username)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_suspend.php

account_unsuspend (VALUES:username)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_unsuspend.php

account_new_domain (VALUES:username,domain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_remove_domain.php

account_new_subdomain (VALUES:username,subdomain,domain,fullsubdomain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_new_subdomain.php

account_remove_domain (VALUES:username,domain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_remove_domain.php

account_remove_subdomain (VALUES:username,subdomain,domain,fullsubdomain)
/usr/local/cwpsrv/htdocs/resources/admin/hooks/account/account_new_subdomain.php

Tagged: