<%
dim conn,str //定义变量
on error resume next //忽略错误,继续向下执行
str="PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=kucun"
//设置服务器为本地服务器,用户名为sa,密码为123456,数据库为kucun
set conn=server.createobject("ADODB.CONNECTION") //创建连接对象
set rs=Server.CreateObject("ADODB.Recordset")
set rs2=Server.CreateObject("ADODB.Recordset")
set rs3=Server.CreateObject("ADODB.Recordset")//创建记录集对象 rs,rs2,rs3
if err then
err.clear
response.Write("数据库连接错误!")
else
conn.open str
if err then
err.clear
response.Write("数据库打开错误!")
end if
end if
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>请先登录</title>
</head>
<body onload=this.document.input.username.focus();topmargin=0>
<p> </p>
<p>
<!--#include file="conn.asp"-->
<!--#include file=function.asp-->
<script language="javascript"> //声明使用javascript脚本语言
<!--
function input_onsubmit()
{
if(document.input.username.value=="")//如果用户为空
{
alert("用户名不能为空!")
//定义弹出的信息为“用户名不能为空!”。弹出用户不能为空的确定对话框。
document.input.username.focus()
return false
}
if(document.input.password.value=="")//如果用户没有输入密码
{
alert("密码不能为空!") //提示“密码不能为空!”
document.input.password.focus() //将光标定位到“密码”文本框中
return false // 返回false
}
if (document.intput.selStorage.value==0)//如果用户没有选择仓库
{
alert("请选择仓库!") //提示“请选择仓库!”
document.input.selStorage.focus() //将光标定位到“请选择仓库”列表中
return false //返回false
}
}
</script>
</html>
</p>
<form action="loginchk.asp" method="POST" name="input" LANGUAGE="javascript" onSubmit="return input_onsubmit()" >
//加入一个表单,设置表单的执行文件是Loginchk.asp,传送方式为post
<p align="center"><font color="#0033ff" size="4" face="幼圆">
<strong>请先登录</strong></font></p>
<table width="350" border=1 align="center" cellspacing="0" bordercolor="#CCCC00">
<tr>
<td height="25" align=right nowrap><font color="#FF0000"size="2">用户名:</font></td>
<td height="25"><font color="#ff0000" size="2">
<input class=smallinput type=text name="username" value=<%=session("logname") %> > </font></td>
</tr>
<tr>
<td height="25"align=right nowrap><font color="#FF0000"size="2">密 码:</font></td>
</tr>
<tr>
<td height="25" align=right nowrap><font color="#FF0000" size="2">仓 库:</font></td>
<td height="25"><font color="FF0000" size="2">
<in%Showcangku%>//调用function.asp文件中显示当前仓库的函数
</font></td></tr>
<tr>
<td height="25" colspan="2" align=center><input class="buttonface" type="submit" value="登录" name="ok">
<font color="#FFFFFF">.</font>
<input class="buttonface"type="reset" value="重填" name="reset"></td></tr>
</table>
<p> </p>
</form>
</body>
</html>

x285548143
- 粉丝: 1
- 资源: 1
最新资源
- 管家婆普及版TOP9.16.zip
- ObjectARX 2025
- 电动汽车动力系统匹配与整车动力经济性计算模型:参数输入一键生成,仿真模型助力项目实践,电动汽车动力系统匹配与整车动力经济性计算模型:一键生成参数,助力高效研发仿真设计,电动汽车动力系统匹配计算模型:输
- 管家婆普及版TOP15.0.zip
- JellySprites
- chap1threading1.py
- 管家婆普及版TOP12.6.zip
- 一个随机随林的演示代码
- Deepseek使用提问公式-全是技巧
- A02114237余瑶开题报告.docx
- GESP 2024年12月认证 Python 1-6级真题和答案.rar
- 计算机软考备战指南-备考攻略详解与成功秘籍
- 管家婆普普版TOP 12.9.zip
- 管家婆普普版TOP 12.71.zip
- 管家婆普普版TOP 12.6.zip
- 【matlab代码】四个模型的IMM(交互式多模型)例程,四模型分别为:CV(匀速)、CA(匀加速)、CS(匀加加速度)、CT(匀速转弯),滤波使用EKF
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


