inc/error.inc.php
author rejo
Fri, 16 May 2008 10:43:57 +0000
changeset 167 0b992665ac4d
parent 166 def8799ec0d7
permissions -rw-r--r--
[feladat @ 273] Renamed error ERR_DNS_MX_NS_TO_CNAME to more generic ERR_DNS_NON_ALIAS_TARGET. See also r270.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
71
e1b918eaf69a [feladat @ 118]
peter
parents: 47
diff changeset
     1
<?php
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     2
119
f74e4f88b680 [feladat @ 222]
rejo
parents: 111
diff changeset
     3
/*  Poweradmin, a friendly web-based admin tool for PowerDNS.
47
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     4
 *  See <https://rejo.zenger.nl/poweradmin> for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     5
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     6
 *  Copyright 2007, 2008  Rejo Zenger <rejo@zenger.nl>
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     7
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     8
 *  This program is free software: you can redistribute it and/or modify
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
     9
 *  it under the terms of the GNU General Public License as published by
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    10
 *  the Free Software Foundation, either version 3 of the License, or
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    11
 *  (at your option) any later version.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    12
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    13
 *  This program is distributed in the hope that it will be useful,
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    16
 *  GNU General Public License for more details.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    17
 *
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    18
 *  You should have received a copy of the GNU General Public License
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    19
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    20
 */
ae140472d97c [feladat @ 94]
rejo
parents: 13
diff changeset
    21
