Update sertexID.lua

This commit is contained in:
Ale32bit 2015-10-12 16:52:11 +02:00
parent a6be05ca8c
commit 514b019502

View file

@ -15,7 +15,11 @@ function status()
end end
function login(username, password, isHashed) function login(username, password, isHashed)
local login = http.post(SERVER.."login.php", "user="..username.."&password="..password if isHashed then .."hashed=true" end).readAll() if isHashed then
local login = http.post(SERVER.."login.php", "user="..username.."&password="..password.."&hashed=true").readAll()
else
local login = http.post(SERVER.."login.php", "user="..username.."&password="..password).readAll()
end
if login == "true" then if login == "true" then
return true return true
else else
@ -24,7 +28,11 @@ function login(username, password, isHashed)
end end
function register(username, password, isHashed) function register(username, password, isHashed)
local register = http.post(SERVER.."register.php", "user="..username.."&password="..password if isHashed then .."hashed=true" end).readAll() if isHashed then
local register = http.post(SERVER.."register.php", "user="..username.."&password="..password.."&hashed=true").readAll()
else
local register = http.post(SERVER.."register.php", "user="..username.."&password="..password).readAll()
end
if register == "Success!" then if register == "Success!" then
return true return true
else else
@ -42,7 +50,11 @@ function checkUser(username)
end end
function sendSMS(username, password, to, msg, isHashed) function sendSMS(username, password, to, msg, isHashed)
local send = http.post(SERVER.."send.php","user="..username.."&password="..password.."&to="..to.."&message="..message if isHashed then .."hashed=true" end).readAll() if isHashed then
local send = http.post(SERVER.."send.php","user="..username.."&password="..password.."&to="..to.."&message="..message.."&hashed=true").readAll()
else
local send = http.post(SERVER.."send.php","user="..username.."&password="..password.."&to="..to.."&message="..message).readAll()
end
if send == "true" then if send == "true" then
return true return true
else else
@ -51,7 +63,11 @@ function sendSMS(username, password, to, msg, isHashed)
end end
function updateSMS(username, password, all, from, isHashed) function updateSMS(username, password, all, from, isHashed)
local update = http.post(SERVER.."update.php","user="..username.."&password="..password if isHashed then .."hashed=true" end).readAll() if isHashed then
local update = http.post(SERVER.."update.php","user="..username.."&password="..password.."&hashed=true").readAll()
else
local update = http.post(SERVER.."update.php","user="..username.."&password="..password).readAll()
end
if update then if update then
return true, update return true, update
else else