<!-- #include file="include/skin.asp" -->
<!-- #include file="include/jk_msort.asp" -->
<%

dim esort,eid,nsort,topic,url,actions
esort=trim(request.querystring("n_sort"))
eid=trim(request.querystring("eid"))
nsort=trim(request.querystring("nsort"))
topic=trim(request.querystring("topic"))
url=trim(request.querystring("url"))
actions=trim(request.QueryString("actions"))

tit="资源报错"
call web_head(0,0,4,0,0)

if login_mode="" then
  response.write "<script language=javascript>alert(""您现在还没有登陆本站！\n\n请先注册并登陆本站。"");window.close();</script>"
else
  if actions="add" then
    call err_send()
  else
    call err_main()
  end if
end if

call web_copy()
call web_end(0,1)

sub err_send()
  dim found_err,fname,femail,remark,username,email,eusername,eword,topic

  esort=trim(request.form("esort"))
  eid=trim(request.form("eid"))
  eusername=trim(request.form("eusername"))
  email=trim(request.form("email"))
  eword=trim(request.form("eword"))
  topic=trim(request.form("topic"))
  found_err=""

  if email="" or eusername=""then
    response.write "<script language=javascript>alert(""系统发现您提交的数据有错误存在：\n\n好友姓名、好友邮件、推荐附言以及您的姓名和邮件不能为空！\n\n请返回重新填定……"");history.back(1);</script>"
    exit sub
  end if
  sql="insert into err(esort,eid,topic,eusername,email,eword,etim) " & _ 
     "values('"&esort&"',"&eid&",'"&topic&"','"&eusername&"','"&email&"','"&eword&"','"&joekoe_cms.now_time&"')"
  conn.execute sql
  response.write "<script language=javascript>alert(""您已成功为本站做了错误报告！\n\n点击关闭……"");window.close();</script>"
end sub

sub err_main()
  dim email
  sql="select top 1 email from user_data where username='"&login_username&"'"
  set rs=joekoe_cms.exec(sql,1)
  if not rs.eof then email=rs(0)
  rs.close
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0 colspan=2>&nbsp;<%response.write img_skin("m_")&tit%></td></tr>
<form action='?<%response.write "nsort="&server.urlencode(nsort)&"&topic="&server.urlencode(topic)&"&url="&server.urlencode(url)%>&actions=add' method=post onsubmit="javascript:frm_submitonce(this);">
<input type=hidden name=chk value='yes'>
<input type=hidden name=esort value='<%Response.Write esort%>'>
<input type=hidden name=eid value='<% Response.Write eid%>'>
<input type=hidden name=topic value='<% Response.Write topic%>'>
<tr class=bg_td><td width='20%'>报错栏目：</td><td width='80%' class=blue><b><%response.write nsort%>&nbsp;</b></td></tr>
<tr class=bg_td><td>资源标题：</td><td class=red_3><%response.write topic%>&nbsp;</td></tr>
<tr class=bg_tds>
    <td>简短附言：<br><font class=red2>可不填写</font><br><br>写明出错的原因及表现以便处理</td>
    <td><textarea name=eword rows=7 cols=55></textarea><%response.write redx%></td></tr>
<tr class=bg_td><td>您的姓名：</td><td><input type=text name=eusername value='<%response.write login_username%>' size=20 maxlength=20><%response.write redx%></td></tr>
<tr class=bg_td><td>您的邮件：</td><td><input type=text name=email value='<%response.write email%>' size=40 maxlength=50><%response.write redx%></td></tr>
<tr class=bg_tds><td colspan=2 align=center height=40><input type=submit value='立即报告出错资源'>　　　<input type=reset value='重新填写'></td></tr>
</form>
</table>
<%
end sub

%>