<% if request("editid")<>"" then %> <% end if %> <% table="pr" if request.form("addedit_subed")="true" then '表单提交后 editid=request.form("editid") prid1=Request.Form("prid1") prid2=Request.Form("prid2") auname=Request.Form("auname") ordermag=Request.Form("ordermag") orderser=Request.Form("orderser") useraddress=Request.Form("useraddress") usertel=Request.Form("usertel") '服务器端验证 'outcheck(CheckValue(prid1,,,1,"prid1")) 'outcheck(CheckValue(prid2,,,1,"prid2")) 'outcheck(CheckValue(auname,,,1,"auname")) 'outcheck(CheckValue(ordermag,,,1,"ordermag")) 'outcheck(CheckValue(orderser,,,1,"orderser")) 'outcheck(CheckValue(useraddress,,,1,"useraddress")) 'outcheck(CheckValue(usertel,,,1,"usertel")) if editid="" then '添加状态 ' 防止二义性信息逻辑**************** 'set rs_test=Server.CreateObject("ADODB.RECORDSET") 'rs_test.Open "select count(*) as counter from " & table & " where username='" & username & "'",conn 'if rs_test("counter")>0 then ' call Msgout("用户名已存在, 不能添加!","javascript:history.back()",3) ' Response.End 'end if '************************************ set rst=server.CreateObject("ADODB.RecordSet") sqlt="select prid1 from pr Where prid1='"&prid1&"'" rst.open sqlt,conn,3,2 if not rst.eof then %> <% end if '添加时使用的字段 field1=array("prid1","prid2","auname","ordermag","orderser","useraddress","usertel") value1=array(prid1,prid2,auname,ordermag,orderser,useraddress,usertel) for i=0 to ubound(field1) value1(i)=replace(value1(i),"'","''") next sql = "INSERT INTO " & table & " (" & Join(field1, ",") & ") VALUES ('" & Join(value1, "','") & "')" word="你的信息已成功加入!" else '编辑状态 '编辑时使用的字段 field1=array("prid1","prid2","auname","ordermag","orderser","useraddress","usertel") value1=array(prid1,prid2,auname,ordermag,orderser,useraddress,usertel) sql="UPDATE " & table & " SET " for i=0 to ubound(field1) sql = sql & field1(i) & "='" & replace(value1(i),"'","''") & "'" if i <> ubound(field1) then sql=sql & "," else sql=sql & " where id=" & editid end if next word="你的信息已成功修改!" end if conn.Execute sql else '进入页面时(非提交) editid=request("editid") if editid<>"" then '编辑状态 onload="onload=""page_onload();""" set rs1=Server.CreateObject("ADODB.RECORDSET") rs1.Open "select * from " & table & " where id =" & editid ,conn prid1=rs1("prid1") prid2=rs1("prid2") auname=rs1("auname") ordermag=rs1("ordermag") orderser=rs1("orderser") useraddress=rs1("useraddress") usertel=rs1("usertel") else '添加状态 prid1="" prid2="" auname="" ordermag="" orderser="" useraddress="" usertel="" end if end if %> <% if request.form("addedit_subed")<>"true" then '********************* %> <% end if '************************************************* %> >

欢迎注册您的产品


<% if request.form("addedit_subed")="true" then %>

<% =word %>

谢谢使用产品在线注册服务。

[关闭本窗口]

<% else %>

产品注册码: -
用户姓名:
是否订阅会员杂志:
是否需要跟踪服务:
用户地址/邮编:
用户电话/手机:

请根据您的产品手册输入产品注册码,连接符号前后各八位。

<% end if %>