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

📄 admin_news_add.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file = admin_chk.asp -->
<%
If Not ChkAdmin("News_Add") Then
	Call ArtErr("","")
End If
%><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../images/admin/style.css">
</head>
<script src="Include/Common.js" type="text/javascript"></script>
<%
'ON ERROR RESUME NEXT
titlecolor=trim(request("titlecolor"))
tgid=trim(request("tgid"))
ztid=0  '专题ID:11月11日,增加专题
'zz=session("admin__user")   '2006_12_04修改成为
ehit=0
MaxCharPerPage=10000
ReadPoint=0
zz=Request.Cookies(Art2008)("fullname")

if request("id")<>"" then
  id=request("id")
  sql = "select * from news where id="&id
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  title=rs("title")
  htitle=rs("htitle")
  tj=trim(rs("tj"))
  ztid=rs("ztid")  '专题ID,11月11日,增.
  add_time=rs("time")  '豪 --增2006-9-29,取出原来的添加时间
 
  '豪气冲天-增加。取出第三栏目的ID号。修正,普通用户在修改新闻时,原来的栏目不能定位。
  if rs("lm")<>"0" and rs("lm2")="0" and rs("lm3")="0" then lm1id=rs("lm") '取一级名称
  if rs("lm")<>"0" and rs("lm2")<>"0" and rs("lm3")="0" then lm2id=rs("lm2") '取二级名称  
  if rs("lm")<>"0" and rs("lm2")<>"0" and rs("lm3")<>"0" then lm3id=rs("lm3") '取三级名称   
 '豪气冲天增加-结束


  lmid=rs("lm3")
    if lmid="0" then lmid=rs("lm2")
      if lmid="0" then lmid=rs("lm")
  lm2id=rs("lm2")
  'html=rs("html")
  pic=trim(rs("pic"))
  content=rs("content")
  url=rs("url")
  titlecolor=rs("titlecolor")
  xgnews=rs("xgnews")
  ontop=rs("ontop")
  zz=rs("zz")
  eHit=rs("hit")
  piczz=rs("piczz")
  titlecolor=rs("titlecolor")'2008_03_03,添加
  PaginationType=rs("PaginationType")      '2008_07_02art添加自动分页功能
  MaxCharPerPage=rs("MaxCharPerPage")
  InfoPurview=rs("InfoPurview")
  ArrGroupID=rs("ArrGroupID")
  ReadPoint=rs("ReadPoint")
  rs.close
  set rs=nothing
else
  lmid=trim(request("lmid"))
  'html=trim(request("html"))
  add_time=now()  '豪-增,2006-9-29。如果不是新增,自动取得时间
end if

if tgid<>"" then
   Set rs = Server.CreateObject("ADODB.RecordSet")
   rs.Open "select * from [usertougao] where id="&tgid,conn,1,1
   title=rs("title")
   content=rs("content")
   zz=rs("adduser")
   lmid=rs("lmid")
   
   		if instr(lmid,"|")<>0 then      '修改匿名投稿栏目bug,栏目格式为:0|0|0
		aaa=split(lmid,"|")
          lm1=aaa(0)
          lm2=aaa(1)
          lm3=aaa(2)
		 lmid=trim(lm3)
			    if lmid="0" or lmid="" then lmid=trim(lm2)
			    if lmid="0" or lmid="" then lmid=trim(lm1)
			    if lmid="" then lmid=0
				if (not isNumeric(lmid)) then      
			    	lmid=0
			    end if
        else
			if lmid="" then lmid=0
			end if
			
   add_time=rs("addtime")  '豪--增,2006-9-29。取出时间
end if
if lmid="" then lmid=00
'11月11日,专题
if (not isNumeric(ztid)) then
	ztid=0
end if
'11月11日,专题
if (not isNumeric(eHit)) then
	ehit=0
end if
if (not isNumeric(MaxCharPerPage)) then
	MaxCharPerPage=10000
end if
%>
  <table cellpadding=2 cellspacing=1 border=0 width=98% class=tableBorder align=center>
	<tr align=center>
    <th height=25 align=center colspan="2"><strong>添加/编辑文章</strong></th>
    </tr>
	<tr>
	<td width=12% height=30 class=forumRow>&nbsp;<strong>管理导航:</strong></td>
	<td width=88% height=30 class=forumRow><a href='admin_news_add.asp'>添加文章</a> | <a href='admin_news_list.asp'>文章管理</a></td>
    </tr>
</TABLE>
	<script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.title.value == "")
  {
    alert("请在 新闻信息标题 域中输入值。");
    theForm.title.focus();
    return (false);
  }

  if (theForm.title.value.length < 1)
  {
    alert("在 新闻信息标题 域中,请至少输入 1 个字符。");
    theForm.title.focus();
    return (false);
  }

  if (theForm.title.value.length > 100)
  {
    alert("在 新闻信息标题 域中,请最多输入 100 个字符。");
    theForm.title.focus();
    return (false);
  }

  if (theForm.lm.selectedIndex < 0)
  {
    alert("请选择“栏目分类”选项中的一项。");
    theForm.lm.focus();
    return (false);
  }

  if (theForm.lm.selectedIndex == 0)
  {
    alert("第一个“栏目分类”选项无效。 请选择其他选项中的一项。");
    theForm.lm.focus();
    return (false);
  }


  if (theForm.zz.value == "")
  {
    alert("请在 来源作者 域中输入值。");
    theForm.zz.focus();
    return (false);
  }

  if (theForm.zz.value.length > 40)
  {
    alert("在 来源作者 域中,请最多输入 40 个字符。");
    theForm.zz.focus();
    return (false);
  }

  return (true);
}
//--></script>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="table"> 
          <form method="POST" action="admin_news_add_save.asp?id=<%=id%>&tgid=<%=tgid%>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
          <TR>
					<td width="18%" align="center" class="Forumrow"><b>文章标题:</b></td>
					<td width="50%" class="Forumrow">
					&nbsp;<!--webbot bot="Validation" s-display-name="新闻信息标题" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="100" --><input type="text" name="title" size="59" maxlength="100" value='<%=title%>'></td>
					<td width="32%" class="Forumrow">
					<img border=0 src="../images/admin/rect.gif" align="absmiddle" style="cursor:pointer;background-Color:<%=titlecolor%>;" onClick="Getcolor(this,'Include/selectcolor.asp','titlecolor');" title="选取标题颜色!">
                    <INPUT TYPE="text" NAME="titlecolor" ID="titlecolor" size=10 value="<%=titlecolor%>" readonly>【<font color=green>选取标题颜色</font>】</td>
				</tr>
				<tr>
					<td align="center" class="Forumrow"><b>副标题:</b></td>
					<td class="Forumrow">&nbsp;<input type="text" name="htitle" size="59" maxlength="100" value='<%=htitle%>'></td>
					<td class="Forumrow"> </td>
				</tr>
				<tr>
					<td align="center" class="Forumrow"><b>跳转URL:</b></td>
					<td class="Forumrow">&nbsp;<input type="text" name="URL" size="59" value='<%=url%>'></td>
					<td class="Forumrow">【<font color=green>填写网址,自动打开此URL。不显示新闻内容</font>】</td>
				</tr>
				<tr>
					<td align="center" class="Forumrow"><b>栏目选择:</b></td>
					<td class="Forumrow">&nbsp;<%if Request.Cookies(Art2008)("admindj")="1" then%><!--webbot bot="Validation" s-display-name="栏目分类" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select size="1" name="lm"><option>请选择:::</option>
					  <%					  
					  sql = "select * from lm where lm<>'' order by id_desc,id asc"
					  Set rs = Server.CreateObject("ADODB.RecordSet")
					  rs.Open sql,conn,1,1
					  while not rs.eof
					  %>

⌨️ 快捷键说明

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