index.php 694 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: index.php 34314 2014-02-20 01:04:24Z nemohou $
  7. */
  8. define('IN_OPEN', 1);
  9. define('SUB_DIR', 'api/open/');
  10. chdir('../../');
  11. require_once 'source/class/helper/helper_open.php';
  12. class open_api_base extends helper_open_base {}
  13. $_GET['mobile'] = 'no';
  14. if(empty($_GET['module']) || !preg_match('/^[\w\.]+$/', $_GET['module'])) {
  15. helper_open::result(array('error' => 'param_error'));
  16. }
  17. $apifile = 'api/open/'.$_GET['module'].'.php';
  18. if(file_exists($apifile)) {
  19. require_once $apifile;
  20. } else {
  21. helper_open::result(array('error' => 'module_not_exists'));
  22. }
  23. ?>