Glad to see it working! ^^ To add more, the "simplest" but kinda tiring process would be to repeat the very same but by creating more buttons, and more columns in the database and more similar functions to match. I will try to make a more easily editable version and a little better coded, once I have a bit of time available to write it x.x
Thank you guys for the support! ^^ I have a mod ready I'd like to post first, but I will try to improve and post this one asap!
Regarding the button, you'd have to use jQuery to disable it I believe(
http://stackoverflow.com/questions/1...-submit-button). A way to go around mysidia's hate on javascript, is to add the script inside a Comment(""), inclusing the addition of the jQuery link, works great.
If you don't want to show the button at all:
PHP Code:
if($mysidia->input->post("submit"))//if button submits
{
if($mysidia->user->canWork())
{
...
}
else{
//they can't work, put a message here?
}
}
else//before user clicks button
{
//whatever text and button you had outside here
}
OR Putting a return inside the outside if, for when the button submits, also cancels anything that happens after it:
PHP Code:
if($mysidia->input->post("submit"))//if button submits
{
if($mysidia->user->canWork())
{
...
}
else{
//they can't work, put a message here?
}
return;//this ends the function, nothing after this will make it to the page
}
//rest of the text and button you had