Ejemplo n.º 1
0
 public function index()
 {
     $id = (int) $this->uri->segment(4);
     //ID
     //模板
     $tpl = 'blog.html';
     //当前会员
     $uid = get_home_uid();
     if ($uid == 0) {
         msg_url(L('home_01'), 'http://' . Web_Url . Web_Path);
     }
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . L('blog_01');
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $rowb = $this->db->query("SELECT * FROM " . CS_SqlPrefix . "blog where uid=" . $uid . " and id=" . $id . "")->row_array();
     if (!$rowb) {
         msg_url(L('blog_02'), 'http://' . Web_Url . Web_Path);
     }
     $Mark_Text = $this->CsdjTpl->home_list($row, 'blog', 1, $tpl, $title, $ids, '', '', true, FALSE);
     $Mark_Text = $this->skins->cscms_skins('blog', $Mark_Text, $Mark_Text, $rowb);
     //解析当前数据标签
     //评论
     $Mark_Text = str_replace("[blog:pl]", get_pl('blog', $id), $Mark_Text);
     $Mark_Text = $this->skins->template_parse($Mark_Text, true, true);
     echo $Mark_Text;
 }
Ejemplo n.º 2
0
 public function index()
 {
     $skin = $this->uri->segment(4);
     //模板
     //模板
     $tpl = 'index.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . L('index_01');
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     if (!empty($skin) && file_exists(CSCMS . 'tpl/home/' . $skin . '/config.php')) {
         $arr = (require CSCMS . 'tpl/home/' . $skin . '/config.php');
         $row['skins'] = $arr['path'];
     }
     $Mark_Text = $this->CsdjTpl->home_list($row, 'index', 1, $tpl, $title, $ids, '', '', true, false);
     $Mark_Text = $this->skins->labelif($Mark_Text);
     //增加人气
     $Mark_Text = hits_js($Mark_Text, hitslink('hits/ids/' . $uid, 'home'));
     echo $Mark_Text;
     $this->cache->end();
     //由于前面不是直接输出,所以这里需要加入写缓存
 }
Ejemplo n.º 3
0
 public function index()
 {
     //模板
     $tpl = 'info.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . L('info_01');
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $Mark_Text = $this->CsdjTpl->home_list($row, 'info', 1, $tpl, $title, $ids);
 }
Ejemplo n.º 4
0
 public function index()
 {
     $page = (int) $this->uri->segment(6);
     //页数
     //模板
     $tpl = 'album.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . '的专辑';
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $this->CsdjTpl->home_list($row, 'dance/album', $page, $tpl, $title, $ids, 'index');
 }
Ejemplo n.º 5
0
 public function index()
 {
     $page = (int) $this->uri->segment(4);
     //页数
     //模板
     $tpl = 'friend.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . L('friend_01');
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $this->CsdjTpl->home_list($row, 'friend', $page, $tpl, $title, $ids);
 }
Ejemplo n.º 6
0
 public function index()
 {
     $cid = (int) $this->uri->segment(4);
     //CID
     $page = (int) $this->uri->segment(5);
     //页数
     //模板
     $tpl = 'dance.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . '的歌曲';
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $sql = $cid == 0 ? "" : "SELECT {field} FROM " . CS_SqlPrefix . "dance where cid in (" . getChild($cid) . ")";
     $this->CsdjTpl->home_list($row, 'dance', $page, $tpl, $title, $ids, $cid, $sql);
 }
Ejemplo n.º 7
0
 public function index()
 {
     $fid = $this->uri->segment(4);
     //版块
     $page = (int) $this->uri->segment(5);
     //页数
     if (empty($fid)) {
         $fid = 'all';
     }
     //模板
     $tpl = 'feed.html';
     //当前会员
     $uid = get_home_uid();
     $row = $this->CsdjDB->get_row_arr('user', '*', $uid);
     if (empty($row['nichen'])) {
         $row['nichen'] = $row['name'];
     }
     //装载模板
     $title = $row['nichen'] . L('feed_01');
     $ids['uid'] = $row['id'];
     $ids['uida'] = $row['id'];
     $sql = $fid == 'all' ? "" : "SELECT {field} FROM " . CS_SqlPrefix . "dt where dir='" . $fid . "'";
     $this->CsdjTpl->home_list($row, 'feed', $page, $tpl, $title, $ids, $fid, $sql);
 }