人人商城

processor.php 939B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. class DefaultModuleProcessor extends WeModuleProcessor {
  8. public function respond() {
  9. global $_W, $engine;
  10. if ($this->message['type'] == 'trace') {
  11. return $this->respText('');
  12. }
  13. $setting = uni_setting($_W['uniacid'], array('default'));
  14. if(!empty($setting['default'])) {
  15. $flag = array('image' => 'url', 'link' => 'url', 'text' => 'content');
  16. $message = $this->message;
  17. $message['type'] = 'text';
  18. $message['content'] = $setting['default'];
  19. $message['redirection'] = true;
  20. $message['source'] = 'default';
  21. $message['original'] = $this->message[$flag[$this->message['type']]];
  22. $pars = $engine->analyzeText($message);
  23. if(is_array($pars)) {
  24. return array('params' => $pars);
  25. }
  26. }
  27. }
  28. }