You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // vim:ts=4:sw=4:et
  3. ini_set('include_path', get_include_path() . ':' . dirname(__FILE__));
  4. @include_once('Zend/Version.php');
  5. if(!class_exists('Zend_Version', false)) {
  6. die("Zend Framework not found. Please check the INSTALL File.");
  7. }
  8. chdir("..");
  9. if (!defined('SM_PATH'))
  10. {
  11. define('SM_PATH','../');
  12. }
  13. include_once(dirname(__FILE__) . '/config.php');
  14. include_once(dirname(__FILE__) . '/functions.inc.php');
  15. include_if_exists(dirname(__FILE__) . '/../include/validate.php');
  16. if (file_exists(dirname(__FILE__) . '/../include/validate.php'))
  17. {
  18. include_once(dirname(__FILE__) . '/include/validate.php');
  19. }
  20. else {
  21. include_if_exists(SM_PATH . 'src/validate.php');
  22. }
  23. include_once(SM_PATH . 'functions/page_header.php');
  24. include_once(SM_PATH . 'functions/display_messages.php');
  25. include_once(SM_PATH . 'functions/imap.php');
  26. include_if_exists(SM_PATH . 'functions/array.php');
  27. if (file_exists(SM_PATH . 'src/load_prefs.php'))
  28. {
  29. include_once(SM_PATH . 'src/load_prefs.php');
  30. }
  31. else {
  32. include_if_exists(SM_PATH . 'include/load_prefs.php');
  33. }
  34. // overwrite squirrelmail's content type to utf8...
  35. header("Content-Type: text/html; charset=utf8");
  36. //global $VACCONFMESSAGE;
  37. bindtextdomain('postfixadmin', dirname(__FILE__) . '/postfixadmin/locale');
  38. textdomain('postfixadmin');