<!--#include file="conn.asp"-->
<!--#include file="admin/config.asp"-->
<!--#include file="admin/inc/char.asp"-->
<!--#include file="top.asp"-->
<% 
function geturl(str,utype)
	dim url,showurl,urlnum,i,num
	str=Split(str,VBCrLf)
	urlnum=UBound(str)
	for i=0 to urlnum
		url=Split(str(i),"|")
		num=UBound(url)
		if num=0 then
			select case utype
			case "1" showurl="<a href=get.asp?id="&id&"&type="&utype&"&url="&(i+1)&"><font face='Verdana,Arial,宋体' style='font-size:11px'>Download."&(i+1)&"</font></a>┊"
			case "2" showurl="<a href=get.asp?id="&id&"&type="&utype&"&url="&(i+1)&">汉化补丁</a>┊"
			case "3" showurl="<a href=get.asp?id="&id&"&type="&utype&"&url="&(i+1)&">特别文件</a>┊"
			end select
		else
			showurl="<a href=get.asp?id="&id&"&type="&utype&"&url="&(i+1)&">"&url(0)&"</a>┊"
		end if
		response.write showurl
	next
end function

dim id,sql,rs
id=CInt(Request.QueryString("id"))
dim FileName,Grade,Brief,Chinese,Crack,DayHits,WeekHits,MonthHits,TotalHits,LastHit,Member
dim ViewTimes,Keyword,Info,Picture,FtpDown,AddDate,LastUpdate,URL,ClassID,Poster,Point
sql="select FileName,Grade,Brief,Chinese,Crack,DayHits,WeekHits,MonthHits,TotalHits,LastHit,ViewTimes,Keyword,Info,Picture,FtpDown,AddDate,LastUpdate,URL,ClassID,Poster,Point,Member from Software where ID="&id
'               0      1     2      3      4      5        6        7          8       9        10       11    12     13      14      15       16      17    18     19     20    21
set rs=conn.execute(sql)
FileName=rs(0)
Grade=rs(1)
Brief=rs(2)
Chinese=rs(3)
Crack=rs(4)
LastHit=rs(9)
Keyword=rs(11)
Info=Split(rs(12),"|")
Picture=rs(13)
FtpDown=rs(14)
AddDate=rs(15)
LastUpdate=rs(16)
URL=rs(17)
ClassID=rs(18)
Poster=rs(19)
Point=Split(rs(20),",")
Member=rs(21)

dim today
today=date()
if trim(LastHit)<>trim(today) then
	sql="update software set DayHits=0,LastHit=date() where ID="&id
	conn.execute(sql)
end if
sql="update software set ViewTimes=ViewTimes+1 where ID="&id
conn.execute(sql)
DayHits=rs(5)
if weekday(today)=1 then
	sql="update software set WeekHits="&DayHits&" where ID="&id
	conn.execute(sql)
end if
if day(today)=1 then
	sql="update software set MonthHits="&DayHits&" where ID="&id
	conn.execute(sql)
end if
WeekHits=rs(6)
MonthHits=rs(7)
TotalHits=rs(8)
ViewTimes=rs(10)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=FileName%> - 3鸟设社下载系统</title>
<SCRIPT LANGUAGE="JavaScript" src="js/outliner.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" FOR="DocBody" EVENT="onkeypress">checkKey();</SCRIPT>

<STYLE>
.color1
{
    color : #000000;
}
.color2
{
    color : #5730035499;
}
BODY {
	    scrollbar-face-color : <%=SkinSetting(10)%>;
	    scrollbar-shadow-color : <%=SkinSetting(11)%>;
	    scrollbar-highlight-color : <%=SkinSetting(12)%>;
	    scrollbar-3dlight-color : <%=SkinSetting(13)%>;
	    scrollbar-darkshadow-color : <%=SkinSetting(14)%>;
	    scrollbar-track-color : <%=SkinSetting(15)%>;
	    scrollbar-arrow-color : <%=SkinSetting(16)%>;
}
.mouseover {
	background-color: <%=SkinSetting(8)%>;
	border: 1px solid <%=SkinSetting(9)%>;
}
.mouseout {
	background-color: <%=SkinSetting(3)%>;
}
.mouseout2 {
	background-color: <%=SkinSetting(4)%>;
}
</STYLE>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="<%=SkinSetting(0)%>" background="<%=SkinSetting(1)%>" leftmargin="0" topmargin="0" ID="DocBody">
<!--#include file="header.asp"-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="<%=SiteSetting(9)%>">
  <tr>
    <td bgcolor="<%=SkinSetting(3)%>">
