PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: nathas on 08 November, 2003, 11:24:39

Title: Web registration
Post by: nathas on 08 November, 2003, 11:24:39
I would like to create a private hub, with the option for registering via web.
Then approve, and than user can enter... Do you have any idea?
Maybe use MySQL database as backend, but CSV is a solution too.
Title:
Post by: matrix1 on 08 November, 2003, 23:42:37
I made a web reg program that only uses PHP.

WHR-1.2.03.zip (http://dognetweb.no-ip.com/host/WHR-1.2.03.zip)
Title:
Post by: Psycho_Chihuahua on 17 June, 2004, 17:31:10
QuoteI made a web reg program that only uses PHP

Is it possible to alter the website for the Hub Admins? So that ists also possible to delete User's, see the banlists and all registered Users and stuff or that nature?

What would i have to change in the script itself and what in the php files?


Pls help me on this one
Title: What would i have to change to:
Post by: Psycho_Chihuahua on 18 June, 2004, 02:17:56
be able to delete Users as well. I'm thinking of using it as an Admin Control Station where one can check the Resource Consumtion of the scripts, add and delete User's and if possible check on how many people r registered in the Hub.

If i have the lua Code i am sure that i can do the PHP part of it.

Edit:

This is the Code i need to be changed:

QuotehubUsers = {}

function readfile(fName)
   local fHandle = openfile(fName, "r")
   if fHandle then local tmp = read(fHandle, "*a") closefile(fHandle) return tmp end
end

function parseUsers()
   local table = {n=0}
   local users = readfile("../temp.dat") assert(users, "parseUsers()")
   gsub(users, "(%S-)|(%C+)|(%d+)%c", function(name, pass, level) tinsert(%table, { sName = name, sPass = pass, iLevel = tonumber(level) }) end)
   return table
end

function updateUsers()
   local tmp = parseUsers()
   foreachi(tmp, function(id, user) %hubUsers[user.sName] = user.iLevel end)
end

function OnTimer()
   local tmp = parseUsers()
   if tmp then foreachi(tmp, function(id, user)
      if not hubUsers[user.sName] then AddRegUser(user.sName, user.sPass, user.iLevel) end end)
   end updateUsers()
end

function Main()
   updateUsers()
   SetTimer(60*100) StartTimer()
end   -- tezlo


What i need is to be able to delete registered Users as well.
Title:
Post by: matrix1 on 30 June, 2004, 02:36:29
.
Title:
Post by: NotRabidWombat on 30 June, 2004, 05:04:23
matrix,

You do not validate the user name and password. So a malicious user could easily disrupt the PtokaX user database. Even worse, someone could get Admin access to a hub.

-NotRabidWombat
Title:
Post by: Psycho_Chihuahua on 30 June, 2004, 10:40:35
QuoteOriginally posted by NotRabidWombat
matrix,

You do not validate the user name and password. So a malicious user could easily disrupt the PtokaX user database. Even worse, someone could get Admin access to a hub.

-NotRabidWombat


ther's always the possibility to set a Pw on the website, wich is what i do


can anyone help with my question above??