后台-用户管理-添加用户
作者:cmscn 日期:2009-06-03
sub joekoe_chk_add()
dim username,password,email,password2
call admin_td("添加管理员")
if chk() then
username=trim(request.form("username"))
password=trim(request.form("password"))
if username="" or password="" then
call admin_error(tit_fir&"名称,"&tit_fir&"密码 不能为空!")
exit sub
end if
email=code_admin("email",1,50)
if email_ok(email,50)=false then
call admin_error(tit_fir&"的 电子邮件("&email&") 为空或不符合规则!")
exit sub
end if
sql="select * from "&data_name
call joekoe_cms.exec(sql,-1)
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("password")=jk_md5(password,"short")
rs("email")=email
if trim(request.form("sex"))="girl" then
rs("sex")=false
else
rs("sex")=true
end if
rs("tim")=joekoe_cms.now_time
rs("power")=format_power2(ubound(dim_user)+1,1)
rs("hidden")=true
rs("login_num")=0
rs("counter")=0
rs("bbs_counter")=0
rs("integral")=0
rs("emoney")=0
rs("face")="/images/face/0.gif"
rs("estate")=0
rs("abate")=0
rs("last_tim")=joekoe_cms.now_time
rs("popedom")="00000000000000000000000000000000000000000000000000"
rs.update
rs.close
call upload_note(index_url,first_id(data_name,"id"))
call admin_msg("已成功添加了一位"&tit_fir&"!","?",0)
call admin_event("已成功添加了一位"&tit_fir&"("&username&")",0,0)
exit sub
end if
call form_first()
%>
<form name=add_frm action='?action=add' method=post>
<input type=hidden name=chk value='yes'>
<input type=hidden name=upid value=''>
<tr><td>用户名称:</td><td><input type=text name=username size=20 maxlength=20><%response.write redx%></td></tr>
<tr><td>登陆密码:</td><td><input type=text name=password size=20 maxlength=20><%response.write redx%></td></tr>
<tr><td>E - mail:</td><td><input type=text name=email size=30 maxlength=50><%response.write redx%></td></tr>
<tr><td>您的性别:</td><td> <input type=radio name=sex value='boy' checked class=bg_td> 男孩 <input type=radio name=sex value='girl' class=bg_td> 女孩 <%response.write redx%></td></tr>
<%
call submit_add()
end sub
评论: 0 | 引用: 0 | 查看次数: 426
发表评论