<%@ LANGUAGE = VBScript CodePage = 936 LCID=2052%>
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
act=request("act")
if act="add" then 
   company=request("company")
   name=request("name")
   tel=request("tel")
   fax=request("fax")
   email=request("email")
   title=request("title")
   introduce=request("introduce")
   
   sql="select * from book"
   res.open sql,con,1,3
   res.addnew
   res("company")=company
   res("name")=name
   res("tel")=tel
   res("fax")=fax
   res("email")=email
   res("title")=title
   res("introduce")=introduce
   res.update
   response.write "<script language=javascript>alert('留言成功！');window.location='book.asp';</script>"
   res.close
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=web_name%></title>
<title></title><link rel="stylesheet" href="image/style.css" type="text/css">
<script language=javascript>

function check()

{

    if(document.myform.name.value==""){
    alert("联系人不能为空!");
    myform.name.focus();
    return false;
    }
    if(document.myform.tel.value==""){
    alert("联系电话不能为空!");
    myform.tel.focus();
    return false;
    }
    if(document.myform.title.value==""){
    alert("主题不能为空");
    myform.title.focus();
    return false;
    }
    if(document.myform.introduce.value==""){
    alert("详细内容不能为空");
    myform.introduce.focus();
    return false;
    }

}

</script>

<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#000000" link="#000000" vlink="#000000" alink="#000000" >
 
<table width="780" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align="center" height="469">
  <tr valign="top">
    <td height="469">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="199" valign="top" bgcolor="#F3F3F3" background="images/ax2.jpg">
            <table width="99%" border="0" cellspacing="0" cellpadding="0" height="308">
              <tr valign="top">
                <td height="29"><img src="img/bar1.jpg" width="199" height="34" border="0"></td>
              </tr>
              <tr>
                <td height="8"></td>
              </tr>
              <tr valign="top">
                <td height="26"><table border="0" width="100%" cellpadding="0" cellspacing="0" height="103">
                    <tr>
                      <td width="100%" height="103" align="left">
                        <p align="left" style="line-height: 150%">
                          <%
            sql="select * from class"
            res.Open sql,con,1,1 
            if res.eof or res.bof then
               response.write  "no products class here！<br>"
            else
               do while not res.eof
               Response.Write("&nbsp;&nbsp;&nbsp;")
               Response.Write("<a href=product.asp?Sort_ID="&res("Sort_ID")&">")
               Response.Write(""&res("sort")&"</a><br>")
               res.movenext
               loop
            end if
			res.close
           %>
                                  </td>
                    </tr>
                </table></td>
              </tr>
              <tr valign="top">
                <td height="8"><img src="img/bar4.jpg" width="199" height="14"></td>
              </tr>
              <tr>
                <td height="31"><img src="img/bar2.jpg" width="199" height="34" border="0"></td>
              </tr>
              <tr valign="top">
                <td>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>
                        <p align="center">
                        <form action="Product.asp" method=post name="myform">
                          <div align=center>
                            <center>
                              <table border=0 cellpadding=0 cellspacing=0 height=87 
                        width="180">
                                <!--DWLayoutTable-->
                                <tbody>
                                  <tr valign=bottom>
                                    <td align=right height=25 width=69>
                                      <div align=center><font color=#000000>分类:</font></div></td>
                                    <td width=180>
                                      <div align=left>
                                        <select name="sort_id" size="1">
                                          <option selected>选择分类</option>
                                          <% sql="select * from class"
										   res.open sql,con,1,1
										   do while not res.eof
										%>
                                          <option value="<%=res("sort_id")%>"><%=res("sort")%></option>
                                          <% res.movenext
										   loop
										   res.close
										%>
                                        </select>
                                    </div></td>
                                  </tr>
                                  <tr valign=bottom>
                                    <td align=right height=31 width="69">
                                      <div align=center><font color=#000000>关键:</font></div></td>
                                    <td width="180">
                                      <div align=left><font color=#000000>
                                        <input name=keyword type=text id="keyword" size=12 maxlength=50 value="关键词">
                                    </font></div></td>
                                  </tr>
                                  <tr>
                                    <td align=right width="69"></td>
                                    <td width="148"><input name=B1 type=submit value="搜 索"></td>
                                  </tr>
                                </tbody>
                              </table>
                            </center>
                          </div>
                      </form></td>
                    </tr>
                </table></td>
              </tr>
              <tr valign="top">
                <td><img src="img/bar4.jpg" width="199" height="14"></td>
              </tr>
              <tr valign="top">
                <td height="39"><table border="0" width="100%" cellpadding="0" cellspacing="0" height="243">
                  <tr valign="top">
                    <td height="29"><img src="img/bar3.jpg" width="199" height="34" border="0"></td>
                  </tr>
                  <tr>
                    <td height="8"></td>
                  </tr>
                  <tr>
                    <td width="100%" height="200" valign="top"><div align="center">
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="190" height="190">
                          <param name="movie" value="ballot.swf">
                          <param name="quality" value="high">
                          <param name="menu" value="false">
                          <!--隐藏flash的右键菜单-->
                          <param name="wmode" value="transparent">
                          <!-设置flash为透明底-->
                          <embed src="ballot.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="190" height="190"></embed>
                        </object>
                    </div></td>
                  </tr>
                  <tr>
                    <td height="14" valign="top"><img src="img/bar4.jpg" width="199" height="14"></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          <td valign="top" bgcolor="#FFFFFF">
            <table width="579" border="0" cellspacing="0" cellpadding="0" align="center" height="99">
              <tr>
                <td height="20"><img src="img/bg1.jpg" width="579" height="56"></td>
              </tr>
              <tr>
                <td height="20"><img src="img/address.jpg" width="579" height="50"></td>
              </tr>
              <tr>
                <td height="30" background="images/ax4.jpg"></td>
              </tr>
            </table>
            <table width="579" border="0" cellspacing="0" cellpadding="0" align="center" height="1">
              <tr>
                <td height="1">
                  <div align="center">
                    <center>
                      <table border="0" cellpadding="0" cellspacing="0" width="100%" height="439">
                        <tr>
                          <td height="304" valign="top" background="images/ax4.jpg">
                            <table border="0" cellpadding="0" cellspacing="0" width="100%" height="451">
                              <tr>
                                <TD width=577 vAlign=top background="images/ax4.jpg"><TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="90%">
                                    <form action="book.asp" method="post" name="myform" onsubmit="return check();">
                                      <input type="hidden" name="act" value="add">
                                      <TBODY>
                                        <TR>
                                          <TD width="100%">
                                            <DIV align=center>
                                              <TABLE align=center border=0 cellPadding=0 cellSpacing=3 
                        height=79 width="100%">
                                                <TBODY>
                                                  <TR>
                                                    <TD align=right height=25 width="23%">公司名称：</TD>
                                                    <TD height=-6 width="77%"><FONT size=+0>
                                                      <INPUT name=company class=smallInput id="company" style="FONT-SIZE: 14px" size=30 maxLength=36>
                                                    </FONT></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=25>联系人：</TD>
                                                    <TD height=-2 width="77%"><FONT size=+0>
                                                      <INPUT name=name 
                              class=smallInput id="name" 
                              style="FONT-SIZE: 14px" size=12 maxLength=30>
                                                    </FONT></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=25>联系电话：</TD>
                                                    <TD height=-1 width="77%"><FONT size=+0>
                                                      <INPUT name=tel 
                              class=smallInput id="tel" 
                              style="FONT-SIZE: 14px" size=24 maxLength=36>
                                                    </FONT></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=25>联系传真：</TD>
                                                    <TD height=11 width="77%"><FONT size=+0>
                                                      <INPUT name=fax 
                              class=smallInput id="fax" 
                              style="FONT-SIZE: 14px" size=18 maxLength=36>
                                                    </FONT></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=25>电子邮件：</TD>
                                                    <TD height=11 width="77%"><FONT size=+0>
                                                      <INPUT 
                              class=smallInput maxLength=36 name=Email size=18 
                              style="FONT-SIZE: 14px">
                                                    </FONT></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=25 width="23%">主题： </TD>
                                                    <TD height=25 width="77%"><INPUT name=Title class=smallInput style="FONT-SIZE: 14px" value="<%if request("title")<>"" then response.write "订购："&request("title")%>" size=42 maxLength=36></TD>
                                                  </TR>
                                                  <TR>
                                                    <TD align=right height=1 vAlign=top 
                              width="23%">内容： </TD>
                                                    <TD height=1 vAlign=top width="77%"><TEXTAREA name=introduce cols=45 rows=10 class=smallInput id="introduce" style="FONT-SIZE: 14px"></TEXTAREA>
                                                    </TD>
                                                  </TR>
                                                  <TR>
                                                    <TD height=0 vAlign=top width="23%"></TD>
                                                    <TD height=0 vAlign=top width="77%"><INPUT name=cmdOk type=submit value=提交留言>
                                                        <INPUT name=cmdReset type=reset value=重写>
                                                    </TD>
                                                  </TR>
                                                </TBODY>
                                              </TABLE>
                                          </DIV></TD>
                                        </TR>
                                      </TBODY>
                                    </form>
                                </TABLE></TD>
                              </tr>
                            </table>
                          <p style="line-height: 200%">&nbsp;</p></td>
                        </tr>
                      </table>
                    </center>
                </div></td>
              </tr>
            </table>
            <table width="579" border="0" cellspacing="0" cellpadding="0" align="center" height="20">
              <tr>
                <td height="20"><img src="images/ax6.jpg" width="579" height="31"></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>

<!--#include file="foot.asp"-->
<% con.close
   set con=nothing
%>