4
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    22
// Added next line to enable i18n on following definitions. Not sure
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    23
// if this is the best (or at least a proper) location for this. /RZ.
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    24
require_once("inc/i18n.inc.php");
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    25
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    26
/* PERMISSIONS */
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    27
define("ERR_PERM_SEARCH", _("You do not have the permission to perform searches.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    28
define("ERR_PERM_ADD_RECORD", _("You do not have the permission to add a record to this zone.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    29
define("ERR_PERM_EDIT_RECORD", _("You do not have the permission to edit this record.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    30
define("ERR_PERM_VIEW_RECORD", _("You do not have the permission to view this record.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    31
define("ERR_PERM_DEL_RECORD", _("You do not have the permission to delete this record.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    32
define("ERR_PERM_ADD_ZONE_MASTER", _("You do not have the permission to add a master zone.")); 
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    33
define("ERR_PERM_ADD_ZONE_SLAVE", _("You do not have the permission to add a slave zone.")); 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    34
define("ERR_PERM_DEL_ZONE", _("You do not have the permission to delete a zone.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    35
define("ERR_PERM_DEL_SM", _("You do not have the permission to delete a supermaster.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    36
define("ERR_PERM_VIEW_ZONE", _("You do not have the permission to view this zone.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    37
define("ERR_PERM_EDIT_USER", _("You do not have the permission to edit this user.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    38
define("ERR_PERM_EDIT_PERM_TEMPL", _("You do not have the permission to edit permission templates.")); 
89
61c49e66c9b0 [feladat @ 189]
rejo
parents: 82
diff changeset
    39
define("ERR_PERM_DEL_PERM_TEMPL", _("You do not have the permission to delete permission templates.")); 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    40
define("ERR_PERM_ADD_USER", _("You do not have the permission to add a new user.")); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    41
define("ERR_PERM_DEL_USER", _("You do not have the permission to delete this user.")); 
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    42
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    43
/* DOMAIN STUFF */
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    44
define("ERR_DOMAIN_INVALID", _('This is an invalid zone name.'));
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    45
define("ERR_SM_EXISTS", _('There is already a supermaster with this IP address.')); 
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    46
define("ERR_DOMAIN_EXISTS", _('There is already a zone with this name.')); 
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    47
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    48
/* USER STUFF */
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    49
define("ERR_USER_EXIST", _('Username exist already, please choose another one.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    50
define("ERR_USER_NOT_EXIST", _('User does not exist.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    51
define("ERR_USER_WRONG_CURRENT_PASS", _('You did not enter the correct current password.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    52
define("ERR_USER_MATCH_NEW_PASS", _('The two new password fields do not match.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    53
define("ERR_PERM_TEMPL_ASSIGNED", _('This template is assigned to at least one user.'));
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    54
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    55
/* OTHER */
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    56
define("ERR_INV_INPUT", _('Invalid or unexpected input given.'));  
4
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    57
define("ERR_INV_ARG", _('Invalid argument(s) given to function %s'));
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    58
define("ERR_INV_ARGC", _('Invalid argument(s) given to function %s %s'));
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    59
define("ERR_UNKNOWN", _('Unknown error.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    60
define("ERR_INV_EMAIL", _('Enter a valid email address.'));
141
1ede5203910d [feladat @ 247]
rejo
parents: 140
diff changeset
    61
define("ERR_ZONE_NOT_EXIST", _('There is no zone with this ID.'));
144
ad667d767a0a [feladat @ 250]
rejo
parents: 141
diff changeset
    62
define("ERR_INSTALL_DIR_EXISTS", _('The install/ directory exists, you must remove it first before proceeding.'));
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    63
123
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    64
/* DATABASE */
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    65
define("ERR_DB_NO_DB_NAME", _('No database name has been set in config.inc.php.'));
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    66
define("ERR_DB_NO_DB_HOST", _('No database host has been set in config.inc.php.'));
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    67
define("ERR_DB_NO_DB_USER", _('No database username has been set in config.inc.php.'));
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    68
define("ERR_DB_NO_DB_PASS", _('No database password has been set in config.inc.php.'));
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    69
define("ERR_DB_NO_DB_TYPE", _('No or unknown database type has been set in config.inc.php.'));
0aa6b2cf8006 [feladat @ 226]
rejo
parents: 119
diff changeset
    70
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    71
/* DNS */
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    72
define("ERR_DNS_CONTENT", _('Your content field doesnt have a legit value.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    73
define("ERR_DNS_HOSTNAME", _('Invalid hostname.'));
140
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    74
define("ERR_DNS_HN_INV_CHARS", _('You have invalid characters in your hostname.'));
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    75
define("ERR_DNS_HN_DASH", _('A hostname can not start or end with a dash.'));
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    76
define("ERR_DNS_HN_LENGTH", _('Given hostname or one of the labels is too short or too long.'));
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    77
define("ERR_DNS_HN_SLASH", _('Given hostname has too many slashes.'));
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    78
define("ERR_DNS_RR_TYPE", _('Unknown record type.'));
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    79
define("ERR_DNS_IP", _('This is not a valid IPv4 or IPv6 address.')); 
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    80
define("ERR_DNS_IPV6", _('This is not a valid IPv6 address.'));
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    81
define("ERR_DNS_IPV4", _('This is not a valid IPv4 address.'));
4
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    82
define("ERR_DNS_CNAME", _('This is not a valid CNAME. Did you assign an MX or NS record to the record?'));
167
0b992665ac4d [feladat @ 273]
rejo
parents: 166
diff changeset
    83
define("ERR_DNS_NON_ALIAS_TARGET", _('You can not point a NS or MX record to a CNAME record. Remove or rame the CNAME record first, or take another name.'));
110
455405c757e1 [feladat @ 210]
rejo
parents: 89
diff changeset
    84
define("ERR_DNS_NS_HNAME", _('NS records must be a hostnames.'));
4
55ed92aa7cf5 [feladat @ 5]
rejo
parents: 1
diff changeset
    85
define("ERR_DNS_MX_PRIO", _('A prio field should be numeric.'));
140
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    86
define("ERR_DNS_SOA_NAME", _('Invalid value for name field of SOA record. It should be the name of the zone.'));
138
3e36ebbfe048 [feladat @ 244]
rejo
parents: 132
diff changeset
    87
define("ERR_DNS_SOA_MNAME", _('You have an error in the MNAME field of the SOA record.'));
140
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    88
define("ERR_DNS_HINFO_INV_CONTENT", _('Invalid value for content field of HINFO record.'));
138
3e36ebbfe048 [feladat @ 244]
rejo
parents: 132
diff changeset
    89
define("ERR_DNS_HN_TOO_LONG", _('The hostname is too long.'));
3e36ebbfe048 [feladat @ 244]
rejo
parents: 132
diff changeset
    90
define("ERR_DNS_INV_TLD", _('You are using an invalid top level domain.'));
140
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    91
define("ERR_DNS_INV_TTL", _('Invalid value for TTL field. It should be numeric.'));
e68c3d6094d1 [feladat @ 246]
rejo
parents: 138
diff changeset
    92
define("ERR_DNS_INV_PRIO", _('Invalid value for prio field. It should be numeric.'));
164
4c6adb48dcfd [feladat @ 270]
rejo
parents: 144
diff changeset
    93
define("ERR_DNS_SRV_NAME", _('Invalid value for name field of SRV record.'));
4c6adb48dcfd [feladat @ 270]
rejo
parents: 144
diff changeset
    94
define("ERR_DNS_SRV_WGHT", _('Invalid value for the priority field of the SRV record.'));
4c6adb48dcfd [feladat @ 270]
rejo
parents: 144
diff changeset
    95
define("ERR_DNS_SRV_PORT", _('Invalid value for the weight field of the SRV record.'));
4c6adb48dcfd [feladat @ 270]
rejo
parents: 144
diff changeset
    96
define("ERR_DNS_SRV_TRGT", _('Invalid SRV target.'));
4c6adb48dcfd [feladat @ 270]
rejo
parents: 144
diff changeset
    97
define("ERR_DNS_PRINTABLE", _('Invalid characters have been used in this record.'));
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    98
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
    99
/* GOOD! */
132
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   100
define("SUC_ZONE_ADD", _('Zone has been added successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   101
define("SUC_ZONE_DEL", _('Zone has been deleted successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   102
define("SUC_USER_UPD", _('The user has been updated successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   103
define("SUC_USER_ADD", _('The user has been created successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   104
define("SUC_USER_DEL", _('The user has been deleted successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   105
define("SUC_RECORD_UPD", _('The record has been updated successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   106
define("SUC_RECORD_DEL", _('The record has been deleted successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   107
define("SUC_SM_DEL", _('The supermaster has been deleted successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   108
define("SUC_SM_ADD", _('The supermaster has been added successfully.')); 
155178ad24e4 [feladat @ 238]
rejo
parents: 123
diff changeset
   109
define("SUC_PERM_TEMPL_DEL", _('The permission template has been deleted successfully.')); 
82
c255196bc447 [feladat @ 182]
rejo
parents: 71
diff changeset
   110
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   111
?>