很少說了,代碼以下:javascript
<volist name="data_init" id="vo"> <tr class="odd gradeA"> <for start="0" end="$field_num"> <td>{$vo[$field[$i]]}</td> </for> <php>if($auth->check( 'admin/form/update', session('uid') )||$auth->check( 'admin/form/del', session('uid') )){</php> <td class="center"> <php>if($auth->check( 'admin/form/update', session('uid') )){</php> <a href="/admin/form/update?id={$vo.id}" class="badge badge-primary">修改</a> <php>}</php> <php>if($auth->check( 'admin/form/del', session('uid') )){</php> <a href="javascript:void(0);" class="badge badge-danger" onclick="confirm_del(this)" data-url="{:u('del')}" data-id="{$vo.id}" data-msg="肯定要刪除嗎?">刪除</a> <php>}</php> </td> <php>}</php> </tr> </volist>