📄 admin_mb_add.asp
字号:
<%
if session("admin__user")="" then
Response.Redirect "login.asp?id=8"
end if
%>
<style>
<!--
a:link { font-size: 9pt; font-family: 宋体; color: #000000;text-decoration: none; }
a:visited { color: #000000; font-family: 宋体; font-size: 9pt;text-decoration: none; }
a:hover { font-size: 9pt; font-family: 宋体; color: #000000;TEXT-DECORATION: underline; }
body { font-family: 宋体; color: #000000; font-size: 9pt }
p { color: #000000; font-family: 宋体; font-size: 9pt }
td { font-size: 9pt; font-family: 宋体; color: #000000 }
input { font-size: 9pt; font-family: 宋体; color: #000000 }
-->
</style>
<!--#include file = admin_conn.asp -->
<div align="center">
<%
id=trim(request("id"))
lx=trim(request("lx"))
if lx="" then lx=1
if id<>"" then
sql = "select * from newsmb where id="&id
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
title=rs("title")
midd=rs("top")+rs("mid")+rs("down")
listmb=rs("listmb")
listshu=rs("list")
somb=rs("somb")
end if
%>
<br><a href="admin_mb.asp">返回模版列表</a><br><br>
</div>
<div 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 < 5)
{
alert("在 标题 域中,请至少输入 5 个字符。");
theForm.title.focus();
return (false);
}
if (theForm.title.value.length > 10)
{
alert("在 标题 域中,请最多输入 10 个字符。");
theForm.title.focus();
return (false);
}
if (theForm.mid.value == "")
{
alert("请在 模版 中部 域中输入值。");
theForm.mid.focus();
return (false);
}
if (theForm.mid.value.length < 10)
{
alert("在 模版 中部 域中,请至少输入 10 个字符。");
theForm.mid.focus();
return (false);
}
if (theForm.list.value == "")
{
alert("请在 列表代码 域中输入值。");
theForm.list.focus();
return (false);
}
if (theForm.list.value.length < 1)
{
alert("在 列表代码 域中,请至少输入 1 个字符。");
theForm.list.focus();
return (false);
}
if (theForm.listshu.value == "")
{
alert("请在 新闻显示条数 域中输入值。");
theForm.listshu.focus();
return (false);
}
if (theForm.listshu.value.length < 1)
{
alert("在 新闻显示条数 域中,请至少输入 1 个字符。");
theForm.listshu.focus();
return (false);
}
if (theForm.listshu.value.length > 3)
{
alert("在 新闻显示条数 域中,请最多输入 3 个字符。");
theForm.listshu.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.listshu.value;
var allValid = true;
var validGroups = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("在 新闻显示条数 域中,只能输入 数字 字符。");
theForm.listshu.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="admin_mb_add_save.asp?lx=<%=lx%><%if id<>"" then response.write "&id="&id%>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table border="1" width="800" id="table1" cellspacing="0" cellpadding="5" style="border-collapse: collapse" bordercolor="#C0C0C0">
<tr>
<td width="64" bgcolor="#FFFFFF">
<p align="center">标题</td>
<td bgcolor="#FFFFFF">
<!--webbot bot="Validation" s-display-name="标题" b-value-required="TRUE" i-minimum-length="5" i-maximum-length="10" --><input type="text" name="title" size="58" maxlength="10" value="<%if id<>"" then response.write title%>" <%if lx=2 then response.write "readonly"%>></td>
</tr>
<tr>
<td width="64">
<p align="center">新闻显示</p>
<p align="center"><font color="#999999">可以使用HTML代码</font></p>
<p align="center"><font color="#999999">$$标题$$<br>
$$时间$$<br>
$$栏目名$$<br>
$$内容$$<br>
$$访问量$$<br>
$$来源$$<br>
<br>
$$评论$$<br>
$$打印$$</font><br>
<br>
</td>
<td>
<!--webbot bot="Validation" s-display-name="模版 中部" b-value-required="TRUE" i-minimum-length="10" --><textarea rows="18" name="mid" cols="98" <%if lx=2 then response.write "readonly"%>>
<%
if id<>"" then
response.write midd
else
%>
<div align="center">
<table border="0" width="737" id="table1" cellspacing="0" cellpadding="5">
<tr>
<td><center><font size=5><b>$$标题$$</b></font></center></td>
</tr>
<tr>
<td><hr><CENTER>徐氏工作室 $$栏目名$$ 加入时间:$$时间$$ 来源:&&来源&& 访问量:$$访问量$$</CENTER></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>$$内容$$</td>
</tr>
</table>
</div>
<%end if%>
</textarea></td>
</tr>
<tr>
<td width="64" bgcolor="#F5F5F5">
<p align="center">更多新闻列表代码</p>
<p align="center"><font color="#999999">可以使用HTML代码</font><p align="center">
<font color="#999999">$$列表$$</font></td>
<td bgcolor="#F5F5F5">
<!--webbot bot="Validation" s-display-name="列表代码" b-value-required="TRUE" i-minimum-length="1" --><textarea rows="18" name="list" cols="98"><%=listmb%></textarea></td>
</tr>
<tr>
<td width="64" bgcolor="#F5F5F5">
<p align="center">更多新闻显示条数</td>
<td bgcolor="#F5F5F5">
每一页显示:<!--webbot bot="Validation" s-display-name="新闻显示条数" s-data-type="Integer" s-number-separators="x" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="3" --><input type="text" name="listshu" size="4" maxlength="3" value="<%=listshu%>">条新闻。</td>
</tr>
</table>
<p><input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></p>
</form>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -