var.inc.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /*
  3. [Discuz!] (C)2001-2099 Comsenz Inc.
  4. This is NOT a freeware, use is subject to license terms
  5. $Id: forum.func.php 14122 2008-08-20 06:06:33Z cnteacher $
  6. */
  7. if(!defined('IN_COMSENZ')) {
  8. exit('Access Denied');
  9. }
  10. define('SOFT_NAME', 'UCenter');
  11. if(defined('UC_SERVER_VERSION')) {
  12. define('SOFT_VERSION', UC_SERVER_VERSION);
  13. define('SOFT_RELEASE', UC_SERVER_RELEASE);
  14. } else {
  15. define('SOFT_VERSION', '0.0.0');
  16. define('SOFT_RELEASE', '19700101');
  17. }
  18. define('INSTALL_LANG', 'SC_GBK');
  19. define('CONFIG', ROOT_PATH.'./data/config.inc.php');
  20. $sqlfile = ROOT_PATH.'./install/uc.sql';
  21. $lockfile = ROOT_PATH.'./data/install.lock';
  22. define('CHARSET', 'gbk');
  23. define('DBCHARSET', 'gbk');
  24. define('ORIG_TABLEPRE', 'uc_');
  25. define('METHOD_UNDEFINED', 255);
  26. define('ENV_CHECK_RIGHT', 0);
  27. define('ERROR_CONFIG_VARS', 1);
  28. define('SHORT_OPEN_TAG_INVALID', 2);
  29. define('INSTALL_LOCKED', 3);
  30. define('DATABASE_NONEXISTENCE', 4);
  31. define('PHP_VERSION_TOO_LOW', 5);
  32. define('MYSQL_VERSION_TOO_LOW', 6);
  33. define('UC_URL_INVALID', 7);
  34. define('UC_DNS_ERROR', 8);
  35. define('UC_URL_UNREACHABLE', 9);
  36. define('UC_VERSION_INCORRECT', 10);
  37. define('UC_DBCHARSET_INCORRECT', 11);
  38. define('UC_API_ADD_APP_ERROR', 12);
  39. define('UC_ADMIN_INVALID', 13);
  40. define('UC_DATA_INVALID', 14);
  41. define('DBNAME_INVALID', 15);
  42. define('DATABASE_ERRNO_2003', 16);
  43. define('DATABASE_ERRNO_1044', 17);
  44. define('DATABASE_ERRNO_1045', 18);
  45. define('DATABASE_CONNECT_ERROR', 19);
  46. define('TABLEPRE_INVALID', 20);
  47. define('CONFIG_UNWRITEABLE', 21);
  48. define('ADMIN_USERNAME_INVALID', 22);
  49. define('ADMIN_EMAIL_INVALID', 25);
  50. define('ADMIN_EXIST_PASSWORD_ERROR', 26);
  51. define('ADMININFO_INVALID', 27);
  52. define('LOCKFILE_NO_EXISTS', 28);
  53. define('TABLEPRE_EXISTS', 29);
  54. define('ERROR_UNKNOW_TYPE', 30);
  55. define('ENV_CHECK_ERROR', 31);
  56. define('UNDEFINE_FUNC', 32);
  57. define('MISSING_PARAMETER', 33);
  58. define('LOCK_FILE_NOT_TOUCH', 34);
  59. $func_items = array('mysql_connect', 'gethostbyname', 'file_get_contents', 'xml_parser_create');
  60. $env_items = array
  61. (
  62. 'os' => array('c' => 'PHP_OS', 'r' => 'notset', 'b' => 'unix'),
  63. 'php' => array('c' => 'PHP_VERSION', 'r' => '4.0', 'b' => '5.0'),
  64. 'attachmentupload' => array('r' => 'notset', 'b' => '2M'),
  65. 'gdversion' => array('r' => '1.0', 'b' => '2.0'),
  66. 'diskspace' => array('r' => '10M', 'b' => 'notset'),
  67. );
  68. $dirfile_items = array
  69. (
  70. 'config' => array('type' => 'file', 'path' => './data/config.inc.php'),
  71. 'data' => array('type' => 'dir', 'path' => './data'),
  72. 'cache' => array('type' => 'dir', 'path' => './data/cache'),
  73. 'view' => array('type' => 'dir', 'path' => './data/view'),
  74. 'avatar' => array('type' => 'dir', 'path' => './data/avatar'),
  75. 'logs' => array('type' => 'dir', 'path' => './data/logs'),
  76. 'backup' => array('type' => 'dir', 'path' => './data/backup'),
  77. 'tmp' => array('type' => 'dir', 'path' => './data/tmp')
  78. );
  79. $form_db_init_items = array
  80. (
  81. 'dbinfo' => array
  82. (
  83. 'dbhost' => array('type' => 'text', 'required' => 1, 'reg' => '/^.*$/', 'value' => array('type' => 'string', 'var' => 'localhost')),
  84. 'dbname' => array('type' => 'text', 'required' => 1, 'reg' => '/^.*$/', 'value' => array('type' => 'string', 'var' => 'ucenter')),
  85. 'dbuser' => array('type' => 'text', 'required' => 0, 'reg' => '/^.*$/', 'value' => array('type' => 'string', 'var' => 'root')),
  86. 'dbpw' => array('type' => 'password', 'required' => 0, 'reg' => '/^.*$/', 'value' => array('type' => 'string', 'var' => '')),
  87. 'tablepre' => array('type' => 'text', 'required' => 0, 'reg' => '/^.*$/', 'value' => array('type' => 'string', 'var' => 'uc_')),
  88. ),
  89. 'admininfo' => array
  90. (
  91. 'ucfounderpw' => array('type' => 'password', 'required' => 1, 'reg' => '/^.*$/'),
  92. 'ucfounderpw2' => array('type' => 'password', 'required' => 1, 'reg' => '/^.*$/'),
  93. )
  94. );