%
If CStr(session("user_logged_ID" & strSUnique)) = Empty And NOT session("admin_loggedin" & strSUnique) = Session.SessionID then Response.Redirect "register.asp"
If CStr(session("user_logged_ID" & strSUnique)) = Empty then
unick = sq(Request("nick"))
infoText = strText_Alertsforuser & ": " & "" & unick & ""
Else
unick = sq(session("user_logged_nick" & strSUnique))
infoText = strText_MyEmailAlerts
End If
sdd = dd(objConn)
bName = strText_CreateAlert
setLocale server_locale
J = 0
If Len(Request.Form("aID")) > 0 then
aID = CLng(Request.Form("aID"))
If Request.Form("ismodify") = "modify" then
isModify = true
bName = strText_SaveAlert
modify_alert = "document.agent.modify.value='1';"
mloop = "1"
Else
objConn.Execute("DELETE FROM " & tablPfx & "Agent WHERE ID = " & aID & ";")
Response.Redirect "alert.asp?" & Request.Querystring
End If
End If
agentCatList = Application("Cat_List" & strUnique)
savedwords = Request.Form("A1")
savedtype = CLng(Request.Form("A2"))
duration = CLng(Request.Form("A5"))
Select Case Request.Form("act")
Case "enable_subcat"
catID = Request.Form("A3")
If isNumeric(catID) then
If catID = 0 then
optSCatList = ""
Else
set rscat = objConn.Execute("SELECT scatName,sCatID FROM " & tablPfx & "Scat WHERE(catID = " & catID & ");")
optSCatList = ""
scatID = Request.Form("A4")
Do While not rscat.EOF
If CStr(rscat(1)) = CStr(scatID) then sel = "selected": pickScat = CStr(scatID): Else: sel = Empty
optSCatList = optSCatList & ""
rscat.MoveNext
Loop
rscat.close
If Len(pickScat) > 0 then
set rscat = objConn.Execute("SELECT scatName,sCatID FROM " & tablPfx & "Scat WHERE(catID = " & CLng(pickScat) & ");")
opt3rdCatList = ""
If rscat.EOF Then opt3rdCatList = Empty
Do While not rscat.EOF
opt3rdCatList = opt3rdCatList & ""
rscat.MoveNext
Loop
rscat.close
End If
set rscat = objConn.Execute("SELECT catName,CatID FROM " & tablPfx & "Cat;")
agentCatList = ""
Do While not rscat.EOF
If CStr(rscat(1)) = CStr(catID) then sel = "selected": Else: sel = Empty
agentCatList = agentCatList & ""
rscat.MoveNext
Loop
rscat.close
End If
End If
If Request.Form("modify") = "1" Then
bName = strText_SaveAlert
modify_alert = "document.agent.modify.value='1';"
aID = CLng(Request.Form("aIDmod"))
mloop = "1"
End If
Case "save"
If CLng(savedtype) < 3 then
savedwordsArray = Split(Trim(savedwords))
For each item in savedwordsArray
If Len(item) > 2 then formatedwords = formatedwords & " " & item
Next
formatedwords = Trim(formatedwords)
Else: formatedwords = Trim(savedwords)
End If
If Len(formatedwords) < 3 then
msg = "
| <%= strText_Home %>::<%= infoText %> | ||||||||||||||||||||
<%
If CStr(session("user_logged_ID" & strSUnique)) = Empty then
userID = CLng(Request("id"))
Else: userID = CLng(session("user_logged_ID" & strSUnique))
End If
set rs = objConn.Execute("SELECT " & tablPfx & "Agent.* FROM " & tablPfx & "Agent WHERE(userID = " & userID & ");")
If not rs.EOF then
%>
" & strText_noAlertscreatedyet & " "
End If
rs.close
%>
<% If J < alertlimit Or isModify Or mloop = "1" then Response.Write " " & strText_Youmaycreate & " " & alertlimit-J & " " & strText_CreatemoreEmailAlert & " "
%>
<%
Else: Response.Write "" & strText_EmailAlertslimit & "" & alertlimit & ". "
End If
%>
| ||||||||||||||||||||