Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: t Arguments: server,id Description: Page type: webl Render function: Module: demavu Page source: var db = Wub_GetDB("demavu"); var coll = Wub_GetCollection(db, "data"); if server == "-" then server = "staging" end; var selectedGame = WubCall("demavu.getConfigVar", [server,"selectedGame"]); /* id = Base64_Decode(id); var name = id; id = Wub_ReplaceAll(id, " ", "_"); var path = []; if category == "games" then path = ["-","games", id, "name" ] else path = ["-","games",selectedGame, category, id,"name"] end; var obj = [. .]; var ret = "OK"; var done = false; var i = 0; every o in path do if path[i] != "*" then if path[i] == "-" then if i == 0 then obj["lev" + ToString(i)] := "sXbxqn7udYfN"; elsif i == 2 then obj["lev" + ToString(i)] := selectedGame; end elsif path[i] == "selected" and i == 1 then done = selectedGame else obj["lev" + ToString(i)] := o; end end; i = i + 1 end; if done == false then obj["value"] := name; obj["server"] := server; var aDbObj = Wub_NewDBObject(obj); Wub_InsertDB(coll, aDbObj); ret = ToString(obj); else ret = done end; NewPage(ret, "text/plain"); */