seccode.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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: seccode.php 34314 2014-02-20 01:04:24Z nemohou $
  7. */
  8. if(!defined('IN_MOBILE_API')) {
  9. exit('Access Denied');
  10. }
  11. include_once 'misc.php';
  12. class mobile_api {
  13. function common() {
  14. global $_G;
  15. require_once libfile('function/seccode');
  16. $seccode = make_seccode($_GET['sechash']);
  17. if(!$_G['setting']['nocacheheaders']) {
  18. @header("Expires: -1");
  19. @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
  20. @header("Pragma: no-cache");
  21. }
  22. require_once libfile('class/seccode');
  23. $type = in_array($_G['setting']['seccodedata']['type'], array(2, 3)) ? 0 : $_G['setting']['seccodedata']['type'];
  24. $code = new seccode();
  25. $code->code = $seccode;
  26. $code->type = $type;
  27. $code->width = $_G['setting']['seccodedata']['width'];
  28. $code->height = $_G['setting']['seccodedata']['height'];
  29. $code->background = $_G['setting']['seccodedata']['background'];
  30. $code->adulterate = $_G['setting']['seccodedata']['adulterate'];
  31. $code->ttf = $_G['setting']['seccodedata']['ttf'];
  32. $code->angle = $_G['setting']['seccodedata']['angle'];
  33. $code->warping = $_G['setting']['seccodedata']['warping'];
  34. $code->scatter = $_G['setting']['seccodedata']['scatter'];
  35. $code->color = $_G['setting']['seccodedata']['color'];
  36. $code->size = $_G['setting']['seccodedata']['size'];
  37. $code->shadow = $_G['setting']['seccodedata']['shadow'];
  38. $code->animator = 0;
  39. $code->fontpath = DISCUZ_ROOT.'./static/image/seccode/font/';
  40. $code->datapath = DISCUZ_ROOT.'./static/image/seccode/';
  41. $code->includepath = DISCUZ_ROOT.'./source/class/';
  42. $code->display();
  43. }
  44. function output() {}
  45. }
  46. ?>