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

📄 admin_news_add.asp

📁 迅时后台可以 对新闻栏目进行管理
💻 ASP
📖 第 1 页 / 共 2 页
字号:


<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<html>

<head>
<!--#include file = language.asp -->

<base target="_self">
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#EFEFDE">
<%
'ON ERROR RESUME NEXT
titlecolor=trim(request("titlecolor"))
tgid=trim(request("tgid"))
ztid=0
eaddtime=year(now())&"-"&month(now())&"-"&day(now())&" "&hour(time())&":"&Minute(now())&":"&Second(now())
ehit=0
zz=session("admin__user")
ehtml=Request.Cookies("html")

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")
  lmid=rs("lm3")
    if lmid="0" then lmid=rs("lm2")
      if lmid="0" then lmid=rs("lm")
  lm2id=rs("lm2")
  ehtml=rs("html")
  pic=trim(rs("pic"))
  content=rs("content")
  yurl=rs("yurl")
  url=rs("url")
  titlecolor=rs("titlecolor")
  xgnews=rs("xgnews")
  ontop=rs("ontop")
  TouTiao=rs("TouTiao")
  zz=rs("zz")
  laiyuan=rs("laiyuan")
  piczz=rs("piczz")
  eaddtime=datetime(rs("time"))
  eHit=rs("hit")
  
  rs.close
  set rs=nothing
else
  lmid=trim(request("lmid"))
  html=trim(request("html"))
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")
   eaddtime=datetime(rs("addtime"))
end if
if lmid="" then lmid=00
if (not isNumeric(ztid)) then
	ztid=0
end if

if (not isNumeric(eHit)) then
	ehit=0
end if
%>
<div align="center">
<table border="0" width="760" id="table1" cellspacing="0" cellpadding="0" >
	<tr>
		<td>
		<div align="center">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table3">
				<tr>
					<td>
					 </td>
					<td> </td>
					<td >
					<p align="right">
					 </td>
				</tr>
			</table>
		</div>
		</td>
	</tr>
	<tr>
		<td  align=center>
		<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><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.lm.selectedIndex < 0)
  {
    alert("请选择“栏目分类”选项中的一项。");
    theForm.lm.focus();
    return (false);
  }

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

  if (theForm.addtime.value == "")
  {
    alert("请在 日期时间 域中输入值。");
    theForm.addtime.focus();
    return (false);
  }

  if (theForm.addtime.value.length < 1)
  {
    alert("在 日期时间 域中,请至少输入 1 个字符。");
    theForm.addtime.focus();
    return (false);
  }

  if (theForm.addtime.value.length > 30)
  {
    alert("在 日期时间 域中,请最多输入 30 个字符。");
    theForm.addtime.focus();
    return (false);
  }

  if (theForm.hit.value == "")
  {
    alert("请在 阅读数 域中输入值。");
    theForm.hit.focus();
    return (false);
  }

  if (theForm.hit.value.length < 1)
  {
    alert("在 阅读数 域中,请至少输入 1 个字符。");
    theForm.hit.focus();
    return (false);
  }

  if (theForm.hit.value.length > 9)
  {
    alert("在 阅读数 域中,请最多输入 9 个字符。");
    theForm.hit.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="../admin_news_add_save.asp?id=<%=id%>&tgid=<%=tgid%>" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript">
			<table border="0" width="753" id="table2" cellpadding="5" style="border-collapse: collapse" bordercolor="#80ABF4">
				<tr>
					<td width="11%" align="center">新闻信息标题</td>
					<td width="41%">
					&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="48" maxlength="100" value='<%=title%>'></td>
					<td width="45%">
					<select size="1" name="titlecolor">
	            <option value=" ">默认颜色</option>
					<%
					ii=255
					for i=16 to 255
						Randomize
						an=""
						an= int((255-16+1) * RND +16)
						a=hex(i)
						b=hex(ii)
						c=hex(i)
						'i=i+99
						ccc=a+b+c
						'Response.Write i&":<font color="&ccc&">"&CCC&"</font><br>"
						%>
						<OPTION <% if titlecolor="#"&ccc&"" then response.write " selected "%>  value="#<%=ccc%>" style="background-color:#<%=ccc%>"></OPTION>
						
						<%
						ii=ii-1
					next
					ii=255
					for i=16 to 255
						Randomize
						an=""
						an= int((255-16+1) * RND +16)
						a=hex(i)
						b=hex(ii)
						c=hex(ii)
						'i=i+99
						ccc=a+b+c
						'Response.Write i&":<font color="&ccc&">"&CCC&"</font><br>"
						%>
						<OPTION <% if titlecolor="#"&ccc&"" then response.write " selected "%>  value="#<%=ccc%>" style="background-color:#<%=ccc%>"></OPTION>
						
						<%
						ii=ii-1
					next
					ii=255

⌨️ 快捷键说明

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