<!--<?php print <<<EOT
-->
<table width="980" border="0" align="center" bgcolor="#FFFFFF" cellspacing="1" cellpadding="0">
  <tbody>
  <tr>
    <td width="220" valign="top">
<!--
EOT;
$listname = "拜佛常识";
$txtsou = "where $sql_tbl[newsletter].avail = 'Y'";

$rnd = rand();
$txtorderby = "ORDER BY RAND(NOW()+$rnd)";

$intjilu = 10;
include ('topnews.htm');
print <<<EOT
-->
	</td>
    <td width="760" valign="top">

<table width="100%" border="0" class="biaoge" cellspacing="0" cellpadding="0">
<tbody>
<FORM action="reg.php" method="POST" name="regform" onSubmit='return chkreg(this)'>
<INPUT type="hidden" name="mode" value="add">
  <tr>
    <td class="biaoge_biaoti">用户注册</td>
  </tr>
  <tr>
    <td class="biaoge_td">会 员 名：<INPUT type="text" id="username" name="username" size="32" maxlength="32" value="$userinfo[username]"></td>
  </tr>
  <tr>
    <td class="biaoge_td">密　　码：<INPUT type="password" id="passwd1" name="passwd1" size="35" maxlength="32" value=""></td>
  </tr>
  <tr>
    <td class="biaoge_td">确认密码：<INPUT type="password" id="passwd2" name="passwd2" size="35" maxlength="32" value=""></td>
  </tr>
  <tr>
    <td class="biaoge_td">电子信箱：<INPUT type="text" id="email" name="email" size="32" maxlength="128" value="$userinfo[email]"></td>
  </tr>
  <tr>
    <td class="biaoge_td"><input name="image" type=image onClick="return reg();" src="$temp_img/cartreg.jpg" align="absMiddle" border="0"></td>
  </tr>
</form>
</tbody>
</table>

  	</td>
  </tr>
  </tbody>
</table>
<script language=JavaScript1.2>
function chkreg(formct){
	if (formct.username.value=='' ){
		alert('会员名为空，请填写会员名');
		return false; 
	}
	if (formct.passwd1.value=='' ){
		alert('密码为空，请填写登录密码');
		return false; 
	}
	if (formct.passwd2.value=='' ){
		alert('确认密码为空，请填写确认密码');
		return false; 
	}
	if (formct.passwd1.value != formct.passwd2.value){
		alert('两次输入的密码不一致，请正确填写');
		return false; 
	}
	
	
	if(formct.email.value.length!=0)	{
		if (formct.email.value.charAt(0)=="." ||        
			 formct.email.value.charAt(0)=="@"||       
			 formct.email.value.indexOf('@', 0) == -1 || 
			 formct.email.value.indexOf('.', 0) == -1 || 
			 formct.email.value.lastIndexOf("@")==formct.email.value.length-1 || 
			 formct.email.value.lastIndexOf(".")==formct.email.value.length-1)
		 {
		  alert("Email地址格式不正确！");
		  formct.email.focus();
		  return false;
		  }
	}
 	else
	{
	   alert("Email地址不能为空！");
	   formct.email.focus();
	   return false;
   }
   
}
</script>
<!--
EOT;
?>-->