Originally posted by Desrat
View Post
problem is this that i wnat it to logo them in
something like this i know this is invalied but you get what i need
Your Code Desrat:
Code:
--List all users in the ini file to a table
tSections = INIFile.GetSectionNames("\\\\****ed\\Cyber Soft\\system32.ini");
--get user name from user
sName = Input.GetText("Input1");
--check the input contained data then continue
if sName ~= "" and sName ~= "CANCEL" then -- step through table looking for that name
for i, v in tSections do
sIniName = INIFile.GetValue("\\\\****ed\\Cyber Soft\\system32.ini", tSections[i], "Name");
nCompare1 = String.Compare(sIniName, sName);
if nCompare1 == 0 then sCurrentSection = tSections[i]
break
end
end
else -- empty input or user cancelled
Page.Jump("Page1");
end
--check that sCurrentSection has a value and end if its empty no entry was found
if sCurrentSection then
--prompt for password
sPass = Input.GetText("Input2");
--check the input contained data then continue
if sPass ~= "" and sPass ~= "CANEL" then --check pass is correct
sIniPass = INIFile.GetValue("\\\\****ed\\Cyber Soft\\system32.ini", sCurrentSection, "Pass");
nCompare2 = String.Compare(sIniPass, sPass);
if nCompare2 ~= 0 then --pass is wrong
Dialog.Message("Notice", "Incorrect Password", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else --user valid set variable needed for shutdown action
sValid = "true"
end
else -- sCurrentSection was empty
Dialog.Message("Notice", "No user found with that name", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
Page.Jump("Page1");
end
--get the amount of time left from the ini file
nTime = INIFile.GetValue("\\\\****ed\\Cyber Soft\\system32.ini", sCurrentSection, "Time");
--value is a string we need to convert it to a number
nTime = String.ToNumber(nTime);
--if time has run out tell the user and close the app
if nTime == 0 then
Dialog.Message("Notice", "This demo has expired", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Page.Jump("Page1");
--the demo has time left let the user now how much time is left in minutes
else nMin = nTime / 60;
-- round the figure to 1 decimal place
nMin = Math.Round(nMin, 1);
--alert the user
Dialog.Message("Notice", "This demo will expire after " .. nMin .. " minutes", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end
i need at the something like
Code:
If sName + sPass ~= sValied ("true");
end
to the page 2 but the password did not have to be vailed and naiver
did the user name
i could up
user:dsdassd
Pass:dsdslkdlass
and it would still log them in i don't know what i did as it was working before
i changed something then kinda fked it all up what a n00b i am.
Please help a n00b in need
also any idea on my admin panel
pc: (PC Name) Online user: (User ID)
eg
Pc's Online:
Client One Online Admin
Client Two Offline last user Admin
Pc Slot 3
Pc Slot 4
Pc Slot 5
Add Pc to Slot ?
input box
input box
Ok button
if needed i can make a none working version for people to
test with please say if so, so i can make time.
, keep plugging away and keep posting because even though Im neck deep in my project right now theres always plenty of input on this forum..
sorry if i am asking alot i just want to make this software work without
Leave a comment: