这是showuser4.asp 目前的代码,请高手修改下,谢谢!
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../KS_Data/KesionCMS5.mdb")
set rs=server.createobject("adodb.recordset")
%>
<%
name=request.form("Username")
atype=request.form("Email")
publishing=request.form("KS_about")
'sql1=""
sql="select * from KS_User"
if name <>"" then
sql= sql & "where name like '%"&Username&"%'"
end if
if atype <>"" then
sql= sql & "where name like '%"&name&"%' or type like '%"&Email&"%'"
end if
if publishing <>"" then
sql= sql & "where name like '%"&name&"%' or type like '%"&atype&"%' or publishing like '%"&KS_about&"%'"
end if
'response.write sql1
rs.open sql,conn,1,1
%>
<table width="900" border="2" cellspacing="0" cellpadding="0">
<tr>
<td width="41"> </td>
<td width="204"> </td>
<td width="655"> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="200" height="100" border="2">
<%do while not rs.eof%> <tr>
<td><%=rs("Username")%></td>
<td><%=rs("Email")%></td>
<td><%=rs("KS_about")%></td>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table>
</td>
<td><p> </p>
<p> </p>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../KS_Data/KesionCMS5.mdb")
set rs=server.createobject("adodb.recordset")
%>
<%
name=request.form("Username")
atype=request.form("ProductName")
publishing=request.form("AddDate")
'sql1=""
sql="select * from KS_EnterprisePro"
if name <>"" then
sql= sql & "where name like '%"&Username&"%'"
end if
if atype <>"" then
sql= sql & "where name like '%"&name&"%' or type like '%"&ProductName&"%'"
end if
if publishing <>"" then
sql= sql & "where name like '%"&name&"%' or type like '%"&atype&"%' or publishing like '%"&AddDate&"%'"
end if
'response.write sql1
rs.open sql,conn,1,1
%>
<table width="900" border="2" cellspacing="0" cellpadding="0">
<tr>
<td width="41"> </td>
<td width="204"> </td>
<td width="655"> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="200" height="100" border="2">
<%do while not rs.eof%> <tr>
<td><%=rs("Username")%></td>
<td><%=rs("ProductName")%></td>
<td><%=rs("AddDate")%></td>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table>
</td>
<td><p> </p>
<p> </p>
<p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>