thinkphp 下html里实现frame框架效果

HTML代码如下:



PHP代码如下:

public function army(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 8);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}
public function emotion(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 6);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}


public function fame(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 2);
$result= M('userinfo')->field('uid')->where($where)->select();
//=M('userinfo')->field('uid')->where($where1)->select();
//p($result);die;
if ($result) {
foreach ($result as $v) {
$uid[] = $v['uid'];
}
}
//p($v);die;
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}
public function fashion(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 7);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}
public function joke(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 3);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}
public function social(){
//实例化微博视图模型
import('ORG.Util.Page');
$db = D('WeiboView');
$where = array('type' => 4);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$count = $db->where($where)->count();
$page = new Page($count, 20);
$limit = $page->firstRow . ',' . $page->listRows;
$result = $db->getAll($where);
$this->weibo = $result;
$this->page = $page->show();
$this->display();
}
public function top1(){
//实例化微博视图模型
$db = D('WeiboView');
$where = array('type' => 5);
$result = M('userinfo')->field('type')->where($where)->select();
if ($result) {
foreach ($result as $v) {
$uid[] = $v['follow'];
}
}
$result = $db->getAll($where);
$this->weibo = $result;
$this->display();
}thinkphp 下html里实现frame框架效果_第1张图片thinkphp 下html里实现frame框架效果_第2张图片

你可能感兴趣的:(thinkphp 下html里实现frame框架效果)