softview.asp

来自「超炫电台程序开发了两个版本了」· ASP 代码 · 共 684 行 · 第 1/3 页

ASP
684
字号
	           do while not rs.eof 
			   if cstr(rs("SubCateID"))=cstr(request("SubCateID")) then
			   response.write "&nbsp;&nbsp;<img src=../images/3dian.gif width=4 height=6> <a href=""index.asp?CateID="&rs("CateID")&"&SubCateID="&rs("SubCateID")&""" class=""ArticleList""><font color=""#FF0000""><b>"&rs("SubCateName")&"</b></font></a> ( <font color=""#FF0000"">"&rs("SubCateNum")&"</font>首 )"
				else
				response.write "&nbsp;&nbsp;<img src=../images/3dian.gif width=4 height=6> <a href=""index.asp?CateID="&rs("CateID")&"&SubCateID="&rs("SubCateID")&""" class=""ArticleList"">"&rs("SubCateName")&"</a>( <font color=""#FF0000"">"&rs("SubCateNum")&"</font>首 )"
				end if
				response.write "<br>"
	               rs.movenext 
	               loop 
	             end if 
	         rs.close 
			 else
			   sql="select * from "&CategoryName&"_Cate"
		       rs.open sql,conn,1,1
			   if rs.bof and rs.eof then 
		          response.write "没有任何分类" 
	              else 
	              do while not rs.eof
				response.write "&nbsp;&nbsp;<img src=../images/3dian.gif width=4 height=6> <a href=""index.asp?CateID="&rs("CateID")&""" class=""ArticleList"">"&rs("CateName")&"</a>( <font color=""#FF0000"">"&rs("CateNum")&"</font>首 )"
				response.write "<br>"
	               rs.movenext 
	               loop 
	             end if 
	         rs.close 
			 end if
			 %>
              </b></td>
            </tr>
            <tr>
              <td><table width="98%" border="0" cellspacing="00" cellpadding="0" align="center">
                  <tr>
                    <td bgcolor="#CCCCCC" height="1"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td height=1></td>
            </tr>
            <tr>
              <td height="18"><% 
	if request("CateID")<>"" and request("SubCateID")<>"" then
		sql="select top 20 SoftID,SoftName,SoftVer,SoftTime from "&CategoryName&"_SoftInfo where "&CateID&" "&SubCateID&"  order by WeekHits desc,SoftID desc"
	end if
	if request("CateID")<>"" and request("SubCateID")="" then
	    sql="select top 20 SoftID,SoftName,SoftVer,SoftTime from "&CategoryName&"_SoftInfo where "&CateID&" order by WeekHits desc,SoftID desc"
	end if
	if request("CateID")="" and request("SubCateID")="" then
		sql="select top 20 SoftID,SoftName,SoftVer,SoftTime from "&CategoryName&"_SoftInfo order by WeekHits desc,SoftID desc"
	end if
	rs.open sql,conn,1,1 

  	if rs.eof and rs.bof then 
       		response.write "<p align='center'>近期没有新歌曲</p>" 
   	else 
	do while not rs.eof 
	       response.write "<tr><td height=20>&nbsp;&nbsp;<img src=images/list.gif width=11 height=11> <a href=""SoftView.asp?SoftID="& rs("SoftID")&""" class=""ArticleList"">"& trim(rs("SoftName")) & trim(rs("SoftVer")) & " </a></td><tr>" 
		   response.write "<tr><td background=../Images/dot.gif colspan=4 height=1></td></tr>"
		             rs.movenext 
	               loop 
	             end if 
	         rs.close 
	%>
              </td>
            </tr>
            <tr>
              <td height="1" bgcolor=""></td>
            </tr>
            <tr>
              <td height="186">&nbsp;</td>
            </tr>
          </table></TD>
        </TR></TBODY></TABLE>
      <TABLE id=table28 cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=24 
            src="../img/title_qq3.gif" 
            width=228></TD></TR>
        <TR>
          <TD align=center valign="top"><table width="213" border="0" cellspacing="10">
              <tr>
                <td width="104" height="46"><a href="http://www.cx0574.cn/" target="_blank"><img src="../img/logo1.jpg" width="88" height="31" border="0"></a></td>
                <td width="96" align="center" valign="middle"><a href="http://www.yystudent.com/" target="_blank"><img src="../img/logo4.gif" width="88" height="31" border="0"></a></td>
              </tr>
              <tr>
                <td height="50"><a href="http://www.chinavnet.com/chpage/c1/" target="_blank"><img src="../img/logo3.gif" width="88" height="31" border="0"></a></td>
                <td><a href="http://www.163888.net/radio/" target="_blank"><img src="../img/logo5.jpg" width="88" height="31" border="0"></a></td>
              </tr>
            </table>
            </TD>
        </TR></TBODY></TABLE></TD>
    <TD width=10><IMG height=63 
      src="../img/trans.gif" 
      width=10></TD>
    <TD vAlign=top align=middle width=494>


      <TABLE id=table7 cellSpacing=0 cellPadding=0 width=494 border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE id=table19 cellSpacing=0 cellPadding=0 width=494 border=0>
              <TBODY>
              <TR>
                <TD>
                  <TABLE id=table19 cellSpacing=0 cellPadding=0 width=494 border=0>
                    <TBODY>
                      <TR>
                        <TD width=22><IMG height=39 
                  src="../img/menu_left.gif" 
                  width=22 border=0></TD>
                        <TD><TABLE id=table20 height=39 cellSpacing=0 cellPadding=0 
                  border=0>
                            <TBODY>
                              <TR>
                                <TD width=1><IMG height=39 
                        src="../img/menu_line.gif" 
                        width=1 border=0></TD>
                                <TD width=64><a href="../index.asp"><img src="../img/index.png" width="64" height="39" border="0"></a></TD>
                                <TD width=64><a href="../cy.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image33','','../img/menu2.gif',1)"><img src="../img/menu2.png" name="Image33" width="64" height="39" border="0"></a></TD>
                                <TD width=64><img src="../img/menu3.png" width="64" height="39"></TD>
                                <TD width=64><a href="../jc.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image35','','../img/menu4.png',1)"><img src="../img/menu4.gif" name="Image35" width="64" height="39" border="0"></a></TD>
                                <TD width=64><a href="../dg.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image36','','../img/menu6.png',1)"><img src="../img/menu6.gif" name="Image36" width="64" height="39" border="0"></a></TD>
                                <TD width=64><a href="../down.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image37','','../img/menu77.png',1)"><img src="../img/menu7.png" name="Image37" width="64" height="39" border="0"></a></TD>
                                <TD width=64><a href="../bbs/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image38','','../img/menu5.png',1)"><img src="../img/menu5.gif" name="Image38" width="64" height="39" border="0"></a></TD>
                                <TD width=1><IMG height=39 
                        src="../img/menu_line.gif" 
                        width=1 border=0></TD>
                              </TR>
                            </TBODY>
                        </TABLE></TD>
                        <TD width=22><IMG height=39 
                  src="../img/menu_right.gif" 
                  width=22 border=0></TD>
                      </TR>
                    </TBODY>
                  </TABLE></TD>
        </TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
      <TABLE id=table8 cellSpacing=0 cellPadding=10 width="100%" 
      background="../img/linebg.gif" 
      border=0>
        <TBODY>
        <TR>
          <TD class=bg vAlign=top align=middle 
          background="../img/jb.gif" 
          height=723>            <table width="454" height="690" border="0" cellspacing="4">
            <tr>
              <td width="444" height="682" valign="top"><table width="98%" border="0" cellspacing="00" cellpadding="0" align="center">
                <tr>
                  <td valign="top"><%   
	select case request("action")
	case "savereinfo"  '保存评论信息
         call savereinfo()
    case else
         call ShowSoftInfo() '查看ftp信息
    end select  
	 
	sub SaveReInfo()
	dim userip_temp
      userip_temp=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    if userip_temp="" then
      userip_temp=Request.ServerVariables("REMOTE_ADDR")
    end if
	sql="select * from "&CategoryName&"_SoftEssay where (ID is null)"
	rs.open sql,conn,1,3
	rs.addnew
	rs("SoftID")=trim(request("SoftID"))
	rs("UserName")=trim(request.form("UserName"))
	rs("Email")=trim(request.form("Email"))
	rs("Grade")=trim(request.form("Grade"))	
	rs("content")=UBBCode(request.form("content"))
	rs("dateTime")=Now()
    rs("UserIP")=userip_temp
	rs("type")="soft"
	rs.update	
	rs.close
	sql="select count(ID) as reNum,AVG(Grade) as avgGrade from "&CategoryName&"_SoftEssay where SoftID="&request("SoftID")&" and type='soft'"
     rs.open sql,conn,1,1 
	 reNum=rs("reNum")
	 avgGrade=rs("avgGrade")
	 rs.close
	 conn.execute("update "&CategoryName&"_SoftInfo set avgGrade="&avgGrade&",EssayNum="&reNum&" where SoftID="&request("SoftID")&" ")
	 call ShowSoftInfo()	 	
	end sub  
	  
	Sub ShowSoftinfo()  
	sql="select * from "&CategoryName&"_SoftInfo where SoftID="&request.QueryString("SoftID")   
	rs.open sql,conn,1,1  
	PubUserName=rs("UserName") 
	avgGrade=rs("avgGrade")
	EssayNum=rs("EssayNum")
	keys=rs("SoftName")
%>
                      <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center">
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20" bgcolor="#FFFFFF"><b>歌曲名称:</b></td>
                          <td  height="20"><b><%=rs("SoftName")&" "&rs("SoftVer")%></b></td>
                          <td rowspan="5" align="center" height="20"><%
       if not isnull(rs("images")) and rs("images")<>"" then
			response.write "<img src='"&rs("Images")&"' border=0>"
		end if
%>
                          </td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20">歌曲类型:</td>
                          <td height="20"><%=trim(rs("Language"))%></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20"> 演唱者:</td>
                          <td height="20"><%=trim(rs("LicenceType"))%></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20">发布时间:</td>
                          <td height="20"><%=rs("SoftTime")%></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20">联系邮箱:</td>
                          <td height="20"><a href="mailto:<%=rs("SoftFrom")%>" target="_blank"><%=rs("SoftFrom")%></a></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" align="center" nowrap height="20" bgcolor="#FFFFFF">歌曲简介:</td>
                          <td  colspan="2" height="20"><%=UBBCode(rs("Content"))%></td>
                        </tr>
                        <tr bgcolor="#FFFFFF">
                          <td width="65" height="19" align="center" nowrap>&nbsp;</td>
                          <td colspan="2" height="19">&nbsp;</td>
                        </tr>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?