public function init() { self::$REQUEST = self::getGet(); if (isset(self::$REQUEST['majory'])) { self::$MAJORY = CategoryNamespace::getMajoryById(self::$REQUEST['majory']); $this->assign('majory', self::$MAJORY); } if (!isset(self::$REQUEST['kw'])) { $this->assign('kw', '死神'); } }
private function _returnMsg() { $flag = true; if ($this->MsgType == 'text') { $id = $this->msg['Content']; $cateogory = CategoryNamespace::getCategoryById($id); $majory = CategoryNamespace::getMajoryById($id); if ($cateogory) { // if ($cateogory['id'] == 400) { } $this->article = CommonNamespace::getNewArticle($cateogory['id'], null, 8); $this->title = $cateogory['name']; $this->url = 'http://datougou.cn/diary/index.php/category/?category=' . $cateogory['id']; } elseif ($majory) { $this->article = CommonNamespace::getNewArticle($majory['parent']['id'], $majory['id'], 8); $this->title = $majory['parent']['name'] . ' - ' . $majory['name']; $this->url = 'http://datougou.cn/diary/index.php/majory/?majory=' . $majory['id']; } else { $flag = false; } } elseif ($this->MsgType == 'event' && strtolower($this->msg['Event']) == 'subscribe') { //$this->article = IndexPageConfig::$TOP_ARTICLE; $this->title = '欢迎关注大头狗日记散文小站'; $this->url = 'http://datougou.cn'; } if ($flag) { $content = $this->_makeNews(); } else { $content = $this->makeText(); } //$content = $this->_makeNews(); file_put_contents(dirname(__FILE__) . '/test.txt', $GLOBALS["HTTP_RAW_POST_DATA"] . "\r\n", FILE_APPEND); echo $content; exit; }