コード例 #1
0
ファイル: page.php プロジェクト: AJLoveChina/MyBlog
 protected function wrapBlog($arr)
 {
     global $config;
     $back = '';
     $date = C::dateShow($arr['time'], time());
     $types = explode(',', $arr['types']);
     $back .= "\n\t\t\t<div class='one-blog' blog_id='{$arr['id']}'>\n\t\t\t\t<div class='one-blog-wrap'>\n\t\t\t\t\t<div class='title'>{$arr['title']}</div>\n\t\t\t\t\t<div class='info'>\n\t\t\t\t\t\t<span class='stamp time' title='Pub Time'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t\t\t\t\t<span class='stamp-one'>{$date}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='stamp biaoqian' title='Stamp'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t";
     foreach ($arr['biaoqian'] as $biaoqian) {
         $back .= "\n\t\t\t\t\t\t\t\t<span class='stamp-one biaoqian-one'>{$biaoqian}</span>\n\t\t\t\t\t\t\t";
     }
     $back .= "\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='stamp view' title='Views'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t\t\t\t\t<span class='stamp-one'>{$arr['views']}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='blog-nav select' index='0'>\n\t\t\t\t\t\t\t文章\n\t\t\t\t\t\t\t<span class='huakuai'>\n\t\t\t\t\t\t\t\t<span class='huakuai-wrap'></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='blog-nav blog-nav-comment' index='1'>\n\t\t\t\t\t\t\t评论\n\t\t\t\t\t\t\t<span class='huakuai'>\n\t\t\t\t\t\t\t\t<span class='huakuai-wrap'></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='content-wrap'>\n\t\t\t\t\t\t<div class='content content-block-one' style='display:block;'>\n\t\t\t\t\t\t\t<div class='content-wrap'>\n\t\t\t\t\t\t\t\t<div class='content-desc'>{$arr['desc']}</div>\n\t\t\t\t\t\t\t\t<a href='javascript:void(0);' aj-file='{$arr['blog_file']}' class='show-more-btn show-more c-tran'>Show Detail</a>\n\t\t\t\t\t\t\t\t<div class='content-detail c-wordwrap'></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='content content-block-one content-block-one-commentswrap'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='bottom'>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li class='li nice c-hover'>Nice</li>\n\t\t\t\t\t\t\t<li class='li comment c-hover'>Comment</li>\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<li class='li danmu c-hover'>Danmu</li>\n\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t<div class='c-clear'></div>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<div class='blog-types'>\n\t\t\t";
     if ($types[0] !== '') {
         foreach ($types as $type) {
             $back .= "\n\t\t\t\t\t\t\t<span class='type-one'><a href='{$this->url}index.php?r=blogtype&types={$type}'>{$config['blog']['types'][$type]['name']}</a></span>\n\t\t\t\t\t\t";
         }
     }
     $back .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='c-clear'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='bottom-zujian'>\n\t\t\t\t\t\t<div class='zujian-one'>\n\t\t\t\t\t\t\t<form class='comment-form'>\n\t\t\t\t\t\t\t\t<div class='div'>\n\t\t\t\t\t\t\t\t\t<input class='nickname c-textarea' type='text' name='nickname' placeholder='Enter Your Nickname'/>\n\t\t\t\t\t\t\t\t\t<span class='submit-comment-btn c-button'>Submit</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='div'><textarea class='comment-val c-textarea' name='comment' placeholder='Say something...'></textarea></div>\n\t\t\t\t\t\t\t\t<div class='query-info'></div>\n\t\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$arr['id']}' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<form class='form'>\n\t\t\t\t\t\t<input type='hidden' name='is-detail-show' value='0' />\n\t\t\t\t\t\t<input type='hidden' name='blog-id' value='{$arr['id']}' />\n\t\t\t\t\t\t<input type='hidden' name='file' value='{$arr['blog_file']}' />\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t";
     return $back;
 }
コード例 #2
0
ファイル: page.php プロジェクト: AJLoveChina/meAjax
 public function wrapXueshu($rows)
 {
     $back = '';
     $user = new User($this->arr);
     $user_arr = $user->getInfoByUserId($rows['user_id']);
     $name = $user_arr['user_nick'] === '' ? $user_arr['user_schid'] : $user_arr['user_nick'];
     $time = C::dateShow($rows['time'], time());
     $content = $rows['content'];
     $huida_id = isset($rows['huida_id']) ? (int) $rows['huida_id'] : 0;
     if ($rows['filename'] !== '0') {
         $file_dir = $this->arr['xml']->xueshu['dir'];
         $content = file_get_contents(dirname(dirname(__FILE__)) . '/' . $file_dir . $rows['filename']);
     }
     $i_answer_url = $this->arr['index_url'] . "?kind1=ab&xueshu_id=" . $rows['xueshu_id'];
     $back .= "\n\t\t\t<div style='width:100%;'>\n\t\t\t\t<div class='aj-xueshu' aj-id='{$rows['xueshu_id']}' huida_id='{$rows['huida_id']}'>\n\t\t\t\t\t<div class='aj-title'><a href='{$i_answer_url}'>{$rows['title']}</a></div>\n\t\t\t\t\t<div class='aj-line'>\n\t\t\t\t\t\t<span class='aj-name aj-span'><a href='{$this->arr['index_url']}?r=1&kind1=a9&user_center_id={$rows['user_id']}'>{$name}</a></span>\n\t\t\t\t\t\t<span class=' aj-span'>发布于</span>\n\t\t\t\t\t\t<span class='aj-time aj-span'>{$time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='aj-desc'>\n\t\t\t\t\t{$content}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='aj-line'>\n\t\t";
     if ($huida_id === 0) {
         $back .= "\n\t\t\t\t\t\t<span class='aj-span'>\n\t\t\t\t\t\t\t<span>{$rows['huida']}</span>\n\t\t\t\t\t\t\t<span>条回答</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='aj-anwser aj-span'><a href='{$i_answer_url}'>我来回答</a></span>\n\t\t\t";
     }
     $back .= "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t";
     return $back;
 }