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

📄 editad.asp

📁 青岛分类信息网整合企业名录.供大家分享
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%
if session("advip_admin")="" then
response.redirect "login.asp"
end if

dim theid,dtitle,dcolor,dbgcolor1,dcu,dlei,dispic,dpic,durl,dtext,dstop,dtop,dmoney,sql,rs
theid=request("id")
if isnumeric(theid)=false then
response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
response.end
end if

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=HtmlEncode(trim(request.form("dstop")))
dtop=HtmlEncode(trim(request.form("dtop")))
shouye=HtmlEncode(trim(request.form("shouye")))
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 where adid="&theid
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if dtitle<>"" then
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("time")=request.form("time")
rs("mark")=request.form("mark")
rs("shouye")=request.form("shouye")
rs.update
rs.close  
set rs=nothing                                                                                     
conn.close   
set conn=nothing
response.redirect "editadok.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.dstop.value.length<1)
	{
        alert("请填写广告有效期!");
        document.postart.dstop.focus();
        return false;
    }
    if (document.postart.dtext.value.length>80)
	{
        alert("请把广告内容的字数控制在80以内!");
        document.postart.dtext.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"> 
    <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" value="<%=rs("title")%>"> 
        <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" <% if rs("cu")="no" then %>checked<% end if %> name="dcu">否&nbsp;                                                                                        
        <input type="radio" value="yes" name="dcu" <% if rs("cu")="yes" then %>checked<% end if %>>是</td>                                                                                           

⌨️ 快捷键说明

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