<%

dim session_for,go_back
session_for=joekoe_cms.web_cookies&"_admin_"
redx="&nbsp;<font class=red>*</font>&nbsp;"
ukong="<table width='90%' height=2><tr class=bg><td></td></tr></table>"
go_back="<input type=button name=go_back value='返回上一页' onclick=""javascript:history.back(1);"">"

sub format_redirect(r_url)
  call web_clear(0)
  response.clear
  response.redirect r_url
  response.end
end sub

function chk()
  chk=joekoe_cms.chk()
  if session(session_for&"addfrm")=false then chk=false
end function

sub form_first()
  session(session_for&"addfrm")=true
end sub

sub submit_add()
  response.write vbcrlf&"<tr>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30><input type=submit value='提交添加'>　　<input type=reset value='重新填写'>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
end sub

sub submit_edit()
  response.write vbcrlf&"<tr>" & _
		 vbcrlf&"<td></td>" & _
		 vbcrlf&"<td height=30><input type=submit value='提交修改'>　　<input type=reset value='重新填写'>　　"&go_back&"</td>" & _
		 vbcrlf&"</tr></form>"
end sub

sub admin_msg(tvar,turl,tt)
  session(session_for&"addfrm")=false
  if tt=0 then
    response.write vbcrlf&"<tr><td colspan=2 align=center><br>"&tvar&"<br><br><a href='"&turl&"'>点击返回</a><br><br><meta http-equiv='refresh' content='3; url="&turl&"'></td></tr>"
    exit sub
  end if
  response.write vbcrlf&"<script language=javascript>alert("""&tvar&""");location.href='"&turl&"';</script>"
end sub

sub admin_read(tvar,tt,rvar)
  dim tit_var
  tit_var="相关"
  if tvar<>"" then tit_var=tvar
  response.write("<a class=read alt='<table border=0 cellspacing=0 cellpadding=0 width=400><tr><td height=25><font class=read><b>"&tt&"</b></font>：</td></tr><tr><td class=htd>"&rvar&"</td></tr></table>'>"&tit_var&"说明</a>")
end sub

sub admin_error(tvar)
  response.write vbcrlf&"<tr><td colspan=2 align=center><br>"&tvar&"<br><br>"&go_back&"<br><br></td></tr>"
end sub

sub admin_td(tvar)
  response.write vbcrlf&"<tr><td class=td colspan=2>"&tvar&"</td></tr>"
end sub

sub admin_td0(tvar,tcol)
  response.write vbcrlf&"<tr><td class=td colspan="&tcol&">&nbsp;"&tvar&"</td></tr>"
end sub

sub admin_table(t1,t2)
  if t1=1 then response.write ukong
  response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>"
  if t2=1 then call admin_table_tr()
end sub

sub admin_table_tr()
  response.write vbcrlf&"<tr class=bg height=0><td width='20%'></td><td width='80%'></td></tr>"
end sub

sub admin_ender(et)
  dim temp1
  temp1="执行数据库更新查询："&joekoe_cms.num_rs&"次；页面执行时间："&FormatNumber((timer()-joekoe_cms.timer_start)*1000,3)&"毫秒"
  response.write vbcrlf&"</table>"
  if et=1 then response.write vbcrlf&ukong&vbcrlf&"<table cellspacing=1 cellpadding=2 class=table><tr class=tr0><td align=center><font alt='"&temp1&"'>"&web_copyright&"</font></td></tr><tr class=tr0><td align=center class=tims>88852门户网 , Copyright(c) 2005 <a href=http://www.88852.com/ target=_blank><b><font face=Arial color=#CC3300>88852</font><font face=Arial>.com</font></b></a>. All Rights Reserved.</td></tr></table>"
  response.write vbcrlf&"</center>" & _
		 vbcrlf&"<!--"&temp1&"-->" & _
		 vbcrlf&"</body></html>"
  call web_clear(0)
end sub

sub admin_event(eremark,t1,t2)
  dim remark
  remark=var_null(eremark)
  remark=replace(remark,"'","""")
  remark=replace(remark,chr(10),"")
  remark=replace(remark,chr(13),"")
  sql="insert into admin_event(username,nname,remark,tim,ip,sys) values('"&login_username&"','"&tit&"','"&remark&"','"&joekoe_cms.now_time&"','"&joekoe_cms.ip_sys(0)&"','"&joekoe_cms.ip_sys(1)&"')"
  call joekoe_cms.exec(sql,0)
end sub

%>