<% ' ################################# public function CAL_Wcal_Location() select case request("CHANGE") case "LOCATION" CAL_Wcal_Location = CAL_Wcal_LocationLIST() case "LOCATION_ADD" CAL_Wcal_Location = CAL_Wcal_LocationADD() case "LOCATION_EDIT" CAL_Wcal_Location = CAL_Wcal_LocationEDIT() case "LOCATION_EDITEXE" CAL_Wcal_Location = CAL_Wcal_LocationEDITEXE() case "LOCATION_DELETE" CAL_Wcal_Location = CAL_Wcal_LocationDELETE() case else CAL_Wcal_Location = CAL_Wcal_LocationLIST() end select end function ' ################################# public function CAL_Wcal_LocationADD() dim strPLACE strPLACE = request.form("NEWPLACE") strSQL= "INSERT INTO wcal_location (Location, Client, Lang) values ("&_ "'" & funcs.sqlencode(request.form("NEWPLACE")) & "', " &_ "" & session("Client") & ", " &_ "" & session("Lang") & ") " my_conn.execute(strSQL) response.redirect CalendarSRC & "?DoAction=Calendar&CHANGE=LOCATION" end function ' ################################# public function CAL_Wcal_LocationEDIT() dim sH sH = sH & "" & VbCrLf sH = sH & "" & VbCrLf sH = sH & "" & VbCrLf sH = sH & "" & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & "" & VbCrLf sH = sH & "
" & VbCrLf sH = sH & application(session("LANG") & "_Location") & VbCrLf sH = sH & " " & VbCrLf sH = sH & "" & VbCrLf sH = sH & "
" & VbCrLf sH = sH & "" & application(session("LANG") & "_Update list only") & VbCrLf sH = sH & "" & application(session("LANG") & "_Update list and events") & VbCrLf sH = sH & "
" & VbCrLf sH = sH & "" & VbCrLf sH = sH & "
" & VbCrLf CAL_Wcal_LocationEDIT = "
" & funcs.BOXCreator(application(session("LANG") & "_EDIT LOCATION"), sH, strDEFTHEME, "", "50%") & "
" end function ' ################################# public function CAL_Wcal_LocationEDITEXE() strSQL= "UPDATE wcal_location set " &_ "Location='" & funcs.sqlencode(request("PLACE")) & "' " &_ "WHERE ID=" & request("ID") my_conn.execute(strSQL) ' we will update events if request("UPDATEType") = 2 then strSQL="UPDATE wcal_events set Place='" & funcs.sqlencode(request("PLACE")) & "' where Place='" & funcs.sqlencode(request("OLDPLACE")) & "' and Client=" & session("CLIENT") & " AND Lang=" & session("LANG") my_conn.execute(strSQL) end if response.redirect CalendarSRC & "?DoAction=Calendar&CHANGE=LOCATION" end function ' ################################# public function CAL_Wcal_LocationDELETE() strSQL="DELETE from wcal_location where ID=" & request("ID") my_conn.execute(strSQL) response.redirect CalendarSRC & "?DoAction=Calendar&CHANGE=LOCATION" end function ' ################################# public function CAL_Wcal_LocationLIST() dim sH dim strNAVIGATE dim CountRec dim intROWS dim HowMany dim bgROW intROWS = 10 strSQL="SELECT * from wcal_location" set ADMSET = Server.CreateObject("ADODB.Recordset") ADMSET.CursorLocation = 3 ADMSET.Open strSql, my_conn strNAVIGATE = funcs.Paging(intROWS, ADMSET, CountRec, "") sH = sH & "" & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf if NOT (ADMSET.BOF or ADMSET.EOF) then bgROW = "#FFFFFF" do until ADMSET.EOF OR HowMany = intROWS HowMany = HowMany + 1 sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf if bgROW="#FFFFFF" then bgROW="#EEEEEE" else bgROW="#FFFFFF" end if ADMSET.MoveNext loop else sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf sH = sH & " " & VbCrLf end if sH = sH & "
" & VbCrLf sH = sH & "PAGE: " & strNAVIGATE & VbCrLf sH = sH & "
ID" & application(session("LANG") & "_Location") & "" & application(session("LANG") & "_Functions") & "
" & ADMSET("ID") & "" & ADMSET("Location") & "" & VbCrLf sH = sH & " Edit | " & VbCrLf ' sH = sH & " Delete " & VbCrLf sH = sH & " Delete" & VbCrLf sH = sH & "
" & application(session("LANG") & "_No locations defined") & "
" & VbCrLf ADMSET.CacheSize = 100 ADMSET.Close set ADMSET=nothing ' Form to add new location dim strNEWLOCATION strNEWLOCATION = strNEWLOCATION & "" & VbCrLf strNEWLOCATION = strNEWLOCATION & "" & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & "" & VbCrLf strNEWLOCATION = strNEWLOCATION & "
" & VbCrLf strNEWLOCATION = strNEWLOCATION & application(session("LANG") & "_wcal28a") & VbCrLf strNEWLOCATION = strNEWLOCATION & " " & VbCrLf strNEWLOCATION = strNEWLOCATION & "" & VbCrLf strNEWLOCATION = strNEWLOCATION & "
" & VbCrLf strNEWLOCATION = strNEWLOCATION & "" & VbCrLf strNEWLOCATION = strNEWLOCATION & "
" & VbCrLf strNEWLOCATION = "
" & funcs.BOXCreator(application(session("LANG") & "_ADD NEW LOCATION"), strNEWLOCATION, strDEFTHEME, "", "90%") & "
" 'TODO sH = sH & strNEWLOCATION CAL_Wcal_LocationLIST = "
" & funcs.BOXCreator(application(session("LANG") & "_LIST OF LOCATIONS"), sH, strDEFTHEME, "", "90%") & "
" 'TODO end function %>