ISPConfig module for simplify the creation of websites and DNS zones in a only step
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

172 wiersze
4.1 KiB

  1. <?php
  2. /*
  3. Form Definition
  4. Tabledefinition
  5. Datatypes:
  6. - INTEGER (Forces the input to Int)
  7. - DOUBLE
  8. - CURRENCY (Formats the values to currency notation)
  9. - VARCHAR (no format check, maxlength: 255)
  10. - TEXT (no format check)
  11. - DATE (Dateformat, automatic conversion to timestamps)
  12. Formtype:
  13. - TEXT (Textfield)
  14. - TEXTAREA (Textarea)
  15. - PASSWORD (Password textfield, input is not shown when edited)
  16. - SELECT (Select option field)
  17. - RADIO
  18. - CHECKBOX
  19. - CHECKBOXARRAY
  20. - FILE
  21. VALUE:
  22. - Wert oder Array
  23. Hint:
  24. The ID field of the database table is not part of the datafield definition.
  25. The ID field must be always auto incement (int or bigint).
  26. */
  27. global $app;
  28. $form["title"] = "DNS A";
  29. $form["description"] = "";
  30. $form["name"] = "dns_a";
  31. $form["action"] = "dns_a_edit.php";
  32. $form["db_table"] = "dns_rr";
  33. $form["db_table_idx"] = "id";
  34. $form["db_history"] = "yes";
  35. $form["tab_default"] = "dns";
  36. $form["list_default"] = "dns_a_list.php";
  37. $form["auth"] = 'yes'; // yes / no
  38. $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
  39. $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
  40. $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
  41. $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
  42. $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
  43. $form["tabs"]['dns'] = array (
  44. 'title' => "DNS A",
  45. 'width' => 100,
  46. 'template' => "templates/dns_a_edit.htm",
  47. 'fields' => array (
  48. //#################################
  49. // Begin Datatable fields
  50. //#################################
  51. 'server_id' => array (
  52. 'datatype' => 'INTEGER',
  53. 'formtype' => 'SELECT',
  54. 'default' => '',
  55. 'value' => '',
  56. 'width' => '30',
  57. 'maxlength' => '255'
  58. ),
  59. 'zone' => array (
  60. 'datatype' => 'INTEGER',
  61. 'formtype' => 'TEXT',
  62. 'default' => @$app->functions->intval($_REQUEST["zone"]),
  63. 'value' => '',
  64. 'width' => '30',
  65. 'maxlength' => '255'
  66. ),
  67. 'name' => array (
  68. 'datatype' => 'VARCHAR',
  69. 'formtype' => 'TEXT',
  70. 'filters' => array( 0 => array( 'event' => 'SAVE',
  71. 'type' => 'IDNTOASCII'),
  72. 1 => array( 'event' => 'SHOW',
  73. 'type' => 'IDNTOUTF8'),
  74. 2 => array( 'event' => 'SAVE',
  75. 'type' => 'TOLOWER')
  76. ),
  77. 'validators' => array ( 0 => array ( 'type' => 'REGEX',
  78. 'regex' => '/^[a-zA-Z0-9\.\-\*]{0,64}$/',
  79. 'errmsg'=> 'name_error_regex'),
  80. ),
  81. 'default' => '',
  82. 'value' => '',
  83. 'width' => '30',
  84. 'maxlength' => '255'
  85. ),
  86. 'type' => array (
  87. 'datatype' => 'VARCHAR',
  88. 'formtype' => 'TEXT',
  89. 'default' => 'A',
  90. 'value' => '',
  91. 'width' => '5',
  92. 'maxlength' => '5'
  93. ),
  94. 'data' => array (
  95. 'datatype' => 'VARCHAR',
  96. 'formtype' => 'TEXT',
  97. 'validators' => array (
  98. 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'data_error_empty'),
  99. 1 => array ( 'type' => 'ISIPV4', 'errmsg'=> 'ip_error_wrong'),
  100. ),
  101. 'default' => '',
  102. 'value' => '',
  103. 'width' => '30',
  104. 'maxlength' => '255'
  105. ),
  106. /*
  107. 'aux' => array (
  108. 'datatype' => 'INTEGER',
  109. 'formtype' => 'TEXT',
  110. 'default' => '0',
  111. 'value' => '',
  112. 'width' => '10',
  113. 'maxlength' => '10'
  114. ),
  115. */
  116. 'ttl' => array (
  117. 'datatype' => 'INTEGER',
  118. 'formtype' => 'TEXT',
  119. 'validators' => array ( 0 => array ( 'type' => 'RANGE',
  120. 'range' => '60:',
  121. 'errmsg'=> 'ttl_range_error'),
  122. ),
  123. 'default' => '3600',
  124. 'value' => '',
  125. 'width' => '10',
  126. 'maxlength' => '10'
  127. ),
  128. 'active' => array (
  129. 'datatype' => 'VARCHAR',
  130. 'formtype' => 'CHECKBOX',
  131. 'default' => 'Y',
  132. 'value' => array(0 => 'N', 1 => 'Y')
  133. ),
  134. /*
  135. 'stamp' => array (
  136. 'datatype' => 'VARCHAR',
  137. 'formtype' => 'TEXT',
  138. 'default' => '',
  139. 'value' => '',
  140. 'width' => '30',
  141. 'maxlength' => '255'
  142. ),
  143. */
  144. 'serial' => array (
  145. 'datatype' => 'INTEGER',
  146. 'formtype' => 'TEXT',
  147. 'default' => '',
  148. 'value' => '',
  149. 'width' => '10',
  150. 'maxlength' => '10'
  151. ),
  152. //#################################
  153. // ENDE Datatable fields
  154. //#################################
  155. )
  156. );
  157. ?>