<table width="760" border="0" cellpadding="0" cellspacing="0" class="xuxian">
        <tr> 
          <td width="600" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="18" valign="bottom" class="xuxian3">&nbsp;<img src="images/point1.gif" width="17" height="16" align="absmiddle"> 
                  当前位置：<a href="default.asp">首页</a> 
       <%dim ClassName,ParentStr,ParentNum,i
		sql="select ClassName,ParentStr from Class where ID="&ClassID
		set rs=conn.execute(sql)
		ClassName=rs(0)
		ParentStr=Split(rs(1),",")
		ParentNum=UBound(ParentStr)
		if ParentStr(0)="0" then
			response.write " \ <a href=list.asp?id="&ClassID&">"&ClassName&"</a>"
		else
			response.write " \ "	
			for i=0 to ParentNum
				sql="select ID,ClassName from Class where ID="&CInt(ParentStr(i))
				set rs=conn.execute(sql)
				response.write "<a href=list.asp?id="&rs(0)&">"&rs(1)&"</a> \ "
			next
			response.write "<a href=list.asp?id="&ClassID&">"&ClassName&"</a>"
		end if%>
                </td>
              </tr>
            </table>
            <br>
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr>
                <td align="center" bgcolor=<%=SkinSetting(4)%> class="TdBorderB"><strong><font face="Verdana, Arial, Helvetica, sans-serif, 宋体" color="<%=SkinSetting(5)%>"><%=FileName%></font></strong></td>
              </tr>
            </table>
            <br>
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="<%=SkinSetting(2)%>" style="word-break:break-all">
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">文件大小：<%=Info(0)%></td>
                <td width="38%" rowspan="6" align="center" bgcolor="<%=SkinSetting(3)%>"> 
                <%if isnull(Picture) or Picture="" then
					response.write "<img src=images/noimage.gif height=120 border=0>"
				Else
					Picture=Split(Picture,"|")
					if Picture(1)<>"" then
						response.write "<a href="&Picture(1)&" target=_blank><img src="&Picture(0)&" height=120 border=0 alt=点击放大></a>"
					else
						response.write "<a href="&Picture(0)&" target=_blank><img src="&Picture(0)&" height=120 border=0 alt=点击放大></a>"
					end if
				end if%> </td>
                <td width="20%">总浏览：<%=ViewTimes%></td>
              </tr>
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">运行平台：<%=Info(1)%></td>
                <td width="20%">总下载：<%=TotalHits%></td>
              </tr>
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">级别评定： 
				<%select case Grade
				case "0" response.write "N/A"
				case "1" response.write "<img src=images/grade1.gif>"
				case "2" response.write "<img src=images/grade2.gif>"
				case "3" response.write "<img src=images/grade3.gif>"
				case "4" response.write "<img src=images/grade4.gif>"
				case "5" response.write "<img src=images/grade5.gif>"
				end select
				%> </td>
                <td width="20%">本&nbsp;&nbsp;月：<%=MonthHits%></td>
              </tr>
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">添加时间：<%=AddDate%></td>
                <td width="20%">本&nbsp;&nbsp;周：<%=WeekHits%></td>
              </tr>
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">最后更新：<%=LastUpdate%></td>
                <td width="20%">今&nbsp;&nbsp;日：<%=DayHits%></td>
              </tr>
              <tr bgcolor="<%=SkinSetting(3)%>"> 
                <td width="42%">相关链接：<%if Info(2)<>"" and Info(3)<>"" then
				response.write "<a href="&Info(3)&" target=_blank>"&Info(2)&"</a>"
				else
				response.write "无"
				end if%></td>
                <td width="20%" bgcolor="<%=SkinSetting(3)%>">添加者：<a href="user_info.asp?username=<%=Poster%>" target="_blank" title="点击查看此用户的详细资料"><%=Poster%></a></td>
              </tr>
            </table> 
            <br>
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr> 
                <td bgcolor="<%=SkinSetting(4)%>" class="TdBorderB">::立即下载::</td>
              </tr>
            </table>
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="<%=SkinSetting(2)%>" style="word-break:break-all">
              <tr> 
                <td bgcolor="<%=SkinSetting(3)%>" style="line-height:16px">
