ISPConfig module for simplify the creation of websites and DNS zones in a only step
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

135 lignes
3.7 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. Search:
  27. - searchable = 1 or searchable = 2 include the field in the search
  28. - searchable = 1: this field will be the title of the search result
  29. - searchable = 2: this field will be included in the description of the search result
  30. */
  31. $form["title"] = "Database User";
  32. $form["description"] = "";
  33. $form["name"] = "database_user";
  34. $form["action"] = "database_user_edit.php";
  35. $form["db_table"] = "web_database_user";
  36. $form["db_table_idx"] = "database_user_id";
  37. $form["db_history"] = "yes";
  38. $form["tab_default"] = "database_user";
  39. $form["list_default"] = "database_user_list.php";
  40. $form["auth"] = 'yes'; // yes / no
  41. $form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
  42. $form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
  43. $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
  44. $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
  45. $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
  46. $form["tabs"]['database_user'] = array (
  47. 'title' => "Database User",
  48. 'width' => 100,
  49. 'template' => "templates/new_service_webdns.htm",
  50. 'fields' => array (
  51. //#################################
  52. // Begin Datatable fields
  53. //#################################
  54. 'server_id' => array (
  55. 'datatype' => 'INTEGER',
  56. 'formtype' => 'SELECT',
  57. 'default' => '',
  58. 'datasource' => array ( 'type' => 'SQL',
  59. 'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND {AUTHSQL} AND db_server = 1 ORDER BY server_name',
  60. 'keyfield'=> 'server_id',
  61. 'valuefield'=> 'server_name'
  62. ),
  63. 'value' => ''
  64. ),
  65. 'database_user' => array (
  66. 'datatype' => 'VARCHAR',
  67. 'formtype' => 'TEXT',
  68. 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
  69. 'errmsg'=> 'database_user_error_empty'),
  70. 1 => array ( 'type' => 'UNIQUE',
  71. 'errmsg'=> 'database_user_error_unique'),
  72. 2 => array ( 'type' => 'REGEX',
  73. 'regex' => '/^[a-zA-Z0-9_]{2,64}$/',
  74. 'errmsg'=> 'database_user_error_regex'),
  75. ),
  76. 'default' => '',
  77. 'value' => '',
  78. 'width' => '30',
  79. 'maxlength' => '255',
  80. 'searchable' => 1
  81. ),
  82. 'database_user_prefix' => array (
  83. 'datatype' => 'VARCHAR',
  84. 'formtype' => 'TEXT',
  85. 'default' => '',
  86. 'value' => '',
  87. 'width' => '30',
  88. 'maxlength' => '25'
  89. ),
  90. 'database_password' => array (
  91. 'datatype' => 'VARCHAR',
  92. 'formtype' => 'PASSWORD',
  93. 'validators' => array(
  94. 0 => array(
  95. 'type' => 'CUSTOM',
  96. 'class' => 'validate_password',
  97. 'function' => 'password_check',
  98. 'errmsg' => 'weak_password_txt'
  99. )
  100. ),
  101. 'encryption' => 'MYSQL',
  102. 'default' => '',
  103. 'value' => '',
  104. 'width' => '30',
  105. 'maxlength' => '255'
  106. ),
  107. 'database_password_mongo' => array (
  108. 'datatype' => 'VARCHAR',
  109. 'formtype' => 'PASSWORD',
  110. 'default' => '',
  111. 'value' => '',
  112. 'width' => '30',
  113. 'maxlength' => '255'
  114. ),
  115. //#################################
  116. // ENDE Datatable fields
  117. //#################################
  118. )
  119. );
  120. ?>