/** * 远程请求代理 * * @access public * @return void */ public function feed() { $this->user->pass('subscriber'); $client = Typecho_Http_Client::get(); if ($client) { $client->setHeader('User-Agent', $this->options->generator)->send('http://typecho.org/feed/'); /** 匹配内容体 */ $response = $client->getResponseBody(); preg_match_all("/<item>\\s*<title>([^>]*)<\\/title>\\s*<link>([^>]*)<\\/link>\\s*<guid>[^>]*<\\/guid>\\s*<pubDate>([^>]*)<\\/pubDate>/is", $response, $matches); $data = array(); if ($matches) { foreach ($matches[0] as $key => $val) { $data[] = array('title' => $matches[1][$key], 'link' => $matches[2][$key], 'date' => Typecho_I18n::dateWord(strtotime($matches[3][$key]), $this->options->gmtTime + $this->options->timezone)); if ($key > 3) { break; } } } if (!empty($data)) { Typecho_Cookie::set('__typecho_feed', Typecho_Json::encode($data)); } $this->response->throwJson($data); return; } throw new Typecho_Widget_Exception(_t('禁止访问'), 403); }
</a></p> <h2><?php $user->screenName(); ?> </h2> <p><?php $user->name(); ?> </p> <p><?php _e('目前有 <em>%s</em> 篇日志, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.', $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?> </p> <p><?php if ($user->logged > 0) { _e('最后登录: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone)); } ?> </p> </div> <div class="col-mb-12 col-tb-6 col-tb-offset-1 typecho-content-panel" role="form"> <section> <h3><?php _e('个人资料'); ?> </h3> <?php Typecho_Widget::widget('Widget_Users_Profile')->profileForm()->render(); ?> </section>
?> " name="id[]"/></td> <td><?php echo htmlspecialchars($log['try_username'], ENT_QUOTES); ?> </td> <td><?php echo htmlspecialchars($log['try_password'], ENT_QUOTES); ?> </td> <td><?php echo htmlspecialchars($log['ip'], ENT_QUOTES); ?> </td> <td><?php echo Typecho_I18n::dateWord($log['add_time'], $_SERVER['REQUEST_TIME']); ?> </td> </tr> <?php } ?> <?php } else { ?> <tr> <td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有任何登录失败的记录'); ?> </h6></td> </tr>
/** * 获取国际化偏移时间 * * @access public * @return string */ public function word() { return Typecho_I18n::dateWord($this->timeStamp, self::gmtTime() + (self::$timezoneOffset - self::$serverTimezoneOffset)); }
if ($this->_user->sign) { ?> <p class="m0"><strong><?php $this->_user->sign(); ?> </strong></p><?php } ?> <div> <?php $this->options->title(); _e(_t('第 %s 位会员,', $this->_user->uid)); _e('加入于:' . date('Y-m-d H:i:s', $this->_user->created)); if ($this->user->uid == $this->_user->uid) { if ($this->_user->logged != 0) { _e(',最后登录: %s', Typecho_I18n::dateWord($this->_user->logged + $this->options->timezone, $this->options->gmtTime + $this->options->timezone)); } else { _e(',第一次登录'); } } ?> </div> </div> <div class="cell"> <?php if ($this->_user->url) { ?> <a class="tag" href="<?php $this->_user->url(); ?> " target="_blank"><i class="fa fa-home"></i> <?php