设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 55|回复: 1
打印 上一主题 下一主题

高手看一下啊!帮忙修改一下!!拜谢!!!

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-19 00:18:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我做了个家教管理系统,是软件作业。但登陆和搜索有问题。我不知道怎么办?请高手看一下啊!帮忙修改一下!!拜谢!!!
这个是搜索页
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from bigxm order by bigxm_id asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("bigxm_name"))%>","<%= trim(rs("smallxm_id"))%>","<%= trim(rs("bigxm_id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.bigxm_id.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.bigxm_id.options[document.myform.bigxm_id.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
<form method="post" name="myform" action="ru_query.asp">
<div align="left">
<table width="376" border="0" align="center">
<tr valign="middle" bgcolor="#C1E0FF">
<td width="68"><div align="center">学&nbsp;&nbsp;&nbsp;&nbsp;科:</div></td>
<td width="145"><div align="left">
<select name="bigxm_id" onChange="changelocation(document.myform.smallxm_id.options[document.myform.smallxm_id.selectedIndex].value)" size="1">
<option selected value="">未指定条件</option>
<%

sql = "select * from bigxm"
rs.open sql,conn,1,1
do while not rs.eof
%>
<option value="<%=trim(rs("bigxm_id"))%>"><%=trim(rs("bigxm_name"))%> </option>
<%
rs.movenext
loop
rs.close
%>
</select>
</div></td>
<td width="66"><div align="center">高&nbsp;&nbsp;&nbsp;&nbsp;校:</div></td>
<td width="79"><div align="left">
<select name="action" size="1" class="smallinput" >
<option value="nmt" selected>不限</option>
<option value="xy1">西北工业大学</option>
<option value="xy2">西安交通大学</option>
<option value="xy3">西北大学</option>
<option value="xy4">西安电子科技大学</option>
<option value="xy5">陕西师范大学</option>
<option value="xy6">西安外国语学院</option>
<option value="xy7">西安理工大学</option>
<option value="xy8">长安大学</option>
<option value="xy9">西安建筑科技大学</option>
<option value="xy10">西安石油大学</option>
<option value="xy11">西安科技大学</option>
<option value="xy12">西北政法大学</option>
<option value="xy13">西安工程科技学院</option>
<option value="xy14">西安工业学院</option>
<option value="xy15">西安培华大学</option>
<option value="xy16">西安财经学院</option>
<option value="xy17">西安美术学院</option>
<option value="xy18">其它</option>
</select>
</div></td>
</tr>
<tr valign="middle" bgcolor="#84C3FF">
<td><div align="center">教学区域:</div></td>
<td><div align="left">
<select name="select" size="1" class="smallinput" >
<option value="nomt">不限</option>
<option value="bl" selected>碑林区</option>
<option value="lh">莲湖区</option>
<option value="xc">新城区</option>
<option value="wy">未央区</option>
<option value="yt">雁塔区</option>
<option value="bq">灞桥区</option>
<option value="ca">长安区</option>
</select>
</div></td>
<td><div align="center">搜索分类:</div></td>
<td><div align="left">
<select name="action" size="1" class="smallinput" >
<option value="title" selected>教师姓名</option>
<option value="content">个人简介</option>
<option value="writer">收费标准</option></select>
</div></td>
</tr>
<tr valign="middle" bgcolor="#C1E0FF">
<td><div align="center">性&nbsp;&nbsp;&nbsp;&nbsp;别:</div></td>
<td><div align="left">
<select name="action" size="1" class="smallinput" >
<option value="nomatter" selected>不限</option>
<option value="man">男</option>
<option value="women">女</option></select>
</div></td>
<td><div align="center">年&nbsp;&nbsp;&nbsp;&nbsp;龄:</div></td>
<td><div align="left">
<select name="select2" size="1" class="smallinput" >
<option value="nomatter" selected>不限</option>
<option value="18">18-20</option>
<option value="25">21-25</option>
<option value="30">26-30</option>
<option value="50">31-50</option>
<option value="51">51以上..</option>
</select>
</div></td>
</tr>
<tr valign="middle" bgcolor="84C3FF">
<td height="23" bgcolor="#84C3FF"><div align="center">教师搜索:</div></td>
<td bgcolor="#84C3FF"><div align="left">
<input type="text" name="keyword" class="button" size=20 value="关键字" maxlength="50" onClick=Javascript:this.value='';>
</div></td>
<td colspan="2" bgcolor="#84C3FF"><div align="left">
<input type="submit" name="Submit" value="搜索" class="anniu">
</div></td>
</tr>
</table>
</div>
<div align="right"></div>
</form>
搜索页二
<!--#include file="inc/a.asp"-->
<!--#include file="format.asp"-->
<%
dim keyword
dim sql
dim findword
dim rs
keyword=request("keyword")
if keyword="" then
Response.Write ("<script language='JavaScript'>alert('请输入查询信息')</script>")
else
keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")," ","&nbsp;")
if request("action")="title" then
findword="teacher_name like '%"&keyword&"%' "
elseif request("action")="content" then
findword="content like '%"&keyword&"%' "
elseif request("action")="writer" then
findword="writer like '%"&keyword&"%' "
else
findword="title like '%"&keyword&"%' "
end if
end if
set rs=server.createobject("adodb.recordset")
dim a,b
dim c,d
if request("bigxm_id")="" then
a=""
c="所有分类"
else
b="bigxm_id="&cstr(request("bigxm_id"))&" "
sql="select bigxm_name from bigxm where bigxm_id="&cstr(request("bigxm_id"))
rs.open sql,conn,1,1
c=rs("bigxm_name")
rs.close
end if
%>
<link rel="stylesheet" href="style.css" type="text/css">
<table width="778" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#EAEAEA">
<tr>
<td height="1" colspan="3" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td width="190" height="274" rowspan="4" valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" bgcolor="#DCFAD8">
<div align="center"><font color="#000000">会员信息</font></div>
</td>
</tr>
<tr>
<td height="95"> <div align="center">
<table width="87%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!--#include file="denglu.asp"--></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td height="25" bgcolor="#DCFAD8">
<div align="center"><font color="#000000">服务指南</font></
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-20 14:28 , Processed in 0.103099 second(s), 8 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表