?? ku_add.asp
字號:
<%
if session("username")="" then
%>
<script language="javascript">
top.location.href="../login.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 基本信息設(shè)置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style2.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY>
<%
if fla5="0" then
%>
<br><center><font color="#FF0000">你不具備此權(quán)限,請與管理員聯(lián)系!</font></center>
<%
response.end
end if
%>
<%if request("hid1")="" then%>
<script language="javascript">
function check()
{
if (document.form1.ku.value=="")
{
alert("有*號的必須填寫!");
return false;
}
}
</script>
<form name="form1">
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td height="21"> <img src="../Images/ico/ico50.gif" width="32" height="32" hspace="2" vspace="2" align="absmiddle"><font size="+1"><strong> 添加倉庫</strong></font></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" class="TableMenu">
<tr class="a1" style="color:#ffffff;font-size:12px;">
<th height="30" style="color:#ffffff;font-size:14px" colspan="2"><img src="../images/add.gif" border="0" hspace="2" align="absmiddle">添加倉庫<font size="-1"> (帶*號的為必填項(xiàng))</font></th>
</tr>
<tr bgcolor="#ffffff">
<td width="28%" height="30" align="right"><b>倉庫名稱:</b> </td>
<td width="72%">
<input type="text" name="ku" style="width:200px">
<font color="#ff0000">*</font></td>
</tr>
<tr class="a3">
<td width="28%" height="30" align="right"><b>負(fù)責(zé)人:</b> </td>
<td width="72%">
<%
sql="select * from login order by id"
set rs_login=conn.execute(sql)
if rs_login.eof then
%>
<a href="user_add.asp">先添加員工</a>
<%
else
%>
<select name="login">
<%
do while rs_login.eof=false
%>
<option value="<%=rs_login("username")%>"<%if rs_login("username")=session("username") then%> selected="selected"<%end if%>><%=rs_login("username")%></option>
<%
rs_login.movenext
loop
%>
</select>
<%
end if
%>
</td>
</tr>
<tr bgcolor="#ffffff">
<td width="28%" height="30" align="right"><b>聯(lián)系電話:</b> </td>
<td width="72%">
<input type="text" name="tel" style="width:200px">
</td>
</tr>
<tr class="a3">
<td width="28%" height="30" align="right"><b>倉庫地址:</b> </td>
<td width="72%">
<input type="text" name="address" style="width:300px">
</td>
</tr>
<tr bgcolor="#ffffff">
<td width="28%" height="30" align="right"><b>倉庫備注:</b> </td>
<td width="72%">
<input type="text" name="beizhu" style="width:400px">
</td>
</tr>
<tr class="a3">
<td width="28%" height="30" align="right"><b>默認(rèn)倉庫:</b> </td>
<td width="72%">
<input type="checkbox" name="moren" value="1"></td>
</tr>
<tr bgcolor="#ffffff">
<td height="30"> </td>
<td>
<input name="submit" type="submit" onClick="return check()" value=" 確 認(rèn) ">
<input type="hidden" name="hid1" value="ok">
<input name="reset" type="reset" value=" 重新填寫 ">
</td>
</tr>
</table>
</form>
<%
else
nowku=request("ku")
nowlogin=request("login")
nowtel=request("tel")
nowaddress=request("address")
nowbeizhu=request("beizhu")
nowmoren=request("moren")
sql="select * from ku where ku='"&nowku&"'"
set rs=conn.execute(sql)
if rs.eof=false then
%>
<script language="javascript">
alert("您輸入的倉庫名已經(jīng)存在!")
window.history.go(-1)
</script>
<%
response.end
end if
set rs=server.createobject("ADODB.RecordSet")
sql="select * from ku where 1=2"
rs.open sql,conn,1,3
rs.addnew
rs("ku")=nowku
rs("login")=nowlogin
rs("tel")=nowtel
rs("address")=nowaddress
rs("beizhu")=nowbeizhu
if nowmoren="1" then
sql="update ku set moren=false"
conn.execute(sql)
rs("moren")=true
end if
rs.update
%>
<script language="javascript">
alert("倉庫添加成功!")
window.location.href="ku.asp"
</script>
<%
end if
%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -