<!--#include file="conn.asp"-->
<%
dim action
action = request.QueryString("action")

if action = "submit" then call submitly()		'提交留言信息

dim userId
userId = request.QueryString("id")
if userId = "" or isnumeric(userId) = false then call wrong("参数发生错误！")

sql = "select * from member where id  = "& userId &""
rs.open sql,conn,1,1
if rs.eof then call wrong("未找到此评估师！")

dim info(12)
info(0) = rs("gsinfo")			'公司简介
if rs("gsimg") = "" then		'公司图片
	info(1) = "images/nogsimg.jpg"
else
	info(1) = rs("gsimg")		
end if
		

if rs("pgimg") = "nothing" then		'评估师头像
	info(2) = "images/morepgs/notouimg.jpg"
else
	info(2) = rs("pgimg")
end if

info(3) = rs("name")
info(4) = rs("gsfex")
info(5) = rs("gsname")
info(6) = rs("gsmobil")
info(7) = rs("pgxj")				'评估师星级
info(8) = rs("gslianxi")			'联系方式
info(9) = rs("pgAllCarId")			'所有评估过的车辆
info(10)= rs("gstel")				'公司电话
rs.close
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>资深评估团</title>
<link href="css/comm.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="inc/showo_page.js"></script>
</head>

<body>
<div class="bodyDiv">
<!--#include file="model_top.asp"-->
<div><!--#include file="model_daohang.asp"--></div>
 <table width="100%" height="176" border="0" cellpadding="0" cellspacing="0" background="images/morepgs/2008-1-16-001.jpg">
      <tr>
        <td><p>&nbsp;</p>
          <table width="100%" height="240" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="6%" valign="top">&nbsp;</td>
            <td width="89%" valign="top" bgcolor="#FFFFFF">
			<table width="100%" height="125" border="0" cellpadding="0" cellspacing="0" style="margin-left:10px;">
          <tr>
            <td valign="top">
            <div style="line-height:30px;">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td valign="top"><img src="images/morepgs/2008-1-16-005.jpg" width="593" height="63" style="margin-top:10px;" /></td>
                </tr>
              </table>
            </div>
            
            <table width="100%" border="0" cellspacing="1" cellpadding="3" style="color:#696969;">
              <tr>
                <td width="17%" rowspan="5" valign="top"><img src="<%=info(2)%>" width="94" height="115" style="border:solid 3px #F0F0F0; padding:2px;" /></td>
                <td width="12%" align="center" bgcolor="#EBEBEB"><div style="width:80px;">评&nbsp;估&nbsp;师：</div></td>
                <td width="29%" bgcolor="#F9F9F9"><div style="width:250px;"><%=info(3)%></div></td>
                <td width="8%" align="center" bgcolor="#EBEBEB"><div style="width:50px;" >电话：</div></td>
                <td width="34%" bgcolor="#F9F9F9"><%=info(10)%></td>
              </tr>
              <tr>
                <td align="center" bgcolor="#EBEBEB">公司名称：</td>
                <td bgcolor="#F9F9F9"><%=info(5)%></td>
                <td align="center" bgcolor="#EBEBEB">手机：</td>
                <td bgcolor="#F9F9F9"><%=info(6)%></td>
              </tr>
              <tr>
                <td align="center" bgcolor="#EBEBEB">评&nbsp;估&nbsp;量：				  </td>
                <td bgcolor="#F9F9F9"><%
				dim t
				t = split(info(9)&"","|")
				response.write ubound(t) + 1 + 120	'此处120为初始值
				%></td>
                <td align="center" bgcolor="#EBEBEB">传真：</td>
                <td bgcolor="#F9F9F9"><%=info(4)%></td>
              </tr>
              <tr>
                <td align="center" bgcolor="#EBEBEB">星&nbsp;&nbsp;&nbsp;&nbsp;级：</td>
                <td bgcolor="#F9F9F9"><%
			if info(7)<>"" then
			for i = 1 to info(7)
				response.write "<img src='images/xing1.gif' />"
			next
			
			for i = 1 to 5 - cint(info(7))
				response.write "<img src='images/xing2.gif' />"
			next
		  else
		  	response.write "暂无"
		  end if%></td>
                <td align="center" bgcolor="#EBEBEB">地址：<a href="#" target="_blank"></a></td>
                <td bgcolor="#F9F9F9" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"><%=info(8)%></td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="#F9F9F9"><a href="#comjianjie"><img src="images/morepgs/gongsi.jpg" width="102" height="24" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cheyuan"><img src="images/morepgs/cheyuan.jpg" width="102" height="24" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#cheyuan"><img src="images/morepgs/liuyan.jpg" width="102" height="24" border="0" /></a></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="15"><p><img src="images/search2.jpg" width="695" height="3" /></p>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height=1 colspan="2" background="images/dot2.jpg"></td>
  </tr>
  <tr>
    <td height="47" colspan="2"><img src="images/morepgs/00001.jpg" width="102" height="31" /><a name="comjianjie" id="comjianjie"></a></td>
  </tr>
  <tr>
    <td width="65%" height="164" valign="top">
	<div style="line-height:180%;padding:5px 10px 5px 0; height:214px; width:510px; overflow-y:scroll;"><%=info(0)%></div></td>
    <td width="35%" align="center" valign="top"><img src="<%=info(1)%>" width="250" style="border:solid 1px #CCCCCC; padding:2px;" /></td>
  </tr>
  <tr>
    <td colspan="2" style="border-bottom:dotted 1px #999999;">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%" height="100" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td valign="top" style="border-right:dotted 1px #999999;">
		<div style="margin-top:10px;">
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/morepgs/00002.jpg" width="102" height="31" /><a name="cheyuan" id="cheyuan"></a></td>
          </tr>
          <tr>
            <td>
			<%
			dim page, page_size
			page = request.QueryString("page")
			if page="" or isnumeric(page)=false then page=1
			page_size = 4		'每页数据量
			
			prm = "id="& userId &"&"
			
			set rs_cheyuan = server.CreateObject("adodb.recordset")
			sql_cheyuan = "select * from product where userId = "& userId &""
			rs_cheyuan.open sql_cheyuan,conn,1,1
			
			if not rs_cheyuan.eof then
				have = 1
				rs_cheyuan.pagesize     = page_size
				rs_cheyuan.absolutePage = page
				recordCountNum  = rs_cheyuan.recordcount
			else
				have = 0
			end if

			i = 1
			do while not rs_cheyuan.eof and i <= page_size
			if rs_cheyuan("smallImg") = "nothing" then
				tmpimg = "img/car1.gif"
			else
				tmpimg = rs_cheyuan("smallImg")
			end if
			%>
			<br />
			<table width="100%" border="0" cellspacing="1" cellpadding="0" style="color:#696969;">
              <tr>
                <td width="37%" rowspan="4"><a href="view2Car.asp?id=<%=rs_cheyuan("id")%>" target="_blank"><img src="<%=tmpimg%>" width="138" height="74" alt="" style="border:solid 3px #EFEFEF;" /></a></td>
                <td width="63%" bgcolor="#F9F9F9">车型：<%=exportpinp(rs_cheyuan("productSort"),"xinghao")%></td>
              </tr>
              <tr>
                <td bgcolor="#F9F9F9">年份：<%=rs_cheyuan("caryear")%></td>
              </tr>
              <tr>
                <td bgcolor="#F9F9F9">价格：<%=rs_cheyuan("memberprice")&"元"%></td>
              </tr>
              <tr>
                <td bgcolor="#F9F9F9">地点：<%=rs_cheyuan("provice_shi")%></td>
              </tr>
            </table>
			<%
			i = i + 1
			rs_cheyuan.movenext
			loop
			rs_cheyuan.close
			set rs_cheyuan = nothing
			%>
			<%if have = 1 then%>
			<div><Script Language="JavaScript">
ShowoPage("<table style='BORDER-COLLAPSE: collapse' borderColor='#111111' height='10' cellSpacing='0' cellPadding='0' width='95%' border='0'><tr><td vAlign='bottom'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","</td></tr></table>","页次:<font color='red'>","</font>/","","&nbsp;","&nbsp;每页<font color='red'>","</font>&nbsp;","&nbsp;共计:<font color='red'>","</font></td><td vAlign='bottom' align='right'  style='font-family: Verdana,宋体; font-size: 11.5px; line-height: 15px'>","<font face=webdings>9</font>","<font face=webdings>7</font>","<font face=webdings>8</font>","<font face=webdings>:</font>","&nbsp;&nbsp;跳转:","<font color='orange'>[","]</font>","","","<font color='red'>","</font>","","",<%=recordCountNum%>,<%=page_size%>,2,"?p=parm1&<%=prm%>")
</Script></div>
			<%end if%>
			</td>
          </tr>
          
        </table>
		</div>
		</td>
        <td background="images/dot.jpg" width=1></td>
        <td width="300" valign="top">
<div style="margin:10px 0 0 10px;">
		<div align="left"><img src="images/morepgs/00003.jpg" width="102" height="31" /></div>
		<div>
		  <table width="100%" border="0" cellspacing="0" cellpadding="5">
		  <form name="form22" id="form22" action="?action=submit" method="post">
            <tr>
              <td><font color="#FF0000">*</font>您的姓名：<input name="name1" type="text" id="name1" style="background-color:#F7F7F7; border:solid 1px #7D85A2; width:82px;" /></td>
              </tr>
            <tr>
              <td><font color="#FF0000">*</font>留言内容：</td>
            </tr>
            <tr>
              <td><textarea name="content" cols="35" rows="7" id="content" style="border:solid 1px #7F9DB9;"></textarea></td>
            </tr>
            <tr>
              <td align="center"><input type="image" src="images/2008-1-121722.jpg" name="Submit2" value="提交" />&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/2008-1-121721.jpg" width="60" height="22" />
                <input name="userId" type="hidden" id="userId" value="<%=userId%>" /></td>
            </tr>
			</form>
          </table>
		</div>
		<div>
		  <table width="100%" border="0" cellspacing="0" cellpadding="5">
            <%
			set rs_pgsly = server.CreateObject("adodb.recordset")
			sql_pgsly = "select top 5 * from pgsLiuYan where userId = "& userId &""
			rs_pgsly.open sql_pgsly,conn,1,1
			num_pgsly = 1
			do while not rs_pgsly.eof
			%>
			<tr>
              <td><%=num_pgsly&"·"& left(clearHTML(rs_pgsly("youkeContent")),17)%></td>
            </tr>
            <%
			num_pgsly = num_pgsly + 1
			rs_pgsly.movenext
			loop
			rs_pgsly.close
			set rs_pgsly =nothing
			%>
          </table>
		</div>
</div>
		</td>
      </tr>
    </table></td>
  </tr>
</table></td>
          </tr>
        </table></td>
            <td width="5%" valign="top">&nbsp;</td>
          </tr>
        </table>
        
	    </td>
      </tr>
  </table>
<!--#include file="model_bottom.asp"-->
</div>
</body>
</html>
<%
'========================================
'功能：去除所有HTML
function clearHTML(aa)
	if aa = "" then
		clearHTML = ""
	else
		aa = replace(aa," ","")
		aa = replace(aa,"<br>","")
		aa = replace(aa,"<br />","")
		aa = replace(aa,"&nbsp;","")
		clearHTML = aa
	end if
end function

'========================================
'功能：提交留言
function submitly()
	dim tmp(2)
	tmp(0) = trim(request.Form("name1"))
	tmp(1) = replace(replace(request.Form("content")&""," ","&nbsp;"),vbcrlf,"<br />")
	tmp(2) = request.Form("userId")
	conn.execute("insert into pgsLiuYan([userId],[youkeName],[youkeContent],[shijian]) values("& tmp(2) &",'"& tmp(0) &"','"& tmp(1) &"',#"& now() &"#)")
	response.Redirect("viewpgs.asp?id="& tmp(2) &"")
end function
%>