home *** CD-ROM | disk | FTP | other *** search
/ Flybox Trout (Edition 1) / Flybox Trout (Edition 1).iso / Setup / Support / FlyBox.exe / FlyBox.dxr / 00014_UploadAnecdotes.ls < prev    next >
Encoding:
Text File  |  2002-04-15  |  1.5 KB  |  34 lines

  1. property theNetID, AnecdoteID
  2. global DBPath
  3.  
  4. on exitFrame me
  5.   if voidp(theNetID) or (theNetID = 0) then
  6.     FlyID = getVariable(sprite(1), "Anecdote:FlyID")
  7.     Anecdote = getVariable(sprite(1), "Anecdote:Anecdote")
  8.     AnecdoteID = urlEncode(getVariable(sprite(1), "Anecdote:a"))
  9.     AnecdoteID = urlEncode(getVariable(sprite(1), "uAnecdoteID" & AnecdoteID))
  10.     Password = getVariable(sprite(1), "Password")
  11.     Show_EMail = getVariable(sprite(1), "Anecdote:IncludeEMail")
  12.     Show_People = getVariable(sprite(1), "Anecdote:IncludeName")
  13.     theStr = "http://www.flybox.info/members/UploadT.asp?" & urlEncode([#Password: Password, #Fly_ID: FlyID.value, #Annecdote: Anecdote, #Show_EMail: Show_EMail.value, #Show_People: Show_People.value])
  14.     theNetID = getNetText(theStr)
  15.   end if
  16.   put theNetID
  17.   if netDone(theNetID) then
  18.     theResult = netTextresult(theNetID)
  19.     if theResult = EMPTY then
  20.       alert("There has been a problem contacting the Flybox web-site. Please ensure that:" & RETURN & RETURN & "1. You are connected to the Internet." & RETURN & "2. If you are behind a firewall that you have permissions to access the Internet.")
  21.       setVariable(sprite(1), "Uploaded", "D")
  22.     else
  23.       db = DGOpenDatabase(DBPath & "FlyBox.mdb", 0, 0, ";PWD=StopLooking")
  24.       DGExecute("UPDATE Anecdote SET Uploaded = True WHERE AnecdoteID = " & AnecdoteID, db)
  25.       DGClose(db)
  26.       setVariable(sprite(1), "Uploaded", "T")
  27.     end if
  28.     theNetID = VOID
  29.     go("Finished")
  30.   else
  31.     go(the frame)
  32.   end if
  33. end
  34.