<%if SiteSetting(8)="yes" and Member=true and chkmember=false then
	response.write "会员软件，请先登录！"
else
	response.write "┊"
	if (isnull(URL) or URL="") and (isnull(FtpDown) or FtpDown="") then
		response.write "暂停下载┊"
	else
		if not(isnull(URL) or URL="") then response.write geturl(URL,1)
		if not(isnull(FtpDown) or FtpDown="") then
			FtpDown=Split(FtpDown,"|")
			response.write "<a href=get.asp?id="&id&"&type=4&url="&(FtpDown(0)+1)&">本站下载</a>┊"
		end if
	end if		
	if not(isnull(Chinese) or Chinese="") then response.write geturl(Chinese,2)
	if not(isnull(Crack) or Crack="") then response.write geturl(Crack,3)
end if%>
                </td>
              </tr>
            </table>
            <br>
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr> 
                <td width="3%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font color="#666666">/</font></td>
                <td width="15%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font id="AA" STYLE="cursor:hand" onclick="CloseAll();outliner();this.className='color1';BB.className='color2';CC.className='color2'" child="A" class="color1">::软件简介::</font></td>
                <td width="3%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font color="#666666">/</font></td>
                <td width="15%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font id="BB" STYLE="cursor:hand" onclick="CloseAll();outliner();this.className='color1';AA.className='color2';CC.className='color2'" child="B" class="color2">::相关软件::</font></td>
                <td width="3%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font color="#666666">/</font></td>
                <td width="15%" align="center" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font id="CC" STYLE="cursor:hand" onclick="CloseAll();outliner();this.className='color1';AA.className='color2';BB.className='color2'" child="C" class="color2">::软件点评::</font></td>
                <td width="3%" bgcolor="<%=SkinSetting(4)%>" class="TdBorderB"><font color="#666666">/</font></td>
                <td bgcolor="<%=SkinSetting(4)%>" class="TdBorderB">&nbsp;</td>
              </tr>
            </table>
<DIV CLASS="expanded" ID="A">
                <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="<%=SkinSetting(2)%>" style="word-break:break-all">
                  <tr> 
                    <td bgcolor="<%=SkinSetting(3)%>" style="line-height:16px"> 
                      <%=UBBCode(Brief)%></td>
                  </tr>
                </table>
</div>
<DIV CLASS="collapsed" ID="B">
                <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="<%=SkinSetting(2)%>" style="word-break:break-all">
                  <tr> 
                    <td valign="top" bgcolor="<%=SkinSetting(3)%>"> 
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <%
sql="select top 10 ID,FileName,Chinese,Crack,Member from Software where Hidden=false and PostType<>1 and Keyword like '%"&Keyword&"%' and FileName<>'"&FileName&"' order by ID DESC"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
	response.write "<td height='20'><center>暂无相关软件</center></td>"
else
	response.write "<tr><td style=line-height:16px>"
	do while not rs.eof
		response.write "·<a href=view.asp?id="&rs(0)&">"&rs(1)&"</a>"				
		if not(isnull(rs(2)) or rs(2)="") then
			response.write"&nbsp;<img src='images/cn.gif'>"
		end if
		if not(isnull(rs(3)) or rs(3)="") then
			response.write"&nbsp;<img src='images/cr.gif'>"
		end if
		if rs(4)=true then
			response.write"&nbsp;<img src='images/mb.gif'>"
		end if
		response.write"<br>"
		rs.movenext
	loop
	response.write"</td><tr>"
end if
%>
                      </table></td>
                  </tr>
                </table>
</div>
<DIV CLASS="collapsed" ID="C">
                <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="<%=SkinSetting(2)%>" style="word-break:break-all">
                  <tr bgcolor="<%=SkinSetting(3)%>"> 
                    <td valign="top" bgcolor="<%=SkinSetting(3)%>"> 
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <%
sql="select top 10 * from review where SoftID="&id&" order by ID DESC"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
	response.write "<td height='20'><center>暂无评论</center></td>"
else
	response.write "<tr><td style=line-height:16px>"
	do while not rs.eof
		response.write "〖"&killchar(rs(2))&"〗"&killchar(rs(3))&"&nbsp;("&formatDT(rs(4),1)&")<br>"				
		rs.movenext
	loop
	response.write "</td></tr><tr><td align=right><a href=review.asp?id="&id&" target=_blank>-=全部评论=-</a></td></tr>"				
