inc/error.inc.php
changeset 82 c255196bc447
parent 71 e1b918eaf69a
child 89 61c49e66c9b0
equal deleted inserted replaced
81:c72d6d51f3d3 82:c255196bc447
    21 
    21 
    22 // Added next line to enable i18n on following definitions. Not sure
    22 // Added next line to enable i18n on following definitions. Not sure
    23 // if this is the best (or at least a proper) location for this. /RZ.
    23 // if this is the best (or at least a proper) location for this. /RZ.
    24 require_once("inc/i18n.inc.php");
    24 require_once("inc/i18n.inc.php");
    25 
    25 
    26 /* USER LEVELS */
    26 /* PERMISSIONS */
    27 define("ERR_LEVEL_5", _('You need user level 5 for this operation'));
    27 define("ERR_PERM_SEARCH", _("You do not have the permission to perform searches.")); 
    28 define("ERR_LEVEL_10", _('You need user level 10 for this operation'));
    28 define("ERR_PERM_ADD_RECORD", _("You do not have the permission to add a record to this zone.")); 
       
    29 define("ERR_PERM_EDIT_RECORD", _("You do not have the permission to edit this record.")); 
       
    30 define("ERR_PERM_VIEW_RECORD", _("You do not have the permission to view this record.")); 
       
    31 define("ERR_PERM_DEL_RECORD", _("You do not have the permission to delete this record.")); 
       
    32 define("ERR_PERM_ADD_ZONE_MASTER", _("You do not have the permission to add a master zone.")); 
       
    33 define("ERR_PERM_DEL_ZONE", _("You do not have the permission to delete a zone.")); 
       
    34 define("ERR_PERM_DEL_SM", _("You do not have the permission to delete a supermaster.")); 
       
    35 define("ERR_PERM_VIEW_ZONE", _("You do not have the permission to view this zone.")); 
       
    36 define("ERR_PERM_EDIT_USER", _("You do not have the permission to edit this user.")); 
       
    37 define("ERR_PERM_EDIT_PERM_TEMPL", _("You do not have the permission to edit permission templates.")); 
       
    38 define("ERR_PERM_ADD_USER", _("You do not have the permission to add a new user.")); 
       
    39 define("ERR_PERM_DEL_USER", _("You do not have the permission to delete this user.")); 
    29 
    40 
    30 /* RECORD STUFF */
    41 /* RECORD STUFF */
    31 define("ERR_RECORD_EMPTY_CONTENT", _('Your content field is empty'));
    42 define("ERR_RECORD_EMPTY_CONTENT", _('Your content field is empty'));
    32 define("ERR_RECORD_ACCESS_DENIED", _('Access denied, you do not have access to that record'));
    43 define("ERR_RECORD_ACCESS_DENIED", _('Access denied, you do not have access to that record'));
    33 define("ERR_RECORD_DELETE_TYPE_DENIED", _('You are not allowed to delete %s records'));
    44 define("ERR_RECORD_DELETE_TYPE_DENIED", _('You are not allowed to delete %s records'));
    34 
    45 
    35 /* DOMAIN STUFF */
    46 /* DOMAIN STUFF */
    36 define("ERR_DOMAIN_INVALID", _('This is an invalid zone name'));
    47 define("ERR_DOMAIN_INVALID", _('This is an invalid zone name'));
       
    48 define("ERR_SM_EXISTS", _('There is already a supermaster with this IP address.')); 
       
    49 define("ERR_DOMAIN_EXISTS", _('There is already a zone with this name.')); 
    37 
    50 
    38 /* USER STUFF */
    51 /* USER STUFF */
    39 define("ERR_USER_EXIST", _('Username exist already, please choose another one'));
    52 define("ERR_USER_EXIST", _('Username exist already, please choose another one'));
    40 define("ERR_USER_NOT_EXIST", _('User doesnt exist'));
    53 define("ERR_USER_NOT_EXIST", _('User doesnt exist'));
    41 define("ERR_USER_WRONG_CURRENT_PASS", _('You didnt enter the correct current password'));
    54 define("ERR_USER_WRONG_CURRENT_PASS", _('You didnt enter the correct current password'));
    42 define("ERR_USER_MATCH_NEW_PASS", _('The two new password fields do not match'));
    55 define("ERR_USER_MATCH_NEW_PASS", _('The two new password fields do not match'));
    43 define("ERR_USER_EDIT", _('Error editting user'));
    56 define("ERR_USER_EDIT", _('Error editting user'));
    44 
    57 
    45 /* OTHER */
    58 /* OTHER */
       
    59 define("ERR_INV_INPUT", _('Invalid or unexpected input given.'));  
    46 define("ERR_INV_ARG", _('Invalid argument(s) given to function %s'));
    60 define("ERR_INV_ARG", _('Invalid argument(s) given to function %s'));
    47 define("ERR_INV_ARGC", _('Invalid argument(s) given to function %s %s'));
    61 define("ERR_INV_ARGC", _('Invalid argument(s) given to function %s %s'));
    48 define("ERR_UNKNOWN", _('unknown error'));
    62 define("ERR_UNKNOWN", _('unknown error'));
    49 define("ERR_INV_EMAIL", _('Enter a valid email address'));
    63 define("ERR_INV_EMAIL", _('Enter a valid email address'));
    50 
    64 
    51 /* DNS */
    65 /* DNS */
    52 define("ERR_DNS_CONTENT", _('Your content field doesnt have a legit value'));
    66 define("ERR_DNS_CONTENT", _('Your content field doesnt have a legit value'));
    53 define("ERR_DNS_HOSTNAME", _('Invalid hostname'));
    67 define("ERR_DNS_HOSTNAME", _('Invalid hostname'));
    54 define("ERR_DNS_RECORDTYPE", _('Invalid record type! You shouldnt even been able to get that here'));
    68 define("ERR_DNS_RECORDTYPE", _('Invalid record type! You shouldnt even been able to get that here'));
       
    69 define("ERR_DNS_IP", _('This is not a valid IPv4 or IPv6 address.')); 
    55 define("ERR_DNS_IPV6", _('This is not a valid IPv6 ip.'));
    70 define("ERR_DNS_IPV6", _('This is not a valid IPv6 ip.'));
    56 define("ERR_DNS_IPV4", _('This is not a valid IPv4 ip.'));
    71 define("ERR_DNS_IPV4", _('This is not a valid IPv4 ip.'));
    57 define("ERR_DNS_CNAME", _('This is not a valid CNAME. Did you assign an MX or NS record to the record?'));
    72 define("ERR_DNS_CNAME", _('This is not a valid CNAME. Did you assign an MX or NS record to the record?'));
    58 define("ERR_DNS_NS_CNAME", _('You can not point a NS record to a CNAME record. Remove/rename the CNAME record first or take another name.'));
    73 define("ERR_DNS_NS_CNAME", _('You can not point a NS record to a CNAME record. Remove/rename the CNAME record first or take another name.'));
    59 define("ERR_DNS_NS_HNAME", _('IN NS fields must be a hostnames.'));
    74 define("ERR_DNS_NS_HNAME", _('IN NS fields must be a hostnames.'));
    60 define("ERR_DNS_MX_CNAME", _('You can not point a MX record to a CNAME record. Remove/rename the CNAME record first or take another name.'));
    75 define("ERR_DNS_MX_CNAME", _('You can not point a MX record to a CNAME record. Remove/rename the CNAME record first or take another name.'));
    61 define("ERR_DNS_MX_PRIO", _('A prio field should be numeric.'));
    76 define("ERR_DNS_MX_PRIO", _('A prio field should be numeric.'));
    62 define("ERR_DNS_SOA_NUMERIC", _('One of your SOA data fields is not numeric!'));
    77 define("ERR_DNS_SOA_NUMERIC", _('One of your SOA data fields is not numeric!'));
    63 define("ERR_DNS_SOA_NUMERIC_FIELDS", _('You can only have 5 numeric fields'));
    78 define("ERR_DNS_SOA_NUMERIC_FIELDS", _('You can only have 5 numeric fields'));
    64 define("ERR_DNS_SOA_HOSTNAME", _('The first part of your SOA record does not contain a valid hostname for a DNS Server'));
    79 define("ERR_DNS_SOA_HOSTNAME", _('The first part of your SOA record does not contain a valid hostname for a DNS Server'));
       
    80 
       
    81 /* GOOD! */
       
    82 define("SUC_ZONE_ADD", _('Zone has been added succesfully.')); 
       
    83 define("SUC_ZONE_DEL", _('Zone has been deleted succesfully.')); 
       
    84 define("SUC_USER_UPD", _('The user has been updated succesfully.')); 
       
    85 define("SUC_USER_ADD", _('The user has been created succesfully.')); 
       
    86 define("SUC_USER_DEL", _('The user has been deleted succesfully.')); 
       
    87 define("SUC_RECORD_UPD", _('The record has been updated succesfully.')); 
       
    88 define("SUC_RECORD_DEL", _('The record has been deleted succesfully.')); 
       
    89 define("SUC_SM_DEL", _('The supermaster has been deleted succesfully.')); 
       
    90 
    65 ?>
    91 ?>