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.

30 lines
785 B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <?php
  2. /*
  3. * @copyright Leyun internet Technology(Shanghai)Co.,Ltd
  4. * @license http://www.dzzoffice.com/licenses/license.txt
  5. * @package DzzOffice
  6. * @link http://www.dzzoffice.com
  7. * @author zyx(zyx@dzz.cc)
  8. */
  9. require __DIR__ . '/core/coreBase.php';
  10. define('CURSCRIPT', 'dzz');
  11. define('APPTYPEID', 0);
  12. $dzz = C::app();
  13. $dzz->init_session = false;
  14. $dzz->init_setting = false;
  15. $dzz->init_user = false;
  16. $dzz->init_misc = false;
  17. $dzz->init();
  18. $sid = $_GET['sid'] ?? '';
  19. if (!$sid) {
  20. exit('Access Denied');
  21. }
  22. $short = C::t('shorturl')->fetch($sid);
  23. if (!$short) {
  24. @header('HTTP/1.1 404 Not Found');
  25. @header('Status: 404 Not Found');
  26. exit('Access Denied');
  27. }
  28. C::t('shorturl')->addview($sid);
  29. @header("Location: " . outputurl($short['url']));
  30. exit();
  31. ?>