Example #1
0
 public function shake_replay()
 {
     $from = $this->from;
     include 'function.php';
     $isluru = lurushake($this->from);
     if ($isluru != 1) {
         $reply = array(new NewsResponseItem('点击进入摇一摇', '进入摇一摇后等待游戏开始,主持人点击开始游戏,倒计时后用您吃奶的劲尽情狂欢吧!', Web_ROOT . "/shake/images/shakeshow.jpg", Web_ROOT . "/shake/mobile/index.php?wecha_id={$from}"));
         Wechat::$noendtail = 0;
         return $reply;
     }
 }
Example #2
0
 /**
  * 信息录入之后的回复函数
  *
  * @return void
  */
 protected function replay($from, $time, $content)
 {
     $xuanzezu = $this->xuanzezu;
     $weixin_name = $this->weixin_name;
     /*话题判断函数开始*/
     function startsWith($haystack, $needle, $case = false)
     {
         if ($case) {
             return strcmp(substr($haystack, 0, strlen($needle)), $needle) === 0;
         }
         return strcasecmp(substr($haystack, 0, strlen($needle)), $needle) === 0;
     }
     /*话题判断函数结束*/
     if ($content == $xuanzezu[13] && $xuanzezu[12]) {
         //摇一摇函数
         include 'function.php';
         $isluru = lurushake($from);
         if ($isluru != 1) {
             $reply = array(new NewsResponseItem('点击进入摇一摇', '点击本模块进入摇一摇!', Web_ROOT . "/shake/images/shakeshow.jpg", Web_ROOT . "/shake/mobile/index.php?wecha_id={$from}"), new NewsResponseItem('进入摇一摇后等待游戏开始,主持人点击开始游戏,倒计时后用您吃奶的劲尽情狂欢吧!', '', '', Web_ROOT . "/shake/mobile/index.php?wecha_id={$from}"));
         }
     } else {
         if ($content == $xuanzezu[15] && $xuanzezu[14]) {
             //投票函数
             $reply = array(new NewsResponseItem('点击进入投票', '点击本模块进入投票!', Web_ROOT . '/vote/images/voteshow.jpg', Web_ROOT . "/vote/index.php?wecha_id={$from}"));
         } else {
             if (startsWith($content, $xuanzezu[0])) {
                 $q = $this->sqlselect('flag', $from);
                 if ($q['nickname'] != '') {
                     $reply = $this->writeinwall($content, $time, $q);
                 } else {
                     $reply = $this->unkownerror();
                 }
             } else {
                 $reply = $this->welcome();
             }
         }
     }
     return $reply;
 }