📄 supplieradd.asp
字号:
<%@language="vbscript" codepage="936"%>
<%response.buffer = true%>
<%Public HOME_PATH:HOME_PATH = "../"%>
<!--#include file="../db.asp"-->
<!--#include file="../inc/function.asp"-->
<%Public title:title = "注册用户"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><%=title%></title><%
if isLogin = false then
Response.Write viewinfo("LoginC","","")
Response.end
end if
%><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<link href="<%=HOME_PATH%>css/style01.css" rel="stylesheet" type="text/css">
<style>
html{min-width: 776px;}
fieldset {padding:3px;}
</style>
<script type = 'text/javascript'>
<!--
rv = Array("returnValue","parent.right") ;
window.returnValue = rv[1] ;
//-->
</script>
<base target = '_self'>
</head>
<body style = 'border-style:none;margin:0px;background-color:buttonface;'>
<div style = 'text-align:center;'>
<table border = '0' style = 'width:100%;height:95%;' cellspacing = '0' cellpadding = '3'>
<tr>
<form method='post' action="" name = 'form'>
<input name = 'Options' type = 'hidden'/>
<td style = 'width:55%;vertical-align:top;'><table border = '0' style = 'width:100%;' cellspacing = '0' cellpadding = '0'>
<tr>
<td style = 'text-align:center;'><fieldset>
<legend>客商.客户</legend>
<table border = '0' width = '98%' cellspacing = '0' cellpadding = '1'>
<tr>
<td style = 'width:50px;'>代码</td>
<td><table border = '0' width = '100%' cellspacing = '0' cellpadding = '0'>
<tr>
<td><input type="text" name="Code" style = 'width:100%;'/></td>
<td style = 'width:45px;'> 简称 </td>
<td><input type="text" name="ForShort" style = 'width:100%;'/></td>
<td style = 'width:55px;'> 助记码 </td>
<td><input type="text" name="HelpMarkCode" style = 'width:100%;'/></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style = 'width:50px;'>全称</td>
<td><input type="text" name="FullName" style = 'width:100%;'>
</tr>
<tr>
<td>序号</td>
<td><input type="text" name="" style = 'width:55px;' value = '自动编号' readonly/> <%=now()%></td>
</tr>
</table>
</fieldset></td>
</tr>
<tr><td style = 'height:5px;line-height:5px;'> </td></tr>
<tr>
<td style = 'text-align:center;'><fieldset>
<legend>联系</legend>
<table border = '0' width = '98%' cellspacing = '0' cellpadding = '1'>
<tr>
<td style = 'width:50px;'>联系人</td>
<td><input type="text" name="Linkman" style = 'width:100%;'/></td>
<td style = 'width:50px;'> 职位</td>
<td><input type="text" name="Place" style = 'width:100%;'/></td>
</tr>
<tr>
<td style = 'width:50px;'>联系电话</td>
<td><input type="text" name="LinkPhone" style = 'width:100%;'/></td>
<td> 手机</td>
<td><input type="text" name="mobileTelehone" style = 'width:100%;'/></td>
</tr>
<tr>
<td style = 'width:50px;'>fax</td>
<td><input type="text" name="fax" style = 'width:100%;'/></td>
<td> Email</td>
<td><input type="text" name="Email" style = 'width:100%;'/></td>
</tr>
</table>
</fieldset></td>
</tr>
<tr><td style = 'height:5px;line-height:5px;'> </td></tr>
<tr>
<td style = 'text-align:center;'><fieldset>
<legend>其他</legend>
<table border = '0' width = '98%' cellspacing = '0' cellpadding = '1' style='table-layout:fixed; word-break:break-all;'>
<tr>
<td style = 'width:50px;'>欠款期限</td>
<td><input type="text" name="ArrearageTime" style = 'width:100%;'/></td>
<td style = 'width:50px;'>欠款限额</td>
<td><input type="text" name="ArrearageTether" style = 'width:100%;'/></td>
</tr>
<tr>
<td>银行帐号</td>
<td><input type="text" name="BankNumber" style = 'width:100%;'/></td>
<td> 网址</td>
<td><input type="text" name="WebSite" style = 'width:100%;'/></td>
</tr>
<tr>
<td>经营范围</td>
<td colspan = '3'><input type="text" name="ScopeOfOperation" style = 'width:100%;'/></td>
</tr>
<tr>
<td>详细地址</td>
<td colspan = '3'><textarea name="Address" style = 'width:100%;height:50px;overflow-x:hidden;overflow-y:auto;'></textarea></td>
</tr>
<tr>
<td>是否可用</td>
<td colspan = '3'>
<table border = '0' style = 'width:100%;' cellspacing = '0' cellpadding = '0'>
<tr>
<td style = 'width:60px;'>
<select style = 'width:50px;' name = 'disabled'>
<option value = '1'>可用</option>
<option value = '0'>禁用</option>
</select></td>
<td style = 'width:80px;text-align:right;' name = 'PriceType'>价格类型 </td>
<td><%=PriceTypeList("PriceType",PriceType,RPriceType)%></td>
<td style = 'width:80px;text-align:right;'>注册到 </td>
<td style = 'text-align:right;width:100px;'>
<%SQL = "select * from usertype where uTypeSelect = 0"%>
<%Call usertypeSub(SQL,Rusertypeid,boxWidth,"uTypeSelect",uTypeALL)%>
</td>
</tr>
</table></td>
</tr>
</table>
</fieldset></td>
</tr>
<tr>
<td><input type="checkbox" name="repetition" value = 'YES' style = 'border-style:none;' checked = 'checked'/>检查注册名是否重复</td>
</tr>
</table></td>
<td style = 'width:45%;height:100%;vertical-align:top;'>
<fieldset style = 'width:100%;height:354px;text-align:center;'>
<legend>备注</legend>
<table border = '0' style = 'width:100%;height:100%;' cellspacing = '0' cellpadding = '0'>
<tr>
<td style= 'vertical-align:top;'><textarea name="Remark" style = 'width:100%; height:98%;overflow-x:hidden;overflow-y:auto;'></textarea></td>
</tr>
</table>
</fieldset></td>
</tr>
<tr>
<td colspan = '2' style = 'text-align:center;'>
<input type="submit" value = ' 确定 ' onclick = "javascript:form.Options.value = 'Reg';if(form.uTypeSelect.value==''){alert('请选择好注册子类!');form.uTypeSelect.focus();return false;}"/><input type="reset" value = ' 重置 '/><input type="button" value = ' 关闭 ' onclick = "javascript:window.close();"/>
</td>
</tr>
</form>
</table>
<%
Options = trim(Request.Form("Options"))
if Options = "Reg" then
utypeid_ = GetText("uTypeSelect","P","number",1,10,0)'
utypeid_ = SelectZD("select utypeid from usertype where utypeid = " & utypeid_ & "",0)
if utypeid_ = 0 then
Response.Write viewinfo("alertBack","请选好注册子类别!","")
Response.end
end if
Linkman = Replace(GetText("Linkman","P","Str",1,110,""),"'","")
if trim(Request.Form("repetition")) = "YES" then
if not Conn.Execute("select Linkman from supplier where Linkman = '" & Linkman & "'").eof then
Response.Write viewinfo("alertBack","已经存在(" & Linkman & ")这个用户了!请起另一个用户名","")
Response.end
end if
end if
SQL = "select * from supplier where (uid is null)"
Rs.Open(SQL),Conn,1,3
Rs.addnew
Rs("Code") = htmlencode(GetText("Code","P","Str",1,110,"none"),"Y")'代码
Rs("ForShort") = htmlencode(GetText("ForShort","P","Str",1,110,"none"),"Y")'简称
Rs("HelpMarkCode") = htmlencode(GetText("HelpMarkCode","P","Str",1,100,"none"),"Y")'助记码
Rs("FullName") = htmlencode(GetText("FullName","P","Str",1,250,"none"),"Y")'全称
Rs("Linkman") = htmlencode(Linkman,"Y")'联系人
Rs("Place") = htmlencode(GetText("Place","P","Str",1,250,"none"),"Y")'职位
Rs("LinkPhone") = htmlencode(GetText("LinkPhone","P","Str",1,250,"none"),"Y")'联系电话
Rs("mobileTelehone") = htmlencode(GetText("mobileTelehone","P","Str",1,250,"none"),"Y")'
Rs("fax") = htmlencode(GetText("fax","P","Str",1,250,"none"),"Y")'fax
Rs("Email") = htmlencode(GetText("Email","P","Str",1,250,"none"),"Y")'Email
Rs("ArrearageTime") = GetText("ArrearageTime","P","number",1,10,0)'
Rs("ArrearageTether") = GetText("ArrearageTether","P","number",1,10,0)'欠款限额
Rs("BankNumber") = htmlencode(GetText("BankNumber","P","Str",1,250,"none"),"Y")'银行帐号
Rs("WebSite") = htmlencode(GetText("WebSite","P","Str",1,250,"none"),"Y")'
Rs("ScopeOfOperation") = htmlencode(GetText("ScopeOfOperation","P","Str",1,250,"none"),"Y")'经营范围
Rs("Address") = htmlencode(GetText("Address","P","Str",1,250,"none"),"Y")'详细地址
Rs("disabled") = GetText("disabled","P","number",1,10,0)'是否可用
Rs("PriceType") = GetText("PriceType","P","number",1,10,0)'价格类型
Rs("utypeid") = utypeid_
Rs("regtime") = now
Rs("lasttime") = now
Rs("Remark") = htmlencode(GetText("Remark","P","Str",1,2000,"none"),"Y")'备注
Response.Write viewinfo("alertClose","添加成功!",SELVAR("FN",""))
Rs.update
Rs.Close
end if
ConnClose()
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -