<!-- #include file="setup.asp" -->
<%
if Request.Cookies("username")=empty then ERROR2("您还未登录社区，不能参观别人的爱车！")
if conn.execute("select money from [user] where username='"&Request("username")&"'")(0)>5000 then error2("对不起，你不能盗窃拥有5000以上酷币家庭的汽车！")
car=Request.QueryString ("car")
username1=Request("username")
select case car
case "1"
name="法拉利575M Maranello"
price=5000
info="法拉利575M Maranello能够成为世界上最好的轿车之一，V-12发动机是主要原因。而从1998年开始，法拉利就立志脚踏实地对其进行改进，采用最新实用的技术，成就了如今的575M Maranello，其中575代表着发动机排量从5.5升增加到5.75升。"
case "2"
name="法拉利360Modena"
price=8000
info="360 Modena采用1965年面视的Dinoberlinxtta车款为蓝本，塑造出宽大平扁的车头线条，并加入了玻璃引擎舱盖设计，标榜出“法拉利”的传统技术精华。"
case "3"
name="法拉利Enzo"
price=12000
info="时至2002年，“Enzo Ferrari”出现了，这是对终极性能概念的完整表达，将世界上最先进的F1赛车技术概念贯穿于整个街道量产车的开发中去，法拉利是唯一的。这亦是“Enzo Ferrari”独有的优势，法拉利拥有3次世界F1制"
case "4"
name="法拉利360Spider"
price=15000
info="去年于日内瓦车展面世的法拉利新一代车型360Modena，轰动地向世界表明了法拉利的技术实力。"
case "5"
name="阿尔法-罗米欧166"
price=20000
info="Alfa Romeo旗舰具备许多超凡品质：出色的安全性、优雅、舒适，并具有不负Alfa盛名的性能。最重要的是所有这些都保证使驾驶变得轻松、愉快。"
case "6"
name="阿尔法-罗米欧Gtv"
price=30000
info="Alfa Romeo的系列展示最后推出的是一种具有特色鲜明、马力强劲、高舒适度和在任何驾驶环境中具有超群的动态性能的车型：Alfa Gtv"
case "7"
name="阿尔法.罗米欧147"
price=50000
info="阿尔法147不同于以往的阿尔法车系，它是辆外形漂亮、充满朝气的溜背式轿车。它的定位是为那些苦苦寻找一种紧凑、充满运动感且外形具有活力的轿车的人士设计的。"
case "8"
name="玛莎拉蒂3200GT"
price=80000
info="全新一代的玛莎拉蒂3200GT轿跑车，劲力泉源来自一台全新制作，排放量达3.2公升，气缸排列角度成90度角的V8涡轮增压发动机。"
case "9"
name="玛莎拉蒂spyder"
price=100000
info="玛莎拉蒂SPYDER为典型的敞篷跑车造型，其优美的车身线条出自名家乔治亚罗之手，椭圆形的前大灯、半张口的进气格栅、圆滑利落的发动机盖及收敛的车身腰部，给人要向前冲的感觉！"
case "10"
name="保时捷911Turbo_Coupe"
price=200000
info="保时捷911Turbo_Coupe,可选配带大玻璃车顶且车顶和后窗可以分别开启.新增加的加价供应的大显示屏幕通信中心."
case "11"
name="保时捷 Boxster"
price=500000
info="采用了可变式进气凸轮轴,发动机功率提高了8马力,而且更省油也更清洁!"

end select 
select case Request("menu")

case "xiuxi"
            

 if Request.Cookies("username")<>Request("username") and Request.Cookies("username")<>Request("consort") then error2("你眼花了吧，这不是你的车！")
if conn.execute("select money from [user] where username='"&Request.Cookies("username")&"'")(0)<500 then error2("驾车出游经费不能少于500！")
 if Request.Cookies("username")=Request("username") then conn.execute("update [user] set [money]=money-100,userlife=100 where username='"&Request("username")&"'")
if Request.Cookies("username")=Request("username") then conn.execute("update [user] set [experience]=experience+2,userlife=100 where username='"&Request("username")&"'")
if Request.Cookies("username")=Request("username") then conn.execute("update [user] set [magicpower]=magicpower+10,userlife=100 where username='"&Request("username")&"'")
%>
<script language="vbscript">
			msgbox"驾车出游了一次，增加了2点经验、10点魅力值，社区金币少100元！",0,"社区提示"
			history.back
			</script>
<% 
			 
case "daoqie"
if Request.Cookies("username")=Request("username") or Request.Cookies("username")=Request("consort") then error2("你疯了，连自己的车也偷！")
	            
if conn.execute("select userlife from [user] where username='"&Request.Cookies("username")&"'")(0)<50 then error2("体力还不足50，不能进行盗窃！")
if conn.execute("select money from [user] where username='"&Request.Cookies("username")&"'")(0)<0 then error2("金钱为负，盗窃经费不足！")
Randomize
d1=rnd*10+Request("car")
if d1>1 and d1<7 then 
sql="select money from [user] where username='"&Request("username")&"'"
rs.Open sql,Conn,1,3
money1=rs("money")
rs("money")=0
rs.update
rs.close

sql1="select money from [user] where username='"&Request.Cookies("username")&"'"
rs.Open sql1,Conn,1,3
rs("money")=rs("money")+money1
rs.update
rs.close
%>
<script language="vbscript">
			msgbox"入车盗窃成功，偷到了<%=money1%>元！",0,"社区提示"
			history.back
</script><% 
			  
end if

if d1>7 and d1<15 then
conn.execute("update [user] set userlife=20 where username='"&Request.Cookies("username")&"'")
%>
<script language="vbscript">
			msgbox"盗窃时恰好被车主看见，你仓皇逃跑，体力减少为20！",0,"社区提示"
			history.back
</script>

<%
end if
if d1>15 then
sql="select money,userlife from [user] where username='"&Request.Cookies("username")&"'"
rs.Open sql,Conn,1,3
money2=rs("money")
rs("money")=0
rs("userlife")=0
rs.update
rs.close
sql1="select money from [user] where username='"&Request("username")&"'"
rs.Open sql1,Conn,1,3
rs("money")=rs("money")+money2
rs.update
rs.close
%>
<script language="vbscript">
			msgbox"盗窃时被巡警抓住，挨了顿打后体力降为0，身上的钱也全被没收了！",0,"社区提示"
			history.back
</script>
<% end if
       end select
%>
<HTML>
<HEAD>
<title>汽车详情</title>
<script Language="JavaScript">
//***********默认设置定义.*********************
tPopWait=0;//停留tWait豪秒后显示提示。
tPopShow=7000;//显示tShow豪秒后关闭提示
showPopStep=35;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: #ffffff;color:#333399; border: 1px #3366ff solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' ' style='position:absolute;z-index:1000;' class='cPopText'></div>");


function showPopupText(){
var o=event.srcElement;
MouseX=event.x;
MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
if(o.dypop!=sPop) {
sPop=o.dypop;
clearTimeout(curShow);
clearTimeout(tFadeOut);
clearTimeout(tFadeIn);
clearTimeout(tFadeWaiting); 
if(sPop==null || sPop=="") {
dypopLayer.innerHTML="";
dypopLayer.style.filter="Alpha()";
dypopLayer.filters.Alpha.opacity=0; 
}
else {
if(o.dyclass!=null) popStyle=o.dyclass 
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}

}
}

function showIt(){
dypopLayer.className=popStyle;
dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;
popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";
fadeOut();
}

function fadeOut(){
if(dypopLayer.filters.Alpha.opacity<popOpacity) {
dypopLayer.filters.Alpha.opacity+=showPopStep;
tFadeOut=setTimeout("fadeOut()",1);
}
else {
dypopLayer.filters.Alpha.opacity=popOpacity;
tFadeWaiting=setTimeout("fadeIn()",tPopShow);
}
}

function fadeIn(){
if(dypopLayer.filters.Alpha.opacity>0) {
dypopLayer.filters.Alpha.opacity-=1;
tFadeIn=setTimeout("fadeIn()",1);
}
}
document.onmouseover=showPopupText;

function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked; 
}
}
</script>
<link href="images/skins/<%=Request.Cookies("skins")%>/bbs.css" rel="stylesheet">
</HEAD>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="280" border="0" cellspacing="0" cellpadding="0" height="226" background="images/car/b<%=car%>.jpg" title="<%=info%>" align="center">
  <tr> 
    <td align="center"  valign="bottom">	
	<table border="0" cellspacing="3" cellpadding="3" align="center">
  <tr>
<%

sql="select userface,consort from [user] where username='"&username1&"'"
rs.Open sql,Conn
    Response.Write"<td align=center><img height=80 width=80 border=0 title=有空欢迎来试驾！ src='"&rs("userface")&"'><br>"&username1&"</td>"
if rs("consort")<>empty then 
Response.Write"<td align=center><img height=80 title=欢迎参观我家的爱车！  border=0 src='"&conn.execute("select userface from user where username='"&rs("consort")&"'")(0)&"'><br>"&rs("consort")&"</td>"
Response.Write"<td align=right valign=bottom><form method=POST action=?menu=xiuxi&username="&username1&"&consort="&rs("consort")&"><input type=submit title=难得偷闲，出外旅游一下！ value=驾车出游 name=submit class=input></form><form method=POST action=?menu=daoqie&car="&car&"&username="&username1&"&consort="&rs("consort")&"><input type=submit title=这车里好象没人，看看里面有什么值钱的东西！ value=入车盗窃 name=submit class=input></form></td>"
else
Response.Write"<td align=right valign=bottom><form method=POST action=?menu=xiuxi&username="&username1&"><input type=submit title=难得偷闲，出外旅游一下！！ value=驾车出游 name=submit class=input></form><form method=POST action=?menu=daoqie&car="&car&"&username="&username1&"><input type=submit title=这车里好象没人，看看里面有什么值钱的东西！ value=入车盗窃 name=submit class=input></form></td>"
end if
rs.close
set rs=nothing

 %>
</tr>
</table>
	</td>  </tr>
</table>

<table width="280" border="0" cellspacing="1" cellpadding="0" height="20" align="center" class=a2 >
<tr class=a4>
     <td width="140"  align="center">汽车名称：<%=name%></font></td>
	<td  align="center" width="140">价格：<font color="#FF3300"><%=price%></font>元</td>
  </tr>

</table>
</body>
</HTML>

