{fzw:sql="select * from sl_user where id={fzw:url:id/}" id="p1"}
{if value1="{fzw:p1:yonghuming/}" value2="{fzw:cookie:name="user_name"/}" bi="=="}
{else}
{/if}
{/fzw:sql}
{fzw:sql="select *,(select count(id) from sl_bbsshow as bbs where bbs.yonghuming=u.yonghuming) as tiezishu,(select count(id) from sl_shuoshuo as ss where ss.yonghuming=u.yonghuming) as shuoshuo,(select count(id) from sl_xiangche as xc where xc.yonghuming=u.yonghuming and xc.leixing='照片') as xiangche from sl_user as u where u.id={fzw:url:id/}" id="p1"}
最近访客({fzw:sql="select count(distinct yonghuming) as shu from sl_history where laiyuanbianhao={fzw:url:id/} and leixing='学生浏览'" id="p1"}{fzw:p1:shu/}{/fzw:sql})
{fzw:sql="select top 9 *,h.dtime as shijian from sl_user as u,sl_history as h,(select max(id) as id ,yonghuming from sl_history where laiyuanbianhao=4 and leixing='学生浏览' group by yonghuming) as sl where u.yonghuming=h.yonghuming and h.id=sl.id " id="p1"}