KesionCMS 帮助
帮助首页 V6使用手册 - 问题汇总

6、科汛CMS强力打造完美在线投票管理系统

0 2009/9/23 14:23:46

 
第二步:从图片数据表中选择要用到的字段,如下图:
6、科汛CMS强力打造完美在线投票管理系统 第 6 张
最终查询语句如下:
select ID,Title,PhotoUrl,Score,picturecontent,KS_area from KS_Photo where tid='{$CurrClassID}' order by id desc
 

点击下一步继续,写循环体,如下所示(要显示成什么样式,大家可以自己写代码)

[loop=10]
<table width="400" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:5px;">
<tr>
<td height="144" align="center" style="padding-bottom:5px;">

<table width="138" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="tu"><a href="{$Field(ID,GetInfoUrl,2,1)}"><img src="{$Field(PhotoUrl,Text,0,...,0,)}" width="138" height="138" border="0"/></a></td></tr>
<tr>
<td height="5" align="center"></td>
</tr>
<tr>
<td height="20" align="center" class="conter_right_ziti">姓&nbsp;&nbsp;&nbsp;&nbsp;名:<a href="{$Field(ID,GetInfoUrl,2,1)}"><span class="conter_right_ziti">{$Field(Title,Text,0,...,0,)}</span></a></td></tr>
<tr>
<td height="20" align="center" class="conter_right_ziti">所在区域:<a href="{$Field(ID,GetInfoUrl,2,1)}"><span class="conter_right_ziti">{$Field(KS_area,Text,0,...,0,)}</span></a></td></tr>
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" class="conter_right_ziti2">得票数:{$Field(Score,Num,0,2)}</td><td valign="top">
<a href="/Item/vote.asp?m=2&id={$Field(ID,GetInfoUrl,2,2)}"><img src="/images/anniu.gif"  width="58" height="16" border="0"></a>
</td></tr>
</table></td>
</tr>
</table>
</td>
<td width="200" valign="top" style="padding-bottom:5px;"><p>自我介绍:</p>
  <p>{$Field(picturecontent,Text,0,...,0,)}</p></td>
</tr>
</table>
[/loop]

 

 

OK,最后轻轻点击一下你的鼠标,点击“确定保存”,标签建立完成。
 
100%