⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doadd.asp

📁 blog 程序 DIV BLOG 0.6 Readme [ http://www.IamTing.com ] DIV BLOG 0.6版更新说明 =====================
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="ubbcode.asp" -->
<!--#include file="log_lib.asp" -->
<%
checkuser()
InstLog=request("InstLog")
cat_id=request("cat_id")
if not Instlog="true" then
if cat_id="" then
   cat_name="未知分类"
   unknowcat="true"
else
   sql="SELECT cat_name FROM  log_cat WHERE ID="&cat_id&""
   set rs=conn.EXECUTE(sql) 
   if not (rs.eof or rs.bof) then
      cat_name=rs("cat_name")
   else
      cat_name="未知分类"
	  unknowcat="true"
   end if
   rs.close
   set rs=nothing 
end if
end if

if InstLog="true" then
'dim log_tittle,log_content,cat_id,log_author,l_year,l_month,l_day
Log_tittle=Trim(replace(request("log_tittle"),"'","''"))
log_content=RTrim(replace(request("log_content"),"'","''"))

cat_id=request("cat_id")
if request("redircat")="true" then cat_id=request("cat_id_2")
log_AUTHOR=Username
log_weather=request("log_weather")
l_year=request("l_year")
face=request("face")
l_month=request("l_month")
l_day=request("l_day")
allows=request("allows")
allowubb=request("allowubb")
author=request("author")	'Poorfish增加来自于字段
author_url=request("author_url")	'Poorfish增加来自于链接字段
log_type=request("log_type")	'Poorfish增加日记类型字段
'IPAddr=getipaddr()
if allows="" then
    allows=0
	end if
	if allowubb="" then
	allowubb=0
	end if

'if InstLog="true" then
  if isad>=0 then
    MESSAGE("您没有发表日志的权限")
	Response.End
  end if
  if not ulogin="true" then
    MESSAGE("您未登陆")
    Response.End
  end if
  if log_tittle= "" then
    MESSAGE("主题不能为空")
    Response.End
  end if
  if cat_id=-1 then
    MESSAGE("请选择此日志的归类")
    Response.End
  end if
  if log_content= "" then
    MESSAGE("添加一篇无内容的日志不是个好注意哦~~")
    Response.End
  end if

    SQL = "INSERT INTO Log(cat_id,log_tittle,log_weather,face,log_content,log_AUTHOR,l_year,l_month,l_day,allows,allowubb,author,author_url,log_type)VALUES("&cat_id&",'"&Log_tittle&"','"&log_weather&"','"&face&"','"&log_content&"','"&log_AUTHOR&"',"&l_year&","&l_month&","&l_day&","&allows&","&allowubb&",'"&author&"','"&author_url&"','"&log_type&"')"
	conn.Execute(sql)

    sql= "UPDATE log_count Set l_COUNT = l_COUNT + 1 where COUNT_ID = 1"
    conn.Execute(sql)

    SQL= "UPDATE user_mdb SET F_Count=F_Count+1 where username= '" & Username & "'"
    conn.Execute(sql)
	
	''set tb msg
	sql = "select top 1 log_ID from Log order by log_ID desc"
	set rs = conn.Execute(sql)
	tbUrl="http://www.IAMTING.com/showlog.asp?log_id="&rs("log_ID")
	set rs = nothing
	tbTitle = Log_tittle
	tbExcerpt = left(unhtml(log_content),100)
	tbBlog_name = "IAMTING 2004VER3"
	''end set tb msg

    url="index.asp?vt=byday&l_year="&l_year&"&l_month="&l_month&"&l_day="&l_day&"&cat_id="&cat_id
    'Response.Redirect(url)
end if
%>
<script language="JavaScript">
document.title="保存信息";
function chgInnerHtml()
{
	document.all.showMsg.innerHTML = "信息已经保存,<a href='<%=url%>'>返回</a>"
}//chgInnerHtml
function loadFunc()
{
	parent.tbFrame.tbF.url.value = "<%=tbUrl%>";
	parent.tbFrame.tbF.title.value = "<%=tbTitle%>";
	parent.tbFrame.tbF.excerpt.value = "<%=tbExcerpt%>";
	parent.tbFrame.tbF.blog_name.value = "<%=tbBlog_name%>";
	parent.tbFrame.tbF.action = "<%=Request.Form("url")%>";
	parent.tbFrame.tbF.submit();
	setTimeout("chgInnerHtml()",2000);
}
</script>
<link rel="stylesheet" type="text/css" href="css/pagedefine.css">
<body onLoad="loadFunc()">
<span id="showMsg">
正在保存信息...
</span>
<iframe id=tbFrame name=tbFrame style="width=0;height=0;top=0;left=0" frameborder=0 src=tb.asp?act=post></iframe>
</body>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -