| 项目搜索 |
| |
|
代码片段库:
查看代码片段
浏览
| 提交新的代码片段
| 创建代码包
member_join.php
|
类型:
Full Script |
类别:
BBS Systems
|
许可证:
GNU General Public License |
语言:
PHP
|
描述:
可换SKIN的BOARD中的用户注册提交文件
|
该代码片段的版本系列:
片段ID |
下载版本 |
提交时间 |
提交人 |
删除 |
24 | 1.0 | 2002-02-25 16:16 | firefox | |
点击"下载版本"来下载该代码片段.
最新版本的代码片段: 1.0
<?
//
require "lib.php";
// DB
if(!$connect) $connect=dbConn();
if($id)
{
//
$setup=get_table_attrib($id);
//
if(!$setup[name]) Error("连接错误或地址已更改.<br><br>请确认无误后从试或与管理员联系","");
//
$group=group_info($setup[group_no]);
if(!$group[use_join]) Error("用户组已关闭注册权限或不存在");
}
else
{
if($group_name) $group=mysql_fetch_array(mysql_query("select * from $group_table where name='$group_name'"));
elseif($group_no) $group=mysql_fetch_array(mysql_query("select * from $group_table where no='$group_no'"));
if(!$group[no]) Error("用户组不存在");
if(!$group[use_join]) Error("用户组已关闭注册权限或不存在");
}
//
$member=member_info();
if($member[no]) Error("您已是注册用户,请注销后再来注册.");
mysql_close($connect);
$query_time=getmicrotime();
$check[1]="checked";
$referer=$HTTP_REFERER;
head();
echo "<div align=center><br>";
?>
<script>
function checklength(a,b,c) {
inputname=eval("document.write.jumin"+b);
inputname2=eval("document.write.jumin"+c);
if (inputname.value.length>a) {
inputname2.focus();}
}
function check_submit()
{
if(!write.user_id.value) {alert("请输入用户名.");write.user_id.focus(); return false;}
if(!write.password.value) {alert("请输入密码.");write.password.focus(); return false;}
if(!write.password1.value) {alert("请输入确认密码.");write.password1.focus(); return false;}
if(write.password.value!=write.password1.value) {alert("两次输入的密码不匹配.");write.password.value="";write.password1.value=""; write.password.focus(); return false;}
if(!write.name.value) { alert("姓名不能为空"); write.name.focus(); return false; }
<? if($group[use_birth])
{
$now_year=getDate();
$old_year=$now_year[year]-50;
$young_year=$now_year[year]-16;
?>
if ( write.birth_1.value < <?=$old_year?> ||write.birth_1.value > <?=$young_year?>) {
alert('请输入您的出生年份.');
!write.birth_1.value;
write.birth_1.focus();
return false;
}
if ( write.birth_2.value > 12 || write.birth_2.value <= 0 ) {
alert('请输入您的出生月份.');
!write.birth_2.value;
write.birth_2.focus();
return false;
}
if ( write.birth_3.value > 31 || write.birth_3.value <= 0 ) {
alert('请输入您的出生日期.');
!write.birth_3.value;
write.birth_3.focus();
return false;
}
<? } ?>
if(!write.email.value) {alert("E-Mail 是我们和您联系的手段,所以不能不填.");write.email.focus(); return false;}
<? if($group[use_jumin])
{ ?>
if(!write.jumin1.value) {alert("有效证件号码不能不填");write.jumin1.focus(); return false;}
if(!write.jumin2.value) {alert("有效证件号码不能不填");write.jumin2.focus(); return false;}
if(!write.jumin3.value) {alert("有效证件号码不能不填");write.jumin3.focus(); return false;}
<?}?>
return true;
}
function check_id(id)
{
if(!id)
{
alert('用户名还没填呢');
}
else
{
window.open('check_user_id.php?user_id='+id,'check_user_id','width=300,height=100,toolbar=no,status=no,resizable=no');
}
}
</script>
<table width="450" border="0" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="#666666">
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF">
<table width="440" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
<tr>
<td><img src="images/join_title.gif" width="186" height="44">
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="420" border="0" cellspacing="0" cellpadding="0" align="center"><form name=write method=post action=member_join_ok.php enctype=multipart/form-data onsubmit="return check_submit();">
<input type=hidden name=page value=<?=$page?>>
<input type=hidden name=id value=<?=$id?>>
<input type=hidden name=no value=<?=$no?>>
<input type=hidden name=select_arrange value=<?=$select_arrange?>>
<input type=hidden name=desc value=<?=$desc?>>
<input type=hidden name=page_num value=<?=$page_num?>>
<input type=hidden name=keyword value="<?=$keyword?>">
<input type=hidden name=category value="<?=$category?>">
<input type=hidden name=sn value="<?=$sn?>">
<input type=hidden name=ss value="<?=$ss?>">
<input type=hidden name=sc value="<?=$sc?>">
<input type=hidden name=referer value="<?=$referer?>">
<input type=hidden name=group_no value="<?=$group[no]?>">
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_id.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=user_id size=15 maxlength=20 style=border-color:#CCCCCC class=input>
<input type=button value='Check ID' style=border-color:#CCCCCC class=input onclick=check_id(write.user_id.value)>
</td>
</tr>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_pass.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=password name=password size=15 maxlength=20 style=border-color:#cccccc class=input>
<img src="images/join_conf.gif" width="89" height="19" align="absmiddle">
<input type=password name=password1 size=15 maxlength=20 style=border-color:#cccccc class=input>
</td>
</tr>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_name.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=name size=15 maxlength=20 value="<?=$member[name]?>" style=border-color:#cccccc class=input>
</td>
</tr>
<? if($group[use_birth]) { ?>
<tr align=right height=28>
<td height="30" width="93">
<div align="center"><img src="images/join_birth.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=birth_1 size=6 maxlength=4 style=border-color:#cccccc class=input onBlur="jumin2.innerText=write.birth_1.value+write.birth_2.value+write.birth_3.value;">
年
<input type=text name=birth_2 size=4 maxlength=2 style=border-color:#cccccc class=input onBlur="jumin2.innerText=write.birth_1.value+write.birth_2.value+write.birth_3.value;">
月
<input type=text name=birth_3 size=4 maxlength=2 style=border-color:#cccccc class=input onBlur="jumin2.innerText=write.birth_1.value+write.birth_2.value+write.birth_3.value;">
日
<input type=checkbox value=1 name=open_birth checked>
<img src="images/join_open.gif" boader="0">
</tr>
<? } ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_mail.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=email size=40 maxlength=255 value="<?=$member[email]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_email checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_home.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=homepage size=40 maxlength=255 value="<?=$member[homepage]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_homepage checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? if($group[use_icq]) { ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_icq.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=icq size=15 maxlength=20 value="<?=$member[icq]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_icq checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_oicq]) { ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_oicq.gif" width="89" height="19"></div>
<td height="30" width="327">
<input type=text name=oicq size=15 maxlength=20 value="<?=$member[oicq]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_oicq checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_msn]) { ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_msn.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=text name=msn size=15 maxlength=30 value="<?=$member[msn]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_msn checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_jumin]) { ?>
<tr>
<td height="15" width="93">
<div align="center"><img src="images/join_jumin.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=jumin1 size=10 maxlength=6 style=border-color:#cccccc class=input onkeyup=checklength(5,1,2)>
-
<input type=text name=jumin2 size=10 maxlength=8 style=border-color:#cccccc class=input onkeyup=checklength(7,2,3) onBlur="birth_1.innerText=write.jumin2.value.substr(0,4);birth_2.innerText=write.jumin2.value.substr(4,2);birth_3.innerText=write.jumin2.value.substr(6,2);">
-
<input type=text name=jumin3 size=10 maxlength=4 style=border-color:#cccccc class=input>
</td>
</tr>
<tr>
<td> </td>
<td>* 有效证件号码实行个人保密制度.</td>
</tr>
<? } ?>
<? if($group[use_hobby]) { ?>
<tr>
<td height="15" width="93">
<div align="center"><img src="images/join_hobby.gif" width="89" height="19"></div>
</td>
<td>
<input type=text name=hobby size=40 maxlength=50 value="<?=$member[hobby]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_hobby checked>
<img src="images/join_open.gif" boader="0">
</tr>
<? } ?>
<? if($group[use_job]) { ?>
<tr>
<td height="15" width="93">
<div align="center"><img src="images/join_job.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=job size=40 maxlength=20 value="<?=$member[job]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_job checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_home_address]) { ?>
<tr> <td height="15" width="93">
<div align="center"><img src="images/join_home_address.gif" width="89" height="19"></div>
</td>
<td align=left> <input type=text name=home_address size=40 maxlength=255 value="<?=$member[home_address]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_home_address checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_home_tel]) { ?>
<tr>
<td height="15" width="93">
<div align="center"><img src="images/join_home_tel.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=home_tel size=40 maxlength=20 value="<?=$member[home_tel]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_home_tel checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_office_address]) { ?>
<tr>
<td height="15" width="93">
<div align="center"><img src="images/join_office_address.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=office_address size=40 maxlength=255 value="<?=$member[office_address]?>" style=border-color:#cccccc class=input>
<input type=checkbox value=1 name=open_hoffice_address checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_office_tel]) { ?>
<tr> <td height="30" width="93">
<div align="center"><img src="images/join_office_tel.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=office_tel size=40 maxlength=20 value="<?=$member[office_tel]?>" style=border-color:#cccccc class=input>
<input type=checkbox name=open_office_tel value=1 checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_handphone]) { ?>
<tr> <td height="30" width="93">
<div align="center"><img src="images/join_handphone.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=text name=handphone size=40 maxlength=20 value="<?=$member[handphone]?>" style=border-color:#cccccc class=input>
<input type=checkbox name=open_handphone value=1 checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_mailing]) { ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_ml.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=checkbox name=mailing value=1 checked>
<img src="images/join_join.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_picture]) { ?>
<tr> <td height="30" width="93">
<div align="center"><img src="images/join_picture.gif" width="89" height="19"></div>
</td>
<td align=left>
<input type=file name=picture size=29 maxlength=255 style=border-color:#cccccc class=input>
<? if($member[picture]) echo"<br> <img src='$member[picture]' border=0>"; ?>
<input type=checkbox name=open_picture value=1 checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<? if($group[use_comment]) { ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_prof.gif" width="89" height="19" align="top"></div>
</td>
<td height="30" width="327">
<textarea cols=38 rows=2 name=comment style=border-color:#cccccc class=textarea><?=$member[comment]?></textarea>
<input type=checkbox value=1 name=open_comment checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
<? } ?>
<tr>
<td height="30" width="93">
<div align="center"><img src="images/join_info.gif" width="89" height="19"></div>
</td>
<td height="30" width="327">
<input type=checkbox name=openinfo value=1 checked>
<img src="images/join_open.gif" boader="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div align=right><input type=image border=0 src=images/join_confirm.gif> <img src=images/join_back.gif border=0 onClick=reset() style=cursor:hand></div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</table>
<?
foot();
?>
如果您修改了一个代码片段并且觉得很应该让别人共享,您可以把这作为这个代码片段的最新版本提交上来. |
|