예제 #1
0
 public function run()
 {
     global $_W;
     global $_P;
     $keywordinfo = get_posttype_list('video');
     if (empty($keywordinfo)) {
         $this->autoreply('auto');
     } else {
         global $_K;
         $_K = $keywordinfo[0];
         get_keyword_user_auth(true);
         $this->limit_top();
         $this->cache($_K['id'], '', $_K['keyword_cache'], true);
         $this->response();
     }
 }
예제 #2
0
 public function run()
 {
     global $_W;
     global $_P;
     $keywordinfo = get_posttype_list('location');
     if (empty($keywordinfo)) {
         $this->success("谢谢分享你的地址:\n" . $_W['label'] . "\n位于:\n维度:" . $_W['location_x'] . "\n经度:" . $_W['location_y']);
         //$this->autoreply('auto');
     } else {
         global $_K;
         $_K = $keywordinfo[0];
         get_keyword_user_auth(true);
         $this->limit_top();
         $this->cache($_K['id'], '', $_K['keyword_cache'], true);
         $this->response();
     }
 }
예제 #3
0
 public function run()
 {
     global $_W;
     global $_P;
     $keywordinfo = get_posttype_list('location');
     if (empty($keywordinfo)) {
         $link = "<a href='" . $_W['url'] . "'>" . $_W['title'] . "</a>";
         $this->success("谢谢分享你的收藏:\n" . $link . "\n简介:" . $_W['description']);
     } else {
         global $_K;
         $_K = $keywordinfo[0];
         get_keyword_user_auth(true);
         $this->limit_top();
         $this->cache($_K['id'], '', $_K['keyword_cache'], true);
         $this->response();
     }
 }
예제 #4
0
 public function run()
 {
     global $_W;
     global $_P;
     $keywordinfo = get_posttype_list('image');
     if (empty($keywordinfo)) {
         $new_articles['Title'] = '亲,您发送的图片很不错哦';
         $new_articles['Description'] = 'Sorry,我们暂无处理该图片的方法';
         $new_articles['PicUrl'] = $_W['picurl'];
         $new_articles['Url'] = "";
         $this->assign('dantw', $new_articles);
         $this->display();
     } else {
         global $_K;
         $_K = $keywordinfo[0];
         get_keyword_user_auth(true);
         $this->limit_top();
         $this->cache($_K['id'], '', $_K['keyword_cache'], true);
         $this->response();
     }
 }
예제 #5
0
파일: tool.php 프로젝트: wmk223/amango_V3
/**
* 获取请求类型  数量
* param:  $msgtype,$status=1
* @return string 
*/
function get_posttype_nums($msgtype, $status = 1)
{
    $keyword_count = count(get_posttype_list($msgtype));
    return $keyword_count;
}
예제 #6
0
 public function runBundle($name)
 {
     //判断是否为自定义Bundle
     if (!in_array($name, $this->event_type)) {
         $keywordinfo = get_posttype_list(strtolower($name));
         if (empty($keywordinfo)) {
             $this->autoreply('auto');
         } else {
             global $_K;
             $_K = $keywordinfo[0];
             get_keyword_user_auth(true);
             $this->limit_top();
             $this->cache($_K['id'], '', $_K['keyword_cache'], true);
             $this->response();
         }
     } else {
         if (is_object($name)) {
             $factorymodel = $name;
         } else {
             if (isset(self::$factoryObj[$name])) {
                 $factorymodel = self::$factoryObj[$name];
             } else {
                 $name = "Weixin\\Bundle\\" . ucfirst($name) . "Bundle";
                 $factorymodel = new $name();
                 self::$factoryObj[$name] = $factorymodel;
             }
         }
         $factorymodel->run();
     }
 }