end if
%>
                      </table></td>
                  </tr>
                </table>
</div>           
            <br>
          </td>
          <td width="160" valign="top" bgcolor="<%=SkinSetting(4)%>" class="xuxian2"> 
            <br>
            <%dim people,total,average,pp1,pp2,pp3,pp4,pp5
			dim Point1,Point2,Point3,Point4,Point5
			Point1=Cint(Point(0))
			Point2=Cint(Point(1))
			Point3=Cint(Point(2))
			Point4=Cint(Point(3))
			Point5=Cint(Point(4))
			people=Point1+Point2+Point3+Point4+Point5
			total=Point1*1+Point2*2+Point3*3+Point4*4+Point5*5
			if Point1=0 then pp1=0 else pp1=cint(Point1/people*100)
			if Point2=0 then pp2=0 else	pp2=cint(Point2/people*100)
			if Point3=0 then pp3=0 else	pp3=cint(Point3/people*100)
			if Point4=0 then pp4=0 else	pp4=cint(Point4/people*100)
			if Point5=0 then pp5=0 else pp5=cint(Point5/people*100)
			if people=0 then 
				average=0 
			else
				average=total/people
				average=round(average,2)
			end if
			%>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="<%=SkinSetting(3)%>">
              <tr> 
                <td width="18%">1分</td>
                <td width="65%"><img src="images/tu.gif" width="<%=pp1%>%" height="10"></td>
                <td width="17%"><%=Point1%></td>
              </tr>
              <tr> 
                <td>2分</td>
                <td><img src="images/tu.gif" width="<%=pp2%>%" height="10"></td>
                <td><%=Point2%></td>
              </tr>
              <tr> 
                <td>3分</td>
                <td><img src="images/tu.gif" width="<%=pp3%>%" height="10"></td>
                <td><%=Point3%></td>
              </tr>
              <tr> 
                <td>4分</td>
                <td><img src="images/tu.gif" width="<%=pp4%>%" height="10"></td>
                <td><%=Point4%></td>
              </tr>
              <tr> 
                <td>5分</td>
                <td><img src="images/tu.gif" width="<%=pp5%>%" height="10"></td>
                <td><%=Point5%></td>
              </tr>
              <tr align="center"> 
                <td colspan="3">共有 <%=people%> 人打分</td>
              </tr>
              <tr align="center"> 
                <td colspan="3">平均得分：<%=average%></td>
              </tr>
              <tr align="center"> 
                <form name="form1" method="post" action="vote.asp?id=<%=id%>">
                  <td colspan="3"> <select name="point" class="button" id="point">
                      <option value="0" selected>打分</option>
                      <option value="1">1分</option>
                      <option value="2">2分</option>
                      <option value="3">3分</option>
                      <option value="4">4分</option>
                      <option value="5">5分</option>
                    </select> <input name="Submit" type="submit" class="button" value="确定">
                  </td>
                </form>
              </tr>
              <tr> 
                <td height="12" colspan="3" align="center">[<font color="#FF0000">请客观打分</font>]</td>
              </tr>
            </table>
            <br>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="<%=SkinSetting(2)%>">
              <tr> 
                <td bgcolor="<%=SkinSetting(7)%>"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td height="18" align="center" class="dropshadow"><font color="<%=SkinSetting(6)%>"><strong>发 
                        表 评 论</strong></font></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td bgcolor="<%=SkinSetting(4)%>"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td height="5"></td>
                    </tr>
                    <tr><form name="form2" method="post" action="review_save.asp?id=<%=id%>">
                        <td height="20" align="center">
<textarea name="Content" cols="20" rows="4" id="Content" title="请填写评论内容"></textarea>
                          <br>
                          姓名
<input name="MyName" type="text" class="input" id="MyName" title="必填" value="<%=request.cookies("ydxz")("usr")%>" size="16">
                          <br>
                          <br>
                          <input name="Submit2" type="submit" class="button" value="提交">
                          &nbsp; 
                          <input name="Submit3" type="reset" class="button" value="重置">
                        </td>
                      </form>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <br>
          </td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="footer.asp"-->
</body>
</html>
<%set rs=nothing
conn.close
set conn=nothing %>