勋章插件


1)首先在user_data添加一个xzdata的文本字段!
2)将压缩包的数据添加到你的主数据库中!
3)打开forum_view.asp,在顶部定义
--------------------------------------------------------------------------------
以下内容为需要回复才能浏览

dim xzrs,xzid,xzname,xzsm,xzpicurl,xzdata,xzq,xztt,n
在下面u_emoney下面一行添加
sql="select xzdata from user_data where username='"&u_username&"'"
set rs=joekoe_cms.exec(sql,1)
if rs("xzdata")<>"" and rs("xzdata")<>"0|||0|||0|||0|||0" then
temp1=temp1&"<br>  勋章:"
xzdata=split(rs("xzdata"),"|||")
for n=0 to ubound(xzdata)
  xzq=xzdata(n)
    if xzq<>"0" then
    set xzrs=conn.execute("select * from xzdata where xzid="&xzq)
    xzid=xzrs("xzid")
    xzname=xzrs("xzname")
    xzsm=xzrs("xzsm")
      xzpicurl=xzrs("xzpicurl")
                   xztt=xzname+":"+xzsm
      temp1=temp1&"<img src=images/xz/"&xzrs("xzpicurl")&" alt="&xztt&" align=absmiddle>"
  end if
next
end if
4)打开admin_user.asp
找到添加红色部分
  sql="select top 1 id,username,nname,password,passwd,email,bbs_counter,counter,integral,emoney,remark,face,power,tim,hidden,popedom,estate,abate,otim,xzdata from user_data where id="&id
找到添加红色部分 dim username,nname,password,passwd,email,bbs_counter,remark,face,counter,integral,emoney,power,hidden,popedom,estate,abate,otim,xzxg,p41,p42,p_left,p_right
在 f_otim=joekoe_cms.time_type(rs("otim"),4)下面添加:
  xzxg=request.form("xzn1")& "|||" &request.form("xzn2")& "|||" &request.form("xzn3")& "|||" &request.form("xzn4")& "|||" &request.form("xzn5")
在    rs("popedom")=popedom下面添加:
    rs("xzdata")=xzxg
在<tr><td>论坛屏蔽:</td><td><input type=radio name=p42 value='0'<%if int(p42)=0 then response.write " checked"%>> 正常  <input type=radio name=p42 value='1'<%if int(p42)<>0 then response.write " checked"%>> 屏蔽</td></tr>

在下面添加:
<tr>
<td>社区奖章</td>
<td colspan=5>
第一奖项:<select size=1 name="xzn1">
<%
dim xzrs,xzname,xzid,xzdata,numb,xz1,xz2,xz3,xz4,xz5
if rs("xzdata")<>"" then
xzdata=split(rs("xzdata"),"|||")
select case ubound(xzdata)
  case 0
   xz1=xzdata(0)
  case 1
      xz1=xzdata(0)
      xz2=xzdata(1)
  case 2
   xz1=xzdata(0)
      xz2=xzdata(1)
      xz3=xzdata(2)
  case 3
   xz1=xzdata(0)
      xz2=xzdata(1)
      xz3=xzdata(2)
      xz4=xzdata(3)
  case 4
   xz1=xzdata(0)
      xz2=xzdata(1)
      xz3=xzdata(2)
      xz4=xzdata(3)
      xz5=xzdata(4)
end select
end if
%>
<%
set xzrs=conn.execute("select xzname,xzid from xzdata")
response.write "<option value=0>请选择勋章</option>"
do while not xzrs.eof
xzname=xzrs("xzname")
response.write "<option value="&xzrs("xzid")
if xzrs("xzid")=cint(xz1) then response.write " selected "
response.write ">"&xzname&"</option>"
xzrs.movenext
loop
xzrs.close
set xzrs=nothing
%>
</select></td>
</tr>
<tr>
<td width=20% class=forumrow rowspan="4"> </td>
<td width=80% class=forumrow colspan=5>
第二奖项:<select size=1 name="xzn2">
<%
set xzrs=conn.execute("select xzname,xzid from xzdata")
response.write "<option value=0>请选择勋章</option>"
do while not xzrs.eof
xzname=xzrs("xzname")
response.write "<option value="&xzrs("xzid")
if xzrs("xzid")=cint(xz2) then response.write " selected "
response.write ">"&xzname&"</option>"
xzrs.movenext
loop
xzrs.close
set xzrs=nothing
%>
</select></td>
</tr>
<tr>
<td>
第三奖项:<select size=1 name="xzn3">
<%
set xzrs=conn.execute("select xzname,xzid from xzdata")
response.write "<option value=0>请选择勋章</option>"
do while not xzrs.eof
xzname=xzrs("xzname")
response.write "<option value="&xzrs("xzid")
if xzrs("xzid")=cint(xz3) then response.write " selected "
response.write ">"&xzname&"</option>"
xzrs.movenext
loop
xzrs.close
set xzrs=nothing
%>
</select></td>
</tr>
<tr>
<td>
第四奖项:<select size=1 name="xzn4">
<%
set xzrs=conn.execute("select xzname,xzid from xzdata")
response.write "<option value=0>请选择勋章</option>"
do while not xzrs.eof
xzname=xzrs("xzname")
response.write "<option value="&xzrs("xzid")
if xzrs("xzid")=cint(xz4) then response.write " selected "
response.write ">"&xzname&"</option>"
xzrs.movenext
loop
xzrs.close
set xzrs=nothing
%>
</select></td>
</tr>
<tr>
<td>
第五奖项:<select size=1 name="xzn5">
<%
set xzrs=conn.execute("select xzname,xzid from xzdata")
response.write "<option value=0>请选择勋章</option>"
do while not xzrs.eof
xzname=xzrs("xzname")
response.write "<option value="&xzrs("xzid")
if xzrs("xzid")=cint(xz5) then response.write " selected "
response.write ">"&xzname&"</option>"
xzrs.movenext
loop
xzrs.close
set xzrs=nothing
%>
</select></td>
</tr>
下载文件 点击下载此文件

文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 8 | 引用: 0 | 查看次数: 688
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