主要地方
```
<tbody>
<php>
$list=D('order')->
where(array('uid'=> session('uid')))->
order("id desc")->
relation(true)->
limit(5)->
select();
</php>
<volist id="v" name="list">
<tr>
```
tp5的用法
```
<div class="ibox-title">
<span class="label label-success pull-right">月</span>
<h5>收入</h5>
{php}
use think\Db;
$cate=Db::name('auth_user')->
where('id=1')->
find();
{/php}
</div>
```
```
<div class="bjui-pageHeader" style="background:#FFF;">
<div style="padding: 0 15px;">
<div class="row" style=" margin-top:10px;">
<form action="__URL__/index/navTabId/{:CONTROLLER_NAME}" class="pageForm" data-toggle="validate">
<input type="hidden" name="id" value="{$Think.session.uid}"/>
<div class="col-md-12" style="padding:5px;">
<div class="alert alert-success" role="alert" style="margin:0 0 5px; padding:5px 15px;">
<h5>
我的便签、记事本
<button type="submit" class="btn-default">
保存
</button>
</h5>
<textarea style="width:100%;height:75px;border:0px;line-height:150%" name="bian">{$Rs.bian}</textarea>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="bjui-pageContent">
<div style="margin-top:5px; overflow:hidden;">
<div class="row" style="padding: 0 8px;">
<!--//-->
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-user-md"></i>
我的订单
<a href="{:U('Order/index')}" data-toggle="navtab" data-id="'order/index" data-title="订单列表">
详细
</a>
</h3>
</div>
<div style="min-height:185px">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th height=30>
开始时间
</th>
<th>
结算账户
</th>
<th>
订单类型
</th>
<th>
订单状态
</th>
</tr>
</thead>
<tbody>
<php>
$list=D('order')->
where(array('uid'=> session('uid')))->
order("id desc")->
relation(true)->
limit(5)->
select();
</php>
<volist id="v" name="list">
<tr>
<td>
{$v.addtime}
</td>
<td>
{$v.settle}
</td>
<td>
{$v.otitle}
</td>
<td>
{$v.ftitle}
</td>
</tr>
</volist>
</tbody>
</table>
</div>
</div>
</div>
<!--//-->
<!--//-->
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<i class="fa fa-pencil-square-o">
</i>
我的任务
<a href="{:U('renwu/index')}" data-toggle="navtab" data-id="{:U('renwu/index')}" data-title="我的任务">
详细
</a>
</h3>
</div>
<div style="min-height:185px">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th height=30>
截至时间
</th>
<th>
任务标题
</th>
<th>
状态
</th>
<th>
发布人
</th>
<th>
发布时间
</th>
</tr>
</thead>
<tbody>
<php>
$list=M('renwu')->
where(array('juid'=>
array('like','%'.session(uid).'%')))->
order("id desc")->
limit(5)->
select();
</php>
<volist id="v" name="list">
<tr>
<td>
{$v.jztime|msubstr=###,0,10}
</td>
<td>
{$v.biaoti|msubstr=###,0,20}
</td>
<td>
{$v.jieguo}
</td>
<td>
{$v.uname}
</td>
<td>
{$v.addtime|substr=###,0,10}
</td>
</tr>
</volist>
</tbody>
</table>
</div>
</div>
</div>
<!--//-->
</div>
</div>
</div>
```