Update sID.lua
This commit is contained in:
parent
358fe209fb
commit
827a6fa176
1 changed files with 11 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
if not sPhone then
|
||||||
|
print("This app is for sPhone")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local function clear()
|
local function clear()
|
||||||
term.setBackgroundColor(colors.white)
|
term.setBackgroundColor(colors.white)
|
||||||
term.setTextColor(colors.black)
|
term.setTextColor(colors.black)
|
||||||
|
@ -19,19 +24,12 @@ local function header()
|
||||||
term.setTextColor(colors.black)
|
term.setTextColor(colors.black)
|
||||||
end
|
end
|
||||||
|
|
||||||
header()
|
clear()
|
||||||
|
print("Checking Server...")
|
||||||
if fs.exists("/.sPhone/config/.sIDpw") then
|
isDown = http.get("http://sertex.esy.es/status.php").readAll()
|
||||||
sPhone.winOk("Sertex ID", "Already Set!")
|
if isDown ~= "true" then
|
||||||
|
sPhone.winOk("The server is down", "Retry later")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
while true do
|
|
||||||
header()
|
|
||||||
|
|
||||||
term.setCursorPos(1,4)
|
header()
|
||||||
print(" Set Sertex ID")
|
|
||||||
write(" Username: ")
|
|
||||||
local name = read()
|
|
||||||
local nExists = http.post("http://sertex.esy.es/exists.php", "user="..name).readAll()
|
|
||||||
--later
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in a new issue