I Admire Myself :D
Dec 28th, 2004 by Ashley
sql=”select UserID FROM USERS WHERE loginname='Admin' and CompanyID=” & CompanyID
set RS=cnn.execute(sql)
IF not RS.EOF then
USERID=”UserID”
end if
set RS=nothing
if SalesMarkBulletin=1 then
temp=”SalesMarkBulletin=”&SalesMarkBulletin&””
else
tempNULL=”SalesMarkBulletin=NULL”
end if
if TechnicalBulletin=1 then
if temp<>“” then
temp= temp + “,TechnicalBulletin=”&TechnicalBulletin&””
else
temp=”TechnicalBulletin=”&TechnicalBulletin&””
end if
else
if tempNULL<>“” then
tempNULL= tempNULL + “,TechnicalBulletin=NULL”
else
tempNULL=”TechnicalBulletin=NULL”
end if
end if
if FileUpdate=1 then
if temp<>“” then
temp= temp + “,FileUpdate=”&FileUpdate&””
else
temp=”FileUpdate=”&FileUpdate&””
end if
else
if tempNULL<>“” then
tempNULL= tempNULL + “,FileUpdate=NULL”
else
tempNULL=”FileUpdate=NULL”
end if
end if
if FileUpdateBeta=1 then
if temp<>“” then
temp= temp + “,FileUpdateBeta=”&FileUpdateBeta&””
else
temp=”FileUpdateBeta=”&FileUpdateBeta&””
end if
else
if tempNULL<>“” then
tempNULL= tempNULL + “,FileUpdateBeta=NULL”
else
tempNULL=”FileUpdateBeta=NULL”
end if
end if
'Response.Write(temp)
if temp=”” then
sql=”update USERS set SalesMarkBulletin=NULL,TechnicalBulletin=NULL,FileUpdate=NULL,FileUpdateBeta=NULL WHERE UserID=”&UserID
else
sql=”update Users set “&temp&” WHERE UserID=”&UserID
sqltxt=”update USERS set “&tempNULL&” WHERE UserID=”&UserID
end if
cnn.execute(sql)
cnn.execute(sqltxt)