SZ_GG.Asp
资源名称:4.rar [点击查看]
上传用户:zhbanny
上传日期:2020-11-04
资源大小:161k
文件大小:3k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#Include File="../Inc/Head.Asp"--><%
- Private FangWen
- Set FangWen=New xkon_FangWen
- FangWen.FangWen()
- FangWen.Admin_GG()
- Set FangWen=Nothing
- Private s,c
- Set s=New xkon_Request
- Set c=New xkon_Response
- Private Sub gg()
- Dim Cn1
- Call OpenData()
- c.Write("<form method=""post"" action=""SZ_GG.Asp""><table width=100% ><tr><tH>ID</tH><tH>广告图片</tH><tH>文字</tH><tH>广告地址</tH><tH></tH><tH></tH></tr>")
- Set Cn1=Server.CreateObject("ADODB.Recordset")
- Cn1.Open "Select * From SZ_GG",Conn,1,1
- Do While(Not Cn1.Eof)
- c.Write("<tr><td>"&Cn1("ID")&"</td><td>"&Cn1("Tu")&"</td><td>"&Cn1("WenZi")&"</td><td>"&Cn1("DiZhi")&"</td><td><a href=""SZ_GG_CaoZuo.Asp?l=b&id="&Cn1("ID")&""">编辑</a></td><td><a href=""SZ_GG_CaoZuo.Asp?l=s&id="&Cn1("ID")&""" onClick=""if(confirm('确认删除')){return true;}else{return false;}"">删除</a></td></tr>")
- Cn1.MoveNext
- Loop
- c.Write("<tr><td></td><td><div id=a1></div></td><td><div id=a2></div></td><td><div id=a3></div></td><td></td><td><div id=a4></div></td></tr>")
- c.Write("</table>")
- Cn1.Close
- Set Cn1=Nothing
- Call CloseData()
- End Sub
- Private Sub Jia()
- Dim Tu,WenZi,DiZhi,Jia_ID,Cn1,Cn2
- Tu=s.Form_Str("Tu",4,250)
- WenZi=s.Form_Str("WenZi",1,250)
- DiZhi=s.Form_Str("DiZhi",4,250)
- If WenZi="" Or DiZhi="" Then
- Call xkon_Error("所有填写项不能为空")
- Else
- Call OpenData()
- Set Cn1=Server.CreateObject("Adodb.Command")
- Cn1.ActiveConnection=Conn
- Cn1.CommandType=1
- Cn1.CommandText="Select id From SZ_GG Order By Id desc"
- Set Cn2=Cn1.Execute
- If Cn2.Eof Then
- Jia_ID=1
- Else
- Jia_ID=Cn2("ID")+1
- End If
- Set Cn2=Nothing
- Set Cn1=Nothing
- Conn.Execute("Insert Into SZ_GG(ID,Tu,WenZi,DiZhi)Values('"&Jia_ID&"','"&Tu&"','"&WenZi&"','"&DiZhi&"')")
- Call JiLu("增加广告"&Jia_ID)
- c.Writeln("增加成功")
- Call CloseData()
- End If
- End Sub
- Call H_Title("广告管理")
- If s.Form("WenZi")<>"" Then
- Call Jia()
- Application("Ad")=""
- End If
- %><script language="javascript">
- function jia(){
- if(a1.innerHTML=='')
- {
- a1.innerHTML='<input name="Tu" />';
- a2.innerHTML='<input name="WenZi" />';
- a3.innerHTML='<input name="DiZhi" />';
- a4.innerHTML='<input type="submit" value="增加" />';
- }else{
- a1.innerHTML='';
- a2.innerHTML='';
- a3.innerHTML='';
- a4.innerHTML='';
- }
- }
- </script>
- <%
- c.Writeln("<input type=""button"" onClick=""jia();"" value=""增加广告"" />")
- Call gg()
- Call H_End()
- Set c=Nothing
- Set s=Nothing
- %>