whitelist.php 892 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Exporting of $goto_whitelist from PHP to Javascript
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. chdir('..');
  9. // Send correct type:
  10. header('Content-Type: text/javascript; charset=UTF-8');
  11. // Cache output in client - the nocache query parameter makes sure that this
  12. // file is reloaded when config changes
  13. header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT');
  14. // Avoid loading the full common.inc.php because this would add many
  15. // non-js-compatible stuff like DOCTYPE
  16. define('PMA_MINIMUM_COMMON', true);
  17. require_once './libraries/common.inc.php';
  18. // Close session early as we won't write anything there
  19. session_write_close();
  20. echo "var PMA_gotoWhitelist = new Array();\n";
  21. $i = -1;
  22. foreach ($GLOBALS['goto_whitelist'] as $one_whitelist) {
  23. $i++;
  24. echo 'PMA_gotoWhitelist[' . $i . ']="' . $one_whitelist . '";' . "\n";
  25. }
  26. ?>