/config.inc.default.php

http://freshdns.googlecode.com/ · PHP · 104 lines · 80 code · 17 blank · 7 comment · 6 complexity · f36ee6f2d1d32622de7cf759720e9bce MD5 · raw file

  1. <?
  2. if (session_id() == "") session_start();
  3. /*****************************************************/
  4. define('PATH', './');
  5. define('CLASSES', PATH.'class/');
  6. define('VERSION', '1.0.3');
  7. /*****************************************************/
  8. $config['mysql']['use'] = true;
  9. $config['mysql']['username'] = 'username';
  10. $config['mysql']['password'] = 'password';
  11. $config['mysql']['database'] = 'pdns';
  12. $config['mysql']['master_host'] = 'localhost';
  13. $config['mysql']['slave_hosts'] = array('localhost','localhost'); // DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING!
  14. $config['mysql']['use_replication'] = 0; // DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING!
  15. /*****************************************************/
  16. $config['postgresql']['use'] = false;
  17. $config['postgresql']['username'] = 'username';
  18. $config['postgresql']['password'] = 'password';
  19. $config['postgresql']['database'] = 'pdns';
  20. $config['postgresql']['master_host'] = 'localhost';
  21. $config['postgresql']['slave_hosts'] = array('localhost','localhost'); // DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING!
  22. $config['postgresql']['use_replication'] = 0; // DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING!
  23. /*****************************************************/
  24. $config['DNS']['ns0'] = 'ns0.example.com';
  25. $config['DNS']['ns1'] = 'ns1.example.com';
  26. $config['DNS']['ns2'] = 'ns2.example.com';
  27. $config['DNS']['hostmaster'] = 'hostmaster@example.com';
  28. /*****************************************************/
  29. $config['DNS']['templates']['standardRecords'] = array( # DO NOT CHANGE, UNLESS YOU KNOW WHAT YOU ARE DOING!
  30. array("name" => "{#DOMAIN#}", "type" => "SOA", "content" => "{#NS0#} {#HOSTMASTER#} {#SOACODE#}", "prio" => "0", "ttl" => "3600"),
  31. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS0#}", "prio" => "0", "ttl" => "3600"),
  32. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS1#}", "prio" => "0", "ttl" => "3600"),
  33. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS2#}", "prio" => "0", "ttl" => "3600"),
  34. array("name" => "{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  35. array("name" => "localhost.{#DOMAIN#}", "type" => "A", "content" => "127.0.0.1", "prio" => "0", "ttl" => "3600"),
  36. array("name" => "*.{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  37. array("name" => "www.{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  38. array("name" => "mail.{#DOMAIN#}", "type" => "A", "content" => "{#MAILIP#}", "prio" => "0", "ttl" => "3600"),
  39. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "mail.{#DOMAIN#}", "prio" => "10", "ttl" => "3600"));
  40. $config['DNS']['templates']['minimal'] = array( # DO NOT CHANGE, UNLESS YOU KNOW WHAT YOU ARE DOING!
  41. array("name" => "{#DOMAIN#}", "type" => "SOA", "content" => "{#NS0#} {#HOSTMASTER#} {#SOACODE#}", "prio" => "0", "ttl" => "3600"),
  42. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS0#}", "prio" => "0", "ttl" => "3600"),
  43. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS1#}", "prio" => "0", "ttl" => "3600"),
  44. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS2#}", "prio" => "0", "ttl" => "3600"),
  45. array("name" => "*.{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  46. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "mail.{#DOMAIN#}", "prio" => "10", "ttl" => "3600"));
  47. $config['DNS']['templates']['googleapps'] = array( # DO NOT CHANGE, UNLESS YOU KNOW WHAT YOU ARE DOING!
  48. array("name" => "{#DOMAIN#}", "type" => "SOA", "content" => "{#NS0#} {#HOSTMASTER#} {#SOACODE#}", "prio" => "0", "ttl" => "3600"),
  49. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS0#}", "prio" => "0", "ttl" => "3600"),
  50. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS1#}", "prio" => "0", "ttl" => "3600"),
  51. array("name" => "{#DOMAIN#}", "type" => "NS", "content" => "{#NS2#}", "prio" => "0", "ttl" => "3600"),
  52. array("name" => "{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  53. array("name" => "*.{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  54. array("name" => "www.{#DOMAIN#}", "type" => "A", "content" => "{#WEBIP#}", "prio" => "0", "ttl" => "3600"),
  55. array("name" => "localhost.{#DOMAIN#}", "type" => "A", "content" => "127.0.0.1", "prio" => "0", "ttl" => "3600"),
  56. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ASPMX.L.GOOGLE.COM", "prio" => "1", "ttl" => "3600"),
  57. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ALT1.ASPMX.L.GOOGLE.COM", "prio" => "5", "ttl" => "3600"),
  58. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ALT2.ASPMX.L.GOOGLE.COM", "prio" => "5", "ttl" => "3600"),
  59. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ASPMX2.GOOGLEMAIL.COM", "prio" => "10", "ttl" => "3600"),
  60. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ASPMX3.GOOGLEMAIL.COM", "prio" => "10", "ttl" => "3600"),
  61. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ASPMX4.GOOGLEMAIL.COM", "prio" => "10", "ttl" => "3600"),
  62. array("name" => "{#DOMAIN#}", "type" => "MX", "content" => "ASPMX5.GOOGLEMAIL.COM", "prio" => "10", "ttl" => "3600"));
  63. /*****************************************************/
  64. include_once(CLASSES.'class.database.php');
  65. include_once(CLASSES.'class.mysql.php');
  66. include_once(CLASSES.'class.postgresql.php');
  67. include_once(CLASSES.'class.manager.php');
  68. include_once(CLASSES.'class.login.php');
  69. include_once(CLASSES.'class.xmlcreator.php');
  70. include_once(CLASSES.'class.JSON.php');
  71. /*****************************************************/
  72. if ($config['postgresql']['use']==false && $config['mysql']['use']==true)
  73. {
  74. $config['database'] = new mysql();
  75. $config['database']->setVars($config['mysql']['username'], $config['mysql']['password'], $config['mysql']['database'], $config['mysql']['master_host'], $config['mysql']['slave_hosts'], $config['mysql']['use_replication']);
  76. $config['database']->initiate();
  77. }else if ($config['postgresql']['use']==true && $config['mysql']['use']==false)
  78. {
  79. $config['database'] = new postgresql();
  80. $config['database']->setVars($config['postgresql']['username'], $config['postgresql']['password'], $config['postgresql']['database'], $config['postgresql']['master_host'], $config['postgresql']['slave_hosts'], $config['postgresql']['use_replication']);
  81. $config['database']->initiate();
  82. }else
  83. {
  84. echo 'You have encountered an error: You did not select the right database in config.inc.php';
  85. exit;
  86. }
  87. ?>