<!--#include file="../../../inc/cms_admin.asp" -->
<%
dim SlideID,SlideName,SlideClass,SlideImg,SlideLink,SlideWidth,SlideHeight,SlideStime,SlideEtime,SlideOnOff,SlideContent,SlidedTime,LID,SlideStyle,SlideOrder,Slidetitle1,Slidetitle2
dim sql,table,col,colval,idval,id

dim act : act=getForm("act","get")
dim stype : stype=getForm("stype","get")
dim postion : postion=getForm("postion","get")
table=getForm("table","both")
col=getForm("col","both")
colval=getForm("colval","both")
idval=getForm("idval","both")
SlideID=getForm("SlideID","both")

Select case act	
	case "setSlide"	:	dbconn("update  [dbpre]Slide set Slideonoff="&colval&"  where  SlideID="&SlideID&"")	
	case "getcity"	:	getcity
	case "edit"		:	editSlide
	case "add"		: 	addtSlide
	case "del"		:	dbconn("delete from [dbpre]Slide  where SlideID in ("&idval&")")
	case "saveid"	:	saveid	
End Select


Sub saveid
	dim colid		:	colid=getForm("colid","both")
	dim colname		:	colname=getForm("colname","both")
	dim colval		:	colval=request.form("colval")
	dim sql1 		:	sql1="update [dbpre]Slide Set "&colname&"='"&colval&"' Where SlideID="&colid	
	dim sql2 		:	sql2="update [dbpre]Slide Set "&colname&"="&colval&" Where SlideID="&colid	
	dbconn(sql1)	:	if err then dbconn(sql2)
End Sub


Sub getSlide
dim rs,id
	if not isnul(SlideID) then	
		sql ="select * from [dbpre]Slide where SlideID="&SlideID
		set rs = conn.exec(sql,"r1")		
	else
		alertgo "没有这条记录","-1"
	end if 
	
	if rs.eof then 
			alertgo "没有这条记录","-1"
		else
			SlideID=rs("SlideID")
			SlideName=rs("SlideName")
			Slidetitle1=rs("Slidetitle1")
			Slidetitle2=rs("Slidetitle2")
			SlideOrder=rs("SlideOrder")
			SlideContent=rs("SlideContent")
			SlidedTime=rs("SlidedTime")
			SlideStyle=rs("SlideStyle")
		end if
	rs.close : set rs=nothing
End Sub


%>