Jump to content
MakeWebGames

[mccode] Bit of code for staff Apps


John99
 Share

Recommended Posts

Heres A Bit Of Code I Just coded took like 2 secounds

Main Menu.php or any were you have staff apps like explore.php ect

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You will have to change staffapps.php to what eva your staff apps are called thanks, Crazy-T

Link to comment
Share on other sites

Re: Bit of code for staff Apps

 

Heres A Bit Of Code I Just coded took like 2 secounds

Main Menu.php or any were you have staff apps like explore.php ect

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

You will have to change staffapps.php to what eva your staff apps are called thanks, Crazy-T

Which staffapps mod is this from? There are quite a lot of different versions of them.

Link to comment
Share on other sites

Re: [mccode] Bit of code for staff Apps

 

Yeah i no just done it for Noobs BUT if someone in url yourgamename.com/staffapps.php it will work unless u add somethink like

like the other code but like

if($staffapps = CLOSED)

{

DIE("STAFF APPS CLOSED)

}

ect

Yeah hence the

make a little admin option to turn them on and off

That was referring to the actual page, it would be more logical to have the die on the actual staff aps page so people click the link and it says "staff applications are currently closed" blah blah...

Easy way would be to add a sql to the staff apps db table.

then just if it.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

then for the admin just have either a case or just a separate file..but case would be easy i suppose..

 

function staffapps()

{

globals $db,$c etc

$aps = $db->query("select open from staffapps");

if($aps['open']==1)

{

$db->query("update staffapps set open=0");

echo "staff apps turned off";

}else{

$db->query("update staff apps set open=1");

echo "staff apps turned on";

}

taking your sql query is something like

alter table staffapps add open int(11) not null default '0'

and using the case

 

case "staffapps": staffapps(); break;

and the link Turn on/off staff apps

 

Please note i did that in like 1minute, its very bad. xD

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...