<!-- #include file="include/config.asp" -->
<!-- #include file="../include/jk_val_code.asp" -->
<!-- #include file="../include/jk_md5.asp" -->
<!-- #include file="../include/jk_page_cute.asp" -->
<!-- #include file="../include/jk_pagecute.asp" -->
<%
'****************************************************
' HSCMS 1.2      Power by 2332.cn
' Email: 116116089@qq.com
' Web: http://www.2332.cn
' Copyright (C) 2004 2332.com All Rights Reserved.
'****************************************************
dim nummer,rssum,page,viewpage,thepages,pageurl,nums
nummer=12
nums=nummer
tit="申请博客"
call web_head(0,0,2,0,0)
if login_mode="" then call my_login()   '未登陆不可申请
call  blogreg()
call web_end(0,0)

sub blogreg()
%>
<table cellspacing=1 cellpadding=4 class=table align='center'>
<%

  if format_mid_num(48)=0 then
  dim gerr:gerr="对不起，博客已关闭申请！<br>"
  response.write "<tr class=bg_td><td align=center height=300 colspan=3>"&gerr&"</td></tr>"
		 exit sub
    end if  
%>
<tr><td class=td colspan=3>&nbsp;<%response.write img_skin("m_")&tit%></td></tr>
<%
  dim found_err,drname,drsex,drqq,dremail,drurl,drwhe,drtopic,dricon,drface,drword,drremark,drhidden,valcode,datagl 
  if joekoe_cms.chk() then
    drname=trim(request.form("wrname"))
	druser=trim(login_id)
    drword=request.form("wrword")
    drhidden=trim(request.form("wrhidden"))
	'drpass=trim(request.form("pass"))
	drskin=trim(request.form("skin"))
    found_err=""
    if drname="" or isnull(drname) then
      found_err=found_err & "+请输入您的 <font class=red>博客名</font>（长度不能大于20）<br>"
    end if
	'if drpass="" or isnull(drpass) or len(drpass)>20 or len(drpass)<6 then
    '  found_err=found_err & "+请输入您的 <font class=red>博客密码（长度在6-20）</font><br>"
    'end if
    if drword="" or isnull(drword) then
      found_err=found_err & "+博客的 <font class=red>简介内容</font> 是必需要的！请输入。<br>"
    end if
    if val_chk(index_url)=false then
      found_err=found_err&"+您输入的 <font class=red>验 证 码</font> 为空或有错误，请勿非法提交！<br>"
    end if
	  sqlr="select id from blog where username='"&druser&"'"
     set rsr=joekoe_cms.exec(sqlr,1)
	 if not rsr.eof  then
       found_err=found_err&"+您 <font class=red>已 经</font> 注册了博客，请勿再申请！<br>"
	   end if
    rsr.close
    if found_err<>"" then
      response.write "<tr class=bg_td><td align=center height=300 colspan=3>"&found_error(found_err,260)&"</td></tr>"
      exit sub
    end if
	
	Dim SQL3,rs3,skinmain,skinshowlog
	sql3="select * from oblog_userskin where id="&drskin&" "
    set rs3=joekoe_cms.exec(sql3,1)
    if not rs3.eof then 
	    skinmain=rs3("skinmain")
		skinshowlog=rs3("skinshowlog")
		rs3.close
		set rs3=nothing
	Else
	    found_err=found_err&"+您选择的 模板 为空或有错误，请勿非法提交！<br>"
	    response.write "<table class=table><tr><td class=td>&nbsp;错误信息</td></tr><tr class=tr><td align=center height=150 colspan=3>"&found_error(found_err,260)&"</td></tr></table>"
       	rs3.close
		set rs3=nothing
	    exit sub
	End if
	
    sql="select * from blog where (id is null)"
    call joekoe_cms.exec("",-1)
    rs.open sql,conn,1,3
    rs.addnew
    rs("blogname")=drname
    rs("username")=druser
	'rs("password")=jk_md5(drpass,"short")
	rs("skin")=drskin
    rs("content")=drword
    rs("tim")=joekoe_cms.now_time
	rs("hits")=0
    if drhidden="yes" then
      rs("isopen")=true
    else
      rs("isopen")=false
    end if
	rs("user_skin_main")=skinmain
	rs("user_skin_showlog")=skinshowlog
    rs.update
    rs.close
%>
<tr class=bg_td><td align=center height=300 colspan=2>
<font class=red>申请成功，你可以拥有你自己的博客了!</font><br><br>
<a href='./'>返回博客首页</a><br><br>
（系统将在 <font class=red><%response.write dim_num(21)%></font> 秒钟后自动返回）
<meta http-equiv='refresh' content='<%response.write dim_num(21)%>; url=./'>
</td></tr></table>
<%
    call val_chk_end(index_url)
    exit sub
  end if
%>

<form name=write_frm action='blogreg.asp' method=post >
<input type=hidden name=chk value='yes'>
<%response.write val_code_num(index_url,1)%>
<tr class=bg_tds><td align=center height=30 colspan=3><font class=red><b>注意：</b></font>以下星号（<%response.write redx%>）标出的项目必需填写</td></tr>
<tr class=bg_td>
<td width='18%' height=25>博客名字：</td>
<td width='*'><input type=text name=wrname value='' size=27 maxlength=20><%response.write redx%></td>
</tr>
<tr class=bg_td>
<td width='16%' height=25>博客站长：</td>
<td width='*'><input type=text name=wruser value='<%response.write login_username%>' size=27 maxlength=20 readonly><%response.write redx%></td>
</tr>
<!--
<tr class=bg_td>
<td width='18%' height=25>博客密码：</td>
<td width='*'><input type=password name=pass value='' size=27 maxlength=20 ><%response.write redx%></td>
</tr>
-->
<tr class=bg_td>
<td valign=top><br>博客简介：<br><br><%response.write web_frm_word%></td>
<td ><textarea rows=7 name=wrword cols=65 maxlength=1000 title='按 Ctrl+Enter 可直接发送' onKeyDown="javascript:frm_quicksubmit();"></textarea></td>
</tr>
<tr class=bg_td>
<td>博客开关：</td>
<td colspan=2><input type=radio name=wrhidden value='yes' checked class=bg_td>正常<input type=radio name=wrhidden value='no' class=bg_td>隐藏<%response.write redx%>选择隐藏后，别人无法访问你的博客。</td>
</tr>
<tr class=bg_td>
<td>博客样式：</td>
<td colspan=2>
<%call user_skin_input(1,"blogreg.asp")%>
</td>
</tr>
<tr height=40 class=bg_tds><td colspan=3 align=center><input type=submit class=btn name=wsubmit value=' 确认提交 ' >　　<input type=reset class=btn value=' 重新再来 ' ></td></tr>
</form>
</table>
<%
end sub
'****************************************************
' HSCMS 1.2      Power by 2332.cn
' Email: 116116089@qq.com
' Web: http://www.2332.cn
' Copyright (C) 2004 2332.com All Rights Reserved.
'****************************************************
%>