<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!-- #include file="inc/const_admin.asp" -->
<script language="javascript">
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
</script>
<!--#include file="z_home_const.asp"-->
<%
dim itemid,SQLHome,RSHome

'if not founduser then
'	response.end
'end if

itemid=checkstr(request("itemno"))
if not isnumeric(itemid) or isnull(itemid) or itemid="" then 
	itemid=23
elseif itemid<1 then 
	itemid=23
end if
set rshome=server.createobject("ADODB.Recordset")
sqlhome="select * from home_items where id="&itemid
rshome.open sqlhome,home_conn,1,1
if not rshome.eof then%>
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<title>虚拟家园物品 - <%=rshome("name")%></title>
	<!--#include file="inc/Forum_css.asp"-->
	</head>
	<SCRIPT language=JavaScript src="js/z_home_common.js"></SCRIPT>
	<SCRIPT language=javascript src="js/z_home_window.js"></SCRIPT>
	<SCRIPT language=javascript src="js/z_home_homeItemList.js"></SCRIPT>
	<SCRIPT language=JavaScript src="js/z_home_all.js"></SCRIPT>
	<SCRIPT language=JavaScript>var cookiePath="<%=dvbbs.cookiepath%>",isVip=<%=v_myVip%>,cartLength=<%=CartLength%>;</SCRIPT>
	<body style="MARGIN-LEFT:0px;MARGIN-TOP:0px;MARGIN-RIGHT:0px;MARGIN-BOTTOM:0px;">
	<%response.write "<table width=267 border=0 cellspacing=2 cellpadding=0>"
	response.write "<tr valign=middle>"
	response.write "<td rowspan=5 class=tablebody2 width=84 height=84>"
	if localpic=1 then
		response.write "<img src="""&PicPath&"0/"&right("0000"&rshome("id"),4)&".GIF"" border=1 "
	else
		response.write "<img src="""&PicPath&rshome("id")&"/00/00/"" border=1 "
	end if
	response.write "width=""84"" height=""84"" border=""0"" style=""CURSOR:help"">"
	response.write "</td>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;<b>"
	response.write rshome("name")
	response.write "</b></td>"
	response.write "</tr>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;"
	response.write "标　价："
	if rshome("price1")<=0 then
		response.write "<font color=red>免费</font>"
	else
		response.write rshome("price1")&" 元"
	end if
	response.write "</td>"
	response.write "</tr>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;"
	response.write "VIP 价："
	if rshome("price2")<=0 then
		response.write "<font color=red>免费</font>"
	else
		response.write "<font color=red>"&rshome("price2")&"</font> 元"
	end if
	response.write "</td>"
	response.write "</tr>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;"
	response.write "有效期："
	if rshome("period")<=0 then
		response.write "<font color=red>不限</font>"
	else
		response.write rshome("period")&" 天"
	end if
	response.write "</td>"
	response.write "</tr>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;"
 	response.write "库　存："
	if rshome("quantity")<=0 or isnull(rshome("quantity")) then
		response.write "<font color=red>断货</font>"
	else
		response.write rshome("quantity")&" 个"
	end if
	response.write "</td>"
	response.write "</tr>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20 align=center>"
	if rshome("vip") then
		response.write "<font color=red>VIP物品</font>"
	else
		response.write "普通物品"
	end if
	response.write "</td>"
	response.write "<td class=tablebody2 height=20>&nbsp;&nbsp;"
	response.write "限购者："
	select case rshome("flag")
	case 1
		response.write "所有会员"
	case 2
		response.write "<font color=red>版主以上</font>"
	case 3
		response.write "<font color=red>超级版主</font>"
	case 4
		response.write "<font color=red>管理员</font>"
	end select
	response.write "</td>"
	response.write "</tr>"
  response.write "<form name=form1_"&rshome("id")&" action=z_home_buy.asp method=get target=openScript><input type=hidden name=itemid value="&rshome("id")&"><input type=hidden name=fromuser value=""""></form>"
  response.write "<form name=form2_"&rshome("id")&" action=z_home_send.asp method=get target=openScript><input type=hidden name=itemid value="&rshome("id")&"><input type=hidden name=myself value=0><input type=hidden name=fromuser value=""""></form>"
	response.write "<tr valign=middle>"
	response.write "<td class=tablebody2 height=20 align=center>〖<b><font color=blue style=""cursor:hand"" alt=""打开购物车"" onclick=""javascript:openCart();"">购物车</font></b>〗</td>"
	response.write "<td class=tablebody2 height=20 align=center>〖"
	response.write "<b><font color=blue style=""cursor:hand"" alt=""购买"" onclick=""javascript:form1_"&rshome("id")&".fromuser.value='';openScript('about:blank',500,400);form1_"&rshome("id")&".submit()"">购买</font></b>"
 	response.write "〗&nbsp;&nbsp;〖"
	response.write "<b><font color=blue style=""cursor:hand"" alt=""赠送"" onclick=""javascript:form2_"&rshome("id")&".myself.value=0;form2_"&rshome("id")&".fromuser.value='';openScript('about:blank',500,400);form2_"&rshome("id")&".submit()"">赠送</font></b>"
	response.write "〗"
	response.write "</td>"
	response.write "</tr>"
	response.write "</table>"
else%>
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<title>该物品不存在</title>
	<!--#include file="inc/Forum_css.asp"-->
	</head>
	<body style="MARGIN-LEFT:0px;MARGIN-TOP:0px;MARGIN-RIGHT:0px;MARGIN-BOTTOM:0px;">
	<%response.write "<table width=267 border=0 cellspacing=2 cellpadding=0>"
	response.write "<tr>"
	response.write "<td rowspan=5 height=84 width=84 class=tablebody2>&nbsp;</td>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "<tr>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "<td class=tablebody2 height=20>&nbsp;</td>"
	response.write "</tr>"
	response.write "</table>"
end if
rshome.close
%>
</body>
</html>




