savenreguser.htm

来自「ajax技术书籍 ajax技术书籍」· HTM 代码 · 共 57 行

HTM
57
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>保存简单注册用户后台程序</title>
<style type="text/css">
<!--
a {text-decoration:none}
.style2 {font-size: 14px}
.style3 {color: #0033CC}
-->
</style>
</head>

<body>
<p class="style2">
  Name: 保存简单注册用户后台程序<br/>Author: shemily
  <br/>Create: 2007-04-29
  <br/>Version: 1.0
  <br/>Language: VBscript
  <br/>
</p>
<code>
&lt;!--#include file=&quot;Inc/conn.inc&quot;--&gt;<br>
&lt;!--#include file=&quot;Inc/checkUserName.inc&quot;--&gt;<br>
&lt;!--#include file=&quot;Inc/saveNRegUser.inc&quot;--&gt;<br>
&lt;%<br>
userName = request(&quot;userName&quot;)<br>
userPass = request(&quot;userPass1&quot;)<br>
userMail = request(&quot;userMail&quot;)
<p>if checkUserName(userName, &quot;shop_user&quot;, &quot;userName&quot;) = &quot;Err_102&quot; then 'if the username is ok<br>
  &nbsp;&nbsp;Call saveNRegUser(userName, userPass, userMail) 'save user	<br>
  &nbsp;&nbsp;%&gt;<br>
&nbsp;&nbsp;&lt;script type=&quot;text/javascript&quot;&gt;<br>
&nbsp;&nbsp;&lt;!--<br>
  &nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;恭喜!\n您已成功注册!&quot;);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;location.href=&quot;u_reg.htm&quot;;<br>
  &nbsp;&nbsp;//--&gt;<br>
&nbsp;&nbsp;&lt;/script&gt; <br>
&nbsp;&nbsp;&lt;%<br>
  else<br>
  &nbsp;&nbsp;if saveNRegUser(userName, userPass, userMail) = &quot;Err_121&quot; then<br>
  &nbsp;&nbsp;%&gt;<br>
&nbsp;&nbsp;&lt;script type=&quot;text/javascript&quot;&gt;<br>
&nbsp;&nbsp;&lt;!--<br>
  &nbsp;&nbsp;&nbsp;&nbsp;alert(&quot;对不起,\n此用户名已存在!&quot;);<br>
  &nbsp;&nbsp;&nbsp;&nbsp;history.back(0);<br>
  &nbsp;&nbsp;//--&gt;<br>
&nbsp;&nbsp;&lt;/script&gt; <br>
&nbsp;&nbsp;&lt;%<br>
  &nbsp;&nbsp;end if<br>
  end if<br>
  %&gt;</p>
</code>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?