📄 addad.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("advip_admin")="" then
response.redirect "login.asp"
end if
dim dtitle,dcolor,dbgcolor1,dcu,dlei,dispic,dpic,durl,dtext,dstop,dtop,dmoney,sql,rs
dtitle=HtmlEncode(trim(request.form("dtitle")))
dcolor=HtmlEncode(trim(request.form("dcolor")))
dbgcolor1=HtmlEncode(trim(request.form("dbgcolor1")))
dcu=HtmlEncode(trim(request.form("dcu")))
dlei=HtmlEncode(trim(request.form("dlei")))
dispic=HtmlEncode(trim(request.form("dispic")))
dpic=HtmlEncode(trim(request.form("dpic")))
durl=HtmlEncode(trim(request.form("durl")))
dtext=HtmlEncode2(request.form("dtext"))
dstop=dateadd("d",request.form("dstop"),date())
dtop=HtmlEncode(trim(request.form("dtop")))
dmoney=HtmlEncode(trim(request.form("dmoney")))
if dmoney<>"" then
if isnumeric(dmoney)=false then
response.write "<script>alert('广告费用请填写数字,立即返回!');history.back();</script>"
response.end
end if
end if
sql="select * from data"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if dtitle<>"" then
rs.addnew
rs("title")=dtitle
rs("color")=dcolor
rs("bgcolor1")=dbgcolor1
rs("cu")=dcu
rs("type")=dlei
rs("ispic")=dispic
rs("pic")=dpic
rs("url")=durl
rs("text")=dtext
rs("stop")=dstop
rs("top")=dtop
if dmoney = "" then dmoney = 0
rs("money")=dmoney
rs("mark")="yes"
rs("shouye")=request.form("shouye")
rs("fabuid")=session("advip_admin")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp"
end if
%>
<html>
<head>
<style type="text/css">
<!--
td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
p { margin-top: 1; margin-bottom: 1 }
a:link { text-decoration: none; color: black }
a:visited { text-decoration: none; color: black }
a:active { text-decoration: none }
a:hover { text-decoration: underline; color: red }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>发布广告</title>
<SCRIPT LANGUAGE="JavaScript">
<!--//
function checkadd()
{
if (document.postart.dtitle.value.length<1)
{
alert("请填写广告标题!");
document.postart.dtitle.focus();
return false;
}
if (document.postart.dlei.value=="选择广告类别")
{
alert("请选择广告类别!");
document.postart.dlei.focus();
return false;
}
if (document.postart.dtext.value.length>80)
{
alert("请把广告内容的字数控制在80以内!");
document.postart.dtext.focus();
return false;
}
if (document.postart.dstop.value=="选择有效期")
{
alert("请选择有效期!");
document.postart.dstop.focus();
return false;
}
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
maxLen = 80;
function checkMaxInput(form) {
if (form.dtext.value.length > maxLen)
form.remLen.value = 0;
else form.remLen.value = maxLen - form.dtext.value.length;
}
// End -->
</script>
</head>
<body background="images/background.gif">
<div align="center">
<center>
<form action="" method="post" name="postart" onsubmit="return checkadd()">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="292">
<tr>
<td width="100%" colspan="2" height="30">
</td>
</tr>
<tr>
<td width="36%" align="right" height="26">广告标题:</td>
<td width="64%" height="26"><input type="text" name="dtitle" size="20" maxlength="10">
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="36%" align="right" height="26">是否加粗:</td>
<td width="64%" height="26"><input type="radio" value="no" name="dcu">否
<input type="radio" value="yes" name="dcu" checked>是</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -